/*! For license information please see index.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mapgl=e():t.mapgl=e()}(self,(function(){return(()=>{var t={103:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_lxLX8k02JhUZQLnJt5Mm {\n    font-family: Helvetica, Arial, sans-serif !important;\n    font-size: 8px !important;\n    line-height: 8px !important;\n    text-align: right !important;\n    display: flex;\n    align-items: flex-start;\n    color: #6d7173 !important;\n}\n\n.mapgl_AsSWrna6OS9VEoYItIZV {\n    display: block;\n}\n\na.mapgl_N4E6A6Wp5fYeXBf2QGWt {\n    color: #6d7173 !important;\n    text-decoration: none !important;\n}\n\na.mapgl_N4E6A6Wp5fYeXBf2QGWt:hover {\n    color: #929292 !important;\n}\n",""]),a.locals={container:"mapgl_lxLX8k02JhUZQLnJt5Mm",text:"mapgl_AsSWrna6OS9VEoYItIZV",link:"mapgl_N4E6A6Wp5fYeXBf2QGWt"};const s=a},274:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_SqprqBDt0m3ck8ImwnZ0 {\n    position: absolute;\n    pointer-events: none;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n}\n\n.mapgl_zXpm2Oitx3qOyLXwyVKj {\n    position: absolute;\n    display: flex;\n    z-index: 50;\n    pointer-events: none;\n    width: 100%;\n    height: 100%;\n}\n\n.mapgl_zXpm2Oitx3qOyLXwyVKj > div > * {\n    pointer-events: auto;\n}\n\n.mapgl_r_oD6okoyw2O0sKMERju {\n    flex-direction: column;\n    align-items: flex-start;\n}\n\n.mapgl_FmkgHxvqVart7hWj1dIm {\n    flex-direction: row;\n    justify-content: center;\n    align-items: flex-start;\n}\n\n.mapgl_OS0i93oEEcYSyKRHurat {\n    flex-direction: column;\n    align-items: flex-end;\n}\n\n.mapgl_BIfihGR7X9awnUFk62BQ {\n    flex-direction: column;\n    justify-content: center;\n    align-items: flex-start;\n}\n\n.mapgl_vpFke4npOo1b8whqwKPv {\n    flex-direction: column;\n    justify-content: center;\n    align-items: flex-end;\n}\n\n.mapgl_gLybMsoqNs2Phzvi6hS5 {\n    flex-direction: column-reverse;\n    align-items: flex-start;\n}\n\n.mapgl_GbiZTwfDOnlyI6flVbL_ {\n    flex-direction: row;\n    justify-content: center;\n    align-items: flex-end;\n}\n\n.mapgl_YoIqRTD9ccmcm_A81adk {\n    flex-direction: column-reverse;\n    align-items: flex-end;\n}\n\n.mapgl_r_oD6okoyw2O0sKMERju > div + div,\n.mapgl_OS0i93oEEcYSyKRHurat > div + div,\n.mapgl_BIfihGR7X9awnUFk62BQ > div + div,\n.mapgl_vpFke4npOo1b8whqwKPv > div + div {\n    margin-top: 10px;\n}\n\n.mapgl_gLybMsoqNs2Phzvi6hS5 > div + div,\n.mapgl_YoIqRTD9ccmcm_A81adk > div + div {\n    margin-bottom: 10px;\n}\n\n.mapgl_FmkgHxvqVart7hWj1dIm > div + div,\n.mapgl_GbiZTwfDOnlyI6flVbL_ > div + div {\n    margin-left: 10px;\n}\n",""]),a.locals={controlPane:"mapgl_SqprqBDt0m3ck8ImwnZ0",container:"mapgl_zXpm2Oitx3qOyLXwyVKj",topLeft:"mapgl_r_oD6okoyw2O0sKMERju",topCenter:"mapgl_FmkgHxvqVart7hWj1dIm",topRight:"mapgl_OS0i93oEEcYSyKRHurat",centerLeft:"mapgl_BIfihGR7X9awnUFk62BQ",centerRight:"mapgl_vpFke4npOo1b8whqwKPv",bottomLeft:"mapgl_gLybMsoqNs2Phzvi6hS5",bottomCenter:"mapgl_GbiZTwfDOnlyI6flVbL_",bottomRight:"mapgl_YoIqRTD9ccmcm_A81adk"};const s=a},306:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_T5RQQ2NOfnY3_e00os8n {\n    font-family: Helvetica, Arial, sans-serif !important;\n    font-size: 8px !important;\n    line-height: 8px !important;\n    text-align: right !important;\n    display: flex;\n    flex-direction: column;\n    align-items: flex-end;\n    color: #6d7173 !important;\n}\n\n.mapgl_h7bp68SOWSVBX9Orf9BN {\n    display: flex;\n    flex-direction: column;\n    padding-right: 4px;\n}\n\n.mapgl_fMmrF9RliMxNiObbmFUm {\n    display: flex;\n    flex-direction: row;\n}\n\n.mapgl_mIYahvUhOA0HDmHGtdtA {\n    animation: mapgl_mIUQLFgaHsaFSSZFHkpH 5s forwards;\n}\n\na.mapgl_rs_xxgfm2WZu987bybgD {\n    color: #6d7173 !important;\n    text-decoration: none !important;\n}\n\na.mapgl_rs_xxgfm2WZu987bybgD:hover {\n    color: #929292 !important;\n}\n@keyframes mapgl_mIUQLFgaHsaFSSZFHkpH {\n    85% {\n        opacity: 1;\n    }\n    100% {\n        opacity: 0;\n    }\n}\n",""]),a.locals={container:"mapgl_T5RQQ2NOfnY3_e00os8n",text:"mapgl_h7bp68SOWSVBX9Orf9BN",copyrights:"mapgl_fMmrF9RliMxNiObbmFUm",autoHide:"mapgl_mIYahvUhOA0HDmHGtdtA",hideAnimation:"mapgl_mIUQLFgaHsaFSSZFHkpH",link:"mapgl_rs_xxgfm2WZu987bybgD"};const s=a},704:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_ByGR_EaTxrFwgYplL9Rn {\n    position: relative;\n}\n\n.mapgl_rV7SBEVklXHee7q0ro4A {\n    display: flex;\n    max-height: 40vh;\n    background: #ffffff;\n    width: 32px;\n    overflow: hidden;\n    border-radius: 4px;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n}\n\n.mapgl_eTkkBoRhhRCs7jEwQ2Wb {\n    width: 100%;\n    overflow-x: hidden;\n    overflow-y: auto;\n    -moz-padding-end: 17px;\n    -webkit-padding-end: 17px;\n    -webkit-margin-end: -17px;\n}\n\n.mapgl_gnVYSnZbzDyDuJqZz3mJ {\n    display: flex;\n    flex-direction: column-reverse;\n}\n\n.mapgl_zsd_0yR5qXs0D4rXioaV {\n    padding: 0;\n\n    border: none;\n    background: #ffffff;\n    height: 32px;\n    width: 32px;\n    color: #262626;\n    cursor: pointer;\n    border-bottom: 1px solid #e6e6e6;\n    box-sizing: border-box;\n    flex-shrink: 0;\n}\n.mapgl_zsd_0yR5qXs0D4rXioaV:focus {\n    outline: 0;\n}\n.mapgl_zsd_0yR5qXs0D4rXioaV:first-child {\n    border-bottom: none;\n}\n.mapgl_zsd_0yR5qXs0D4rXioaV:hover {\n    color: rgba(38, 38, 38, 0.7);\n}\n.mapgl_zsd_0yR5qXs0D4rXioaV:active {\n    color: #028eff;\n}\n.mapgl_zsd_0yR5qXs0D4rXioaV:disabled {\n    background: #f2f2f2;\n    color: #929292;\n    cursor: default;\n}\n\n.mapgl_IpWyhNkbWQBqP479eDE2 {\n    font-size: 18px;\n    line-height: 32px;\n    font-weight: 400;\n    overflow-wrap: break-word;\n\n    position: relative;\n    text-align: center;\n    height: 100%;\n}\n\n.mapgl_yUGrJifDT7VmwlUOKi8_:after {\n    content: '';\n    position: absolute;\n    top: 4px;\n    bottom: 4px;\n    width: 4px;\n    height: 4px;\n    border-radius: 50%;\n    background: #028eff;\n}\n",""]),a.locals={root:"mapgl_ByGR_EaTxrFwgYplL9Rn",container:"mapgl_rV7SBEVklXHee7q0ro4A",scroller:"mapgl_eTkkBoRhhRCs7jEwQ2Wb",content:"mapgl_gnVYSnZbzDyDuJqZz3mJ",control:"mapgl_zsd_0yR5qXs0D4rXioaV",label:"mapgl_IpWyhNkbWQBqP479eDE2",_hasResult:"mapgl_yUGrJifDT7VmwlUOKi8_"};const s=a},32:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_y5CSWkmzFZelEK3XsNPI {\n    background: rgba(255, 255, 255, 0.68);\n    border-width: 0 1px 1px 1px;\n    border-color: #7a7a7a;\n    border-style: solid;\n    border-radius: 0;\n    min-width: 64px;\n    height: 16px;\n    overflow: hidden;\n    pointer-events: none !important;\n}\n\n.mapgl_jEDrEoj7PBYIc0hBFCRq {\n    min-width: 50px;\n    height: 12px;\n    margin-top: 2px;\n    margin-left: 6px;\n    font-family: Helvetica, Arial, sans-serif !important;\n    font-style: normal;\n    font-weight: 400;\n    font-size: 9px;\n    line-height: 12px;\n\n    color: #262626;\n}\n",""]),a.locals={root:"mapgl_y5CSWkmzFZelEK3XsNPI",label:"mapgl_jEDrEoj7PBYIc0hBFCRq"};const s=a},928:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_XiKtyzV1PZ9N9z7NbBH0 {\n    background: #fff;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n    border-radius: 4px;\n    width: 32px;\n    overflow: hidden;\n}\n\n.mapgl_TCECw1gCo4pPgxN8WlHv {\n    padding: 0;\n    outline: 0;\n    border: none;\n    cursor: pointer;\n    box-sizing: border-box;\n    font-size: 18px;\n    font-weight: 400;\n    width: 32px;\n    height: 32px;\n    color: #262626;\n    background: #fff;\n}\n\n.mapgl_aifLu_eH4oBoq5TCFEl1:hover {\n    opacity: 0.7;\n}\n\n.mapgl_AZeLf0JO9BdLfzixjszM {\n    background: #299400;\n    color: #fff;\n}\n.mapgl_g9fon0BTtGdnOX4Ce0gE {\n    background: #ffb81c;\n    color: #fff;\n}\n.mapgl_GDc542cVDcz8I8tKJtvz {\n    background: #fe5000;\n    color: #fff;\n}\n\n.mapgl_AZeLf0JO9BdLfzixjszM:hover,\n.mapgl_g9fon0BTtGdnOX4Ce0gE:hover,\n.mapgl_GDc542cVDcz8I8tKJtvz:hover {\n    color: rgba(38, 38, 38, 0.7);\n}\n",""]),a.locals={root:"mapgl_XiKtyzV1PZ9N9z7NbBH0",button:"mapgl_TCECw1gCo4pPgxN8WlHv",none:"mapgl_aifLu_eH4oBoq5TCFEl1",easy:"mapgl_AZeLf0JO9BdLfzixjszM",medium:"mapgl_g9fon0BTtGdnOX4Ce0gE",hard:"mapgl_GDc542cVDcz8I8tKJtvz"};const s=a},585:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_RyvsmCnoVe7ui2MClLMS {\n    width: 32px;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n    border-radius: 4px;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n    background: #fff;\n}\n\n.mapgl_Tdw0Vs7iQuaknNHHD21k {\n    padding: 0;\n    outline: 0;\n    border: none;\n    cursor: pointer;\n\n    background: #fff;\n    width: 32px;\n    height: 32px;\n    color: #262626;\n    box-sizing: border-box;\n}\n\n.mapgl_Tdw0Vs7iQuaknNHHD21k:hover {\n    opacity: 0.7;\n}\n\n.mapgl_Tdw0Vs7iQuaknNHHD21k:active {\n    color: #028eff;\n}\n\n.mapgl_Tdw0Vs7iQuaknNHHD21k:disabled {\n    background: #f2f2f2;\n    color: #929292;\n    cursor: default;\n}\n\n.mapgl_JwF7YmgOItTjpjwxORCk {\n    border-bottom: 1px solid #e6e6e6;\n}\n\n.mapgl_Tvr6BDuVyr8143cFJ4nJ {\n    border-bottom: none;\n}\n",""]),a.locals={root:"mapgl_RyvsmCnoVe7ui2MClLMS",button:"mapgl_Tdw0Vs7iQuaknNHHD21k",zoomIn:"mapgl_JwF7YmgOItTjpjwxORCk",zoomOut:"mapgl_Tvr6BDuVyr8143cFJ4nJ"};const s=a},438:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(276),r=n.n(i),o=n(368),a=n.n(o)()(r());a.push([t.id,".mapgl_Zqe1f2Ik8_MdehkwZiwo {\n    pointer-events: none;\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 10px;\n    background-color: rgba(0, 0, 0, 0.2);\n    cursor: default;\n}\n\n.mapgl_RBLYLi7mJFgKIKMPLvv_ {\n    text-align: center;\n    font-size: 24px;\n    font-family: Helvetica, Arial, sans-serif;\n    font-weight: bold;\n    color: white;\n}\n",""]),a.locals={wrap:"mapgl_Zqe1f2Ik8_MdehkwZiwo",container:"mapgl_RBLYLi7mJFgKIKMPLvv_"};const s=a},379:t=>{"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s],c=i.base?l[0]+i.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)e[h].references++,e[h].updater(f);else{var p=r(f,i);i.byIndex=s,e.splice(s,0,{identifier:d,updater:p,references:1})}a.push(d)}return a}function r(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var o=i(t=t||[],r=r||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var s=n(o[a]);e[s].references--}for(var l=i(t,r),c=0;c<o.length;c++){var u=n(o[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}o=l}}},569:t=>{"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},3:t=>{self,t.exports=function(){var t={3704:function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),i=0;i<t.length;i++)n[t.charCodeAt(i)]=i;e.c=function(e){var n,i=new Uint8Array(e),r=i.length,o="";for(n=0;n<r;n+=3)o+=t[i[n]>>2],o+=t[(3&i[n])<<4|i[n+1]>>4],o+=t[(15&i[n+1])<<2|i[n+2]>>6],o+=t[63&i[n+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}}()},3431:function(t){var e=.1,n="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function r(t,e){return 3*e-6*t}function o(t){return 3*t}function a(t,e,n){return((i(e,n)*t+r(e,n))*t+o(e))*t}function s(t,e,n){return 3*i(e,n)*t*t+2*r(e,n)*t+o(e)}function l(t){return t}t.exports=function(t,i,r,o){if(!(0<=t&&t<=1&&0<=r&&r<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===i&&r===o)return l;for(var c=n?new Float32Array(11):new Array(11),u=0;u<11;++u)c[u]=a(u*e,t,r);function d(n){for(var i=0,o=1;10!==o&&c[o]<=n;++o)i+=e;--o;var l=i+(n-c[o])/(c[o+1]-c[o])*e,u=s(l,t,r);return u>=.001?function(t,e,n,i){for(var r=0;r<4;++r){var o=s(e,n,i);if(0===o)return e;e-=(a(e,n,i)-t)/o}return e}(n,l,t,r):0===u?l:function(t,e,n,i,r){var o,s,l=0;do{(o=a(s=e+(n-e)/2,i,r)-t)>0?n=s:e=s}while(Math.abs(o)>1e-7&&++l<10);return s}(n,i,i+e,t,r)}return function(t){return 0===t?0:1===t?1:a(d(t),i,o)}}},187:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,".mapgl-hover {\n    cursor: pointer;\n}\n\n.mapgl-dragging {\n    cursor: grabbing;\n}\n\n.mapgl-rotating {\n    cursor: move;\n}\n",""]);var s=a},3645:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},8081:function(t){"use strict";t.exports=function(t){return t[1]}},9187:function(t){"use strict";function e(t,e,o){o=o||2;var a,s,l,d,h,p,m,v=e&&e.length,_=v?e[0]*o:t.length,y=n(t,0,_,o,!0),g=[];if(!y||y.next===y.prev)return g;if(v&&(y=function(t,e,r,o){var a,s,l,d=[];for(a=0,s=e.length;a<s;a++)(l=n(t,e[a]*o,a<s-1?e[a+1]*o:t.length,o,!1))===l.next&&(l.steiner=!0),d.push(f(l));for(d.sort(c),a=0;a<d.length;a++)r=i(r=u(d[a],r),r.next);return r}(t,e,y,o)),t.length>80*o){a=l=t[0],s=d=t[1];for(var b=o;b<_;b+=o)(h=t[b])<a&&(a=h),(p=t[b+1])<s&&(s=p),h>l&&(l=h),p>d&&(d=p);m=0!==(m=Math.max(l-a,d-s))?1/m:0}return r(y,g,o,a,s,m),g}function n(t,e,n,i,r){var o,a;if(r===P(t,e,n,i)>0)for(o=e;o<n;o+=i)a=S(o,t[o],t[o+1],a);else for(o=n-i;o>=e;o-=i)a=S(o,t[o],t[o+1],a);return a&&_(a,a.next)&&(I(a),a=a.next),a}function i(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!_(i,i.next)&&0!==v(i.prev,i,i.next))i=i.next;else{if(I(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function r(t,e,n,c,u,d,f){if(t){!f&&d&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=h(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,c=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e<c&&(s++,i=i.nextZ);e++);for(l=c;s>0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,c*=2}while(a>1)}(r)}(t,c,u,d);for(var p,m,v=t;t.prev!==t.next;)if(p=t.prev,m=t.next,d?a(t,c,u,d):o(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),I(t),t=m.next,v=m.next;else if((t=m)===v){f?1===f?r(t=s(i(t),e,n),e,n,c,u,d,2):2===f&&l(t,e,n,c,u,d):r(i(t),e,n,c,u,d,1);break}}}function o(t){var e=t.prev,n=t,i=t.next;if(v(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(p(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&v(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function a(t,e,n,i){var r=t.prev,o=t,a=t.next;if(v(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,c=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,u=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,d=h(s,l,e,n,i),f=h(c,u,e,n,i),m=t.prevZ,_=t.nextZ;m&&m.z>=d&&_&&_.z<=f;){if(m!==t.prev&&m!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&v(m.prev,m,m.next)>=0)return!1;if(m=m.prevZ,_!==t.prev&&_!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,_.x,_.y)&&v(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;m&&m.z>=d;){if(m!==t.prev&&m!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&v(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;_&&_.z<=f;){if(_!==t.prev&&_!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,_.x,_.y)&&v(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function s(t,e,n){var r=t;do{var o=r.prev,a=r.next.next;!_(o,a)&&y(o,r,r.next,a)&&w(o,a)&&w(a,o)&&(e.push(o.i/n),e.push(r.i/n),e.push(a.i/n),I(r),I(r.next),r=t=a),r=r.next}while(r!==t);return i(r)}function l(t,e,n,o,a,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=x(l,c);return l=i(l,l.next),u=i(u,u.next),r(l,e,n,o,a,s),void r(u,e,n,o,a,s)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function u(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===a)return n;var l,c=n,u=n.x,h=n.y,f=1/0;i=n;do{r>=i.x&&i.x>=u&&r!==i.x&&p(o<h?r:a,o,u,h,o<h?a:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),w(i,t)&&(l<f||l===f&&(i.x>n.x||i.x===n.x&&d(n,i)))&&(n=i,f=l)),i=i.next}while(i!==c);return n}(t,e);if(!n)return e;var r=x(n,t),o=i(n,n.next);return i(r,r.next),e===n?o:e}function d(t,e){return v(t.prev,t,e.prev)<0&&v(e.next,t,t.next)<0}function h(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function p(t,e,n,i,r,o,a,s){return(r-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&y(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(v(t.prev,t,e.prev)||v(t,e.prev,e))||_(t,e)&&v(t.prev,t,t.next)>0&&v(e.prev,e,e.next)>0)}function v(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,n,i){var r=b(v(t,e,n)),o=b(v(t,e,i)),a=b(v(n,i,t)),s=b(v(n,i,e));return r!==o&&a!==s||!(0!==r||!g(t,n,e))||!(0!==o||!g(t,i,e))||!(0!==a||!g(n,t,i))||!(0!==s||!g(n,e,i))}function g(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function b(t){return t>0?1:t<0?-1:0}function w(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function x(t,e){var n=new M(t.i,t.x,t.y),i=new M(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function S(t,e,n,i){var r=new M(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function I(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,i){for(var r=0,o=e,a=n-i;o<n;o+=i)r+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return r}t.exports=e,t.exports.default=e,e.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,a=Math.abs(P(t,0,o,n));if(r)for(var s=0,l=e.length;s<l;s++){var c=e[s]*n,u=s<l-1?e[s+1]*n:t.length;a-=Math.abs(P(t,c,u,n))}var d=0;for(s=0;s<i.length;s+=3){var h=i[s]*n,f=i[s+1]*n,p=i[s+2]*n;d+=Math.abs((t[h]-t[p])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[p+1]-t[h+1]))}return 0===a&&0===d?0:Math.abs((d-a)/a)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[r][o][a]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},645:function(t,e){e.read=function(t,e,n,i,r){var o,a,s=8*r-i-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?r-1:0,h=n?-1:1,f=t[e+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=i;u>0;a=256*a+t[e+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=c}return(f?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,e,n,i,r,o){var a,s,l,c=8*o-r-1,u=(1<<c)-1,d=u>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(e*l-1)*Math.pow(2,r),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;t[n+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,c+=r;c>0;t[n+f]=255&a,f+=p,a/=256,c-=8);t[n+f-p]|=128*m}},3614:function(t,e,n){"use strict";t.exports=r;var i=n(645);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var o=4294967296,a=1/o,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function c(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var r=n.pos-1;r>=t;r--)n.buf[r+i]=n.buf[r]}function d(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function m(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function v(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function _(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function y(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function g(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function w(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var i=this.readVarint(),r=i>>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=b(this.buf,this.pos)+b(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=b(this.buf,this.pos)+x(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:function(t,e,n){var i,r,o=n.buf;if(i=(112&(r=o[n.pos++]))>>4,r<128)return c(t,i,e);if(i|=(127&(r=o[n.pos++]))<<3,r<128)return c(t,i,e);if(i|=(127&(r=o[n.pos++]))<<10,r<128)return c(t,i,e);if(i|=(127&(r=o[n.pos++]))<<17,r<128)return c(t,i,e);if(i|=(127&(r=o[n.pos++]))<<24,r<128)return c(t,i,e);if(i|=(1&(r=o[n.pos++]))<<31,r<128)return c(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&s?function(t,e,n){return s.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var i="",r=e;r<n;){var o,a,s,l=t[r],c=null,u=l>239?4:l>223?3:l>191?2:1;if(r+u>n)break;1===u?l<128&&(c=l):2===u?128==(192&(o=t[r+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=t[r+1],a=t[r+2],128==(192&o)&&128==(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=t[r+1],a=t[r+2],s=t[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,i+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),i+=String.fromCharCode(c),r+=u}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var n=l(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==r.Bytes)return t.push(this.readSVarint());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==r.Bytes)return t.push(this.readBoolean());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==r.Bytes)return t.push(this.readFloat());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==r.Bytes)return t.push(this.readDouble());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===r.Varint)for(;this.buf[this.pos++]>127;);else if(e===r.Bytes)this.pos=this.readVarint()+this.pos;else if(e===r.Fixed32)this.pos+=4;else{if(e!==r.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),w(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),w(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),w(this.buf,-1&t,this.pos),w(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),w(this.buf,-1&t,this.pos),w(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,i;if(t>=0?(n=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var i,r,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){i>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):r=i;continue}if(i<56320){t[n++]=239,t[n++]=191,t[n++]=189,r=i;continue}i=r-55296<<10|i-56320|65536,r=null}else r&&(t[n++]=239,t[n++]=191,t[n++]=189,r=null);i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&u(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),i.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var i=this.pos-n;i>=128&&u(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,n){this.writeTag(t,r.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,_,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,g,e)},writeBytesField:function(t,e){this.writeTag(t,r.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,r.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,r.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,r.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},8166:function(t){t.exports=function(){"use strict";function t(t,n,r,o,a){e(t,n,r||0,o||t.length-1,a||i)}function e(t,i,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,l=i-r+1,c=Math.log(s),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);e(t,i,Math.max(r,Math.floor(i-l*u/s+d)),Math.min(o,Math.floor(i+(s-l)*u/s+d)),a)}var h=t[i],f=r,p=o;for(n(t,r,i),a(t[o],h)>0&&n(t,r,o);f<p;){for(n(t,f,p),f++,p--;a(t[f],h)<0;)f++;for(;a(t[p],h)>0;)p--}0===a(t[r],h)?n(t,r,p):n(t,++p,o),p<=i&&(r=p+1),i<=p&&(o=p-1)}}function n(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function i(t,e){return t<e?-1:t>e?1:0}return t}()},5510:function(t,e,n){"use strict";t.exports=r,t.exports.default=r;var i=n(8166);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=e;a<n;a++)o=t.children[a],l(r,t.leaf?i(o):o);return r}function l(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 c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,n,r,o){for(var a,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=r||(a=e+Math.ceil((n-e)/r/2)*r,i(t,a,e,n,o),s.push(e,a,a,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],i=this.toBBox;if(!p(t,e))return n;for(var r,o,a,s,l=[];e;){for(r=0,o=e.children.length;r<o;r++)a=e.children[r],p(t,s=e.leaf?i(a):a)&&(e.leaf?n.push(a):f(t,s)?this._all(a,n):l.push(a));e=l.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!p(t,e))return!1;for(var i,r,o,a,s=[];e;){for(i=0,r=e.children.length;i<r;i++)if(o=e.children[i],p(t,a=e.leaf?n(o):o)){if(e.leaf||f(t,a))return!0;s.push(o)}e=s.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;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 r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;for(var n,i,r,a,s=this.data,l=this.toBBox(t),c=[],u=[];s||c.length;){if(s||(s=c.pop(),i=c[c.length-1],n=u.pop(),a=!0),s.leaf&&-1!==(r=o(t,s.children,e)))return s.children.splice(r,1),c.push(s),this._condense(c),this;a||s.leaf||!f(s,l)?i?(n++,s=i.children[n],a=!1):s=null:(c.push(s),u.push(n),n=0,i=s,s=s.children[0])}return this},toBBox:function(t){return t},compareMinX:c,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,i){var r,o=n-e+1,s=this._maxEntries;if(o<=s)return a(r=m(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,i-1))),(r=m([])).leaf=!1,r.height=i;var l,c,u,d,h=Math.ceil(o/s),f=h*Math.ceil(Math.sqrt(s));for(v(t,e,n,f,this.compareMinX),l=e;l<=n;l+=f)for(v(t,l,u=Math.min(l+f-1,n),h,this.compareMinY),c=l;c<=u;c+=h)d=Math.min(c+h-1,u),r.children.push(this._build(t,c,d,i-1));return a(r,this.toBBox),r},_chooseSubtree:function(t,e,n,i){for(var r,o,a,s,l,c,u,h,f,p;i.push(e),!e.leaf&&i.length-1!==n;){for(u=h=1/0,r=0,o=e.children.length;r<o;r++)l=d(a=e.children[r]),f=t,p=a,(c=(Math.max(p.maxX,f.maxX)-Math.min(p.minX,f.minX))*(Math.max(p.maxY,f.maxY)-Math.min(p.minY,f.minY))-l)<h?(h=c,u=l<u?l:u,s=a):c===h&&l<u&&(u=l,s=a);e=s||e.children[0]}return e},_insert:function(t,e,n){var i=this.toBBox,r=n?t:i(t),o=[],a=this._chooseSubtree(r,this.data,e,o);for(a.children.push(t),l(a,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),s=m(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,a,l,c,u,h,f,p,m,v,_,y;for(c=u=1/0,i=e;i<=n-e;i++)f=r=s(t,0,i,this.toBBox),p=o=s(t,i,n,this.toBBox),m=void 0,v=void 0,_=void 0,y=void 0,m=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),_=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),a=Math.max(0,_-m)*Math.max(0,y-v),l=d(r)+d(o),a<c?(c=a,h=i,u=l<u?l:u):a===c&&l<u&&(u=l,h=i);return h},_chooseSplitAxis:function(t,e,n){var i=t.leaf?this.compareMinX:c,r=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},_allDistMargin:function(t,e,n,i){t.children.sort(i);var r,o,a=this.toBBox,c=s(t,0,e,a),u=s(t,n-e,n,a),d=h(c)+h(u);for(r=e;r<n-e;r++)o=t.children[r],l(c,t.leaf?a(o):o),d+=h(c);for(r=n-e-1;r>=e;r--)o=t.children[r],l(u,t.leaf?a(o):o),d+=h(u);return d},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)l(e[i],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():a(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},3379:function(t){"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s],c=i.base?l[0]+i.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)e[h].references++,e[h].updater(f);else{var p=r(f,i);i.byIndex=s,e.splice(s,0,{identifier:d,updater:p,references:1})}a.push(d)}return a}function r(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var o=i(t=t||[],r=r||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var s=n(o[a]);e[s].references--}for(var l=i(t,r),c=0;c<o.length;c++){var u=n(o[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}o=l}}},569:function(t){"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},9216:function(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},3565:function(t,e,n){"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},7795:function(t){"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4589:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},7322:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var i=function(){function t(e,n){this._initData=e,this.byteLength=void 0!==e.byteLength?e.byteLength:e,this.type=t.ArrayBuffer,this.drawType=t.StaticDraw,this.options=Object.assign({},t.defaultOptions,n),this._glBuffer=null,this._glContext=null}return t.prototype.bind=function(e,n,i){return this._glBuffer||this.prepare(e),this.type===t.ArrayBuffer?(e.bindBuffer(e.ARRAY_BUFFER,this._glBuffer),i=i||this.options,e.vertexAttribPointer(n,i.itemSize,this._toGlParam(e,i.dataType),i.normalized,i.stride,i.offset)):this.type===t.ElementArrayBuffer&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._glBuffer),this},t.prototype.remove=function(){return this._unprepare(),this},t.prototype.subData=function(t,e,n){return t.bindBuffer(this._toGlParam(t,this.type),this._glBuffer),t.bufferSubData(this._toGlParam(t,this.type),e,n),this},t.prototype.prepare=function(t){return this._glContext=t,this._glBuffer=t.createBuffer(),t.bindBuffer(this._toGlParam(t,this.type),this._glBuffer),t.bufferData(this._toGlParam(t,this.type),this._initData,this._toGlParam(t,this.drawType)),this._initData=null,this},t.prototype._unprepare=function(){this._glBuffer&&(this._glContext.deleteBuffer(this._glBuffer),this._glBuffer=null,this._glContext=null)},t.prototype._toGlParam=function(e,n){return n===t.ArrayBuffer?e.ARRAY_BUFFER:n===t.ElementArrayBuffer?e.ELEMENT_ARRAY_BUFFER:n===t.StaticDraw?e.STATIC_DRAW:n===t.DynamicDraw?e.DYNAMIC_DRAW:n===t.Byte?e.BYTE:n===t.Short?e.SHORT:n===t.Int?e.INT:n===t.Float?e.FLOAT:n===t.UnsignedByte?e.UNSIGNED_BYTE:n===t.UnsignedShort?e.UNSIGNED_SHORT:n===t.UnsignedInt?e.UNSIGNED_INT:null},t}();i.ArrayBuffer=1,i.ElementArrayBuffer=2,i.StaticDraw=10,i.DynamicDraw=11,i.Float=20,i.UnsignedByte=21,i.UnsignedShort=22,i.UnsignedInt=23,i.Byte=24,i.Short=25,i.Int=26,i.defaultOptions={itemSize:3,dataType:i.Float,stride:0,offset:0,normalized:!1};var r=i},3287:function(t,e,n){"use strict";n.d(e,{Ib:function(){return i},WT:function(){return r}});var i=1e-6,r="undefined"!=typeof Float64Array?Float64Array:Array;Math.random,Math.PI},127:function(t,e,n){"use strict";n.d(e,{Ue:function(){return r},JG:function(){return o},p4:function(){return a},U_:function(){return s},Jp:function(){return l},Iu:function(){return c},bA:function(){return u},Iw:function(){return d},G3:function(){return h},M5:function(){return f},zB:function(){return p},dC:function(){return m},wA:function(){return v}});var i=n(3287);function r(){var t=new i.WT(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function s(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],v=e[14],_=e[15],y=n*s-i*a,g=n*l-r*a,b=n*c-o*a,w=i*l-r*s,x=i*c-o*s,S=r*c-o*l,I=u*m-d*p,M=u*v-h*p,P=u*_-f*p,T=d*v-h*m,L=d*_-f*m,E=h*_-f*v,k=y*E-g*L+b*T+w*P-x*M+S*I;return k?(k=1/k,t[0]=(s*E-l*L+c*T)*k,t[1]=(r*L-i*E-o*T)*k,t[2]=(m*S-v*x+_*w)*k,t[3]=(h*x-d*S-f*w)*k,t[4]=(l*P-a*E-c*M)*k,t[5]=(n*E-r*P+o*M)*k,t[6]=(v*b-p*S-_*g)*k,t[7]=(u*S-h*b+f*g)*k,t[8]=(a*L-s*P+c*I)*k,t[9]=(i*P-n*L-o*I)*k,t[10]=(p*x-m*b+_*y)*k,t[11]=(d*b-u*x-f*y)*k,t[12]=(s*M-a*T-l*I)*k,t[13]=(n*T-i*M+r*I)*k,t[14]=(m*g-p*w-v*y)*k,t[15]=(u*w-d*g+h*y)*k,t):null}function l(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=e[9],f=e[10],p=e[11],m=e[12],v=e[13],_=e[14],y=e[15],g=n[0],b=n[1],w=n[2],x=n[3];return t[0]=g*i+b*s+w*d+x*m,t[1]=g*r+b*l+w*h+x*v,t[2]=g*o+b*c+w*f+x*_,t[3]=g*a+b*u+w*p+x*y,g=n[4],b=n[5],w=n[6],x=n[7],t[4]=g*i+b*s+w*d+x*m,t[5]=g*r+b*l+w*h+x*v,t[6]=g*o+b*c+w*f+x*_,t[7]=g*a+b*u+w*p+x*y,g=n[8],b=n[9],w=n[10],x=n[11],t[8]=g*i+b*s+w*d+x*m,t[9]=g*r+b*l+w*h+x*v,t[10]=g*o+b*c+w*f+x*_,t[11]=g*a+b*u+w*p+x*y,g=n[12],b=n[13],w=n[14],x=n[15],t[12]=g*i+b*s+w*d+x*m,t[13]=g*r+b*l+w*h+x*v,t[14]=g*o+b*c+w*f+x*_,t[15]=g*a+b*u+w*p+x*y,t}function c(t,e,n){var i,r,o,a,s,l,c,u,d,h,f,p,m=n[0],v=n[1],_=n[2];return e===t?(t[12]=e[0]*m+e[4]*v+e[8]*_+e[12],t[13]=e[1]*m+e[5]*v+e[9]*_+e[13],t[14]=e[2]*m+e[6]*v+e[10]*_+e[14],t[15]=e[3]*m+e[7]*v+e[11]*_+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=e[9],f=e[10],p=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=d,t[9]=h,t[10]=f,t[11]=p,t[12]=i*m+s*v+d*_+e[12],t[13]=r*m+l*v+h*_+e[13],t[14]=o*m+c*v+f*_+e[14],t[15]=a*m+u*v+p*_+e[15]),t}function u(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3],l=r+r,c=o+o,u=a+a,d=r*l,h=r*c,f=r*u,p=o*c,m=o*u,v=a*u,_=s*l,y=s*c,g=s*u,b=i[0],w=i[1],x=i[2];return t[0]=(1-(p+v))*b,t[1]=(h+g)*b,t[2]=(f-y)*b,t[3]=0,t[4]=(h-g)*w,t[5]=(1-(d+v))*w,t[6]=(m+_)*w,t[7]=0,t[8]=(f+y)*x,t[9]=(m-_)*x,t[10]=(1-(d+p))*x,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function h(t,e,n,i,r){var o=1/Math.tan(e/2),a=1/(i-r);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*i*a,t[15]=0,t}function f(t,e,n,i,r,o,a){var s=1/(e-n),l=1/(i-r),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(r+i)*l,t[14]=(a+o)*c,t[15]=1,t}function p(t,e,n,r){var o,a,s,l,c,u,d,h,f,p,m=e[0],v=e[1],_=e[2],y=r[0],g=r[1],b=r[2],w=n[0],x=n[1],S=n[2];return Math.abs(m-w)<i.Ib&&Math.abs(v-x)<i.Ib&&Math.abs(_-S)<i.Ib?mat4.identity(t):(d=m-w,h=v-x,f=_-S,o=g*(f*=p=1/Math.sqrt(d*d+h*h+f*f))-b*(h*=p),a=b*(d*=p)-y*f,s=y*h-g*d,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),l=h*s-f*a,c=f*o-d*s,u=d*a-h*o,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),t[0]=o,t[1]=l,t[2]=d,t[3]=0,t[4]=a,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=u,t[10]=f,t[11]=0,t[12]=-(o*m+a*v+s*_),t[13]=-(l*m+c*v+u*_),t[14]=-(d*m+h*v+f*_),t[15]=1,t)}var m=l;function v(t,e,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},378:function(t,e,n){"use strict";n.d(e,{Ue:function(){return r},d9:function(){return o},al:function(){return a},JG:function(){return s},t8:function(){return l},IH:function(){return c},$X:function(){return u},VV:function(){return d},Fp:function(){return h},bA:function(){return f},TE:function(){return p},kE:function(){return m},Fv:function(){return v},AK:function(){return _},t7:function(){return y},I6:function(){return g},fS:function(){return b},Zh:function(){return w},lu:function(){return x},TK:function(){return S}});var i=n(3287);function r(){var t=new i.WT(2);return t[0]=0,t[1]=0,t}function o(t){var e=new i.WT(2);return e[0]=t[0],e[1]=t[1],e}function a(t,e){var n=new i.WT(2);return n[0]=t,n[1]=e,n}function s(t,e){return t[0]=e[0],t[1]=e[1],t}function l(t,e,n){return t[0]=e,t[1]=n,t}function c(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function h(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function m(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function v(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t}function _(t,e){return t[0]*e[0]+t[1]*e[1]}function y(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t}function g(t,e){return t[0]===e[0]&&t[1]===e[1]}function b(t,e){var n=t[0],r=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=i.Ib*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=i.Ib*Math.max(1,Math.abs(r),Math.abs(a))}var w=m,x=u,S=p;r()},9450:function(t,e,n){"use strict";n.d(e,{Ue:function(){return r},d9:function(){return o},kE:function(){return a},al:function(){return s},JG:function(){return l},t8:function(){return c},IH:function(){return u},VV:function(){return d},Fp:function(){return h},bA:function(){return f},od:function(){return p},Fv:function(){return m},AK:function(){return v},kC:function(){return _},fF:function(){return y},kK:function(){return g},I6:function(){return b},fS:function(){return w},lu:function(){return x},TK:function(){return S},Zh:function(){return I}});var i=n(3287);function r(){var t=new i.WT(3);return t[0]=0,t[1]=0,t[2]=0,t}function o(t){var e=new i.WT(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var r=new i.WT(3);return r[0]=t,r[1]=e,r[2]=n,r}function l(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function c(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function h(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function p(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}function m(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function _(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t}function y(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t}function g(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function b(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function w(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(n-a)<=i.Ib*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=i.Ib*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-l)<=i.Ib*Math.max(1,Math.abs(o),Math.abs(l))}var x=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},S=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)},I=a;r()},1245:function(t,e,n){"use strict";n.d(e,{d9:function(){return o},al:function(){return a},JG:function(){return s},t8:function(){return l},IH:function(){return c},bA:function(){return u},kE:function(){return d},we:function(){return h},Fv:function(){return f},AK:function(){return p},t7:function(){return m},I6:function(){return v},fS:function(){return _}});var i,r=n(3287);function o(t){var e=new r.WT(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(t,e,n,i){var o=new r.WT(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function l(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function c(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function d(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)}function h(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r}function f(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=i*a,t[2]=r*a,t[3]=o*a),t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function m(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t}function v(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function _(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(n-s)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-l)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-u)<=r.Ib*Math.max(1,Math.abs(a),Math.abs(u))}(i=new r.WT(4))[0]=0,i[1]=0,i[2]=0,i[3]=0},1026:function(t,e,n){"use strict";n.r(e),n.d(e,{MAP_DEFAULTS:function(){return o},tiles:function(){return a},hillshade:function(){return s},commercialPoi:function(){return l},modelCacheSize:function(){return c},loadModelsInfoStyleZoom:function(){return u},atlasSize:function(){return d},urls:function(){return h},traffic:function(){return f},fonts:function(){return p},icons:function(){return m},styles:function(){return v},events:function(){return _},analytics:function(){return y},workerResetDebounceTime:function(){return g},houseHover:function(){return b},tileAnimation:function(){return w},buildingAnimation:function(){return x},entranceAnimation:function(){return S},identify:function(){return I},labeling:function(){return M},render:function(){return P},defaultLang:function(){return T},zoom:function(){return L},inertia:function(){return E},camera:function(){return k},floors:function(){return z},fences:function(){return C},performanceCheck:function(){return A},commercialCitySublayer:function(){return D},commercialSublayers:function(){return F},personalSublayers:function(){return R},landmarkPoiSublayers:function(){return O},landmarkRasterSizes:function(){return j},defaultMarkerIcon:function(){return B},defaultMarkerAnchor:function(){return U}});var i=n(8249),r=n(9099),o={minZoom:2,maxZoom:20},a={protocol:"https",server:r.X,subdomains:"0123",tileSet:i.X?"web":"vector_b",tileKey:"empty",appId:"empty",cacheRatio:2,maxUniverseZoom:8,maxRegionalZoom:15,maxDetailLevel:17,displayBounds:!1},s={minZoom:5,maxZoom:11},l={minZoom:10,maxZoom:14,tileSet:"com_poi_web",rasterSizes:[96,84,72,60,48,36,24]},c=100,u=13.5,d=[2048,2048],h={tiles:"{protocol}://{host}/vt?r={request}&ts={tileSet}&key={tileKey}&appId={appId}&lang={lang}&default_lang={defaultLang}&s={sessionId}",metatile:"{protocol}://{host}/metafiles/{hash}/metatile.json?ts={tileSet}",modelInfo:"{protocol}://{host}/metafiles/{regionId}/models.json?ts={tileSet}",model:"{protocol}://{host}/metafiles/{regionId}/{name}?ts={tileSet}",convertData:"{protocol}://{host}/metafiles/{hash}/convert.json?ts={tileSet}",dynamicPoi:"{protocol}://{host}/metafiles/{regionId}/poi/{id}_{width}_{height}.png?ts={tileSet}"},f={protocol:"https",host:r._A,url:"{protocol}://{host}/tiles?tls={tiles}&reg={regions}&tm={time}&fmt=json&z={z}",timestampUrl:"{protocol}://{host}/meta?reg={regions}&time&score",updateInterval:12e4,minZoom:10,maxZoom:16,maxDetailLevel:17},p={defaultUrl:r.hs,gamma:.08,baseSize:24,baseLineHeight:1.2,bomCharCode:65279},m={defaultUrl:r.R_,nameTemplate:"{name}"},v={url:r.k1,path:"styles/{id}"},_={doubleClickTime:185,dragThreshold:2,pitchWaitingTime:200,pitchThreshold:7},y={gaCode:"UA-25529177-4",gaName:"mapglEngine"},g=3e3,b={inAnimationTime:180,inAnimationType:"linear",outAnimationTime:800,outAnimationType:"linear"},w={time:300,type:"linear"},x={minStyleZoom:16,duration:500,easing:"easeOutQuint"},S={bounceType:"easeOutElastic",bounceTime:750,growType:"easeInOutQuad",growTime:750,stagger:0},I={pixelDensity:.5,sceneOpacity:0,cacheDebounceTime:400,pickDistance:3},M={interval:220,animationTime:200,animationType:"linear",tileMultiplier:1.5,axisAngleToleranceDeg:45,axisCheckDistancePx:13,commercialMargins:{visibleLeftRight:60,visibleTopBottom:60,appearLeftRight:70,appearTopBottom:70},lineLabelsHidePitchDeg:40,maxLabelLength:30},P={alwaysRerender:!1},T="en",L={mouseDelta:.65,macTouchDelta:.0018,animDuration:400,throttleDelay:100,mouseRotateDelta:2.5,mousePitchDelta:2.5,mobilePinchDelta:1,mobileTapDelta:10},E={duration:1300,maxSpeed:8,minSpeed:.02,nonLinearity:5},k={fov:60,near:1e3,far:Math.pow(2,34),minCalculationScreenHeight:1e3,viewportLimitRatio:2},z={enabled:!0,url:r.kv,displayStyleZoom:17,wallHeight:800,islandHeight:400,wallMinBrightness:.8265,wallMaxBrightness:.95,viewportPadding:.2},C={lightIntensity:.1},A={fpsCaveat:10},D="Commercial_poi_city",F=["Commercial_poi_default",D,"Commercial_poi_custom","Commercial_poi_navi"],R=["s_personal_poi"],O=["Landmark_poi","Landmark_point"],j=[105,84,63,42,21],B="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSI0OHB4IiB2aWV3Qm94PSIwIDAgMzAgNDgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1MS4yICg1NzUxOSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+PHRpdGxlPlBhZ2UgMSBDb3B5PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjUwJSIgeTE9IjUwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+PHN0b3Agc3RvcC1jb2xvcj0iIzFCODlFRSIgb2Zmc2V0PSIwJSI+PC9zdG9wPjxzdG9wIHN0b3AtY29sb3I9IiMzMTk4RUMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGlkPSJSZWNvdmVyeS0wMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgzOS4wMDAwMDAsIC00MjUuMDAwMDAwKSI+PGcgaWQ9IlBhZ2UtMS1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4MzkuMDAwMDAwLCA0MjUuMDAwMDAwKSI+PGVsbGlwc2UgaWQ9Ik92YWwtMyIgZmlsbD0iIzAwMDAwMCIgb3BhY2l0eT0iMC4wMzYzODA1OTciIGN4PSIxNSIgY3k9IjQ1LjUiIHJ4PSIzIiByeT0iMS41Ij48L2VsbGlwc2U+PGVsbGlwc2UgaWQ9Ik92YWwtMy1Db3B5IiBmaWxsPSIjMDAwMDAwIiBvcGFjaXR5PSIwLjAzNjM4MDU5NyIgY3g9IjE1IiBjeT0iNDUuNSIgcng9IjQuNSIgcnk9IjIuNSI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0xNSw0NS44ODM2MzUzIEwxNS44ODIzNTI5LDQ1Ljg4MzYzNTMgQzE1Ljg4MjM1MjksMjkuMjE3NzUyOSAyMC43NzY3NjQ3LDIzLjc5NzQ1ODggMjcuOTg3MzUyOSwyMy43OTc0NTg4IEwyOC4zMjk3MDU5LDIzLjc5NzQ1ODggQzI5LjA3Nzk0MTIsMjEuNTkwNjk0MSAzMCwxNy45OTE1NzY1IDMwLDE1LjAwMDQgQzMwLDcuMTQzOTI5NDEgMjMuNzY3OTQxMiwwLjAwMDQgMTUsMC4wMDA0IEM2LjIzMjA1ODgyLDAuMDAwNCAwLDcuMTQzOTI5NDEgMCwxNS4wMDA0IEMwLDE3Ljk5MTU3NjUgMC45MjIwNTg4MjQsMjEuNTkwNjk0MSAxLjY3MDI5NDEyLDIzLjc5NzQ1ODggTDIuMDEyNjQ3MDYsMjMuNzk3NDU4OCBDOS4yMjQxMTc2NSwyMy43OTc0NTg4IDE0LjExNzY0NzEsMjkuMjE3NzUyOSAxNC4xMTc2NDcxLDQ1Ljg4MzYzNTMgTDE1LDQ1Ljg4MzYzNTMgWiIgaWQ9IkZpbGwtMSIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSI+PC9wYXRoPjwvZz48L2c+PC9nPjwvc3ZnPg==",U=[15,43]},8249:function(t,e,n){"use strict";n.d(e,{X:function(){return i}});var i=!1},9099:function(t,e,n){"use strict";n.d(e,{X:function(){return r},_A:function(){return o},kv:function(){return a},k1:function(){return s},hs:function(){return l},R_:function(){return c},ns:function(){return u},k0:function(){return d},aT:function(){return h}});var i=n(8249),r=i.X?"%TILESERVER%":"tile{subdomain}.maps.2gis.com",o=i.X?"%TRAFFICSERVER%":"jam.api.2gis.com",a=i.X?"%FLOORSSERVER%":"https://floors.api.2gis.ru",s="https://styles.api.2gis.com",l="https://mapgl.2gis.com/api/fonts",c="https://disk.2gis.com/styles/{id}",u=i.X?"%KEYSERVER%":"https://keys.api.2gis.com/public/v1/keys/{keyID}/services/mapgl-js-api",d=i.X?"%RTLPLUGIN%":"https://mapgl.2gis.com/api/js/plugins/rtl-v1.0.0.js",h=i.X?"%RTLPLUGINHASH%":"sha512-YAPPEl+Atvsm/cMkrfWefmlQLAlKTGaqFjIkI6urAnDgam2uTVEVVnZZEhHCa91JjYYxa5yr4Ndb4Vl3NUovfA=="},242:function(t,e,n){"use strict";n.d(e,{y4:function(){return i},sX:function(){return r},_9:function(){return o},Bq:function(){return a},LF:function(){return s},$U:function(){return l},Cd:function(){return c},Gt:function(){return u},Rw:function(){return d},vL:function(){return h},Fv:function(){return f},p7:function(){return p},Uo:function(){return m},Hg:function(){return v},CW:function(){return _},DL:function(){return y},L2:function(){return g}});var i=256,r=Math.pow(2,32),o=Math.pow(2,20),a=Math.pow(2,16)-1,s=2.54,l=96,c=r/(i/l*s),u=.7071067811865475,d=4294967295,h=1175494351e-47,f=3402823466e29,p=["Arial","Helvetica","HelveticaNeueCyr","Open_Sans","Open_Sans_Semibold","Open_Sans_Italic","Segoe_UI","PT_Sans_Caption","PT_Sans","Verdana","Verdana_bold","Noto_Sans","Noto_Sans_Semibold","Noto_Sans_Italic","SuisseIntl_Bold"],m="Noto_Sans",v=1,_=v/2,y=-3,g=-4},3936:function(t,e,n){"use strict";n.d(e,{jf:function(){return u},FJ:function(){return m},hX:function(){return v}});var i=n(2267),r=n(5109),o=n(242),a=n(8550),s=n(9266),l=n(9746),c=n(2241),u=0,d={type:i.f.Static,index:-1,key:(0,a.fF)("",.5,.5),isSvg:!1,name:"",fileName:"",rasters:[],anchorX:.5,anchorY:.5},h=["default","marker","markerText","htmlLabel"],f={default:0,marker:1,markerText:2,htmlLabel:3},p={default:{default:!0,marker:!1,markerText:!0,htmlLabel:!0},marker:{default:!1,marker:!1,markerText:!0,htmlLabel:!1},markerText:{default:!0,marker:!0,markerText:!0,htmlLabel:!1},htmlLabel:{default:!0,marker:!1,markerText:!1,htmlLabel:!1}};function m(t){for(var e=[],n=Object.keys(r.Dz).length,i=0;i<n;i++)e[i]=NaN;for(var o in t){if(void 0===r.Dz[o])throw new Error("No such tile prop '"+o+"'");e[r.Dz[o]]=t[o]}return e}var v=function(){function t(){this.style={id:u,revision:0,background:{color:(0,c.MV)("f6f2de")},layers:[],layersById:{},layerIdToInnerId:{},groupsById:{},iconBaseUrl:"",iconNameTemplate:"",fontUrlTemplate:"",rasterSets:{byIndex:{},byKey:{}},labelingGroups:{indexToGroup:h,groupToIndex:f,table:p},fonts:o.p7,fontNameToIndex:(0,l.PU)(o.p7),icons:{},dem:(0,s.vR)({})},this.needRenderIndexRebuild=!1,this.zIndexById={};var t=(0,s.qw)({type:"line",id:"debug-tile-bounds",minzoom:-1/0,maxzoom:1/0,style:{color:"#ff0000",width:1}});t&&this.addLayer(t,0)}return t.prototype.getStyle=function(){return this.style},t.prototype.appendRasterSet=function(t,e){this.style.rasterSets.byIndex[t.index]=t,void 0!==e&&(this.style.rasterSets.byKey[e]=t)},t.prototype.removeRasterSet=function(t){this.style.rasterSets.byIndex[t]=d},t.prototype.getLabelingGroupIndex=function(t){var e=this.style.labelingGroups.groupToIndex;return void 0!==e[t]?e[t]:e.default},t.prototype.addLayer=function(t,e){this.style.layers.push(t),this.style.layersById[t.innerId]=t,void 0!==e&&(this.zIndexById[t.innerId]=e),this.needRenderIndexRebuild=!0},t.prototype.removeLayer=function(t){var e=this.style.layersById[t];if(e){var n=this.style.layers.indexOf(e);-1!==n&&this.style.layers.splice(n,1),delete this.style.layersById[t]}},t.prototype.update=function(){this.needRenderIndexRebuild&&(this.rebuildRenderIndex(),this.needRenderIndexRebuild=!1)},t.prototype.updateLayerStyle=function(t,e){var n=e.style,i=e.dataKeys,r=this.style.layersById[t];r&&(r.style=n,r.dataKeys=i)},t.prototype.rebuildRenderIndex=function(){var t=this;this.style.layers.sort((function(e,n){var i,r;return(null!==(i=t.zIndexById[e.innerId])&&void 0!==i?i:0)-(null!==(r=t.zIndexById[n.innerId])&&void 0!==r?r:0)}));for(var e=0;e<this.style.layers.length;e++)this.style.layers[e].renderIndex=e},t}()},2241:function(t,e,n){"use strict";n.d(e,{iL:function(){return o},gC:function(){return a},MV:function(){return s}});var i=n(8550),r=(0,i.lK)([255,0,0,255]);function o(t){return"string"==typeof t&&/(#(?:[0-9a-f]{2}){2,4}|#[0-9a-f]{3}|(?:rgba?|hsla?)\((?:\d+%?(?:,|\s)+){2,3}[\s\/]*[\d\.]+%?\))/i.test(t)}function a(t){return"object"==typeof t&&t.type&&"color"===t.type}function s(t){var e=t.toLowerCase(),n=r;switch(e[0]){case"#":n=function(t){if(!new RegExp("^#[a-f0-9]{"+(t.length-1)+"}$").test(t)||![4,5,7,9].includes(t.length))return r;var e=function(t){return t.length<7?t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(5===t.length?t[4]+t[4]:"ff"):7===t.length?t+"ff":t}(t),n=parseInt(e[1]+e[2],16),o=parseInt(e[3]+e[4],16),a=parseInt(e[5]+e[6],16),s=parseInt(e[7]+e[8],16);return(0,i.lK)([n,o,a,s])}(e);break;case"h":n=function(t){var e=l(t);e[0]/=360,e[1]/=100,e[2]/=100;var n=function(t,e,n){if(0===e)return[255*n,255*n,255*n];var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i;return[255*c(r,i,t+1/3),255*c(r,i,t),255*c(r,i,t-1/3)]}(e[0],e[1],e[2]),r=n[0],o=n[1],a=n[2],s=void 0!==e[3]?255*e[3]:255;return(0,i.lK)([Math.round(r),Math.round(o),Math.round(a),Math.round(s)])}(e);break;case"r":n=function(t){var e=l(t),n=e[0],r=e[1],o=e[2],a=e[3],s=void 0!==a?255*a:255;return(0,i.lK)([Math.round(n),Math.round(r),Math.round(o),Math.round(s)])}(e)}return n}function l(t){return t.split("(")[1].split(")")[0].split(",").map((function(t){return parseFloat(t)}))}function c(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}},9266:function(t,e,n){"use strict";n.d(e,{vR:function(){return L},ys:function(){return S},z8:function(){return I},Cp:function(){return x},qw:function(){return T}});var i=n(655),r=n(2241),o=n(7357),a=n(8550),s=n(3750),l=n(3411),c=n(242),u=n(2267),d=n(7624);function h(t){for(var e=function(t){var e=(t.groups||[]).concat(o.YW.groups).reduce((function(t,e){return t.includes(e)||t.push(e),t}),[]),n=(t.overlay||[]).concat(o.YW.overlay).concat(e.reduce((function(t,e){return e===o.T_||e===o.R_||e===o.n3||t.push([e,o.R_]),t}),[])).reduce((function(t,n){for(var i=[],r=0,o=n;r<o.length;r++){var a=o[r];e.includes(a)&&i.push(a)}return i.length>1&&t.push(i),1===n.length&&1===i.length&&t.push(i),t}),[]);return{groups:e,overlay:n,intersect:o.YW.intersect}}(t),n=function(t){for(var e=t.groups,n=t.overlay,i=t.intersect,r=e.reduce((function(t,e,n){return t[e]=n,t}),{}),o=[],a=0;a<e.length;a++){for(var s=[],l=0;l<e.length;l++)s.push(!0);o.push(s)}for(var c=0;c<n.length;c++){var u=n[c];for(a=0;a<u.length;a++)for(l=a+1;l<u.length;l++){var d=r[u[a]],h=r[u[l]];o[d][h]=!1,o[h][d]=!1}}for(c=0;c<i.length;c++){var f=i[c];for(a=0;a<f.length;a++)for(l=a+1;l<f.length;l++)d=r[f[a]],h=r[f[l]],o[d][h]=!0,o[h][d]=!0}return{groups:e,table:o}}(e),i=n.groups,r=n.table,a={},s=0;s<r.length;s++){var l=r[s],c=i[s];a[c]={};for(var u=0;u<l.length;u++){var d=i[u];a[c][d]=r[s][u]}}var h=i.reduce((function(t,e,n){return t[e]=n,t}),{});return{indexToGroup:i,groupToIndex:h,table:a}}var f=n(9746),p=n(3062),m=n(9460),v=n(3131),_=function(t){function e(e){var n=this.constructor,i=t.call(this,"Unknown expression type '"+e[0]+"' in '"+JSON.stringify(e)+"'")||this;return i.name="UnknownExpressionTypeError",Object.setPrototypeOf(i,n.prototype),i}return(0,i.ZT)(e,t),e}(Error);function y(t,e){if((0,a.aH)(t))return(0,r.iL)(t)?(0,r.MV)(t):t;switch(t[0]){case"all":return function(t,e){return{type:"all",array:t.slice(1).map((function(t){return y(t,e)}))}}(t,e);case"any":return function(t,e){return{type:"any",array:t.slice(1).map((function(t){return y(t,e)}))}}(t,e);case"match":return function(t,e){for(var n={type:"match",input:y(t[1],e),cases:[],defaultOutput:y(t[t.length-1],e)},i=t.slice(2,-1),r=0;r<i.length;r+=2){var o=i[r].reduce((function(t,e){return"boolean"==typeof e&&t.push(Number(e)),t.push(e),t}),[]),a={values:new Set(o),output:y(i[r+1],e)};n.cases.push(a)}return n}(t,e);case"in":return function(t,e){var n=y(t[1],e),i=t[2][0];if("get"!==i&&"global"!==i&&"sourceAttr"!==i)throw new Error("InExpression supports only get, global or source attr expression as a second argument");return{type:"in",element:n,array:y(t[2],e)}}(t,e);case"interpolate":return b(t,e);case"step":return function(t,e){var n={type:"step",steps:[],value:y(t[1],e)},i={key:0,value:y(t[2],e)};n.steps.push(i);for(var r=t.slice(3),o=0;o<r.length;o+=2){var a={key:r[o],value:y(r[o+1],e)};n.steps.push(a)}return n}(t,e);case"get":case"sourceAttr":case"global":return w(t,e);case"zoom":return{type:"zoom"};case"heatmap-density":return{type:"heatmap-density"};case"shading-intensity":return{type:"shading-intensity"};case"to-boolean":case"to-color":case"!":return function(t,e){return{type:t[0],value:y(t[1],e)}}(t,e);case"==":case"!=":case"<":case"<=":case">":case">=":return function(t,e){var n=y(t[1],e),i=y(t[2],e);return{type:t[0],leftValue:n,rightValue:i}}(t,e);default:throw new _(t)}}function g(t,e){return void 0===t?t:y(t,e)}function b(t,e){var n={type:"interpolate",base:1,argument:y(t[2],e),steps:[]};"exponential"===t[1][0]&&void 0!==t[1][1]&&(n.base=t[1][1]);for(var i=t.slice(3),r=0;r<i.length;r+=2){var o={key:i[r],value:y(i[r+1],e)};n.steps.push(o)}return n}function w(t,e){var n=t[0],i=(0,p.qS)(t[1]);return{type:n,dataIndex:e?e.getUniqueIndex(n+":"+i):NaN,property:i}}function x(t,e,n){var o,a,s,u=L(null!==(a=t.dem)&&void 0!==a?a:{}),d={id:e,revision:0,background:{color:(0,r.MV)(t.background.color)},layers:[],layersById:(o={},o[m.h]=u,o),layerIdToInnerId:{},groupsById:{},iconBaseUrl:"",iconNameTemplate:"",fontUrlTemplate:"",fonts:c.p7,fontNameToIndex:(0,f.PU)(c.p7),rasterSets:{byIndex:{},byKey:{}},icons:t.icons||{},labelingGroups:h(null!==(s=t.labelingGroups)&&void 0!==s?s:{}),dem:u},p=new l.x,_=t.layers;n&&(_=function(t,e){var n=0,r=0;function o(t,e){"custom"!==t.type&&((0,f.Kx)(t.filter)&&(n=e),"point"===t.type&&t.style.iconPriority&&t.style.iconPriority>r&&(r=t.style.iconPriority))}return t.forEach((function(t,e){"group"===t.type?t.layers.forEach((function(t){return o(t,e)})):o(t,e)})),e.forEach((function(t){"point"===t.type&&(t.style.iconPriority=r)})),(0,i.ev)((0,i.ev)((0,i.ev)([],t.slice(0,n+1)),e),t.slice(n+1))}(t.layers,v.T));for(var y=0,g=_;y<g.length;y++){var b=S(g[y]);b&&("group"===b.type&&(d.groupsById[b.innerId]=b,d.layerIdToInnerId[b.id]=b.innerId),("group"===b.type?b.layers:[b]).forEach((function(t){d.layers.push(t),d.layersById[t.innerId]=t,d.layerIdToInnerId[t.id]=t.innerId,"point"===t.type&&I(t,p).forEach((function(t){d.rasterSets.byKey[t.key]||(d.rasterSets.byIndex[t.index]=t,d.rasterSets.byKey[t.key]=t)}))})))}return d}function S(t){return"group"===t.type?(e=t,i=new l.x,r=null===(n=e.orderBy)||void 0===n?void 0:n.map((function(t){return w(t,i)})),o={id:e.id,innerId:(0,m.U)(),renderIndex:M.getIndex(),type:e.type,layers:[],orderBy:null!=r?r:[]},e.layers.forEach((function(t,e){var n=T(t,r);n&&(n.groupId=o.innerId,n.groupIndex=e,n.renderIndex=o.renderIndex,o.layers.push(n))})),o):T(t);var e,n,i,r,o}function I(t,e){var n=[];return t.style.iconImage&&(0,d.EG)(t.style.iconImage).forEach((function(i){if(i.length){var r=(0,a.fF)(i,t.style.iconAnchor[0],t.style.iconAnchor[1]),o={type:u.f.Static,index:e.getUniqueIndex(r),key:r,isSvg:!0,name:i,fileName:i,anchorX:t.style.iconAnchor[0],anchorY:t.style.iconAnchor[1],rasters:[]};n.push(o)}})),n}var M=new l.x;function P(t,e){return"appearance"===t.type?{type:t.type,tipMovementAmplitude:y(t.tipMovementAmplitude,e)}:t}function T(t,e){if("custom"===t.type)return{type:"custom",id:t.id,innerId:(0,m.U)(),renderIndex:M.getIndex(),filter:!1,minzoom:-1/0,maxzoom:1/0,dataKeys:[],style:{}};if(t.style&&"none"!==t.style.visibility){var n,r=new l.x(e?e.length:0);try{var c={id:t.id,innerId:(0,m.U)(),renderIndex:M.getIndex(),filter:y(t.filter||!1),minzoom:E(t.minzoom,-1/0),maxzoom:E(t.maxzoom,1/0),dataKeys:[]};switch(t.type){case"line":var u=(0,o.q0)(t.style);n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),width:y(u.width,r)}});break;case"lineExtrusion":u=(0,o.l7)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{sideColor:y(u.sideColor,r),strokeWidth:y(u.strokeWidth,r),strokeColor:y(u.strokeColor,r),height:y(u.height,r)}});break;case"polygon":u=(0,o.IJ)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),strokeColor:y(u.strokeColor,r),strokeWidth:y(u.strokeWidth,r)}});break;case"polygonExtrusion":u=(0,o.bN)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{topColor:y(u.topColor,r),sideColor:y(u.sideColor,r),strokeColor:y(u.strokeColor,r),strokeWidth:y(u.strokeWidth,r)}});break;case"dashedLine":u=(0,o.N5)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),gapColor:y(u.gapColor,r),width:y(u.width,r),gapLength:y(u.gapLength,r),dashLength:y(u.dashLength,r)}});break;case"shiftedLine":u=(0,o.sd)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),width:y(u.width,r),shift:y(u.shift,r)}});break;case"oneWayLine":u=(0,o.zn)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),lineWidth:y(u.lineWidth,r),lineLength:y(u.lineLength,r),tipWidth:u.tipWidth,tipHeight:u.tipHeight,priority:u.priority,duplicationSpacing:y(u.duplicationSpacing,r),endingOffsets:u.endingOffsets,labelingGroup:u.labelingGroup}});break;case"buildingModel":u=(0,o._0)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),strokeColor:y(u.strokeColor,r),strokeWidth:y(u.strokeWidth,r)}});break;case"labelLine":u=(0,o.Ym)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{textField:y(u.textField,r),textFont:u.textFont,textColor:y(u.textColor,r),textFontSize:y(u.textFontSize,r),textLetterSpacing:u.textLetterSpacing,textHaloColor:y(u.textHaloColor,r),textHaloWidth:u.textHaloWidth,textPriority:u.textPriority,textLabelingSideMargin:u.textLabelingSideMargin,textDuplicationSpacing:y(u.textDuplicationSpacing,r),labelingGroup:u.labelingGroup,lineEndingOffsets:u.lineEndingOffsets}});break;case"point":u=(0,o.TI)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{allowOverlap:u.allowOverlap,allowElevation:u.allowElevation,iconImage:y(u.iconImage,r),iconAnchor:u.iconAnchor,iconOffset:u.iconOffset,iconWidth:y(u.iconWidth,r),iconTextField:y(u.iconTextField,r),iconTextFont:g(u.iconTextFont,r),iconTextAnchor:u.iconTextAnchor,iconTextOffset:u.iconTextOffset,iconTextColor:y(u.iconTextColor,r),iconTextFontSize:y(u.iconTextFontSize,r),iconTextLineHeight:u.iconTextLineHeight,iconTextLetterSpacing:u.iconTextLetterSpacing,iconTextPadding:u.iconTextPadding,iconTextHaloWidth:(0,a.Wx)(u.iconTextHaloWidth),iconTextHaloColor:y(u.iconTextHaloColor,r),iconOpacity:y(u.iconOpacity,r),iconPriority:u.iconPriority,iconLabelingMargin:u.iconLabelingMargin,iconLabelingGroup:u.iconLabelingGroup,iconRotation:y(u.iconRotation,r),textField:y((0,a.Wx)(u.textField),r),textFont:y((0,a.Wx)(u.textFont),r),textColor:y((0,a.Wx)(u.textColor),r),textFontSize:y((0,a.Wx)(u.textFontSize),r),textLineHeight:(0,a.Wx)(u.textLineHeight),textLetterSpacing:(0,a.Wx)(u.textLetterSpacing),textField2:g((0,a._e)(u.textField),r),textFont2:g((0,a._e)(u.textFont),r),textColor2:g((0,a._e)(u.textColor),r)||y((0,a.Wx)(u.textColor),r),textFontSize2:g((0,a._e)(u.textFontSize),r)||y((0,a.Wx)(u.textFontSize),r),textMaxLengthPerLine:u.textMaxLengthPerLine,textPlacement:u.textPlacement,textPriority:u.textPriority,textOffset:y((0,a.Wx)(u.textOffset),r),textOffset2:g((0,a._e)(u.textOffset),r),textHaloColor:y((0,a.Wx)(u.textHaloColor),r),textHaloColor2:g((0,a._e)(u.textHaloColor),r)||y((0,a.Wx)(u.textHaloColor),r),textHaloWidth:(0,a.Wx)(u.textHaloWidth),textHaloWidth2:(0,a._e)(u.textHaloWidth)||(0,a.Wx)(u.textHaloWidth),textLabelingMargin:(0,a.Wx)(u.textLabelingMargin),textLabelingMargin2:(0,a._e)(u.textLabelingMargin)||(0,a.Wx)(u.textLabelingMargin),textLabelingGroup:(0,a.Wx)(u.textLabelingGroup),textLabelingGroup2:(0,a._e)(u.textLabelingGroup)||(0,a.Wx)(u.textLabelingGroup),duplicationSpacing:y(u.duplicationSpacing,r),endingOffsets:u.endingOffsets}});break;case"arrow":u=(0,o.z4)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),strokeColor:y(u.strokeColor,r),lineWidth:y(u.lineWidth,r),strokeWidth:y(u.strokeWidth,r),tipWidth:y(u.tipWidth,r),tipHeight:y(u.tipHeight,r),animation:P(u.animation,r)}});break;case"stretchableImage":n=(0,i.pi)((0,i.pi)({},c),{type:"stretchableImage",style:t.style});break;case"raster":u=(0,o.tC)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{opacity:y(u.opacity,r)}});break;case"circle":u=(0,o.th)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),strokeColor:y(u.strokeColor,r),strokeColor2:y(u.strokeColor2,r),width:y(u.width,r),strokeWidth:y(u.strokeWidth,r),strokeWidth2:y(u.strokeWidth2,r)}});break;case"heatmap":u=(0,o.Mk)(t.style),n=(0,i.pi)((0,i.pi)({},c),{type:t.type,style:{color:y(u.color,r),radius:y(u.radius,r),opacity:y(u.opacity,r),intensity:y(u.intensity,r),weight:y(u.weight,r),downscale:u.downscale},framebufferId:{framebuffer:s.z}})}}catch(e){if(e instanceof _)return void console.warn("Problem with layer #"+t.id+": "+e);throw e}if(n){n.dataKeys=function(t){var e=[];for(var n in t){var i=n.split(":"),r=i[0],o=i.slice(1);e[t[n]]={type:r,key:o.join(":")}}return e}(r.getIndexedKeys());for(var d=0,h=null!=e?e:[];d<h.length;d++){var f=h[d];n.dataKeys[f.dataIndex]={type:f.type,key:f.property}}}return n}}function L(t){var e=(0,o.sy)(t);return{id:"dem",type:"dem",innerId:m.h,filter:!0,dataKeys:[],minzoom:-1/0,maxzoom:1/0,renderIndex:-1/0,style:{lightingDirection:y(e.lightingDirection),shadingIntensity:y(e.shadingIntensity),shadingPalette:b(e.shadingPalette),verticalScale:y(e.verticalScale)},framebufferId:{elevation:s.z}}}function E(t,e){return"number"!=typeof t||Number.isNaN(t)?e:t}},7357:function(t,e,n){"use strict";n.d(e,{IJ:function(){return r},bN:function(){return o},q0:function(){return a},_0:function(){return s},l7:function(){return l},Ym:function(){return c},zn:function(){return u},N5:function(){return d},sd:function(){return h},th:function(){return f},TI:function(){return p},z4:function(){return m},tC:function(){return v},Mk:function(){return _},sy:function(){return y},R_:function(){return g},n3:function(){return b},T_:function(){return w},YW:function(){return x}});var i=n(372);function r(t){var e={color:"#000000",strokeColor:"#000000",strokeWidth:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.color),e}function o(t){var e={topColor:"#000000",strokeColor:"#000000",strokeWidth:1,sideColor:"#000000",visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.topColor),void 0===t.sideColor&&(e.sideColor=e.topColor),e}function a(t){var e={color:"#000000",width:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function s(t){var e={color:"#000000",strokeColor:"#000000",strokeWidth:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.color),e}function l(t){var e={sideColor:"#000000",strokeColor:"#000000",strokeWidth:1,height:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.sideColor),e}function c(t){var e={textField:["get","db_label"],textFont:"Noto_Sans",textColor:"#000000",textFontSize:16,textLetterSpacing:0,textHaloColor:"rgba(0, 0, 0, 0)",textHaloWidth:0,textPriority:0,textLabelingSideMargin:0,textDuplicationSpacing:0,lineEndingOffsets:0,visibility:"visible",labelingGroup:w};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function u(t){var e={color:"#000000",lineWidth:2,lineLength:10,tipWidth:1.5,tipHeight:2,priority:0,duplicationSpacing:0,endingOffsets:0,visibility:"visible",labelingGroup:w};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function d(t){var e={color:"#000000",gapColor:"#00000000",width:1,gapLength:1,dashLength:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function h(t){var e={color:"#000000",width:1,shift:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function f(t){var e={color:"#ffffff",strokeColor:"#3388ff",strokeColor2:"#00000000",width:20,strokeWidth:3,strokeWidth2:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function p(t){var e={allowOverlap:!1,allowElevation:!1,iconOpacity:1,iconImage:"",iconAnchor:[.5,.5],iconOffset:[0,0],iconWidth:16,iconTextField:["get","db_label2"],iconTextFont:"",iconTextAnchor:[.5,.5],iconTextOffset:[0,0],iconTextColor:"#000000",iconTextFontSize:16,iconTextLineHeight:1.2,iconTextLetterSpacing:0,iconTextPadding:[0,0,0,0],iconTextHaloWidth:0,iconTextHaloColor:"rgba(0, 0, 0, 0)",iconPriority:0,iconRotation:0,iconLabelingGroup:w,iconLabelingMargin:{topBottom:0,leftRight:0},textField:[["get","db_label"],["get","db_label2"]],textFont:"",textColor:"#000000",textFontSize:16,textLineHeight:1.2,textLetterSpacing:0,textPlacement:"bottomCenter",textOffset:0,textHaloColor:"rgba(0, 0, 0, 0)",textHaloWidth:0,textLabelingMargin:{topBottom:0,leftRight:0},textPriority:0,textMaxLengthPerLine:30,visibility:"visible",textLabelingGroup:w,duplicationSpacing:100,endingOffsets:0};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function m(t){var e={color:"#000000",strokeColor:"#000000",lineWidth:1,strokeWidth:0,tipWidth:1,tipHeight:1,animation:{type:"appearance",tipMovementAmplitude:0},visibility:"visible"};for(var n in void 0===t.strokeColor&&(e.strokeColor=e.color),t)void 0!==t[n]&&(e[n]=t[n]);return e}function v(t){var e={opacity:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function _(t){return(0,i.kn)(t,{color:["interpolate",["linear"],["heatmap-density"],0,"rgba(53, 136, 253, 0)",.2,"rgba(53, 136, 253, 0.2)",.4,"rgb(255, 201, 77)",.6,"rgb(255, 202, 20)",.75,"rgb(245, 0, 7)",1,"rgb(255, 0, 0)"],radius:30,opacity:1,intensity:1,weight:1,downscale:1,visibility:"visible"})}function y(t){return(0,i.kn)(t,{lightingDirection:315,shadingIntensity:.25,verticalScale:1,shadingPalette:["interpolate",["exponential",2],["shading-intensity"],0,0,.3,.2,1,1]})}var g="__overlapped",b="__commercial",w="default",x={groups:[w,g,b],overlay:[[w,g]],intersect:[[]]}},8550:function(t,e,n){"use strict";function i(t){return"number"==typeof t||"boolean"==typeof t||"string"==typeof t||null===t}function r(t){if(Array.isArray(t)){var e=t;if(!e.length)return!1;if({zoom:!0,"heatmap-density":!0,"shading-intensity":!0,step:!0,interpolate:!0,all:!0,get:!0,sourceAttr:!0,global:!0,match:!0,in:!0,any:!0,"!":!0,"==":!0,"!=":!0,">=":!0,">":!0,"<=":!0,"<":!0,"to-boolean":!0,"to-color":!0}[e[0]])return!0}return!1}function o(t){return!Array.isArray(t)&&"object"==typeof t&&null!==t&&void 0!==t.type&&"color"!==t.type}function a(t){return{type:"color",value:t}}function s(t,e,n){return t+"_"+e+"_"+n}function l(t,e){return"unique-"+t+"_"+e}function c(t){return Array.isArray(t)?r(t)?t:t[0]:t}function u(t){if(Array.isArray(t)&&!r(t)&&void 0!==t[1])return t[1]}n.d(e,{aH:function(){return i},Uu:function(){return o},lK:function(){return a},fF:function(){return s},zV:function(){return l},Wx:function(){return c},_e:function(){return u}})},3411:function(t,e,n){"use strict";n.d(e,{x:function(){return i}});var i=function(){function t(t){void 0===t&&(t=0),this.index=t,this.keysMap={}}return t.prototype.getIndex=function(){var t=this.index;return this.index+=1,t},t.prototype.getUniqueIndex=function(t){return void 0===this.keysMap[t]&&(this.keysMap[t]=this.index,this.index+=1),this.keysMap[t]},t.prototype.getIndexedKeys=function(){return this.keysMap},t}()},9460:function(t,e,n){"use strict";n.d(e,{U:function(){return r},h:function(){return o}});var i=0;function r(){return i++}var o=r()},7624:function(t,e,n){"use strict";n.d(e,{FR:function(){return l},UP:function(){return u},zn:function(){return d},vn:function(){return h},Q9:function(){return f},o4:function(){return p},jJ:function(){return m},bs:function(){return v},ci:function(){return _},OW:function(){return y},m2:function(){return w},EG:function(){return x}});var i=n(8550),r=n(2241),o=n(6328),a=n(8131),s=null;function l(t,e){if(!(0,i.Uu)(t))return t;if(e.allowedExpressions&&!e.allowedExpressions.has(t.type))return(0,o.cM)("Expression of type "+t.type+" is not allowed here"),s;switch(t.type){case"all":return function(t,e){return t.array.every((function(t){return!0===l(t,e)}))}(t,e);case"any":return function(t,e){return t.array.some((function(t){return!0===l(t,e)}))}(t,e);case"get":return function(t,e){var n,i,r;if("binder"===e.type||"labeling"===e.type)return null!==(n=c(e.tileData[t.dataIndex]))&&void 0!==n?n:null;var o=null!==(r=null===(i=e.tileAttrs)||void 0===i?void 0:i[e.tileProps[t.property]])&&void 0!==r?r:null;return Number.isNaN(o)?null:c(o)}(t,e);case"global":return function(t,e){var n;return null!==(n=e.styleState[t.property])&&void 0!==n?n:null}(t,e);case"sourceAttr":return function(t,e){var n,i;return"geojsonFilter"===e.type||"filter"===e.type?null!==(n=e.sourceAttrs[t.property])&&void 0!==n?n:null:"binder"!==e.type&&"labeling"!==e.type||null===(i=c(e.tileData[t.dataIndex]))||void 0===i?null:i}(t,e);case"in":return function(t,e){var n=l(t.element,e),i=l(t.array,e);return null!==i&&(Array.isArray(i)?i.some((function(t){return t===n})):((0,o.cM)("InExpression second argument resolved to non-array value: "+i),null))}(t,e);case"interpolate":return function(t,e){if(0===t.steps.length)return(0,o.cM)("Interpolate expression contains 0 steps, cannot interpolate"),s;var n=l(t.steps[0].value,e),i=l(t.argument,e);return"number"!=typeof i?((0,o.cM)("Interpolate value resolved to non-number value: "+i+" "+t.argument),0):(0,r.gC)(n)?p(t,i,e):u(t,i,e)}(t,e);case"match":return function(t,e){var n,i=l(t.input,e),r=t.cases.find((function(t){return t.values.has(i)}));return l(null!==(n=null==r?void 0:r.output)&&void 0!==n?n:t.defaultOutput,e)}(t,e);case"step":return function(t,e){var n=g(t,Number(l(t.value,e)))-1;return l(t.steps[n].value,e)}(t,e);case"to-boolean":return function(t,e){return Boolean(l(t.value,e))}(t,e);case"to-color":return function(t,e){var n=l(t.value,e);return(0,r.iL)(n)?(0,r.MV)(n):(0,r.gC)(n)?n:(console.warn("Can't resolve expression. Must be color, but got "+n),(0,i.lK)([0,0,0,0]))}(t,e);case"!":return function(t,e){return!l(t.value,e)}(t,e);case"==":case"!=":return function(t,e){var n=l(t.leftValue,e),i=l(t.rightValue,e);switch(t.type){case"==":return n===i;case"!=":return n!==i}}(t,e);case">":case"<":case">=":case"<=":return function(t,e){var n=l(t.leftValue,e);if(null===n)return null;var i=l(t.rightValue,e);if(null===i)return null;switch(t.type){case"<":return n<i;case">":return n>i;case"<=":return n<=i;case">=":return n>=i}}(t,e);case"zoom":return"binder"===e.type||"labeling"===e.type?e.styleZoom:((0,o.cM)("Zoom expression cannot be used in filter context"),s);default:return(0,o.cM)("Not supported expression type <<"+t.type+">> in "+JSON.stringify(t)),s}}function c(t){return(0,a.nI)(t)?(0,a.Ak)(t):t}function u(t,e,n){var i=g(t,e);if(0===i)return Number(l(t.steps[0].value,n));if(i===t.steps.length)return function(t,e,n){var i=t.steps[t.steps.length-1],r=t.base;return 1===r?h(i.value,e):h(i.value,e)*Math.pow(r,n-i.key)}(t,n,e);var r=Number(l(t.steps[i-1].value,n));if("labeling"===n.type&&n.interpolateExpressionAsStep)return r;var o=b(t,e,i);return(1-o)*r+o*Number(l(t.steps[i].value,n))}function d(t,e){var n=l(t,e);return(0,r.gC)(n)?n:(console.warn("Can't resolve expression. Must be color, but got "+n),(0,i.lK)([0,0,0,0]))}function h(t,e,n){void 0===n&&(n=NaN);var i=l(t,e);return"number"==typeof i?i:n}function f(t,e,n){void 0===n&&(n="");var i=l(t,e);return"string"==typeof i?i:n}function p(t,e,n){var r=g(t,e);if(0===r)return d(t.steps[0].value,n);if(r===t.steps.length)return d(t.steps[t.steps.length-1].value,n);var o=b(t,e,r),a=d(t.steps[r-1].value,n).value,s=d(t.steps[r].value,n).value;return(0,i.lK)([a[0]*(1-o)+s[0]*o,a[1]*(1-o)+s[1]*o,a[2]*(1-o)+s[2]*o,a[3]*(1-o)+s[3]*o])}function m(t,e,n){return{type:"binder",styleZoom:t,styleState:e,tileData:n}}function v(t,e,n,i){return{type:"labeling",styleZoom:t,styleState:e,interpolateExpressionAsStep:n,tileData:i}}function _(t,e,n,i,r){return{type:"filter",metatile:t,styleState:e,tileProps:i,tileAttrs:r,sourceAttrs:n}}function y(t,e,n,i,r){return{type:"geojsonFilter",metatile:t,styleState:e,sourceAttrs:n,tileProps:i,tileAttrs:r}}function g(t,e){for(var n=0;n<t.steps.length&&!(e<t.steps[n].key);)n++;return n}function b(t,e,n){var i=t.base,r=t.steps[n].key-t.steps[n-1].key,o=e-t.steps[n-1].key;return 1===i?o/r:(Math.pow(i,o)-1)/(Math.pow(i,r)-1)}function w(t){var e=t.value,n=e[0],i=e[1],r=e[2],o=e[3];return[((n*o+127)/255>>>0)/255,((i*o+127)/255>>>0)/255,((r*o+127)/255>>>0)/255,o/255]}function x(t){var e=new Set;return S(e,t),Array.from(e)}function S(t,e){if((0,i.Uu)(e))switch(e.type){case"all":return function(t,e){e.array.forEach((function(e){return S(t,e)}))}(t,e);case"match":return function(t,e){S(t,e.defaultOutput),e.cases.forEach((function(e){return S(t,e.output)}))}(t,e);case"step":case"interpolate":return function(t,e){e.steps.forEach((function(e){return S(t,e.value)}))}(t,e)}else t.add(e)}},3750:function(t,e,n){"use strict";n.d(e,{z:function(){return i}});var i=-1},9746:function(t,e,n){"use strict";function i(t){return!!t&&"line"===t.type}function r(t){return t.reduce((function(t,e,n){return t[e]=n,t}),{})}function o(t){if(void 0===t||"boolean"==typeof t)return Boolean(t);var e=JSON.stringify(t);return Boolean(e.match(/\["get","(db_)?sublayer"]/))}n.d(e,{ot:function(){return i},PU:function(){return r},Kx:function(){return o}})},2981:function(t,e,n){"use strict";n.r(e),n.d(e,{Circle:function(){return cl},CircleMarker:function(){return it},CircleMarkerOptions:function(){return m.CircleMarkerOptions},CircleOptions:function(){return m.CircleOptions},CommPoiEvent:function(){return p.CommPoiEvent},DashedPolyline:function(){return ol},DashedPolylineOptions:function(){return m.DashedPolylineOptions},DataTileLayer:function(){return Hl},DataTileLayerOptions:function(){return y.DataTileLayerOptions},DraggablePointerEvent:function(){return p.DraggablePointerEvent},DynamicObject:function(){return N},DynamicObjectPointerEvent:function(){return p.DynamicObjectPointerEvent},Entrance:function(){return ha},EntranceOptions:function(){return m.EntranceOptions},FirmsToFloorIndexMap:function(){return _.FirmsToFloorIndexMap},FloorComplexHideEvent:function(){return p.FloorComplexHideEvent},FloorComplexShowEvent:function(){return p.FloorComplexShowEvent},FontName:function(){return yo.FontName},GeoJsonSource:function(){return Fe.gs},GeoJsonSourceOptions:function(){return Fe.GeoJsonSourceOptions},GeoJsonTileSource:function(){return Fe.Xm},GeoJsonTileSourceOptions:function(){return Fe.GeoJsonTileSourceOptions},HTMLMarkerShownEvent:function(){return p.HTMLMarkerShownEvent},Heatmap:function(){return xl},HeatmapOptions:function(){return a.HeatmapOptions},HeatmapPalette:function(){return a.HeatmapPalette},HeatmapPoint:function(){return a.HeatmapPoint},HtmlMarker:function(){return sa},HtmlMarkerOptions:function(){return m.HtmlMarkerOptions},IconTransformerParams:function(){return f.IconTransformerParams},InteractionEvent:function(){return p.InteractionEvent},InteractionTarget:function(){return p.InteractionTarget},LabelsDebugOptions:function(){return o.LabelsDebugOptions},Map:function(){return Qs},MapClass:function(){return Qs},MapEvent:function(){return p.MapEvent},MapOptions:function(){return v.MapOptions},MapPointerEvent:function(){return p.MapPointerEvent},Marker:function(){return zl},MarkerIconOptions:function(){return c.MarkerIconOptions},MarkerLabelOptions:function(){return c.MarkerLabelOptions},MarkerOptions:function(){return c.MarkerOptions},OnlineMarker:function(){return Ul},OnlineMarkerIcon:function(){return f.OnlineMarkerIcon},OnlineMarkerOptions:function(){return f.OnlineMarkerOptions},Padding:function(){return v.Padding},PersonalPoi:function(){return v.PersonalPoi},PointLabel:function(){return Ll},PointLabelOptions:function(){return l.PointLabelOptions},Polygon:function(){return ll},PolygonOptions:function(){return m.PolygonOptions},Polyline:function(){return il},PolylineOptions:function(){return m.PolylineOptions},Raster:function(){return Ol},RasterOptions:function(){return d.RasterOptions},RasterTileSource:function(){return Bl},RasterTileSourceOptions:function(){return h.RasterTileSourceOptions},Rect:function(){return Rl},RectOptions:function(){return u.RectOptions},RulerChangeEvent:function(){return p.RulerChangeEvent},SourceMetatile:function(){return yo.SourceMetatile},Stats:function(){return v.Stats},StretchableImage:function(){return Il},StretchableImageOptions:function(){return s.StretchableImageOptions},StretchableImageSource:function(){return s.StretchableImageSource},TileCoords:function(){return v.TileCoords},TileLoadEvent:function(){return p.TileLoadEvent},TrafficScoreEvent:function(){return p.TrafficScoreEvent},Viewport:function(){return v.Viewport},config:function(){return g},mapglUtils:function(){return r},utils:function(){return i}});var i={};n.r(i),n.d(i,{geoLineDistance:function(){return w.XV},geoToMapDistance:function(){return w.a4},getCenterZoomByPoints:function(){return L},getMetersFromPixels:function(){return D},getMousePositionInContainer:function(){return E},projectGeoToMap:function(){return w.yq},projectGeoToScreen:function(){return C},projectMapToGeo:function(){return w.PA},projectMapToScreen:function(){return F},projectScreenToGeo:function(){return A}});var r={};n.r(r),n.d(r,{getMetersFromPixelsXY:function(){return w.$X},getUrl:function(){return R.Gr},hashToString:function(){return O.GG}});var o={};n.r(o),n.d(o,{Q:function(){return ks}});var a={};n.r(a),n.d(a,{X:function(){return xl}});var s={};n.r(s),n.d(s,{q:function(){return Il}});var l={};n.r(l),n.d(l,{S:function(){return Ll}});var c={};n.r(c),n.d(c,{J:function(){return zl}});var u={};n.r(u),n.d(u,{U:function(){return Rl}});var d={};n.r(d),n.d(d,{n:function(){return Ol}});var h={};n.r(h),n.d(h,{P:function(){return Bl}});var f={};n.r(f),n.d(f,{c:function(){return Ul}});var p={};n.r(p);var m={};n.r(m);var v={};n.r(v);var _={};n.r(_);var y={};n.r(y),n.d(y,{l:function(){return Hl}});var g=n(1026),b=n(372),w=n(3308),x=n(1859),S=n(9450),I=n(7120),M=n(1992);function P(t,e,n){if(0!==t.length){for(var i=(0,b.Id)(e),r=I.Ue(),o=0,a=t;o<a.length;o++){var s=a[o],l=(0,w.yq)(s);(0,M.hk)(l,-i),I.aM(r,l)}var c=S.Ue();return I.be(c,r),(0,M.hk)(c,i),{center:c,zoom:T(r,n)}}}function T(t,e){return Math.min((0,w.to)(e[0],Math.abs(t.max[0]-t.min[0])),(0,w.to)(e[1],Math.abs(t.max[1]-t.min[1])))}function L(t,e,n){var i=P(t,e,n);if(i)return{zoom:i.zoom,center:(0,w.PA)(i.center)}}function E(t,e,n){var i=t.getBoundingClientRect();return[e-i.left-t.clientLeft,n-i.top-t.clientTop]}function k(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=E(e,t[i].clientX,t[i].clientY);return n}function z(t){return t.touches.length>1}function C(t,e,n,i,r,o,a,s){return void 0===a&&(a={top:0,right:0,bottom:0,left:0}),void 0===s&&(s={top:0,right:0,bottom:0,left:0}),new x.V({center:(0,w.yq)(t),zoom:e,rotation:(0,b.Id)(n),size:i,pitch:(0,b.Id)(r),viewport:a,padding:s}).project((0,w.yq)(o))}function A(t,e,n,i,r,o,a,s){void 0===a&&(a={top:0,right:0,bottom:0,left:0}),void 0===s&&(s={top:0,right:0,bottom:0,left:0});var l=new x.V({center:(0,w.yq)(t),zoom:e,rotation:(0,b.Id)(n),size:i,pitch:(0,b.Id)(r),viewport:a,padding:s});return(0,w.PA)(l.unproject(o))}function D(t,e,n,i,r,o,a,s,l){return void 0===a&&(a={top:0,right:0,bottom:0,left:0}),void 0===s&&(s={top:0,right:0,bottom:0,left:0}),(0,w.$X)(t,e,n,i,r,o,a,s,l,l)}function F(t,e){return new x.V(t).project(e)}var R=n(9170),O=n(5109),j=n(655),B=n(5964),U=1;function Z(){return U++}var N=function(t){function e(e){var n=t.call(this)||this;return n.uniqId=Z(),n.modules=e.modules,n.mapState=e.state,n.tileObjects=[],n.identifyIds=[],n}return(0,j.ZT)(e,t),e.prototype.update=function(){},e.prototype.destroy=function(){var t=this,e=this.modules;this.tileObjects.forEach((function(n){n.clean(t.mapState),e.tileManager.removeObject(n)})),this.tileObjects=[],e.layers.removeLayer(this),this.mapState.needRerender=!0},e.prototype.getIdentifyData=function(){var t=this;return this.identifyIds.map((function(e){return{dynamicObjectId:t.uniqId,metatileHash:-1,ids:e}}))},e}(B.c),H=n(378),G=n(5233),V=n(8131),W=n(7277);function q(t,e){if(void 0!==e){if(e.sourceId){var n=t.getSourceById(e.sourceId);if("default"!==(null==n?void 0:n.type))return}var i={id:(0,V.Ak)(e.id),symbol:e.symbol};return"point"===e.symbol&&(i.isText=1===e.instanceId),e.sublayer&&(i.isCityCommercial=e.sublayer===g.commercialCitySublayer,i.isCommercial=(0,W.Ty)(e.sublayer),i.isPersonal=(0,W.h3)(e.sublayer),"point"!==e.symbol||i.isCommercial||(i.sysCode=e.objectClass)),i}}function X(t,e){if(void 0!==e){if(e.sourceId){var n=t.getSourceById(e.sourceId);if(n&&"geojson"===n.type)return"internal"===n.subtype?{type:"geojson",id:(0,V.Ak)(e.id),feature:n.getFeatureById(e.id),source:n}:{type:"geojsonTile",getFeatureProperties:function(){var t;return n.getObjectAttributes(e.id[0],null!==(t=e.tileKey)&&void 0!==t?t:"")},source:n}}return{type:"default",id:(0,V.Ak)(e.id)}}}function Y(t,e,n,i,r){var o=(0,w.PA)(r.camera.unproject(i));if(e&&void 0!==e.dynamicObjectId){var a=t,s=r.layers.getDynamicObjectLayers().find((function(t){return t.uniqId===e.dynamicObjectId}));if(!s)return;var l={lngLat:o,originalEvent:n,point:i,targetData:s};s.emit(a,l)}else{var c={lngLat:o,originalEvent:n,point:i,target:q(r.sourceStorage,e),targetData:X(r.sourceStorage,e)},u=t;r.map.emit(u,c)}}var K=function(t){function e(e,n){var i=t.call(this,e)||this;return i.start=function(t){var e=i,n=e.modules,r=e.container;if(0===t.button){var o=E(r,t.clientX,t.clientY);i.contains(o)&&(n.handler.block(),n.mouseMoveHandler.block(),i.dragStartCursorPoint=o,i.dragStartAnchorPoint=n.camera.project(i.getPosition()),document.addEventListener("mouseup",i.stop),document.addEventListener("mousemove",i.move),i.emitEvent("dragstart",t))}},i.move=function(t){var e=i,n=e.dragStartAnchorPoint,r=e.dragStartCursorPoint,o=e.container;if(void 0!==n&&void 0!==r){var a=E(o,t.clientX,t.clientY),s=H.d9(n);H.IH(s,s,a),H.lu(s,s,r),i.setPosition(i.modules.camera.unproject(s)),i.emitEvent("drag",t)}},i.stop=function(t){if(0===t.button){i.dragStartCursorPoint=void 0,i.dragStartAnchorPoint=void 0,document.removeEventListener("mouseup",i.stop),document.removeEventListener("mousemove",i.move);var e=i.modules;e.handler.unblock(),e.mouseMoveHandler.unblock(),i.emitEvent("dragend",t),i.isInteractive()&&e.identifier.resetCache()}},i.container=e.modules.layout.mapContainer,n&&i.container.addEventListener("mousedown",i.start,!0),i}return(0,j.ZT)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.removeEventListener("mousedown",this.start,!0),document.removeEventListener("mouseup",this.stop),document.removeEventListener("mousemove",this.move)},e.prototype.emitEvent=function(t,e){var n=this.getPosition(),i=(0,w.PA)(n),r=this.modules.camera.project(n),o=this.modules.identifier.searchSync(r),a=void 0!==o&&void 0===o.dynamicObjectId?q(this.modules.sourceStorage,o):void 0;this.emit(t,{originalEvent:e,target:a,targetData:this,lngLat:i,point:r})},e}(N),J=n(5951),Q=n(3526),$=n(3936),tt=n(9266),et=n(5869),nt=n(7624),it=function(t){function e(e,n){var i,r,o=t.call(this,e,null!==(i=n.draggable)&&void 0!==i&&i)||this;o.options=n,o.interactive=null===(r=o.options.interactive)||void 0===r||r,o.center=(0,w.yq)(o.options.coordinates);var a=o.modules,s=a.dynamicStyle,l=a.collector,c=a.renderer,u=a.tileManager,d=a.identifier,h=a.layers;if(o.layer=(0,tt.qw)({type:"circle",id:"dynamic-circleMarker-"+o.uniqId,minzoom:o.options.minZoom,maxzoom:o.options.maxZoom,style:{color:o.options.color,strokeColor:o.options.borderColor,strokeColor2:o.options.border2Color,width:o.options.width,strokeWidth:o.options.borderWidth,strokeWidth2:o.options.border2Width}}),!o.layer)return o;s.addLayer(o.layer,o.options.zIndex);var f=(0,Q.IR)(o.center),p=(0,$.FJ)({id:o.interactive?(0,V.Ru)(0,0):NaN});(0,J.XI)({collector:l,generator:et.p.generate,args:[s.getStyle().id,o.layer,O.Dz,p,[[0],[0]]]});var m=l.getAccumulatedData(),v=new G.W("dynamicObject",m.data,c,f);return u.addObject(v),o.tileObjects.push(v),o.interactive&&o.identifyIds.push(m.identifyIds),h.addLayer(o),l.reset(),o.mapState.needRerender=!0,o.interactive&&d.resetCache(),o}return(0,j.ZT)(e,t),e.prototype.remove=function(){this.layer&&this.modules.dynamicStyle.removeLayer(this.layer.innerId),this.interactive&&this.modules.identifier.resetCache(),t.prototype.destroy.call(this)},e.prototype.setPosition=function(t){var e=this.mapState,n=this.tileObjects[0];void 0!==n&&(this.center=t,n.setTileCoords((0,Q.IR)(t)),e.needRerender=!0)},e.prototype.getPosition=function(){return this.center},e.prototype.isInteractive=function(){return this.interactive},e.prototype.contains=function(t){if(!this.layer)return!1;var e=this.layer,n=this.modules.camera.project(this.center),i=(0,nt.vn)(e.style.width,(0,nt.jJ)(this.mapState.styleZoom,this.mapState.styleState,[]))/2+(0,nt.vn)(e.style.strokeWidth,(0,nt.jJ)(this.mapState.styleZoom,this.mapState.styleState,[]));return H.TK(n,t)<=i},e}(K),rt=n(258);function ot(t,e,n){var i=t.viewport,r=i.top,o=i.right,a=i.bottom,s=i.left,l=e.clientWidth,c=e.clientHeight;t.size=[Math.max(1,l-s-o),Math.max(1,c-r-a)],n.updateIdentifySize()}function at(t,e){return function(t,e){return{top:Math.min(t.top,e[1]),bottom:Math.min(t.bottom,e[1]),left:Math.min(t.left,e[0]),right:Math.min(t.right,e[0])}}(function(t){return{top:Math.max(t.top,0),bottom:Math.max(t.bottom,0),left:Math.max(t.left,0),right:Math.max(t.right,0)}}(t),e)}function st(t,e){var n=t.padding,i=n.top,r=n.right,o=n.bottom,a=n.left;t.padding={top:i,right:r,bottom:o,left:a},t.needRerender=!0,e.updateIdentifySize()}var lt="inertia",ct=rt.sT.bind(null,lt),ut=function(t,e){rt.Vx(lt,{step:function(t,n,i){var r=i.startPoint,o=i.startSpeed,a=i.startTime,s=i.direction,l=S.d9(s);S.bA(l,l,n),S.IH(l,l,r),I.r3(t.maxBounds,l)||dt(e,t),t.center=l,"zoom"===t.zoomTypePreserving?t.styleZoom=(0,w.X$)(t.zoom,l):t.zoom=(0,w.Z3)(t.styleZoom,l);var c=function(t,e,n){return t*Math.pow(1-(n-e)/g.inertia.duration,g.inertia.nonLinearity)}(o,a,t.time);(0,w.ik)(c,t.zoom)<g.inertia.minSpeed&&dt(e,t)}},t)},dt=function(t,e){rt.sT(lt,e),t.classList.remove("mapgl-inertia")},ht="center",ft=function(t,e,n){void 0===n&&(n={}),rt.sT(ht,t),ct(t);var i=S.Ue();if(I.Rk(i,t.maxBounds,e),!1===n.animate||0===n.duration)t.center=i,"zoom"===t.zoomTypePreserving?t.styleZoom=(0,w.X$)(t.zoom,e):t.zoom=(0,w.Z3)(t.styleZoom,e);else{var r=void 0!==n.easing?n.easing:"linear",o=void 0!==n.duration?n.duration:250;rt.BL(ht,{easing:r},t,t.center,i,o)}},pt=rt.sT.bind(null,ht),mt=rt.Vx.bind(null,ht,{step:function(t,e){t.center=e,"zoom"===t.zoomTypePreserving?t.styleZoom=(0,w.X$)(t.zoom,e):t.zoom=(0,w.Z3)(t.styleZoom,e)}}),vt="rotation";function _t(t,e){return(t-=e)>=Math.PI?t=(t+Math.PI)%(2*Math.PI)-Math.PI:t<-Math.PI&&(t=Math.PI-(Math.PI-t)%(2*Math.PI)),t+e}function yt(t,e,n){if(void 0===n&&(n={}),rt.sT(vt,t),!1===n.animate||0===n.duration)t.rotation=_t(e,0);else{var i=void 0===n.normalize||n.normalize;rt.BL(vt,{easing:n.easing||"linear"},t,t.rotation,i?_t(e,t.rotation):e,n.duration||250)}}var gt=rt.sT.bind(null,vt),bt=rt.Vx.bind(null,vt,{step:function(t,e){return t.rotation=_t(e,0)}}),wt="pitch";function xt(t,e,n){void 0===n&&(n={}),rt.sT(wt,t);var i=(0,b.uZ)(e,t.minPitch,t.maxPitch);!1===n.animate||0===n.duration?t.pitch=i:rt.BL(wt,{easing:n.easing||"linear"},t,t.pitch,i,n.duration||300)}var St=rt.sT.bind(null,wt),It=rt.Vx.bind(null,wt,{step:function(t,e){return t.pitch=e}}),Mt="zoom",Pt=function(t,e,n){void 0===n&&(n={}),rt.sT(Mt,t);var i=(0,b.uZ)(e,t.minZoom,t.maxZoom);if(i!==t.zoom)if(!1===n.animate||0===n.duration)n.zoomPoint&&(S.IH(t.center,t.center,(0,b.Kv)(t,n.zoomPoint,{zoom:i})),I.Rk(t.center,t.maxBounds,t.center)),t.zoom=i,t.styleZoom=(0,w.X$)(i,t.center);else{var r=n.animateHeight?(0,w.r9)(t.zoom,t.size):t.zoom,o=n.animateHeight?(0,w.r9)(i,t.size):i,a=void 0!==n.easing?n.easing:"easeOutCubic",s=void 0!==n.duration?n.duration:250;rt.BL(Mt,{easing:a},t,r,o,s,{zoomPoint:n.zoomPoint,animateHeight:!!n.animateHeight,blockBuildingAnimation:!!n.blockBuildingAnimation})}},Tt=rt.sT.bind(null,Mt),Lt=rt.Vx.bind(null,Mt,{step:function(t,e,n){void 0===n&&(n={});var i=n&&n.animateHeight?(0,w.nn)(e,t.size):e;n&&n.zoomPoint&&(S.IH(t.center,t.center,(0,b.Kv)(t,n.zoomPoint,{zoom:i})),I.Rk(t.center,t.maxBounds,t.center)),t.zoom=i,t.styleZoom=(0,w.X$)(i,t.center)}}),Et=navigator.msPointerEnabled&&navigator.msMaxTouchPoints&&!window.PointerEvent,kt=window.PointerEvent&&navigator.pointerEnabled&&navigator.maxTouchPoints||Et||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,zt=Rt("webkit"),Ct=Rt("chrome")||Rt("crios"),At=(window,!Ct&&Rt("safari")),Dt=(Rt("gecko")&&!zt&&window.opera,navigator.platform.toUpperCase().indexOf("MAC")>=0),Ft=Rt("firefox");function Rt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function Ot(t,e){var n=(0,j.pi)({hitType:"event",eventCategory:"Metrics"},t);window.ga&&window.ga(g.analytics.gaName+".send",n)}function jt(t,e){var n,i;function r(){n=!1,i&&(o.apply(void 0,i),i=!1)}function o(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n?i=o:(t.apply(void 0,o),setTimeout(r,e),n=!0)}return o}function Bt(t){Tt(t),pt(t),gt(t),St(t),ct(t)}var Ut=function(){function t(t,e){var n=this;this.onWheelScroll=function(t){t.preventDefault(),void 0===t.deltaMode&&void 0===t.deltaY||(n.state.userHasInteracted=!0,n.screenPoint=E(n.container,t.clientX,t.clientY),t.ctrlKey?n.deltaAccumulator-=10*t.deltaY:1===t.deltaMode?n.deltaAccumulator-=20*t.deltaY:n.deltaAccumulator-=t.deltaY,n.eventCount+=1)},this.startZooming=function(){var t,e=n.state;t=Dt?n.getDelta()*g.zoom.macTouchDelta:(0,b.Xx)(n.getDelta())*g.zoom.mouseDelta;var i=e.zoom+t,r=(0,b.uZ)(i,e.minZoom,e.maxZoom);r!==e.zoom&&(Bt(e),Pt(e,r,{duration:g.zoom.animDuration,animate:!Dt,zoomPoint:e.keepCenterWhileUserZoomRotate?void 0:n.screenPoint,blockBuildingAnimation:!0}))},this.stop=function(){n.state.userHasInteracted=!0,Tt(n.state)},this.state=t,this.container=e,Dt||(this.startZooming=jt(this.startZooming,g.zoom.throttleDelay)),this.deltaAccumulator=0,this.eventCount=0,this.screenPoint=[0,0],this.container.addEventListener("wheel",this.onWheelScroll),this.container.addEventListener("mousedown",this.stop)}return t.prototype.destroy=function(){this.container.removeEventListener("wheel",this.onWheelScroll),this.container.removeEventListener("mousedown",this.stop)},t.prototype.update=function(){0!==this.eventCount&&(this.startZooming(),this.state.needRerender=!0)},t.prototype.getDelta=function(){var t=this.deltaAccumulator/this.eventCount;return this.deltaAccumulator=0,this.eventCount=0,t},t}(),Zt=function(){function t(t){this.defs=t.map((function(t){return new Nt(t)}))}return t.prototype.check=function(t){for(var e=this.defs,n=!1,i=0;i<e.length;i++)n?e[i].update(t):n=!e[i].equal(t);return n},t}(),Nt=function(){function t(t){this.path=Array.isArray(t.path)?t.path:[t.path],this.type=t.type,"number"===this.type?(this.last=NaN,this.compare=this.primitive,this.updateFn=this.primitiveUpdate):"boolean"===this.type?(this.last=void 0,this.compare=this.primitive,this.updateFn=this.primitiveUpdate):"vec2"===this.type?(this.last=[NaN,NaN],this.compare=this.vec2,this.updateFn=this.vec2Update):"string"===this.type?(this.last="",this.compare=this.primitive,this.updateFn=this.primitiveUpdate):"padding"===this.type&&(this.last={left:0,right:0,bottom:0,top:0},this.compare=this.padding,this.updateFn=this.paddingUpdate)}return t.prototype.equal=function(t){var e=this.take(t),n=this.compare(this.last,e);return this.updateFn(e),n},t.prototype.update=function(t){this.updateFn(this.take(t))},t.prototype.take=function(t){var e=this.path,n=0;do{t=t[e[n++]]}while(n<e.length);return t},t.prototype.primitive=function(t,e){return t===e},t.prototype.padding=function(t,e){return t.top===e.top&&t.bottom===e.bottom&&t.left===e.left&&t.right===e.right},t.prototype.paddingUpdate=function(t){this.last.top=t.top,this.last.bottom=t.bottom,this.last.right=t.right,this.last.left=t.left},t.prototype.vec2=function(t,e){return t[0]===e[0]&&t[1]===e[1]},t.prototype.primitiveUpdate=function(t){this.last=t},t.prototype.vec2Update=function(t){this.last[0]=t[0],this.last[1]=t[1]},t}(),Ht=function(){function t(t,e){var n=this;this.onMouseUp=function(t){1===t.which&&n.start()},this.onTouchEnd=function(t){0===t.touches.length&&n.start()},this.start=function(){var t=n.state;t.userHasInteracted=!0;var e=n.getCurrentSpeed(t.time),i=S.kE(e);if(!((0,w.ik)(i,t.zoom)<=g.inertia.minSpeed)){var r=(0,w.h0)(g.inertia.maxSpeed,t.zoom),o=Math.min(i,r),a=n.calcDistanceByStartSpeed(o),s=S.d9(t.center),l=S.Ue();S.Fv(l,e),function(t,e,n,i,r){rt.BL(lt,{easing:"inertia"},t,0,r,g.inertia.duration,{startPoint:e,startSpeed:n,direction:i,startTime:t.time})}(t,s,o,l,a),n.container.classList.add("mapgl-inertia")}},this.stop=function(){ct(n.state),n.container.classList.remove("mapgl-inertia"),n.times=[],n.positions=[]},this.state=t,this.container=e,this.container.addEventListener("mouseup",this.onMouseUp),this.container.addEventListener("mousedown",this.stop),kt&&(this.container.addEventListener("touchend",this.onTouchEnd),this.container.addEventListener("touchstart",this.stop)),this.zoomDiffer=new Zt([{path:"zoom",type:"number"}]),this.styleZoomDiffer=new Zt([{path:"styleZoom",type:"number"}]),this.centerDiffer=new Zt([{path:"center",type:"vec2"}]),this.times=[],this.positions=[]}return t.prototype.destroy=function(){this.container.removeEventListener("mouseup",this.onMouseUp),this.container.removeEventListener("mousedown",this.stop),this.container.removeEventListener("touchend",this.onTouchEnd),this.container.removeEventListener("touchstart",this.stop)},t.prototype.update=function(){var t=this.state;this.centerDiffer.check(t)&&this.rememberTimeAndPosition(t),("zoom"===t.zoomTypePreserving?this.zoomDiffer.check(t):this.styleZoomDiffer.check(t))&&this.stop()},t.prototype.removeOldRecords=function(t){for(;t-this.times[0]>100&&this.times.length;)this.times.shift(),this.positions.shift()},t.prototype.rememberTimeAndPosition=function(t){var e=t.time;this.removeOldRecords(e),this.times.push(e),this.positions.push(S.d9(t.center))},t.prototype.getCurrentSpeed=function(t){if(this.removeOldRecords(t),this.times.length<2)return S.Ue();var e=S.d9(this.positions[this.positions.length-1]);return S.lu(e,e,this.positions[0]),S.bA(e,e,1/(this.times[this.times.length-1]-this.times[0])),e},t.prototype.calcDistanceByStartSpeed=function(t){return t*g.inertia.duration/(g.inertia.nonLinearity+1)},t}(),Gt=function(){function t(t){var e=this;this.emitMouseEvent=function(t){var n=E(e.container,t.clientX,t.clientY);e.emitEvent(t,n)},this.emitTouchEvent=function(t){var n=E(e.container,t.changedTouches[0].clientX,t.changedTouches[0].clientY);e.emitEvent(t,n)},this.container=t.layout.mapContainer,this.modules=t,this.container.addEventListener("mouseup",this.emitMouseEvent),this.container.addEventListener("touchend",this.emitTouchEvent)}return t.prototype.destroy=function(){this.container.removeEventListener("mouseup",this.emitMouseEvent),this.container.removeEventListener("touchend",this.emitTouchEvent)},t.prototype.update=function(){},t.prototype.emitEvent=function(t,e){var n=this;if(this.modules.layout.isActionWithCanvas(t)){var i=t.type;this.modules.identifier.search(i,e).then((function(r){Y(i,r,t,e,n.modules)}))}},t}(),Vt=function(){function t(t,e,n){var i=this;this.rotationDetected=!1,this.onGestureStart=function(t){t.preventDefault(),i.startRotation=i.state.rotation,i.rotationDetected=!1,i.gestureRotation=0,i.isGestureStart=!0,i.startZoom=i.state.zoom,i.screenPoint=E(i.container,t.clientX,t.clientY),i.state.userHasInteracted=!0,i.state.disableRotationByUserInteraction||i.container.classList.add("mapgl-rotating"),i.map.emit("interactionstart",{target:"zoom/rotation"})},this.onGestureEnd=function(t){t.preventDefault(),i.isGestureStart&&(i.isGestureStart=!1,i.state.userHasInteracted=!0,i.container.classList.remove("mapgl-rotating"),i.map.emit("interactionend",{target:"zoom/rotation"}))},this.onGestureChange=function(t){t.preventDefault(),i.state.userHasInteracted=!0;var e=t.rotation/40;!i.rotationDetected&&Math.abs(e)>i.state.touchRotationThreshold&&(i.rotationDetected=!0,i.startRotation=i.state.rotation-e),i.rotationDetected&&(i.gestureRotation=e),t.scale>1?i.gestureZoom=t.scale-1:i.gestureZoom=-1/t.scale+1},this.state=t,this.container=e,this.map=n,this.isGestureStart=!1,this.gestureRotation=0,this.gestureZoom=0,this.screenPoint=[0,0],this.startRotation=0,this.startZoom=0,this.container.addEventListener("gesturestart",this.onGestureStart),this.container.addEventListener("gestureend",this.onGestureEnd),this.container.addEventListener("gesturechange",this.onGestureChange)}return t.prototype.destroy=function(){this.container.removeEventListener("gesturestart",this.onGestureStart),this.container.removeEventListener("gestureend",this.onGestureEnd),this.container.removeEventListener("gesturechange",this.onGestureChange)},t.prototype.update=function(){if(0!==this.gestureRotation||0!==this.gestureZoom){var t=this.state,e=this.startZoom+this.gestureZoom,n=this.startRotation+this.gestureRotation,i=S.Ue(),r=t.keepCenterWhileUserZoomRotate?S.Ue():(0,b.Kv)(t,this.screenPoint,{zoom:e,rotation:n});S.IH(i,t.center,r),Bt(t),ft(t,i,{animate:!1}),Pt(t,e,{animate:!1}),t.disableRotationByUserInteraction||yt(t,n,{animate:!1}),this.gestureRotation=0,this.gestureZoom=0}},t}(),Wt=function(t){function e(e){var n=t.call(this)||this;return n.durations=[],n.earlyTimes=[],n.countToCheck=75,n.mayCountMetrics=!1,n.startRenderTime=0,n.catchNextUpdate=!1,n.mapState=e,setTimeout((function(){n.mayCountMetrics=!0}),1e4),n}return(0,j.ZT)(e,t),e.prototype.update=function(){var t=this.mapState,e=t.time,n=t.needRerender;this.mayCountMetrics?(this.catchNextUpdate&&(this.durations.push(e-this.startRenderTime),this.catchNextUpdate=!1),n&&(this.startRenderTime=e,this.catchNextUpdate=!0),this.durations.length>this.countToCheck&&this.check()):this.earlyTimes.push(e)},e.prototype.getEarlyFps=function(){if(!this.mayCountMetrics){for(var t=[],e=1;e<this.earlyTimes.length;e++)t.push(this.earlyTimes[e]-this.earlyTimes[e-1]);return qt(t)}},e.prototype.check=function(){var t=qt(this.durations);this.emit("fps",t),t<g.performanceCheck.fpsCaveat&&(this.mapState.performanceCaveatEmitted=!0,this.emit("performancecaveat")),this.durations=[],this.countToCheck=Math.min(1e3,2*this.countToCheck)},e}(B.c);function qt(t){t.sort((function(t,e){return t-e}));var e=t[Math.floor(3*t.length/4)];return Math.round(1e3/e)}var Xt=n(7097),Yt=function(){function t(){this.differ=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"rotation",type:"number"},{path:"pitch",type:"number"}]),this.debouncedSet=(0,Xt.D)((function(t){rt.BL("stillness",{},t,t.stillness,1,400)}),100,!1),this.stillnessTickerUpdate=rt.Vx.bind(null,"stillness",{step:function(t,e){t.stillness=e}})}return t.prototype.update=function(t){this.differ.check(t)&&(t.stillness=0,rt.sT("stillness",t),this.debouncedSet(t)),this.stillnessTickerUpdate(t)},t}(),Kt=function(){function t(t){var e=this;this.onTouchStart=function(){e.isTouchStartEmitted=!0},this.onMouseOut=function(t){if(e.prevGeo){var n=E(e.container,t.clientX,t.clientY);Y("mouseout",e.prevGeo,t,n,e.modules),e.prevGeo=void 0,e.skipIdentifyEvents=!0,e.modules.defaultSource.resetHoverId(),e.container.classList.remove("mapgl-hover")}},this.onMouseMove=function(t){if(e.isTouchStartEmitted)e.isTouchStartEmitted=!1;else if(e.skipIdentifyEvents=!1,!e.isBlocked){var n=E(e.container,t.clientX,t.clientY);Promise.resolve().then((function(){return e.modules.layout.isActionWithCanvas(t)?e.modules.identifier.search("mouseMove",n):void 0})).then((function(i){if(!e.skipIdentifyEvents){var r=i&&e.prevGeo&&(!(0,V.v7)(i.id,e.prevGeo.id)||i.instanceId!==e.prevGeo.instanceId||i.dynamicObjectId!==e.prevGeo.dynamicObjectId||i.symbol!==e.prevGeo.symbol);!e.prevGeo||i&&!r||(Y("mouseout",e.prevGeo,t,n,e.modules),e.prevGeo=void 0,e.container.classList.remove("mapgl-hover"),e.modules.defaultSource.resetHoverId()),!i||e.prevGeo&&!r||(e.prevGeo=i,e.container.classList.add("mapgl-hover"),Y("mouseover",i,t,n,e.modules),e.modules.defaultSource.setHoverId(i.id)),Y("mousemove",i,t,n,e.modules)}}))}},this.modules=t,this.isTouchStartEmitted=!1,this.skipIdentifyEvents=!1,this.isBlocked=!1,this.prevGeo=void 0,this.container=this.modules.layout.mapContainer,this.container.addEventListener("touchstart",this.onTouchStart),this.container.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("mouseout",this.onMouseOut)}return t.prototype.destroy=function(){this.container.removeEventListener("touchstart",this.onTouchStart),this.container.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("mouseout",this.onMouseOut)},t.prototype.update=function(){},t.prototype.block=function(){this.isBlocked=!0},t.prototype.unblock=function(){this.isBlocked=!1},t}(),Jt=function(t,e,n,i){rt.sT("buildingHeight"+i,t),!1===n.animate||0===n.duration?(e.set(i,n.to),t.needLabeling=!0):rt.BL("buildingHeight"+i,{easing:n.easing},t,n.from,n.to,n.duration)},Qt=function(){function t(t,e){this.state=t,this.modules=e,this.differ=new Zt([{path:"styleZoom",type:"number"}]),this.buildingHeights=new Map,this.minZoomBuildingHeight=1/0}return t.prototype.getBuildingHeight=function(t){return void 0!==t?(this.buildingHeights.has(t)||this.addBuildingHeightZoom(t),this.buildingHeights.get(t)||0):this.getDefaultBuildingHeight()},t.prototype.update=function(){var t=this;this.buildingHeights.forEach((function(e,n){t.updateByZoom(n,e),t.isAnimating()&&function(t,e,n){rt.Vx.call(null,"buildingHeight"+n,{step:function(t,i){return e.set(n,i)},complete:function(t){return t.needLabeling=!0}},t)}(t.state,t.buildingHeights,n)}))},t.prototype.isAnimating=function(){var t=this;return Array.from(this.buildingHeights.keys()).some((function(e){return void 0!==rt.U2("buildingHeight"+e,t.state)}))},t.prototype.clearBuildingHeights=function(){this.buildingHeights.clear(),this.minZoomBuildingHeight=1/0},t.prototype.getDefaultBuildingHeight=function(){var t=this.minZoomBuildingHeight!==1/0?this.minZoomBuildingHeight:16;return this.state.styleZoom<t?0:1},t.prototype.updateByZoom=function(t,e){var n=this.state,i=rt.U2("zoom",n),r=rt.U2("buildingHeight"+t,n),o=void 0!==r?r.to:e,a=void 0!==i?i.attributes.blockBuildingAnimation:this.differ.check(n);n.styleZoom>=t&&this.modules.tileManager.viewportTilesReady()&&1!==o&&!a?Jt(n,this.buildingHeights,{animate:!0,easing:g.buildingAnimation.easing,from:e,to:1,duration:g.buildingAnimation.duration*(1-e)},t):n.styleZoom<t&&0!==o&&Jt(n,this.buildingHeights,{animate:!1,to:0},t)},t.prototype.addBuildingHeightZoom=function(t){var e=t<this.state.styleZoom?0:1;this.buildingHeights.set(t,e),this.minZoomBuildingHeight>t&&(this.minZoomBuildingHeight=t)},t}(),$t=n(834),te=function(){function t(){this._objects=[],this.type=0}return t.prototype.render=function(){return this._objects=[],this},t.prototype.addObject=function(t){return this._objects.push(t),this},t.prototype.hasObjects=function(){return this._objects.length>0},t}(),ee=function(t){function e(){var e=t.call(this)||this;return e.type=17,e}return(0,j.ZT)(e,t),e.prototype.render=function(t){return this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e}(te),ne=function(){function t(t){if((t=t||{}).canvas){this._canvasElement="string"==typeof t.canvas?document.getElementById(t.canvas):t.canvas;var e={antialias:void 0===t.antialias||t.antialias,stencil:void 0!==t.stencil&&t.stencil,failIfMajorPerformanceCaveat:void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat,preserveDrawingBuffer:void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer};this._gl=2===t.version?this._canvasElement.getContext("webgl2",e):this._canvasElement.getContext("webgl",e)||this._canvasElement.getContext("experimental-webgl",e)}else this._gl=t.gl;this._pixelRatio=t.pixelRatio||1,this.autoClear=void 0===t.autoClear||t.autoClear,this.clearColor=t.clearColor||[1,1,1,1],this.sortObjects=!0,this._plugins=[],this._pluginsByType={},this._maxPluginOrder=0,this.addPlugin(new ee,0),this.webGlExtensions={}}return t.prototype.addPlugin=function(t,e){return void 0===e&&(e=this._maxPluginOrder+1),this._plugins.push({plugin:t,order:e}),this._plugins.sort((function(t,e){return t.order-e.order})),this._pluginsByType[t.type]=t,this._maxPluginOrder=Math.max.apply(Math,this._plugins.map((function(t){return t.order}))),this},t.prototype.removePlugin=function(t){var e=this;return this._plugins.some((function(n,i){return n.plugin instanceof t&&(delete e._pluginsByType[e._plugins[i].plugin.type],e._plugins.splice(i,1),!0)})),this},t.prototype.setPixelRatio=function(t){return this._pixelRatio=t,this},t.prototype.getPixelRatio=function(){return this._pixelRatio},t.prototype.setSize=function(t,e){return this._size=[t*this._pixelRatio,e*this._pixelRatio],this._canvasElement&&(this._canvasElement.width=this._size[0],this._canvasElement.height=this._size[1],this._canvasElement.style.width=t+"px",this._canvasElement.style.height=e+"px"),this.setViewport(),this},t.prototype.setViewport=function(t,e){return void 0!==t&&void 0!==e?this._gl.viewport(0,0,t,e):this._gl.viewport(0,0,this._size[0],this._size[1]),this},t.prototype.getSize=function(){return this._size},t.prototype.setRenderTarget=function(t){return this._renderTarget=t,this},t.prototype.readPixels=function(t,e,n,i,r){var o=this._gl;return this._renderTarget?(this._renderTarget.bind(o),o.readPixels(t,e,n,i,o.RGBA,o.UNSIGNED_BYTE,r),this._renderTarget.unbind(o)):o.readPixels(t,e,n,i,o.RGBA,o.UNSIGNED_BYTE,r),this},t.prototype.clear=function(){var t=this._gl;return t.clearColor.apply(t,this.clearColor),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this},t.prototype.render=function(t,e,n){var i=this._gl;t.typifyForRender(this._pluginsByType),this._renderTarget&&this._renderTarget.bind(i),i.clearDepth(1),i.clearStencil(0),this.autoClear&&this.clear(),e.updateLocalMatrix(),e.updateWorldMatrix();for(var r={renderer:this,extensions:this.webGlExtensions,scene:t,camera:e,gl:i,userData:n},o=this._plugins.map((function(t){return t.plugin})).filter((function(t){return t.hasObjects()})),a=0;a<o.length;a++)o[a].render(r,o[a-1],o[a+1]);return this._renderTarget&&this._renderTarget.unbind(i),this},t.prototype.addExtension=function(t){return this.webGlExtensions[t]=this._gl.getExtension(t),this},t}(),ie=ne,re=function(){function t(e,n){void 0===n&&(n={}),this._src=e||null,this.options=Object.assign({},t.defaultOptions,n),this._glContext=null}return t.prototype.enable=function(t,e){var n=void 0!==e?e:this.options.unit;return void 0!==n&&t.activeTexture(t.TEXTURE0+n),this._texture||this.prepare(t),t.bindTexture(t.TEXTURE_2D,this._texture),this},t.prototype.remove=function(){return this._texture&&(this._glContext.deleteTexture(this._texture),this._glContext=null,this._texture=null),this},t.prototype.getTexture=function(){return this._texture},t.prototype.subImage=function(t,e,n,i){return t.bindTexture(t.TEXTURE_2D,this._texture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,this.options.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.options.premultiplyAlpha),t.texSubImage2D(t.TEXTURE_2D,0,n,i,this._toGlParam(t,this.options.format),this._toGlParam(t,this.options.type),e),this},t.prototype.prepare=function(e){return this._glContext=e,this._texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this._texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,this.options.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.options.premultiplyAlpha),this.options.size?e.texImage2D(e.TEXTURE_2D,0,this._toGlParam(e,this.options.format),this.options.size[0],this.options.size[1],0,this._toGlParam(e,this.options.format),this._toGlParam(e,this.options.type),this._src):e.texImage2D(e.TEXTURE_2D,0,this._toGlParam(e,this.options.format),this._toGlParam(e,this.options.format),this._toGlParam(e,this.options.type),this._src),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,this._toGlParam(e,this.options.wrapS)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,this._toGlParam(e,this.options.wrapT)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,this._toGlParam(e,this.options.magFilter)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,this._toGlParam(e,this.options.minFilter)),this.options.generateMipmaps&&this.options.minFilter!==t.NearestFilter&&this.options.minFilter!==t.LinearFilter&&e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null),this},t.prototype._toGlParam=function(e,n){return n===t.ClampToEdgeWrapping?e.CLAMP_TO_EDGE:n===t.Repeat?e.REPEAT:n===t.MirroredRepeat?e.MIRRORED_REPEAT:n===t.NearestFilter?e.NEAREST:n===t.NearestMipMapNearestFilter?e.NEAREST_MIPMAP_NEAREST:n===t.NearestMipMapLinearFilter?e.NEAREST_MIPMAP_LINEAR:n===t.LinearFilter?e.LINEAR:n===t.LinearMipMapNearestFilter?e.LINEAR_MIPMAP_NEAREST:n===t.LinearMipMapLinearFilter?e.LINEAR_MIPMAP_LINEAR:n===t.RgbaFormat?e.RGBA:n===t.AlphaFormat?e.ALPHA:n===t.RgbFormat?e.RGB:n===t.UnsignedByte?e.UNSIGNED_BYTE:n===t.Float?e.FLOAT:null},t}();re.ClampToEdgeWrapping=8,re.Repeat=9,re.MirroredRepeat=10,re.NearestFilter=1,re.NearestMipMapNearestFilter=2,re.NearestMipMapLinearFilter=3,re.LinearFilter=4,re.LinearMipMapNearestFilter=5,re.LinearMipMapLinearFilter=6,re.RgbaFormat=11,re.AlphaFormat=12,re.RgbFormat=13,re.UnsignedByte=14,re.Float=15,re.defaultOptions={magFilter:re.LinearFilter,minFilter:re.LinearMipMapLinearFilter,wrapS:re.ClampToEdgeWrapping,wrapT:re.ClampToEdgeWrapping,format:re.RgbaFormat,generateMipmaps:!0,flipY:!0,premultiplyAlpha:!0,type:re.UnsignedByte};var oe=re,ae=function(){function t(e){void 0===e&&(e={}),this.options=Object.assign({},t.defaultOptions,e),this._texture=new oe(null,this.options),this._glContext=null}return t.prototype.bind=function(t){return this._frameBuffer||this._prepare(t),t.bindFramebuffer(t.FRAMEBUFFER,this._frameBuffer),this},t.prototype.unbind=function(t){return t.bindFramebuffer(t.FRAMEBUFFER,null),this},t.prototype.remove=function(){return this._unprepare(),this},t.prototype.setSize=function(t){return this.options.size=t,this._unprepare(),this},t.prototype.getTexture=function(){return this._texture},t.prototype._prepare=function(t){this._glContext=t,this._texture||(this._texture=new oe(null,this.options)),this._texture.prepare(t),this._frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this._frameBuffer),this._renderBuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this._renderBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,this.options.size[0],this.options.size[1]),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this._texture.getTexture(),0),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,this._renderBuffer),this._checkComplete(t),t.bindRenderbuffer(t.RENDERBUFFER,null),t.bindFramebuffer(t.FRAMEBUFFER,null)},t.prototype._unprepare=function(){this._texture&&(this._texture.remove(this._glContext),this._texture=null),this._frameBuffer&&(this._glContext.deleteFramebuffer(this._frameBuffer),this._glContext.deleteRenderbuffer(this._renderBuffer),this._frameBuffer=null,this._renderBuffer=null)},t.prototype._checkComplete=function(t){var e=t.checkFramebufferStatus(t.FRAMEBUFFER);e!==t.FRAMEBUFFER_COMPLETE&&(e===t.FRAMEBUFFER_UNSUPPORTED?console.log("Framebuffer is unsupported"):e===t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT?console.log("Framebuffer incomplete attachment"):e===t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS?console.log("Framebuffer incomplete dimensions"):e===t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT?console.log("Framebuffer incomplete missing attachment"):console.log("Unexpected framebuffer status: "+e))},t}();ae.defaultOptions=Object.assign({},oe.defaultOptions,{size:[0,0],generateMipmaps:!1});var se=ae,le=n(242),ce=(g.floors.wallMinBrightness,g.floors.wallMaxBrightness,g.fences.lightIntensity),ue=[ce,ce,ce],de=[.05,.05,.05],he=[1,0,0],fe=[1,1,1],pe=function(){},me=function(t,e,n){var i=n.size,r=window.devicePixelRatio;e.bind(t,{u_vec2_vpt_size:[i[0]*r,i[1]*r]})},ve=function(t,e,n){var i=(0,w.EO)(n.zoom);e.bind(t,{u_vec3_projection_scale_style_scale_dpi:[i,i,le.$U*window.devicePixelRatio]})},_e=function(t,e,n){var i=(0,w.EO)(n.styleZoom);e.bind(t,{u_vec3_projection_scale_style_scale_dpi:[i,i,le.$U*window.devicePixelRatio]})},ye=function(t,e,n,i){e.bind(t,{u_float_height_factor:i.buildingHeightAnimator.getDefaultBuildingHeight()})},ge=function(t,e,n){e.bind(t,{u_float_height_limitation:(0,w.r9)(n.zoom,n.size)*Math.cos(n.pitch)*.75,u_float_tile_height:le._9})},be=function(t,e){e.bind(t,{u_float_height_limitation:le._9,u_float_tile_height:le._9})},we=function(t,e){e.bind(t,{u_vec3_light_color:de,u_vec3_light_direction:he,u_vec3_ambient_color:fe})},xe=function(t,e){e.bind(t,{u_vec3_light_color:ue,u_vec3_light_direction:he,u_vec3_ambient_color:fe})},Se=function(t,e,n){e.bind(t,{u_float_rounding_factor:n.stillness})},Ie=function(t,e){e.bind(t,{u_float_border_width_offset:1/window.devicePixelRatio})},Me=function(t,e){e.bind(t,{u_float_z_offset:0})},Pe=function(t,e){e.bind(t,{u_float_z_offset:-1e-5})},Te=function(t,e){e.bind(t,{u_sr2d_texture:0})},Le=function(t,e){e.bind(t,{u_vec2_scale_limits:[0,le.Cd]})},Ee=function(t,e){e.bind(t,{u_vec4_border_color:[0,0,0,0]})},ke=function(t,e){e.bind(t,{u_vec4_space_color:[0,0,0,0]})},ze=function(t,e,n,i){i.assetManager.textures.forEach((function(e){return e.enable(t)}))};function Ce(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e,n,i,r){t.forEach((function(t){return t(e,n,i,r)}))}}var Ae=n(1245),De=n(7244),Fe=n(5850),Re=n(8550),Oe=n(127),je=n(5424),Be=n(558),Ue=n(7322),Ze=function(){function t(t,e){void 0===e&&(e={}),this._buffer=t,this.options=Object.assign({},Ue.Z.defaultOptions,e)}return t.prototype.bind=function(t,e){this._buffer.bind(t,e,this.options)},t}(),Ne=Ze,He=function(){function t(t,e){void 0===e&&(e={}),this._vao=null,this._attributes=e,this._shaderProgram=t,this._ext=null}return t.prototype.bind=function(t){var e=t.extensions.OES_vertex_array_object;return e?this._bind(t.gl,e):this._shaderProgram.bind(t.gl,null,this._attributes),this},t.prototype.unbind=function(){return this._ext&&this._ext.bindVertexArrayOES(null),this},t.prototype.remove=function(){return this._vao&&this._ext.deleteVertexArrayOES(this._vao),this},t.prototype._bind=function(t,e){this._vao?e.bindVertexArrayOES(this._vao):this._prepare(t,e)},t.prototype._prepare=function(t,e){this._ext=e,this._vao=e.createVertexArrayOES(),e.bindVertexArrayOES(this._vao);var n=this._shaderProgram.attributes,i=this._attributes;for(var r in i){var o=n[r];!0!==o.index&&t.enableVertexAttribArray(o.location),i[r].bind(t,o.location)}},t}(),Ge=n(2089),Ve=n(2004),We=n(5855),qe=n(1524),Xe=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:8,offset:0,normalized:!0});return new He(e,{a_vec2_vertex:n})},Ye=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:8,offset:0,normalized:!0}),i=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:8,offset:4,normalized:!0});return new He(e,{a_vec2_vertex:n,a_vec4_identifier:i})},Ke=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ne(t,{itemSize:4,dataType:Ue.Z.Byte,stride:12,offset:4,normalized:!1});return new He(e,{a_vec2_vertex:n,a_vec4_normals:i})},Je=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ne(t,{itemSize:4,dataType:Ue.Z.Byte,stride:16,offset:4,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.Float,stride:16,offset:8,normalized:!1});return new He(e,{a_vec2_vertex:n,a_vec4_normals:i,a_vec2_shift:r})},Qe=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ne(t,{itemSize:4,dataType:Ue.Z.Byte,stride:12,offset:4,normalized:!1}),r=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:12,offset:8,normalized:!0});return new He(e,{a_vec2_vertex:n,a_vec4_normals:i,a_vec4_identifier:r})},$e=function(t,e){var n=28,i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:n,offset:4,normalized:!1}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.Byte,stride:n,offset:8,normalized:!1}),a=new Ne(t,{itemSize:1,dataType:Ue.Z.Float,stride:n,offset:12,normalized:!1}),s=new Ne(t,{itemSize:1,dataType:Ue.Z.Float,stride:n,offset:16,normalized:!1}),l=new Ne(t,{itemSize:1,dataType:Ue.Z.Float,stride:n,offset:20,normalized:!1}),c=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:n,offset:24,normalized:!0});return new He(e,{a_vec2_vertex:i,a_vec2_texture_widen:o,a_vec2_widen:r,a_float_vertex_distance:a,a_float_component_distance:s,a_float_object_length:l,a_vec4_identifier:c})},tn=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:20,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:20,offset:12,normalized:!1});return new He(e,{a_vec4_position:n,a_vec2_offset:i,a_vec2_texcoord:r})},en=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:20,offset:8,normalized:!1}),r=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:20,offset:16,normalized:!0});return new He(e,{a_vec4_position:n,a_vec2_offset:i,a_vec4_identifier:r})},nn=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:28,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:28,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.Float,stride:28,offset:12,normalized:!1}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.Float,stride:28,offset:20,normalized:!1});return new He(e,{a_vec4_position:n,a_vec2_offset:r,a_vec2_texcoord:i,a_vec2_style_zoom_limits:o})},rn=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new Ne(t,{itemSize:3,dataType:Ue.Z.Byte,stride:20,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:20,offset:16,normalized:!0});return new He(e,{a_vec3_vertex:n,a_vec3_normal:i,a_vec2_dem_position:r})},on=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:20,offset:12,normalized:!0}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:20,offset:16,normalized:!0});return new He(e,{a_vec3_vertex:n,a_vec4_identifier:i,a_vec2_dem_position:r})},an=function(t,e){var n=20,i=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ne(t,{itemSize:1,dataType:Ue.Z.Short,stride:n,offset:6,normalized:!0}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.Byte,stride:n,offset:8,normalized:!1}),a=new Ne(t,{itemSize:2,dataType:Ue.Z.Byte,stride:n,offset:10,normalized:!1}),s=new Ne(t,{itemSize:3,dataType:Ue.Z.Byte,stride:n,offset:12,normalized:!1}),l=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:16,normalized:!0});return new He(e,{a_vec4_vertex:i,a_vec2_normal:o,a_vec2_normal_delta:a,a_vec3_direction:s,a_float_distance:r,a_vec2_dem_position:l})},sn=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:24,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:24,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:24,offset:12,normalized:!1}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:24,offset:16,normalized:!1});return new He(e,{a_vec3_position:n,a_vec2_offset:i,a_vec2_texcoord:r,a_vec2_range:o})},ln=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:24,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:24,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:24,offset:12,normalized:!1}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:24,offset:16,normalized:!1}),a=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:24,offset:20,normalized:!0});return new He(e,{a_vec3_position:n,a_vec2_offset:i,a_vec2_texcoord:r,a_vec2_range:o,a_vec4_identifier:a})},cn=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:16,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:16,offset:12,normalized:!1});return new He(e,{a_vec2_position:n,a_vec2_direction:i,a_vec2_widen_direction:r})},un=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:20,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:20,offset:16,normalized:!0});return new He(e,{a_vec3_vertex:n,a_vec2_texcoord:i,a_vec2_dem_position:r})},dn=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:8,offset:0,normalized:!0}),i=new Ne(t,{itemSize:4,dataType:Ue.Z.Byte,stride:8,offset:4,normalized:!1});return new He(e,{a_vec3_vertex:n,a_vec4_direction_distance:i})},hn=function(t,e){var n=new Ne(t,{itemSize:3,dataType:Ue.Z.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ne(t,{itemSize:4,dataType:Ue.Z.Byte,stride:16,offset:8,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:16,offset:12,normalized:!0});return new He(e,{a_vec3_vertex:n,a_vec4_direction_distance:i,a_vec2_dem_position:r})},fn=function(t,e){var n=36,i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:4,normalized:!0}),o=new Ne(t,{itemSize:4,dataType:Ue.Z.Byte,stride:n,offset:8,normalized:!1}),a=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:n,offset:12,normalized:!1}),s=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:n,offset:16,normalized:!1}),l=new Ne(t,{itemSize:1,dataType:Ue.Z.Float,stride:n,offset:20,normalized:!1}),c=new Ne(t,{itemSize:1,dataType:Ue.Z.Float,stride:n,offset:24,normalized:!1}),u=new Ne(t,{itemSize:1,dataType:Ue.Z.Float,stride:n,offset:28,normalized:!1}),d=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:n,offset:32,normalized:!0});return new He(e,{a_vec2_vertex:i,a_vec2_segment_end:r,a_vec4_texture_widen_arrow_widen:o,a_vec2_widen:a,a_vec2_direction:s,a_float_distance_from_start:l,a_float_object_length:c,a_float_type:u,a_vec4_identifier:d})},pn=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:12,offset:4,normalized:!1});return new He(e,{a_vec4_vertex:n,a_vec2_widen:i})},mn=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:12,offset:4,normalized:!1}),r=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:12,offset:8,normalized:!0});return new He(e,{a_vec4_vertex:n,a_vec2_widen:i,a_vec4_identifier:r})},vn=function(t,e){var n=Ge.z.sinks.fill.stride,i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:n,offset:4,normalized:!1}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:8,normalized:!1});return new He(e,{a_vec2_position:i,a_vec2_offset:r,a_vec2_texcoord:o})},_n=function(t,e){var n=Ge.z.sinks.fill.stride,i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!1}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.Short,stride:n,offset:4,normalized:!1}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:8,normalized:!1}),a=new Ne(t,{itemSize:4,dataType:Ue.Z.UnsignedByte,stride:n,offset:12,normalized:!0});return new He(e,{a_vec2_position:i,a_vec2_offset:r,a_vec2_texcoord:o,a_vec4_identifier:a})},yn=function(t,e){var n=Ve.h.sinks.fill.stride,i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:4,normalized:!1});return new He(e,{a_vec2_vertex:i,a_vec2_texcoord:r})},gn=function(t,e){var n=We.B.sinks.framebuffer.stride,i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ne(t,{itemSize:1,dataType:Ue.Z.Float,stride:n,offset:4,normalized:!1}),o=new Ne(t,{itemSize:2,dataType:Ue.Z.Byte,stride:n,offset:8,normalized:!1});return new He(e,{a_vec2_position:i,a_vec2_widen:o,a_float_weight:r})},bn=function(t,e){var n=new Ne(t,{itemSize:2,dataType:Ue.Z.Float,stride:0,offset:0,normalized:!1});return new He(e,{a_vec2_position:n})},wn=function(t,e){return new He(e,{a_vec2_position:t})},xn=function(t,e){var n=qe._.sinks.elevation.stride,i=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ne(t,{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:n,offset:4,normalized:!1});return new He(e,{a_vec2_vertex:i,a_vec2_texcoord:r})},Sn=n(6384),In=n(9460),Mn=function(){function t(t,e){this.destroyed=!1,this.modules=t.modules,this.program=this.modules.renderer.getShaderProgram("demMesh"),this.tiles=new Map,this.edgesCount=void 0!==e.tileSize?Math.pow(2,Math.trunc(Math.log2(e.tileSize))):64;for(var n=[],i=0;i<this.edgesCount;i++)for(var r=0;r<this.edgesCount;r++)n.push(i,r,i+1,r,i,r+1),n.push(i,r+1,i+1,r,i+1,r+1);for(var o=le.Bq/this.edgesCount,a=0;a<n.length;a++)n[a]*=o;this.buffer=new Ue.Z(new Uint16Array(n),{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:0,offset:0,normalized:!0}),this.buffer.drawType=Ue.Z.StaticDraw,this.vao=wn(this.buffer,this.program)}return t.prototype.updateStyleId=function(){var t=this;this.tiles.forEach((function(e){e.children.forEach((function(e){e.attributes.styleId=t.modules.map.state.handyStyleId})),e.identifyChildren.forEach((function(e){e.attributes.styleId=t.modules.map.state.handyStyleId}))}))},t.prototype.updateView=function(){var t=this;if(!this.destroyed){var e=this.modules.map.state,n=Math.trunc(e.styleZoom),i=(0,Q.aq)(n)/this.edgesCount/2,r=(0,Q.b5)(this.modules.map.state.tilesBounds,n,n).reduce((function(t,e){return t.set((0,Q.gx)(e),e),t}),new Map);this.tiles.forEach((function(e,n){r.has(n)||(t.modules.tileManager.removeObject(e),t.tiles.delete(n))})),r.forEach((function(n,r){var o;if(!t.tiles.has(r)){var a=new G.W("raster",[],t.modules.renderer,n);a.modelMatrix[12]+=i,a.modelMatrix[13]+=i,null===(o=t.modules.renderer.symbolSettingsList.dem.mesh)||void 0===o||o.forEach((function(n){var i={type:Sn.H.Tile,symbol:"dem",sink:"mesh",tile:a,attributes:{layerId:In.h,styleId:e.handyStyleId,tileData:[]},stride:4,rangeStart:0,rangeEnd:t.buffer.byteLength,attributesHash:"",layerSettings:n,vao:t.vao};!0===n.identify?a.identifyChildren.push(i):a.children.push(i)})),t.modules.tileManager.addObject(a),t.tiles.set(r,a)}}))}},t.prototype.destroy=function(){var t=this;this.destroyed||(this.tiles.forEach((function(e){t.modules.tileManager.removeObject(e)})),this.tiles.clear(),this.vao.unbind(),this.vao.remove(),this.buffer.remove(),this.destroyed=!0)},t}(),Pn=n(3287);function Tn(){var t=new Pn.WT(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ln(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function En(){var t=new Pn.WT(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function kn(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t}Ae.d9,Ae.al,Ae.JG,Ae.t8,Ae.IH,Ae.bA,Ae.AK,Ae.t7,Ae.kE,Ae.we,Ae.Fv,Ae.I6,Ae.fS,S.Ue(),S.al(1,0,0),S.al(0,1,0),En(),En(),Tn();var zn=function(){function t(){this.children=[],this.parent=null,this.visible=!0,this.scale=S.al(1,1,1),this.position=S.Ue(),this.quaternion=En(),this.localMatrix=Oe.Ue(),this.worldMatrix=Oe.Ue(),this.worldMatrixNeedsUpdate=!1,this.type=12}return t.prototype.add=function(t){return t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),this},t.prototype.remove=function(t){var e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1)),this},t.prototype.render=function(){return this.visible?(this.worldMatrixNeedsUpdate&&this.updateWorldMatrix(),this):this},t.prototype.updateLocalMatrix=function(){return Oe.Iw(this.localMatrix,this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0,this},t.prototype.updateWorldMatrix=function(){return this.parent?Oe.dC(this.worldMatrix,this.parent.worldMatrix,this.localMatrix):Oe.JG(this.worldMatrix,this.localMatrix),this.children.forEach((function(t){return t.updateWorldMatrix()})),this.worldMatrixNeedsUpdate=!1,this},t.prototype.getWorldPosition=function(){return S.al(this.worldMatrix[12],this.worldMatrix[13],this.worldMatrix[14])},t.prototype.traverse=function(t){return t(this),this.children.forEach((function(e){return e.traverse(t)})),this},t.prototype.traverseVisible=function(t){return this.visible?(t(this),this.children.forEach((function(e){return e.traverseVisible(t)})),this):this},t.prototype.typifyForRender=function(t){return this.visible?(t[17].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this},t}(),Cn=function(t){function e(e){var n=t.call(this)||this;return n.color=e,n}return(0,j.ZT)(e,t),e}(zn),An=Cn;!function(t){function e(e){var n=t.call(this,e)||this;return n.type=3,n}(0,j.ZT)(e,t)}(An);var Dn={texture:"USE_TEXTURE",directionLights:"DIR_LIGHT_NUM"},Fn=function(){function t(t){this.name=t.name,this.index=t.index,this.location=void 0!==t.location?t.location:-1,this._enable=!1}return t.prototype.bindLocation=function(t,e){return-1!==this.location&&!0!==this.index&&t.bindAttribLocation(e,this.location,this.name),this},t.prototype.getLocation=function(t,e){return-1===this.location&&!0!==this.index&&(this.location=t.getAttribLocation(e,this.name)),this},t.prototype.bind=function(t,e){return this._enable||!0===this.index||(t.enableVertexAttribArray(this.location),this._enable=!0),e.bind(t,this.location),this},t.prototype.disable=function(t){return this._enable&&!0!==this.index&&(t.disableVertexAttribArray(this.location),this._enable=!1),this},t}(),Rn=Fn,On=function(){function t(t){this.name=t.name,this.type=t.type,this.location=-1}return t.prototype.getLocation=function(t,e){return this.location=t.getUniformLocation(e,this.name),this},t.prototype.bind=function(t,e){var n=this.type;return"mat2"===n?t.uniformMatrix2fv(this.location,!1,e):"mat3"===n?t.uniformMatrix3fv(this.location,!1,e):"mat4"===n?t.uniformMatrix4fv(this.location,!1,e):"2f"===n?t.uniform2f(this.location,e[0],e[1]):"3f"===n?t.uniform3f(this.location,e[0],e[1],e[2]):"4f"===n?t.uniform4f(this.location,e[0],e[1],e[2],e[3]):"2i"===n?t.uniform2i(this.location,e[0],e[1]):"3i"===n?t.uniform3i(this.location,e[0],e[1],e[2]):"4i"===n?t.uniform4i(this.location,e[0],e[1],e[2],e[3]):t["uniform"+n](this.location,e),this},t}(),jn=On,Bn=function(){function t(t){var e=this;t=t||{},this._vertexShader=t.vertex,this._fragmentShader=t.fragment,this.uniforms={},t.uniforms=t.uniforms||[],t.uniforms.forEach((function(t){e.uniforms[t.name]=new jn(t)})),this.attributes={},t.attributes=t.attributes||[],t.attributes.forEach((function(t){e.attributes[t.name]=new Rn(t)})),this._linked=!1,this._located=!1,this._error=!1}return t.prototype.enable=function(t){return this._error||(this.link(t),this.locate(t),this._error||t.useProgram(this._webglProgram)),this},t.prototype.bind=function(t,e,n){if(this._error)return this;if(e)for(var i in e)this.uniforms[i].bind(t,e[i]);if(n)for(var i in n)this.attributes[i].bind(t,n[i]);return this},t.prototype.disable=function(t){if(this._error)return this;for(var e in this.attributes)this.attributes[e].disable(t);return this},t.prototype.link=function(t){if(this._linked||this._error)return this;try{for(var e in this._webglProgram=t.createProgram(),this._vertexShader&&t.attachShader(this._webglProgram,this._vertexShader.get(t)),this._fragmentShader&&t.attachShader(this._webglProgram,this._fragmentShader.get(t)),this.attributes)this.attributes[e].bindLocation(t,this._webglProgram);if(t.linkProgram(this._webglProgram),!t.getProgramParameter(this._webglProgram,t.LINK_STATUS))throw new Error(t.getProgramInfoLog(this._webglProgram));this._linked=!0}catch(t){throw this._error=!0,t}return this},t.prototype.locate=function(t){if(this._located||this._error)return this;for(var e in this.attributes)this.attributes[e].getLocation(t,this._webglProgram);for(var e in this.uniforms)this.uniforms[e].getLocation(t,this._webglProgram);return this._located=!0,this},t}(),Un=Bn,Zn=function(){function t(e,n,i){void 0===i&&(i=[]),this.type="vertex"===e?t.Vertex:t.Fragment,this._code=Array.isArray(n)?n.join("\n"):n||"",this._code=i.map((function(t){return void 0!==t.value?"#define "+t.type+" "+t.value:"#define "+t.type})).join("\n")+"\n"+this._code}return t.prototype.get=function(t){return this._shader||this._compile(t),this._shader},t.prototype.remove=function(t){this._shader&&t.deleteShader(this._shader)},t.prototype._compile=function(e){var n=this.type===t.Vertex?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=this._shader=e.createShader(n);if(!i||e.isContextLost())throw new Error("[2gl] Failed to create shader. Shader is null: "+!i+". Context is lost: "+e.isContextLost());if(e.shaderSource(i,this._code),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(i))},t}();Zn.Vertex=1,Zn.Fragment=2;var Nn=Zn,Hn={},Gn=function(){function t(){this._attributes=[],this._uniforms=[{name:"uColorAlpha",type:"1f"}],this._definitions=[],this._shader=null,this.opacity=1}return t.prototype.enable=function(t){return this._shaderProgram||this._prepare(t),this._shaderProgram.enable(t.gl),this._shaderProgramBind(t),this},t.prototype.disable=function(t){return this._shaderProgram&&this._shaderProgram.disable(t),this},t.prototype.define=function(t,e){return Dn[t]&&this._definitions.push({type:Dn[t],value:e}),this},t.prototype.typifyForRender=function(t,e){1===this.opacity?t[13].addObject(e):t[14].addObject(e)},t.prototype._getCachedProgramKey=function(){var t=this.constructor.name;return this._definitions.forEach((function(e){t+=":"+e.type+":"+(e.value||"")})),t},t.prototype._getCachedProgram=function(){return Hn[this._getCachedProgramKey()]},t.prototype._prepare=function(t){var e=this._getCachedProgram();e&&t===e.glContext?this._shaderProgram=e.program:(this._shaderProgram=new Un({vertex:new Nn("vertex",this._shader.vertex,this._definitions),fragment:new Nn("fragment",this._shader.fragment,this._definitions),uniforms:this._uniforms,attributes:this._attributes}),Hn[this._getCachedProgramKey()]={glContext:t,program:this._shaderProgram})},t.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.object,i={};this._attributes.forEach((function(t){i[t.name]=n.geometry.getBuffer(t.name)}));var r={uColorAlpha:this.opacity};this._shaderProgram.bind(e,r,i)},t}(),Vn={fragment:"\nprecision mediump float;\n\nuniform float uColorAlpha;\nvarying vec3 vColor;\n\nvoid main(void) {\n    gl_FragColor = vec4(vColor.rgb, uColorAlpha);\n}\n",vertex:"\nattribute vec3 position;\n\nuniform mat4 uPosition;\nuniform mat4 uCamera;\nuniform vec3 uColor;\nuniform vec3 uEmissive;\n\nvarying vec3 vColor;\n\nvoid main(void) {\n    vColor = uColor;\n\n    gl_Position = uCamera * uPosition * vec4(position, 1.0);\n}\n"};!function(t){function e(){var e=t.call(this)||this;return e._attributes=[{name:"position"}],e._uniforms=[{name:"uColorAlpha",type:"1f"},{name:"uCamera",type:"mat4"},{name:"uPosition",type:"mat4"},{name:"uColor",type:"3fv"}],e._shader=Vn,e.color=[0,0,0],e.type=5,e}(0,j.ZT)(e,t),e.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.object,i=t.camera,r={};this._attributes.forEach((function(t){r[t.name]=n.geometry.getBuffer(t.name)}));var o={uColorAlpha:this.opacity,uPosition:new Float32Array(n.worldMatrix),uCamera:new Float32Array(i.modelViewMatrix),uColor:this.color};this._shaderProgram.bind(e,o,r)}}(Gn);var Wn=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i._array=e,i.length=e.length/i.options.itemSize,i}return(0,j.ZT)(e,t),e.prototype.getArray=function(){return this._array},e.prototype.getElement=function(t){return this._array.subarray(t*this.options.itemSize,(t+1)*this.options.itemSize)},e.prototype.getTriangle=function(t){return t*=3,[this.getElement(t),this.getElement(t+1),this.getElement(t+2)]},e.prototype.concat=function(t){var e=t.getArray(),n=new this._array.constructor(this._array.length+e.length);return n.set(this._array,0),n.set(e,this._array.length),this._array=n,this.length=n.length/this.options.itemSize,this},e}(Ue.Z),qn=Wn,Xn=function(){function t(t,e){this.min=t||S.Ue(),this.max=e||S.Ue()}return t.prototype.containsPoint=function(t){return t[0]>this.min[0]&&t[0]<this.max[0]&&t[1]>this.min[1]&&t[1]<this.max[1]&&t[2]>this.min[2]&&t[2]<this.max[2]},t.prototype.expandByPoint=function(t){return S.VV(this.min,this.min,t),S.Fp(this.max,this.max,t),this},t}(),Yn=Xn;!function(t){function e(){var e=t.call(this)||this;return e.type=13,e}(0,j.ZT)(e,t),e.prototype.render=function(t){var e=t.gl;return e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.frontFace(e.CCW),e.cullFace(e.BACK),e.enable(e.CULL_FACE),e.disable(e.BLEND),t.renderer.sortObjects&&this._objects.sort(this._renderOrderSort),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e.prototype._renderOrderSort=function(t,e){return t.renderOrder-e.renderOrder}}(te);var Kn={fragment:"\nprecision mediump float;\n\n#ifdef USE_TEXTURE\n    uniform sampler2D uTexture;\n    varying vec2 vTextureCoord;\n    varying float vTextureEnable;\n#endif\n\nuniform float uColorAlpha;\nvarying vec3 vLightWeighting;\nvarying vec3 vColor;\nvarying vec3 vEmissive;\n\nvoid main(void) {\n    vec4 color = vec4(vColor.rgb, uColorAlpha);\n\n    #ifdef USE_TEXTURE\n        if (vTextureEnable > 0.5) {\n            vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n            color = vec4(textureColor.rgb * color.rgb, color.a);\n        }\n    #endif\n\n    gl_FragColor = vec4(color.rgb * vLightWeighting + vEmissive, color.a);\n}\n",vertex:"\nattribute vec3 position;\nattribute vec3 color;\nattribute vec3 emissive;\n\n#ifdef USE_TEXTURE\n    attribute vec2 texture;\n    attribute float textureEnable;\n    varying vec2 vTextureCoord;\n    varying float vTextureEnable;\n#endif\n\n#if DIR_LIGHT_NUM > 0\n    attribute vec3 normal;\n    uniform vec3 uDirectionLightColors[DIR_LIGHT_NUM];\n    uniform vec3 uDirectionLightPositions[DIR_LIGHT_NUM];\n    uniform mat3 uNormalMatrix;\n#endif\n\nuniform mat4 uPosition;\nuniform vec3 uAmbientLightColor;\nuniform mat4 uCamera;\n\nvarying vec3 vColor;\nvarying vec3 vEmissive;\nvarying vec3 vLightWeighting;\n\nvoid main(void) {\n    vColor = color;\n    vEmissive = emissive;\n\n    #ifdef USE_TEXTURE\n        vTextureCoord = texture;\n        vTextureEnable = textureEnable;\n    #endif\n\n    vec3 vLightTemp = vec3(0.0);\n\n    #if DIR_LIGHT_NUM > 0\n        vec3 transformedNormal = uNormalMatrix * normal;\n\n        for(int i = 0; i < DIR_LIGHT_NUM; i++) {\n            float dotProduct = dot(transformedNormal, uDirectionLightPositions[i]);\n            vec3 directionalLightWeighting = vec3(max(dotProduct, 0.0));\n            vLightTemp += uDirectionLightColors[i] * directionalLightWeighting;\n        }\n    #endif\n\n    vLightWeighting = uAmbientLightColor + vLightTemp;\n\n    gl_Position = uCamera * uPosition * vec4(position, 1.0);\n}\n"};!function(t){function e(){var e=t.call(this)||this;return e._attributes=[{name:"position"},{name:"color"},{name:"emissive"}],e._uniforms=[{name:"uColorAlpha",type:"1f"},{name:"uCamera",type:"mat4"},{name:"uPosition",type:"mat4"},{name:"uAmbientLightColor",type:"3fv"}],e._shader=Kn,e._texture=null,e.type=6,e}(0,j.ZT)(e,t),e.prototype.setTexture=function(t){return this._texture=t,this},e.prototype.getTexture=function(){return this._texture},e.prototype._prepare=function(e){this._enableLight(e),this._texture&&this._enableTexture(),t.prototype._prepare.call(this,e)},e.prototype._enableLight=function(t){var e=t.scene,n=0;e.getLights().forEach((function(t){4===t.type&&n++})),this.define("directionLights",n),n>0&&(this._attributes.push({name:"normal"}),this._uniforms.push({name:"uDirectionLightColors",type:"3fv"},{name:"uDirectionLightPositions",type:"3fv"},{name:"uNormalMatrix",type:"mat3"}))},e.prototype._enableTexture=function(){this.define("texture"),this._attributes.push({name:"texture"},{name:"textureEnable"}),this._uniforms.push({name:"uTexture",type:"1i"})},e.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.scene,i=t.camera,r=t.object,o={},a={};this._texture&&(this._texture.enable(e,0),o.uTexture=0);var s,l,c,u,d,h,f,p,m,v,_,y,g,b,w,x=n.getLights();if(x.length){var I=[],M=[];if(x.forEach((function(t){if(3===t.type)o.uAmbientLightColor=t.color;else if(4===t.type){I=I.concat(t.color);var e=S.Ue();S.bA(e,t.position,-1),M=M.concat(Array.prototype.slice.call(e))}})),I.length&&M.length){var P=Tn();Ln(P,r.worldMatrix),s=P,c=(l=P)[0],u=l[1],d=l[2],h=l[3],f=l[4],p=l[5],m=l[6],v=l[7],(w=c*(y=(_=l[8])*f-p*v)+u*(g=-_*h+p*m)+d*(b=v*h-f*m))&&(w=1/w,s[0]=y*w,s[1]=(-_*u+d*v)*w,s[2]=(p*u-d*f)*w,s[3]=g*w,s[4]=(_*c-d*m)*w,s[5]=(-p*c+d*h)*w,s[6]=b*w,s[7]=(-v*c+u*m)*w,s[8]=(f*c-u*h)*w),function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8]}(P,P),o.uNormalMatrix=new Float32Array(P),a.normal=r.geometry.getBuffer("normal")}o.uDirectionLightColors=new Float32Array(I),o.uDirectionLightPositions=new Float32Array(M)}this._attributes.forEach((function(t){"normal"!==t.name&&(a[t.name]=r.geometry.getBuffer(t.name))})),o.uPosition=new Float32Array(r.worldMatrix),o.uCamera=new Float32Array(i.modelViewMatrix),o.uColorAlpha=this.opacity,this._shaderProgram.bind(e,o,a)}}(Gn),function(t){function e(e){var n=t.call(this,e)||this;return n.type=4,n}(0,j.ZT)(e,t)}(An);var Jn=function(){function t(t,e){this.normal=t||S.Ue(),this.constant=e||0}return t.prototype.distanceToPoint=function(t){return S.AK(this.normal,t)+this.constant},t.prototype.setComponents=function(t,e,n,i){return S.t8(this.normal,t,e,n),this.constant=i,this},t.prototype.normalize=function(){var t=1/S.Zh(this.normal);return S.bA(this.normal,this.normal,t),this.constant*=t,this},t}(),Qn=Jn;!function(){function t(t){this.planes=t,this.planes&&6===this.planes.length||(this.planes=[new Qn,new Qn,new Qn,new Qn,new Qn,new Qn]),this._v1=S.Ue(),this._v2=S.Ue()}t.prototype.setFromMatrix=function(t){var e=this.planes;return e[0].setComponents(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]).normalize(),e[1].setComponents(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]).normalize(),e[2].setComponents(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]).normalize(),e[3].setComponents(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]).normalize(),e[4].setComponents(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14]).normalize(),e[5].setComponents(t[3]+t[2],t[7]+t[6],t[11]+t[10],t[15]+t[14]).normalize(),this},t.prototype.intersectsBox=function(t){for(var e=this._v1,n=this._v2,i=this.planes,r=t.min,o=t.max,a=0;a<6;a++){var s=i[a],l=s.normal;e[0]=l[0]>0?r[0]:o[0],n[0]=l[0]>0?o[0]:r[0],e[1]=l[1]>0?r[1]:o[1],n[1]=l[1]>0?o[1]:r[1],e[2]=l[2]>0?r[2]:o[2],n[2]=l[2]>0?o[2]:r[2];var c=s.distanceToPoint(e),u=s.distanceToPoint(n);if(c<0&&u<0)return!1}return!0}}();var $n=function(){function t(){this.buffers={},this._boundingBox=null}return t.prototype.setBuffer=function(t,e){return this.buffers[t]=e,this},t.prototype.getBuffer=function(t){return this.buffers[t]},t.prototype.computeNormals=function(){var t=this.buffers.position;if(!t)return this;for(var e=new Float32Array(t.length*t.options.itemSize),n=S.Ue(),i=S.Ue(),r=S.Ue(),o=0;o<t.length;o+=3){var a=t.getTriangle(o/3);S.lu(n,a[0],a[1]),S.lu(i,a[2],a[1]),S.kC(r,n,i),S.Fv(r,r),e.set(r,3*o),e.set(r,3*(o+1)),e.set(r,3*(o+2))}return this.setBuffer("normal",new qn(e,{itemSize:3})),this},t.prototype.getBoundingBox=function(){return this._boundingBox||this.computeBoundingBox(),this._boundingBox},t.prototype.computeBoundingBox=function(){var t=this._boundingBox=new Yn,e=this.buffers.position;if(e)for(var n=0;n<e.length;n++)t.expandByPoint(e.getElement(n))},t.prototype.concat=function(t){for(var e in this.buffers)this.buffers[e].concat(t.buffers[e])},t}();!function(t){function e(e,n){var i=t.call(this)||this;return i.geometry=e,i.material=n,i.renderOrder=0,i.type=9,i}(0,j.ZT)(e,t),e.prototype.render=function(t){var e=t.gl;return this.visible?(this.worldMatrixNeedsUpdate&&this.updateWorldMatrix(),t.object=this,this.material.enable(t),e.drawArrays(e.TRIANGLES,0,this.geometry.getBuffer("position").length),this.material.disable(e),this):this},e.prototype.typifyForRender=function(t){return this.visible?(this.material.typifyForRender(t,this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this}}(zn),function(){function t(t,e){this.start=t||S.Ue(),this.end=e||S.Ue()}t.prototype.closestPointToPointParameter=function(t,e){var n=S.Ue(),i=S.Ue();S.lu(n,t,this.start),S.lu(i,this.end,this.start);var r,o,a,s=S.AK(i,i),l=S.AK(i,n)/s;return e&&(a=1,l=(r=l)<(o=0)?o:r>a?a:r),l},t.prototype.closestPointToPoint=function(t,e,n){var i=this.closestPointToPointParameter(t,e),r=n||S.Ue();return r=this.delta(r),S.bA(r,r,i),S.IH(r,r,this.start),r},t.prototype.delta=function(t){var e=t||S.Ue();return S.lu(e,this.end,this.start),e}}(),function(t){function e(e,n){var i=t.call(this)||this;return i.material=n,i.type=11,i._initArrays(e),i._initGeometry(),i}(0,j.ZT)(e,t),e.prototype.setOpacity=function(t,e){var n=this._data.colorAlpha.array,i=6*t;return n[i]=e,n[i+1]=e,n[i+2]=e,n[i+3]=e,n[i+4]=e,n[i+5]=e,this._data.colorAlpha.dirty=!0,this},e.prototype.setPosition=function(t,e){var n=this._data.position.array,i=18*t;return n[i]=e[0],n[i+1]=e[1],n[i+3]=e[0],n[i+4]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+9]=e[0],n[i+10]=e[1],n[i+12]=e[0],n[i+13]=e[1],n[i+15]=e[0],n[i+16]=e[1],this._data.position.dirty=!0,this},e.prototype.setElevation=function(t,e){var n=this._data.position.array,i=18*t;return n[i+2]=e,n[i+5]=e,n[i+8]=e,n[i+11]=e,n[i+14]=e,n[i+17]=e,this._data.position.dirty=!0,this},e.prototype.setSize=function(t,e){var n=this._data.scale.array,i=12*t;return n[i]=e[0],n[i+1]=e[1],n[i+2]=e[0],n[i+3]=e[1],n[i+4]=e[0],n[i+5]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+8]=e[0],n[i+9]=e[1],n[i+10]=e[0],n[i+11]=e[1],this._data.scale.dirty=!0,this},e.prototype.setOffset=function(t,e){var n=this._data.offset.array,i=12*t;return n[i]=e[0],n[i+1]=e[1],n[i+2]=e[0],n[i+3]=e[1],n[i+4]=e[0],n[i+5]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+8]=e[0],n[i+9]=e[1],n[i+10]=e[0],n[i+11]=e[1],this._data.offset.dirty=!0,this},e.prototype.setUV=function(t,e){var n=this._data.texture.array,i=12*t;return n[i]=e[2],n[i+1]=1-e[3],n[i+2]=e[2],n[i+3]=1-e[1],n[i+4]=e[0],n[i+5]=1-e[3],n[i+6]=e[0],n[i+7]=1-e[1],n[i+8]=e[0],n[i+9]=1-e[3],n[i+10]=e[2],n[i+11]=1-e[1],this._data.texture.dirty=!0,this},e.prototype.render=function(t){var e=t.gl,n=t.shaderProgram,i=this._geometry;for(var r in n.bind(e,null,{texture:i.getBuffer("texture"),position:i.getBuffer("position"),colorAlpha:i.getBuffer("colorAlpha"),scale:i.getBuffer("scale"),offset:i.getBuffer("offset"),disposition:i.getBuffer("disposition")}),this._data)this._data[r].dirty&&(this._geometry.getBuffer(r).subData(e,0,this._data[r].array),this._data[r].dirty=!1);return this.material.enable(t),e.drawArrays(e.TRIANGLES,0,this._geometry.getBuffer("disposition").length),this.material.disable(),this},e.prototype.typifyForRender=function(t){return this.visible&&this.material.getTexture()?(t[16].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this},e.prototype._initArrays=function(t){var e=t.length,n=[.5,-.5,0,.5,.5,0,-.5,-.5,0,-.5,.5,0,-.5,-.5,0,.5,.5,0],i=new Float32Array(18*e),r=new Float32Array(12*e),o=new Float32Array(18*e),a=new Float32Array(12*e),s=new Float32Array(12*e),l=new Float32Array(6*e);this._data={disposition:{array:i,dirty:!1},texture:{array:r,dirty:!1},position:{array:o,dirty:!1},scale:{array:a,dirty:!1},offset:{array:s,dirty:!1},colorAlpha:{array:l,dirty:!1}};for(var c=0;c<e;c++){var u=t[c];i.set(n,18*c),this.setUV(c,u.uv||[0,0,1,1]),this.setSize(c,u.size||[0,0]),this.setOffset(c,u.offset||[0,0]),this.setOpacity(c,void 0!==u.opacity?u.opacity:1),this.setPosition(c,u.position),this.setElevation(c,u.elevation||0)}},e.prototype._initGeometry=function(){this._geometry=new $n;var t=new qn(this._data.texture.array,{itemSize:2});t.drawType=qn.DynamicDraw;var e=new qn(this._data.position.array,{itemSize:3});e.drawType=qn.DynamicDraw;var n=new qn(this._data.scale.array,{itemSize:2});n.drawType=qn.DynamicDraw;var i=new qn(this._data.offset.array,{itemSize:2});i.drawType=qn.DynamicDraw;var r=new qn(this._data.colorAlpha.array,{itemSize:1});r.drawType=qn.DynamicDraw;var o=new qn(this._data.disposition.array,{itemSize:3});this._geometry.setBuffer("disposition",o).setBuffer("texture",t).setBuffer("position",e).setBuffer("scale",n).setBuffer("offset",i).setBuffer("colorAlpha",r)}}(zn),function(){function t(){this.smoothing=1,this._texture=null,this.type=8}t.prototype.setTexture=function(t){return this._texture=t,this},t.prototype.getTexture=function(){return this._texture},t.prototype.enable=function(t){var e=t.gl;t.shaderProgram.bind(e,{uSmoothing:this.smoothing}),this._texture&&this._texture.enable(e)},t.prototype.disable=function(){}}(),function(t){function e(){var e=t.call(this)||this;return e._shaderProgram=new Un({vertex:new Nn("vertex","\nattribute vec2 texture;\n\nattribute vec3 position;\n\nattribute vec2 disposition;\nattribute vec2 scale;\nattribute vec2 offset;\nattribute float colorAlpha;\n\nuniform float uSmoothing;\nuniform mat4 uPCamera;\nuniform vec2 uHalfSize;\n\nvarying vec2 vTextureCoord;\nvarying float vColorAlpha;\n\nvoid main() {\n    vTextureCoord = texture;\n    vColorAlpha = colorAlpha;\n\n    vec4 anchor = uPCamera * vec4(position, 1.0);\n    vec2 align = (disposition * scale + offset) / uHalfSize;\n    vec2 pos_2d = anchor.xy + align.xy * anchor.w;\n\n    vec2 round_pos = floor((pos_2d.xy + 1.0) * uHalfSize.xy + 0.5) / uHalfSize.xy - 1.0;\n    vec2 round_delta = round_pos - pos_2d.xy;\n\n    if (vColorAlpha == 0.0) {\n        pos_2d = vec2(-2.0, -2.0);\n    } else {\n        pos_2d.xy = pos_2d.xy + round_delta * uSmoothing;\n    }\n\n    gl_Position = vec4(pos_2d, anchor.z, anchor.w);\n}\n"),fragment:new Nn("fragment","\nprecision mediump float;\n\nuniform sampler2D uTexture;\n\nvarying vec2 vTextureCoord;\nvarying float vColorAlpha;\n\nvoid main(void) {\n    vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n\n    gl_FragColor = textureColor * vColorAlpha;\n}\n"),uniforms:[{name:"uPCamera",type:"mat4"},{name:"uHalfSize",type:"2f"},{name:"uTexture",type:"1i"},{name:"uSmoothing",type:"1f"}],attributes:[{name:"disposition"},{name:"texture"},{name:"position"},{name:"colorAlpha"},{name:"scale"},{name:"offset"}]}),e.type=16,e}(0,j.ZT)(e,t),e.prototype.render=function(t){var e=t.gl,n=t.camera,i=t.renderer.getSize();return t.shaderProgram=this._shaderProgram,e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this._shaderProgram.enable(e).bind(e,{uPCamera:new Float32Array(n.modelViewMatrix),uHalfSize:[i[0]/2,i[1]/2],uTexture:0}),e.activeTexture(e.TEXTURE0),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this._shaderProgram.disable(e),this}}(te);var ti=function(t){function e(){var e=t.call(this)||this;return e.up=S.al(0,1,0),e.projectionMatrix=Oe.Ue(),e.modelViewMatrix=Oe.Ue(),e.worldInverseMatrix=Oe.Ue(),e._mat3=Tn(),e._mat4a=Oe.Ue(),e._mat4b=Oe.Ue(),e}return(0,j.ZT)(e,t),e.prototype.updateProjectionMatrix=function(){},e.prototype.updateWorldMatrix=function(){t.prototype.updateWorldMatrix.call(this),Oe.U_(this.worldInverseMatrix,this.worldMatrix),Oe.Jp(this.modelViewMatrix,this.projectionMatrix,this.worldInverseMatrix)},e.prototype.project=function(t){var e=S.Ue();return S.fF(e,t,this.modelViewMatrix),e},e.prototype.unproject=function(t){var e=this._mat4a,n=this._mat4b,i=S.Ue();return Oe.U_(n,this.projectionMatrix),Oe.dC(e,this.worldMatrix,n),S.fF(i,t,e),i},e.prototype.lookAt=function(t){var e=this._mat4a,n=this._mat3;return Oe.zB(e,this.position,t,this.up),Oe.p4(e,e),Ln(n,e),kn(this.quaternion,n),this},e}(zn),ei=ti;!function(t){function e(e,n,i,r,o,a){var s=t.call(this)||this;return s.left=e,s.right=n,s.top=i,s.bottom=r,s.near=o,s.far=a,s.type=1,s}(0,j.ZT)(e,t),e.prototype.updateProjectionMatrix=function(){Oe.M5(this.projectionMatrix,this.left,this.right,this.bottom,this.top,this.near,this.far)}}(ei),function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.fov=e,o.aspect=n,o.near=i,o.far=r,o.type=2,o}(0,j.ZT)(e,t),e.prototype.updateProjectionMatrix=function(){Oe.G3(this.projectionMatrix,this.fov*Math.PI/180,this.aspect,this.near,this.far)}}(ei),function(t){function e(){var e=t.call(this)||this;return e._lights=[],e}(0,j.ZT)(e,t),e.prototype.addLight=function(t){return this._lights.push(t),this},e.prototype.getLights=function(){return this._lights}}(zn),function(t){function e(e){var n=t.call(this)||this;return n.material=e,n.offset=H.Ue(),n.type=10,n}(0,j.ZT)(e,t),e.prototype.render=function(t){if(!this.visible||!this.material.getTexture())return this;this.worldMatrixNeedsUpdate&&this.updateWorldMatrix();var e=t.gl;return t.object=this,this.material.enable(t),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),this.material.disable(t.gl),this},e.prototype.typifyForRender=function(t){return this.visible?(t[15].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this}}(zn),function(){function t(){this.opacity=1,this.smoothing=0,this._texture=null,this.type=7}t.prototype.setTexture=function(t){return this._texture=t,this},t.prototype.getTexture=function(){return this._texture},t.prototype.enable=function(t){var e=t.gl,n=t.object,i=t.shaderProgram,r=t.renderer.getSize();i.bind(e,{uColorAlpha:this.opacity,uSmoothing:this.smoothing,uHalfSize:[r[0]/2,r[1]/2],uOffset:n.offset,uScale:n.scale,uPosition:[n.worldMatrix[12],n.worldMatrix[13],n.worldMatrix[14]]}),this._texture&&this._texture.enable(e)},t.prototype.disable=function(){}}(),function(t){function e(){var e=t.call(this)||this;return e._geometry=new $n,e._geometry.setBuffer("position",new qn(new Float32Array([-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0]))).setBuffer("texture",new qn(new Float32Array([0,0,1,0,1,1,0,1]),{itemSize:2})).setBuffer("index",new qn(new Uint16Array([1,2,0,3,0,2]),{itemSize:1})),e._geometry.getBuffer("index").type=qn.ElementArrayBuffer,e._shaderProgram=new Un({vertex:new Nn("vertex","\nattribute vec2 position;\nattribute vec2 texture;\n\nuniform vec3 uPosition;\nuniform mat4 uPCamera;\nuniform vec2 uScale;\nuniform vec2 uHalfSize;\nuniform vec2 uOffset;\nuniform float uSmoothing;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void) {\n    vTextureCoord = texture;\n\n    vec2 alignedPosition = position * uScale;\n    alignedPosition += uOffset;\n    alignedPosition /= uHalfSize;\n\n    vec4 ndcPosition = uPCamera * vec4(uPosition, 1.0);\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += alignedPosition.xy;\n\n    vec2 roundedPosition = floor((ndcPosition.xy + 1.0) * uHalfSize.xy + 0.5) / uHalfSize.xy - 1.0;\n    vec2 roundingDelta = roundedPosition - ndcPosition.xy;\n\n    ndcPosition.xy = ndcPosition.xy + roundingDelta * uSmoothing;\n\n    gl_Position = ndcPosition;\n}\n"),fragment:new Nn("fragment","\nprecision mediump float;\n\nuniform float uColorAlpha;\nuniform sampler2D uTexture;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void) {\n    vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n\n    gl_FragColor = textureColor * uColorAlpha;\n}\n"),uniforms:[{name:"uPCamera",type:"mat4"},{name:"uPosition",type:"3f"},{name:"uColorAlpha",type:"1f"},{name:"uScale",type:"2f"},{name:"uTexture",type:"1i"},{name:"uHalfSize",type:"2f"},{name:"uOffset",type:"2f"},{name:"uSmoothing",type:"1f"}],attributes:[{name:"position"},{name:"texture"},{name:"index",index:!0}]}),e.type=15,e}(0,j.ZT)(e,t),e.prototype.render=function(t){var e=t.gl,n=t.camera;return t.shaderProgram=this._shaderProgram,e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this._shaderProgram.enable(e).bind(e,{uPCamera:new Float32Array(n.modelViewMatrix),uTexture:0},{position:this._geometry.getBuffer("position"),texture:this._geometry.getBuffer("texture"),index:this._geometry.getBuffer("index")}),e.activeTexture(e.TEXTURE0),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this._shaderProgram.disable(e),this}}(te);var ni=function(){function t(t,e){this.origin=t||S.Ue(),this.direction=e||S.Ue()}return t.prototype.clone=function(){return new t(S.d9(this.origin),S.d9(this.direction))},t.prototype.at=function(t){var e=S.Ue();return S.od(e,this.origin,this.direction,t),e},t.prototype.intersectBox=function(t){var e,n,i,r,o,a,s=1/this.direction[0],l=1/this.direction[1],c=1/this.direction[2],u=this.origin;return s>=0?(e=(t.min[0]-u[0])*s,n=(t.max[0]-u[0])*s):(e=(t.max[0]-u[0])*s,n=(t.min[0]-u[0])*s),l>=0?(i=(t.min[1]-u[1])*l,r=(t.max[1]-u[1])*l):(i=(t.max[1]-u[1])*l,r=(t.min[1]-u[1])*l),e>r||i>n?null:((i>e||e!=e)&&(e=i),(r<n||n!=n)&&(n=r),c>=0?(o=(t.min[2]-u[2])*c,a=(t.max[2]-u[2])*c):(o=(t.max[2]-u[2])*c,a=(t.min[2]-u[2])*c),e>a||o>n?null:((o>e||e!=e)&&(e=o),(a<n||n!=n)&&(n=a),n<0?null:this.at(e>=0?e:n)))},t.prototype.applyMatrix4=function(t){return S.IH(this.direction,this.direction,this.origin),S.fF(this.direction,this.direction,t),S.fF(this.origin,this.origin,t),S.lu(this.direction,this.direction,this.origin),S.Fv(this.direction,this.direction),this},t.prototype.intersectTriangle=function(t,e){var n=S.Ue(),i=S.Ue(),r=S.Ue();S.lu(n,t[1],t[0]),S.lu(i,t[2],t[0]),S.kC(r,n,i);var o,a=S.AK(this.direction,r);if(a>0){if(e)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}var s=S.Ue();S.lu(s,this.origin,t[0]);var l=S.Ue();S.kC(l,s,i);var c=o*S.AK(this.direction,l);if(c<0)return null;var u=S.Ue();S.kC(u,n,s);var d=o*S.AK(this.direction,u);if(d<0)return null;if(c+d>a)return null;var h=-o*S.AK(s,r);return h<0?null:this.at(h/a)},t.prototype.distanceToPlane=function(t){var e=S.AK(t.normal,this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(S.AK(this.origin,t.normal)+t.constant)/e;return n>=0?n:null},t.prototype.intersectPlane=function(t){var e=this.distanceToPlane(t);return null===e?null:this.at(e)},t}();!function(){function t(t,e,n,i){var r;this.precision=1e-4,this.ray=new ni(t,e),this.near=n||0,this.far=i||1/0,this.intersectMethodsByType=((r={})[9]="intersectMesh",r),this._vec3=S.Ue(),this._mat3=Tn()}t.prototype.setFromCamera=function(t,e){if(2===e.type){S.JG(this.ray.origin,e.position);var n=S.t8(this._vec3,t[0],t[1],.5);n=e.unproject(n),S.lu(n,n,e.position),S.Fv(n,n),this.ray.direction=n}else if(1===e.type){var i=S.t8(this._vec3,t[0],t[1],-1);this.ray.origin=e.unproject(i),S.t8(this.ray.direction,0,0,-1),Ln(this._mat3,e.worldMatrix),S.kK(this.ray.direction,this.ray.direction,this._mat3),S.Fv(this.ray.direction,this.ray.direction)}},t.prototype.intersectObject=function(t,e,n){n=n||[];var i=this.intersectMethodsByType[t.type];return i&&this[i]?this[i](t,e,n):e&&this.intersectObjects(t.children,e,n),n.sort(this._descSort),n},t.prototype.intersectObjects=function(t,e,n){var i=this;return n=n||[],t.forEach((function(t){return i.intersectObject(t,e,n)})),n},t.prototype.intersectMesh=function(t,e,n){n=n||[];var i=Oe.Ue();Oe.U_(i,t.worldMatrix);var r=this.ray.clone();r.applyMatrix4(i);var o=t.geometry.getBoundingBox();if(!r.intersectBox(o))return t;for(var a=t.geometry.buffers.position,s=0;s<a.length;s+=3){var l=a.getTriangle(s/3),c=r.intersectTriangle(l,!1);if(c){S.fF(c,c,t.worldMatrix);var u=S.TK(this.ray.origin,c);u<this.precision||u<this.near||u>this.far||n.push({distance:u,point:c,object:t})}}return e&&this.intersectObjects(t.children,e,n),n},t.prototype._descSort=function(t,e){return t.distance-e.distance}}(),function(t){function e(){var e=t.call(this)||this;return e.type=14,e}(0,j.ZT)(e,t),e.prototype.render=function(t){var e=t.gl;return e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),t.renderer.sortObjects&&this._sortObjects(t),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e.prototype._sortObjects=function(t){var e=t.camera,n=this._reversePainterSortStable.bind(this,e);this._objects.sort(n)},e.prototype._reversePainterSortStable=function(t,e,n){if(e.renderOrder!==n.renderOrder)return e.renderOrder-n.renderOrder;var i=t.project(e.getWorldPosition())[2];return t.project(n.getWorldPosition())[2]-i}}(te);var ii=n(5510),ri=n(5452),oi=new(n(1253).TD)("main").getPacked(),ai=64,si=function(){function t(t,e,n){var i=this;this.id=t,this.modules=e,this.options=n,this.type="dem",this.tree=ii(),this.tileLoader=new ri.U("arrayBuffer"),this.attributes={},this.tiles=new Map,this.textureIndices=new Map,this.url=function(t){var e=(0,Q._W)(t),n=e[0],r=e[1],o=e[2];return i.options.url(n,r,o)}}return t.prototype.abortTileFetch=function(t){this.tileLoader.abortRequest((0,Q.gx)(t))},t.prototype.deleteTile=function(t){var e=(0,Q.gx)(t);if(this.tiles.get(e)){var n=(0,Q.Sl)(t);this.tree.remove({minX:n.min[0],minY:n.min[1],maxX:n.max[0],maxY:n.max[1]},(function(t,n){return e===n.key}))}this.tiles.delete(e)},t.prototype.fetchTile=function(t){var e=this,n=(0,Q.gx)(t),i=[{regionId:0,metatileHash:-1}];if(this.tiles.has(n))return Promise.resolve(i);var r=this.url(t);return this.tileLoader.fetch(t,(function(){return r})).then((function(r){return e.tiles.set(n,r?e.tileDataToFloat32Array(r,t):void 0),i}))},t.prototype.generateTile=function(t,e,n,i,r,o){return(0,j.mG)(this,void 0,void 0,(function(){var t,n,i,r,o,a,s,l,c,u,d,h;return(0,j.Jh)(this,(function(f){return t=[],n=[],i=(0,Q.gx)(e),(r=this.tiles.get(i))?(o=(0,Q.aq)(e[2]),a=(0,Q.Sl)(e),this.tree.insert({key:i,minX:a.min[0],minY:a.min[1],maxX:a.max[0],maxY:a.max[1],data:r,cellSize:o/ai}),s=this.modules.renderer.getRenderingContext(),l=new oe(r,{size:[ai,ai],format:oe.AlphaFormat,type:oe.Float,flipY:!0,magFilter:oe.LinearFilter,minFilter:oe.LinearFilter}).prepare(s),c=this.modules.imageManager.addPreparedTexture(l),this.textureIndices.set(i,c),u=this.modules.map.state.handyStyleId,d=[[0,0,0,0],[1,0,1,0],[0,1,0,1],[0,1,0,1],[1,0,1,0],[1,1,1,1]],h=qe._.generateElevation(this.modules.collector,d,u,In.h,c),t.push({regionId:0,metatileHash:-1,styleId:u,collectorOutput:{data:[h],labels:[],geoIds:new Uint32Array,floorHidingMap:[],rastersToLoad:new Float64Array,transferable:[],identifyIds:oi}}),[2,Promise.resolve({results:t,transferable:n})]):[2,Promise.resolve({results:t,transferable:n})]}))}))},t.prototype.tileDataToFloat32Array=function(t,e){for(var n=e[0],i=e[1],r=e[2],o=e[3],a=new Uint8Array(t),s=new Float32Array(Math.pow(ai,2)),l=0;l<ai;l++)for(var c=(0,w.PA)((0,Q.Oy)([n,i+.015625*l,r,o])),u=(0,w.Xg)(c[1]),d=0;d<ai;d++){var h=d+l*ai,f=a[h]+256*a[Math.pow(ai,2)+h]-1e4;s[h]=f*u}return s},t.prototype.getAttributes=function(){return this.attributes},t.prototype.setAttributes=function(t){this.attributes=t},t.prototype.getId=function(){return this.id},t.prototype.destroy=function(){var t=this.modules.imageManager;this.tileLoader.destroy(),this.tiles.clear(),this.tree.clear(),this.textureIndices.forEach((function(e){return t.deleteTexture(e)})),this.textureIndices.clear()},t.prototype.getElevation=function(t){var e=this.tree.search({minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}).reduce((function(t,e){return!t||t.cellSize>e.cellSize?e:t}),void 0);if(e)return function(t,e){var n=(0,b.uZ)((e[0]-t.minX)/t.cellSize,0,63),i=(0,b.uZ)((e[1]-t.minY)/t.cellSize,0,63),r=Math.trunc(n),o=Math.trunc(i),a=Math.min(r+1,63),s=Math.min(o+1,63),l=H.t7([],[t.data[li(o)*ai+r],t.data[li(s)*ai+r]],[t.data[li(o)*ai+a],t.data[li(s)*ai+a]],n%1);return(0,b.t7)(l[0],l[1],i%1)}(e,t)},t}();function li(t){return 63-t}var ci=n(3750),ui=Oe.wA([],[-1,-1,0],[2,2,1]),di=function(){function t(t){this.demTextureMatrix=new Float64Array(Oe.Ue()),this.centerPosition=[0,0,0],this.demFbVpMatrix=new Float64Array(Oe.Ue()),this.flatFbVpMatrix=new Float64Array(Oe.Ue()),this.demFramebufferId=ci.z,this.flatFramebufferId=ci.z,this.hillshadeRampTextureId=NaN,this.flatFramebufferExt=0,this.lastStyleId=NaN,this.demModelMatrix=new Float64Array(Oe.Ue()),this.modules=t,this.enabled=!1,this.sources=[],this.tileLayers=[],this.differ=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"demMode",type:"boolean"}])}return t.prototype.enable=function(){this.differ=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"demMode",type:"boolean"}]),this.demFramebufferId=this.createDemFramebuffer(),this.flatFramebufferId=this.createFlatFramebuffer(),this.addDefaultSources(),this.modules.styleManager.setFramebufferId(this.modules.map.state.handyStyleId,In.h,{elevation:this.demFramebufferId});var t=this.modules.styleManager.getStyle(this.modules.map.state.handyStyleId);(null==t?void 0:t.dem)&&(this.hillshadeRampTextureId=this.modules.imageManager.addPreparedTexture(function(t,e,n){for(var i=(0,nt.jJ)(t.styleZoom,t.styleState,[]),r=[],o=n-1,a=0;a<n;a++){var s=a/o,l=256*(0,nt.UP)(e,s,i);r.push(l)}return new oe(new Uint8Array(r),{size:[n,1],format:oe.AlphaFormat})}(this.modules.map.state,t.dem.style.shadingPalette,256))),this.enabled=!0},t.prototype.disable=function(){var t,e=this;this.enabled&&(null===(t=this.meshSource)||void 0===t||t.destroy(),this.meshSource=void 0,this.tileLayers.forEach((function(t){e.modules.tileManager.removeTileLayer(t)})),this.tileLayers=[],this.sources.forEach((function(t){t.destroy()})),this.sources=[],this.modules.styleManager.removeLayer("demo_raster_layer"),this.modules.styleManager.setFramebufferId(this.modules.map.state.handyStyleId,In.h,{elevation:ci.z}),this.modules.renderer.removeFramebuffer(this.demFramebufferId),this.modules.renderer.removeFramebuffer(this.flatFramebufferId),this.enabled=!1)},t.prototype.update=function(){var t,e;if(this.enabled){var n=this.modules.map.state;this.lastStyleId!==n.handyStyleId&&(null===(t=this.meshSource)||void 0===t||t.updateStyleId(),this.lastStyleId=n.handyStyleId),this.differ.check(this.modules.map.state)&&(null===(e=this.meshSource)||void 0===e||e.updateView(),this.updateDemFramebufferMatrix(),this.updateFlatFramebufferMatrix())}},t.prototype.isEnabled=function(){return this.enabled},t.prototype.getDemFramebufferId=function(){return this.demFramebufferId},t.prototype.getFlatFramebufferId=function(){return this.flatFramebufferId},t.prototype.getHillshadeRampTextureId=function(){return this.hillshadeRampTextureId},t.prototype.getFlatFramebufferExt=function(){return this.flatFramebufferExt},t.prototype.getElevation=function(t){var e;if(this.enabled)return this.sources.forEach((function(n){var i=n.getElevation(t);void 0!==i&&(e=i)})),e},t.prototype.addDefaultSources=function(){this.enabled||(this.addElevationSource({url:function(t,e,n){return"https://tileserver.web-staging.2gis.ru/v2/ald?ts=relief_hd&x="+t+"&y="+e+"&z="+n},minZoom:5,maxZoom:13,attributes:{dem:"elevation"}}),this.meshSource=new Mn(this.modules.map,{}))},t.prototype.addElevationSource=function(t){var e=new si((0,je.Q)(),this.modules,t);this.sources.push(e);var n=t.minZoom,i=t.maxZoom,r=new Be.I(n,i,n,i,this.modules,this.modules.map.state,e);this.modules.tileManager.addTileLayer(r),this.tileLayers.push(r)},t.prototype.getDemTextureSize=function(){var t=this.modules.map.state.size[1]*g.camera.viewportLimitRatio;return Math.min(Math.ceil(Math.hypot(t,t)/le.y4),64)},t.prototype.updateFlatFramebufferExt=function(){var t=this.modules.map.state,e=(0,b.Id)(g.camera.fov),n=t.size[1]<g.camera.minCalculationScreenHeight?e/g.camera.minCalculationScreenHeight*t.size[1]:e,i=2*Math.tan(n/2),r=Math.tan(t.maxPitch+n/2)-Math.tan(n/2);this.flatFramebufferExt=r/i,this.flatFramebufferExt=(0,b.uZ)(this.flatFramebufferExt,0,1)},t.prototype.createDemFramebuffer=function(){var t=this,e=this.modules.renderer.getRenderingContext(),n=64*this.getDemTextureSize(),i=new se({size:[n,n],magFilter:oe.LinearFilter,minFilter:oe.LinearFilter,wrapS:oe.ClampToEdgeWrapping,wrapT:oe.ClampToEdgeWrapping,flipY:!0,type:oe.Float});return this.modules.renderer.addFramebuffer({clearColor:[0,0,0,0],onResize:function(){var r=64*t.getDemTextureSize();r!==n&&(console.log("[DEM] Texture resized: "+n),n=r,i.setSize([n,n]),i.bind(e),i.unbind(e))},renderTarget:i,getViewProjectionMatrix:function(){return t.demFbVpMatrix},renderIndex:0,onRenderStart:function(){e.activeTexture(e.TEXTURE0+10),e.bindTexture(e.TEXTURE_2D,null)}})},t.prototype.createFlatFramebuffer=function(){var t=this,e=this.modules.renderer.getRenderingContext(),n=this.modules.map.state.size;this.updateFlatFramebufferExt();var i=[n[0],n[1]*(1+this.flatFramebufferExt)],r=new se({size:[Math.ceil(i[0]*window.devicePixelRatio),Math.ceil(i[1]*window.devicePixelRatio)],magFilter:oe.LinearFilter,minFilter:oe.LinearFilter,wrapS:oe.ClampToEdgeWrapping,wrapT:oe.ClampToEdgeWrapping});return this.modules.renderer.addFramebuffer({clearColor:[0,0,0,0],onResize:function(){t.updateFlatFramebufferExt();var i=[n[0],n[1]*(1+t.flatFramebufferExt)];r.setSize([Math.ceil(i[0]*window.devicePixelRatio),Math.ceil(i[1]*window.devicePixelRatio)]),r.bind(e),r.unbind(e)},getViewProjectionMatrix:function(){return t.flatFbVpMatrix},renderTarget:r,renderIndex:2})},t.prototype.updateDemFramebufferMatrix=function(){var t=this.modules.map.state,e=Math.trunc(t.styleZoom),n=(0,Q.aq)(e),i=n*this.getDemTextureSize(),r=i/2,o=n/64,a=[t.center[0]-r,t.center[1]-r],s=[];H.lu(s,this.modules.camera.position,t.center);var l=H.Zh(s);H.Fv(s,s);var c=(r-l-o)*Math.sin(t.pitch/t.maxPitch*(Math.PI/2));H.bA(s,s,c),H.lu(a,a,s),Oe.wA(this.demModelMatrix,[Math.trunc(a[0]/o)*o,Math.trunc(a[1]/o)*o,0],[i,i,le._9]),Oe.U_(this.demTextureMatrix,this.demModelMatrix),Oe.Jp(this.demFbVpMatrix,ui,this.demTextureMatrix),S.fF(this.centerPosition,this.modules.map.state.center,this.demTextureMatrix)},t.prototype.updateFlatFramebufferMatrix=function(){var t=1+this.flatFramebufferExt;Oe.wA(this.flatFbVpMatrix,[0,this.flatFramebufferExt/t,0],[1,1/t,1]),Oe.Jp(this.flatFbVpMatrix,this.flatFbVpMatrix,this.modules.camera.viewProjectionMatrix)},t}();function hi(t,e){return 0===e?1:1===e?t.labelingOpacity:1-t.labelingOpacity}var fi=function(t,e,n,i,r,o,a){var s=(0,nt.zn)(o.style.color,Qi(n,r));return Ae.JG(a.value,s.value),!0},pi=function(t,e,n,i,r,o,a){var s=(0,nt.zn)(o.style.topColor,Qi(n,r));return Ae.JG(a.value,s.value),!0},mi=function(t,e,n,i,r,o,a){var s=(0,nt.zn)(o.style.sideColor,Qi(n,r));return Ae.JG(a.value,s.value),!0},vi=function(t,e,n,i,r,o,a){var s=(0,nt.zn)(o.style.strokeColor,Qi(n,r));return Ae.JG(a.value,s.value),!0},_i=function(t,e,n,i,r,o,a){var s=(0,nt.zn)(o.style.strokeColor2,Qi(n,r));return Ae.JG(a.value,s.value),!0},yi=function(t,e,n,i,r,o,a){return void 0===r.attributes.id||(a.value[3]*=i.modelLayer.getOpacity(r.attributes.id,o.minzoom)),!0},gi=function(t,e,n,i,r,o,a){var s=i.modelLayer;if(void 0===r.attributes.hiddenObjectId)return!0;if(r.attributes.hiddenObjectId&&!s.hasModel(r.attributes.hiddenObjectId))return!0;var l=s.getVisibleModelData(r.attributes.hiddenObjectId);if(!l)return!0;var c=1-l.opacity;return!(c<.5||(a.value[3]*=c,0))},bi=function(t,e){return e.bind(t,{u_float_opacity:1}),!0},wi=function(t,e,n,i,r,o,a){var s=Qi(n,r),l=(0,nt.zn)(o.style.strokeColor,s).value,c=(0,nt.vn)(o.style.strokeWidth,s);return Ae.fS(a.value,l)&&1===a.value[3]&&c<=1&&(a.value[3]*=n.stillness),!0},xi=function(t,e,n,i,r,o,a){var s=Qi(n,r),l=(0,nt.zn)(o.style.topColor,s).value,c=(0,nt.vn)(o.style.strokeWidth,s);return Ae.fS(a.value,l)&&1===a.value[3]&&c<=1&&(a.value[3]*=n.stillness),!0},Si=function(t,e,n,i,r,o,a){return a.value[3]*=n.stillness,!0},Ii=function(t,e,n,i,r,o,a){var s=(0,nt.m2)(a);return Ae.bA(s,s,r.tile.readiness),0!==a.value[3]&&(e.bind(t,{u_vec4_color:s}),!0)},Mi=function(t,e,n,i,r,o){var a=(0,nt.vn)(o.style.width,Qi(n,r));return 0!==a&&(e.bind(t,{u_float_width:a*window.devicePixelRatio}),!0)},Pi=function(t,e,n,i,r,o){var a=(0,nt.vn)(o.style.strokeWidth,Qi(n,r));return 0!==a&&(e.bind(t,{u_float_width:a*window.devicePixelRatio}),!0)},Ti=function(t,e,n,i,r,o){var a=Qi(n,r),s=(0,nt.vn)(o.style.strokeWidth,a);if(0===s)return!1;var l=(0,nt.vn)(o.style.width,a)+2*s;return e.bind(t,{u_float_width:l*window.devicePixelRatio}),!0},Li=function(t,e,n,i,r,o){var a=Qi(n,r),s=(0,nt.vn)(o.style.strokeWidth2,a);if(0===s)return!1;var l=(0,nt.vn)(o.style.width,a)+2*(0,nt.vn)(o.style.strokeWidth,a)+2*s;return e.bind(t,{u_float_width:l*window.devicePixelRatio}),!0},Ei=function(t,e,n,i,r,o){var a=Qi(n,r),s=(0,nt.vn)(o.style.width,a)+2*(0,nt.vn)(o.style.strokeWidth,a)+2*(0,nt.vn)(o.style.strokeWidth2,a);return 0!==s&&(e.bind(t,{u_float_width:s*window.devicePixelRatio}),!0)},ki=function(t,e,n,i,r,o){var a=Qi(n,r);return(0,nt.vn)(o.style.iconWidth,a)>0},zi=function(t,e,n,i,r,o){return e.bind(t,{u_float_shift:(0,nt.vn)(o.style.shift,Qi(n,r))*window.devicePixelRatio}),!0},Ci=function(t,e,n,i,r,o){return 0!==hi(n,r.attributes.animDirection)},Ai=function(t,e,n,i,r,o){var a=hi(n,r.attributes.animDirection);return 0!==a&&(e.bind(t,{u_float_opacity:a}),!0)},Di=function(t,e,n,i,r,o){var a=(0,nt.vn)(o.style.iconRotation,Qi(n,r));return e.bind(t,{u_vec2_rotation:[Math.cos(a),Math.sin(a)]}),!0},Fi=function(t,e,n,i,r,o){var a=(0,nt.vn)(o.style.opacity,Qi(n,r));return e.bind(t,{u_float_opacity:r.tile.readiness*a}),!0},Ri=function(t,e,n,i,r,o){var a=(0,nt.vn)(o.style.opacity,Qi(n,r));return e.bind(t,{u_float_opacity:a}),!0},Oi=function(t,e,n,i,r){var o=i.floorManager;return void 0===r.attributes.hiddenObjectId||!o.hasDisplayedFloorBuilding(r.attributes.hiddenObjectId)},ji=function(t,e,n,i,r){var o=i.modelLayer;if(void 0===r.attributes.hiddenObjectId)return!0;if(!o.hasModel(r.attributes.hiddenObjectId))return!0;var a=o.getVisibleModelData(r.attributes.hiddenObjectId);return!a||1!==a.opacity},Bi=function(t,e,n,i,r){return e.bind(t,{u_sr2d_texture:r.attributes.atlasIndex}),!0},Ui=function(t,e,n,i,r){var o=r.attributes,a=o.range,s=o.fontIndex,l=o.styleId,c=i.styleManager.getStyle(l);if(!c)return!1;var u=c.fonts[s],d=i.assetManager.getFontTextureByName(u,a);return void 0!==d&&(d.enable(t),!0)},Zi=function(t,e,n,i,r){var o=i.imageManager.getTexture(r.attributes.textureIndex);return void 0!==o&&(o.enable(t,0),e.bind(t,{u_sr2d_texture:0}),!0)},Ni=function(t,e,n,i,r){var o=i.imageManager.getTexture(r.attributes.rampTextureIndex);return void 0!==o&&(o.enable(t,1),e.bind(t,{u_sr2d_ramp_texture:1}),!0)},Hi=function(t,e,n,i,r,o){var a=r.tile,s=(0,nt.zn)(o.style.gapColor,Qi(n,r));if(!s)return!0;var l=(0,nt.m2)((0,nt.zn)(s,Qi(n,r)));return Ae.bA(l,l,a.readiness),e.bind(t,{u_vec4_space_color:l}),!0},Gi=function(t,e,n,i,r,o){var a=n.styleZoom,s=Qi(n,r),l=r.tile,c=(0,nt.m2)((0,nt.zn)(o.style.color,s));Ae.bA(c,c,l.readiness),s.styleZoom=Math.floor(a);var u=Math.pow(2,(0,b.vO)(a)),d=(0,nt.vn)(o.style.dashLength,s)*u,h=(0,nt.vn)(o.style.gapLength,s)*u;return e.bind(t,{u_vec4_dash_color:c,u_vec2_scaler_params:[0,le.Cd],u_float_dash_length:(0,w.Qn)(d,l.size),u_float_dash2_length:(0,w.Qn)(d,l.size),u_float_space_length:(0,w.Qn)(h,l.size)}),!0},Vi=function(t,e,n,i,r,o){var a=Qi(n,r),s=(0,nt.vn)(o.style.tipWidth,a),l=(0,nt.vn)(o.style.tipHeight,a),c=s,u=H.al(-c,-0);H.Fv(u,u);var d=H.al(s,l);return H.Fv(d,d),e.bind(t,{u_vec2_wing_normal:u,u_vec2_tip_normal:d,u_float_tip_height_multiplier:l,u_float_wing_height_multiplier:0,u_float_wing_width_multiplier:c,u_float_size_factor:(0,w.Qn)(1,r.tile.size)/2}),!0},Wi=function(t,e,n,i,r,o){var a=Qi(n,r),s=(0,nt.vn)(o.style.lineLength,a),l=(0,nt.vn)(o.style.lineWidth,a);return e.bind(t,{u_float_length:s,u_float_width:l,u_float_border_width:0}),!0},qi=function(t,e,n,i,r,o){var a=Qi(n,r),s=r.tile,l=r.attributes.isLongArrow,c=r.tile.dynamicObject,u=0,d=1;c&&(l?d=c.growPosition:u=c.bouncePosition);var h=0;return"appearance"===o.style.animation.type&&(h=(0,nt.vn)(o.style.animation.tipMovementAmplitude,a)),e.bind(t,{u_float_width_zpt:(0,nt.vn)(o.style.lineWidth,a),u_float_border_width_zpt:(0,nt.vn)(o.style.strokeWidth,a),u_float_tip_movement_amplitude:(0,w.Qn)(h,s.size),u_float_vertex_shift:u,u_float_relative_end_position:d}),!0},Xi=function(t,e,n,i,r){var o=i.modelLayer,a=r.attributes,s=a.texture,l=a.id;if(void 0===l)return!1;var c=o.getTexture(l,s);return void 0!==c&&(c.enable(t,0),e.bind(t,{u_sr2d_texture:0}),!0)},Yi=function(t,e,n,i,r,o){if(void 0===r.attributes.id)return!0;var a=i.modelLayer.getOpacity(r.attributes.id,o.minzoom),s=1===i.modelLayer.getBuildingHeight(r.attributes.id)?1:a;return e.bind(t,{u_float_height_factor:s}),!0},Ki=function(t,e,n,i,r,o){var a=Qi(n,r),s=(0,nt.vn)(o.style.height,a);return e.bind(t,{u_float_height_factor:(0,Q.VW)(s)}),!0},Ji=function(t,e,n,i,r,o){var a=i.buildingHeightAnimator.getBuildingHeight(o.minzoom);return i.demManager.isEnabled()&&(a=.001+.999*a),r.attributes.hiddenObjectId&&i.modelLayer.setBuildingHeight(r.attributes.hiddenObjectId,a),e.bind(t,{u_float_height_factor:a}),!0};function Qi(t,e){return(0,nt.jJ)(t.styleZoom,t.styleState,e.attributes.tileData)}var $i=function(t,e,n,i,r,o){var a=r.tile,s=a.purpose,l=a.detailLevel,c=n.styleZoom;switch(s){case"terrain":case"traffic":case"geojson":var u=l<function(t){switch(t){case"terrain":return g.tiles.maxDetailLevel;case"traffic":return g.traffic.maxDetailLevel;case"geojson":return Fe.rR}}(s)?(0,b.uZ)(c,l,l+.99999):c;return o.minzoom<=u&&u<o.maxzoom;case"dynamicObject":return o.minzoom<=c&&c<=o.maxzoom;default:return o.minzoom<=c&&c<o.maxzoom}},tr=function(t,e,n,i,r){var o=n.styleZoom;return!("terrain"===r.tile.purpose&&o<=g.tiles.maxUniverseZoom)},er=function(t,e,n,i,r,o){var a=n.styleZoom;return a>=o.minzoom&&a<o.maxzoom},nr=function(t,e,n,i,r,o){var a=r.tile,s=(0,nt.vn)(o.style.width,Qi(n,r));return 0!==s&&(e.bind(t,{u_float_width:(0,w.Qn)(s,a.size)/2,u_float_width_offset:(0,w.Qn)(1/window.devicePixelRatio,a.size)/2}),!0)},ir=function(t,e,n,i,r,o){var a=(0,nt.vn)(o.style.radius,Qi(n,r));return!(a<=0||(e.bind(t,{u_float_radius:a*window.devicePixelRatio}),0))},rr=function(t,e,n,i,r,o){var a=(0,nt.vn)(o.style.intensity,Qi(n,r));return e.bind(t,{u_float_intensity:a}),!0},or=function(t,e,n,i,r,o){var a=Qi(n,r),s=(0,nt.vn)(o.style.textFontSize,a);if("point"===r.symbol){var l=r.attributes.labelIndex;l===De.bR.Second&&o.style.textFontSize2?s=(0,nt.vn)(o.style.textFontSize2,a):l===De.bR.Icon&&o.style.iconTextFontSize&&(s=(0,nt.vn)(o.style.iconTextFontSize,a))}return e.bind(t,{u_float_scale:s*window.devicePixelRatio/g.fonts.baseSize}),!0},ar=function(t,e,n,i,r,o){var a,s,l=o.style;if("point"===r.symbol)switch(r.attributes.labelIndex){case De.bR.Second:return(null!==(a=l.textHaloWidth2)&&void 0!==a?a:0)>0&&!!l.textHaloColor2;case De.bR.Icon:return(null!==(s=l.iconTextHaloWidth)&&void 0!==s?s:0)>0&&!!l.iconTextHaloColor;case De.bR.First:}return l.textHaloWidth>0&&!!l.textHaloColor},sr=function(t,e,n,i,r,o){return cr(t,e,n,r,o.style.textFontSize,o.style.textColor,o.style.textHaloWidth,o.style.textHaloColor,r.layerSettings.uniformSet)},lr=function(t,e,n,i,r,o){var a=r.layerSettings.uniformSet,s=r.attributes.labelIndex,l=o.style,c=l.textFontSize,u=l.textHaloWidth,d=l.textColor,h=l.textHaloColor;switch(s){case De.bR.Icon:c=l.iconTextFontSize,u=l.iconTextHaloWidth,d=l.iconTextColor,h=l.iconTextHaloColor;break;case De.bR.Second:c=l.textFontSize2,u=l.textHaloWidth2,d=l.textColor2,h=l.textHaloColor2}return cr(t,e,n,r,c,d,u,h,a)},cr=function(t,e,n,i,r,o,a,s,l){var c,u=Qi(n,i),d=(0,nt.vn)(r,u)/g.fonts.baseSize,h=d*window.devicePixelRatio,f=g.fonts.gamma/h;if("fontHalo"===l){if(!s)return!1;c=(0,nt.m2)((0,nt.zn)(s,u))}else c=(0,nt.m2)((0,nt.zn)(o,u));var p="fontHalo"===l?(6-(0,nt.vn)(a,u)/d)/8:.75;return e.bind(t,{u_float_buffer:p,u_float_gamma:f,u_vec4_color:c}),!0},ur=function(t,e,n,i,r){var o=r.attributes,a=o.offsetX,s=o.offsetY,l=window.devicePixelRatio;return e.bind(t,{u_vec2_offset:[a*l,s*l]}),!0},dr=function(t,e,n){return e.bind(t,{u_float_style_zoom:n.styleZoom}),!0},hr=function(t,e,n,i,r){var o=r.tile,a=n.zoom,s=le.y4*Math.pow(2,a-o.zoomLevel)*window.devicePixelRatio;return e.bind(t,{u_float_tile_to_pixel_ratio:1/s}),!0},fr=function(t,e,n,i,r){var o;if(!i.demManager.isEnabled())return pr(t,e);var a=i.demManager.getDemFramebufferId(),s=i.renderer.getFramebuffer(a),l=i.styleManager.getStyle(r.attributes.styleId);if(!s||!l)return pr(t,e);var c=s.renderTarget.getTexture(),u=c.options.size;if(!u)return pr(t,e);var d=i.imageManager.getTexture(i.demManager.getHillshadeRampTextureId());if(void 0===c||void 0===d)return pr(t,e);var h=Qi(n,r),f=(0,nt.vn)(l.dem.style.verticalScale,h),p=(0,w.v3)((0,b.Id)((0,nt.vn)(l.dem.style.lightingDirection,h))-n.rotation),m=(0,nt.vn)(l.dem.style.shadingIntensity,h),v=w.Ax/(64*Math.pow(2,Math.trunc(n.styleZoom)));return c.enable(t,10),d.enable(t,11),e.bind(t,{u_float_dem_scale:f,u_float_dem_resolution:u[0],u_float_dem_cell_size:v,u_float_dem_light_direction:p,u_float_dem_shade_intension:m,u_tex_dem:10,u_tex_hillshade_ramp:11,u_float_map_center_elevation:null!==(o=n.elevation)&&void 0!==o?o:0}),!0},pr=function(t,e){return e.bind(t,{u_float_dem_scale:0}),!0},mr=function(t,e,n,i){var r=i.demManager,o=i.renderer;if(!r.isEnabled())return!1;var a=r.getFlatFramebufferId(),s=o.getFramebuffer(a);return!!s&&(s.renderTarget.getTexture().enable(t,0),e.bind(t,{u_flat_tex:0,u_flat_tex_ext:r.getFlatFramebufferExt()}),!0)};function vr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,Re.lK)([0,0,0,0]);return function(e,i,r,o,a,s){for(var l=0;l<t.length;l++)if(!t[l](e,i,r,o,a,s,n))return!1;return!0}}var _r=function(t){t.depthMask(!0),t.enable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.enable(t.CULL_FACE),t.cullFace(t.BACK),t.disable(t.BLEND),t.blendFunc(t.ONE,t.ZERO),t.colorMask(!0,!0,!0,!0),t.disable(t.POLYGON_OFFSET_FILL)},yr=function(t){_r(t),t.depthMask(!1),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},gr=function(t){_r(t),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.disable(t.CULL_FACE)},br=function(t){_r(t),t.disable(t.DEPTH_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},wr=function(t){_r(t),t.disable(t.DEPTH_TEST),t.colorMask(!0,!1,!1,!0)},xr=function(t){_r(t),t.disable(t.DEPTH_TEST)},Sr=function(t){_r(t),t.depthMask(!1)},Ir=function(t){_r(t),t.colorMask(!1,!1,!1,!1)},Mr=function(t){_r(t),t.depthFunc(t.EQUAL),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Pr=function(t){_r(t),t.disable(t.DEPTH_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Tr=function(t){_r(t),t.polygonOffset(1,2),t.enable(t.POLYGON_OFFSET_FILL),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Lr=function(t){_r(t),t.disable(t.DEPTH_TEST),t.cullFace(t.FRONT),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Er=function(t){t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE)},kr=function(){function t(t){this.gl=t,this.ext=t.getExtension("EXT_disjoint_timer_query"),this.queries=[]}return t.prototype.addTimer=function(){if(this.ext){var t=this.ext.createQueryEXT();this.queries.push(t),this.ext.beginQueryEXT(this.ext.TIME_ELAPSED_EXT,t)}},t.prototype.stopTimer=function(){this.ext&&this.queries.length&&this.ext.endQueryEXT(this.ext.TIME_ELAPSED_EXT)},t.prototype.tryToGetFirstTimerValue=function(){if(this.ext){var t=this.queries[0];if(t){var e=this.ext,n=e.getQueryObjectEXT(t,e.QUERY_RESULT_AVAILABLE_EXT),i=this.gl.getParameter(e.GPU_DISJOINT_EXT);if(n&&!i){var r=e.getQueryObjectEXT(t,e.QUERY_RESULT_EXT);return e.deleteQueryEXT(t),this.queries.shift(),Number(r)}}}},t}(),zr="vec4 apply_opacity(const vec4 color, const float opacity)\n{\nreturn color * opacity;\n}\n",Cr={affine_step:"\nfloat affine_step(const float edge0, const float edge1, const float x)\n{\nreturn clamp((x - edge0) / (edge1 - edge0), 0., 1.);\n}\n",apply_opacity:zr,color:"varying vec4 v_vec4_color;\nvoid main()\n{\ngl_FragColor = v_vec4_color;\n}\n",line:"varying vec4 v_vec4_color;\nvarying float v_float_distance;\nvoid main()\n{\ngl_FragColor = v_vec4_color * (1. - abs(v_float_distance * gl_FragCoord.w));\n}\n",lowp_float:"precision lowp float;\n",mediump_float:"precision mediump float;\n",highp_float:"precision highp float;\n",pointsprite:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_FragColor = apply_opacity(texture2D(u_sr2d_texture, v_vec2_texcoord), u_float_opacity);\n}\n",striped_line:"varying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nvec4 distance_func_smooth(in vec4 main_color, in vec4 border_color, in vec2 circle)\n{\nfloat circle_length = length(circle);\nfloat distance = circle_length - v_float_width;\nmat2 derivatives = mat2(dFdx(v_vec2_circle), dFdy(v_vec2_circle));\nvec2 circle_dx = derivatives[0];\nvec2 circle_dy = derivatives[1];\nfloat distance_dx = dot(v_vec2_circle, circle_dx);\nfloat distance_dy = dot(v_vec2_circle, circle_dy);\nfloat derivative_denominator = circle_length;\nfloat width = max(abs(distance_dx), abs(distance_dy));\nvec4 from_main_to_border = mix(\nmain_color,\nborder_color,\naffine_step(-width, 0., distance * derivative_denominator));\nvec4 from_color_to_fade = mix(\nfrom_main_to_border,\nvec4(0.),\naffine_step(0., +width, distance * derivative_denominator));\nreturn from_color_to_fade;\n}\nfloat calculate_segment_color_factor(in float distance_in_parts, in float threshold)\n{\nfloat color_factor = abs(fract(distance_in_parts + 0.5 - 0.5 * threshold) - 0.5);\nfloat parts_affine_step_width = fwidth(distance_in_parts);\nfloat smoothed_color_factor = affine_step(\n0.5 * threshold - 0.5 * parts_affine_step_width,\n0.5 * threshold + 0.5 * parts_affine_step_width,\ncolor_factor);\nreturn smoothed_color_factor;\n}\nvoid main()\n{\nvec4 current_segment_color = mix(\nv_vec4_dash_color,\nv_vec4_space_color,\ncalculate_segment_color_factor(\nv_float_distance_in_parts,\nv_float_part_color_swap_threshold));\nvec4 final_border_color = (1.0 - v_vec4_border_color.a) * current_segment_color + v_vec4_border_color;\ngl_FragColor = distance_func_smooth(current_segment_color, final_border_color, v_vec2_circle);\n}\n",label:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_buffer;\nuniform float u_float_gamma;\nuniform vec4 u_vec4_color;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main() {\n    float dist = texture2D(u_sr2d_texture, v_vec2_texcoord).a;\n    float alpha = smoothstep(\n        u_float_buffer - u_float_gamma,\n        u_float_buffer + u_float_gamma,\n        dist\n    );\n    gl_FragColor = apply_opacity(u_vec4_color * alpha, u_float_opacity);\n}\n",one_way_line:"uniform vec2 u_vec2_wing_normal;\nuniform vec2 u_vec2_tip_normal;\nuniform float u_float_width;\nuniform float u_float_length;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_wing_height_multiplier;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_texcoord;\nvarying float v_float_border_width;\nvarying float v_float_zpt_to_texcoord_factor;\nvarying float v_float_outer_width;\nvarying float v_float_opacity;\nfloat one_way_line_distance(const ArrowDistances ad)\n{\nreturn max(max(max(ad.top_tip_cut, ad.bottom_tip_cut), max(ad.top_left_wing, ad.top_right_wing)), min(ad.line, min(ad.bottom_left_wing, ad.bottom_right_wing)));\n}\nvoid main()\n{\nmat2 derivatives = mat2(dFdx(v_vec2_texcoord), dFdy(v_vec2_texcoord));\nArrowDistanceParameters arrow_parameters = calculate_arrow_distance_parameters(\nu_vec2_wing_normal,\nu_vec2_tip_normal,\nu_float_width * v_float_zpt_to_texcoord_factor,\nu_float_length * v_float_zpt_to_texcoord_factor,\nu_float_tip_height_multiplier,\nu_float_wing_height_multiplier);\nfloat border_clipping = (abs(v_vec2_texcoord.y) - v_float_outer_width) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat fill_factor = affine_step(-1., 0., one_way_line_distance(calculate_arrow_distances(arrow_parameters, v_vec2_texcoord, 0., derivatives)));\nfloat border_factor = max(border_clipping, affine_step(0., 1., one_way_line_distance(calculate_arrow_distances(arrow_parameters, v_vec2_texcoord, v_float_border_width, derivatives))));\ngl_FragColor = apply_opacity(mix(mix(v_vec4_color, v_vec4_border_color, fill_factor), vec4(0.), border_factor), v_float_opacity);\n}\n",color_identify:"varying vec4 v_vec4_identifier;\nvoid main()\n{\ngl_FragColor = v_vec4_identifier;\n}\n",pointsprite_identify:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nvec4 color = texture2D(u_sr2d_texture, v_vec2_texcoord);\nif (color.a < 0.3) {\ndiscard;\n} else {\ngl_FragColor = v_vec4_identifier;\n}\n}\n",model:"uniform sampler2D u_sr2d_texture;\nuniform vec4 u_vec4_color;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_FragColor = texture2D(u_sr2d_texture, v_vec2_texcoord) * u_vec4_color;\n}\n",simple_line:"uniform vec4 u_vec4_color;\nvarying float v_float_distance;\nvarying float v_float_distance_offset;\nvoid main()\n{\nvec4 color = u_vec4_color;\ngl_FragColor = color * clamp(\n1. + v_float_distance_offset - abs(v_float_distance * gl_FragCoord.w),\n0.,\n1.);\n}\n",enable_standard_derivatives:"#extension GL_OES_standard_derivatives: enable\n",arrow_functions:"struct ArrowDistanceParameters\n{\nvec2 wing_normal;\nvec2 tip_normal;\nvec2 mirrored_wing_normal;\nvec2 mirrored_tip_normal;\nfloat width;\nfloat full_length;\nfloat arrow_height;\n};\nArrowDistanceParameters calculate_arrow_distance_parameters(\nconst vec2 wing_normal,\nconst vec2 tip_normal,\nconst float width_zpt,\nconst float length_zpt,\nconst float tip_height_multiplier,\nconst float wing_height_multiplier)\n{\nvec2 mirrored_wing_normal = vec2(wing_normal.x, -wing_normal.y);\nvec2 mirrored_tip_normal = vec2(tip_normal.x, -tip_normal.y);\nfloat width = 0.5 * width_zpt;\nfloat length = 0.5 * length_zpt;\nfloat arrow_height = width_zpt * (tip_height_multiplier - wing_height_multiplier);\nreturn ArrowDistanceParameters(\nwing_normal,\ntip_normal,\nmirrored_wing_normal,\nmirrored_tip_normal,\nwidth,\nlength,\narrow_height);\n}\nstruct ArrowDistances\n{\nfloat top_tip_cut;\nfloat bottom_tip_cut;\nfloat line;\nfloat bottom_left_wing;\nfloat bottom_right_wing;\nfloat top_left_wing;\nfloat top_right_wing;\n};\nArrowDistances calculate_arrow_distances(\nconst ArrowDistanceParameters arrow_parameters,\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives)\n{\nfloat derivatives_x_multiplier = 1. / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat dt = ( texcoord.x - arrow_parameters.full_length - offset) * derivatives_x_multiplier;\nfloat d0 = (-texcoord.x - arrow_parameters.full_length - offset) * derivatives_x_multiplier;\nfloat d1 = (abs(texcoord.y) - arrow_parameters.width - offset) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat d2 = (dot(texcoord - vec2(arrow_parameters.full_length - arrow_parameters.arrow_height, 0.), arrow_parameters.wing_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.wing_normal)), abs(dot(derivatives[1], arrow_parameters.wing_normal)));\nfloat d3 = (dot(texcoord - vec2(arrow_parameters.full_length - arrow_parameters.arrow_height, 0.), arrow_parameters.mirrored_wing_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.mirrored_wing_normal)), abs(dot(derivatives[1], arrow_parameters.mirrored_wing_normal)));\nfloat d4 = (dot(texcoord - vec2(arrow_parameters.full_length, 0.), arrow_parameters.tip_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.tip_normal)), abs(dot(derivatives[1], arrow_parameters.tip_normal)));\nfloat d5 = (dot(texcoord - vec2(arrow_parameters.full_length, 0.), arrow_parameters.mirrored_tip_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.mirrored_tip_normal)), abs(dot(derivatives[1], arrow_parameters.mirrored_tip_normal)));\nreturn ArrowDistances(dt, d0, d1, d2, d3, d4, d5);\n}\n",circle_functions:"\nconst float g_distance_precision_limit = 1e-4;\nstruct CircleDistance\n{\nfloat distance;\nfloat width;\n};\nCircleDistance circle_color_distance(\nconst mat2 derivatives,\nconst vec2 circle,\nconst float circle_width)\n{\nfloat circle_length = length(circle);\nfloat distance = circle_length - circle_width;\nvec2 circle_dx = derivatives[0];\nvec2 circle_dy = derivatives[1];\nfloat distance_dx = dot(circle, circle_dx);\nfloat distance_dy = dot(circle, circle_dy);\nfloat derivative_denominator = circle_length;\nfloat width = max(abs(distance_dx), abs(distance_dy));\nreturn CircleDistance(\ndistance * derivative_denominator,\nwidth);\n}\nvec4 distance_to_color(\nconst float fill_distance,\nconst float border_distance,\nconst vec4 fill_color,\nconst vec4 border_color)\n{\nfloat fill_factor = affine_step(-1., 0., fill_distance);\nfloat border_factor = affine_step(0., 1., border_distance);\nreturn\nmix(mix(fill_color, border_color, fill_factor), vec4(.0), border_factor);\n}\nvec4 distance_to_color(\nconst CircleDistance circle_distance,\nconst vec4 fill_color)\n{\nfloat fill_factor = circle_distance.distance < g_distance_precision_limit\n? 0.\n: affine_step(0., circle_distance.width, circle_distance.distance);\nreturn mix(fill_color, vec4(0.), fill_factor);\n}\n",arrow_line:"uniform vec2 u_vec2_wing_normal;\nuniform vec2 u_vec2_tip_normal;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_wing_height_multiplier;\nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_arrow_width_length_border_outer;\nvarying vec4 v_vec4_texcoord_arrow_line;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nconst float g_type_arrow = 1.;\nconst float g_type_start_border = 2.;\nbool lookalike(const float a, const float b)\n{\nreturn abs(a - b) < 1e-4;\n}\nfloat filter_border(const float start, const float value)\n{\nreturn step(start, value) * 2. - 1.;\n}\nfloat arrow_distance(\nconst ArrowDistanceParameters arrow_parameters,\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives,\nconst float line_distance,\nconst float line_distance_no_offset)\n{\nArrowDistances ad = calculate_arrow_distances(arrow_parameters, texcoord, offset, derivatives);\nfloat derivatives_x_multiplier = 1. / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat intersection_point = arrow_parameters.full_length - arrow_parameters.arrow_height - arrow_parameters.width * u_vec2_wing_normal.y / u_vec2_wing_normal.x;\nfloat tail_arrow_intersection = filter_border(-1., (texcoord.x - intersection_point) * derivatives_x_multiplier);\nfloat tail_hide_part = v_vec2_line_type_arrow_tail.y;\nfloat tail_hide_mask = (-texcoord.x - tail_hide_part) * derivatives_x_multiplier;\nfloat clipped_tail = max(tail_hide_mask, max(line_distance, max(ad.top_left_wing, ad.top_right_wing)));\nfloat line_without_offset = filter_border(0., line_distance_no_offset);\nfloat wings_with_tail = max(min(min(ad.bottom_left_wing, ad.bottom_right_wing), line_without_offset), max(ad.top_left_wing, ad.top_right_wing));\nreturn (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y)\n? max(ad.top_tip_cut, max(-max(tail_arrow_intersection, line_without_offset), wings_with_tail))\n: max(ad.top_tip_cut, min(clipped_tail, max(-max(tail_arrow_intersection, line_without_offset), wings_with_tail)));\n}\nvec4 distance_to_arrow_line_color(\nconst float fill_distance,\nconst float border_distance)\n{\nreturn distance_to_color(fill_distance, border_distance, v_vec4_color, v_vec4_border_color);\n}\nvec4 arrow_color(\nconst vec2 texcoord,\nconst ArrowDistanceParameters arrow_parameters,\nconst float line_fill_distance,\nconst float line_border_distance)\n{\nmat2 derivatives = mat2(dFdx(texcoord), dFdy(texcoord));\nfloat border_clipping = (abs(texcoord.y) - v_vec4_arrow_width_length_border_outer.w) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat arrow_border_distance = arrow_distance(\narrow_parameters,\ntexcoord,\nv_vec4_arrow_width_length_border_outer.z,\nderivatives,\nline_border_distance,\nline_fill_distance);\nfloat border_factor = max(border_clipping, affine_step(0., 1., arrow_border_distance));\nreturn distance_to_arrow_line_color(\narrow_distance(arrow_parameters, texcoord, 0., derivatives, line_fill_distance, line_fill_distance),\nborder_factor);\n}\nfloat line_start_distance(\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives,\nconst float line_distance)\n{\nfloat tail_hide_part = v_vec2_line_type_arrow_tail.y;\nfloat d0 = (-texcoord.x - offset) / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat dh = (texcoord.x - tail_hide_part) / max(abs(derivatives[0].x), abs(derivatives[1].x));\nreturn max(d0, max(line_distance, dh));\n}\nvec4 line_color(const float line_fill_distance, const float line_border_distance)\n{\nfloat type = v_vec2_line_type_arrow_tail.x;\nfloat fill_distance = line_fill_distance;\nfloat border_distance = line_border_distance;\nif (lookalike(type, g_type_start_border))\n{\nvec2 texcoord = v_vec4_texcoord_arrow_line.xy;\nmat2 derivatives = mat2(dFdx(texcoord), dFdy(texcoord));\nfill_distance = line_start_distance(texcoord, 0., derivatives, line_fill_distance);\nborder_distance = line_start_distance(texcoord, v_vec4_arrow_width_length_border_outer.z, derivatives, line_border_distance);\n}\nreturn distance_to_arrow_line_color(fill_distance, border_distance);\n}\nvec4 arrow_line_color()\n{\nif (lookalike(min(v_vec4_distance_vertex_hiding.y, 1.), 1.)\n|| lookalike(v_vec4_distance_vertex_hiding.w, 1.)\n|| !lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow) && (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y || v_vec4_distance_vertex_hiding.x > v_vec4_distance_vertex_hiding.z))\n{\ndiscard;\n}\nArrowDistanceParameters arrow_parameters = calculate_arrow_distance_parameters(\nu_vec2_wing_normal,\nu_vec2_tip_normal,\nv_vec4_arrow_width_length_border_outer.x,\nv_vec4_arrow_width_length_border_outer.y,\nu_float_tip_height_multiplier,\nu_float_wing_height_multiplier);\nfloat line_width = arrow_parameters.width;\nfloat line_border = v_vec4_arrow_width_length_border_outer.z;\nvec2 line_texcoord = v_vec4_texcoord_arrow_line.zw;\nmat2 line_derivatives = mat2(dFdx(line_texcoord), dFdy(line_texcoord));\nCircleDistance circle_fill_distance = circle_color_distance(line_derivatives, line_texcoord, line_width);\nCircleDistance circle_border_distance = circle_color_distance(line_derivatives, line_texcoord, line_width + line_border);\nfloat line_fill_distance = affine_step(-1., 0., circle_fill_distance.distance / circle_fill_distance.width) - 1.;\nfloat line_border_distance = affine_step(0., circle_border_distance.width, circle_border_distance.distance);\nreturn lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow)\n? arrow_color(v_vec4_texcoord_arrow_line.xy, arrow_parameters, line_fill_distance, line_border_distance)\n: line_color(line_fill_distance, line_border_distance);\n}\nvoid main()\n{\ngl_FragColor = arrow_line_color();\n}\n",arrow_line_identify:"\nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_identifier;\nconst float g_type_arrow = 1.;\nbool lookalike(const float a, const float b)\n{\nreturn abs(a - b) < 1e-5;\n}\nvoid main()\n{\nif (lookalike(min(v_vec4_distance_vertex_hiding.y, 1.), 1.)\n|| lookalike(v_vec4_distance_vertex_hiding.w, 1.)\n|| !lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow) && (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y || v_vec4_distance_vertex_hiding.x > v_vec4_distance_vertex_hiding.z))\n{\ndiscard;\n}\n    gl_FragColor = v_vec4_identifier;\n}\n",circle_marker:"uniform vec4 u_vec4_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvoid main() {\n    float center_distance = dot(v_vec2_circle, v_vec2_circle);\n    gl_FragColor = u_vec4_color * affine_step(1.0, 1.0 - 4.0 / v_float_width, center_distance);\n}\n",road:"uniform vec4 u_vec4_color;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nvoid main()\n{\n    \n    float opacity = 1.0 - affine_step(\n        v_float_half_width - length(fwidth(v_vec2_normal)),\n        v_float_half_width,\n        length(v_vec2_normal)\n    );\n    gl_FragColor = u_vec4_color * opacity;\n}\n",road_identify:"varying vec4 v_vec4_identifier;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nvoid main()\n{\n    if (dot(v_vec2_normal, v_vec2_normal) > v_float_half_width * v_float_half_width) {\n        discard;\n    }\n    gl_FragColor = v_vec4_identifier;\n}\n",stretchable_image:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  gl_FragColor = texture2D(u_sr2d_texture, v_vec2_texcoord);\n}\n",stretchable_image_identify:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\n  vec4 color = texture2D(u_sr2d_texture, v_vec2_texcoord);\n  if (color.a < 0.1) {\n    discard;\n  } else {\n    gl_FragColor = v_vec4_identifier;\n  }\n}\n",rect:"uniform vec4 u_vec4_color;\nvoid main()\n{\ngl_FragColor = u_vec4_color;\n}\n",rect_with_texture:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  gl_FragColor = apply_opacity(texture2D(u_sr2d_texture, v_vec2_texcoord), u_float_opacity);\n}\n",heatmap:"uniform highp float u_float_intensity;\nvarying float v_float_weight;\nvarying vec2 v_vec2_extrude;\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n    float d = -0.5 * 3.0 * 3.0 * dot(v_vec2_extrude, v_vec2_extrude);\n    float val = v_float_weight * u_float_intensity * GAUSS_COEF * exp(d);\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n}",heatmap_texture:"uniform sampler2D u_sr2d_texture;\nuniform sampler2D u_sr2d_ramp_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_position;\nvoid main() {\n    float t = texture2D(u_sr2d_texture, v_vec2_position).r;\n    vec4 color = texture2D(u_sr2d_ramp_texture, vec2(t, 0.5));\n    gl_FragColor = color * u_float_opacity;\n}",dem_mesh:"\nuniform sampler2D u_flat_tex;\nuniform sampler2D u_tex_hillshade_ramp;\nuniform float u_float_dem_shade_intension;\nvarying vec3 v_vec3_texcoord;\nvarying float v_float_hillshade;\nconst float M_PI = 3.1415926535897932384626433832795;\nconst float zenith = 45. * M_PI / 180.;\nconst float HILLSHADE_OFFSET = cos(zenith) - 0.5;\nvoid main()\n{\nif (v_vec3_texcoord.z == 0.) {\ndiscard;\n}\nif (v_vec3_texcoord.x < 0. || v_vec3_texcoord.x > 1. || v_vec3_texcoord.y < 0. || v_vec3_texcoord.y > 1.) {\ndiscard;\n}\nfloat shade_value = texture2D(u_tex_hillshade_ramp, vec2(v_float_hillshade, 0.5)).a;\nfloat base = 1. - u_float_dem_shade_intension;\ngl_FragColor = texture2D(u_flat_tex, v_vec3_texcoord.xy);\ngl_FragColor.rgb = (gl_FragColor.rgb * base) + (gl_FragColor.rgb * 2. * u_float_dem_shade_intension * (shade_value - HILLSHADE_OFFSET));\n}",dem_elevation:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  vec4 color = texture2D(u_sr2d_texture, v_vec2_texcoord);\n  gl_FragColor = vec4(color.a, 0, 0, 1);\n}"},Ar={apply_height_factor:"vec4 apply_z_limitation(vec4 vertex, float tile_height, float height_limitation)\n{\nvertex.z = min(vertex.z, height_limitation / tile_height);\nreturn vertex;\n}\nvec4 apply_height_factor(const vec3 vertex, const float height_factor)\n{\nvec3 result_vertex = vertex;\nresult_vertex.z *= height_factor;\nreturn vec4(result_vertex, 1.0);\n}\n",apply_opacity:zr,color:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nvarying vec4 v_vec4_color;\nvoid main()\n{\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\n}\n",diffuse:"uniform mat4 u_mat4_mvp;\nuniform vec3 u_vec3_light_direction;\nuniform vec3 u_vec3_light_color;\nuniform vec3 u_vec3_ambient_color;\nuniform vec4 u_vec4_color;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nuniform float u_float_opacity;\nattribute vec3 a_vec3_vertex;\nattribute vec3 a_vec3_normal;\nattribute vec2 a_vec2_dem_position;\nvarying vec4 v_vec4_color;\nconst float g_wall_offset_isometric = .001;\nconst float g_wall_offset_perspective = 8.;\nvoid main()\n{\nfloat height = dem_height(a_vec2_dem_position);\nif (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\nv_vec4_color = vec4(0, 0, 0, 0);\nreturn;\n    }\nv_vec4_color = apply_opacity(\nvec4(\nu_vec4_color.rgb * (u_vec3_ambient_color + u_vec3_light_color * abs(dot(u_vec3_light_direction, normalize_s08(a_vec3_normal)))),\nu_vec4_color.a),\nu_float_opacity);\nvec4 vertex_hf = apply_height_factor(a_vec3_vertex, u_float_height_factor);\nvertex_hf.z += height;\nvertex_hf = apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation);\nvertex_hf.z = max(vertex_hf.z, height);\ngl_Position = u_mat4_mvp * vertex_hf;\nif (normalize_s08(a_vec3_normal).z < .5)\n{\nif ((u_mat4_mvp[0][3] == 0.) && (u_mat4_mvp[1][3] == 0.) && (u_mat4_mvp[2][3] == 0.))\n{\ngl_Position.z += g_wall_offset_isometric;\n}\nelse\n{\nif (height == 0.) {\ngl_Position.z += g_wall_offset_perspective;\n} else {\ngl_Position.z += g_wall_offset_isometric;\n}\n}\n}\n}\n",line:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_light_direction;\nuniform vec3 u_vec3_light_color;\nuniform vec3 u_vec3_ambient_color;\nuniform vec4 u_vec4_color;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nuniform float u_float_opacity;\nattribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_normal;\nattribute vec2 a_vec2_normal_delta;\nattribute vec3 a_vec3_direction;\nattribute float a_float_distance;\nattribute vec2 a_vec2_dem_position;\nvarying vec4 v_vec4_color;\nvarying float v_float_distance;\nconst float g_shift_pixels = 1.;\nconst float g_min_denominator = 1e-4;\nconst float g_w_factor = 1e-6;\nvec2 multiply_complex(vec2 lhs, vec2 rhs)\n{\nreturn vec2(lhs.x * rhs.x - lhs.y * rhs.y, lhs.x * rhs.y + lhs.y * rhs.x);\n}\nvoid main()\n{\nfloat height = dem_height(a_vec2_dem_position);\n    if (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\n        return;\n    }\nvec2 half_viewport = u_vec2_vpt_size / vec2(2.);\nvec4 clip_space_direction = u_mat4_mvp * vec4(normalize_s08(vec3(a_vec3_direction.xy, a_vec3_direction.z + height)), 0.);\nvec4 vertex_hf = apply_height_factor(a_vec4_vertex.xyz, u_float_height_factor);\nvertex_hf.z += height;\nvertex_hf = apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation);\nvertex_hf.z = max(vertex_hf.z, height);\nvec4 clip_space_vertex = u_mat4_mvp * vertex_hf;\nvec2 screen_space_direction = (clip_space_direction.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_direction.w) * half_viewport;\nvec2 screen_space_perp = vec2(-screen_space_direction.y, screen_space_direction.x);\nfloat denominator = max(g_min_denominator, length(screen_space_perp));\nvec2 bevel_normal = normalize_s08(a_vec2_normal);\nvec2 normal_delta = normalize_s08(a_vec2_normal_delta);\nvec4 clip_space_bevel_normal = u_mat4_mvp * vec4(bevel_normal, 0., 0.);\nvec2 screen_space_bevel_normal = (clip_space_bevel_normal.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_bevel_normal.w) * half_viewport;\nfloat bevel_denominator = max(g_min_denominator, length(screen_space_bevel_normal));\nfloat normal_factor = -dot(screen_space_bevel_normal, screen_space_perp) / denominator / bevel_denominator;\nvec2 wall_normal = multiply_complex(bevel_normal, vec2(normal_delta.x, sign(normal_factor) * normal_delta.y));\nfloat bevel_diffuse = abs(dot(u_vec3_light_direction.xy, bevel_normal));\nfloat wall_diffuse = abs(dot(u_vec3_light_direction.xy, wall_normal));\nfloat diffuse = mix(bevel_diffuse, wall_diffuse, abs(normal_factor));\ngl_Position = g_w_factor * (clip_space_vertex + vec4(screen_space_perp / half_viewport, 0., 0.) * g_shift_pixels * a_float_distance / denominator * clip_space_vertex.w);\nv_vec4_color = vec4(u_vec4_color.rgb * (u_vec3_ambient_color + u_vec3_light_color * diffuse), u_vec4_color.a);\nv_float_distance = a_float_distance * gl_Position.w;\n}\n",packed_attributes:"\nvec2 normalize_s08(vec2 value)\n{\nreturn value * (1. / 127.);\n}\nvec3 normalize_s08(vec3 value)\n{\nreturn value * (1. / 127.);\n}\nfloat normalize_s16(float value)\n{\nreturn value * (1. / 32767.);\n}\nvec2 normalize_s16(vec2 value)\n{\nreturn value * (1. / 32767.);\n}\nvec3 normalize_s16(vec3 value)\n{\nreturn value * (1. / 32767.);\n}\nvec2 unpack_widen(vec2 widen_packed)\n{\nreturn normalize_s08(widen_packed) * sqrt(2.);\n}\nvec2 unpack_texcoord(vec2 texcoord)\n{\nreturn texcoord * (1. / 32768.);\n}\nvec2 unpack_model_texcoord(vec2 texcoord)\n{\nconst float min_value = -3.0;\nconst float max_value = 5.0;\nreturn texcoord * (max_value - min_value) / 65536.0 + min_value;\n}\n",pixel_offset:"\nconst float g_min_denominator = 1e-7;\nconst float g_max_factor = 10000.;\nfloat calculate_multiplication_factor(\nvec2 half_viewport,\nvec4 clip_space_widen,\nvec4 clip_space_widen_perp,\nvec4 clip_space_vertex,\nfloat shift_pixels)\n{\nfloat limited_factor = 0.;\n{\nvec2 screen_space_widen = (clip_space_widen.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_widen.w) * half_viewport;\nvec2 screen_space_widen_perp = (clip_space_widen_perp.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_widen_perp.w) * half_viewport;\nvec2 perp = vec2(screen_space_widen_perp.y, -screen_space_widen_perp.x);\nfloat perp_length = length(perp);\nvec4 v = clip_space_vertex;\nvec4 n = clip_space_widen;\nfloat denominator = dot(perp, screen_space_widen) / shift_pixels - n.w * v.w * perp_length;\nif (abs(denominator) > g_min_denominator)\n{\nfloat factor = v.w * v.w * perp_length / denominator;\nlimited_factor = sign(factor) * min(g_max_factor, abs(factor));\n}\n}\nreturn limited_factor;\n}\n",pointsprite:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_height_factor;\nuniform float u_float_rounding_factor;\nuniform vec2 u_vec2_rotation; \nattribute vec3 a_vec3_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_range;\nattribute vec2 a_vec2_rescale;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\nfloat height = dem_height(a_vec3_position.xy);\n    if (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\nreturn;\n    } \nmat2 rotation_matrix = mat2(\nu_vec2_rotation.x, -u_vec2_rotation.y,\nu_vec2_rotation.y, u_vec2_rotation.x\n);\nvec2 inv_half_size = 2.0 / u_vec2_vpt_size;\nvec4 anchor = apply_height_factor(a_vec3_position, u_float_height_factor);\nanchor.z += height;\nanchor = u_mat4_mvp * anchor;\nvec2 offset = rescale(rotation_matrix * a_vec2_offset, a_vec2_rescale, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y);\nvec2 pos_2d = anchor.xy + overlay_transform(offset, inv_half_size) * anchor.w;\nvec2 corner = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\ngl_Position = vec4(corner, anchor.z, clipw(anchor.w, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y));\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",precision_constants:"\nconst float g_circle_scale_precision_factor = 1e8;\n",striped_line:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_dash_color;\nuniform vec4 u_vec4_space_color;\nuniform vec4 u_vec4_border_color;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_width;\nuniform float u_float_width_offset;\nuniform vec2 u_vec2_scaler_params;\nuniform float u_float_dash_length;\nuniform float u_float_space_length;\nuniform float u_float_dash2_length;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texture_widen;\nattribute vec2 a_vec2_widen;\nattribute float a_float_vertex_distance;\nattribute float a_float_component_distance;\nattribute float a_float_object_length;\nvarying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nPolylineDistance decode_line_distance()\n{\nreturn PolylineDistance(\na_float_vertex_distance,\na_float_component_distance,\na_float_object_length);\n}\nStripedLineInParams decode_line_params(const Scale scale)\n{\nfloat width = calculate_final_width(scale, u_float_width, u_float_width_offset);\nfloat dash_length  = scale.calculation * u_float_dash_length;\nfloat space_length = scale.calculation * u_float_space_length;\nfloat dash2_length = scale.calculation * u_float_dash2_length;\nreturn StripedLineInParams(\ndash_length,\nspace_length,\ndash2_length,\nwidth);\n}\nvoid main()\n{\nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scaler_params);\nStripedLineInParams params = decode_line_params(scale);\nvec2 widen = unpack_widen(a_vec2_widen);\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = u_mat4_mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = u_mat4_mvp * vec4(widen_perp, 0., 0.);\nvec4 clip_space_vertex = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0) + clip_space_widen * params.line_width;\nvec2 half_viewport = 0.5 * u_vec2_vpt_size;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\ng_shift_pixels);\nPolylineDistance distance_decoded = decode_line_distance();\nStripedLineOutParams output_params;\ncalculate_line_params(distance_decoded, params, output_params);\nvec2 texture_widen_with_shift_sign = unpack_widen(a_vec2_texture_widen);\nfloat shift_sign = sign(dot(widen, texture_widen_with_shift_sign));\nvec2 texture_widen = shift_sign * texture_widen_with_shift_sign;\nvec2 texture_widen_perp = vec2(-texture_widen.y, texture_widen.x);\nfloat distance_shift = shift_sign * abs(dot(widen, texture_widen_perp)) * params.line_width;\nfloat circle_factor = g_circle_scale_precision_factor / scale.calculation;\nv_vec2_circle = texture_widen * (params.line_width + limited_factor) * circle_factor;\nv_float_width = params.line_width * circle_factor;\nv_float_part_color_swap_threshold = output_params.part_color_swap_threshold;\nv_float_distance_in_parts = output_params.distance_in_parts;\nv_vec4_dash_color = apply_opacity(u_vec4_dash_color, u_float_opacity);\nv_vec4_space_color = apply_opacity(u_vec4_space_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\ngl_Position = (clip_space_vertex + clip_space_widen * limited_factor) * g_w_factor;\n}\n",striped_line_identify:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_dash_color;\nuniform vec4 u_vec4_space_color;\nuniform vec4 u_vec4_border_color;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_width;\nuniform float u_float_width_offset;\nuniform vec2 u_vec2_scaler_params;\nuniform float u_float_dash_length;\nuniform float u_float_space_length;\nuniform float u_float_dash2_length;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texture_widen;\nattribute vec2 a_vec2_widen;\nattribute float a_float_vertex_distance;\nattribute float a_float_component_distance;\nattribute float a_float_object_length;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvarying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nPolylineDistance decode_line_distance()\n{\nreturn PolylineDistance(\na_float_vertex_distance,\na_float_component_distance,\na_float_object_length);\n}\nStripedLineInParams decode_line_params(const Scale scale)\n{\nfloat width = calculate_final_width(scale, u_float_width, u_float_width_offset);\nfloat dash_length  = scale.calculation * u_float_dash_length;\nfloat space_length = scale.calculation * u_float_space_length;\nfloat dash2_length = scale.calculation * u_float_dash2_length;\nreturn StripedLineInParams(\ndash_length,\nspace_length,\ndash2_length,\nwidth);\n}\nvoid main()\n{\nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scaler_params);\nStripedLineInParams params = decode_line_params(scale);\nvec2 widen = unpack_widen(a_vec2_widen);\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = u_mat4_mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = u_mat4_mvp * vec4(widen_perp, 0., 0.);\nvec4 clip_space_vertex = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0) + clip_space_widen * params.line_width;\nvec2 half_viewport = 0.5 * u_vec2_vpt_size;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\ng_shift_pixels);\nPolylineDistance distance_decoded = decode_line_distance();\nStripedLineOutParams output_params;\ncalculate_line_params(distance_decoded, params, output_params);\nvec2 texture_widen_with_shift_sign = unpack_widen(a_vec2_texture_widen);\nfloat shift_sign = sign(dot(widen, texture_widen_with_shift_sign));\nvec2 texture_widen = shift_sign * texture_widen_with_shift_sign;\nvec2 texture_widen_perp = vec2(-texture_widen.y, texture_widen.x);\nfloat distance_shift = shift_sign * abs(dot(widen, texture_widen_perp)) * params.line_width;\nfloat circle_factor = g_circle_scale_precision_factor / scale.calculation;\nv_vec2_circle = texture_widen * (params.line_width + limited_factor) * circle_factor;\nv_float_width = params.line_width * circle_factor;\nv_float_part_color_swap_threshold = output_params.part_color_swap_threshold;\nv_float_distance_in_parts = output_params.distance_in_parts;\nv_vec4_dash_color = apply_opacity(u_vec4_dash_color, u_float_opacity);\nv_vec4_space_color = apply_opacity(u_vec4_space_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = (clip_space_vertex + clip_space_widen * limited_factor) * g_w_factor;\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",striped_line_functions:"struct PolylineDistance\n{\nfloat vertex_distance_from_start;\nfloat segment_distance_from_start;\nfloat total_length;\n};\nstruct StripedLineInParams\n{\nfloat dash_length;\nfloat space_length;\nfloat dash2_length;\nfloat line_width;\n};\nstruct StripedLineOutParams\n{\nfloat part_color_swap_threshold;\nfloat distance_in_parts;\n};\nvoid calculate_line_params(in PolylineDistance polyline_distance, in StripedLineInParams striped_line_params, out StripedLineOutParams line_params)\n{\nfloat requested_part_length =\nstriped_line_params.dash_length\n+ striped_line_params.space_length;\nfloat space2_length = requested_part_length - striped_line_params.dash2_length;\nfloat min_part_length =\nrequested_part_length\n- 0.5 * min(striped_line_params.space_length, space2_length);\nfloat part_count = max(\nfloor(polyline_distance.total_length / requested_part_length + 0.5),\n1.0);\nfloat part_length = polyline_distance.total_length / part_count;\nfloat dash_length = (part_length / requested_part_length) * striped_line_params.dash2_length;\nfloat part_color_swap_threshold;\nif (polyline_distance.total_length < min_part_length)\n{\ndash_length = part_length;\npart_color_swap_threshold = 1.0;\n}\nelse\n{\npart_color_swap_threshold = dash_length / part_length;\n}\nfloat segment_start = fract((polyline_distance.segment_distance_from_start + 0.5 * dash_length) / part_length);\nfloat vertex_normalized_distance = segment_start + polyline_distance.vertex_distance_from_start / part_length;\nline_params = StripedLineOutParams(\npart_color_swap_threshold,\nvertex_normalized_distance);\n}\n",label_fixed_anchor:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nuniform vec2 u_vec2_offset;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_scale;\nuniform float u_float_height_factor;\nvarying vec2 v_vec2_texcoord;\nvoid main() {\n    float height = dem_height(a_vec4_position.xy);\n    \n    if (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\n        return;\n    }\n    vec4 ndcPosition = apply_height_factor(a_vec4_position.xyz, u_float_height_factor);\n    ndcPosition.z += height;\n    ndcPosition = u_mat4_mvp * ndcPosition;\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += (a_vec2_offset * u_float_scale + u_vec2_offset) / u_vec2_vpt_size * 2.0;\n    gl_Position = ndcPosition;\n    v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",label_fixed_anchor_identify:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec4 a_vec4_identifier;\nuniform vec2 u_vec2_offset;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_scale;\nvarying vec4 v_vec4_identifier;\nvoid main() {\n    float height = dem_height(a_vec4_position.xy);\n    \n    if (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\n        return;\n    }\n    \n    v_vec4_identifier = a_vec4_identifier;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n    {\n        vec4 ndcPosition = u_mat4_mvp * vec4(a_vec4_position.xy, a_vec4_position.z + height, a_vec4_position.w);\n        ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n        ndcPosition.w = 1.0;\n        ndcPosition.xy += (a_vec2_offset * u_float_scale + u_vec2_offset) / u_vec2_vpt_size * 2.0;\n        gl_Position = ndcPosition;\n    }\n    else\n    {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n}\n",label_directional:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_style_zoom_limits;\nuniform float u_float_style_zoom;\nuniform float u_float_scale;\nuniform float u_float_tile_to_pixel_ratio;\nvarying vec2 v_vec2_texcoord;\nfloat clipw(const float w, const vec2 range, const float zoom) {\n    return w * (step(range.x, zoom) - step(range.y, zoom));\n}\nvoid main() {\n    vec4 newPosition = a_vec4_position;\n    newPosition.xy += a_vec2_offset * u_float_scale * u_float_tile_to_pixel_ratio;\n    newPosition = u_mat4_mvp * newPosition;\n    gl_Position = vec4(newPosition.xyz, clipw(newPosition.w, a_vec2_style_zoom_limits, u_float_style_zoom));\n    v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",one_way_line:"uniform vec4 u_vec4_color;\nuniform vec4 u_vec4_border_color;\nuniform mat4 u_mat4_mvp;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform vec2 u_vec2_scale_limits;\nuniform float u_float_border_width;\nuniform float u_float_border_width_offset;\nuniform float u_float_size_factor;\nuniform mediump float u_float_width;\nuniform mediump float u_float_length;\nuniform float u_float_wing_width_multiplier;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_direction;\nattribute vec2 a_vec2_widen_direction;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_texcoord;\nvarying float v_float_border_width;\nvarying float v_float_zpt_to_texcoord_factor;\nvarying float v_float_outer_width;\nvarying float v_float_opacity;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nvoid main()\n{\nfloat style_scale_clamped = clamp(u_vec3_projection_scale_style_scale_dpi.y, u_vec2_scale_limits.x, u_vec2_scale_limits.y);\nfloat scale_ratio = u_vec3_projection_scale_style_scale_dpi.x / u_vec3_projection_scale_style_scale_dpi.y;\nfloat calculation_scale = style_scale_clamped * scale_ratio;\nArrowParameters arrow_parameters = calculate_arrow_parameters(\ncalculation_scale,\nu_float_width,\nu_float_border_width,\nu_float_length,\nu_float_wing_width_multiplier,\nu_float_size_factor);\nv_float_zpt_to_texcoord_factor = arrow_parameters.zpt_to_texcoord_factor;\nv_float_outer_width = arrow_parameters.outer_width;\nvec2 direction = normalize_s08(a_vec2_direction);\nvec2 untransformed_widen = a_vec2_widen_direction * arrow_parameters.widen_size;\nvec2 widen = multiply_complex(untransformed_widen * arrow_parameters.final_size, direction);\nfloat shift_pixels = g_shift_pixels * sqrt(2.) / min(abs(untransformed_widen.x), abs(untransformed_widen.y));\nVertexShiftParameters shift_parameters = calculate_vertex_shift_parameters(\nu_mat4_mvp,\nu_vec2_vpt_size,\na_vec2_position,\nwiden,\nshift_pixels);\ngl_Position = shift_parameters.clip_space_vertex / arrow_parameters.final_size * g_w_factor;\nv_vec2_texcoord = untransformed_widen * (1. + shift_parameters.limited_factor);\nfloat border_width = u_float_border_width * v_float_zpt_to_texcoord_factor;\nfloat border_width_offset = u_float_border_width_offset * v_float_zpt_to_texcoord_factor;\nv_float_border_width = max(0., border_width - u_vec3_projection_scale_style_scale_dpi.y / style_scale_clamped * border_width_offset);\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\nv_float_opacity = u_float_opacity;\n}\n",round_position:"\nvec4 round_position(const vec4 position, const vec2 half_viewport)\n{\nif (\nposition.w < 0.\n|| position.x < -position.w\n|| position.x > position.w\n|| position.y < -position.w\n|| position.y > position.w\n|| position.z < -position.w\n|| position.z > position.w)\n{\nreturn position;\n}\nelse\n{\nreturn vec4(\nsign(position.xy) * floor(abs(position.xy) * half_viewport / position.w + .5)\n* position.w / half_viewport,\nposition.zw);\n}\n}\n",color_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nattribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = round_position(u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.), .5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",model_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_identifier;\nattribute vec2 a_vec2_dem_position;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nfloat height = dem_height(a_vec2_dem_position);\nif (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\nreturn;\n    }\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = round_position(u_mat4_mvp * vec4(a_vec3_vertex.xy, a_vec3_vertex.z + height, 1.), .5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",pointsprite_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_height_factor;\nuniform vec2 u_vec2_rotation; \nattribute vec3 a_vec3_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_range;\nattribute vec2 a_vec2_rescale;\nattribute vec4 a_vec4_identifier;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\nfloat height = dem_height(a_vec3_position.xy);\nif (height == DEM_INVALID_VALUE) {\ngl_Position = vec4(0, 0, 0, 0);\nreturn;\n} \nmat2 rotation_matrix = mat2(\nu_vec2_rotation.x, -u_vec2_rotation.y,\nu_vec2_rotation.y, u_vec2_rotation.x\n);\nvec2 inv_half_size = 2.0 / u_vec2_vpt_size;\nvec4 anchor = apply_height_factor(a_vec3_position, u_float_height_factor);\nanchor.z += height;\nanchor = u_mat4_mvp * anchor;\nvec2 offset = rescale(rotation_matrix * a_vec2_offset, a_vec2_rescale, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y);\nvec2 pos_2d = anchor.xy + overlay_transform(offset, inv_half_size) * anchor.w;\nvec2 corner = make_position(pos_2d, anchor.w, inv_half_size, 1.0);\ngl_Position = vec4(corner, anchor.z, clipw(anchor.w, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y));\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\nv_vec4_identifier = a_vec4_identifier;\n}\n",model:"uniform mat4 u_mat4_mvp;\nuniform float u_float_height_factor;\nattribute vec3 a_vec3_vertex;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_dem_position;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\nfloat height = dem_height(a_vec2_dem_position);\nif (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\nreturn;\n    }\nv_vec2_texcoord = unpack_model_texcoord(a_vec2_texcoord);\nvec4 vh = apply_height_factor(a_vec3_vertex, u_float_height_factor);\nvh.z += height;\ngl_Position = u_mat4_mvp * vh;\n}\n",simple_line:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nuniform float u_float_height_factor;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_z_offset;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_direction_distance;\nattribute vec2 a_vec2_dem_position;\nvarying float v_float_distance;\nvarying float v_float_distance_offset;\nconst float g_smooth_width = 1.;\nconst float g_min_denominator = 1e-4;\nconst float g_w_factor = 1e-6;\nvoid main()\n{\nfloat height = dem_height(a_vec2_dem_position);\n    if (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\nreturn;\n    } \nfloat shift_pixels = 0.5 * max(u_float_width - 1., 0.);\nfloat shift_pixels_added = shift_pixels + g_smooth_width;\nvec3 direction = a_vec4_direction_distance.xyz;\nfloat distance = a_vec4_direction_distance.w;\nvec2 half_viewport = u_vec2_vpt_size / vec2(2.);\nvec4 clip_space_direction = normalize(u_mat4_mvp * vec4(normalize_s08(direction), 0.));\nvec4 clip_space_vertex = apply_height_factor(a_vec3_vertex, u_float_height_factor);\nclip_space_vertex.z += height;\nclip_space_vertex = apply_z_limitation(\nclip_space_vertex,\nu_float_tile_height, u_float_height_limitation\n);\nclip_space_vertex.z = max(clip_space_vertex.z, height);\nclip_space_vertex = u_mat4_mvp * clip_space_vertex;\nvec2 screen_space_direction =\n(clip_space_direction.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_direction.w) * half_viewport;\nvec2 screen_space_perp = vec2(-screen_space_direction.y, screen_space_direction.x);\nfloat denominator = max(g_min_denominator, length(screen_space_perp));\ngl_Position = g_w_factor * (clip_space_vertex + vec4(screen_space_perp / half_viewport, 0., 0.)\n* distance * shift_pixels_added / denominator * clip_space_vertex.w);\ngl_Position.z += u_float_z_offset;\nv_float_distance = shift_pixels_added * distance * gl_Position.w;\nv_float_distance_offset = shift_pixels;\n}\n",arrow_line_entrance:"uniform vec4 u_vec4_color;\nuniform vec4 u_vec4_border_color;\nuniform mat4 u_mat4_mvp;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform vec2 u_vec2_scale_limits;\nuniform float u_float_width_zpt;\nuniform float u_float_wing_width_multiplier;\nuniform float u_float_border_width_zpt;\nuniform float u_float_size_factor;\nuniform float u_float_border_width_offset;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_relative_end_position;\nuniform float u_float_tip_movement_amplitude;\nuniform float u_float_vertex_shift; \nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_segment_end;\nattribute vec4 a_vec4_texture_widen_arrow_widen;\nattribute vec2 a_vec2_widen;\nattribute vec2 a_vec2_direction; \nattribute float a_float_distance_from_start;\nattribute float a_float_object_length;\nattribute float a_float_type;\nattribute vec4 a_vec4_identifier; \nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_arrow_width_length_border_outer;\nvarying vec4 v_vec4_texcoord_arrow_line;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_identifier;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nconst float g_w_factor = 1e-7;\nconst float g_type_line = 0.;\nconst float g_type_arrow = 1.;\nconst float g_type_start_border = 2.;\nconst float g_type_line_ending = 3.;\nconst float g_type_line_cut = 4.;\nconst float g_shift_pixels = 2.;\nconst float g_line_overlapping_part = .2;\nstruct ArrowLineViewParameters\n{\nfloat vertex_type;\nfloat width_zpt;\nfloat border_width_zpt;\nfloat border_width_offset;\nfloat arrow_segment_length_zpt;\nfloat wing_width_multiplier;\nfloat size_factor;\nvec2 vertex_position;\nvec2 vertex_widen;\nvec2 line_texture_widen;\nvec2 arrow_texture_widen;\nvec2 segment_direction;\nfloat segment_length;\nfloat distance_to_end;\n};\nstruct DistanceShiftParameters\n{\nfloat shift;\nbool invisible;\n};\nvec2 perp(const vec2 vector)\n{\nreturn vec2(-vector.y, vector.x);\n}\nvec2 vertex_shift(const Scale scale)\n{\nreturn u_float_vertex_shift * u_float_tip_movement_amplitude * normalize_s08(a_vec2_direction) * scale.calculation;\n}\nvec2 arrow_shift(const ArrowLineViewParameters view)\n{\nreturn view.segment_direction * view.distance_to_end;\n}\nfloat erase_length_end()\n{\nreturn clamp(u_float_relative_end_position, 0., 1.) * a_float_object_length;\n}\nvoid set_texcoord_varyings(const vec2 arrow_texcoord, const vec2 line_texcoord)\n{\nv_vec4_texcoord_arrow_line = vec4(arrow_texcoord, line_texcoord);\n}\nvoid set_arrow_varyings(\nconst float arrow_width,\nconst float arrow_length,\nconst float arrow_border,\nconst float arrow_outer_width,\nconst float arrow_tail_hide_part)\n{\nv_vec4_arrow_width_length_border_outer = vec4(\narrow_width,\narrow_length,\narrow_border,\narrow_outer_width);\nv_vec2_line_type_arrow_tail = vec2(\na_float_type,\narrow_tail_hide_part);\n}\nDistanceShiftParameters calculate_entrance_arrow_distances(\nconst ArrowLineViewParameters view,\nconst float signed_distance_shift,\nconst float arrow_final_size,\nconst float entrance_arrow_distance_shift)\n{\nDistanceShiftParameters line_distance_parameters = DistanceShiftParameters(\nsigned_distance_shift + entrance_arrow_distance_shift,\nfalse);\nif (a_float_type == g_type_arrow)\n{\nbool outside_of_current_segment = view.distance_to_end > view.segment_length + entrance_arrow_distance_shift;\nbool inside_end_hide = a_float_distance_from_start + entrance_arrow_distance_shift > erase_length_end();\nreturn DistanceShiftParameters(\nline_distance_parameters.shift + view.distance_to_end,\noutside_of_current_segment || inside_end_hide\n);\n}\nelse\n{\nreturn line_distance_parameters;\n}\n}\nvoid set_distance_varyings(\nconst ArrowLineViewParameters view,\nconst float arrow_final_size,\nconst float signed_shift_distance)\n{\nfloat entrance_arrow_distance_shift = arrow_final_size * (2. - g_line_overlapping_part);\nDistanceShiftParameters distance_shift_parameters = calculate_entrance_arrow_distances(\nview,\nsigned_shift_distance,\narrow_final_size,\nentrance_arrow_distance_shift);\nv_vec4_distance_vertex_hiding =\nvec4(\na_float_distance_from_start + distance_shift_parameters.shift,\n0.,\nerase_length_end(),\ndistance_shift_parameters.invisible\n? a_float_object_length\n: 0.\n) / a_float_object_length;\n}\nArrowLineViewParameters decode_arrow_line_view_parameters()\n{\nfloat width_zpt = u_float_width_zpt;\nfloat border_width_zpt = u_float_border_width_zpt;\nfloat arrow_segment_length_zpt = width_zpt * u_float_tip_height_multiplier + border_width_zpt;\nfloat vertex_type = a_float_type;\nvec2 segment_direction = (vertex_type == g_type_line_ending || vertex_type == g_type_line_cut)\n? normalize(a_vec2_vertex - a_vec2_segment_end)\n: normalize(a_vec2_segment_end - a_vec2_vertex);\nfloat segment_length = length(a_vec2_segment_end - a_vec2_vertex);\nfloat distance_to_end = erase_length_end() - a_float_distance_from_start;\nreturn ArrowLineViewParameters(\nvertex_type,\nwidth_zpt,\nborder_width_zpt,\nu_float_border_width_offset,\narrow_segment_length_zpt,\nu_float_wing_width_multiplier,\nu_float_size_factor,\na_vec2_vertex,\nunpack_widen(a_vec2_widen),\nunpack_widen(a_vec4_texture_widen_arrow_widen.xy),\nunpack_widen(a_vec4_texture_widen_arrow_widen.zw),\nsegment_direction,\nsegment_length,\ndistance_to_end);\n}\nvec4 process_arrow_line_vertex(const Scale scale, const mat4 mvp, const vec2 vpt_size)\n{\nArrowLineViewParameters view = decode_arrow_line_view_parameters();\nArrowParameters arrow_parameters = calculate_arrow_parameters(\nscale.calculation,\nview.width_zpt,\nview.border_width_zpt,\nview.arrow_segment_length_zpt,\nview.wing_width_multiplier,\nview.size_factor);\nvec2 vertex_widen = view.vertex_widen;\nvec2 texture_widen_with_sign = view.line_texture_widen;\nfloat shift_sign = sign(dot(vertex_widen, texture_widen_with_sign));\nvec2 line_texture_widen = shift_sign * texture_widen_with_sign;\nfloat line_final_size = (view.width_zpt + 2. * view.border_width_zpt) * view.size_factor * scale.calculation;\nfloat final_size = (view.vertex_type == g_type_arrow)\n? arrow_parameters.final_size\n: line_final_size;\nvec2 line_texture_widen_perp = perp(line_texture_widen);\nfloat shift_distance = abs(dot(vertex_widen, line_texture_widen_perp)) * final_size;\nvec2 shift_direction = line_texture_widen_perp * sign(dot(vertex_widen, line_texture_widen_perp));\nvec2 line_vertex_shift = vertex_widen * final_size - shift_direction * max(0., shift_distance - .5 * view.segment_length);\nvec2 arrow_vertex_widen = vertex_widen * arrow_parameters.final_size;\nvec2 scene_vertex_shift = (view.vertex_type == g_type_arrow)\n? arrow_vertex_widen\n: line_vertex_shift;\nvec2 arrow_position_shift = (view.vertex_type == g_type_arrow)\n? arrow_shift(view)\n: vec2(0.);\nfloat shift_pixels = g_shift_pixels * sqrt(2.);\nVertexShiftParameters line_shift_parameters = calculate_vertex_shift_parameters(\nmvp,\nvpt_size,\nview.vertex_position + (vertex_shift(scale) + arrow_position_shift),\nscene_vertex_shift,\nshift_pixels);\nfloat arrow_line_texcoord_scale = line_final_size / arrow_parameters.final_size;\nfloat line_texcoord_scale = (view.vertex_type != g_type_arrow)\n? arrow_line_texcoord_scale\n: 1.;\nvec2 line_texcoord = line_texture_widen * (1. + line_shift_parameters.limited_factor) * line_texcoord_scale;\nfloat arrow_texcoord_scale = (view.vertex_type == g_type_start_border)\n? arrow_line_texcoord_scale\n: 1.;\nvec2 arrow_texcoord = view.arrow_texture_widen * (1. + line_shift_parameters.limited_factor) * arrow_texcoord_scale;\nset_texcoord_varyings(arrow_texcoord, line_texcoord);\nfloat arrow_width = view.width_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat arrow_length = view.arrow_segment_length_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat texcoord_border_width = view.border_width_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat border_width_texcoord_offset = view.border_width_offset * arrow_parameters.zpt_to_texcoord_factor;\nfloat arrow_border = max(0., texcoord_border_width - scale.style / scale.style_clamped * border_width_texcoord_offset);\nfloat tail_shift_direction = (view.vertex_type == g_type_line_ending || view.vertex_type == g_type_start_border) ? 1. : -1.;\nfloat tail_hide_shift = dot(arrow_vertex_widen, tail_shift_direction * view.segment_direction);\nfloat arrow_tail_hide_part = (view.distance_to_end - tail_hide_shift) * arrow_parameters.zpt_to_texcoord_factor / view.size_factor;\nset_arrow_varyings(\narrow_width,\narrow_length,\narrow_border,\narrow_parameters.outer_width,\narrow_tail_hide_part);\nset_distance_varyings(\nview,\narrow_parameters.final_size,\nshift_sign * shift_distance);\nreturn line_shift_parameters.clip_space_vertex / final_size;\n}\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier; \nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scale_limits);\nvec4 processed_vertex = process_arrow_line_vertex(scale, u_mat4_mvp, u_vec2_vpt_size);\ngl_Position = processed_vertex * g_w_factor;\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\n}\n",diffuse_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_identifier;\nattribute vec2 a_vec2_dem_position;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nfloat height = dem_height(a_vec2_dem_position);\nif (height == DEM_INVALID_VALUE) {\n        gl_Position = vec4(0, 0, 0, 0);\nreturn;\n    }\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\nvec4 vertex_hf = apply_height_factor(a_vec3_vertex, u_float_height_factor);\nvertex_hf.z += height;\nvertex_hf = apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation);\nvertex_hf.z = max(vertex_hf.z, height);\ngl_Position = round_position(\nu_mat4_mvp * vertex_hf,\n.5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",calculate_scale:"struct Scale\n{\nfloat projection;\nfloat style;\nfloat style_clamped;\nfloat calculation;\n};\nScale calculate_scale(const vec3 projection_scale_style_scale_dpi, const vec2 scale_limits)\n{\nfloat style_scale_clamped = clamp(projection_scale_style_scale_dpi.y, scale_limits.x, scale_limits.y);\nfloat scale_ratio = projection_scale_style_scale_dpi.x / projection_scale_style_scale_dpi.y;\nfloat calculation_scale = style_scale_clamped * scale_ratio;\nreturn Scale(\nprojection_scale_style_scale_dpi.x,\nprojection_scale_style_scale_dpi.y,\nstyle_scale_clamped,\ncalculation_scale);\n}\nconst float g_min_scale_factor = 1e-2;\nconst float g_max_scale_factor = 1e2;\nconst float g_base_scale_numerator = 1e2;\nfloat normalize_scale_to_tile(const float scale, const float tile_size)\n{\nreturn clamp(\n    (scale - g_min_scale_factor) / (tile_size - g_min_scale_factor),\n    g_min_scale_factor,\n    g_max_scale_factor);\n}",line_width:"float calculate_final_width(\nconst Scale scale,\nconst float width,\nconst float width_offset)\n{\nfloat final_width = max(0., scale.calculation * width - scale.projection * width_offset);\nreturn final_width;\n}\n",arrow_functions:"\nvec2 multiply_complex(const vec2 lhs, const vec2 rhs)\n{\nreturn vec2(lhs.x * rhs.x - lhs.y * rhs.y, lhs.x * rhs.y + lhs.y * rhs.x);\n}\nstruct ArrowParameters\n{\nfloat zpt_to_texcoord_factor;\nfloat final_size;\nfloat outer_width;\nvec2 widen_size;\n};\nArrowParameters calculate_arrow_parameters(\nconst float calculation_scale,\nconst float width_zpt,\nconst float border_width_zpt,\nconst float segment_length_zpt,\nconst float wing_width_multiplier,\nconst float size_factor)\n{\nfloat quad_width = 2.0 * border_width_zpt + 2.0 * wing_width_multiplier * width_zpt;\nfloat quad_height = 2.0 * border_width_zpt + segment_length_zpt;\nfloat max_quad_dimension = max(quad_width, quad_height);\nfloat zpt_to_texcoord_factor = 2.0 / max_quad_dimension;\nfloat final_size = calculation_scale * size_factor * max_quad_dimension;\nvec2 widen_size = 0.5 * vec2(quad_height, quad_width) * zpt_to_texcoord_factor;\nfloat outer_width = (width_zpt * wing_width_multiplier + border_width_zpt) * zpt_to_texcoord_factor;\nreturn ArrowParameters(\nzpt_to_texcoord_factor,\nfinal_size,\nouter_width,\nwiden_size);\n}\nstruct VertexShiftParameters\n{\nvec4 clip_space_vertex;\nfloat limited_factor;\n};\nVertexShiftParameters calculate_vertex_shift_parameters(\nconst mat4 mvp,\nconst vec2 vpt_size,\nconst vec2 vertex,\nconst vec2 widen,\nconst float shift_pixels)\n{\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = mvp * vec4(widen_perp, 0., 0.);\nvec2 half_viewport = vpt_size / 2.;\nvec4 clip_space_vertex = mvp * vec4(vertex, 0.0, 1.0) + clip_space_widen;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\nshift_pixels);\nreturn VertexShiftParameters(\nclip_space_vertex + clip_space_widen * limited_factor,\nlimited_factor);\n}\n",circle_marker:"attribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_widen;\nuniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvoid main() {\n    vec4 clip_space_position = u_mat4_mvp * a_vec4_vertex;\n    vec4 ndc_position = clip_space_position / clip_space_position.w;\n    ndc_position.xy += a_vec2_widen * u_float_width / u_vec2_vpt_size;\n    gl_Position = ndc_position;\n    v_vec2_circle = a_vec2_widen;\n    v_float_width = u_float_width;\n}\n",circle_marker_identify:"attribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_widen;\nattribute vec4 a_vec4_identifier;\nuniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nvarying vec2 v_vec2_circle;\nvarying vec4 v_vec4_identifier;\nvoid main() {\n    v_vec2_circle = a_vec2_widen;\n    v_vec4_identifier = a_vec4_identifier;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n    {\n        vec4 clip_space_position = u_mat4_mvp * a_vec4_vertex;\n        vec4 ndc_position = clip_space_position / clip_space_position.w;\n        ndc_position.xy += a_vec2_widen * u_float_width / u_vec2_vpt_size;\n        gl_Position = ndc_position;\n    }\n    else\n    {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n}\n",raster_functions:"\nfloat unpack_scale(float value)\n{\nreturn exp(abs(value) / 256.) * sign(value);\n}\nfloat unpack_positive_value(float value)\n{\nreturn exp(value / 256.);\n}\nvec2 make_position(const vec2 position, const float w, const vec2 inv_half_size, const float rounding_factor)\n{\nvec2 non_rounded_position = (position + w) / (w * inv_half_size);\nvec2 rounded_position = floor(non_rounded_position + 0.5);\nvec2 rounding_delta = rounded_position - non_rounded_position;\nvec2 pixel_coord = non_rounded_position + rounding_factor * rounding_delta - 0.5;\nreturn (pixel_coord * inv_half_size) * w - w;\n}\nvec2 overlay_transform(const vec2 position, const vec2 inv_half_size)\n{\nreturn position * inv_half_size;\n}\nfloat clipw(const float w, const vec2 range, const float scale)\n{\nreturn w * (step(unpack_scale(range.x), scale) - step(unpack_positive_value(range.y), scale));\n}\nvec2 rescale(const vec2 corner, const vec2 rescale, const vec2 scale_range, const float style_scale)\n{\nif (scale_range.x < 0.)\n{\nfloat default_scale_denominator = unpack_positive_value(rescale.x);\nfloat rescale_coeff = unpack_positive_value(rescale.y);\nfloat min_scale = unpack_positive_value(-scale_range.x);\nfloat stretch_exponent = floor(0.5 + log2(\nmax(1., 1. + rescale_coeff * (1. / max(min_scale, style_scale) - default_scale_denominator))));\nreturn corner.xy * exp2(stretch_exponent);\n}\nreturn corner;\n}\n",road:"attribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_normals;\nattribute vec2 a_vec2_shift;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_width;\nuniform float u_float_tile_to_pixel_ratio;\nuniform float u_float_shift;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nconst float g_w_factor = 1e-6;\nconst float normal_unpack_multiplier = 0.011135539861205473;\nvoid main()\n{\n    \n    float half_width = 0.5 * (u_float_width + 1.0);\n    \n    vec4 normals = a_vec4_normals * normal_unpack_multiplier * half_width;\n    vec2 extender = normals.xy;\n    vec2 normal = normals.zw;\n    vec2 shift = a_vec2_shift * u_float_shift;\n    \n    vec4 shifted_vertex = vec4(a_vec2_vertex + (shift + extender) * u_float_tile_to_pixel_ratio, 0.0, 1.0);\n    gl_Position = g_w_factor * u_mat4_mvp * shifted_vertex;\n    v_vec2_normal = normal;\n    v_float_half_width = half_width;\n}\n",road_identify:"attribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_normals;\nattribute vec4 a_vec4_identifier;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_width;\nuniform float u_float_tile_to_pixel_ratio;\nvarying vec2 v_vec2_normal;\nvarying vec4 v_vec4_identifier;\nvarying float v_float_half_width;\nconst float g_w_factor = 1e-6;\nconst float normal_unpack_multiplier = 0.011135539861205473;\nvoid main()\n{\n    \n    float half_width = 0.5 * (u_float_width + 1.0);\n    \n    vec4 normals = a_vec4_normals * normal_unpack_multiplier * half_width;\n    vec2 extender = normals.xy;\n    vec2 normal = normals.zw;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier) {\n        \n        vec4 shifted_vertex = vec4(a_vec2_vertex + extender * u_float_tile_to_pixel_ratio, 0.0, 1.0);\n        gl_Position = g_w_factor * u_mat4_mvp * shifted_vertex;\n    } else {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n    v_vec2_normal = normal;\n    v_vec4_identifier = a_vec4_identifier;\n    v_float_half_width = half_width;\n}\n",stretchable_image:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_rounding_factor;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  vec2 inv_half_size = 2.0 / u_vec2_vpt_size;\n  vec4 anchor = u_mat4_mvp * vec4(a_vec2_position, 0.0, 1.0);\n  vec2 pos_2d = anchor.xy + overlay_transform(a_vec2_offset, inv_half_size) * anchor.w;\nvec2 pos_2d_rounded = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\n  gl_Position = vec4(pos_2d_rounded, anchor.z, anchor.w);\n  v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",stretchable_image_identify:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_rounding_factor;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec4 a_vec4_identifier;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\n  if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n  {\n    vec2 inv_half_size = 2.0 / u_vec2_vpt_size;\n    vec4 anchor = u_mat4_mvp * vec4(a_vec2_position, 0.0, 1.0);\n    vec2 pos_2d = anchor.xy + overlay_transform(a_vec2_offset, inv_half_size) * anchor.w;\n  vec2 pos_2d_rounded = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\n    gl_Position = vec4(pos_2d_rounded, anchor.z, anchor.w);\n  }\n  else\n  {\n    gl_Position = vec4(1., 1., 1., 1.);\n  }\n  v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n  v_vec4_identifier = a_vec4_identifier;\n}\n",rect:"uniform mat4 u_mat4_mvp;\nattribute vec2 a_vec2_vertex;\nvoid main()\n{\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\n}\n",rect_with_texture:"uniform mat4 u_mat4_mvp;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",heatmap:"attribute vec2 a_vec2_position;\nattribute vec2 a_vec2_widen;\nattribute float a_float_weight;\nvarying vec2 v_vec2_extrude;\nvarying float v_float_weight;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_radius;\nuniform float u_float_intensity;\nuniform float u_float_tile_to_pixel_ratio;\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n    float S = sqrt(-2.0 * log(ZERO / a_float_weight / u_float_intensity / GAUSS_COEF)) / 3.0;\n    v_vec2_extrude = S * a_vec2_widen;\n    v_float_weight = a_float_weight;\n    vec2 pos = a_vec2_position + a_vec2_widen * u_float_radius * u_float_tile_to_pixel_ratio;\n    gl_Position = u_mat4_mvp * vec4(pos, 0.0, 1.0);\n}",heatmap_texture:"attribute vec2 a_vec2_position;\nvarying vec2 v_vec2_position;\nvoid main() {\n    gl_Position = vec4(a_vec2_position, 0.0, 1.0);\n    v_vec2_position = clamp(a_vec2_position, vec2(0,0), vec2(1,1));\n}",dem_mesh:"uniform mat4 u_mat4_mvp;\nuniform float u_flat_tex_ext;\nattribute vec2 a_vec2_position;\nvarying vec3 v_vec3_texcoord;\nvarying float v_float_hillshade;\nvoid main()\n{\nvec4 coords = u_mat4_mvp * vec4(a_vec2_position, 0.0, 1.0);\nvec2 tex_pos = (coords.xy / coords.w + vec2(1, 1)) / 2.;\nfloat denom = 1. + u_flat_tex_ext;\ntex_pos.y /= denom;\ntex_pos.y += u_flat_tex_ext / denom;\nfloat height = dem_height(a_vec2_position);\nif (height == DEM_INVALID_VALUE) {\ngl_Position = coords;\nv_vec3_texcoord = vec3(tex_pos, 0);\nv_float_hillshade = 0.;\n} else {\ngl_Position = u_mat4_mvp * vec4(a_vec2_position, height, 1.0);\nv_vec3_texcoord = vec3(tex_pos, 1);\nv_float_hillshade = dem_hillshade(a_vec2_position);\n}\n}",dem:"\nuniform sampler2D u_tex_dem;\nuniform float u_float_dem_resolution;\nuniform float u_float_dem_cell_size;\nuniform float u_float_dem_light_direction;\nuniform mat4 u_mat4_dem_mvp;\nuniform float u_float_dem_scale;\nuniform float u_float_map_center_elevation;\nconst float DEM_INVALID_VALUE = -9999.;\nconst float METERS_TO_MAP_POINTS = 107.17323258889581;\nconst float TILE_HEIGHT = 1048576.;\nconst float METERS_TO_TILE = METERS_TO_MAP_POINTS / TILE_HEIGHT;\nconst float M_PI = 3.1415926535897932384626433832795;\nconst float zenith = 45. * M_PI / 180.;\nfloat tex_step = 1. / u_float_dem_resolution;\nfloat dem_height(const vec2 coords) {\nif (u_float_dem_scale == 0.) {\nreturn 0.;\n}\nvec4 tex_pos = u_mat4_dem_mvp * vec4(coords, 0.0, 1.0);\nvec4 elevation = texture2D(u_tex_dem, tex_pos.xy);\nif (elevation.a == 0.) {\nreturn DEM_INVALID_VALUE;\n} else {\nreturn u_float_dem_scale * METERS_TO_TILE * (elevation.r - u_float_map_center_elevation);\n}\n}\nmat3 get_kernel(vec2 pos, float step, float defval) {\nmat3 kernel;\nfor (int x = 0; x < 3; x++) {\nvec3 col;\nfor (int y = 0; y < 3; y++) {\ncol[y] = texture2D(u_tex_dem, vec2(pos.x + float(x - 1) * step, pos.y + float(y - 1) * step)).r;\nif (col[y] == DEM_INVALID_VALUE) {\ncol[y] = defval;\n}\n}\nkernel[x] = col;\n}\nreturn kernel;\n}\nfloat calc_aspect(mat3 kernel) {\n    float dzdx = ((kernel[2].z + 2.0 * kernel[2].y + kernel[2].x) - (kernel[0].z + 2.0 * kernel[0].y + kernel[0].x)) / 8.;\n    float dzdy = ((kernel[0].x + 2.0 * kernel[1].x + kernel[2].x) - (kernel[0].z + 2.0 * kernel[1].z + kernel[2].z)) / 8.;\n    return atan(-dzdx, dzdy);\n}\nfloat calc_slope(mat3 kernel, float cell_size) {\n    float dzdx = ((kernel[2].z + 2. * kernel[2].y + kernel[2].x) - (kernel[0].z + 2. * kernel[0].y + kernel[0].x)) / (8. * cell_size);\n    float dzdy = ((kernel[0].x + 2. * kernel[1].x + kernel[2].x) - (kernel[0].z + 2. * kernel[1].z + kernel[2].z)) / (8. * cell_size);\n    float rise_run = sqrt(dzdx * dzdx + dzdy * dzdy);\n    return atan(rise_run);\n}\nfloat dem_hillshade(const vec2 coords)\n{\nif (u_float_dem_scale == 0.) {\nreturn 0.;\n}\nvec4 tex_pos = u_mat4_dem_mvp * vec4(coords, 0.0, 1.0);\nvec4 e = texture2D(u_tex_dem, tex_pos.xy);\nif (e.a == 0. || e.r == DEM_INVALID_VALUE) {\nreturn 0.;\n}\nmat3 kernel = get_kernel(tex_pos.xy, tex_step, e.r);\nfloat aspect = calc_aspect(kernel);\n    float slope = calc_slope(kernel, u_float_dem_cell_size);\nfloat azimuth = u_float_dem_light_direction;\nreturn (cos(zenith) * cos(slope)) + \n             (sin(zenith) * sin(slope) * cos(azimuth - aspect));\n}",dem_elevation:"uniform mat4 u_mat4_mvp;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}"},Dr={color:["apply_opacity","color"],diffuse:["dem","packed_attributes","apply_height_factor","apply_opacity","diffuse"],line:["dem","packed_attributes","apply_height_factor","apply_opacity","line"],pointSprite:["dem","packed_attributes","apply_height_factor","raster_functions","pointsprite"],labelPoint:["dem","packed_attributes","apply_height_factor","label_fixed_anchor"],labelPointIdentify:["dem","label_fixed_anchor_identify"],labelLine:["packed_attributes","label_directional"],stripedLine:["packed_attributes","pixel_offset","calculate_scale","line_width","apply_opacity","precision_constants","striped_line_functions","striped_line"],stripedLineIdentify:["packed_attributes","pixel_offset","calculate_scale","line_width","apply_opacity","precision_constants","striped_line_functions","striped_line_identify"],oneWayLine:["packed_attributes","pixel_offset","arrow_functions","apply_opacity","one_way_line"],colorIdentify:["round_position","color_identify"],modelIdentify:["dem","round_position","model_identify"],buildingIdentify:["dem","round_position","apply_height_factor","diffuse_identify"],pointSpriteIdentify:["dem","packed_attributes","apply_height_factor","raster_functions","pointsprite_identify"],model:["dem","packed_attributes","apply_height_factor","model"],simpleLine:["dem","packed_attributes","apply_height_factor","simple_line"],entranceArrow:["packed_attributes","pixel_offset","arrow_functions","calculate_scale","apply_opacity","arrow_line_entrance"],circleMarker:["circle_marker"],circleMarkerIdentify:["circle_marker_identify"],rect:["rect"],road:["road"],roadIdentify:["road_identify"],rectWithTexture:["packed_attributes","apply_opacity","raster_functions","rect_with_texture"],stretchableImage:["packed_attributes","raster_functions","stretchable_image"],stretchableImageIdentify:["packed_attributes","raster_functions","stretchable_image_identify"],heatmap:["heatmap"],heatmapTexture:["heatmap_texture"],demMesh:["dem","dem_mesh"],demElevation:["packed_attributes","dem_elevation"]},Fr={color:["lowp_float","color"],line:["mediump_float","line"],pointSprite:["mediump_float","apply_opacity","pointsprite"],label:["mediump_float","apply_opacity","label"],stripedLine:["enable_standard_derivatives","mediump_float","affine_step","striped_line"],oneWayLine:["enable_standard_derivatives","mediump_float","affine_step","apply_opacity","arrow_functions","one_way_line"],colorIdentify:["lowp_float","color_identify"],pointSpriteIdentify:["mediump_float","pointsprite_identify"],model:["lowp_float","model"],simpleLine:["lowp_float","simple_line"],entranceArrow:["enable_standard_derivatives","highp_float","affine_step","arrow_functions","circle_functions","arrow_line"],entranceArrowIdentify:["lowp_float","arrow_line_identify"],circleMarker:["mediump_float","affine_step","circle_marker"],rect:["lowp_float","rect"],road:["enable_standard_derivatives","mediump_float","affine_step","road"],roadIdentify:["enable_standard_derivatives","lowp_float","road_identify"],stretchableImage:["mediump_float","stretchable_image"],rectWithTexture:["mediump_float","apply_opacity","rect_with_texture"],stretchableImageIdentify:["mediump_float","stretchable_image_identify"],heatmap:["mediump_float","heatmap"],heatmapTexture:["mediump_float","heatmap_texture"],demMesh:["highp_float","dem_mesh"],demElevation:["highp_float","dem_elevation"]},Rr={},Or={};for(var jr in Dr){var Br=Dr[jr].map((function(t){return Ar[t]}));Or[jr]=Br}for(var jr in Fr)Br=Fr[jr].map((function(t){return Cr[t]})),Rr[jr]=Br;function Ur(t){return new Nn("vertex",Or[t])}function Zr(t){return new Nn("fragment",Rr[t])}var Nr=[{name:"u_tex_dem",type:"1i"},{name:"u_tex_hillshade_ramp",type:"1i"},{name:"u_mat4_dem_mvp",type:"mat4"},{name:"u_float_dem_scale",type:"1f"},{name:"u_float_dem_resolution",type:"1f"},{name:"u_float_dem_cell_size",type:"1f"},{name:"u_float_dem_light_direction",type:"1f"},{name:"u_float_dem_shade_intension",type:"1f"},{name:"u_float_map_center_elevation",type:"1f"}],Hr=n(2241),Gr=function(t,e){var n=e.renderer.getRenderingContext();return{drawSymbol:Wr,useProgram:function(i){var r=i[0].layerSettings,o=r.globalBinder,a=r.programName,s=e.renderer.getShaderProgram(a);s.enable(n),o(n,s,t,e)},useState:function(t){t[0].layerSettings.stateBinder(n)},useDemForDrawing:!1}},Vr=new Float32Array(Oe.Ue()),Wr=function(t,e,n,i,r){var o=i.renderer.getRenderingContext(),a=i.renderer.webGlExtensions,s=t[0],l=s.layerSettings,c=l.objectBinder,u=l.programName,d=i.renderer.getShaderProgram(u);c(o,d,n,i,s,e)&&(r&&fr(o,d,n,i,s),t.forEach((function(t){"buildingModel"===t.symbol?(Oe.dC(Vr,i.camera.viewProjectionMatrix,t.attributes.matrix),d.bind(o,{u_mat4_mvp:Vr})):"heatmap"===t.symbol&&"fill"===t.sink||d.bind(o,{u_mat4_mvp:t.tile.mvpMatrix}),r&&d.bind(o,{u_mat4_dem_mvp:t.tile.demMvpMatrix}),t.vao.bind({gl:o,extensions:a});var e=t.rangeStart/t.stride,s=(t.rangeEnd-t.rangeStart)/t.stride,l="buildingModel"===t.symbol&&"fill"===t.sink&&1===t.attributes.primitiveType?o.TRIANGLE_STRIP:o.TRIANGLES;o.drawArrays(l,e,s),n.collectStats&&!t.layerSettings.identify&&(n.stats.drawCount++,n.stats.vertexCount+=s)})))},qr=n(6328),Xr=function(t,e,n,i){ao(n,t).forEach((function(n){return Yr(t,e,n,i)}))},Yr=function(t,e,n,i){lo(e.styleManager,n,t).forEach((function(n){no(e.styleManager,n[0])?Kr(t,e,n,i):Jr(t,e,n,i)}))},Kr=function(t,e,n,i){var r=no(e.styleManager,n[0]);if(r){var o=function(n,a){a>=r.orderBy.length?Jr(t,e,n,i):uo(r.orderBy[a],n,t).forEach((function(t,e){return o(t,e+1)}))};o(n,0)}},Jr=function(t,e,n,i){var r=n[0];if((null==r?void 0:r.type)===Sn.H.Custom)e.styleManager.callCustomLayerRender(r.attributes.layerId);else{var o=n;so(e.styleManager,o,t).forEach((function(n){return Qr(t,e,n,i)}))}},Qr=function(t,e,n,i){co(n,t).forEach((function(n){return $r(t,e,n,i)}))},$r=function(t,e,n,i){ho(n,t).forEach((function(n){return to(t,e,n,i)}))},to=function(t,e,n,i){i.useProgram(n),fo(n,t).forEach((function(n){eo(t,e,n,i)}))},eo=function(t,e,n,i){i.useState(n);var r=n[0],o=function(t,e){var n=t.getStyle(e.attributes.styleId);if(n){var i=n.layersById[e.attributes.layerId];return i&&i.type!==e.symbol&&(0,qr.cM)("Expecting layer with type '"+e.symbol+"' but got '"+i.type+"'"),i}}(e.styleManager,r);o&&po(n,t).forEach((function(n){i.drawSymbol(n,o,t,e,i.useDemForDrawing)}))};function no(t,e){var n=t.getStyle(e.attributes.styleId);if(n){var i=n.layersById[e.attributes.layerId];if(i&&void 0!==i.groupId){var r=n.groupsById[i.groupId];if(!r||"group"===r.type)return r;(0,qr.cM)("Expecting layer with type 'group' but got '"+r.type+"'")}}}var io=function(t,e){return Number(t)-Number(e)},ro=function(t){return function(e,n){for(var i={},r=0;r<e.length;r++){var o=e[r],a=t(o,n),s=i[a];void 0===s?i[a]=[o]:s.push(o)}var l=Object.keys(i);l.sort(io);var c=[];for(r=0;r<l.length;r++)c.push(i[l[r]]);return c}},oo=function(t){return function(e,n){for(var i=new Map,r=0;r<e.length;r++){var o=e[r],a=t(o,n);i.has(a)?i.get(a).push(o):i.set(a,[o])}return i}},ao=ro((function(t){var e=t.attributes.styleId;return e===$.jf?1:-e})),so=function(t,e,n){return ro((function(e){return function(t,e,n){var i=t.getStyle(e);if(!i)return(0,qr.cM)("Cannot get style with id="+e+" for renderIndex"),NaN;var r=i.layersById[n];return r?r.groupIndex||0:NaN}(t,e.attributes.styleId,e.attributes.layerId)}))(e,n)},lo=function(t,e,n){return ro((function(e){return function(t,e,n){var i=t.getStyle(e);if(!i)return(0,qr.cM)("Cannot get style with id="+e+" for renderIndex"),NaN;var r=i.layersById[n];return r?r.renderIndex:NaN}(t,e.attributes.styleId,e.attributes.layerId)}))(e,n)},co=ro((function(t){return t.layerSettings.subRenderIndex||0})),uo=function(t,e,n){return ro((function(e,n){var i=(0,nt.jJ)(n.styleZoom,n.styleState,e.attributes.tileData);return(0,nt.vn)(t,i,0)}))(e,n)},ho=oo((function(t){return t.layerSettings.programName})),fo=oo((function(t){return t.layerSettings.stateBinder})),po=oo((function(t){return t.sink+"_"+t.attributesHash+"_"+t.tile.readiness})),mo=function(t){function e(e,n){var i=t.call(this,{canvas:n.layout.canvas,antialias:!1,stencil:!0,clearColor:(0,nt.m2)((0,Hr.MV)(e.defaultBackgroundColor)),preserveDrawingBuffer:e.preserveDrawingBuffer})||this;return i.framebuffers=[],i.lastRenderedFramebuffers=[],i.trackContextLost=function(t){t.preventDefault(),i.modules.map.destroy(),Ot({eventAction:"WebGlContext",eventLabel:"webglcontextlost"}),Ot({eventCategory:"WebGlContext",eventAction:"webglcontextlost",eventLabel:t.statusMessage||""})},i.state=e,i.modules=n,i.identifyBuffer=new se,i.shaderPrograms={diffuse:new Un({vertex:Ur("diffuse"),fragment:Zr("color"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec3_light_direction",type:"3fv"},{name:"u_vec3_light_color",type:"3fv"},{name:"u_vec3_ambient_color",type:"3fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],Nr),attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec3_normal",location:1},{name:"a_vec2_dem_position",location:2}]}),labelLine:new Un({vertex:Ur("labelLine"),fragment:Zr("label"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_tile_to_pixel_ratio",type:"1f"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_buffer",type:"1f"},{name:"u_float_gamma",type:"1f"},{name:"u_float_scale",type:"1f"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_style_zoom",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_style_zoom_limits",location:3}]}),labelPoint:new Un({vertex:Ur("labelPoint"),fragment:Zr("label"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_buffer",type:"1f"},{name:"u_float_gamma",type:"1f"},{name:"u_float_scale",type:"1f"},{name:"u_vec4_color",type:"4fv"},{name:"u_vec2_offset",type:"2f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],Nr),attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2}]}),labelPointIdentify:new Un({vertex:Ur("labelPointIdentify"),fragment:Zr("colorIdentify"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_float_scale",type:"1f"},{name:"u_vec2_offset",type:"2f"}],Nr),attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec4_identifier",location:2}]}),line:new Un({vertex:Ur("line"),fragment:Zr("line"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_light_direction",type:"3fv"},{name:"u_vec3_light_color",type:"3fv"},{name:"u_vec3_ambient_color",type:"3fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],Nr),attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_normal",location:1},{name:"a_vec2_normal_delta",location:2},{name:"a_vec3_direction",location:3},{name:"a_float_distance",location:4},{name:"a_vec2_dem_position",location:5}]}),pointSprite:new Un({vertex:Ur("pointSprite"),fragment:Zr("pointSprite"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"},{name:"u_vec2_rotation",type:"2fv"}],Nr),attributes:[{name:"a_vec3_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_range",location:3},{name:"a_vec2_rescale",location:4}]}),pointSpriteIdentify:new Un({vertex:Ur("pointSpriteIdentify"),fragment:Zr("pointSpriteIdentify"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_height_factor",type:"1f"},{name:"u_vec2_rotation",type:"2fv"}],Nr),attributes:[{name:"a_vec3_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_range",location:3},{name:"a_vec2_rescale",location:4},{name:"a_vec4_identifier",location:5}]}),stripedLine:new Un({vertex:Ur("stripedLine"),fragment:Zr("stripedLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scaler_params",type:"2fv"},{name:"u_float_dash_length",type:"1f"},{name:"u_float_space_length",type:"1f"},{name:"u_float_dash2_length",type:"1f"},{name:"u_vec4_dash_color",type:"4fv"},{name:"u_vec4_space_color",type:"4fv"},{name:"u_vec4_border_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_width_offset",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texture_widen",location:1},{name:"a_vec2_widen",location:2},{name:"a_float_vertex_distance",location:3},{name:"a_float_component_distance",location:4},{name:"a_float_object_length",location:5},{name:"a_vec4_identifier",location:6}]}),stripedLineIdentify:new Un({vertex:Ur("stripedLineIdentify"),fragment:Zr("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scaler_params",type:"2fv"},{name:"u_float_dash_length",type:"1f"},{name:"u_float_space_length",type:"1f"},{name:"u_float_dash2_length",type:"1f"},{name:"u_vec4_dash_color",type:"4fv"},{name:"u_vec4_space_color",type:"4fv"},{name:"u_vec4_border_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_width_offset",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texture_widen",location:1},{name:"a_vec2_widen",location:2},{name:"a_float_vertex_distance",location:3},{name:"a_float_component_distance",location:4},{name:"a_float_object_length",location:5},{name:"a_vec4_identifier",location:6}]}),vtxColor:new Un({vertex:Ur("color"),fragment:Zr("color"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0}]}),vtxColorIdentify:new Un({vertex:Ur("colorIdentify"),fragment:Zr("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_identifier",location:1}]}),modelIdentify:new Un({vertex:Ur("modelIdentify"),fragment:Zr("colorIdentify"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"}],Nr),attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_identifier",location:1},{name:"a_vec2_dem_position",location:2}]}),buildingIdentify:new Un({vertex:Ur("buildingIdentify"),fragment:Zr("colorIdentify"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"}],Nr),attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_identifier",location:1},{name:"a_vec2_dem_position",location:2}]}),oneWayLine:new Un({vertex:Ur("oneWayLine"),fragment:Zr("oneWayLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width",type:"1f"},{name:"u_float_length",type:"1f"},{name:"u_float_border_width",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_direction",location:1},{name:"a_vec2_widen_direction",location:2}]}),model:new Un({vertex:Ur("model"),fragment:Zr("model"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_height_factor",type:"1f"}],Nr),attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec2_texcoord",location:1},{name:"a_vec2_dem_position",location:2}]}),simpleLine:new Un({vertex:Ur("simpleLine"),fragment:Zr("simpleLine"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_z_offset",type:"1f"}],Nr),attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_direction_distance",location:1},{name:"a_vec2_dem_position",location:2}]}),road:new Un({vertex:Ur("road"),fragment:Zr("road"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"},{name:"u_float_shift",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_normals",location:1},{name:"a_vec2_shift",location:2}]}),roadIdentify:new Un({vertex:Ur("roadIdentify"),fragment:Zr("roadIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_width",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_normals",location:1},{name:"a_vec4_identifier",location:2}]}),entrance:new Un({vertex:Ur("entranceArrow"),fragment:Zr("entranceArrow"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width_zpt",type:"1f"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_border_width_zpt",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_total_line_length",type:"1f"},{name:"u_float_relative_end_position",type:"1f"},{name:"u_float_vertex_shift",type:"1f"},{name:"u_float_tip_movement_amplitude",type:"1f"},{name:"u_vec2_bounce_direction",type:"2f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_segment_end",location:1},{name:"a_vec4_texture_widen_arrow_widen",location:2},{name:"a_vec2_widen",location:3},{name:"a_vec2_direction",location:4},{name:"a_float_distance_from_start",location:5},{name:"a_float_object_length",location:6},{name:"a_float_type",location:7},{name:"a_vec4_identifier",location:8}]}),entranceIdentify:new Un({vertex:Ur("entranceArrow"),fragment:Zr("entranceArrowIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width_zpt",type:"1f"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_border_width_zpt",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_total_line_length",type:"1f"},{name:"u_float_relative_end_position",type:"1f"},{name:"u_float_vertex_shift",type:"1f"},{name:"u_float_tip_movement_amplitude",type:"1f"},{name:"u_vec2_bounce_direction",type:"2f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_segment_end",location:1},{name:"a_vec4_texture_widen_arrow_widen",location:2},{name:"a_vec2_widen",location:3},{name:"a_vec2_direction",location:4},{name:"a_float_distance_from_start",location:5},{name:"a_float_object_length",location:6},{name:"a_float_type",location:7},{name:"a_vec4_identifier",location:8}]}),circleMarker:new Un({vertex:Ur("circleMarker"),fragment:Zr("circleMarker"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_widen",location:1}]}),rect:new Un({vertex:Ur("rect"),fragment:Zr("rect"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"}],attributes:[{name:"a_vec2_vertex",location:0}]}),rectWithTexture:new Un({vertex:Ur("rectWithTexture"),fragment:Zr("rectWithTexture"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texcoord",location:1}]}),circleMarkerIdentify:new Un({vertex:Ur("circleMarkerIdentify"),fragment:Zr("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_float_width",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_widen",location:1},{name:"a_vec4_identifier",location:2}]}),stretchableImage:new Un({vertex:Ur("stretchableImage"),fragment:Zr("stretchableImage"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2}]}),stretchableImageIdentify:new Un({vertex:Ur("stretchableImageIdentify"),fragment:Zr("stretchableImageIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec4_identifier",location:3}]}),heatmap:new Un({vertex:Ur("heatmap"),fragment:Zr("heatmap"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_radius",type:"1f"},{name:"u_float_intensity",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_widen",location:1},{name:"a_float_weight",location:2}]}),heatmapTexture:new Un({vertex:Ur("heatmapTexture"),fragment:Zr("heatmapTexture"),uniforms:[{name:"u_sr2d_texture",type:"1i"},{name:"u_sr2d_ramp_texture",type:"1i"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_position",location:0}]}),demMesh:new Un({vertex:Ur("demMesh"),fragment:Zr("demMesh"),uniforms:(0,j.ev)([{name:"u_mat4_mvp",type:"mat4"},{name:"u_flat_tex_ext",type:"1f"},{name:"u_flat_tex",type:"1i"}],Nr),attributes:[{name:"a_vec2_position",location:0}]}),demElevation:new Un({vertex:Ur("demElevation"),fragment:Zr("demElevation"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_sr2d_texture",type:"1i"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texcoord",location:1}]})},n.map.once("idle",(function(){return function(t,e){if(window.requestIdleCallback){var n=function(n){var i=t[n];window.requestIdleCallback((function(){e.isContextLost()||(i.link(e),setTimeout((function(){window.requestIdleCallback((function(){e.isContextLost()||i.locate(e)}))}),2e3))}))};for(var i in t)n(i)}}(i.shaderPrograms,i._gl)})),i.symbolSettingsList={line:{solid:[{programName:"road",vaoCreator:Ke,stateBinder:br,globalBinder:pe,objectBinder:vr($i,fi,Ii,hr,Mi)},{identify:!0,programName:"roadIdentify",vaoCreator:Qe,stateBinder:Sr,globalBinder:pe,objectBinder:vr($i,hr,Mi)}]},polygon:{fill:[{programName:"vtxColor",vaoCreator:Xe,stateBinder:br,globalBinder:pe,objectBinder:vr($i,Oi,fi,Ii,bi)},{identify:!0,programName:"vtxColorIdentify",vaoCreator:Ye,stateBinder:xr,globalBinder:me,objectBinder:vr($i,Oi)}],stroke:[{programName:"simpleLine",vaoCreator:dn,stateBinder:br,globalBinder:Ce(me,be,Me),objectBinder:vr(tr,$i,Oi,vi,wi,Ii,Pi,pr),subRenderIndex:1}]},polygonExtrusion:{sideFill:[{programName:"diffuse",vaoCreator:rn,stateBinder:Ir,globalBinder:Ce(we,ge),objectBinder:vr($i,Oi,mi,gi,Ii,Ji,bi,fr)},{programName:"diffuse",vaoCreator:rn,stateBinder:Mr,globalBinder:Ce(we,ge),objectBinder:vr($i,Oi,mi,gi,Ii,Ji,bi,fr),subRenderIndex:1},{identify:!0,programName:"buildingIdentify",vaoCreator:on,stateBinder:_r,globalBinder:Ce(ge,me),objectBinder:vr($i,Oi,ji,Ji)}],topFill:[{programName:"diffuse",vaoCreator:rn,stateBinder:Ir,globalBinder:Ce(we,ge),objectBinder:vr($i,Oi,pi,gi,Ii,Ji,bi,fr)},{programName:"diffuse",vaoCreator:rn,stateBinder:Mr,globalBinder:Ce(we,ge),objectBinder:vr($i,Oi,pi,gi,Ii,Ji,bi,fr),subRenderIndex:1},{identify:!0,programName:"buildingIdentify",vaoCreator:on,stateBinder:_r,globalBinder:Ce(ge,me),objectBinder:vr($i,Oi,ji,Ji)}],sideStroke:[{programName:"line",vaoCreator:an,stateBinder:yr,globalBinder:Ce(we,ge,me),objectBinder:vr($i,Oi,mi,Si,gi,Ii,Ji,bi,fr),subRenderIndex:3}],topStroke:[{programName:"simpleLine",vaoCreator:hn,stateBinder:yr,globalBinder:Ce(me,ge,Pe),objectBinder:vr($i,Oi,vi,xi,gi,Ii,Pi,Ji,fr),subRenderIndex:4}]},labelLine:{raster:[{programName:"labelLine",vaoCreator:nn,stateBinder:Pr,globalBinder:Ce(Te,ye),objectBinder:vr(er,ar,Ai,Ui,or,sr,hr,dr),uniformSet:"fontHalo"},{programName:"labelLine",vaoCreator:nn,stateBinder:Pr,globalBinder:Ce(Te,ye),objectBinder:vr(er,Ai,Ui,or,sr,hr,dr),uniformSet:"fontFill",subRenderIndex:1}]},dashedLine:{stroke:[{programName:"stripedLine",vaoCreator:$e,stateBinder:br,globalBinder:Ce(me,ve,Ee,ke),objectBinder:vr($i,Gi,nr,Hi,bi)},{identify:!0,programName:"stripedLineIdentify",vaoCreator:$e,stateBinder:Sr,globalBinder:Ce(me,ve,Ee,ke),objectBinder:vr($i,Gi,nr,bi,Hi)}]},oneWayLine:{raster:[{programName:"oneWayLine",vaoCreator:cn,stateBinder:br,globalBinder:Ce(me,ve,Le,Ie),objectBinder:vr(er,Ai,fi,Ii,Vi,Wi)}]},point:{raster:[{programName:"pointSprite",vaoCreator:sn,stateBinder:Pr,globalBinder:Ce(ze,me,_e,Se,ye),objectBinder:vr(er,ki,Ai,Bi,Di,fr)},{identify:!0,programName:"pointSpriteIdentify",vaoCreator:ln,stateBinder:xr,globalBinder:Ce(ze,me,_e,ye),objectBinder:vr(er,ki,Bi,Di,fr)}],text:[{programName:"labelPoint",vaoCreator:tn,stateBinder:Pr,globalBinder:Ce(Te,ye,me),objectBinder:vr(er,ar,Ai,Ui,or,lr,ur,fr),uniformSet:"fontHalo",subRenderIndex:1},{programName:"labelPoint",vaoCreator:tn,stateBinder:Pr,globalBinder:Ce(Te,ye,me),objectBinder:vr(er,Ai,Ui,or,lr,ur,fr),uniformSet:"fontFill",subRenderIndex:2},{identify:!0,programName:"labelPointIdentify",vaoCreator:en,stateBinder:xr,globalBinder:me,objectBinder:vr(er,Ci,or,ur,fr),subRenderIndex:1}]},buildingModel:{fill:[{programName:"model",vaoCreator:un,stateBinder:Tr,globalBinder:pe,objectBinder:vr($i,fi,yi,Ii,Yi,Xi,fr),subRenderIndex:2},{programName:"modelIdentify",vaoCreator:on,stateBinder:_r,globalBinder:me,objectBinder:vr($i,fr),subRenderIndex:2,identify:!0}],stroke:[{programName:"simpleLine",vaoCreator:hn,stateBinder:yr,globalBinder:Ce(me,be,Me),objectBinder:vr($i,vi,yi,Ii,Pi,Yi,fr),subRenderIndex:5}]},shiftedLine:{solid:[{programName:"road",vaoCreator:Je,stateBinder:br,globalBinder:pe,objectBinder:vr($i,fi,Ii,Mi,hr,zi)}]},circle:{fill:[{programName:"circleMarker",vaoCreator:pn,stateBinder:br,globalBinder:Ce(me),objectBinder:vr($i,fi,Ii,Mi),subRenderIndex:2},{programName:"circleMarker",vaoCreator:pn,stateBinder:br,globalBinder:Ce(me),objectBinder:vr($i,vi,Ii,Ti),subRenderIndex:1},{programName:"circleMarker",vaoCreator:pn,stateBinder:br,globalBinder:Ce(me),objectBinder:vr($i,_i,Ii,Li)},{identify:!0,programName:"circleMarkerIdentify",vaoCreator:mn,stateBinder:xr,globalBinder:Ce(me),objectBinder:vr($i,Ei)}]},arrow:{stroke:[{programName:"entrance",vaoCreator:fn,stateBinder:br,globalBinder:Ce(me,ve,Le,Ie),objectBinder:vr($i,fi,Ii,Vi,qi,bi)},{identify:!0,programName:"entranceIdentify",vaoCreator:fn,stateBinder:xr,globalBinder:Ce(me,ve,Le,Ie),objectBinder:vr($i,Vi,qi,bi)}]},lineExtrusion:{fill:[{programName:"diffuse",vaoCreator:rn,stateBinder:gr,globalBinder:Ce(xe,ge),objectBinder:vr($i,Ki,mi,Ii,bi,fr),subRenderIndex:9}],sideStroke:[{programName:"line",vaoCreator:an,stateBinder:yr,globalBinder:Ce(xe,me,ge),objectBinder:vr($i,Ki,mi,Si,Ii,bi,fr),subRenderIndex:10}],topStroke:[{programName:"simpleLine",vaoCreator:hn,stateBinder:yr,globalBinder:Ce(me,ge,Me),objectBinder:vr($i,Ki,vi,Ii,Pi,fr),subRenderIndex:11}]},stretchableImage:{fill:[{programName:"stretchableImage",vaoCreator:vn,stateBinder:Lr,globalBinder:Ce(me,Se),objectBinder:vr($i,Zi)},{identify:!0,programName:"stretchableImageIdentify",vaoCreator:_n,stateBinder:Sr,globalBinder:Ce(me,Se),objectBinder:vr($i,Zi)}]},raster:{fill:[{programName:"rectWithTexture",vaoCreator:yn,stateBinder:br,globalBinder:pe,objectBinder:vr($i,Zi,Fi)}]},heatmap:{framebuffer:[{programName:"heatmap",vaoCreator:gn,stateBinder:Er,globalBinder:pe,objectBinder:vr($i,ir,rr,hr)}],fill:[{programName:"heatmapTexture",vaoCreator:bn,stateBinder:br,globalBinder:pe,objectBinder:vr($i,Zi,Ni,Ri),subRenderIndex:1}]},dem:{mesh:[{programName:"demMesh",vaoCreator:wn,stateBinder:_r,globalBinder:pe,objectBinder:vr(mr)}],elevation:[{programName:"demElevation",vaoCreator:xn,stateBinder:wr,globalBinder:pe,objectBinder:vr(Zi)}]}},i.addExtension("OES_vertex_array_object").addExtension("OES_element_index_uint").addExtension("OES_standard_derivatives").addExtension("OES_texture_float").addExtension("OES_texture_float_linear"),i.setPixelRatio(window.devicePixelRatio).setSize(n.layout.mapContainer.clientWidth,n.layout.mapContainer.clientHeight),e.collectStats&&(i.timers=new kr(i._gl)),n.layout.canvas.addEventListener("webglcontextlost",i.trackContextLost),i}return(0,j.ZT)(e,t),e.prototype.setClearColor=function(t){return this.clearColor=(0,nt.m2)(t),this.state.needRerender=!0,this},e.prototype.setSize=function(t,e){return this.modules.layout.setCanvasSize(t,e),this.framebuffers.forEach((function(t){t&&t.onResize()})),this.updateIdentifySize(),this},e.prototype.updateIdentifySize=function(){var t=window.devicePixelRatio,e=this.state.size;return this.identifyBuffer.setSize([Math.ceil(e[0]*g.identify.pixelDensity*t),Math.ceil(e[1]*g.identify.pixelDensity*t)]),this},e.prototype.clear=function(){return this.clearWithColor(this.clearColor),this},e.prototype.clearWithColor=function(t){var e=this._gl;e.depthMask(!0),e.clearDepth(1),e.clearColor.apply(e,t),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)},e.prototype.renderTileObjects=function(t){var e=this;this.state.collectStats&&this.timers&&this.timers.addTimer();var n=this._gl,i=Gr(this.state,this.modules),r=this.groupObjectsByFramebuffer(t,!1);if(this.lastRenderedFramebuffers.forEach((function(t){r.some((function(e){return e.framebuffer===t}))||e.clearFramebuffer(t)})),this.lastRenderedFramebuffers=[],r.forEach((function(t){var r,o,a,s,l=t.objects,c=t.tileObjects,u=t.framebuffer;i.useDemForDrawing=void 0===u&&e.modules.demManager.isEnabled();var d=null!==(o=null===(r=null==u?void 0:u.getViewProjectionMatrix)||void 0===r?void 0:r.call(u))&&void 0!==o?o:e.modules.camera.viewProjectionMatrix;if(c.forEach((function(t){i.useDemForDrawing&&t.updateDemMvpMatrix(e.modules.demManager.demTextureMatrix),t.updateMvpMatrix(d)})),u)null===(a=u.onRenderStart)||void 0===a||a.call(u),e.lastRenderedFramebuffers.push(u),u.renderTarget.bind(n),n.viewport(0,0,u.renderTarget.options.size[0],u.renderTarget.options.size[1]),e.clearWithColor(u.clearColor);else{var h=e.state,f=h.size,p=h.viewport,m=window.devicePixelRatio;n.viewport(p.left*m,p.bottom*m,f[0]*m,f[1]*m),e.clear()}Xr(e.state,e.modules,l,i),null==u||u.renderTarget.unbind(n),null===(s=null==u?void 0:u.onRenderEnd)||void 0===s||s.call(u)})),this.state.collectStats&&this.timers){this.timers.stopTimer();var o=this.timers.tryToGetFirstTimerValue();o&&this.modules.map.emit("gpuRenderTime",o)}return this},e.prototype.renderIdentify=function(t){var e=this,n=this._gl,i=Gr(this.state,this.modules);this.groupObjectsByFramebuffer(t,!0).forEach((function(t){var r=t.objects,o=t.framebuffer;i.useDemForDrawing=void 0===o&&e.modules.demManager.isEnabled();var a=o?o.renderTarget:e.identifyBuffer;a.bind(n),n.viewport(0,0,a.options.size[0],a.options.size[1]),e.clearIdentify(),Xr(e.state,e.modules,r,i),a.unbind(n)})),this.state.needRerender=!0},e.prototype.getPixels=function(){var t=this._gl,e=this.identifyBuffer.options.size,n=new Uint8Array(e[0]*e[1]*4);return this.identifyBuffer.bind(t),t.readPixels(0,0,e[0],e[1],t.RGBA,t.UNSIGNED_BYTE,n),this.identifyBuffer.unbind(t),n},e.prototype.getRenderingContext=function(){return this._gl},e.prototype.getShaderProgram=function(t){return this.shaderPrograms[t]},e.prototype.destroy=function(){var t=this;this.lastRenderedFramebuffers=[],this.framebuffers.forEach((function(e){null==e||e.renderTarget.remove(t.getRenderingContext())})),this.modules.layout.canvas.removeEventListener("webglcontextlost",this.trackContextLost);var e=this._gl.getExtension("WEBGL_lose_context");e&&e.loseContext(),this.modules.layout.destroy()},e.prototype.addFramebuffer=function(t){return this.framebuffers.push(t),this.framebuffers.length-1},e.prototype.getFramebuffer=function(t){if(t!==ci.z)return this.framebuffers[t]},e.prototype.removeFramebuffer=function(t){var e;null===(e=this.framebuffers[t])||void 0===e||e.renderTarget.remove(this.getRenderingContext()),this.framebuffers[t]=void 0},e.prototype.clearIdentify=function(){var t=this._gl;t.depthMask(!0),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),t.clearDepth(1),t.clearStencil(0)},e.prototype.clearFramebuffer=function(t){t.renderTarget.bind(this._gl),this._gl.viewport(0,0,t.renderTarget.options.size[0],t.renderTarget.options.size[1]),this.clearWithColor(t.clearColor),t.renderTarget.unbind(this._gl)},e.prototype.groupObjectsByFramebuffer=function(t,e){var n,i,r=this,o={},a={framebuffer:void 0,objects:[],tileObjects:new Set},s=this.modules.demManager.getFlatFramebufferId();this.modules.demManager.isEnabled()&&(i={framebuffer:this.getFramebuffer(s),objects:[],tileObjects:new Set},o[s]=i),e||(n=a.objects).push.apply(n,this.modules.styleManager.getCustomSceneObjects()),t.forEach((function(t){(e?t.identifyChildren:t.children).forEach((function(e){var n,s=r.modules.styleManager.getFramebufferId(e.attributes.styleId,e.attributes.layerId),l=s?s[e.sink]:void 0;l!==ci.z&&(void 0!==l?(o[l]||(o[l]={framebuffer:r.getFramebuffer(l),objects:[],tileObjects:new Set}),o[l].objects.push(e),o[l].tileObjects.add(t)):r.modules.demManager.isEnabled()&&(n=e.symbol,"mesh"!==e.sink&&"point"!==n&&"polygonExtrusion"!==n&&"lineExtrusion"!==n&&"buildingModel"!==n)?(null==i||i.objects.push(e),null==i||i.tileObjects.add(t)):(a.objects.push(e),a.tileObjects.add(t)))}))}));var l=Object.values(o).filter((function(t){return!!t.framebuffer}));return l.sort((function(t,e){var n,i,r,o;return(null!==(i=null===(n=t.framebuffer)||void 0===n?void 0:n.renderIndex)&&void 0!==i?i:0)-(null!==(o=null===(r=e.framebuffer)||void 0===r?void 0:r.renderIndex)&&void 0!==o?o:0)})),l.push(a),l},e}(ie),vo=n(3795),_o=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.identifyData=[],this.needsUpdate=!1,this.forceUpdate=!1,this.searchQueue=new Map,this.stateDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"},{path:"demMode",type:"boolean"}]),this.debouncedFillCache=(0,Xt.D)((function(){n.needsUpdate=!0}),g.identify.cacheDebounceTime)}return t.prototype.resetCache=function(){this.colorBuffer=void 0,this.debouncedFillCache()},t.prototype.search=function(t,e,n){var i=this;return void 0===n&&(n=!1),void 0===this.colorBuffer&&n&&(this.needsUpdate=!0),this.forceUpdate=n,new Promise((function(n){i.searchQueue.set(t,{point:e,resolve:n})}))},t.prototype.searchSync=function(t){return this.searchHigherPriority(t)},t.prototype.update=function(){var t=this;this.stateDiffer.check(this.state)&&(this.resetCache(),this.searchQueue.size>0&&this.searchQueue.clear()),this.needsUpdate&&(this.forceUpdate||this.modules.tileManager.isIdle()&&this.modules.labeler.isIdle()&&this.modules.layers.entranceAnimationFinished()&&this.modules.modelLayer.isIdle()&&!this.modules.buildingHeightAnimator.isAnimating()&&this.modules.assetManager.isIdle())&&(this.fillCache(),this.needsUpdate=!1,this.forceUpdate=!1),void 0!==this.colorBuffer&&this.searchQueue.size>0&&(this.searchQueue.forEach((function(e){e.resolve(t.searchHigherPriority(e.point))})),this.searchQueue.clear())},t.prototype.searchHigherPriority=function(t){var e,n=this.state.viewport,i=H.al(t[0]-n.left,t[1]-n.top),r=this.state.identifyPickDistance*window.devicePixelRatio,o=1/0,a=!1,s=H.Ue();for(s[0]=i[0]-r;s[0]<i[0]+r;s[0]++)for(s[1]=i[1]-r;s[1]<i[1]+r;s[1]++){var l=this.searchPointInCache(s);if(l){var c=void 0!==l.dynamicObjectId;if(!a||c){var u=H.TE(i,s);(!e||!a&&c||l.phase>e.phase||l.phase===e.phase&&u<o)&&(e=l,o=u,c&&(a=!0))}}}return e},t.prototype.searchPointInCache=function(t){if(void 0!==this.colorBuffer){var e=g.identify.pixelDensity*window.devicePixelRatio,n=this.modules.renderer.identifyBuffer.options.size,i=this.state.size;if(!(t[0]<0||t[0]>i[0]-1||t[1]<0||t[1]>i[1]-1)){var r=Math.floor(t[0]*e),o=4*((n[1]-1-Math.floor(t[1]*e))*n[0]+r),a=(this.colorBuffer[o+3]<<24|this.colorBuffer[o+2]<<16|this.colorBuffer[o+1]<<8|this.colorBuffer[o])>>>0;return this.indexToIdentifierResponse(a)}}},t.prototype.fillCache=function(){var t=this,e=this.modules.tileManager.getTileObjects();this.modules.renderer.renderIdentify(e),this.colorBuffer=this.modules.renderer.getPixels(),this.identifyData=this.modules.tileManager.getDisplayedIdentifyData(),this.modules.modelLayer.getDisplayedIdentifyData().forEach((function(e){return t.identifyData.push(e)})),this.modules.floorManager.getDisplayedIdentifyData().forEach((function(e){return t.identifyData.push(e)}));var n=this.modules.personalPoiManager.getIdentifyDataChunk();void 0!==n&&this.identifyData.push(n),this.modules.layers.getDynamicObjectLayers().forEach((function(e){e.getIdentifyData().forEach((function(e){return t.identifyData.push(e)}))}))},t.prototype.indexToIdentifierResponse=function(t){for(var e,n,i,r=0;r<this.identifyData.length;r++){var o=this.identifyData[r],a=o.dynamicObjectId,s=o.ids,l=o.metatileHash,c=o.sourceId,u=o.tileKey,d=s.startIndex,h=s.endIndex,f=s.idBuffer,p=s.phaseBuffer,m=s.sublayerBuffer,v=s.styleIdBuffer,_=s.layerIdBuffer,y=s.instanceIdBuffer,g=s.objectClassBuffer,b=s.strings;if(!(t<d||t>h)){var w=t-d,x=new Uint32Array(f,4*w*2,2),S=new Uint32Array(m)[w],I=new Uint8Array(y)[w],M=new Uint32Array(g)[w],P=void 0,T="",L=this.modules.assetManager.getMetatile(l);if(L){(null===(e=L.reverseDictionaries.db_sublayer)||void 0===e?void 0:e[S])&&(P=L.reverseDictionaries.db_sublayer[S]);var E=b[t];T=void 0!==E?E.objectClass:null!==(i=null===(n=null==L?void 0:L.reverseDictionaries.db_object_class)||void 0===n?void 0:n[M])&&void 0!==i?i:""}var k=new Uint16Array(v)[w],z=new Uint32Array(_)[w],C=this.modules.styleManager.getStyleLayer(k,z);if(!C||"custom"===C.type)return;return{id:(0,V.Ru)(x[0],x[1]),phase:new Float32Array(p)[w],dynamicObjectId:a,sourceId:c,tileKey:u,sublayer:P,symbol:C.type,instanceId:I,objectClass:T}}}},t}(),yo=n(2267);function go(t,e,n){var i=document.createElement("img");return i.width=e,i.height=n,new Promise((function(e){i.onload=function(){return e(i)},i.src="data:image/svg+xml;base64,"+btoa(t)}))}function bo(t){var e=new Blob([t],{type:"image/png"}),n=URL.createObjectURL(e),i=document.createElement("img");return new Promise((function(e){i.onload=function(){URL.revokeObjectURL(n),e(i)},0===t.byteLength?i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=":i.src=n}))}function wo(t,e){if(e[0]===t.width&&e[1]===t.height)return t;var n=document.createElement("canvas"),i=n.getContext("2d");return n.width=e[0],n.height=e[1],i.shadowColor="transparent",i.shadowBlur=0,i.drawImage(t,0,0,e[0],e[1]),n}var xo=n(6670),So=n(3410),Io=function(t){function e(e){var n=t.call(this)||this;return n.sync=function(t){var e=t.dictionaries,i=t.reverseDictionaries;n.dictionaries=e,n.reverseDictionaries=i},e.set("syncMetatile",n.sync),n}return(0,j.ZT)(e,t),e}(n(8977).g),Mo=n(3062);function Po(t,e,n){return(0,R.IG)(n.fontUrlTemplate,{name:t,range:String(e)})}function To(t,e,n){return(0,R.IG)(zo(e.iconBaseUrl,e.iconNameTemplate),{name:t,subdomain:n})}function Lo(t){return ko(t.stylePath)?t.stylePath:zo(t.rootUrl,t.stylePath)}var Eo=new RegExp("^(?:[a-z]+:)?//","i");function ko(t){return Eo.test(t)}function zo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],i=1;i<t.length;i++){"/"!==n[n.length-1]&&(n+="/");var r=t[i];"/"===r[0]?n+=r.slice(1):n+=r}return n}var Co=n(3411);function Ao(t){for(var e,n=new Co.x,i=0,r=t.layers;i<r.length;i++){var o=r[i];void 0!==o.groupId&&e&&o.groupId===e.groupId?o.renderIndex=e.renderIndex:o.renderIndex=n.getIndex(),e=o}for(var a in t.groupsById){var s=t.groupsById[a];s&&s.layers[0]&&(s.renderIndex=s.layers[0].renderIndex)}}var Do=n(3131);function Fo(t,e,n){var i,r=n.map.state,o=n.collector,a=n.imageManager,s=n.renderer,l=n.tileManager;try{i=function(t,e,n){var i,r=(0,nt.jJ)(t.styleZoom,t.styleState,[]),o=e.style.color,a=[];if("object"!=typeof(i=o.argument)||"heatmap-density"!==i.type)throw new Error("Heatmap color must be interpolate expression with 'heatmap-density' argument in layer "+e.id);for(var s=n-1,l=0;l<n;l++){var c=l/s,u=(0,nt.o4)(o,c,r);a.push.apply(a,u.value)}return new oe(new Uint8Array(a),{size:[n,1]})}(r,t,256)}catch(t){return void console.error(t)}var c=a.addPreparedTexture(i),u=s.getRenderingContext(),d=t.style.downscale,h=r.size,f=new se({size:[Math.ceil(h[0]*window.devicePixelRatio/d),Math.ceil(h[1]*window.devicePixelRatio/d)],magFilter:oe.LinearFilter,minFilter:oe.LinearFilter,wrapS:oe.ClampToEdgeWrapping,wrapT:oe.ClampToEdgeWrapping}),p=a.addPreparedTexture(f.getTexture()),m=s.addFramebuffer({renderTarget:f,clearColor:[0,0,0,0],onResize:function(){f.setSize([Math.ceil(r.size[0]*window.devicePixelRatio/d),Math.ceil(r.size[1]*window.devicePixelRatio/d)]),f.bind(u),f.unbind(u),a.updatePreparedTexture(p,f.getTexture())}});(0,J.XI)({collector:o,generator:We.B.generateTexture,args:[e,t,p,c]});var v=o.getAccumulatedData(),_=new G.W("dynamicObject",v.data,s);return l.addObject(_),o.reset(),t.framebufferId={framebuffer:m},function(t){l.removeObject(_),_.clean(t),a.deleteTexture(p),a.deleteTexture(c),s.removeFramebuffer(m)}}var Ro=function(){function t(t){this.modules=t,this.customLayers=new Map,this.styleIndex=1,this.handyStylesMap=new Map,this.waitingStyleRequests=new Map,this.onRemoveLayerHooks=new Map}return t.prototype.createStyle=function(t,e,n){var i=this,r=this.modules.map.state;if(!Number.isNaN(r.handyStyleId)){var o=this.getStyle(r.handyStyleId);o&&(o.layers.forEach((function(t){var e=i.onRemoveLayerHooks.get(t.innerId);e&&e(r)})),this.onRemoveLayerHooks.clear())}var a=this.styleIndex++,s=(0,tt.Cp)(t,a,n);!function(t,e){var n=ko(e.fontsPath)?e.fontsPath:zo(e.rootUrl,e.fontsPath);t.fontUrlTemplate=zo(n,"{name}_{range}.pbf"),t.iconBaseUrl=ko(e.iconsPath)?e.iconsPath:zo(e.rootUrl,e.iconsPath),t.iconNameTemplate=e.iconNameTemplate}(s,e),this.handyStylesMap.set(s.id,s);var l=this.waitingStyleRequests.get(a);return l&&l.resolve(s),this.modules.workers.parser.syncStyle(s),this.modules.workers.labeling.syncStyle(s),s.layers.forEach((function(t){return i.initHandyLayer(a,t)})),s},t.prototype.addLayer=function(t,e){var n=this.getStyle(this.modules.map.state.handyStyleId);if(n){var i=(0,tt.ys)(t);i&&(function(t,e,n){var i,r;if(void 0===t.id)throw new Error("The layer id must be set.");if(e.layerIdToInnerId[t.id])throw new Error("The layer with id «"+t.id+"» already exists in the map style.");var o=-1;if(n){var a=Object.values(e.groupsById).find((function(t){return t&&t.id===n}));if(a)o=e.layers.findIndex((function(t){return t.groupId===a.innerId}));else{o=e.layers.findIndex((function(t){return t.id===n}));var s=null===(r=e.layers[o])||void 0===r?void 0:r.groupId;if(void 0!==s&&"group"===t.type)throw new Error("Group layer with id «"+t.id+"» can't be added before layer with id «"+n+"» in group with innerId «"+s+"». Layer groups doesn't support nesting.")}}else o=e.layers.length;if(-1===o)throw new Error("The layer with beforeId «"+n+"» doesn't exist in the map style.");var l=[];if("group"!==t.type){l=[t];var c=o!==e.layers.length?e.layers[o]:void 0;if(c&&void 0!==c.groupId){var u=e.groupsById[c.groupId];if(!u)return void(0,qr.cM)("Для слоя с id «"+c.id+"» находящегося в группе с groupId «"+c.groupId+"» отсутствует группа id в стиле c id «"+e.id+"»");var d=u.layers.findIndex((function(t){return t.id===c.id}));if(-1===d)return void(0,qr.cM)("Слой с id «"+c.id+"» и groupId «"+c.groupId+"» отсутствует группе в стиле c id «"+e.id+"»");t.groupId=u.innerId,u.layers.splice(d,0,t),u.layers.forEach((function(t,e){return t.groupIndex=e}))}}else e.groupsById[t.innerId]=t,e.layerIdToInnerId[t.id]=t.innerId,l=t.layers;e.revision++,(i=e.layers).splice.apply(i,(0,j.ev)([o,0],l)),l.forEach((function(t){if(e.layersById[t.innerId]=t,e.layerIdToInnerId[t.id]=t.innerId,"point"===t.type){var n=Math.max.apply(Math,(0,j.ev)([0],Object.keys(e.rasterSets.byIndex).map((function(t){return Number(t)})))),i=new Co.x(n+1);(0,tt.z8)(t,i).forEach((function(t){e.rasterSets.byKey[t.key]||(e.rasterSets.byIndex[t.index]=t,e.rasterSets.byKey[t.key]=t)}))}})),Ao(e)}(i,n,e),"custom"===t.type&&"custom"===i.type?this.initCustomLayer(n.id,i,t.render):this.initHandyLayer(n.id,i),this.modules.workers.parser.syncStyle(n),this.modules.workers.labeling.syncStyle(n))}},t.prototype.removeLayer=function(t){var e=this.getStyle(this.modules.map.state.handyStyleId);e&&(Do.T.some((function(e){return e.id===t}))||(function(t,e,n){var i=e.layerIdToInnerId[t];if(void 0!==i){e.revision++;var r=[],o=e.groupsById[i];if(o){if(r=o.layers,delete e.groupsById[i],delete e.layerIdToInnerId[o.id],0===r.length)return}else{var a=e.layersById[i];if(!a)return void(0,qr.cM)("Слой с id «"+t+"» есть в списке идентификаторов слоев стиля, но при этом отсутствует в стиле c id «"+e.id+"»");if(void 0!==a.groupId&&void 0!==a.groupIndex){var s=e.groupsById[a.groupId];s&&s.layers.splice(a.groupIndex,1)}r=[a]}var l=e.layers.findIndex((function(t){return t.id===r[0].id}));-1!==l&&(r.forEach((function(t){var i=n.styleManager,r=n.map.state,o=i.getRemoveLayerHook(t.innerId);o&&(o(r),i.clearRemoveLayerHook(t.innerId)),delete e.layersById[t.innerId],delete e.layerIdToInnerId[t.id]})),e.layers.splice(l,r.length),Ao(e))}}(t,e,this.modules),this.modules.workers.parser.syncStyle(e),this.modules.workers.labeling.syncStyle(e)))},t.prototype.setDynamicStyle=function(t){this.handyStylesMap.set($.jf,t),this.modules.workers.parser.syncStyle(t),this.modules.workers.labeling.syncStyle(t)},t.prototype._setDemStyle=function(t){var e=this.getStyle(this.modules.map.state.handyStyleId);e&&(e.dem=(0,tt.vR)(t))},t.prototype.getStyle=function(t){return this.handyStylesMap.get(t)},t.prototype.getStyleLayer=function(t,e){var n;return null===(n=this.handyStylesMap.get(t))||void 0===n?void 0:n.layersById[e]},t.prototype.getStyleRevision=function(t){var e;return(null===(e=this.getStyle(t))||void 0===e?void 0:e.revision)||0},t.prototype.setFramebufferId=function(t,e,n){var i,r=null===(i=this.handyStylesMap.get(t))||void 0===i?void 0:i.layersById[e];r&&(r.framebufferId=n)},t.prototype.getFramebufferId=function(t,e){var n,i;return null===(i=null===(n=this.handyStylesMap.get(t))||void 0===n?void 0:n.layersById[e])||void 0===i?void 0:i.framebufferId},t.prototype.waitForStyle=function(t){var e=this.handyStylesMap.get(t);if(e)return Promise.resolve(e);var n=this.waitingStyleRequests.get(t);if(n)return n.promise;var i={resolve:void 0,promise:void 0};return i.promise=new Promise((function(t){i.resolve=t})),this.waitingStyleRequests.set(t,i),i.promise},t.prototype.addRemoveLayerHook=function(t,e){this.onRemoveLayerHooks.set(t,e)},t.prototype.getRemoveLayerHook=function(t){return this.onRemoveLayerHooks.get(t)},t.prototype.clearRemoveLayerHook=function(t){this.onRemoveLayerHooks.delete(t)},t.prototype.callCustomLayerRender=function(t){var e=this.customLayers.get(t);e&&e.renderFunction(this.modules.renderer.getRenderingContext())},t.prototype.getCustomSceneObjects=function(){var t=[];return this.customLayers.forEach((function(e){return t.push(e.sceneObject)})),t},t.prototype.initHandyLayer=function(t,e){var n,i=this;switch(e.type){case"group":return void e.layers.forEach((function(e){return i.initHandyLayer(t,e)}));case"heatmap":n=Fo(e,t,this.modules)}n&&this.modules.styleManager.addRemoveLayerHook(e.innerId,n)},t.prototype.initCustomLayer=function(t,e,n){var i=this,r={sceneObject:{type:Sn.H.Custom,attributes:{styleId:t,layerId:e.innerId,tileData:[]}},layer:e,renderFunction:n};this.customLayers.set(e.innerId,r),this.modules.styleManager.addRemoveLayerHook(e.innerId,(function(){i.customLayers.delete(e.innerId)}))},t}(),Oo=n(4424),jo=function(){function t(t,e){var n=this;this.loadFont=function(t,e){var i=n.requestFontRanges.get(t,e);return i||(i=n.createLoadFontRequest(t,e),n.requestFontRanges.set(t,e,i)),i},this.state=t,this.modules=e,this.requestedMetatiles=new Set,this.metatiles={},this.loadedRasters={},this.failedRasters={},this.requestedRasters={},this.requestedSvgs={},this.disableIconCache=t.disableIconCache,this.textures=[],this.fontGlyphs={},this.fontTextures=new xo.c,this.requestFontRanges=new xo.c,this.pendingFontRanges=0,this.loadedFontRanges=0,this.metatileLoader=function(e,i){var r=(0,O.GG)(e),o=(0,R.Gr)("metatile",{host:t.tileServer,tileSet:t.tileSet,protocol:t.tileProtocol,subdomain:t.subdomains[0],hash:r});fetch(o).then((function(t){if(!t.ok)throw new Error('Failed to load metatile "'+r+'"');return t.json()})).then((function(t){return n.setMetatile(e,i,t)})).catch((function(t){return console.error(t)}))};var i=this.modules.workers.fnRegistry;i.set("addNewRasterSets",(function(t,e){var i=n.modules.styleManager.getStyle(t);if(i){var r=i.rasterSets;e.forEach((function(t){r.byIndex[t.index]=t,r.byKey[t.key]=t}))}else console.error("Not found style "+t+" in AssetManager#addNewRasterSets")})),i.set("loadFont",this.loadFont),this.setPreparedMetatile(-1,O.nF),this.setPreparedMetatile(le.L2,(0,Oo.X4)()),this.metatiles[le.DL]=new Io(i)}return t.prototype.loadMetatile=function(t,e){this.requestedMetatiles.has(t)||(this.requestedMetatiles.add(t),this.metatileLoader(t,e))},t.prototype.setMetatile=function(t,e,n){(0,Mo.lG)(n),n.tileProps=n.tileProps.map(Mo.dx);var i=(0,O.ev)(n);this.setPreparedMetatile(t,i),void 0===this.projectMetatileMetadata&&(0,Q.FP)(e)&&(this.projectMetatileMetadata={regionId:e,metatileHash:t})},t.prototype.setPreparedMetatile=function(t,e){this.metatiles[t]=e,this.modules.workers.parser.setMetatile(t,e)},t.prototype.prepareRasters=function(t,e,n){var i,r,o=this,a=this.modules.styleManager.getStyle(t);if(a){for(var s=a.rasterSets,l=this.modules.renderer.getRenderingContext(),c=e.length/7,u=function(t){var c=e[7*t],u=e[7*t+1],h=e[7*t+6],f=e[7*t+2],p=e[7*t+3],m=e[7*t+4],v=e[7*t+5],_=s.byIndex[c];if(_.isSvg){var y={rasterIndex:u,rasterSetIndex:c,x:f,y:p,w:m,h:v,anchorX:_.anchorX,anchorY:_.anchorY,atlasIndex:h,isPacked:!0};_.rasters[u]=y,null===(r=null===(i=d.requestedSvgs[a.id])||void 0===i?void 0:i[c])||void 0===r||r.then((function(t){var e=o.textures[y.atlasIndex];go(t,y.w,y.h).then((function(t){e.subImage(l,t,y.x,y.y),o.state.needRerender=!0}))}))}else{var b=_.rasters[u];b.x=f,b.y=p,b.atlasIndex=h,b.isPacked=!0}void 0===d.textures[h]&&(d.textures[h]=new oe(void 0,{size:g.atlasSize,flipY:!1,premultiplyAlpha:!Ft||!_.isSvg,unit:h,magFilter:oe.LinearFilter,minFilter:oe.LinearFilter}).prepare(d.modules.renderer.getRenderingContext()));var w=d.textures[h],x=n&&n[t];if(void 0!==x)return w.subImage(l,x,f,p),d.state.needRerender=!0,"continue"},d=this,h=0;h<c;h++)u(h);this.modules.workers.labeling.updatePackingInfo(t,e)}else console.error("Not found style "+t+" in AssetManager#prepareRasters")},t.prototype.loadRasters=function(t){for(var e=t.length/3,n=0;n<e;n++){var i=t[3*n],r=t[3*n+1],o=t[3*n+2],a=r<<16|o,s=this.modules.styleManager.getStyle(i);if(s){if(this.loadedRasters[i]||(this.loadedRasters[i]=new Set,this.failedRasters[i]=new Set,this.requestedRasters[i]=new Set),!this.requestedRasters[i].has(a)){var l=s.rasterSets.byIndex[r];!1!==l.rasters[o].isPacked?(this.requestedRasters[i].add(a),l.isSvg?this.loadSvg(a,s,r):this.loadPng(a,s,r,o)):console.error("Try to load not packed raster "+l.key)}}else console.error("Not found style "+i+" in AssetManager#loadRasters")}},t.prototype.getMetatile=function(t){return this.metatiles[t]},t.prototype.getProjectMetadata=function(){return this.projectMetatileMetadata},t.prototype.getFontGlyphs=function(t){return this.fontGlyphs[t]||{}},t.prototype.getFontTextureByName=function(t,e){return this.fontTextures.get(t,e)},t.prototype.isIdle=function(){var t=0,e=0;for(var n in this.requestedRasters)t+=this.requestedRasters[n].size,e+=this.loadedRasters[n].size+this.failedRasters[n].size;return t===e&&this.pendingFontRanges===this.loadedFontRanges},t.prototype.dangerouslySetMetatiles=function(t){this.metatiles=t},t.prototype.dangerouslySetRasters=function(t,e){this.loadedRasters=t,this.failedRasters=e},t.prototype.createLoadFontRequest=function(t,e){return(0,j.mG)(this,void 0,void 0,(function(){var n,i,r,o,a;return(0,j.Jh)(this,(function(s){switch(s.label){case 0:this.pendingFontRanges+=1,n=Number.isNaN(this.state.handyStyleId)?1:this.state.handyStyleId,s.label=1;case 1:return s.trys.push([1,4,,5]),[4,this.modules.styleManager.waitForStyle(n)];case 2:return i=s.sent(),[4,fetch(Po(t,e,i)).then((function(t){if(!t.ok)throw new Error;return t})).catch((function(){return console.error("Could not load font "+t+" for range "+e+" fallback to the default font "+le.Uo),fetch(Po(le.Uo,e,i)).then((function(t){if(!t.ok)throw new Error("Could not load default font "+le.Uo+" for range "+e);return t}))})).then((function(t){return t.arrayBuffer()}))];case 3:return r=s.sent(),o=(0,So.Xq)(r),this.prepareFontAtlas(t,e,o),this.modules.workers.labeling.appendFont(t,o.glyphData),this.loadedFontRanges+=1,[2,this.modules.workers.labeling.markFontAsLoaded(t,e)];case 4:return a=s.sent(),console.error(a),this.loadedFontRanges+=1,[2,this.modules.workers.labeling.markFontAsLoaded(t,e)];case 5:return[2]}}))}))},t.prototype.prepareFontAtlas=function(t,e,n){var i=n.bitmap,r=n.width,o=n.height,a=n.glyphData;for(var s in this.fontGlyphs[t]||(this.fontGlyphs[t]={}),a)this.fontGlyphs[t][s]=a[s];var l=new oe(new Uint8Array(i),{size:[r,o],magFilter:oe.LinearFilter,minFilter:oe.LinearFilter,format:oe.AlphaFormat,premultiplyAlpha:!1,flipY:!1,unit:0});this.fontTextures.set(t,e,l),this.state.needLabeling=!0},t.prototype.loadPng=function(t,e,n,i){var r=this,o=this.modules.renderer.getRenderingContext(),a=e.rasterSets.byIndex[n],s=a.rasters[i],l=this.textures[s.atlasIndex],c="";if(a.type===yo.f.Unique){var u=(0,V.Ak)(a.id);c=a.url?a.url.replace("image","image_"+s.w.toString()+"x"+s.h.toString()):(0,R.Gr)("dynamicPoi",{host:this.state.tileServer,tileSet:this.state.tileSet,protocol:this.state.tileProtocol,subdomain:(0,R.Sy)(this.state.subdomains,u),id:u,width:s.w.toString(),height:s.h.toString(),regionId:String(a.regionId)})}else a.type===yo.f.Static&&(c=To(a.name,e,(0,R.Sy)(this.state.subdomains,a.name)));this.modules.workers.parser.prepareAtlas(c).then((function(n){n?(n.isBitmap?(l.subImage(o,n.data[0],s.x,s.y),r.state.needRerender=!0):bo(n.data[0]).then((function(t){l.subImage(o,t,s.x,s.y),r.state.needRerender=!0})),r.loadedRasters[e.id].add(t)):r.failedRasters[e.id].add(t)}))},t.prototype.loadSvg=function(t,e,n){var i=this,r=this.modules.renderer.getRenderingContext(),o=e.rasterSets.byIndex[n];if(!e.iconBaseUrl)return console.error("Attempt to load svg without existing style"),void this.failedRasters[e.id].add(t);var a=e.icons[o.name],s="";s=(null==a?void 0:a.url)?function(t,e,n){var i=ko(t)?"":e.iconBaseUrl;return(0,R.IG)(zo(i,t),{subdomain:n,appHost:window.location.host})}(a.url,e,(0,R.Sy)(this.state.subdomains,o.name)):To(o.name,e,(0,R.Sy)(this.state.subdomains,o.name)),this.requestedSvgs[e.id]||(this.requestedSvgs[e.id]={});var l=this.requestedSvgs[e.id][n];l&&!this.disableIconCache||(l=this.requestedSvgs[e.id][n]=fetch(s,{cache:this.disableIconCache?"no-cache":"default"}).then((function(t){if(!t.ok)throw new Error("Not 2xx response");return t.text()}))),l.then((function(n){for(var a=function(t){if(t.w<=0&&t.h<=0)return"continue";var e=i.textures[t.atlasIndex];go(n,t.w,t.h).then((function(n){e.subImage(r,n,t.x,t.y),i.state.needRerender=!0}))},s=0,l=o.rasters;s<l.length;s++)a(l[s]);i.loadedRasters[e.id].add(t)})).catch((function(n){console.error(n),i.failedRasters[e.id].add(t)}))},t}(),Bo=n(5275),Uo=n(2140),Zo=function(){function t(t,e,n,i,r,o,a,s){this.modules=t,this.mapState=e,this.cache=n,this.maxStyleZoom=-1/0,this.minStyleZoom=1/0,this.ready=!1,this.useful=!1,this.status="initial",this.model=i,this.key=r,this.selectedIds=o,this.styleId=a,this.styleRevision=s}return t.prototype.update=function(){switch(this.status){case"initial":this.useful&&(this.loadModel(),this.status="generating");break;case"generating":if(this.useful&&this.processResponse&&this.model.texturesLoaded){var t=this.processResponse.objects.data;this.object=new G.W("model",t,this.modules.renderer),this.updateMinAndMaxStyleZoom(this.object),this.status="generated",this.ready=!0,this.cache.add(this.key,this)}}},t.prototype.getIdentifyIds=function(){var t;return null===(t=this.processResponse)||void 0===t?void 0:t.objects.identifyIds},t.prototype.remove=function(){"generated"===this.status&&this.cache.remove(this.key),this.status="initial",this.object&&this.object.clean(this.mapState),this.ready=!1},t.prototype.canBeRemoved=function(){return"initial"===this.status},t.prototype.loadModel=function(){var t=this,e=this.model,n=e.regionId,i=e.metatileHash,r=e.id,o=e.sourceModel,a=o.fileName,s=o.matrix,l=o.offset,c=(0,V.IL)(r),u={url:(0,R.Gr)("model",{host:this.mapState.tileServer,tileSet:this.mapState.tileSet,protocol:this.mapState.tileProtocol,subdomain:(0,R.Sy)(this.mapState.subdomains,a),regionId:n.toString(),name:a}),id:c,regionId:n,metatileHash:i,selected:this.selectedIds.some((function(t){return(0,V.v7)(t,c)})),pixelRatio:window.devicePixelRatio,styleState:this.mapState.styleState,styleId:this.mapState.handyStyleId,offset:l,matrix:s};this.modules.workers.parser.generateModel(u).then((function(e){t.model.prepareTextures(e.textures),t.processResponse=e}))},t.prototype.updateMinAndMaxStyleZoom=function(t){var e=this;this.minStyleZoom=Math.min.apply(Math,t.children.map((function(t){var n,i=e.modules.styleManager.getStyleLayer(t.attributes.styleId,t.attributes.layerId);return null!==(n=null==i?void 0:i.minzoom)&&void 0!==n?n:-1/0}))),this.maxStyleZoom=Math.max.apply(Math,t.children.map((function(t){var n,i=e.modules.styleManager.getStyleLayer(t.attributes.styleId,t.attributes.layerId);return null!==(n=null==i?void 0:i.maxzoom)&&void 0!==n?n:1/0})))},t}(),No=function(){function t(t,e,n,i,r,o){this.modules=t,this.mapState=e,this.cache=n,this.regionId=i,this.metatileHash=r,this.sourceModel=o,this.texturesLoaded=!1,this.textures=[],this.readiness=0,this.id=o.id,this.readinessTickerName="model-readiness-"+this.id}return t.prototype.update=function(){var t,e,n=this;(null===(t=this.currentMod)||void 0===t?void 0:t.useful)&&this.currentMod.update(),(null===(e=this.newMod)||void 0===e?void 0:e.useful)&&this.newMod.update(),rt.Vx(this.readinessTickerName,{step:function(t,e){return n.readiness=e}},this.mapState)},t.prototype.isAnimating=function(){return rt.rS(this.readinessTickerName,this.mapState)},t.prototype.commitMod=function(){this.newMod&&this.newMod.ready&&(this.currentMod=this.newMod,this.newMod=void 0)},t.prototype.setUsefulMod=function(){var t=this.mapState.handyStyleId,e=this.modules.styleManager.getStyleRevision(t),n=(0,V.IL)(this.id),i=this.mapState.selectedIds.filter((function(t){return(0,V.v7)(t,n)}));if(this.currentMod||this.newMod){if(this.currentMod&&(0,V.y5)(this.currentMod.selectedIds,i)&&this.currentMod.styleId===t&&this.currentMod.styleRevision===e)return this.currentMod.useful=!0,void(this.newMod=void 0);this.newMod&&(0,V.y5)(this.newMod.selectedIds,i)&&this.newMod.styleId===t&&this.newMod.styleRevision===e?this.newMod.useful=!0:this.createNewMod(i,t,e)}else this.createNewMod(i,t,e)},t.prototype.getUsefulMod=function(){return this.currentMod&&this.currentMod.useful?this.currentMod:this.newMod&&this.newMod.useful?this.newMod:void 0},t.prototype.getCurrentMod=function(){return this.currentMod},t.prototype.setAllModsNeedless=function(){this.currentMod&&(this.currentMod.useful=!1),this.newMod&&(this.newMod.useful=!1)},t.prototype.getOpacity=function(t){return this.readiness*this.modules.buildingHeightAnimator.getBuildingHeight(t)},t.prototype.getTexture=function(t){return this.textures[t]},t.prototype.prepareTextures=function(t){var e=this;this.texturesLoaded||(t.isBitmap?(this.textures=t.data.map((function(t){return new oe(t,{flipY:!1})})),this.texturesLoaded=!0,this.startReadinessTicker()):Promise.all(t.data.map(bo)).then((function(t){e.textures=t.map((function(t){return new oe(t,{flipY:!1})})),e.texturesLoaded=!0,e.startReadinessTicker()})))},t.prototype.clean=function(){this.canBeCleaned&&(this.texturesLoaded&&(this.textures.forEach((function(t){return t.remove()})),this.textures=[],this.texturesLoaded=!1),this.stopReadinessTicker())},t.prototype.canBeCleaned=function(){return!this.currentMod||this.currentMod.canBeRemoved()&&(!this.newMod||this.newMod.canBeRemoved())},t.prototype.createNewMod=function(t,e,n){var i=function(t,e,n,i){var r=e.map((function(t){return t.lo+","+t.hi})).join("|");return"model="+t+"_sId="+n+"_sRev="+i+"_sel="+r}(this.id,t,e,n),r=this.cache.get(i);r?(this.newMod=r,this.newMod.useful=!0):this.newMod=new Zo(this.modules,this.mapState,this.cache,this,i,t,e,n)},t.prototype.startReadinessTicker=function(){this.readiness=0,rt.BL(this.readinessTickerName,{easing:g.buildingAnimation.easing},this.mapState,0,1,g.buildingAnimation.duration)},t.prototype.stopReadinessTicker=function(){this.readiness=0,rt.sT(this.readinessTickerName,this.mapState)},t}(),Ho=function(){function t(t,e){this.mapState=t,this.modules=e,this.buildingsHeight=new Map,this.models=new Map,this.displayedMods=new Map,this.viewportModels=[],this.requestedModelsInfo=new Set,this.loadedModelsInfo=new Set,this.styleUpdatingMode=!1,this.cache=new Uo.L(g.modelCacheSize,(function(t,e){return e.remove()}))}return t.prototype.update=function(){var t=this;this.findViewportModels(),this.mapState.styleZoom>g.loadModelsInfoStyleZoom&&this.modules.tileManager.getViewportTiles().forEach((function(e){"terrain"===e.type&&e.serverMetadata&&e.serverMetadata.forEach((function(e){t.loadModelsInfo(e.regionId,e.metatileHash)}))})),this.models.forEach((function(t){return t.setAllModsNeedless()})),this.viewportModels.forEach((function(t){return t.setUsefulMod()})),this.models.forEach((function(t){return t.update()})),this.styleUpdatingMode||this.models.forEach((function(t){return t.commitMod()})),this.updateScene(),this.cleanUnnessasaryModels()},t.prototype.activateStyleUpdating=function(){this.styleUpdatingMode=!0},t.prototype.finishStyleUpdating=function(){this.styleUpdatingMode=!1},t.prototype.redraw=function(){this.cache.reset(),this.cleanUnnessasaryModels()},t.prototype.isModelsInfoLoaded=function(t){return this.loadedModelsInfo.has(t)},t.prototype.getTexture=function(t,e){var n;return null===(n=this.models.get(t))||void 0===n?void 0:n.getTexture(e)},t.prototype.getDisplayedIdentifyData=function(){var t=[];return this.viewportModels.forEach((function(e){var n=e.getUsefulMod();if(n){var i=n.getIdentifyIds();i&&t.push({metatileHash:e.metatileHash,ids:i})}})),t},t.prototype.getOpacity=function(t,e){var n;return(null===(n=this.models.get(t))||void 0===n?void 0:n.getOpacity(e))||0},t.prototype.hasModel=function(t){return this.models.has(t)},t.prototype.setBuildingHeight=function(t,e){this.buildingsHeight.set(t,e)},t.prototype.getBuildingHeight=function(t){return this.buildingsHeight.get(t)||0},t.prototype.getVisibleModelData=function(t){var e=this.models.get(t);if(e){var n=e.getCurrentMod();if(n&&n.ready){var i=Math.max(e.sourceModel.minZoom,n.minStyleZoom),r=Math.min(e.sourceModel.maxZoom,n.maxStyleZoom),o=this.mapState.styleZoom;if(!(o<i||o>=r))return{minStyleZoom:i,maxStyleZoom:r,opacity:this.getOpacity(t,i)}}}},t.prototype.isIdle=function(){return this.viewportModelsReady()&&!this.viewportModels.some((function(t){return t.isAnimating()}))},t.prototype.viewportModelsReady=function(){return this.viewportModels.every((function(t){var e=t.getUsefulMod();return e&&e.ready}))},t.prototype.findViewportModels=function(){var t=this,e=this.mapState.styleZoom;this.viewportModels=[],this.models.forEach((function(n){var i=n.sourceModel,r=i.bound,o=i.minZoom,a=i.maxZoom;e<o||e>=a||t.modules.floorManager.hasDisplayedFloorBuilding(n.id)||!t.modules.assetManager.getMetatile(n.metatileHash)||(0,Bo.M)(t.mapState.tilesBounds,r)&&t.viewportModels.push(n)}))},t.prototype.updateScene=function(){var t=this,e=!1,n=new Map;this.viewportModels.forEach((function(t){var e=t.getCurrentMod();e&&e.ready&&n.set(e.key,e)})),this.displayedMods.forEach((function(i,r){n.has(r)||(i.object&&t.modules.tileManager.removeObject(i.object),e=!0)})),n.forEach((function(n,i){t.displayedMods.has(i)||(n.object&&t.modules.tileManager.addObject(n.object),e=!0),t.cache.get(i)})),e&&(this.displayedMods=n,this.mapState.needRerender=!0,this.modules.identifier.resetCache())},t.prototype.cleanUnnessasaryModels=function(){var t=new Set(this.cache.getData().map((function(t){return t.model})));this.models.forEach((function(e){t.has(e)||e.clean()}))},t.prototype.loadModelsInfo=function(t,e){var n=this;if(!this.requestedModelsInfo.has(t)){this.requestedModelsInfo.add(t);var i=(0,R.Gr)("modelInfo",{host:this.mapState.tileServer,tileSet:this.mapState.tileSet,protocol:this.mapState.tileProtocol,subdomain:this.mapState.subdomains[0],regionId:t.toString()});fetch(i).then((function(e){if(!e.ok)throw new Error("Failed to load models info for region "+t);return e.json()})).then((function(i){n.modules.workers.parser.appendHiddenObjectIds(i.map((function(t){return(0,V.IL)(t.id)}))),i.forEach((function(i){var r=new No(n.modules,n.mapState,n.cache,t,e,i);n.models.set(r.id,r)})),n.loadedModelsInfo.add(t)})).catch((function(e){n.loadedModelsInfo.add(t),console.error(e)}))}},t}(),Go=n(4590),Vo=n(2626),Wo=function(){function t(t,e){this.mapState=t,this.modules=e,this.modCache=new Map,this.isGenerating=!1,this.currentPois=[],this.currentIdSet=new Go.c,this.currentTrafficState=!1,this.currentSelectedIds=[],this.currentModKey="ppoi_false_"}return t.prototype.setPersonalPoi=function(t){this.currentPois=t;for(var e=new Go.c,n=0,i=t;n<i.length;n++){var r=i[n];e.add((0,V.IL)(r.id))}this.currentIdSet=e,this.modCache.clear(),this.displayedModKey=void 0},t.prototype.redraw=function(){this.modCache.clear(),this.displayedModKey=void 0},t.prototype.getIdentifyDataChunk=function(){return this.identifyDataChunk},t.prototype.update=function(){if(void 0===this.regionMetadata&&(this.regionMetadata=this.modules.assetManager.getProjectMetadata()),void 0!==this.regionMetadata){this.updateModKey();var t=this.currentModKey,e=this.modCache.get(t);void 0!==e||this.isGenerating||this.generate(t,this.currentPois,this.regionMetadata),void 0!==e&&t!==this.displayedModKey&&this.show(t,e,this.regionMetadata)}},t.prototype.generate=function(t,e,n){var i=this,r=n.regionId,o=n.metatileHash,a=this.modules.map.state;this.isGenerating=!0,this.modules.workers.parser.generatePersonalPoi(e,r,o,window.devicePixelRatio,a.selectedIds,a.handyStyleId,a.styleState,this.modules.defaultSource.getId()).then((function(e){if(void 0!==e){var n=e.collectorOutput,r=e.styleId,o=n.packedRasters,a=n.rastersToLoad;void 0!==o&&i.modules.assetManager.prepareRasters(r,o),i.modules.assetManager.loadRasters(a),i.modCache.set(t,e),i.isGenerating=!1}else i.isGenerating=!1}))},t.prototype.show=function(t,e,n){var i=n.metatileHash,r=e.collectorOutput,o=r.labels,a=r.identifyIds,s=e.styleId;this.modules.labeler.removeLabels("ppoi"),o.length&&this.modules.labeler.addLabels("ppoi",Vo.AL.PersonalPoi,[{metatileHash:i,labels:o,styleId:s}]),this.identifyDataChunk={metatileHash:i,ids:a},this.modules.identifier.resetCache(),this.displayedModKey=t},t.prototype.updateModKey=function(){var t=(0,Q.vX)(this.mapState.selectedIds,this.currentIdSet),e=this.modules.trafficTileLayer.isEnabled();(0,V.y5)(this.currentSelectedIds,t)&&this.currentTrafficState===e||(this.currentTrafficState=e,this.currentSelectedIds=t,this.currentModKey="ppoi_"+e+"_"+t)},t}(),qo=function(){var t=ENTRY_MODULE,e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.m=t,n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("[object Object]"===Object.prototype.toString.call(globalThis))return globalThis;try{return this||new Function("return this")()}catch(t){if("[object Object]"===Object.prototype.toString.call(window))return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i=n(ENTRY_MODULE);return i.default||i};qo.toString();var Xo="[\\.|\\-|\\+|\\w|/|@]+",Yo="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function Ko(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function Jo(t,e,i){var r={};r[i]=[];var o=e.toString(),a=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||o.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!a)return r;for(var s,l=a[1],c=new RegExp("(\\\\n|\\W)"+Ko(l)+Yo,"g");s=c.exec(o);)"dll-reference"!==s[3]&&r[i].push(s[3]);for(c=new RegExp("\\("+Ko(l)+'\\("(dll-reference\\s('+Xo+'))"\\)\\)'+Yo,"g");s=c.exec(o);)t[s[2]]||(r[i].push(s[1]),t[s[2]]=n(s[1]).m),r[s[2]]=r[s[2]]||[],r[s[2]].push(s[4]);for(var u,d=Object.keys(r),h=0;h<d.length;h++)for(var f=0;f<r[d[h]].length;f++)u=r[d[h]][f],isNaN(1*u)||(r[d[h]][f]=1*r[d[h]][f]);return r}function Qo(t){return Object.keys(t).reduce((function(e,n){return e||t[n].length>0}),!1)}function $o(t,e,n,i){var r=t[i].map((function(t){return'"'+t+'": '+e[i][t].toString()})).join(","),o=qo.toString().split("ENTRY_MODULE");return o[0]+"{"+r+"}"+o[1]+'"'+n+'"'+o[2]}function ta(t,e){e=e||{};var i={main:n.m},r=e.all?{main:Object.keys(i.main)}:function(t,e){for(var n={main:[e]},i={main:[]},r={main:{}};Qo(n);)for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=n[s].pop();if(r[s]=r[s]||{},!r[s][l]&&t[s][l]){r[s][l]=!0,i[s]=i[s]||[],i[s].push(l);for(var c=Jo(t,t[s][l],s),u=Object.keys(c),d=0;d<u.length;d++)n[u[d]]=n[u[d]]||[],n[u[d]]=n[u[d]].concat(c[u[d]])}}return i}(i,t),o="";Object.keys(r).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;r[t][e];)e++;r[t].push(e),i[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o+="var "+t+" = ("+$o(r,i,e,modules)+")();\n"})),o+="("+$o(r,i,t,"main")+")();";var a=new window.Blob([o],{type:"text/javascript"});if(e.bare)return a;var s=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(a),l=new window.Worker(s);return l.objectURL=s,l}var ea=n(1462),na=n(2244),ia=n(5017),ra=n(4406),oa=n(47),aa=function(){function t(){this.connector=new ea.H,this.fnRegistry=new na.J(this.connector),this.classRegistry=new ra.Z(this.fnRegistry),this.parserWorker=ta(9703),this.connector.addWorker(ia.P.Parser,this.parserWorker),this.labelingWorker=ta(6721),this.connector.addWorker(ia.P.Labeling,this.labelingWorker),this.parser=function(t,e){return{setMetatile:t.get(ia.P.Parser,"setMetatile"),fetchTile:t.get(ia.P.Parser,"fetchTile"),deleteTile:t.get(ia.P.Parser,"deleteTile"),abortTileRequest:t.get(ia.P.Parser,"abortTileRequest"),generateTile:t.get(ia.P.Parser,"generateTile"),generateFloor:t.get(ia.P.Parser,"generateFloor"),loadFloor:t.get(ia.P.Parser,"loadFloor"),generateModel:t.get(ia.P.Parser,"generateModel"),appendHiddenObjectIds:t.get(ia.P.Parser,"appendHiddenObjectIds"),prepareAtlas:t.get(ia.P.Parser,"prepareAtlas"),packRasters:t.get(ia.P.Parser,"packRasters"),fetchTrafficTile:t.get(ia.P.Parser,"fetchTrafficTile"),deleteTrafficTile:t.get(ia.P.Parser,"deleteTrafficTile"),abortTrafficTileRequest:t.get(ia.P.Parser,"abortTrafficTileRequest"),generateTrafficTile:t.get(ia.P.Parser,"generateTrafficTile"),generatePersonalPoi:t.get(ia.P.Parser,"generatePersonalPoi"),syncStyle:t.get(ia.P.Parser,"syncStyle"),GeoJsonSource:e.set("GeoJsonSource",oa.T).get(ia.P.Parser)}}(this.fnRegistry,this.classRegistry),this.labeling=function(t){return{appendFont:t.get(ia.P.Labeling,"appendFont"),markFontAsLoaded:t.get(ia.P.Labeling,"markFontAsLoaded"),addNewRasterSets:t.get(ia.P.Labeling,"addNewRasterSets"),updatePackingInfo:t.get(ia.P.Labeling,"updatePackingInfo"),syncStyle:t.get(ia.P.Labeling,"syncStyle"),loadRtlPlugin:t.get(ia.P.Labeling,"loadRtlPlugin"),markRtlPluginLoaded:t.get(ia.P.Labeling,"markRtlPluginLoaded")}}(this.fnRegistry)}return t.prototype.destroy=function(){this.parserWorker.terminate(),this.labelingWorker.terminate()},t}(),sa=function(t){function e(n,i){var r=t.call(this)||this;r.options=(0,b.kn)(i,e.options),r.uniqId=Z(),r.labelKey="html-"+r.uniqId,r.mapPoint=(0,w.yq)(r.options.coordinates),r.screenPoint=[0,0],r.html=function(t){var e=document.createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.zIndex=String(t.zIndex),t.interactive||(e.style.pointerEvents="none"),t.animate&&(e.style.opacity="0",e.style.transition="opacity "+t.duration+"ms",e.style["will-change"]="opacity");var n=document.createElement("div");return"string"==typeof t.html?n.innerHTML=t.html:n.append(t.html),e.append(n),e}(r.options),r.isHidden=!0,r.targetOpacity=0,r.modules=n.modules,r.modules.layers.addLayer(r),r.mapState=n.state,r.rounder=r.options.disableRounding?ca:la;var o=r.options,a=o.offset,s=o.labeling;return"none"!==s.type&&r.modules.labeler.addLabelBox(r.labelKey,{id:r.uniqId,width:s.width,height:s.height,position:r.mapPoint,offset:a,labelingGroup:r.getLabelingGroup(),parentPoiId:"pinnedToPoi"===s.type?s.poiId:void 0}),r}return(0,j.ZT)(e,t),e.prototype.destroy=function(){this.removeHtml(),this.modules.labeler.removeLabels(this.labelKey),this.modules.layers.removeLayer(this)},e.prototype.update=function(){var t=this.checkZoom(),e=!this.isInvolvedInLabeling()||this.modules.labeler.isLabelBoxSurvived(this.uniqId);t&&e?this.show():this.hide(),this.updatePosition()},e.prototype.setContent=function(t){this.options.html=t,this.html.innerHTML="";var e=document.createElement("div");"string"==typeof t?e.innerHTML=t:e.append(t),this.html.append(e)},e.prototype.setLabelingSize=function(t,e){"none"!==this.options.labeling.type&&(this.options.labeling.width=t,this.options.labeling.height=e,this.updateLabelBox())},e.prototype.setPosition=function(t){this.mapPoint=(0,w.yq)(t),this.updateLabelBox()},e.prototype.setOffset=function(t){this.options.offset=[t[0],t[1]],this.updateLabelBox()},e.prototype.setMinZoom=function(t){this.options.minZoom=t},e.prototype.setMaxZoom=function(t){this.options.maxZoom=t},e.prototype.getZIndex=function(){return this.options.zIndex},e.prototype.getOffset=function(){return this.options.offset},e.prototype.getPosition=function(){return(0,w.PA)(this.mapPoint)},e.prototype.getHtmlElement=function(){return this.html.firstChild},e.prototype.dangerouslyGetRootElement=function(){return this.html},e.prototype.isShown=function(){return!this.isHidden},e.prototype.show=function(){var t=this;if(this.isHidden&&(this.isHidden=!1,this.appendHtml(),this.emit("shown",{id:this.uniqId.toString(),point:[this.screenPoint[0],this.screenPoint[1]],object:this}),this.options.animate)){if(this.showAnimationTimer)return;this.hideAnimationTimer&&(clearTimeout(this.hideAnimationTimer),this.hideAnimationTimer=void 0),1!==this.targetOpacity&&(this.showAnimationTimer=window.setTimeout((function(){t.setHtmlOpacity(1),t.showAnimationTimer=void 0}),0))}},e.prototype.hide=function(){var t=this;if(!this.isHidden)if(this.isHidden=!0,this.options.animate){if(this.hideAnimationTimer)return;this.showAnimationTimer&&(clearTimeout(this.showAnimationTimer),this.showAnimationTimer=void 0),this.setHtmlOpacity(0),this.hideAnimationTimer=window.setTimeout((function(){t.removeHtml(),t.hideAnimationTimer=void 0}),this.options.duration)}else this.removeHtml()},e.prototype.setHtmlOpacity=function(t){this.html.style.opacity=String(t),this.targetOpacity=t},e.prototype.removeHtml=function(){this.html.remove(),this.screenPoint=[0,0]},e.prototype.appendHtml=function(){this.getMarkerContainer().appendChild(this.html)},e.prototype.getMarkerContainer=function(){return this.options.preventMapInteractions?this.modules.layout.htmlContainerOutMap:this.modules.layout.htmlContainerInMap},e.prototype.updatePosition=function(){var t=this.modules.camera.project(this.mapPoint);this.rounder(t,t[0]+this.options.offset[0],t[1]+this.options.offset[1],this.mapState.stillness),H.fS(this.screenPoint,t)||(this.html.style.transform="translate3d("+t[0]+"px, "+t[1]+"px, 0px)",this.screenPoint=t)},e.prototype.updateLabelBox=function(){if("none"!==this.options.labeling.type){var t=this.options,e=t.labeling,n=e.width,i=e.height,r=t.offset;this.modules.labeler.removeLabels(this.labelKey),this.modules.labeler.addLabelBox(this.labelKey,{id:this.uniqId,width:n,height:i,position:this.mapPoint,offset:r,labelingGroup:this.getLabelingGroup(),parentPoiId:"pinnedToPoi"===this.options.labeling.type?this.options.labeling.poiId:void 0})}},e.prototype.getLabelingGroup=function(){return this.isInvolvedInLabeling()?"markerText":"htmlLabel"},e.prototype.checkZoom=function(){var t=this.mapState.zoom,e=this.options,n=e.minZoom,i=e.maxZoom;return t>=n&&t<i},e.prototype.isInvolvedInLabeling=function(){return"full"===this.options.labeling.type||"pinnedToPoi"===this.options.labeling.type},e.options={coordinates:[0,0],html:"",offset:[0,0],animate:!0,duration:500,labeling:{type:"none"},interactive:!0,preventMapInteractions:!1,zIndex:0,minZoom:-1/0,maxZoom:1/0,disableRounding:!1},e}(B.c),la=function(t,e,n,i){var r=Math.round(e)-e,o=Math.round(n)-n;t[0]=e+i*r,t[1]=n+i*o},ca=function(t,e,n){t[0]=e,t[1]=n},ua=n(7667),da=S.Ue(),ha=function(t){function e(e,n){var i,r,o,a,s,l,c,u=t.call(this,e)||this;u.options=n,u.vectors=u.options.coordinates.map((function(t){return t.map(w.yq)})),u.bouncePosition=0,u.growPosition=1;var d=u.modules,h=d.renderer,f=d.tileManager,p=d.dynamicStyle,m=d.collector,v=d.layers,_=(0,tt.qw)({type:"arrow",id:"dynamic-entrance-"+u.uniqId,minzoom:u.options.minZoom,maxzoom:u.options.maxZoom,style:{color:null!==(i=u.options.color)&&void 0!==i?i:"#0085a0",strokeColor:null!==(r=u.options.borderColor)&&void 0!==r?r:"#ffffff",lineWidth:null!==(o=u.options.width)&&void 0!==o?o:3,strokeWidth:null!==(a=u.options.borderWidth)&&void 0!==a?a:1,tipWidth:null!==(s=u.options.wingWidthMultiplier)&&void 0!==s?s:2,tipHeight:null!==(l=u.options.tipHeightMultiplier)&&void 0!==l?l:4,animation:null===(c=u.options.animate)||void 0===c||c?{type:"appearance",tipMovementAmplitude:u.options.tipMovementAmplitude||20}:void 0}});if(!_)return u;p.addLayer(_,u.options.zIndex),u.layerId=_.innerId;for(var y=u.getTileInfo(),b=0;b<u.vectors.length;b++){var x=u.vectors[b],S=u.getVertices(x,y),I=(0,$.FJ)({id:[b,0]});(0,J.XI)({collector:m,generator:ua.l.generate,args:[p.getStyle().id,_,O.Dz,I,S]})}var M=m.getAccumulatedData(),P=new G.W("dynamicObject",M.data,h,y.coords,u);if(u.tileObjects.push(P),f.addObject(P),u.identifyIds.push(M.identifyIds),u.options.animate){var T="entrance-bounce-"+u.uniqId,L="entrance-grow-"+u.uniqId;u.bounceTickerUpdate=rt.Vx.bind(null,T,{step:function(t,e){return u.bouncePosition=e},complete:function(){u.bounceTickerUpdate=void 0}},u.mapState),u.growTickerUpdate=rt.Vx.bind(null,L,{step:function(t,e){return u.growPosition=e},complete:function(){u.growTickerUpdate=void 0}},u.mapState),rt.BL(T,{easing:g.entranceAnimation.bounceType},u.mapState,-1,0,g.entranceAnimation.bounceTime),rt.BL(L,{easing:g.entranceAnimation.growType},u.mapState,0,1,g.entranceAnimation.growTime)}else u.bouncePosition=0,u.growPosition=1;return v.addLayer(u),m.reset(),u.mapState.needRerender=!0,u}return(0,j.ZT)(e,t),e.prototype.update=function(){this.bounceTickerUpdate&&this.bounceTickerUpdate(),this.growTickerUpdate&&this.growTickerUpdate()},e.prototype.entranceAnimationInProgress=function(){return void 0!==this.bounceTickerUpdate||void 0!==this.growTickerUpdate},e.prototype.remove=function(){void 0!==this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),t.prototype.destroy.call(this)},e.prototype.getTileInfo=function(){for(var t=I.Ue(),e=0;e<this.vectors.length;e++)for(var n=this.vectors[e],i=0;i<n.length;i++)I.aM(t,n[i]);return(0,Q.Bs)((0,Q.x7)(t))},e.prototype.getVertices=function(t,e){for(var n=[[],[],[]],i=0;i<t.length;i++)(0,Q.a2)(da,t[i],e),n[0][i]=da[0],n[1][i]=da[1];return n},e}(N),fa=function(){function t(t){this.state=t,this.layers=[]}return t.prototype.addLayer=function(t){this.layers.push(t),this.state.needRerender=!0},t.prototype.removeLayer=function(t){var e=this.layers.indexOf(t);-1!==e&&(this.layers.splice(e,1),this.state.needRerender=!0)},t.prototype.getLayers=function(){return this.layers},t.prototype.getDynamicObjectLayers=function(){return this.layers.filter((function(t){return t instanceof N}))},t.prototype.getHtmlMarkers=function(){return this.layers.filter((function(t){return t instanceof sa}))},t.prototype.entranceAnimationFinished=function(){return this.layers.every((function(t){return!(t instanceof ha&&t.entranceAnimationInProgress())}))},t}(),pa=n(3571),ma=function(){return""},va=[.5,.5],_a=function(){function t(t){this.modules=t,this.cache={}}return t.prototype.getRasterSet=function(t,e,n,i){var r=this.getKey(t,n,i),o=this.getFromCache(r,e);if(o)return o;var a=this.loadIcon(t,e,n,i);return this.storeInCache(a,r,e),a},t.prototype.loadIcon=function(t,e,n,i){return(0,j.mG)(this,void 0,Promise,(function(){var r,o,a,s,l,c;return(0,j.Jh)(this,(function(u){switch(u.label){case 0:return r=this.modules,o=r.dynamicStyle,a=r.workers,s=r.assetManager,l=t,e?[4,this.loadImageForTransformer(t).then((function(t){return e(t)})).catch((function(){return t}))]:[3,2];case 1:l=u.sent(),u.label=2;case 2:return[4,this.loadImage(l)];case 3:return c=u.sent(),[2,Promise.resolve().then((function(){n=void 0!==n?n:[c.width,c.height];var t=void 0!==i?[i[0]/n[0],i[1]/n[1]]:va,e=[n[0]*window.devicePixelRatio,n[1]*window.devicePixelRatio],r=(0,pa.W8)([{w:e[0],h:e[1],x:0,y:0,atlasIndex:0,isPacked:!1,anchorX:t[0],anchorY:t[1]}]);o.appendRasterSet(r),a.labeling.addNewRasterSets(o.getStyle().id,[r]);var s=new Uint16Array(3);return s[0]=e[0],s[1]=e[1],s[2]=r.index,a.parser.packRasters(s).then((function(t){return{packedRasters:t.packedRasters,rasterSet:r,scaledSize:e}}))})).then((function(t){var e=t.packedRasters,n=t.rasterSet,i=t.scaledSize;return void 0!==e&&s.prepareRasters(o.getStyle().id,e,[wo(c,i)]),n}))]}}))}))},t.prototype.getFromCache=function(t,e){var n=this.cache[t];if(n)return n.get(e||ma)},t.prototype.storeInCache=function(t,e,n){this.cache[e]||(this.cache[e]=new Map),this.cache[e].set(n||ma,t)},t.prototype.getKey=function(t,e,n){return t+"_"+(void 0!==e?e[0]+","+e[1]:"")+"_"+(void 0!==n?n[0]+","+n[1]:"")},t.prototype.loadImage=function(t){return new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){e(n)}}))},t.prototype.loadImageForTransformer=function(t){return-1===t.indexOf(".svg")?new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){e({type:"raster",source:n})},n.onerror=function(){e({type:"unknown"})}})):new Promise((function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(){200===n.status&&0!==n.response.byteLength?e({type:"vector",source:n.response}):e({type:"unknown"})},n.onerror=function(){e({type:"unknown"})},n.send()}))},t}(),ya=function(){function t(t,e,n,i,r,o,a,s,l,c,u,d){this.key=n,this.id=i,this.object=void 0,this.ready=!1,this.modules=t,this.mapState=e,this.status="initial",this.regionId=r,this.metatileHash=le.DL,this.styleId=o,this.styleRevision=a,this.floorIndex=s,this.cache=l,this.onGenerated=d,this.useful=!0,this.selectedIds=c.slice(0),this.needFilterIds=u}return t.prototype.update=function(){var t=this;switch(this.status){case"initial":this.useful&&(this.modules.workers.parser.generateFloor(this.id,this.regionId,window.devicePixelRatio,this.floorIndex,this.selectedIds,this.styleId,this.mapState.styleState,this.modules.defaultSource.getId(),this.mapState.mobileSdkMode).then((function(e){var n=e.collectorOutput.packedRasters,i=e.styleId;n&&t.modules.assetManager.prepareRasters(i,n),t.processResponse=e})),this.status="generating");break;case"generating":if(this.useful&&this.processResponse){var e=this.processResponse,n=e.collectorOutput.data,i=e.tileCoords;this.object=new G.W("floor",n,this.modules.renderer,i),this.status="generated",this.ready=!0,this.cache.add(this.key,this),this.onGenerated(this)}}},t.prototype.getLabels=function(){return this.processResponse&&this.processResponse.collectorOutput.labels.length?[{metatileHash:this.metatileHash,labels:this.processResponse.collectorOutput.labels,styleId:this.processResponse.styleId}]:[]},t.prototype.getGeoIds=function(){if(this.processResponse)return this.processResponse.collectorOutput.geoIds},t.prototype.canBeRemoved=function(){return"initial"===this.status},t.prototype.remove=function(){"generated"===this.status&&this.cache.remove(this.key),this.status="initial",this.object&&this.object.clean(this.mapState),this.ready=!1},t.prototype.getIdentifyIds=function(){if(this.processResponse){var t={};return t[this.metatileHash]=this.processResponse.collectorOutput.identifyIds,t}},t.prototype.isDataEmpty=function(){return!this.processResponse||0===this.processResponse.collectorOutput.data.length},t}(),ga=function(){function t(t,e,n,i,r,o){var a=this;this.onModGenerated=function(t){var e=a.idSetByFloorIndex.get(t.floorIndex);if(!e){e=new Go.c;var n=t.getGeoIds();n&&e.addFromFlatArray(n),a.idSetByFloorIndex.set(t.floorIndex,e)}t.needFilterIds&&(t.needFilterIds=!1,t.selectedIds=(0,Q.vX)(t.selectedIds,e))},this.modules=t,this.mapState=e,this.id=n,this.regionId=i,this.idSetByFloorIndex=new Map,this.cache=r,this.floorIndex=o,this.createNewMod(o,this.mapState.selectedIds,this.mapState.handyStyleId,this.modules.styleManager.getStyleRevision(this.mapState.handyStyleId))}return t.prototype.update=function(){this.currentMod&&this.currentMod.useful&&this.currentMod.update(),this.newMod&&this.newMod.useful&&this.newMod.update()},t.prototype.setFloorIndex=function(t){this.floorIndex=t},t.prototype.getCurrentMod=function(){return this.currentMod},t.prototype.commitMod=function(){this.newMod&&this.newMod.ready&&(this.currentMod=this.newMod,this.newMod=void 0)},t.prototype.setUsefulMod=function(){var t=this.mapState.handyStyleId,e=this.modules.styleManager.getStyleRevision(t),n=this.floorIndex,i=this.mapState.selectedIds,r=this.idSetByFloorIndex.get(n);if(r&&(i=(0,Q.vX)(i,r)),this.currentMod||this.newMod){if(this.currentMod&&(0,V.y5)(this.currentMod.selectedIds,i)&&this.currentMod.styleId===t&&this.currentMod.styleRevision===e&&this.currentMod.floorIndex===n)return this.currentMod.useful=!0,void(this.newMod=void 0);this.newMod&&(0,V.y5)(this.newMod.selectedIds,i)&&this.newMod.styleId===t&&this.newMod.styleRevision===e&&this.newMod.floorIndex===n?this.newMod.useful=!0:this.createNewMod(n,i,t,e)}else this.createNewMod(n,i,t,e)},t.prototype.getUsefulMod=function(){return this.currentMod&&this.currentMod.useful?this.currentMod:this.newMod&&this.newMod.useful?this.newMod:void 0},t.prototype.setAllModsNeedless=function(){this.currentMod&&(this.currentMod.useful=!1),this.newMod&&(this.newMod.useful=!1)},t.prototype.canBeRemoved=function(){return(!this.currentMod||this.currentMod.canBeRemoved())&&(!this.newMod||this.newMod.canBeRemoved())},t.prototype.remove=function(){this.currentMod&&this.currentMod.remove(),this.newMod&&this.newMod.remove()},t.prototype.createNewMod=function(t,e,n,i){var r=function(t,e,n,i,r){var o=n.map((function(t){return t.lo+","+t.hi})).join("|");return"floor_plan="+t+"_ind="+e+"_sId="+i+"_sRev="+r+"_sel="+o}(this.id,t,e,n,i),o=this.cache.get(r);if(o)this.newMod=o,this.newMod.useful=!0;else{var a=!this.idSetByFloorIndex.has(t);this.newMod=new ya(this.modules,this.mapState,r,this.id,this.regionId,n,i,t,this.cache,e,a,this.onModGenerated)}},t}(),ba={trafficOn:!1,parkingOn:!1,navigatorOn:!1};function wa(t){return(0,j.pi)((0,j.pi)({},ba),t)}function xa(t,e,n){return(0,j.pi)((0,j.pi)({},t),{_activeFloorIds:e,_activeFloorBuildingIds:n})}var Sa=function(){function t(t,e){this.styleUpdatingMode=!1,this.state=t,this.modules=e,this.floors=new Map,this.complexDescriptors=new Map,this.hiddenObjectIds=new Map,this.displayedMods=new Map,this.requestedFloors=new Set,this.needUpdate=!1,this.cache=new Uo.L(10,(function(t,e){return e.remove()})),this.stateDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"},{path:"demMode",type:"boolean"}])}return t.prototype.update=function(){var t=this;if(this.stateDiffer.check(this.state)||this.needUpdate){this.needUpdate=!1;var e=this.findActiveFloor();if(this.activeFloor!==e){if(this.activeFloor&&this.modules.map.emit("floorcomplexhide",{id:this.activeFloor}),e){var n=this.complexDescriptors.get(e);if(n){var i=n.id,r=n.regionId,o=n.defaultFloor,a=n.floors,s=this.floors.get(e);s?s.setUsefulMod():(s=new ga(this.modules,this.state,i,r,this.cache,o),this.floors.set(e,s));var l=s.getUsefulMod();this.modules.map.emit("floorcomplexshow",{id:i,currentFloor:l?l.floorIndex:o,floorNames:a.map((function(t){return t.name})),firmsToFloorIndexMap:n.firmsToFloorIndexMap})}}this.activeFloor=e}}if(this.floors.forEach((function(t){return t.setAllModsNeedless()})),this.activeFloor){var c=this.floors.get(this.activeFloor);c&&c.setUsefulMod()}this.floors.forEach((function(e,n){e.update(),e.canBeRemoved()&&t.floors.delete(n)})),this.updateStyleState(),this.styleUpdatingMode||this.commitMods(),this.updateScene()},t.prototype.getActiveFloorHiddenIds=function(){var t=[];if(!this.activeFloor)return t;var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(!e||!n)return t;var i=n.getCurrentMod();if(!i)return t;if(i.isDataEmpty())return t;for(var r=0;r<e.buildings.length;r++){var o=this.hiddenObjectIds.get(e.buildings[r]);o&&o.forEach((function(e){return t.push(e)}))}return t},t.prototype.prepareFloors=function(t,e,n,i){var r=this;"terrain"===i&&n.forEach((function(n,i){var o=(0,V.Ak)(i),a=r.hiddenObjectIds.get(o);void 0===a&&(a=new Set,r.hiddenObjectIds.set(o,a));for(var s=0;s<n.length;s+=2)a.add((0,V.Ak)((0,V.Ru)(n[s],n[s+1])));r.loadFloor(o,t,e)}))},t.prototype.changeFloorNumber=function(t,e){var n=this.floors.get(t),i=this.complexDescriptors.get(t);n&&i&&(n.setFloorIndex(e),this.modules.map.emit("floorcomplexlevelchange",{id:t,floorIndex:e,floorName:i.floors[e].name}))},t.prototype.resetCache=function(){var t=this;this.floors.forEach((function(e,n){e.remove(),t.floors.delete(n)})),this.cache.reset(),this.activeFloor=void 0,this.needUpdate=!0},t.prototype.getDisplayedIdentifyData=function(){var t=[];return this.displayedMods.forEach((function(e){var n=e.getIdentifyIds();n&&Object.keys(n).forEach((function(e){t.push({ids:n[e],metatileHash:Number(e)})}))})),t},t.prototype.hasDisplayedFloorBuilding=function(t){if(!this.activeFloor)return!1;var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(!e||!n)return!1;var i=n.getCurrentMod();if(!i||!i.ready)return!1;if(i.isDataEmpty())return!1;for(var r=0;r<e.buildings.length;r++){var o=this.hiddenObjectIds.get(e.buildings[r]);if(o&&o.has(t))return!0}return!1},t.prototype.activateStyleUpdating=function(){this.styleUpdatingMode=!0,this.needUpdate=!0},t.prototype.finishStyleUpdating=function(){this.styleUpdatingMode=!1},t.prototype.activeFloorReady=function(){if(!this.activeFloor)return!0;var t=this.floors.get(this.activeFloor);if(!t)return!0;var e=t.getUsefulMod();return Boolean(e&&e.ready)},t.prototype.loadFloor=function(t,e,n){var i=this;this.requestedFloors.has(t)||(this.requestedFloors.add(t),this.modules.workers.parser.loadFloor(t,this.state.floorsUrl).then((function(r){"error"!==r.type?(i.complexDescriptors.set(t,{id:t,regionId:e,metatileHash:n,center:r.center,defaultFloor:r.defaultFloor,floors:r.floors,buildings:r.buildings,bound:r.bound,firmsToFloorIndexMap:r.firmsToFloorIndexMap}),i.needUpdate=!0):404!==r.errorStatus&&console.error("Loading floor "+t+" failed")})))},t.prototype.updateStyleState=function(){var t=this.state.styleState;if(this.activeFloor){var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(e&&n){var i=n.getUsefulMod();if(i){var r=e.floors[i.floorIndex].ids,o=e.buildings;r===t._activeFloorIds&&o===t._activeFloorBuildingIds||(this.state.styleState=xa(t,r,o))}}}else(t._activeFloorIds||t._activeFloorBuildingIds)&&(this.state.styleState=xa(t,void 0,void 0))},t.prototype.updateScene=function(){var t=this,e=!1,n=new Map;if(this.activeFloor){var i=this.floors.get(this.activeFloor);if(!i)return;var r=i.getCurrentMod();r&&r.ready&&n.set(r.key,r)}this.displayedMods.forEach((function(i,r){n.has(r)||(t.removeFloorMod(i),e=!0)})),n.forEach((function(n,i){t.displayedMods.has(i)||(t.addFloorMod(n),e=!0),t.cache.get(i)})),e&&(this.displayedMods=n,this.state.needLabeling=!0,this.state.needRerender=!0,this.modules.identifier.resetCache())},t.prototype.addFloorMod=function(t){t.object&&(this.modules.tileManager.addObject(t.object),this.modules.labeler.addLabels(t.key,Vo.AL.Floor,t.getLabels()))},t.prototype.removeFloorMod=function(t){t.object&&(this.modules.tileManager.removeObject(t.object),this.modules.labeler.removeLabels(t.key))},t.prototype.commitMods=function(){if(this.activeFloor){var t=this.floors.get(this.activeFloor);t&&t.commitMod()}},t.prototype.findActiveFloor=function(){var t=this.complexDescriptors,e=this.state,n=e.center,i=e.zoom,r=e.styleZoom,o=e.rotation,a=e.size,s=e.pitch,l=e.viewport,c=e.padding;if(!(r<g.floors.displayStyleZoom)){var u,d=new x.V({center:n,zoom:i,rotation:o,size:[Math.floor(a[0]*(1-g.floors.viewportPadding)),Math.floor(a[1]*(1-g.floors.viewportPadding))],pitch:s,viewport:l,padding:c}),h=1/0;return t.forEach((function(t){var e=H.TE(n,t.center);h>e&&(0,Bo.M)(d.getViewportVertices(),t.bound)&&(h=e,u=t)})),u?u.id:void 0}},t}(),Ia=function(){function t(t,e){this.state=t,this.modules=e,this.tileLayers=[],this.objects=[],this.viewportDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"},{path:"demMode",type:"boolean"}])}return t.prototype.addTileLayer=function(t){-1===this.tileLayers.indexOf(t)&&(this.tileLayers.push(t),t.redraw(),this.modules.identifier.resetCache(),this.state.needLabeling=!0,this.state.needRerender=!0)},t.prototype.removeTileLayer=function(t){(0,b.VJ)(this.tileLayers,t)&&(t.resetHoverId(),this.modules.identifier.resetCache(),this.state.needLabeling=!0,this.state.needRerender=!0)},t.prototype.redraw=function(){this.modules.labeler.clearPreviousLabels();for(var t=0,e=this.tileLayers;t<e.length;t++){var n=e[t];n.resetHoverId(),n.redraw()}this.state.needRerender=!0},t.prototype.activateStyleUpdating=function(){this.tileLayers.forEach((function(t){return t.activateStyleUpdating()}))},t.prototype.finishStyleUpdating=function(){this.tileLayers.forEach((function(t){return t.finishStyleUpdating()}))},t.prototype.setSelectedIds=function(){this.tileLayers.forEach((function(t){return t.setSelectedIds()}))},t.prototype.getViewportTiles=function(){for(var t=[],e=0,n=this.tileLayers;e<n.length;e++){var i=n[e];t.push.apply(t,i.getViewportTiles())}return t},t.prototype.viewportTilesReady=function(){return this.tileLayers.every((function(t){return t.viewportTilesReady()}))},t.prototype.displayedTilesAnimationFinished=function(){return this.tileLayers.every((function(t){return t.displayedTilesAnimationFinished()}))},t.prototype.getDisplayedIdentifyData=function(){for(var t=[],e=0,n=this.tileLayers;e<n.length;e++){var i=n[e];t.push.apply(t,i.getDisplayedIdentifyData())}return t},t.prototype.getLabelingData=function(){return this.tileLayers.map((function(t){return t.getLabelingData()}))},t.prototype.isIdle=function(){return this.viewportTilesReady()&&this.displayedTilesAnimationFinished()},t.prototype.update=function(){var t=this.state;this.viewportDiffer.check(t)&&this.tileLayers.forEach((function(t){return t.updateViewport()}));for(var e=0,n=this.tileLayers;e<n.length;e++)(o=n[e]).update();if(this.updateTickers(),t.collectStats){this.state.stats.tileCount=0;for(var i=0,r=this.tileLayers;i<r.length;i++){var o=r[i];this.state.stats.tileCount+=o.getTileCount()}this.state.stats.dynamicTileCount=this.objects.filter((function(t){return"dynamicObject"===t.purpose||"floor"===t.purpose})).length}},t.prototype.getTileObjects=function(){return this.objects},t.prototype.addObject=function(t){-1===this.objects.indexOf(t)&&(this.objects.push(t),this.state.needRerender=!0)},t.prototype.removeObject=function(t){(0,b.VJ)(this.objects,t)&&(this.state.needRerender=!0)},t.prototype.destroy=function(){for(var t=this,e=0,n=this.tileLayers;e<n.length;e++)n[e].destroy();this.objects.forEach((function(e){return e.clean(t.state)}))},t.prototype.updateTickers=function(){var t=this;this.objects.forEach((function(e){return e.updateTicker(t.state)}))},t}(),Ma=rt.Vx.bind(null,"labelingOpacity",{step:function(t,e){return t.labelingOpacity=e}}),Pa=function(){function t(t,e){this.state=t,this.modules=e,this.viewportDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"},{path:"demMode",type:"boolean"}]),this.useThrottleUpdate=!0,this.isLabelingInProgress=!1,this.skipHysteresisInNextLabeling=!1,this.alwaysActiveLabelKeys=[],this.survivedLabelBoxes=new Set,this.prevSurvivedCommPoiIds=new Set,this.worker=function(t){return{appendLabels:t.get(ia.P.Labeling,"appendLabels"),appendLabelBox:t.get(ia.P.Labeling,"appendLabelBox"),removeLabels:t.get(ia.P.Labeling,"removeLabels"),processLabels:t.get(ia.P.Labeling,"processLabels"),clearPreviousLabels:t.get(ia.P.Labeling,"clearPreviousLabels")}}(this.modules.workers.fnRegistry),this.setLabelingInterval(g.labeling.interval)}return t.prototype.disableThrottleUpdateOnce=function(){this.useThrottleUpdate=!1},t.prototype.update=function(){Ma(this.state),!this.viewportDiffer.check(this.state)&&!this.state.needLabeling||this.isLabelingInProgress||(this.state.needLabeling=!1,this.isLabelingInProgress=!0,this.useThrottleUpdate?this.throttledUpdateLabeling():(this.useThrottleUpdate=!0,this.generateLabelingTile()))},t.prototype.isIdle=function(){return void 0===this.state.tickers.labelingOpacity&&!this.isLabelingInProgress&&!this.state.needLabeling},t.prototype.setLabelingInterval=function(t){var e=this;this.throttledUpdateLabeling=jt((function(){e.generateLabelingTile()}),t)},t.prototype.addLabels=function(t,e,n){this.worker.appendLabels(t,e,n,this.state.styleState,this.state.styleZoom),this.alwaysActiveLabelKeys.push(t),this.state.needLabeling=!0},t.prototype.addTileLabels=function(t,e,n){this.worker.appendLabels(t,e,n,this.state.styleState,this.state.styleZoom),this.state.needLabeling=!0},t.prototype.addLabelBox=function(t,e){this.worker.appendLabelBox(t,e),this.state.needLabeling=!0},t.prototype.removeLabels=function(t){this.worker.removeLabels(t);var e=this.alwaysActiveLabelKeys.indexOf(t);-1!==e&&this.alwaysActiveLabelKeys.splice(e,1),this.state.needLabeling=!0},t.prototype.isLabelBoxSurvived=function(t){return this.survivedLabelBoxes.has(t)},t.prototype.clearPreviousLabels=function(){this.worker.clearPreviousLabels()},t.prototype.resetHysteresis=function(){this.skipHysteresisInNextLabeling=!0,this.state.needLabeling=!0},t.prototype.generateLabelingTile=function(){var t=this,e=(0,Q.x7)((0,Bo.B)(this.state.tilesBounds),g.labeling.tileMultiplier),n={center:this.state.center,zoom:this.state.zoom,styleZoom:this.state.styleZoom,rotation:this.state.rotation,size:this.state.size,pitch:this.state.pitch,viewport:this.state.viewport,padding:this.state.padding,styleState:this.state.styleState,buildingHeight:this.modules.buildingHeightAnimator.getDefaultBuildingHeight(),tilesBounds:this.state.tilesBounds,debugLabels:this.modules.labelsDebug.isEnabled()};this.worker.processLabels(this.modules.tileManager.getLabelingData(),this.alwaysActiveLabelKeys,n,(0,Q.Bs)(e),window.devicePixelRatio,this.modules.floorManager.getActiveFloorHiddenIds(),g.labeling.commercialMargins,this.skipHysteresisInNextLabeling).then((function(n){t.survivedLabelBoxes.clear(),n.survivedLabelBoxIds.forEach((function(e){return t.survivedLabelBoxes.add(e)})),t.processSurvivedCommPoiIds(n.survivedCommPoiIds),t.labelTile&&(t.modules.tileManager.removeObject(t.labelTile),t.labelTile.clean(t.state)),t.modules.assetManager.loadRasters(n.collectorOutput.rastersToLoad),t.labelTile=new G.W("labeling",n.collectorOutput.data,t.modules.renderer,e),t.modules.tileManager.addObject(t.labelTile);var i,r,o,a,s,l=g.labeling,c=l.animationTime,u=l.animationType,d=l.interval;i=t.state,r=u,o=0,a=1,s=Math.min(c,d),rt.BL("labelingOpacity",{easing:r},i,o,a,s),t.state.needRerender=!0,n.labels&&t.modules.labelsDebug.drawLabels(n.labels),t.isLabelingInProgress=!1})),this.skipHysteresisInNextLabeling=!1},t.prototype.processSurvivedCommPoiIds=function(t){var e=this;if(0!==t.length){var n=t.filter((function(t){return!e.prevSurvivedCommPoiIds.has(t)}));0!==n.length&&this.modules.map.emit("commpoishow",{commPoiIds:n}),this.prevSurvivedCommPoiIds=new Set(t)}else this.prevSurvivedCommPoiIds.clear()},t}(),Ta=10,La=7,Ea=3,ka=2,za=0,Ca=4,Aa=2,Da="#ffffff",Fa="#667799",Ra="#ffffff",Oa=5,ja=4,Ba=2,Ua=1,Za="#667799",Na="#ffffff",Ha="#00000026",Ga="#66779966",Va=13,Wa={start:{en:"Start",ru:"Старт"},addPoint:{en:"Add point",ru:"Добавить точку"},meter:{en:"m",ru:"м"},kilometer:{en:"km",ru:"км"}};function qa(t,e,n){return e?Wa.start[n]||Wa.start.en:t<1e3?t+" "+(Wa.meter[n]||Wa.meter.en):(t/1e3).toFixed(1)+" "+(Wa.kilometer[n]||Wa.kilometer.en)}function Xa(t,e){return'\n        <div style="font-size: '+e+'px;\n            color: #667799;\n            user-select: none;\n            font-family: SuisseIntl, Helvetica, Arial, sans-serif;\n            text-shadow: 1px 0px 1px #fff, -1px 0px 1px #fff, 0px 1px 1px #fff, 0px -1px 1px #fff;\n            white-space: nowrap;\n            cursor: pointer;\n        ">\n            '+t+"\n        </div>\n    "}function Ya(t,e){return'\n        <div style="text-shadow: 1px 0px 1px #fff, -1px 0px 1px #fff, 0px 1px 1px #fff, 0px -1px 1px #fff;\n            user-select: none;\n            color: #667799;\n            font-family: SuisseIntl, Helvetica, Arial, sans-serif;\n            font-size: 13px;\n            margin: -12px 0 0 12px; /** отступы от точки наведения */\n            white-space: nowrap;\n            cursor: pointer;\n        ">\n            '+t+"\n            <br>\n            "+function(t){return Wa.addPoint[t]||Wa.addPoint.en}(e)+"\n        </div>\n    "}function Ka(t,e,n,i){return new it(i,{coordinates:t,interactive:n,draggable:n,width:e?La:za,borderWidth:e?Ea:Ca,border2Width:e?ka:Aa,color:Da,borderColor:Fa,border2Color:Ra,zIndex:Ta})}function Ja(t,e,n){return new il(n,{coordinates:t,zIndex:Oa,zIndex2:Oa-1,zIndex3:Oa-2,width:ja,width2:e?0:ja+2*Ba,width3:e?0:ja+2*(Ba+Ua),color:e?Ga:Za,color2:Na,color3:Ha,interactive:!e})}var Qa="PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjIiIGhlaWdodD0iMjIiPjxkZWZzPjxwYXRoIGlkPSJBIiBkPSJNMTIgMTAuNTg2bDMuNzkzLTMuNzkzIDEuNDE0IDEuNDE0TDEzLjQxNCAxMmwzLjc5MyAzLjc5My0xLjQxNCAxLjQxNEwxMiAxMy40MTRsLTMuNzkzIDMuNzkzLTEuNDE0LTEuNDE0TDEwLjU4NiAxMiA2Ljc5MyA4LjIwN2wxLjQxNC0xLjQxNEwxMiAxMC41ODZ6Ii8+PC9kZWZzPjxnIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEgLTEpIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMC41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIuMTUiLz48bWFzayBpZD0iQiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjQSIvPjwvbWFzaz48dXNlIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI0EiLz48ZyBmaWxsPSIjMjYyNjI2IiBtYXNrPSJ1cmwoI0IpIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6Ii8+PC9nPjwvZz48L3N2Zz4=",$a=function(t){function e(e,n,i,r){var o=t.call(this)||this;o.markerOrLabelMouseover=function(){o.markerOrLabelHovered||(o.markerOrLabelHovered=!0,void 0===o.hoverTimer&&o.emit("mouseover"))},o.markerOrLabelMouseout=function(){o.markerOrLabelHovered&&(o.markerOrLabelHovered=!1,o.hoverTimer=window.setTimeout((function(){o.markerOrLabelHovered||(o.emit("mouseout"),o.hoverTimer=void 0)}),100))},o.onClick=function(){return o.emit("click")},o.labelText=qa(r,i,e.state.lang),o.point=n,o.distance=r,o.label=function(t,e,n){var i=Xa(e,Va),r=function(t,e){return.55*e*t.length}(e,Va);return new sa(n,{coordinates:t,html:i,offset:[(La+Ea+ka)/2+2,-Va/2-2],labeling:{type:"full",width:r,height:Va},animate:!1,zIndex:Oa+1})}(n,o.labelText,e),o.marker=Ka(n,i,!0,e),o.markerOrLabelHovered=!1;var a=o.label.dangerouslyGetRootElement();return a.addEventListener("mouseover",o.markerOrLabelMouseover),a.addEventListener("mouseout",o.markerOrLabelMouseout),a.addEventListener("click",o.onClick),o.marker.on("mouseover",(function(){return o.markerOrLabelMouseover()})),o.marker.on("mouseout",(function(){return o.markerOrLabelMouseout()})),o.marker.on("dragstart",(function(t){var e=t.lngLat,n=t.originalEvent,i=t.point,r=t.target;o.emit("dragstart",{lngLat:e,originalEvent:n,point:i,targetData:o,target:r})})),o.marker.on("dragend",(function(t){var e=t.lngLat,n=t.originalEvent,i=t.point,r=t.target;o.emit("dragend",{lngLat:e,originalEvent:n,point:i,targetData:o,target:r})})),o}return(0,j.ZT)(e,t),e.prototype.getDistance=function(){return this.distance},e.prototype.getPoint=function(){return this.point},e.prototype.getMarkerUniqId=function(){return this.marker.uniqId},e.prototype.getLabelUniqId=function(){return this.label.uniqId},e.prototype.setPoint=function(t){this.point=t},e.prototype.remove=function(){this.marker.remove();var t=this.label.dangerouslyGetRootElement();t.removeEventListener("mouseover",this.markerOrLabelMouseover),t.removeEventListener("mouseout",this.markerOrLabelMouseout),t.removeEventListener("click",this.onClick),this.label.destroy()},e.prototype.activateHover=function(){this.label.setContent('\n        <img style="\n            user-select: none;\n            width: 24px;\n            height: 24px;\n            margin-top: -4px;\n            cursor: pointer;\n        " src="data:image/svg+xml;base64,'+Qa+'" alt="close">\n    ')},e.prototype.deactivateHover=function(){this.label.setContent(Xa(this.labelText,Va))},e}(B.c),ts=function(){function t(t,e){var n=this;this.onDocumentMouseMove=function(t){n.mousePos=E(n.modules.layout.rootContainer,t.clientX,t.clientY),n.needsUpdate=!0},this.modules=e,this.state=t,this.joints=[],this.enabled=!1,this.needsUpdate=!1,this.hidePreviewLine=!1,this.hideMouseElem=!1,this.mousePos=[0,0],document.addEventListener("mousemove",this.onDocumentMouseMove),this.langDiffer=new Zt([{path:"lang",type:"string"}])}return t.prototype.destroy=function(){document.removeEventListener("mousemove",this.onDocumentMouseMove)},t.prototype.enable=function(){this.enabled||(this.enabled=!0,this.state.identifyPickDistance=2*g.identify.pickDistance,this.popup=new sa(this.modules.map,{coordinates:[0,0],html:"",interactive:!1,animate:!1,zIndex:1}))},t.prototype.disable=function(){this.enabled=!1,this.reset(),void 0!==this.mouseElem&&(this.mouseElem.remove(),this.mouseElem=void 0),this.state.identifyPickDistance=g.identify.pickDistance,this.popup&&(this.popup.destroy(),this.popup=void 0)},t.prototype.update=function(){this.enabled&&(this.langDiffer.check(this.state)&&this.recalculate(),this.needsUpdate&&(this.needsUpdate=!1,this.drawMousePoint(),this.drawPreviewLine()))},t.prototype.setPoints=function(t){var e=this;this.reset(),t.forEach((function(t){return e.addPointToEnd(t)})),this.drawPolyline(),this.sendRulerChangeEvent(!1)},t.prototype.handleClick=function(t,e){var n=this.getJointByUniqId(e&&e.dynamicObjectId);if(n){var i=this.getJointIndexByReferer(n);void 0!==i&&(n.remove(),this.joints.splice(i,1),this.recalculate(),this.hidePreviewLine=!1,this.hideMouseElem=!1),this.popup&&this.popup.setContent("")}else if(e&&this.polyline&&this.polyline.uniqId===e.dynamicObjectId){var r=this.polyline.snapPoint(t),o=this.getJointIndexByDistance(r.distance),a=this.createJoint(r.point,!1,r.distance);this.joints.splice(o,0,a),this.hidePreviewLine=!0,this.hideMouseElem=!0,this.drawPolyline(),this.sendRulerChangeEvent(!0),this.popup&&this.popup.setContent("")}else{var s=(0,w.PA)(this.modules.camera.unproject(t));this.addPointToEnd(s),this.drawPolyline(),this.sendRulerChangeEvent(!0)}},t.prototype.recalculate=function(){var t=this,e=[];this.joints.forEach((function(n,i){n.remove();var r=0===i,o=0;if(!r){var a=e[i-1];o=a.getDistance()+(0,w.vn)(a.getPoint(),n.getPoint())}var s=t.createJoint(n.getPoint(),r,o);e.push(s)})),this.joints=e,this.drawPolyline(),this.sendRulerChangeEvent(!0)},t.prototype.sendRulerChangeEvent=function(t){this.modules.map.emit("rulerchange",{points:this.getPoints(),isUser:t})},t.prototype.getJointByUniqId=function(t){if(void 0!==t)for(var e=0,n=this.joints;e<n.length;e++){var i=n[e];if(t===i.getMarkerUniqId()||t===i.getLabelUniqId())return i}},t.prototype.getJointIndexByDistance=function(t){for(var e=0,n=0,i=this.joints;n<i.length&&!(t<i[n].getDistance());n++)e++;return e},t.prototype.getJointIndexByReferer=function(t){for(var e=0,n=0,i=this.joints;n<i.length;n++){if(i[n]===t)return e;e++}},t.prototype.getPoints=function(){return this.joints.map((function(t){return t.getPoint()}))},t.prototype.reset=function(){this.joints.forEach((function(t){return t.remove()})),this.joints=[],void 0!==this.polyline&&(this.polyline.remove(),this.polyline=void 0),void 0!==this.previewLine&&(this.previewLine.remove(),this.previewLine=void 0),this.hidePreviewLine=!1,this.hideMouseElem=!1,this.popup&&this.popup.setContent("")},t.prototype.createJoint=function(t,e,n){var i=this,r=new $a(this.modules.map,t,e,n);return r.on("mouseover",(function(){void 0===i.draggableJointIndex&&(i.requestUpdate(!0,!0),r.activateHover())})),r.on("mouseout",(function(){void 0===i.draggableJointIndex&&(i.requestUpdate(!1,!0),r.deactivateHover())})),r.on("dragstart",(function(){i.requestUpdate(!1,!0),i.draggableJointIndex=i.getJointIndexByReferer(r)})),r.on("dragend",(function(t){i.requestUpdate(!1,!0),i.draggableJointIndex=void 0,r.setPoint(t.lngLat),i.recalculate()})),r.on("click",(function(){var t=i.getJointIndexByReferer(r);void 0!==t&&(r.remove(),i.joints.splice(t,1),i.recalculate(),i.hidePreviewLine=!1,i.hideMouseElem=!1),i.popup&&i.popup.setContent("")})),r},t.prototype.addPointToEnd=function(t){var e=!0,n=0;if(this.joints.length>0){e=!1;var i=this.joints[this.joints.length-1];n=i.getDistance()+(0,w.vn)(i.getPoint(),t)}var r=this.createJoint(t,e,n);this.joints.push(r)},t.prototype.drawPolyline=function(){var t=this;void 0!==this.polyline&&(this.polyline.remove(),this.polyline=void 0);var e=this.getPoints();if(!(e.length<2)){var n=Ja(e,!1,this.modules.map);n.on("mousemove",(function(e){if(void 0===t.draggableJointIndex){if(t.popup){var i=n.snapPoint(e.point),r=qa(i.distance,!1,t.state.lang);t.popup.setPosition(i.point),t.popup.setContent(Ya(r,t.state.lang)),t.snapPoint=i.point}t.requestUpdate(!0,!1)}})),n.on("mouseout",(function(){void 0===t.draggableJointIndex&&(t.popup&&t.popup.setContent(""),t.requestUpdate(!1,!0))})),this.polyline=n}},t.prototype.requestUpdate=function(t,e){this.hidePreviewLine=t,this.hideMouseElem=e,this.needsUpdate=!0},t.prototype.getPreviewPoints=function(){var t=this.getPoints();if(this.hidePreviewLine||t.length<1)return[];var e=this.draggableJointIndex,n=(0,w.PA)(this.modules.camera.unproject(this.mousePos));if(void 0===e||1===t.length)return[];if(e===this.joints.length-1)return[t[t.length-2],n];if(0===e)return[t[1],n];var i=this.joints[e-1],r=this.joints[e+1];return[i.getPoint(),n,r.getPoint()]},t.prototype.drawPreviewLine=function(){void 0!==this.previewLine&&(this.previewLine.remove(),this.previewLine=void 0);var t=this.getPreviewPoints();t.length<1||(this.previewLine=Ja(t,!0,this.modules.map))},t.prototype.drawMousePoint=function(){void 0!==this.mouseElem&&(this.mouseElem.remove(),this.mouseElem=void 0),this.hideMouseElem||void 0===this.snapPoint||(this.mouseElem=Ka(this.snapPoint,!0,!1,this.modules.map))},t}(),es=function(){function t(t,e,n){this.type=t,this.handler=n,this.mouseDownPoint=e,this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionstart",{target:"pitch/rotation"})}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseup":return this.processMouseUpAction(t);case"keyup":return this.processKeyUpAction(t);default:return this}},t.prototype.processMouseMoveAction=function(t){var e=E(this.handler.container,t.clientX,t.clientY);return new ns(this.type,this.mouseDownPoint,e,this.handler)},t.prototype.processMouseUpAction=function(t){var e=this;switch(this.type){case"keyPrimary":if(0===t.button&&(t.ctrlKey||t.metaKey))return this.returnToInitialState();break;case"secondary":if(2===t.button){var n=E(this.handler.container,t.clientX,t.clientY);return this.handler.modules.identifier.search("contextmenu",n,!0).then((function(i){Y("contextmenu",i,t,n,e.handler.modules)})),this.returnToInitialState()}break;case"auxiliary":if(1===t.button)return this.returnToInitialState()}return this},t.prototype.processKeyUpAction=function(t){return"keyPrimary"!==this.type||"Control"!==t.key&&"Meta"!==t.key?this:(this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new is(this.mouseDownPoint,this.handler))},t.prototype.returnToInitialState=function(){return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new ds(this.handler)},t}(),ns=function(){function t(t,e,n,i){this.type=t,this.mouseDownPoint=e,this.mouseMovePoint=n,this.handler=i,this.handler.mapState.userHasInteracted=!0,this.handler.mapState.disablePitchByUserInteraction&&this.handler.mapState.disableRotationByUserInteraction||this.handler.container.classList.add("mapgl-rotating"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseleave":return this.returnToInitialState();case"mouseup":return this.processMouseUpAction(t);case"keyup":return this.processKeyUpAction(t);default:return this}},t.prototype.update=function(t){0===this.mouseDownPoint[0]&&0===this.mouseDownPoint[1]&&(this.mouseDownPoint=this.mouseMovePoint);var e=(0,b.Te)(t.size,this.mouseDownPoint),n=(0,b.Te)(t.size,this.mouseMovePoint),i=(e[0]-n[0])*g.zoom.mouseRotateDelta,r=(n[1]-e[1])*g.zoom.mousePitchDelta;Bt(t),t.disableRotationByUserInteraction||yt(t,t.rotation+i,{animate:!1}),t.disablePitchByUserInteraction||xt(t,(0,b.uZ)(t.pitch+r,t.minPitch,t.maxPitch),{animate:!1}),this.mouseDownPoint=this.mouseMovePoint,t.needRerender=!0},t.prototype.processMouseMoveAction=function(t){return this.mouseMovePoint=E(this.handler.container,t.clientX,t.clientY),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processMouseUpAction=function(t){switch(this.type){case"keyPrimary":if(0===t.button&&(t.ctrlKey||t.metaKey))return this.returnToInitialState();break;case"secondary":if(2===t.button)return this.returnToInitialState();break;case"auxiliary":if(1===t.button)return this.returnToInitialState()}return this},t.prototype.processKeyUpAction=function(t){return"keyPrimary"!==this.type||"Control"!==t.key&&"Meta"!==t.key?this:(this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new is(this.mouseMovePoint,this.handler))},t.prototype.returnToInitialState=function(){return this.handler.mapState.userHasInteracted=!0,this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new ds(this.handler)},t}(),is=function(){function t(t,e){this.handler=e,this.toInitialOnMouseUp=!1,this.mouseDownPoint=t,this.dragStartPoint=t,this.isTimerStarted=void 0!==this.handler.dblClickTimer,this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionstart",{target:"center"}),this.isTimerStarted&&(window.clearTimeout(this.handler.dblClickTimer),this.handler.dblClickTimer=void 0)}return t.prototype.processAction=function(t){switch(t.type){case"mousedown":return this.toInitialOnMouseUp=!0,this;case"mouseup":return this.processMouseUpAction(t);case"mousemove":return this.processMouseMoveAction(t);case"click":return this.processMouseClickAction(t);case"keydown":return this.processKeyDownAction(t);default:return this}},t.prototype.processMouseUpAction=function(t){return 0!==t.button||!this.toInitialOnMouseUp&&this.handler.modules.layout.isActionWithCanvas(t)?this:(this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new ds(this.handler))},t.prototype.processMouseMoveAction=function(t){var e=E(this.handler.container,t.clientX,t.clientY);return this.handler.mapState.disableDragging?(this.mouseDownPoint=e,this.dragStartPoint=e,this.toInitialOnMouseUp=!0,this):H.TE(this.mouseDownPoint,e)<g.events.dragThreshold?(this.dragStartPoint=e,this):new rs(e,this.dragStartPoint,this.handler)},t.prototype.processMouseClickAction=function(t){var e=this;if(!this.handler.modules.layout.isActionWithCanvas(t))return this;if(this.isTimerStarted){if(this.handler.mapState.zoom<this.handler.mapState.maxZoom){var n=this.handler.mapState,i=Math.min(n.zoom+1,n.maxZoom),r=E(this.handler.container,t.clientX,t.clientY);Bt(n),Pt(n,i,{duration:g.zoom.animDuration,zoomPoint:n.keepCenterWhileUserZoomRotate?void 0:r,blockBuildingAnimation:!0}),this.handler.mapState.needRerender=!0}}else{var o=E(this.handler.container,t.clientX,t.clientY);this.handler.modules.identifier.search("mouseClick",o,!0).then((function(n){var i=e.handler.modules.ruler;i.enabled?i.handleClick(o,n):e.handler.dblClickTimer||(e.handler.dblClickTimer=window.setTimeout((function(){Y("click",n,t,o,e.handler.modules),e.handler.dblClickTimer=void 0}),g.events.doubleClickTime))}))}return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new ds(this.handler)},t.prototype.processKeyDownAction=function(t){return"Control"===t.key||"Meta"===t.key?(this.handler.modules.map.emit("interactionend",{target:"center"}),new es("keyPrimary",this.mouseDownPoint,this.handler)):this},t}(),rs=function(){function t(t,e,n){this.mouseMovePoint=t,this.dragStartPoint=e,this.handler=n,this.handler.container.classList.add("mapgl-dragging"),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseup":return this.processMouseUpAction(t);case"keydown":return this.processKeyDownAction(t);default:return this}},t.prototype.update=function(t){var e=this.handler.modules.camera.unproject(this.dragStartPoint),n=this.handler.modules.camera.unproject(this.mouseMovePoint),i=S.d9(t.center);S.IH(i,i,e),S.lu(i,i,n),Bt(t),ft(t,i,{animate:!1}),this.dragStartPoint=this.mouseMovePoint,t.needRerender=!0},t.prototype.processMouseMoveAction=function(t){return this.mouseMovePoint=E(this.handler.container,t.clientX,t.clientY),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processMouseUpAction=function(t){return 0===t.button?this.returnToInitialState():this},t.prototype.processKeyDownAction=function(t){return"Control"===t.key||"Meta"===t.key?(this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),new es("keyPrimary",this.mouseMovePoint,this.handler)):this},t.prototype.returnToInitialState=function(){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.mapState.userHasInteracted=!0,new ds(this.handler)},t}(),os=function(){function t(t,e,n){this.handler=n,this.touchStartPoints=e,this.touchMovePoints=t,this.handler.mapState.userHasInteracted=!0,this.handler.mapState.disablePitchByUserInteraction||this.handler.container.classList.add("mapgl-rotating"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction(t);default:return this}},t.prototype.processTouchStartAction=function(t){return this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),new ls(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){return t.preventDefault(),this.touchMovePoints=k(t.touches,this.handler.container),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(t){return this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),0===t.touches.length?(this.handler.mapState.userHasInteracted=!0,new ds(this.handler)):new ls(t,this.handler,!1)},t}(),as=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.startPxAngle=0,r.rotationDetected=!1,n.length>1&&(r.startPxAngle=(0,M.Hl)(n[0],n[1])),r}return(0,j.ZT)(e,t),e.prototype.update=function(t){if(!(this.touchStartPoints.length<2||this.touchMovePoints.length<2)){var e=(0,M.L$)(this.touchMovePoints[0],this.touchMovePoints[1]),n=H.TK(this.touchMovePoints[0],this.touchMovePoints[1])/H.TK(this.touchStartPoints[0],this.touchStartPoints[1]),i=t.zoom+Math.log(n)/Math.log(2)*g.zoom.mobilePinchDelta,r=0,o=0;if(!this.rotationDetected){var a=(0,M.Hl)(this.touchMovePoints[0],this.touchMovePoints[1]);(o=Math.abs(this.startPxAngle-a))>Math.PI&&(o=2*Math.PI-o),o>=this.handler.mapState.touchRotationThreshold&&(this.rotationDetected=!0)}if(this.rotationDetected){var s=this.handler.modules.camera.unproject(this.touchStartPoints[0]),l=this.handler.modules.camera.unproject(this.touchStartPoints[1]),c=this.handler.modules.camera.unproject(this.touchMovePoints[0]),u=this.handler.modules.camera.unproject(this.touchMovePoints[1]);s&&l&&c&&u&&(r=(0,M.Hl)(s,l)-(0,M.Hl)(c,u))}var d=t.rotation+r,h=t.center;t.keepCenterWhileUserZoomRotate||S.IH(h,t.center,(0,b.Kv)(t,e,{zoom:i,rotation:d})),Bt(t),ft(t,h,{animate:!1}),Pt(t,i,{animate:!1}),this.handler.mapState.disableRotationByUserInteraction||yt(t,d,{animate:!1}),this.touchStartPoints=this.touchMovePoints,t.needRerender=!0}},e}(os),ss=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return(0,j.ZT)(e,t),e.prototype.update=function(t){var e=this.touchStartPoints.map((function(e){return(0,b.Te)(t.size,e)})),n=this.touchMovePoints.map((function(e){return(0,b.Te)(t.size,e)})),i=(0,M.L$)(e[0],e[1]),r=((0,M.L$)(n[0],n[1])[1]-i[1])*g.zoom.mousePitchDelta;Bt(t),xt(t,(0,b.uZ)(t.pitch+r,t.minPitch,t.maxPitch),{animate:!1}),this.touchStartPoints=this.touchMovePoints,t.needRerender=!0},e}(os),ls=function(){function t(t,e,n){this.handler=e,this.needClickOnTouchEnd=n,this.toZoomRotate=!1,this.touchStartPoints=k(t.touches,this.handler.container),this.handler.mapState.userHasInteracted=!0,this.isTimerStarted=void 0!==this.handler.dblClickTimer,z(t)?this.startedInteractionTarget="pitch/zoom/rotation":this.isTimerStarted?(this.startedInteractionTarget="zoom/rotation",window.clearTimeout(this.handler.dblClickTimer),this.handler.dblClickTimer=void 0):this.startedInteractionTarget="center",this.handler.modules.map.emit("interactionstart",{target:this.startedInteractionTarget})}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction(t);default:return this}},t.prototype.getStartedInteractionTarget=function(){return this.startedInteractionTarget},t.prototype.processTouchStartAction=function(t){return t.preventDefault(),1===this.touchStartPoints.length&&(this.needClickOnTouchEnd=!1,this.handler.modules.map.emit("interactionend",{target:"center"}),this.startedInteractionTarget="pitch/zoom/rotation",this.handler.modules.map.emit("interactionstart",{target:this.startedInteractionTarget}),this.handler.mapState.userHasInteracted=!0),this.touchStartPoints=k(t.touches,this.handler.container),this},t.prototype.processTouchMoveAction=function(t){var e=this;t.preventDefault();var n=k(t.touches,this.handler.container);if(!z(t))return H.TE(this.touchStartPoints[0],n[0])<g.events.dragThreshold?(this.touchStartPoints=n,this):this.isTimerStarted?new us(n[0],this.touchStartPoints[0],this.handler):this.handler.mapState.disableDragging?(this.touchStartPoints=n,this.needClickOnTouchEnd=!1,this):new cs(n[0],this.touchStartPoints[0],this.handler);if(this.touchStartPoints.length<2)return this.processTouchStartAction(t);var i=H.Ue(),r=H.Ue();H.lu(i,n[0],this.touchStartPoints[0]),H.lu(r,n[1],this.touchStartPoints[1]);var o=H.AK(i,r);if(o>0){var a=H.TE(this.touchStartPoints[0],n[0]),s=H.TE(this.touchStartPoints[1],n[1]);return a<g.events.pitchThreshold||s<g.events.pitchThreshold?(this.touchStartPoints=n,this):this.handler.mapState.disablePitchByUserInteraction?this:new ss(n,this.touchStartPoints,this.handler)}return o<0?new as(n,this.touchStartPoints,this.handler):(0,M.se)(i)||(0,M.se)(r)?this.pitchWaitingTimer?this:this.toZoomRotate?(this.toZoomRotate=!1,new as(n,this.touchStartPoints,this.handler)):(this.pitchWaitingTimer=window.setTimeout((function(){e.toZoomRotate=!0,e.pitchWaitingTimer=void 0}),g.events.pitchWaitingTime),this):new as(n,this.touchStartPoints,this.handler)},t.prototype.processTouchEndAction=function(t){return t.cancelable&&t.preventDefault(),0===t.touches.length?1===t.changedTouches.length&&this.needClickOnTouchEnd?this.processTouchClickAction(this.touchStartPoints[0],t):(this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:t.changedTouches.length>1?"pitch/zoom/rotation":"center"}),new ds(this.handler)):(z(t)||(this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),this.startedInteractionTarget="center",this.handler.modules.map.emit("interactionstart",{target:this.startedInteractionTarget}),this.handler.mapState.userHasInteracted=!0),this.touchStartPoints=k(t.touches,this.handler.container),this)},t.prototype.processTouchClickAction=function(t,e){var n=this;if(this.isTimerStarted){if(this.handler.mapState.zoom<this.handler.mapState.maxZoom){var i=this.handler.mapState,r=Math.min(i.zoom+1,i.maxZoom),o=i.keepCenterWhileUserZoomRotate?void 0:t;Bt(i),Pt(i,r,{duration:g.zoom.animDuration,zoomPoint:o,blockBuildingAnimation:!0}),this.handler.mapState.needRerender=!0}}else if(this.handler.modules.layout.isActionWithCanvas(e))this.handler.modules.identifier.search("mouseClick",t,!0).then((function(i){var r=n.handler.modules.ruler;r.enabled?r.handleClick(t,i):n.handler.dblClickTimer||(n.handler.dblClickTimer=window.setTimeout((function(){Y("click",i,e,t,n.handler.modules),n.handler.dblClickTimer=void 0}),g.events.doubleClickTime))}));else{var a=e.changedTouches[0];e.target&&a&&e.target.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,clientX:a.clientX,clientY:a.clientY}))}return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new ds(this.handler)},t}(),cs=function(){function t(t,e,n){this.handler=n,this.touchMovePoint=t,this.touchStartPoint=e,this.handler.mapState.userHasInteracted=!0,this.handler.container.classList.add("mapgl-dragging"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction();default:return this}},t.prototype.update=function(t){var e=this.handler.modules.camera.unproject(this.touchStartPoint),n=this.handler.modules.camera.unproject(this.touchMovePoint),i=S.d9(t.center);S.IH(i,i,e),S.lu(i,i,n),Bt(t),ft(t,i,{animate:!1}),this.touchStartPoint=this.touchMovePoint,t.needRerender=!0},t.prototype.processTouchStartAction=function(t){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),new ls(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){t.preventDefault();var e=k(t.touches,this.handler.container);return this.touchMovePoint=e[0],this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.mapState.userHasInteracted=!0,new ds(this.handler)},t}(),us=function(){function t(t,e,n){this.handler=n,this.mapHeight=n.mapState.size[1],this.startZoom=n.mapState.zoom,this.touchMovePointY=t[1],this.touchStartPoint=e,this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction();default:return this}},t.prototype.update=function(t){var e=this.touchMovePointY-this.touchStartPoint[1];if(0!==e){var n=e/this.mapHeight,i=(0,b.uZ)(this.startZoom+n*g.zoom.mobileTapDelta,t.minZoom,t.maxZoom),r=t.center;t.keepCenterWhileUserZoomRotate||S.IH(r,t.center,(0,b.Kv)(t,this.touchStartPoint,{zoom:i})),Bt(t),ft(t,r,{animate:!1}),Pt(t,i,{animate:!1}),t.needRerender=!0}},t.prototype.processTouchStartAction=function(t){return this.handler.modules.map.emit("interactionend",{target:"zoom/rotation"}),new ls(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){t.preventDefault();var e=k(t.touches,this.handler.container);return this.touchMovePointY=e[0][1],this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(){return this.handler.modules.map.emit("interactionend",{target:"zoom/rotation"}),this.handler.mapState.userHasInteracted=!0,new ds(this.handler)},t}(),ds=function(){function t(t){this.handler=t}return t.prototype.processAction=function(t){switch(t.type){case"mousedown":return this.processMouseDownAction(t);case"touchstart":return this.processTouchStartAction(t);default:return this}},t.prototype.processMouseDownAction=function(t){var e=E(this.handler.container,t.clientX,t.clientY);switch(t.button){case 0:return t.ctrlKey||t.metaKey?new es("keyPrimary",e,this.handler):(this.handler.modules.layout.isActionWithCanvas(t)&&Y("mousedown",this.handler.modules.identifier.searchSync(e),t,e,this.handler.modules),new is(e,this.handler));case 1:return new es("auxiliary",e,this.handler);case 2:return new es("secondary",e,this.handler);default:return this}},t.prototype.processTouchStartAction=function(t){if(t.preventDefault(),!t.touches)return this;if(this.handler.modules.layout.isActionWithCanvas(t)){var e=E(this.handler.container,t.changedTouches[0].clientX,t.changedTouches[0].clientY);Y("touchstart",this.handler.modules.identifier.searchSync(e),t,e,this.handler.modules)}return new ls(t,this.handler,1===t.touches.length)},t}(),hs=function(){function t(){}return t.prototype.processAction=function(){return this},t}(),fs=function(){function t(t,e){var n=this;this.preventDefault=function(t){t.preventDefault()},this.onMouseMove=function(t){n.dblClickTimer&&(n.dblClickTimer=void 0),n.switchState(t)},this.onTouchStart=function(t){n.modules.layout.isActionWithMap(t)&&n.switchState(t)},this.switchState=function(t){n.state;var e=n.state.processAction(t);n.state instanceof hs||(n.state=e)},this.state=new ds(this),this.mapState=t,this.modules=e,this.container=e.layout.mapContainer,document.addEventListener("mouseup",this.switchState),document.addEventListener("keydown",this.switchState),document.addEventListener("keyup",this.switchState),document.addEventListener("mouseleave",this.switchState),document.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("click",this.switchState),this.container.addEventListener("mousedown",this.switchState),this.container.addEventListener("mouseout",this.switchState),document.addEventListener("touchstart",this.onTouchStart),document.addEventListener("touchend",this.switchState),document.addEventListener("touchmove",this.switchState),this.container.addEventListener("dragstart",this.preventDefault),this.container.addEventListener("drag",this.preventDefault),this.container.addEventListener("dragend",this.preventDefault),this.container.addEventListener("contextmenu",this.preventDefault)}return t.prototype.destroy=function(){document.removeEventListener("mouseup",this.switchState),document.removeEventListener("keydown",this.switchState),document.removeEventListener("keyup",this.switchState),document.removeEventListener("mouseleave",this.switchState),document.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("click",this.switchState),this.container.removeEventListener("mousedown",this.switchState),this.container.removeEventListener("mouseout",this.switchState),document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchend",this.switchState),document.removeEventListener("touchmove",this.switchState),this.container.removeEventListener("dragstart",this.preventDefault),this.container.removeEventListener("drag",this.preventDefault),this.container.removeEventListener("dragend",this.preventDefault),this.container.removeEventListener("contextmenu",this.preventDefault)},t.prototype.block=function(){if(!(this.state instanceof hs)){var t=this.modules.map;switch(this.container.classList.remove("mapgl-dragging"),this.container.classList.remove("mapgl-rotating"),this.state.constructor){case is:case rs:case cs:t.emit("interactionend",{target:"center"});break;case es:case ns:t.emit("interactionend",{target:"pitch/rotation"});break;case us:t.emit("interactionend",{target:"zoom/rotation"});break;case as:case ss:t.emit("interactionend",{target:"pitch/zoom/rotation"});break;case ls:var e=this.state.getStartedInteractionTarget();t.emit("interactionend",{target:e})}this.state=new hs}},t.prototype.unblock=function(){this.state instanceof ds||this.state instanceof hs&&(this.state=new ds(this))},t}(),ps=n(3378),ms=n(4524),vs=n(5715),_s=n(5180),ys=n(7170),gs=n(3166),bs=function(){function t(t,e){this.mapState=t,this.modules=e,this.enabled=!1,this.justEnabled=!1,this.isMetaLoading=!1,this.lastUpdateTime=-1/0,this.regionIds=new Set,this.gridState=(0,vs.y7)("traffic",0,g.traffic.minZoom,g.traffic.maxZoom,g.traffic.minZoom,g.traffic.maxDetailLevel,e,t),this.viewportDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"demMode",type:"boolean"}])}return t.prototype.show=function(){this.enabled||(this.enabled=!0,this.justEnabled=!0,this.modules.map.emit("trafficshow"))},t.prototype.hide=function(){this.enabled&&((0,vs.d1)(this.gridState),this.enabled=!1,this.modules.map.emit("traffichide"))},t.prototype.isEnabled=function(){return this.enabled},t.prototype.destroy=function(){(0,vs.d1)(this.gridState)},t.prototype.redraw=function(){this.enabled&&((0,vs.d1)(this.gridState),(0,ps.o)(this.gridState,this.mapState))},t.prototype.activateStyleUpdating=function(){this.enabled&&(0,gs.I2)(this.gridState,this.mapState.handyStyleId,this.modules.styleManager.getStyleRevision(this.mapState.handyStyleId))},t.prototype.finishStyleUpdating=function(){this.enabled&&(0,gs.cA)(this.gridState)},t.prototype.update=function(){if(this.enabled&&((0,b.TH)(this.regionIds,this.mapState.shownRegionIds)||(this.regionIds=new Set(this.mapState.shownRegionIds),this.fetchMeta()),Date.now()-this.lastUpdateTime>g.traffic.updateInterval&&this.fetchMeta(),void 0!==this.timestamp)){(this.viewportDiffer.check(this.mapState)||this.justEnabled)&&(this.justEnabled=!1,(0,ps.o)(this.gridState,this.mapState),this.mapState.needRerender=!0);var t=(0,j.pi)({},this.gridState.displayedMods);(0,ms.r)(this.gridState,this.mapState,this.modules),this.fetch((0,vs.w1)(this.gridState),this.timestamp),this.abortFetch((0,vs.lH)(this.gridState)),this.generate((0,vs.e)(this.gridState)),this.clearTiles((0,vs.HM)(this.gridState)),(0,vs.aq)(this.modules.tileManager,this.mapState,this.gridState,t)}},t.prototype.viewportTilesReady=function(){return(0,vs.ej)(this.gridState.tiles,this.gridState.viewportTiles)},t.prototype.fetch=function(t,e){var n=this;t.sort((function(t,e){return(0,Q.qu)(n.mapState.center,t,e)})).forEach((function(t){return function(t,e,n,i,r){i.size&&e.workers.parser.fetchTrafficTile({coords:t.coords,tileServer:n.trafficServer,tileProtocol:n.trafficProtocol||n.tileProtocol,regionIds:Array.from(i),timestamp:r}).then((function(){t.status===_s.z3.Loading&&(t.serverMetadata=[{regionId:0,metatileHash:-2}])}))}(t,n.modules,n.mapState,n.regionIds,e)}))},t.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){return e.modules.workers.parser.abortTrafficTileRequest(t.key)}))},t.prototype.generate=function(t){var e=this;t.sort((function(t,n){return(0,Q.qu)(e.mapState.center,t,n)})).forEach((function(t){var n=(0,_s._v)(t);n&&e.modules.workers.parser.generateTrafficTile({styleId:e.mapState.handyStyleId,coords:t.coords,pixelRatio:window.devicePixelRatio,styleState:e.mapState.styleState,sourceId:e.modules.defaultSource.getId()}).then((function(t){var e=t.results;return(0,ys.aK)(n,e)}))}))},t.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.modules.workers.parser.deleteTrafficTile(i.key),delete this.gridState.tiles[i.key]}},t.prototype.fetchMeta=function(){var t=this;if(!this.isMetaLoading&&this.regionIds.size){this.isMetaLoading=!0;var e=this.mapState,n=(0,R.XK)(g.traffic.timestampUrl,{host:e.trafficServer,protocol:e.trafficProtocol||e.tileProtocol,regions:Array.from(this.regionIds).join(",")});fetch(n).then((function(t){if(t.ok)return t.json();throw new Error("Request traffic timestamp error with status "+t.status)})).then((function(e){var n,i;if(!e.length||void 0===(null===(n=e[0])||void 0===n?void 0:n.time)||void 0===(null===(i=e[0])||void 0===i?void 0:i.score))throw new Error("Bad traffic timestamp and score response "+e);var r=0;e.forEach((function(t){return r+=t.score})),r=Math.round(r/e.length),t.modules.map.emit("trafficscore",{score:r}),t.timestamp=e[0].time,t.isMetaLoading=!1,t.lastUpdateTime=Date.now(),t.redraw()})).catch((function(t){return console.error(t)}))}},t}(),ws=function(){function t(t){this.externalContainer=t,this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.style.height="100%",this.rootContainer.style.width="100%",this.rootContainer.style.overflow="hidden",this.externalContainer.appendChild(this.rootContainer),this.mapContainer=document.createElement("div"),this.mapContainer.style.position="relative",this.mapContainer.style.height="100%",this.mapContainer.style.width="100%",this.mapContainer.style.touchAction="none",this.mapContainer.style.webkitUserSelect="none",this.mapContainer.style.userSelect="none",this.rootContainer.appendChild(this.mapContainer),this.canvas=document.createElement("canvas"),this.mapContainer.appendChild(this.canvas),this.htmlContainerInMap=document.createElement("div"),this.htmlContainerInMap.style.position="absolute",this.htmlContainerInMap.style.left="0",this.htmlContainerInMap.style.top="0",this.htmlContainerInMap.style.width="100%",this.htmlContainerInMap.style.height="0",this.htmlContainerInMap.style.webkitUserSelect="auto",this.htmlContainerInMap.style.userSelect="auto",this.mapContainer.appendChild(this.htmlContainerInMap),this.htmlContainerOutMap=document.createElement("div"),this.htmlContainerOutMap.style.position="absolute",this.htmlContainerOutMap.style.left="0",this.htmlContainerOutMap.style.top="0",this.htmlContainerOutMap.style.width="100%",this.htmlContainerOutMap.style.height="0",this.mapContainer.after(this.htmlContainerOutMap)}return t.prototype.setCanvasSize=function(t,e){var n=window.devicePixelRatio;return this.canvas.width=t*n,this.canvas.height=e*n,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this},t.prototype.destroy=function(){for(;this.externalContainer.lastChild;)this.externalContainer.removeChild(this.externalContainer.lastChild)},t.prototype.isActionWithCanvas=function(t){return t.target===this.canvas},t.prototype.isActionWithMap=function(t){var e=this;return t instanceof MouseEvent||t instanceof KeyboardEvent?this.isTargetInMap(t.target):Array.from(t.touches).map((function(t){return t.target})).some((function(t){return e.isTargetInMap(t)}))},t.prototype.isTargetInMap=function(t){return!!(t&&t instanceof Node)&&this.mapContainer.contains(t)},t}(),xs=function(){function t(t,e){this.state=t,this.modules=e,this.textureKeys=[],this.texturesMap=new Map}return t.prototype.addTexture=function(t,e){return(0,j.mG)(this,void 0,Promise,(function(){var n;return(0,j.Jh)(this,(function(i){switch(i.label){case 0:return[4,bo(t)];case 1:return n=i.sent(),[4,this.storeTexture(n,e)];case 2:return[2,i.sent()]}}))}))},t.prototype.addPreparedTexture=function(t){var e="prepared-"+Z();return this.textureKeys.push(e),this.texturesMap.set(e,t),this.textureKeys.length-1},t.prototype.updatePreparedTexture=function(t,e){this.deleteTexture(t),this.texturesMap.set(this.textureKeys[t],e)},t.prototype.loadTexture=function(t,e){return(0,j.mG)(this,void 0,Promise,(function(){var n;return(0,j.Jh)(this,(function(i){switch(i.label){case 0:return[4,this.loadImage(t)];case 1:return(n=i.sent())?[4,this.storeTexture(n,e)]:[2];case 2:return[2,i.sent()]}}))}))},t.prototype.getTexture=function(t){return this.texturesMap.get(this.textureKeys[t])},t.prototype.destroy=function(){this.textureKeys=[],this.texturesMap.clear()},t.prototype.deleteTexture=function(t){var e,n=this.textureKeys[t];return null===(e=this.texturesMap.get(n))||void 0===e||e.remove(),this.texturesMap.delete(n)},t.prototype.storeTexture=function(t,e){var n,i;return(0,j.mG)(this,void 0,void 0,(function(){var r,o,a,s,l,c,u,d,h,f,p;return(0,j.Jh)(this,(function(m){if(r=null==e?void 0:e.size,o=null!==(n=null==e?void 0:e.pixelRatio)&&void 0!==n?n:window.devicePixelRatio,a=null!==(i=null==e?void 0:e.imagePadding)&&void 0!==i?i:1,s=t.getAttribute("src")||t.currentSrc,l=function(t,e){return t+(void 0!==e?"_"+e[0]+","+e[1]:"")}(s,r),(c=this.textureKeys.indexOf(l))>-1&&this.texturesMap.has(l))return[2,c];if(u=this.modules.renderer.getRenderingContext(),d=(r||[t.width,t.height]).map((function(t){return t*o})),h=wo(t,d),f=d.map((function(t){return t+2*a})),!(null==e?void 0:e.skipAtlasSizeChecking)&&(f[0]>g.atlasSize[0]||f[1]>g.atlasSize[1]))throw new Error("Image texture dimensions "+f+" are larger than the maximum possible "+g.atlasSize);return(p=new oe(void 0,{size:f,flipY:!1,magFilter:oe.LinearFilter,minFilter:oe.LinearFilter}).prepare(u)).subImage(u,h,a,a),this.texturesMap.set(l,p),this.textureKeys.push(l),this.state.needRerender=!0,[2,this.textureKeys.length-1]}))}))},t.prototype.loadImage=function(t){return(0,j.mG)(this,void 0,Promise,(function(){return(0,j.Jh)(this,(function(e){return[2,new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){return e(n)},n.onerror=function(){return e(void 0)}}))]}))}))},t}(),Ss=n(9099),Is=n(8249),Ms=function(t){var e=this;this.getKeyInfo=function(){return(0,j.mG)(e,void 0,Promise,(function(){return(0,j.Jh)(this,(function(t){switch(t.label){case 0:return[4,this.request];case 1:return[2,t.sent()]}}))}))};var n=t.tileKey;if(n===g.tiles.tileKey||Is.X)this.request=Promise.resolve({showCommPoi:!1,showSberLogo:!1});else{var i=(0,R.IG)(Ss.ns,{keyID:n});this.request=fetch(i).then((function(t){if(t.ok)return t.json()}),(function(){console.error("Could not load tile key info. A style layers with commercial POI will be added to applied styles.")})).then((function(t){if(!t||!t.result||200!==t.meta.code)return{showCommPoi:!0,showSberLogo:!1};var e=t.result.service.properties.payload,n=e.showCommPoi,i=e.showSberLogo;return{showCommPoi:null==n||n,showSberLogo:null!=i&&i}}))}},Ps=function(){function t(){this.sources=[]}return t.prototype.addSource=function(t){this.sources.push(t)},t.prototype.removeSource=function(t){this.sources=this.sources.filter((function(e){return e.getId()!==t}))},t.prototype.getSourceById=function(t){return this.sources.find((function(e){return e.getId()===t}))},t}(),Ts=n(6006),Ls=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.type="default",this.id=(0,je.Q)(),this.zenithSource=new Mo.nt(this.id,this.modules,{tileServer:t.tileServer,tileSet:t.tileSet,tileProtocol:t.tileProtocol,tileKey:t.tileKey,subdomains:t.subdomains,appId:t.appId,defaultLang:t.tileServerDefaultLang,sessionId:t.sessionId}),this.universeTileLayer=new Be.I(0,g.tiles.maxUniverseZoom,0,g.tiles.maxUniverseZoom,this.modules,t,this.zenithSource),this.universeTileLayer.getLabelingData=function(){var t=Be.I.prototype.getLabelingData.call(n.universeTileLayer);return n.regionalTileLayer.isBlank()||(t.labelsKeys=[]),t},this.modules.tileManager.addTileLayer(this.universeTileLayer),this.regionalTileLayer=new Be.I(g.tiles.maxUniverseZoom+1,g.tiles.maxRegionalZoom,g.tiles.maxUniverseZoom+1,g.tiles.maxDetailLevel,this.modules,t,this.zenithSource),this.modules.tileManager.addTileLayer(this.regionalTileLayer),this.commercialPoiSource=new Ts.n(this.id,this.modules,{url:t.tileProtocol+"://"+t.tileServer+"/v2/ald?ts="+t.commercialTileSet+"&x={x}&y={y}&z={z}&lang="+t.lang,flipY:!0,identifyAsDefaultSource:!0}),this.commercialPoiTileLayer=new Be.I(g.commercialPoi.minZoom,g.commercialPoi.maxZoom,g.commercialPoi.minZoom,Fe.rR,this.modules,t,this.commercialPoiSource),this.modules.tileManager.addTileLayer(this.commercialPoiTileLayer),this.modules.sourceStorage.addSource(this)}return t.prototype.destroy=function(){var t,e;this.modules.tileManager.removeTileLayer(this.universeTileLayer),this.universeTileLayer.destroy(),this.modules.tileManager.removeTileLayer(this.regionalTileLayer),this.regionalTileLayer.destroy(),this.zenithSource.destroy(),this.commercialPoiTileLayer&&(this.modules.tileManager.removeTileLayer(this.commercialPoiTileLayer),this.commercialPoiTileLayer.destroy()),null===(t=this.commercialPoiSource)||void 0===t||t.destroy(),this.hillshadeTileLayer&&(this.modules.tileManager.removeTileLayer(this.hillshadeTileLayer),this.hillshadeTileLayer.destroy()),null===(e=this.hillshadeTileLayer)||void 0===e||e.destroy(),this.modules.sourceStorage.removeSource(this.id)},t.prototype.setAttributes=function(t){var e,n,i,r;this.zenithSource.setAttributes(t),this.universeTileLayer.redraw(),this.regionalTileLayer.redraw(),null===(e=this.hillshadeSource)||void 0===e||e.setAttributes(t),null===(n=this.hillshadeTileLayer)||void 0===n||n.redraw(),null===(i=this.commercialPoiSource)||void 0===i||i.setAttributes(t),null===(r=this.commercialPoiTileLayer)||void 0===r||r.redraw()},t.prototype.getAttributes=function(){return this.zenithSource.getAttributes()},t.prototype.getId=function(){return this.id},t.prototype.setHoverId=function(t){this.regionalTileLayer.setHoverId(t)},t.prototype.resetHoverId=function(){this.regionalTileLayer.resetHoverId()},t.prototype.enableHillshade=function(t){var e,n,i,r={url:null!==(e=t.url)&&void 0!==e?e:this.state.tileProtocol+"://"+this.state.tileServer+"/v2/ald?ts=hillshade&x={x}&y={y}&z={z}",minZoom:null!==(n=t.minZoom)&&void 0!==n?n:g.hillshade.minZoom,maxZoom:null!==(i=t.maxZoom)&&void 0!==i?i:g.hillshade.maxZoom};this.hillshadeSource=new Ts.n(this.id,this.modules,{url:r.url,hillshadeEncoded:!0}),this.hillshadeTileLayer=new Be.I(r.minZoom,r.maxZoom,r.minZoom,Fe.rR,this.modules,this.state,this.hillshadeSource),this.modules.tileManager.addTileLayer(this.hillshadeTileLayer)},t.prototype.disableHillshade=function(){this.hillshadeTileLayer&&(this.modules.tileManager.removeTileLayer(this.hillshadeTileLayer),this.hillshadeTileLayer.destroy()),this.hillshadeSource&&this.hillshadeSource.destroy()},t}(),Es={dead:!0,alive:!0,unused:!0,commercialDead:!1,commercialAlive:!1},ks=function(){function t(t,e){this.mapState=t,this.modules=e,this.options={},this.viewportDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"},{path:"demMode",type:"boolean"}]),this.sizeDiffer=new Zt([{path:"size",type:"vec2"}])}return t.prototype.update=function(){this.isEnabled()&&(this.sizeDiffer.check(this.mapState)&&this.updateSize(),this.viewportDiffer.check(this.mapState)&&this.clear())},t.prototype.isEnabled=function(){return!!this.canvas},t.prototype.show=function(t){void 0===t&&(t=Es),this.options=t,Object.values(t).every((function(t){return!1===t}))?this.hide():(this.createCanvas(),this.mapState.needLabeling=!0)},t.prototype.hide=function(){this.canvas&&(this.modules.layout.mapContainer.removeChild(this.canvas),this.ctx=void 0,this.canvas=void 0)},t.prototype.drawLabels=function(t){var e,n;if(this.canvas&&this.ctx){for(var i=this.ctx,r=this.options,o=((e={})[Vo.m3.Dead]="#ff0000",e[Vo.m3.Alive]="#30763c",e[Vo.m3.Unused]="#aaa",e[Vo.m3.CommercialAlive]="#3a9f22",e[Vo.m3.CommercialDead]="#ff0000",e),a=new Int32Array(t),s=((n={})[Vo.m3.Dead]=[],n[Vo.m3.Alive]=[],n[Vo.m3.Unused]=[],n[Vo.m3.CommercialAlive]=[],n[Vo.m3.CommercialDead]=[],n),l=0;l<a.length;l+=5){var c=a[l+4];s[c].push({x:a[l],y:a[l+1],width:a[l+2],height:a[l+3]})}this.clear();var u=window.devicePixelRatio,d=function(t){i.strokeStyle=o[t],s[t].forEach((function(t){return i.strokeRect(t.x*u+.5,t.y*u+.5,t.width*u,t.height*u)}))};i.setLineDash([]),r.unused&&d(Vo.m3.Unused),r.dead&&d(Vo.m3.Dead),r.alive&&d(Vo.m3.Alive),i.setLineDash([6]),r.commercialDead&&d(Vo.m3.CommercialDead),r.commercialAlive&&d(Vo.m3.CommercialAlive)}},t.prototype.clear=function(){if(this.canvas&&this.ctx){var t=this.canvas,e=t.clientWidth,n=t.clientHeight;this.ctx.clearRect(0,0,e*window.devicePixelRatio,n*window.devicePixelRatio)}},t.prototype.createCanvas=function(){this.canvas||(this.canvas=document.createElement("canvas"),this.canvas.style.position="absolute",this.canvas.style.left="0",this.canvas.style.top="0",this.canvas.style.pointerEvents="none",this.modules.layout.mapContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d")||void 0,this.updateSize())},t.prototype.updateSize=function(){if(this.canvas){var t=this.modules.layout.rootContainer,e=t.clientWidth,n=t.clientHeight;this.canvas.width=e*window.devicePixelRatio,this.canvas.height=n*window.devicePixelRatio,this.canvas.style.width=e+"px",this.canvas.style.height=n+"px"}},t}(),zs=function(){function t(t,e,n){this.map=n,this.camera=new x.V(t),this.layout=new ws(e),this.collector=new $t.P("main"),this.workers=new aa,this.styleManager=new Ro(this),this.assetManager=new jo(t,this),this.imageManager=new xs(t,this),this.floorManager=new Sa(t,this),this.personalPoiManager=new Wo(t,this),this.buildingHeightAnimator=new Qt(t,this),this.renderer=new mo(t,this),this.layers=new fa(t),this.sourceStorage=new Ps,this.tileManager=new Ia(t,this),this.modelLayer=new Ho(t,this),this.dynamicStyle=new $.hX,this.imageCache=new _a(this),this.identifier=new _o(t,this),this.labeler=new Pa(t,this),this.ruler=new ts(t,this),this.trafficTileLayer=new bs(t,this),this.handler=new fs(t,this),this.mouseMoveHandler=new Kt(this),this.tileKeyInfo=new Ms(t),this.demManager=new di(this),this.defaultSource=new Ls(t,this),this.labelsDebug=new ks(t,this)}return t.prototype.destroy=function(){this.demManager.disable(),this.imageManager.destroy(),this.trafficTileLayer.destroy(),this.tileManager.destroy(),this.workers.destroy(),this.renderer.destroy(),this.handler.destroy(),this.mouseMoveHandler.destroy(),this.ruler.destroy(),this.labelsDebug.hide(),this.layout.destroy()},t}(),Cs=n(8764),As=function(){function t(e,n,i){var r,o=this;void 0===n&&(n={}),this.styleUpdatingMode=!1,this.renderLoop=function(){o.requestedFrame=requestAnimationFrame(o.renderLoop),o.modules.map.emit("framestart");var t=o.state;if(t.time=Date.now(),t.collectStats&&(t.stats.drawCount=0,t.stats.vertexCount=0,t.stats.tileCount=0),o.modules.mouseMoveHandler.update(),o.handlers.forEach((function(t){return t.update()})),Lt(t),mt(t),bt(t),It(t),o.stillnessUpdater.update(t),ut(t,o.modules.layout.rootContainer),function(t,e,n){rt.Vx("viewport",{step:function(t,i){t.viewport={top:i[0],right:i[1],bottom:i[2],left:i[3]},ot(t,e,n)}},t)}(t,o.modules.layout.rootContainer,o.modules.renderer),function(t,e){rt.Vx("padding",{step:function(t,n){t.padding={top:n[0],right:n[1],bottom:n[2],left:n[3]},st(t,e)}},t)}(t,o.modules.renderer),o.modules.buildingHeightAnimator.update(),t.demMode=o.modules.demManager.isEnabled(),o.updateElevation(),o.modules.camera.update(),o.updateTilesBounds(),o.modules.demManager.update(),o.modules.labelsDebug.update(),o.modules.trafficTileLayer.update(),o.modules.layers.getLayers().forEach((function(t){void 0!==t.update&&t.update()})),o.modules.tileManager.update(),o.modules.floorManager.update(),o.modules.modelLayer.update(),o.modules.personalPoiManager.update(),o.modules.ruler.update(),o.modules.dynamicStyle.update(),o.modules.map.emit("update"),o.modules.labeler.update(),o.performanceChecker.update(),o.modules.identifier.update(),g.render.alwaysRerender||t.needRerender){var e=o.modules.tileManager.getTileObjects();o.modules.renderer.renderTileObjects(e),t.needRerender=!1,t.collectStats&&o.modules.map.emit("stats",t.stats)}o.finishStyleUpdatingCheck(),o.modules.map.update(),o.modules.map.emit("frameend")},this.onWindowUnload=function(){var t=o.performanceChecker.getEarlyFps();void 0!==t&&Ot({eventAction:"FPS",eventLabel:"Early",eventValue:t})};var a=(0,j.pi)((0,j.pi)({},t.options),n),s=(0,j.pi)((0,j.pi)({},t.options.padding),a.padding),l=(0,j.pi)((0,j.pi)({},t.options.viewport),a.viewport),c=a.maxBounds?I.X3(a.maxBounds):w.Vv,u=(0,w.yq)(a.center);I.Rk(u,c,u);var d,h,f,p,m,v,_=this.state={time:Date.now(),center:u,zoom:void 0!==a.styleZoom?(0,w.Z3)(a.styleZoom,u):a.zoom,styleZoom:void 0!==a.styleZoom?a.styleZoom:(0,w.X$)(a.zoom,u),zoomTypePreserving:void 0!==a.styleZoom?"styleZoom":"zoom",minZoom:a.minZoom,maxZoom:a.maxZoom,maxBounds:c,rotation:(0,b.Id)(a.rotation),touchRotationThreshold:(0,b.Id)(a.touchRotationThreshold),pitch:(0,b.Id)(a.pitch),minPitch:(0,b.Id)(a.minPitch),maxPitch:(0,b.Id)(a.maxPitch),size:[Math.max(1,e.clientWidth-l.left-l.right),Math.max(1,e.clientHeight-l.top-l.bottom)],selectedIds:[],tickers:{},stillness:1,needRerender:!0,needLabeling:!1,userHasInteracted:!1,viewport:l,padding:s,labelingOpacity:0,tileServer:a.tileServer,tileSet:a.tileSet,tileProtocol:a.tileProtocol,commercialTileSet:a.commercialTileSet,subdomains:a.subdomains.split(""),floorsEnabled:a.floorsEnabled,floorsUrl:a.floorsUrl,collectStats:a.collectStats,stats:{tileCount:0,dynamicTileCount:0,drawCount:0,vertexCount:0},trafficServer:a.trafficServer,trafficProtocol:a.trafficProtocol,identifyPickDistance:g.identify.pickDistance,lang:a.lang,tileServerDefaultLang:a.tileServerDefaultLang,tileKey:a.key,appId:a.appId,disableHoverStyles:a.disableHoverStyles,keepCenterWhileUserZoomRotate:!!a.keepCenterWhileUserZoomRotate,disableRotationByUserInteraction:!!a.disableRotationByUserInteraction,disablePitchByUserInteraction:!!a.disablePitchByUserInteraction,disableDragging:!!a.disableDragging,performanceCaveatEmitted:!1,sessionId:a.sessionId,shownRegionIds:new Set,preserveDrawingBuffer:!!a.preserveDrawingBuffer,defaultBackgroundColor:a.defaultBackgroundColor,handyStyleId:NaN,styleState:wa(a.styleState),disableIconCache:a.disableIconCache,rtlPluginScenario:null!==(r=a.useRtlTextPlugin)&&void 0!==r?r:"depends-on-language",mobileSdkMode:a.mobileSdkMode,demMode:!1,tilesBounds:[[0,0],[0,0],[0,0],[0,0]],elevation:void 0};this.modules=new zs(_,e,i),this.modules.styleManager.setDynamicStyle(this.modules.dynamicStyle.getStyle()),this.handlers=[new Ht(_,this.modules.layout.mapContainer),new Gt(this.modules)],a.disableZoomOnScroll||this.handlers.push(new Ut(_,this.modules.layout.mapContainer)),At&&Dt&&this.handlers.push(new Vt(_,e,i)),this.performanceChecker=new Wt(_),this.stillnessUpdater=new Yt,this.requestedFrame=requestAnimationFrame(this.renderLoop),a.sendAnalytics&&(d=window,h=document,f="script",p="ga",d.GoogleAnalyticsObject=p,d.ga=d.ga||function(){(d.ga.q=d.ga.q||[]).push(arguments)},d.ga.l=Date.now(),m=h.createElement(f),v=h.getElementsByTagName(f)[0],m.async=1,m.src="https://www.google-analytics.com/analytics.js",v.parentNode.insertBefore(m,v),window.ga&&(window.ga("create",g.analytics.gaCode,{storage:"none",name:g.analytics.gaName,sampleRate:80}),window.ga(g.analytics.gaName+".set","anonymizeIp",!0),window.ga(g.analytics.gaName+".send","pageview")),window.addEventListener("unload",this.onWindowUnload))}return t.prototype.destroy=function(){cancelAnimationFrame(this.requestedFrame),this.modules.destroy(),this.handlers.forEach((function(t){return t.destroy()})),window.removeEventListener("unload",this.onWindowUnload)},t.prototype.isIdle=function(){return!this.state.needRerender&&this.modules.tileManager.isIdle()&&this.modules.assetManager.isIdle()&&this.modules.trafficTileLayer.viewportTilesReady()&&this.modules.floorManager.activeFloorReady()&&this.modules.layers.entranceAnimationFinished()&&this.modules.modelLayer.isIdle()&&!this.modules.buildingHeightAnimator.isAnimating()&&this.modules.labeler.isIdle()},t.prototype.redrawMap=function(){this.modules.tileManager.redraw(),this.modules.trafficTileLayer.redraw(),this.modules.modelLayer.redraw(),this.modules.floorManager.resetCache(),this.modules.personalPoiManager.redraw()},t.prototype.activateStyleUpdating=function(){this.modules.tileManager.activateStyleUpdating(),this.modules.floorManager.activateStyleUpdating(),this.modules.modelLayer.activateStyleUpdating(),this.modules.trafficTileLayer.activateStyleUpdating(),this.styleUpdatingMode=!0},t.prototype.finishStyleUpdatingCheck=function(){if(this.styleUpdatingMode&&this.modules.tileManager.viewportTilesReady()&&this.modules.trafficTileLayer.viewportTilesReady()&&this.modules.floorManager.activeFloorReady()&&this.modules.modelLayer.viewportModelsReady()){this.modules.tileManager.finishStyleUpdating(),this.modules.floorManager.finishStyleUpdating(),this.modules.trafficTileLayer.finishStyleUpdating(),this.modules.modelLayer.finishStyleUpdating(),this.modules.personalPoiManager.redraw();var t=this.modules.styleManager.getStyle(this.state.handyStyleId);t&&this.modules.renderer.setClearColor(t.background.color),this.styleUpdatingMode=!1,this.state.needRerender=!0,this.state.needLabeling=!0}},t.prototype.updateTilesBounds=function(){var t=this.state,e=t.size,n=t.zoom,i=this.modules.camera.getViewportVertices(),r=i[0],o=i[1],a=i[2],s=i[3],l=(0,Cs.hS)(r,o),c=(0,Cs.Oy)(a,l),u=(0,w.h0)(e[1],n)*g.camera.viewportLimitRatio;if(c>u){var d=u/c;H.t7(a,o,a,d),H.t7(s,r,s,d),c=u}if(this.state.demMode){var h=(0,Cs.iE)(this.modules.camera.position,l);h<0&&(d=(c+Math.abs(h))/c,H.t7(r,s,r,d),H.t7(o,a,o,d))}this.state.tilesBounds[0]=r,this.state.tilesBounds[1]=o,this.state.tilesBounds[2]=a,this.state.tilesBounds[3]=s},t.prototype.updateElevation=function(){if(this.modules.demManager.isEnabled()){var t=this.modules.demManager.getElevation(this.state.center);if(void 0!==t&&this.state.elevation!==t){if(this.state.needRerender=!0,void 0===this.state.elevation)return void(this.state.elevation=t);var e=.2*(t-this.state.elevation);Math.abs(e)<.3?this.state.elevation=t:this.state.elevation+=e}}else void 0!==this.state.elevation&&(this.state.needRerender=!0,this.state.elevation=void 0)},t.options={center:[0,0],zoom:0,minZoom:g.MAP_DEFAULTS.minZoom,maxZoom:g.MAP_DEFAULTS.maxZoom,rotation:0,touchRotationThreshold:10,pitch:0,minPitch:0,maxPitch:45,viewport:{top:0,right:0,bottom:0,left:0},padding:{top:0,right:0,bottom:0,left:0},tileServer:g.tiles.server,tileSet:g.tiles.tileSet,tileProtocol:g.tiles.protocol,commercialTileSet:g.commercialPoi.tileSet,key:g.tiles.tileKey,subdomains:g.tiles.subdomains,floorsEnabled:g.floors.enabled,floorsUrl:g.floors.url,trafficProtocol:g.traffic.protocol,trafficServer:g.traffic.host,collectStats:!1,style:"",styleState:(0,j.pi)({},ba),styleOptions:{rootUrl:"",iconsPath:"",fontsPath:"",stylePath:""},sendAnalytics:!0,lang:g.defaultLang,appId:g.tiles.appId,disableHoverStyles:!1,disableZoomOnScroll:!1,disableDragging:!1,disableRotationByUserInteraction:!1,disablePitchByUserInteraction:!1,defaultBackgroundColor:"#f6f2de",disableIconCache:!1,mobileSdkMode:!1},t}(),Ds=n(3379),Fs=n.n(Ds),Rs=n(7795),Os=n.n(Rs),js=n(569),Bs=n.n(js),Us=n(3565),Zs=n.n(Us),Ns=n(9216),Hs=n.n(Ns),Gs=n(4589),Vs=n.n(Gs),Ws=n(187),qs={};qs.styleTagTransform=Vs(),qs.setAttributes=Zs(),qs.insert=Bs().bind(null,"head"),qs.domAPI=Os(),qs.insertStyleElement=Hs(),Fs()(Ws.Z,qs),Ws.Z&&Ws.Z.locals&&Ws.Z.locals;var Xs=n(5630),Ys=n(3065),Ks=["zoom","rotation","pitch","center"],Js="eb10e2c3-3c28-4b81-b74b-859c9c4cf47e",Qs=function(t){function e(e,n){var i,r=t.call(this)||this,o=r.core=new As(e,n,r);return r.state=o.state,r.modules=o.modules,r.performanceChecker=o.performanceChecker,r.values={isMoveChanging:!1,isIdle:!1},Ks.forEach((function(t){r.cloneFromStateToValues(t,t+"1"),r.cloneFromStateToValues(t,t+"2"),r.cloneFromStateToValues(t,t+"End1"),r.cloneFromStateToValues(t,t+"End2"),r.values[t+"EndTime"]=0,r.values["is"+t+"Changing"]=!1})),r.cloneFromStateToValues("size","size"),r.performanceChecker.on("performancecaveat",(function(){r.emit("performancecaveat"),Ot({eventAction:"FPS",eventLabel:"performancecaveat"})})),r.performanceChecker.on("fps",(function(t){return Ot({eventAction:"FPS",eventLabel:"Average",eventValue:t})})),r.setStyle(null!==(i=null==n?void 0:n.style)&&void 0!==i?i:Js,null==n?void 0:n.styleOptions).catch((function(t){if(t instanceof Error)throw t})),(0,Ys.w7)(r.state.rtlPluginScenario,r.modules,r.state.lang),(null==n?void 0:n.hillshade)&&r.modules.defaultSource.enableHillshade(n.hillshade),r}return(0,j.ZT)(e,t),e.prototype.setCenter=function(t,e){if(!(0,w.Iy)(t))return this;this.state.userHasInteracted=!1;var n=(0,w.yq)(t);return ft(this.state,n,e),this},e.prototype.setZoom=function(t,e){return(0,b.Kh)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.zoomTypePreserving="zoom",this.state.userHasInteracted=!1,Pt(this.state,t,e),this):this},e.prototype.setStyleZoom=function(t,e){if(!(0,b.Kh)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER))return this;var n=(0,w.Z3)(t,this.state.center);return this.state.zoomTypePreserving="styleZoom",this.state.userHasInteracted=!1,Pt(this.state,n,e),this},e.prototype.setMinZoom=function(t,e){return this.state.minZoom=t,this.setZoom(this.state.zoom,e),this},e.prototype.setMaxZoom=function(t,e){return this.state.maxZoom=t,this.setZoom(this.state.zoom,e),this},e.prototype.setRotation=function(t,e){return(0,b.Kh)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.userHasInteracted=!1,yt(this.state,(0,b.Id)(t),e),this):this},e.prototype.setPitch=function(t,e){return(0,b.Kh)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.userHasInteracted=!1,xt(this.state,(0,b.Id)(t),e),this):this},e.prototype.setMinPitch=function(t,e){return this.state.minPitch=(0,b.Id)(t),this.setPitch((0,b.ZY)(this.state.pitch),e),this},e.prototype.setMaxPitch=function(t,e){return this.state.maxPitch=(0,b.Id)(t),this.setPitch((0,b.ZY)(this.state.pitch),e),this},e.prototype.setViewport=function(t,e){return this.state.userHasInteracted=!1,function(t,e,n,i,r){void 0===r&&(r={});var o=(0,j.pi)({top:0,right:0,bottom:0,left:0},i);if(!1===r.animate||0===r.duration)t.viewport=o,ot(t,e,n);else{var a=t.viewport,s=void 0!==r.easing?r.easing:"easeOutCubic",l=void 0!==r.duration?r.duration:300;rt.BL("viewport",{easing:s},t,[a.top,a.right,a.bottom,a.left],[o.top,o.right,o.bottom,o.left],l)}}(this.state,this.modules.layout.rootContainer,this.modules.renderer,t,e),this},e.prototype.setMaxBounds=function(t){return this.state.maxBounds=(0,I.X3)(t),this},e.prototype.setPadding=function(t,e){var n,i,r,o,a={top:null!==(n=t.top)&&void 0!==n?n:0,left:null!==(i=t.left)&&void 0!==i?i:0,right:null!==(r=t.right)&&void 0!==r?r:0,bottom:null!==(o=t.bottom)&&void 0!==o?o:0};return this.state.userHasInteracted=!1,function(t,e,n,i){void 0===i&&(i={});var r=at(n,t.size);if(!1===i.animate||0===i.duration)t.padding=r,st(t,e);else{var o=t.padding,a=void 0!==i.easing?i.easing:"easeOutCubic",s=void 0!==i.duration?i.duration:300;rt.BL("padding",{easing:a},t,[o.top,o.right,o.bottom,o.left],[r.top,r.right,r.bottom,r.left],s)}}(this.state,this.modules.renderer,a,e),this},e.prototype.getPadding=function(){return this.state.padding},e.prototype.getCenter=function(){return(0,w.PA)(this.state.center)},e.prototype.getZoom=function(){return this.state.zoom},e.prototype.getStyleZoom=function(){return this.state.styleZoom},e.prototype.getMinZoom=function(){return this.state.minZoom},e.prototype.getMaxZoom=function(){return this.state.maxZoom},e.prototype.getRotation=function(){return(0,b.ZY)(this.state.rotation)},e.prototype.getPitch=function(){return(0,b.ZY)(this.state.pitch)},e.prototype.getViewport=function(){return this.state.viewport},e.prototype.getSize=function(){return[this.state.size[0],this.state.size[1]]},e.prototype.getBounds=function(){this.modules.camera.update();var t=(0,Bo.B)(this.modules.camera.getViewportVertices());return{southWest:(0,w.PA)(t.min),northEast:(0,w.PA)(t.max)}},e.prototype.getWebGLContext=function(){return this.modules.renderer.getRenderingContext()},e.prototype.getCanvas=function(){return this.modules.layout.canvas},e.prototype.enableRuler=function(){this.modules.ruler.enable()},e.prototype.setRulerPoints=function(t){this.modules.ruler.enabled||this.modules.ruler.enable(),this.modules.ruler.setPoints(t)},e.prototype.disableRuler=function(){this.modules.ruler.disable()},e.prototype.showTraffic=function(){this.modules.trafficTileLayer.show()},e.prototype.hideTraffic=function(){this.modules.trafficTileLayer.hide()},e.prototype.setPersonalPoi=function(t){this.modules.personalPoiManager.setPersonalPoi(t)},e.prototype.setSelectedIds=function(t){return void 0===t&&(t=[]),this.state.selectedIds=t.map(V.IL).filter((function(t){return!Number.isNaN(t.lo)&&!Number.isNaN(t.hi)})).sort((function(t,e){return t.hi-e.hi||t.lo-e.lo})),this.modules.tileManager.setSelectedIds(),this.modules.identifier.debouncedFillCache(),this},e.prototype.project=function(t){return this.modules.camera.project((0,w.yq)(t))},e.prototype.unproject=function(t){return(0,w.PA)(this.modules.camera.unproject(t))},e.prototype.getCameraProjectionMatrix=function(){return this.modules.camera.projectionMatrix},e.prototype.getCameraViewMatrix=function(){return this.modules.camera.viewMatrix},e.prototype.getCameraViewProjectionMatrix=function(){return this.modules.camera.viewProjectionMatrix},e.prototype.invalidateSize=function(){this.state.userHasInteracted=!1;var t=window.devicePixelRatio,e=this.state.viewport,n=this.modules.layout.rootContainer,i=n.clientWidth,r=n.clientHeight;return this.state.size=[Math.max(1,i-e.left-e.right),Math.max(1,r-e.top-e.bottom)],this.modules.renderer.setPixelRatio(t),this.modules.renderer.setSize(i,r),this.state.needRerender=!0,this},e.prototype.destroy=function(){this.core.destroy()},e.prototype.refresh=function(){return this.state.needRerender=!0,this.state.needLabeling=!0,this.modules.identifier.resetCache(),this},e.prototype.changeFloorNumber=function(t,e){return this.modules.floorManager.changeFloorNumber(t,e),this},e.prototype.addLayer=function(t,e){return this.modules.styleManager.addLayer(t,e),this.core.activateStyleUpdating(),this},e.prototype.removeLayer=function(t){return this.modules.styleManager.removeLayer(t),this.core.activateStyleUpdating(),this},e.prototype.setStyle=function(t,e){return(0,j.mG)(this,void 0,Promise,(function(){var n;return(0,j.Jh)(this,(function(i){switch(i.label){case 0:return"string"!=typeof t?[3,5]:(0,Xs.aU)(t)?[4,this.setCustomStyleById(t,e)]:[3,2];case 1:return n=i.sent(),[3,4];case 2:return[4,this.setCustomStyleFromUrl(t,e)];case 3:n=i.sent(),i.label=4;case 4:return[3,7];case 5:return[4,this.setCustomStyleDirectly(t,e)];case 6:i.sent(),n=t,i.label=7;case 7:return this.emit("styleload",{style:n}),[2,n]}}))}))},e.prototype.useOldStyles=function(t){return this.setCustomStyleById(Js,t),this},e.prototype.waitForGpuToFinishDrawing=function(){return this.modules.renderer.getPixels(),this},e.prototype.setLang=function(t){this.state.lang=t,(0,Ys.w7)(this.state.rtlPluginScenario,this.modules,t),this.modules.tileManager.redraw()},e.prototype.showLabelsDebug=function(t){this.modules.labelsDebug.show(t)},e.prototype.hideLabelsDebug=function(){this.modules.labelsDebug.hide()},e.prototype.getContainer=function(){return this.modules.layout.mapContainer},e.prototype.getExternalContainer=function(){return this.modules.layout.externalContainer},e.prototype.fitBounds=function(t,e){var n,i,r=t.northEast,o=t.southWest,a=(0,j.pi)({top:0,left:0,right:0,bottom:0},(null==e?void 0:e.padding)?e.padding:{}),s=this.getViewport(),l=this.getPadding(),c=(null==e?void 0:e.skipMapPadding)?a:(i=a,{top:(n=l).top+i.top,bottom:n.bottom+i.bottom,left:n.left+i.left,right:n.right+i.right}),u=this.getSize(),d=(null==e?void 0:e.considerRotation)?this.getRotation():0;if(u[0]-c.left-c.right<=0||u[1]-c.top-c.bottom<=0)return console.warn("Map cannot fit within canvas with the given bounds and padding."),this;(null==e?void 0:e.considerRotation)||yt(this.state,d,{animate:!1});var h=P([[o[0],r[1]],r,[r[0],o[1]],o],d,[u[0]-c.left-c.right,u[1]-c.top-c.bottom]);if(!h)return console.warn("Map cannot fit within canvas with the given bounds and padding."),this;var f=[(u[0]-c.left-c.right)/2+c.left+s.left,(u[1]-c.top-c.bottom)/2+c.top+s.top],p=new x.V({rotation:this.state.rotation,size:this.state.size,padding:this.state.padding,viewport:this.state.viewport,zoom:(0,b.uZ)(h.zoom,this.state.minZoom,this.state.maxZoom),pitch:0,center:h.center}).unproject(f),m=[0,0];H.lu(m,h.center,p);var v=[0,0,0];return H.IH(v,h.center,m),ft(this.state,v,null==e?void 0:e.animation),Pt(this.state,h.zoom,null==e?void 0:e.animation),xt(this.state,0,null==e?void 0:e.animation),this},e.prototype.update=function(){var t=this,e=this.state,n=e.time,i=e.userHasInteracted,r=this.values,o={};Ks.forEach((function(i){var a=e[i];"zoom"===i&&"styleZoom"===e.zoomTypePreserving&&(a=e.styleZoom),o[i+"start"]=!r["is"+i+"Changing"]&&!t.areEqual(a,r[i+"1"])&&t.areEqual(r[i+"1"],r[i+"2"]),o[i+"start"]&&(r["is"+i+"Changing"]=!0),r["is"+i+"Changing"]&&(o[i]=!t.areEqual(a,r[i+"1"]),n-r[i+"EndTime"]>150&&(o[i+"end"]=t.areEqual(a,r[i+"End1"])&&!t.areEqual(r[i+"End1"],r[i+"End2"]),o[i+"end"]&&(r["is"+i+"Changing"]=!1),t.copyFromValuesToValues(i+"End2",i+"End1"),t.copyFromStateToValues(a,i+"End1"),r[i+"EndTime"]=n)),t.copyFromValuesToValues(i+"2",i+"1"),t.copyFromStateToValues(a,i+"1")})),o.resize=!this.areEqual(e.size,r.size),this.copyFromStateToValues(e.size,"size"),o.movestart=(o.zoomstart||o.rotationstart||o.centerstart||o.pitchstart)&&!r.isMoveChanging,o.movestart&&(r.isMoveChanging=!0),o.move=r.iszoomChanging||r.isrotationChanging||r.iscenterChanging||r.ispitchChanging,o.moveend=(o.zoomend||o.rotationend||o.centerend||o.pitchend)&&!o.move,o.moveend&&(r.isMoveChanging=!1);var a=r.isIdle;for(var s in r.isIdle=this.isIdle(),o.idle=!a&&r.isIdle,o){var l=s;o[l]&&this.emit(l,{isUser:i})}},e.prototype.isIdle=function(){return!this.values.isMoveChanging&&!this.currentPendingStyle&&this.core.isIdle()},e.prototype.setAutoHoverMode=function(t){this.modules.defaultSource.resetHoverId(),this.state.disableHoverStyles=!t},e.prototype.setStyleState=function(t){this.state.styleState=wa(t),this.state.needRerender=!0},e.prototype.patchStyleState=function(t){var e,n;this.state.styleState=(e=this.state.styleState,n=t,(0,j.pi)((0,j.pi)((0,j.pi)({},e),n),{_activeFloorIds:e._activeFloorIds,_activeFloorBuildingIds:e._activeFloorBuildingIds})),this.state.needRerender=!0},e.prototype.setOption=function(t,e){"disableDragging"===t?this.state[t]=e:console.error("The change of "+t+" option is not supported.")},e.prototype.setCustomStyleById=function(t,e){return(0,j.mG)(this,void 0,Promise,(function(){var n,i,r,o;return(0,j.Jh)(this,(function(a){switch(a.label){case 0:return this.currentPendingStyle=t,n=(0,b.kn)(e||{},{rootUrl:g.styles.url,stylePath:g.styles.path,iconsPath:"",fontsPath:g.fonts.defaultUrl,iconNameTemplate:"{name}"}),[4,this.fetchStyleById(Lo(n),t,Js)];case 1:if(i=a.sent(),this.currentPendingStyle!==t)return[2,Promise.reject("Cancel setting the style «"+t+"», there is a newer style was set")];if(!i)throw this.currentPendingStyle=void 0,new Error("There is no correct style with id «"+t+"»");return r=i.style,o=i.loadedId,n.iconsPath=function(t,e){return t.replace("{id}",e)}(g.icons.defaultUrl,o),[4,this.setCustomStyle(r,n)];case 2:return a.sent(),[2,t]}}))}))},e.prototype.setCustomStyleFromUrl=function(t,e){return(0,j.mG)(this,void 0,Promise,(function(){var n,i;return(0,j.Jh)(this,(function(r){switch(r.label){case 0:return this.currentPendingStyle=t,[4,$s(Lo(n=(0,b.kn)(e||{},{rootUrl:t,iconsPath:"",fontsPath:"",stylePath:"style.json",iconNameTemplate:"{name}.svg"})))];case 1:if(i=r.sent(),t!==this.currentPendingStyle)return[2,Promise.reject("Cancel setting the style «"+t+"», there is a newer style was set")];if(!i)throw this.currentPendingStyle=void 0,new Error("There are no correct styles by url «"+t+"»");return[4,this.setCustomStyle(i,n)];case 2:return r.sent(),[2,t]}}))}))},e.prototype.setCustomStyleDirectly=function(t,e){var n=window.location.host,i=(0,b.kn)(e||{},{rootUrl:"//"+n,stylePath:"",iconsPath:"",fontsPath:"",iconNameTemplate:"{name}.svg"});return this.setCustomStyle(t,i)},e.prototype.setCustomStyle=function(t,e){return(0,j.mG)(this,void 0,void 0,(function(){var n,i;return(0,j.Jh)(this,(function(r){switch(r.label){case 0:if(this.currentPendingStyle=void 0,!t)throw new Error("Can't set empty style");return t.dem||this.modules.demManager.disable(),[4,this.modules.tileKeyInfo.getKeyInfo()];case 1:return n=r.sent().showCommPoi,i=this.modules.styleManager.createStyle(t,e,n),this.state.handyStyleId=i.id,t.dem&&this.modules.demManager.enable(),this.core.activateStyleUpdating(),[2]}}))}))},e.prototype.copyFromStateToValues=function(t,e){tl(t)?H.JG(this.values[e],t):this.values[e]=t},e.prototype.cloneFromStateToValues=function(t,e){var n=this.state[t];tl(n)?this.values[e]=H.d9(n):this.values[e]=n},e.prototype.copyFromValuesToValues=function(t,e){var n=this.values[e];tl(n)?H.JG(this.values[t],n):this.values[t]=n},e.prototype.areEqual=function(t,e){return tl(t)&&tl(e)?H.I6(t,e):t===e},e.prototype.fetchStyleById=function(t,e,n){return(0,j.mG)(this,void 0,Promise,(function(){var i,r,o;return(0,j.Jh)(this,(function(a){switch(a.label){case 0:return(i=new URL((0,R.XK)(t,{id:e}))).searchParams.append("key",this.state.tileKey),[4,fetch(i.toString())];case 1:return 404===(r=a.sent()).status&&n&&Number.isNaN(this.state.handyStyleId)?(console.warn("No access to style with id «"+e+"». Fallback to default style «"+n+"»."),[2,this.fetchStyleById(t,n)]):r.ok?[4,r.json()]:[2,void 0];case 2:return(o=a.sent())&&o.result?[2,{loadedId:e,style:o.result}]:[2]}}))}))},e}(B.c);function $s(t){return fetch(t).then((function(t){if(t.ok)return t.json()}))}function tl(t){return void 0!==t.length}var el=n(9746),nl=n(5465),il=function(t){function e(e,n){var i,r,o,a,s,l,c,u,d,h,f=t.call(this,e)||this;f.length=1,f.removed=!1,f.options=n,f.isInteractive=null===(i=n.interactive)||void 0===i||i,f.geoPoints=f.options.coordinates.filter((function(t,e,n){return 0===e||!S.I6(n[e],n[e-1])})),f.points=f.geoPoints.map(w.yq);var p=0;f.distances=[],f.distances.push(p);for(var m=1;m<f.geoPoints.length;m++)p+=(0,w.vn)(f.geoPoints[m-1],f.geoPoints[m]),f.distances.push(p);n.showAnimation&&!1!==n.showAnimation.animate&&f.points.length>1&&(f.animationTickerName="polyline-"+f.uniqId,f.startShowTicker(f.animationTickerName)),f.stateDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"},{path:"demMode",type:"boolean"}]),f.debouncedGenerate=(0,Xt.D)((function(){f.generate()}),200),f.tileAttrs=(0,$.FJ)({id:f.isInteractive?(0,V.Ru)(0,0):NaN,beginningIsCut:0,endingIsCut:0});var v=f.modules,_=v.dynamicStyle,y=v.layers;if(0!==f.options.width){f.rawStyleLayer={type:"line",id:"dynamic-polyline-"+f.uniqId,minzoom:f.options.minZoom,maxzoom:f.options.maxZoom,style:{color:null!==(r=f.options.color)&&void 0!==r?r:"#3388ff",width:null!==(o=f.options.width)&&void 0!==o?o:3}};var g=(0,tt.qw)(f.rawStyleLayer);g&&(f.styleLayerId=g.innerId,_.addLayer(g,null!==(a=f.options.zIndex)&&void 0!==a?a:0))}if(f.options.width2){f.rawStyleLayer2={type:"line",id:"dynamic-polyline2-"+f.uniqId,minzoom:f.options.minZoom,maxzoom:f.options.maxZoom,style:{color:null!==(s=f.options.color2)&&void 0!==s?s:"#00000000",width:null!==(l=f.options.width2)&&void 0!==l?l:0}};var b=(0,tt.qw)(f.rawStyleLayer2);b&&(f.styleLayer2Id=b.innerId,_.addLayer(b,null!==(c=f.options.zIndex2)&&void 0!==c?c:-1))}if(f.options.width3){f.rawStyleLayer3={type:"line",id:"dynamic-polyline3-"+f.uniqId,minzoom:f.options.minZoom,maxzoom:f.options.maxZoom,style:{color:null!==(u=f.options.color3)&&void 0!==u?u:"#00000000",width:null!==(d=f.options.width3)&&void 0!==d?d:0}};var x=(0,tt.qw)(f.rawStyleLayer3);x&&(f.styleLayer3Id=x.innerId,_.addLayer(x,null!==(h=f.options.zIndex3)&&void 0!==h?h:-2))}return void 0===f.styleLayerId&&void 0===f.styleLayer2Id&&void 0===f.styleLayer3Id||(y.addLayer(f),f.generate()),f}return(0,j.ZT)(e,t),e.prototype.update=function(){this.removed||(this.stateDiffer.check(this.mapState)&&this.debouncedGenerate(),this.animationTickerName&&this.updateShowTicker(this.animationTickerName))},e.prototype.snapPoint=function(t){for(var e=this,n=this.points.map((function(t){return e.modules.camera.project(t)})),i=1/0,r=n[0],o=0,a=0;a<n.length-1;a++){var s=n[a],l=n[a+1],c=(0,Cs.Z4)(t,s,l),u=c[0]-t[0],d=c[1]-t[1],h=u*u+d*d;h<i&&(i=h,r=c,o=a)}var f=(0,w.PA)(this.modules.camera.unproject(r));return{point:f,distance:this.distances[o]+(0,w.vn)(f,this.geoPoints[o])}},e.prototype.setStyle=function(t){this.setSubLayerStyle(this.styleLayerId,this.rawStyleLayer,t.color),this.setSubLayerStyle(this.styleLayer2Id,this.rawStyleLayer2,t.color2),this.setSubLayerStyle(this.styleLayer3Id,this.rawStyleLayer3,t.color3)},e.prototype.remove=function(){this.removed||(this.removed=!0,this.animationTickerName&&rt.sT(this.animationTickerName,this.mapState),this.isInteractive&&this.modules.identifier.resetCache(),void 0!==this.styleLayerId&&this.modules.dynamicStyle.removeLayer(this.styleLayerId),void 0!==this.styleLayer2Id&&this.modules.dynamicStyle.removeLayer(this.styleLayer2Id),void 0!==this.styleLayer3Id&&this.modules.dynamicStyle.removeLayer(this.styleLayer3Id),t.prototype.destroy.call(this))},e.prototype.startShowTicker=function(t){var e,n,i,r=void 0!==(null===(e=this.options.showAnimation)||void 0===e?void 0:e.easing)?this.options.showAnimation.easing:"linear",o=void 0!==(null===(n=this.options.showAnimation)||void 0===n?void 0:n.duration)?this.options.showAnimation.duration:250;rt.BL(t,{easing:r,animationGroup:null===(i=this.options.showAnimation)||void 0===i?void 0:i.animationGroup},this.mapState,0,1,o),this.length=0},e.prototype.setSubLayerStyle=function(t,e,n){if(void 0!==t&&n&&e&&n!==e.style.color){var i=this.modules.dynamicStyle;e.style.color=n;var r=(0,tt.qw)(e);r&&(i.updateLayerStyle(t,r),this.mapState.needRerender=!0)}},e.prototype.updateShowTicker=function(t){var e=this;rt.Vx(t,{step:function(t,n){var i,r,o,a,s=(0,b.sB)((null===(r=null===(i=e.options.showAnimation)||void 0===i?void 0:i.durationRange)||void 0===r?void 0:r.start)||0,(null===(a=null===(o=e.options.showAnimation)||void 0===o?void 0:o.durationRange)||void 0===a?void 0:a.end)||1,n);s!==e.length&&(e.length=s,e.generate())}},this.mapState)},e.prototype.generate=function(){var t=this;if(!(this.points.length<2||this.removed)){var e=this.modules,n=e.dynamicStyle,i=e.collector,r=e.renderer,o=e.tileManager,a=e.identifier,s=e.map,l=O.nF.tileProps,c=Math.min(Math.floor(s.getZoom()),12),u=(0,Q.aq)(c),d=(0,Cs.z_)(this.points,this.distances,this.length),h=(0,Cs.Jh)(d,u),f=S.Ue(),p=I.Ue();this.tileObjects.forEach((function(e){e.clean(t.mapState),o.removeObject(e)})),this.tileObjects=[];for(var m=0;m<h.length;m++){var v=h[m];I.mc(p);for(var _=0;_<v.length;_++)I.aM(p,v[_]);I.be(f,p);var y=(0,Q.z6)(f,c);if((0,Q.Ny)(y,this.mapState.tilesBounds)){if(this.options.displayTileBounds){var g=n.getStyle().layers.find((function(t){return"debug-tile-bounds"===t.id}));(0,vo.cX)(i,g);var b=i.getAccumulatedData(),w=new G.W("dynamicObject",b.data,r,y);this.tileObjects.push(w),o.addObject(w)}var x=(0,Q.Bs)(y),M=[[],[]];for(_=0;_<v.length;_++)(0,Q.a2)(f,v[_],x),M[0][_]=f[0],M[1][_]=f[1];if(this.tileAttrs[l.beginningIsCut]=0,this.tileAttrs[l.endingIsCut]=0,0!==m&&(this.tileAttrs[l.beginningIsCut]=1),m+1!==h.length&&(this.tileAttrs[l.endingIsCut]=1),void 0!==this.styleLayerId){var P=n.getStyle().layersById[this.styleLayerId];(0,el.ot)(P)&&(0,J.XI)({collector:i,generator:nl.z.generate,args:[n.getStyle().id,P,O.Dz,this.tileAttrs,M]})}void 0!==this.styleLayer2Id&&(P=n.getStyle().layersById[this.styleLayer2Id],(0,el.ot)(P)&&(0,J.XI)({collector:i,generator:nl.z.generate,args:[n.getStyle().id,P,O.Dz,this.tileAttrs,M]})),void 0!==this.styleLayer3Id&&(P=n.getStyle().layersById[this.styleLayer3Id],(0,el.ot)(P)&&(0,J.XI)({collector:i,generator:nl.z.generate,args:[n.getStyle().id,P,O.Dz,this.tileAttrs,M]}));var T=i.getAccumulatedData(),L=new G.W("dynamicObject",T.data,r,x.coords);o.addObject(L),this.tileObjects.push(L),this.isInteractive&&this.identifyIds.push(T.identifyIds)}}this.isInteractive&&a.resetCache(),i.reset(),this.mapState.needRerender=!0}},e}(N),rl=n(4456),ol=function(t){function e(e,n){var i,r,o,a,s,l,c=t.call(this,e)||this;if(c.length=1,c.removed=!1,c.options=n,c.interactive=null===(i=n.interactive)||void 0===i||i,c.points=c.options.coordinates.map(w.yq),c.distances=[],n.showAnimation&&!1!==n.showAnimation.animate&&c.points.length>1){var u=0;c.distances.push(u);for(var d=1;d<c.options.coordinates.length;d++)u+=(0,w.vn)(c.options.coordinates[d-1],c.options.coordinates[d]),c.distances.push(u);c.animationTickerName="dashedLine-"+c.uniqId,c.startShowTicker(c.animationTickerName)}return c.stateDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"},{path:"demMode",type:"boolean"}]),c.debouncedGenerate=(0,Xt.D)((function(){c.generate()}),200),c.tileAttrs=(0,$.FJ)({previousPointX:0,previousPointY:0,nextPointX:0,nextPointY:0,beginningIsCut:0,endingIsCut:0,componentDistanceStart:0,objectLength:0,id:c.interactive?(0,V.Ru)(0,0):NaN}),c.modules.layers.addLayer(c),c.dashLayerRaw={type:"dashedLine",id:"dynamic-dashed-polyline-dash-"+c.uniqId,minzoom:c.options.minZoom,maxzoom:c.options.maxZoom,style:{color:c.options.dashColor||"#2480ff",dashLength:null!==(r=c.options.dashLength)&&void 0!==r?r:6,gapColor:c.options.gapColor||"#ffffff00",gapLength:null!==(o=c.options.gapLength)&&void 0!==o?o:20,width:null!==(a=c.options.width)&&void 0!==a?a:8}},c.baseLayerRaw={type:"line",id:"dynamic-dashed-polyline-base-"+c.uniqId,minzoom:c.options.minZoom,maxzoom:c.options.maxZoom,style:{color:c.options.dash2Color||"#ffffff",width:null!==(l=null===(s=c.options)||void 0===s?void 0:s.width2)&&void 0!==l?l:12}},c.dashLayer=(0,tt.qw)(c.dashLayerRaw),c.baseLayer=(0,tt.qw)(c.baseLayerRaw),c.generate(),c}return(0,j.ZT)(e,t),e.prototype.update=function(){this.removed||(this.stateDiffer.check(this.mapState)&&this.debouncedGenerate(),this.animationTickerName&&this.updateShowTicker(this.animationTickerName))},e.prototype.setStyle=function(t){var e,n=t.dashColor,i=t.dash2Color,r=t.gapColor,o=this.modules.dynamicStyle;this.dashLayer&&(void 0!==n&&(this.dashLayerRaw.style.color=n),void 0!==r&&(this.dashLayerRaw.style.gapColor=r),(e=(0,tt.qw)(this.dashLayerRaw))&&o.updateLayerStyle(this.dashLayer.innerId,e)),this.baseLayer&&(void 0!==i&&(this.baseLayerRaw.style.color=i),(e=(0,tt.qw)(this.baseLayerRaw))&&o.updateLayerStyle(this.baseLayer.innerId,e)),this.mapState.needRerender=!0},e.prototype.remove=function(){this.removed||(this.removed=!0,this.animationTickerName&&rt.sT(this.animationTickerName,this.mapState),this.interactive&&this.modules.identifier.resetCache(),this.baseLayer&&this.modules.dynamicStyle.removeLayer(this.baseLayer.innerId),this.dashLayer&&this.modules.dynamicStyle.removeLayer(this.dashLayer.innerId),t.prototype.destroy.call(this))},e.prototype.updateShowTicker=function(t){var e=this;rt.Vx(t,{step:function(t,n){var i,r,o,a,s=(0,b.sB)((null===(r=null===(i=e.options.showAnimation)||void 0===i?void 0:i.durationRange)||void 0===r?void 0:r.start)||0,(null===(a=null===(o=e.options.showAnimation)||void 0===o?void 0:o.durationRange)||void 0===a?void 0:a.end)||1,n);s!==e.length&&(e.length=s,e.generate())}},this.mapState)},e.prototype.startShowTicker=function(t){var e,n,i,r=void 0!==(null===(e=this.options.showAnimation)||void 0===e?void 0:e.easing)?this.options.showAnimation.easing:"linear",o=void 0!==(null===(n=this.options.showAnimation)||void 0===n?void 0:n.duration)?this.options.showAnimation.duration:250;rt.BL(t,{easing:r,animationGroup:null===(i=this.options.showAnimation)||void 0===i?void 0:i.animationGroup},this.mapState,0,1,o),this.length=0},e.prototype.generate=function(){var t=this;if(!(this.points.length<2||this.removed)){var e=this.modules,n=e.dynamicStyle,i=e.collector,r=e.renderer,o=e.tileManager,a=e.map,s=e.identifier,l=O.nF.tileProps,c=Math.min(Math.floor(a.getZoom()),12),u=(0,Q.aq)(c),d=(0,Cs.z_)(this.points,this.distances,this.length),h=(0,Cs.Jh)(d,u),f=S.Ue(),p=I.Ue();this.tileObjects.forEach((function(e){e.clean(t.mapState),o.removeObject(e)})),this.tileObjects=[];for(var m=[],v=0,_=0,y=h;_<y.length;_++){var g=y[_];I.mc(p);for(var b=0;b<g.length;b++)I.aM(p,g[b]);I.be(f,p);var w=(0,Q.z6)(f,c),x=(0,Q.Bs)(w),M=[[],[]],P=0;for(b=0;b<g.length;b++)if((0,Q.a2)(f,g[b],x),M[0][b]=f[0],M[1][b]=f[1],0!==b){var T=M[0][b]-M[0][b-1],L=M[1][b]-M[1][b-1];P+=Math.sqrt(T*T+L*L)}v+=P,m.push({vertices:M,tileInfo:x,distance:P})}var E=0;m.forEach((function(e,a){var s,c,u,d=e.tileInfo,p=e.distance,_=e.vertices;if(t.tileAttrs[l.beginningIsCut]=0,t.tileAttrs[l.endingIsCut]=0,t.tileAttrs[l.previousPointX]=0,t.tileAttrs[l.previousPointY]=0,t.tileAttrs[l.nextPointX]=0,t.tileAttrs[l.nextPointY]=0,t.tileAttrs[l.componentDistanceStart]=E,E+=p,t.tileAttrs[l.objectLength]=v,0!==a){var y=(u=h[a-1])[u.length-2];(0,Q.a2)(f,y,d),t.tileAttrs[l.beginningIsCut]=1,t.tileAttrs[l.previousPointX]=f[0],t.tileAttrs[l.previousPointY]=f[1]}if(a!==m.length-1&&(y=(u=h[a+1])[1],(0,Q.a2)(f,y,d),t.tileAttrs[l.endingIsCut]=1,t.tileAttrs[l.nextPointX]=f[0],t.tileAttrs[l.nextPointY]=f[1]),(0,Q.Ny)(d.coords,t.mapState.tilesBounds)){t.dashLayer&&(n.addLayer(t.dashLayer,null!==(s=t.options.zIndex)&&void 0!==s?s:0),(0,J.XI)({collector:i,generator:rl.L.generate,args:[n.getStyle().id,t.dashLayer,O.Dz,t.tileAttrs,_]})),t.baseLayer&&(n.addLayer(t.baseLayer,null!==(c=t.options.zIndex2)&&void 0!==c?c:-1),(0,J.XI)({collector:i,generator:nl.z.generate,args:[n.getStyle().id,t.baseLayer,O.Dz,t.tileAttrs,_]}));var g=i.getAccumulatedData(),b=new G.W("dynamicObject",g.data,r,d.coords);o.addObject(b),t.tileObjects.push(b),t.interactive&&t.identifyIds.push(g.identifyIds)}})),this.interactive&&s.resetCache(),i.reset(),this.mapState.needRerender=!0}},e}(N),al=n(9187),sl=n(5570),ll=function(t){function e(e,n){var i,r=t.call(this,e)||this;r.options=n,r.isInteractive=null===(i=n.interactive)||void 0===i||i;var o=r.options.coordinates.map((function(t){var e=t.map(w.yq);if(e.length>1){var n=e[0],i=e[e.length-1];n[0]===i[0]&&n[1]===i[1]||e.push(n)}return e})),a=[],s=[],l=r.modules,c=l.dynamicStyle,u=l.collector,d=l.renderer,h=l.tileManager,f=l.identifier,p=l.layers;o.forEach((function(t){a.length&&s.push(a.length),a=a.concat(t)}));var m=(0,tt.qw)({type:"polygon",id:"dynamic-polygon-"+r.uniqId,minzoom:r.options.minZoom,maxzoom:r.options.maxZoom,style:{color:r.options.color||"#3388ff33"}});if(!m)return r;c.addLayer(m,r.options.zIndex),r.fillLayerId=m.innerId;for(var v=(0,$.FJ)({id:r.isInteractive?(0,V.Ru)(0,0):NaN}),_=I.Ue(),y=0;y<a.length;y++)I.aM(_,a[y]);for(var g=(0,Q.x7)(_),b=(0,Q.Bs)(g),x=[],M=0;M<a.length;M++)x.push(a[M][0]),x.push(a[M][1]);var P=al(x,s),T=S.Ue(),L=[[],[],[]];for(M=0;M<P.length;M+=3){for(y=0;y<3;y++)(0,Q.a2)(T,a[P[M+y]],b),L[0][y]=T[0],L[1][y]=T[1],L[2][y]=0;(0,J.XI)({collector:u,generator:sl.a.generate,args:[c.getStyle().id,m,O.Dz,v,L]})}if(0!==r.options.strokeWidth){var E=(0,tt.qw)({type:"line",id:"dynamic-polygon-stroke-"+r.uniqId,minzoom:r.options.minZoom,maxzoom:r.options.maxZoom,style:{color:r.options.strokeColor||"#3388ff",width:r.options.strokeWidth||3}});if(E){c.addLayer(E,r.options.zIndex),r.borderLayerId=E.innerId;var k=(0,$.FJ)({id:r.isInteractive?(0,V.Ru)(0,0):NaN,beginningIsCut:0,endingIsCut:0});o.forEach((function(t){var e=[[],[],[]];t.forEach((function(t,n){(0,Q.a2)(T,t,b),e[0][n]=T[0],e[1][n]=T[1]})),(0,J.XI)({collector:u,generator:nl.z.generate,args:[c.getStyle().id,E,O.Dz,k,e]})}))}}var z=u.getAccumulatedData(),C=new G.W("dynamicObject",z.data,d,b.coords);return h.addObject(C),r.tileObjects.push(C),r.isInteractive&&r.identifyIds.push(z.identifyIds),p.addLayer(r),u.reset(),r.mapState.needRerender=!0,r.isInteractive&&f.resetCache(),r}return(0,j.ZT)(e,t),e.prototype.remove=function(){this.isInteractive&&this.modules.identifier.resetCache(),this.fillLayerId&&this.modules.dynamicStyle.removeLayer(this.fillLayerId),this.borderLayerId&&this.modules.dynamicStyle.removeLayer(this.borderLayerId),t.prototype.destroy.call(this)},e}(N),cl=function(t){function e(e,n){var i,r,o,a,s,l=t.call(this,e)||this;if(l.options=n,l.isInteractive=null===(i=n.interactive)||void 0===i||i,n.segments&&n.segments<=0)return l;var c=l.modules,u=c.dynamicStyle,d=c.collector,h=c.renderer,f=c.tileManager,p=c.identifier,m=c.layers,v=function(t,e,n){var i=[];if(n>0){i.push(S.al(t[0]+e,t[1],t[2]));for(var r=Math.PI/Math.ceil(n/2),o=r;o<Math.PI;o+=r){var a=e*Math.cos(o),s=e*Math.sin(o);i.push(S.al(t[0]+a,t[1]+s,t[2]),S.al(t[0]+a,t[1]-s,t[2]))}i.push(S.al(t[0]-e,t[1],t[2]))}return i}((0,w.yq)(l.options.coordinates),(0,w.a4)(l.options.coordinates,l.options.radius),null!==(r=l.options.segments)&&void 0!==r?r:150),_=(0,tt.qw)({type:"polygon",id:"dynamic-circle-"+l.uniqId,minzoom:l.options.minZoom,maxzoom:l.options.maxZoom,style:{color:null!==(o=l.options.color)&&void 0!==o?o:"#3388ff33",strokeWidth:null!==(a=l.options.borderWidth)&&void 0!==a?a:1,strokeColor:null!==(s=l.options.borderColor)&&void 0!==s?s:"#3388ff"}});if(!_)return l;u.addLayer(_,l.options.zIndex),l.layerId=_.innerId;for(var y=(0,$.FJ)({id:l.isInteractive?(0,V.Ru)(0,0):NaN}),g=I.Ue(),b=0;b<v.length;b++)I.aM(g,v[b]);var x=(0,Q.x7)(g),M=(0,Q.Bs)(x),P=[[],[],[]],T=S.Ue(),L=0!==l.options.borderWidth?1:0;for(b=0;b<v.length;b++)(0,Q.a2)(T,v[b],M),P[0][b]=T[0],P[1][b]=T[1],P[2][b]=L;(0,J.XI)({collector:d,generator:sl.a.generate,args:[u.getStyle().id,_,O.Dz,y,P]});var E=d.getAccumulatedData(),k=new G.W("dynamicObject",E.data,h,M.coords);return f.addObject(k),l.tileObjects.push(k),l.isInteractive&&l.identifyIds.push(E.identifyIds),m.addLayer(l),d.reset(),l.mapState.needRerender=!0,l.isInteractive&&p.resetCache(),l}return(0,j.ZT)(e,t),e.prototype.remove=function(){this.isInteractive&&this.modules.identifier.resetCache(),this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),t.prototype.destroy.call(this)},e}(N);function ul(t,e,n,i,r,o){if(!(r-i<=n)){var a=i+r>>1;dl(t,e,a,i,r,o%2),ul(t,e,n,i,a-1,o+1),ul(t,e,n,a+1,r,o+1)}}function dl(t,e,n,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,s=n-i+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);dl(t,e,n,Math.max(i,Math.floor(n-s*c/a+u)),Math.min(r,Math.floor(n+(a-s)*c/a+u)),o)}var d=e[2*n+o],h=i,f=r;for(hl(t,e,i,n),e[2*r+o]>d&&hl(t,e,i,r);h<f;){for(hl(t,e,h,f),h++,f--;e[2*h+o]<d;)h++;for(;e[2*f+o]>d;)f--}e[2*i+o]===d?hl(t,e,i,f):hl(t,e,++f,r),f<=n&&(i=f+1),n<=f&&(r=f-1)}}function hl(t,e,n,i){fl(t,n,i),fl(e,2*n,2*i),fl(e,2*n+1,2*i+1)}function fl(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function pl(t,e,n,i){var r=t-n,o=e-i;return r*r+o*o}var ml=function(t){return t[0]},vl=function(t){return t[1]},_l=function(){function t(t,e,n,i,r){void 0===e&&(e=ml),void 0===n&&(n=vl),void 0===i&&(i=64),void 0===r&&(r=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new r(2*t.length),l=0;l<t.length;l++)a[l]=l,s[2*l]=e(t[l]),s[2*l+1]=n(t[l]);ul(a,s,i,0,a.length-1,0)}return t.prototype.range=function(t,e,n,i){return function(t,e,n,i,r,o,a){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var d=c.pop(),h=c.pop(),f=c.pop();if(h-f<=a)for(var p=f;p<=h;p++)s=e[2*p],l=e[2*p+1],s>=n&&s<=r&&l>=i&&l<=o&&u.push(t[p]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=n&&s<=r&&l>=i&&l<=o&&u.push(t[m]);var v=(d+1)%2;(0===d?n<=s:i<=l)&&(c.push(f),c.push(m-1),c.push(v)),(0===d?r>=s:o>=l)&&(c.push(m+1),c.push(h),c.push(v))}}return u}(this.ids,this.coords,t,e,n,i,this.nodeSize)},t.prototype.within=function(t,e,n){return function(t,e,n,i,r,o){for(var a=[0,t.length-1,0],s=[],l=r*r;a.length;){var c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o)for(var h=d;h<=u;h++)pl(e[2*h],e[2*h+1],n,i)<=l&&s.push(t[h]);else{var f=Math.floor((d+u)/2),p=e[2*f],m=e[2*f+1];pl(p,m,n,i)<=l&&s.push(t[f]);var v=(c+1)%2;(0===c?n-r<=p:i-r<=m)&&(a.push(d),a.push(f-1),a.push(v)),(0===c?n+r>=p:i+r>=m)&&(a.push(f+1),a.push(u),a.push(v))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)},t}();function yl(t){var e=new Error("The palette is not valid. The heatmap won't be rendered."),n=Object.getOwnPropertyNames(t);if(0===n.length)throw e;var i=n.map((function(t){return Number(t)}));if(i.some((function(t){return Number.isNaN(t)||t<0||t>1})))throw e;var r={};i.forEach((function(n){if("string"!=typeof t[n])throw e;r[n]=(0,Hr.MV)(t[n])}));var o=Math.min.apply(Math,i),a=Math.max.apply(Math,i);return o>0&&(r[0]=r[o]),a<1&&(r[1]=r[a]),r}function gl(t,e){for(var n=Object.keys(t).map((function(t){return Number(t)})).sort((function(t,e){return t-e})),i=0,r=[],o=e-1,a=0;a<e;a++){var s=a/o;s>n[i+1]&&i++;for(var l=n[i],c=n[i+1],u=(s-l)/(c-l),d=0;d<4;d++)r[4*a+d]=bl(t[l].value[d],t[c].value[d],u)}return r.map((function(t){return Math.round(t)}))}function bl(t,e,n){return t*(1-n)+e*n}var wl={0:"rgba(89, 0, 89, 0)",.25:"rgba(0, 0, 89, 0.78)",.5:"rgba(0, 198, 68, 1)",.7:"rgba(198, 186, 0, 1)",.8:"rgba(249, 152, 0, 1)",1:"rgba(200, 0, 0, 1)"},xl=function(t){function e(e,n){void 0===n&&(n={});var i=t.call(this,e)||this;i.fillBuffers=function(){if(i.tree){var t=(0,Bo.B)(i.mapState.tilesBounds),e=(0,Q.x7)(t);if(!i.tileCoords||(n=e,r=i.tileCoords,!n.every((function(t,e){return t===r[e]})))){var n,r;i.resetBuffers(),i.tileCoords=e;var o=(0,Q.aq)(e[2]),a=(0,Q.Oy)(e);Oe.wA(i.matrix,a,S.al(o,o,le._9));var s=i.tree.range(a[0],a[1],a[0]+o,a[1]+o).map((function(t){return i.points[t]})),l=(0,Q.Bs)(e);i.buffers=function(t,e){var n=[],i=[],r=[],o=S.Ue();return t.forEach((function(t){var a=t.mapCoords,s=t.weight;(0,Q.a2)(o,a,e);for(var l=o[0],c=o[1],u=0;u<6;u++)n.push(l,c),r.push(s);i.push(-1,-1,1,-1,-1,1,-1,1,1,-1,1,1)})),{vertices:new Ue.Z(new Uint16Array(n),{itemSize:2,dataType:Ue.Z.UnsignedShort,stride:0,offset:0,normalized:!0}),widens:new Ue.Z(new Int8Array(i),{itemSize:2,dataType:Ue.Z.Byte,stride:0,offset:0,normalized:!1}),weights:new Ue.Z(new Float32Array(r),{itemSize:1,dataType:Ue.Z.Float,stride:0,offset:0,normalized:!1})}}(s,l),i.vertexCount=6*s.length,i.vao=new He(i.offscreenProgram,{a_vec2_position:i.buffers.vertices,a_vec2_widen:i.buffers.widens,a_float_weight:i.buffers.weights})}}},i.resizeFrameBuffer=function(){i.frameBuffer.setSize([Math.ceil(i.mapState.size[0]*window.devicePixelRatio/i.downscale),Math.ceil(i.mapState.size[1]*window.devicePixelRatio/i.downscale)]),i.frameBuffer.bind(i.gl),i.frameBuffer.unbind(i.gl),i.modules.imageManager.updatePreparedTexture(i.offscreenTextureIndex,i.frameBuffer.getTexture()),i.needRerender=!0,i.mapState.needRerender=!0};var r=n.downscale,o=n.palette,a=n.points,s=n.minZoom,l=n.maxZoom,c=n.zIndex,u=n.pointRadius,d=n.intensity,h=n.opacity;i.rampTextureIndex=i.modules.imageManager.addPreparedTexture(function(t,e){var n=gl(yl(t),e);return new oe(new Uint8Array(n),{size:[e,1]})}(null!=o?o:wl,256)),i.gl=i.modules.renderer.getRenderingContext(),i.downscale=null!=r?r:1,i.frameBuffer=new se({size:[Math.ceil(i.mapState.size[0]*window.devicePixelRatio/i.downscale),Math.ceil(i.mapState.size[1]*window.devicePixelRatio/i.downscale)],magFilter:oe.LinearFilter,minFilter:oe.LinearFilter,wrapS:oe.ClampToEdgeWrapping,wrapT:oe.ClampToEdgeWrapping}),i.offscreenTextureIndex=i.modules.imageManager.addPreparedTexture(i.frameBuffer.getTexture()),i.offscreenProgram=new Un({vertex:Ur("heatmap"),fragment:Zr("heatmap"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_radius",type:"1f"},{name:"u_float_intensity",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_widen",location:1},{name:"a_float_weight",location:2}]}),i.points=[],i.vertexCount=0,i.isDestroyed=!1,i.needRerender=!1,i.matrix=Oe.Ue(),i.mvpMatrix=Oe.Ue(),i.viewDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),i.sizeDiffer=new Zt([{path:"size",type:"vec2"}]),i.throttledFillBuffer=jt(i.fillBuffers,50);var f=(0,tt.qw)({type:"heatmap",id:"dynamic-heatmap-"+i.uniqId,minzoom:s,maxzoom:l,style:{opacity:null!=h?h:.5,intensity:null!=d?d:3,radius:null!=u?u:10}});if(!f)throw new Error("There is no correct style layer for heatmap");return i.layer=f,i.modules.dynamicStyle.addLayer(f,c),a&&i.setPoints(a),i}return(0,j.ZT)(e,t),e.prototype.setPoints=function(t){if(!this.isDestroyed){if(this.points=t.map((function(t){var e=t.coordinates,n=t.weight;return{mapCoords:(0,w.yq)(e),weight:null!=n?n:1}})),this.tree=new _l(this.points,(function(t){return t.mapCoords[0]}),(function(t){return t.mapCoords[1]})),this.tileCoords=void 0,!this.tileObjects.length){var e=this.modules,n=e.layers,i=e.collector,r=e.dynamicStyle,o=e.renderer,a=e.tileManager;(0,J.XI)({collector:i,generator:We.B.generateTexture,args:[r.getStyle().id,this.layer,this.offscreenTextureIndex,this.rampTextureIndex]});var s=i.getAccumulatedData(),l=new G.W("dynamicObject",s.data,o);a.addObject(l),this.tileObjects.push(l),n.addLayer(this),i.reset()}this.mapState.needRerender=!0,this.needRerender=!0}},e.prototype.update=function(){if(this.sizeDiffer.check(this.mapState)&&this.resizeFrameBuffer(),(this.needRerender||this.viewDiffer.check(this.mapState))&&this.tree){var t=this.mapState,e=t.zoom,n=t.styleZoom,i=t.styleState,r=this.gl;if(this.throttledFillBuffer(),this.vao&&this.buffers&&this.tree&&this.tileCoords){var o=(0,nt.jJ)(n,i,[]),a=(0,nt.vn)(this.layer.style.radius,o),s=(0,nt.vn)(this.layer.style.intensity,o),l=le.y4*Math.pow(2,e-this.tileCoords[2])*window.devicePixelRatio;this.offscreenProgram.enable(r),this.offscreenProgram.bind(r,{u_mat4_mvp:Oe.dC(this.mvpMatrix,this.modules.camera.viewProjectionMatrix,this.matrix),u_float_radius:a*window.devicePixelRatio,u_float_intensity:s,u_float_tile_to_pixel_ratio:1/l}),this.vao.bind({gl:r,extensions:this.modules.renderer.webGlExtensions}),this.gl.viewport(0,0,Math.ceil(this.mapState.size[0]*window.devicePixelRatio/this.downscale),Math.ceil(this.mapState.size[1]*window.devicePixelRatio/this.downscale)),this.frameBuffer.bind(r),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.blendFunc(r.ONE,r.ONE),r.enable(r.BLEND),r.drawArrays(r.TRIANGLES,0,this.vertexCount),this.frameBuffer.unbind(r),this.needRerender=!1}}},e.prototype.destroy=function(){if(!this.isDestroyed){t.prototype.destroy.call(this),this.points=[],this.tree=void 0,this.isDestroyed=!0,this.resetBuffers(),this.layer&&this.modules.dynamicStyle.removeLayer(this.layer.innerId),this.frameBuffer.remove(this.gl);var e=this.modules.imageManager;e.deleteTexture(this.offscreenTextureIndex),e.deleteTexture(this.rampTextureIndex)}},e.prototype.resetBuffers=function(){if(this.buffers){for(var t in this.buffers)this.buffers[t].remove();this.buffers=void 0}this.vao&&(this.vao.remove(),this.vao=void 0)},e}(N),Sl=n(9798),Il=function(t){function e(e,n){var i=t.call(this,e)||this;i.options=n,i.isHidden=!1,i.isInteractive=!!i.options.interactive,i.position=(0,w.yq)(i.options.coordinates),i.isDestroyed=!1;var r=i.modules,o=r.dynamicStyle,a=r.collector,s=r.renderer,l=r.tileManager,c=r.identifier,u=r.layers,d=r.imageManager;return Promise.resolve().then((function(){var t=i.options.image,e=t.url,n=t.size,r=t.pixelRatio;return d.loadTexture(e,{size:n,pixelRatio:r,imagePadding:le.Hg})})).then((function(t){if(void 0!==t&&!i.isDestroyed){var e=i.options,n=e.image,r=e.targetSize,d=e.offset,h=(0,tt.qw)({type:"stretchableImage",id:"dynamic-polygon-"+i.uniqId,minzoom:i.options.minZoom,maxzoom:i.options.maxZoom,style:{sourceSize:n.size,targetSize:r,offset:d,stretchX:n.stretchX,stretchY:n.stretchY,pixelRatio:n.pixelRatio}});if(h){o.addLayer(h,i.options.zIndex),i.styleLayerId=h.innerId,(0,J.XI)({collector:a,generator:Ge.z.generate,args:[o.getStyle().id,h,O.Dz,(0,$.FJ)({id:i.isInteractive?(0,V.Ru)(0,0):NaN}),t,[0,0]]});var f=a.getAccumulatedData(),p=new G.W("dynamicObject",f.data,s,(0,Q.IR)(i.position));i.isInteractive&&i.identifyIds.push(f.identifyIds),i.isHidden||l.addObject(p),i.tileObjects.push(p),u.addLayer(i),a.reset(),i.mapState.needRerender=!0,i.isInteractive&&c.resetCache()}}})),i}return(0,j.ZT)(e,t),e.prototype.destroy=function(){this.isDestroyed=!0,this.isInteractive&&this.modules&&this.modules.identifier.resetCache(),this.styleLayerId&&this.modules.dynamicStyle.removeLayer(this.styleLayerId),t.prototype.destroy.call(this)},e.prototype.hide=function(){var t=this;this.isHidden||(this.isHidden=!0,this.tileObjects.length&&this.tileObjects.forEach((function(e){t.modules.tileManager.removeObject(e)})))},e.prototype.show=function(){var t=this;this.isHidden&&(this.isHidden=!1,this.tileObjects.length&&this.tileObjects.forEach((function(e){t.modules.tileManager.addObject(e)})))},e.prototype.setCoordinates=function(t){var e=this;this.position=(0,w.yq)(t),this.tileObjects.forEach((function(t){t.setTileCoords((0,Q.IR)(e.position))})),0===this.tileObjects.length||this.isHidden||(this.mapState.needRerender=!0)},e}(N),Ml=n(2388),Pl=[0,0],Tl=[0,0,0,0],Ll=function(t){function e(e,n){var i,r,o,a,s,l,c,u,d,h=t.call(this,e)||this;h.status="visible",h.coordinates=n.coordinates,h.options=n;var f=null!==(i=n.font)&&void 0!==i?i:"Open_Sans",p=null!==(r=n.fontSize)&&void 0!==r?r:g.fonts.baseSize,m=null!==(o=n.letterSpacing)&&void 0!==o?o:0,v=null!==(a=n.lineHeight)&&void 0!==a?a:g.fonts.baseLineHeight,_=null!==(s=h.options.offset)&&void 0!==s?s:Pl,y=(0,tt.qw)({type:"point",id:"dynamic-pointLabel-"+h.uniqId,minzoom:h.options.minZoom,maxzoom:h.options.maxZoom,style:{textFont:f,textFontSize:p,textColor:null!==(l=n.color)&&void 0!==l?l:"#000000",textHaloWidth:null!==(c=n.haloRadius)&&void 0!==c?c:0,textHaloColor:null!==(u=n.haloColor)&&void 0!==u?u:"#ffffff",textLetterSpacing:m,textLineHeight:v,textOffset:_}});if(h.position=(0,w.yq)(h.options.coordinates),!y)return h;var x=h.modules,S=x.dynamicStyle,I=x.collector,M=x.assetManager,P=x.styleManager,T=x.renderer,L=x.tileManager,E=x.layers,k=x.defaultSource,z=null!==(d=h.options.zIndex)&&void 0!==d?d:0;S.addLayer(y,z+(h.options.image?1e-5:0));var C=(0,$.FJ)({db_label:h.options.text}),A=(0,Q.IR)(h.position);(0,J.XI)({collector:I,generator:Ml.p,args:[S.getStyle(),y,A,k.getId(),{},O.nF,C,[[0],[0]],(0,Xs.o1)(window.devicePixelRatio)]});var D=I.getAccumulatedData();if(!D.labels.length)return h;var F=[{metatileHash:-1,labels:D.labels,styleId:S.getStyle().id}],R=(0,Sl.v)(F,Vo.AL.DynamicObject,P,h.mapState.styleState,h.mapState.styleZoom);if(1!==R.length)return h;var j=R[0];return Ys.GY.then((function(){var t;j.label=null!==(t=(0,Ys.iY)(j.label))&&void 0!==t?t:"",j.updateRanges()})).then((function(){return Promise.all(j.ranges.map((function(t){return M.loadFont(f,t)})))})).then((function(){if("destroyed"!==h.status){j.textMetrics=(0,So.JA)(j.label,m,M.getFontGlyphs(f));var t=h.options.image,i=function(t){return[t&&void 0!==t[0]?(0,b.uZ)(t[0],0,1):.5,t&&void 0!==t[1]?(0,b.uZ)(t[1],0,1):.5]}(n.anchor),r=p/g.fonts.baseSize,o=p*v*j.textMetrics.lines.length,a=r*j.textMetrics.maxWidth,s=[-a*(i[0]-.5),-o*(i[1]-.5)],l=_[0],c=_[1];(0,J.XI)({collector:I,generator:De.qp,args:[j,1,j.textMetrics,[0,0,0],0,[l+s[0],c+s[1]],y,S.getStyle().fontNameToIndex[f]]});var u=I.getAccumulatedData();if(h.tileObject=new G.W("dynamicObject",u.data,T,(0,Q.IR)(h.position)),"visible"===h.status&&L.addObject(h.tileObject),E.addLayer(h),h.tileObjects.push(h.tileObject),I.reset(),h.mapState.needRerender=!0,t){var d=t.padding||Tl,w=d[0],x=d[1],P=d[2],k=d[3];h.backgroundImage=new Il(e,{image:t,coordinates:h.coordinates,targetSize:[a+k+x,o+w+P],offset:[(x-k)/2+l+s[0],(P-w)/2+c+s[1]],zIndex:z,minZoom:h.options.minZoom,maxZoom:h.options.maxZoom}),"hidden"===h.status&&h.backgroundImage.hide()}}})),h}return(0,j.ZT)(e,t),e.prototype.hide=function(){"visible"===this.status&&(this.status="hidden",this.tileObject&&this.modules.tileManager.removeObject(this.tileObject),this.backgroundImage&&this.backgroundImage.hide())},e.prototype.show=function(){"hidden"===this.status&&(this.status="visible",this.tileObject&&this.modules.tileManager.addObject(this.tileObject),this.backgroundImage&&this.backgroundImage.show())},e.prototype.remove=function(){"destroyed"!==this.status&&(t.prototype.destroy.call(this),this.backgroundImage&&this.backgroundImage.destroy(),this.status="destroyed")},e.prototype.setCoordinates=function(t){var e=this;"destroyed"!==this.status&&(this.coordinates=t,this.position=(0,w.yq)(t),this.tileObjects.forEach((function(t){t.setTileCoords((0,Q.IR)(e.position))})),this.backgroundImage&&this.backgroundImage.setCoordinates(t),0!==this.tileObjects.length&&"visible"===this.status&&(this.mapState.needRerender=!0))},e.prototype.getCoordinates=function(){return(0,w.PA)(this.position)},e}(N),El=[.5,.5],kl=[0,18],zl=function(t){function e(e,n){var i=t.call(this,e,n.draggable)||this;i.map=e;var r=n.coordinates,o=n.size,a=n.zIndex,s=n.minZoom,l=n.maxZoom,c=n.interactive,u=n.hoverIcon,d=n.hoverSize,h=n.hoverAnchor,f=n.label,p=n.rotation;i.status="normal",i.position=(0,w.yq)(r),i.rotation=(0,b.Id)(null!=p?p:0),i.zIndex=void 0!==a?a:0,i.minZoom=null!=s?s:-1/0,i.maxZoom=null!=l?l:1/0,i.interactive=void 0===c||c;var m=void 0!==n.icon?n.icon:g.defaultMarkerIcon,v=void 0!==n.icon?n.anchor:g.defaultMarkerAnchor;return i.on("mouseover",i.switchToHoveredStyle),i.on("mouseout",i.switchToNormalStyle),i.modules.layers.addLayer(i),i.setIcon({icon:m,anchor:v,size:o}),void 0!==u&&i.setHoverIcon({icon:u,anchor:h,size:d}),i.setLabel(f),i}return(0,j.ZT)(e,t),e.prototype.destroy=function(){var e;"destroyed"!==this.status&&(this.status="destroyed",null===(e=this.label)||void 0===e||e.remove(),this.interactive&&this.modules.identifier.resetCache(),this.off("mouseover",this.switchToHoveredStyle),this.off("mouseout",this.switchToNormalStyle),t.prototype.destroy.call(this))},e.prototype.setRotation=function(t){"destroyed"!==this.status&&(this.rotation=(0,b.Id)(t),this.normalStateData&&(this.normalStateData.styleLayer.style.iconRotation=this.rotation,this.mapState.needRerender=!0),this.hoverStateData&&(this.hoverStateData.styleLayer.style.iconRotation=this.rotation,this.mapState.needRerender=!0))},e.prototype.getRotation=function(){return(0,b.ZY)(this.rotation)},e.prototype.setIcon=function(t){var e=this;"destroyed"!==this.status&&this.modules.imageCache.getRasterSet(t.icon,void 0,t.size,t.anchor).then((function(n){if("destroyed"!==e.status){var i=e.normalStateData,r=e.getMarkerStateData(n,t);"normal"===e.status&&(i&&e.modules.tileManager.removeObject(i.tileObject),e.modules.tileManager.addObject(r.tileObject),e.mapState.needRerender=!0,e.interactive&&e.modules.identifier.resetCache()),i&&((0,b.VJ)(e.tileObjects,i.tileObject),(0,b.VJ)(e.identifyIds,i.identifyIds),i.tileObject.clean(e.mapState)),e.tileObjects.push(r.tileObject),e.interactive&&e.identifyIds.push(r.identifyIds),e.normalStateData=r}}))},e.prototype.setHoverIcon=function(t){var e=this;if("destroyed"!==this.status)return t?void this.modules.imageCache.getRasterSet(t.icon,void 0,t.size,t.anchor).then((function(n){if("destroyed"!==e.status){var i=e.hoverStateData,r=e.getMarkerStateData(n,t);"hover"===e.status&&(i&&e.modules.tileManager.removeObject(i.tileObject),e.modules.tileManager.addObject(r.tileObject),e.mapState.needRerender=!0,e.interactive&&e.modules.identifier.resetCache()),i&&((0,b.VJ)(e.tileObjects,i.tileObject),(0,b.VJ)(e.identifyIds,i.identifyIds),i.tileObject.clean(e.mapState)),e.tileObjects.push(r.tileObject),e.interactive&&e.identifyIds.push(r.identifyIds),e.hoverStateData=r}})):("hover"===this.status&&this.switchToNormalStyle(),void(this.hoverStateData&&((0,b.VJ)(this.tileObjects,this.hoverStateData.tileObject),(0,b.VJ)(this.identifyIds,this.hoverStateData.identifyIds),this.hoverStateData.tileObject.clean(this.mapState),this.hoverStateData=void 0)))},e.prototype.setLabel=function(t){var e,n,i,r,o;"destroyed"!==this.status&&(null===(e=this.label)||void 0===e||e.remove(),t&&(this.label=new Ll(this.map,(0,j.pi)((0,j.pi)({coordinates:this.getCoordinates()},t),{minZoom:Math.max(null!==(n=t.minZoom)&&void 0!==n?n:this.minZoom,this.minZoom),maxZoom:Math.min(null!==(i=t.maxZoom)&&void 0!==i?i:this.maxZoom,this.maxZoom),fontSize:null!==(r=t.fontSize)&&void 0!==r?r:18,anchor:t.anchor||El,offset:t.offset||kl,zIndex:null!==(o=t.zIndex)&&void 0!==o?o:this.zIndex+1e-5}))))},e.prototype.setCoordinates=function(t){var e;this.setPosition((0,w.yq)(t)),null===(e=this.label)||void 0===e||e.setCoordinates(t)},e.prototype.getCoordinates=function(){return(0,w.PA)(this.getPosition())},e.prototype.show=function(){var t;"hidden"===this.status&&(null===(t=this.label)||void 0===t||t.show(),this.normalStateData&&(this.modules.tileManager.addObject(this.normalStateData.tileObject),this.mapState.needRerender=!0,this.interactive&&this.modules.identifier.resetCache()),this.status="normal")},e.prototype.hide=function(){var t,e,n;if("destroyed"!==this.status&&"hidden"!==this.status){null===(t=this.label)||void 0===t||t.hide();var i="normal"===this.status?null===(e=this.normalStateData)||void 0===e?void 0:e.tileObject:null===(n=this.hoverStateData)||void 0===n?void 0:n.tileObject;i&&(this.modules.tileManager.removeObject(i),this.mapState.needRerender=!0,this.interactive&&this.modules.identifier.resetCache()),this.status="hidden"}},e.prototype.setPosition=function(t){this.position=t,this.tileObjects.length&&(this.tileObjects.forEach((function(e){e.setTileCoords((0,Q.IR)(t))})),"hidden"!==this.status&&(this.mapState.needRerender=!0))},e.prototype.getPosition=function(){return this.position},e.prototype.isInteractive=function(){return this.interactive},e.prototype.contains=function(t){if(!this.normalStateData)return!1;var e=this.hoverStateData,n=this.normalStateData,i=void 0!==e?e.size:n.size,r=void 0!==e?e.anchor:n.anchor,o=this.modules.camera.project(this.position),a=o[0]-i[0]*r[0],s=o[0]+i[0]*(1-r[0]),l=o[1]-i[1]*r[1],c=o[1]+i[1]*(1-r[1]);return t[0]>a&&t[0]<s&&t[1]>l&&t[1]<c},e.prototype.switchToHoveredStyle=function(){if("normal"===this.status&&this.hoverStateData&&this.normalStateData){var t=this.modules.tileManager;t.removeObject(this.normalStateData.tileObject),t.addObject(this.hoverStateData.tileObject),this.status="hover",this.mapState.needRerender=!0}},e.prototype.switchToNormalStyle=function(){if("hover"===this.status&&this.normalStateData&&this.hoverStateData){var t=this.modules.tileManager;t.removeObject(this.hoverStateData.tileObject),t.addObject(this.normalStateData.tileObject),this.status="normal",this.mapState.needRerender=!0}},e.prototype.getMarkerStateData=function(t,e){var n=e.icon,i=e.anchor,r=e.size,o=this,a=o.zIndex,s=o.interactive,l=o.position,c=this.modules,u=c.collector,d=c.renderer,h=c.dynamicStyle,f=c.styleManager,p=c.defaultSource,m=(0,$.FJ)({id:s?(0,V.Ru)(0,0):NaN,dpi:96*window.devicePixelRatio}),v=(0,Q.IR)(l),_=(0,tt.qw)({type:"point",id:"dynamic-marker-"+this.uniqId,minzoom:this.minZoom,maxzoom:this.maxZoom,style:{iconImage:n,iconAnchor:i,iconRotation:this.rotation}});if(!_)throw new Error("Marker with icon "+n+" was created with null style layer");h.addLayer(_,a),h.appendRasterSet(t,(0,Re.fF)(n,_.style.iconAnchor[0],_.style.iconAnchor[1])),(0,J.XI)({collector:u,generator:Ml.p,args:[h.getStyle(),_,v,p.getId(),{},O.nF,m,[[0],[0]],(0,Xs.o1)(window.devicePixelRatio)]});var y=u.getAccumulatedData(),g=y.identifyIds,b=y.labels;if(!b.length)throw new Error("Marker with icon "+n+" was created with empty labels");var w=[{metatileHash:-1,labels:b,styleId:h.getStyle().id}],x=(0,Sl.v)(w,Vo.AL.DynamicObject,f,this.mapState.styleState,this.mapState.styleZoom);if(1!==x.length)throw new Error("Marker with icon "+n+" has empty unpacked labels");var S=x[0];(0,De.vg)(u,S,[0,0,0],0,t.rasters[0]);var I=u.getAccumulatedData().data;return u.reset(),{styleLayer:_,tileObject:new G.W("dynamicObject",I,d,v,this),identifyIds:g,icon:n,anchor:[t.rasters[0].anchorX,t.rasters[0].anchorY],size:r||[t.rasters[0].w/window.devicePixelRatio,t.rasters[0].h/window.devicePixelRatio]}},e}(K),Cl=n(2714),Al=n(7031),Dl=(0,Cl.D)({symbol:"polygon",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.localID=new Uint32Array(e,4)},packObjectAttributes:function(t,e,n,i,r){return(0,Al.v$)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,r,o){var a=o[0],s=o[1],l=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),c=t.getBucket(n.type,"fill",sl.a.sinks.fill.packObjectAttributes(e,n.innerId,NaN,n.dataKeys,i,r),sl.a.sinks.fill.binder),u=c.elements.offset;!function(t,e,n,i,r,o,a,s){var l=t.buffer,c=t.offset;l[c]=e+n,l[c+1]=e+i,l[c+2]=e+r,l[c+3]=e+o,l[c+4]=e+a,l[c+5]=e+s,t.offset=c+6}(c.indices,u,0,1,2,2,1,3),Fl(c,u++,a[0],s[0],l),Fl(c,u++,a[1],s[1],l),Fl(c,u++,a[2],s[2],l),Fl(c,u++,a[3],s[3],l),c.elements.offset=u}});function Fl(t,e,n,i,r){var o=4*e;t.views.position[o]=n,t.views.position[o+1]=i;var a=2*e;t.views.localID[a]=r}var Rl=function(t){function e(e,n){var i=t.call(this,e)||this,r=i.modules,o=r.dynamicStyle,a=r.collector,s=r.renderer,l=r.tileManager,c=r.identifier,u=r.layers;i.options=n,i.points=[];var d=(0,tt.qw)({type:"polygon",id:"dynamic-polygon-"+i.uniqId,minzoom:i.options.minZoom,maxzoom:i.options.maxZoom,style:{color:i.options.color||"#0085a0"}});if(!d)return i;o.addLayer(d,i.options.zIndex),i.layerId=d.innerId;var h=(0,$.FJ)({id:i.options.interactive?[0,i.uniqId]:NaN});i.points=function(t,e,n){var i=e/2,r=n/2,o=t[0],a=t[1],s=t[2];return[[o-i,a-r,s],[o+i,a-r,s],[o-i,a+r,s],[o+i,a+r,s]]}((0,w.yq)(i.options.center),(0,w.a4)(i.options.center,i.options.width),(0,w.a4)(i.options.center,i.options.height));for(var f=I.Ue(),p=0;p<i.points.length;p++)I.aM(f,i.points[p]);var m=(0,Q.x7)(f),v=(0,Q.Bs)(m),_=[[],[]],y=S.Ue();for(p=0;p<i.points.length;p++)(0,Q.a2)(y,i.points[p],v),_[0][p]=y[0],_[1][p]=y[1];(0,J.XI)({collector:a,generator:Dl.generate,args:[o.getStyle().id,d,O.Dz,h,_]});var g=a.getAccumulatedData(),b=new G.W("dynamicObject",g.data,s,m);return l.addObject(b),i.tileObjects.push(b),i.options.interactive&&i.identifyIds.push(g.identifyIds),u.addLayer(i),a.reset(),i.mapState.needRerender=!0,i.options.interactive&&c.resetCache(),i}return(0,j.ZT)(e,t),e.prototype.destroy=function(){void 0!==this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),this.options.interactive&&this.modules&&this.modules.identifier.resetCache(),t.prototype.destroy.call(this)},e}(N),Ol=function(t){function e(e,n){var i=t.call(this,e)||this,r=i.modules.dynamicStyle;return i.options=(0,j.pi)((0,j.pi)({},n),{image:{url:n.image.url}}),i.points=[],i.styleLayer=(0,tt.qw)({type:"raster",id:"dynamic-raster-"+i.uniqId,minzoom:i.options.minZoom,maxzoom:i.options.maxZoom,style:{opacity:i.options.opacity}}),i.styleLayer?(r.addLayer(i.styleLayer,i.options.zIndex),i.layerId=i.styleLayer.innerId,i.modules.imageManager.loadTexture(i.options.image.url,{skipAtlasSizeChecking:!0}).then((function(t){i.textureIndex=t,i.generate()})),i):i}return(0,j.ZT)(e,t),e.prototype.destroy=function(){void 0!==this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),t.prototype.destroy.call(this)},e.prototype.updateImage=function(t){var e=this,n=t.url,i=t.bounds;return n||i?(n&&(this.options.image.url=n),i&&(this.options.bounds=i),(n?this.modules.imageManager.loadTexture(n,{skipAtlasSizeChecking:!0}):Promise.resolve(this.textureIndex)).then((function(t){e.textureIndex=t,e.clean(),e.generate()}))):Promise.resolve()},e.prototype.generate=function(){if(this.styleLayer&&void 0!==this.textureIndex){var t=this.modules,e=t.collector,n=t.dynamicStyle,i=t.tileManager,r=t.layers,o=t.renderer;this.points=function(t){var e=I.X3(t),n=e.min,i=e.max;return[n,[i[0],n[1]],[n[0],i[1]],i]}(this.options.bounds);for(var a=I.Ue(),s=0;s<this.points.length;s++)I.aM(a,this.points[s]);var l=(0,Q.x7)(a),c=(0,Q.Bs)(l),u=[[],[]],d=S.Ue();for(s=0;s<this.points.length;s++)(0,Q.a2)(d,this.points[s],c),u[0][s]=d[0],u[1][s]=d[1];(0,J.XI)({collector:e,generator:Ve.h.generate,args:[u,n.getStyle().id,this.styleLayer,this.textureIndex]});var h=e.getAccumulatedData(),f=new G.W("dynamicObject",h.data,o,l);i.addObject(f),this.tileObjects.push(f),r.addLayer(this),e.reset(),this.mapState.needRerender=!0}},e.prototype.clean=function(){var t=this.tileObjects[0];t&&(t.clean(this.mapState),this.modules.tileManager.removeObject(t),this.modules.layers.removeLayer(this),this.tileObjects=[])},e}(N),jl=function(){function t(t,e,n){var i=this;this.id=t,this.modules=e,this.options=n,this.type="raster",this.textureIndices={},this.tileLoader=new ri.U("arrayBuffer"),this.attributes={},this.tiles=new Map,this.sourceAttrs=n.attributes||{},this.url=function(t){var e=(0,Q._W)(t),n=e[0],r=e[1],o=e[2];return i.options.url(n,r,o)}}return t.prototype.deleteTextures=function(){for(var t in this.textureIndices)this.modules.imageManager.deleteTexture(this.textureIndices[t]);this.textureIndices={}},t.prototype.abortTileFetch=function(t){this.tileLoader.abortRequest((0,Q.gx)(t))},t.prototype.deleteTile=function(t){var e=(0,Q.gx)(t);this.tiles.delete(e)},t.prototype.fetchTile=function(t){var e=this,n=(0,Q.gx)(t),i=this.url(t);return this.tileLoader.fetch(t,(function(){return i})).then((function(t){return e.tiles.set(n,t),[{regionId:0,metatileHash:-1}]}))},t.prototype.generateTile=function(t,e){return(0,j.mG)(this,void 0,void 0,(function(){var n,i,r,o,a,s,l,c,u,d,h,f,p,m=this;return(0,j.Jh)(this,(function(v){switch(v.label){case 0:return n=[],i=[],r=this.modules.styleManager.getStyle(t.handyStyleId),o=(0,Q.gx)(e),(a=this.tiles.get(o))&&r?[4,this.modules.imageManager.addTexture(a,{imagePadding:0})]:[2,Promise.resolve({results:n,transferable:i})];case 1:if(void 0===(s=v.sent()))return[2,Promise.resolve({results:n,transferable:i})];for(this.textureIndices[o]=s,l=[[],[]],c=S.Ue(),u=function(t,e){var n=t[0],i=t[1],r=t[2];return[[n,i,r],[n+e,i,r],[n,i+e,r],[n+e,i+e,r]]}((0,Q.Oy)(e),(0,Q.aq)(e[2])),d=(0,Q.Bs)(e),h=0;h<u.length;h++)(0,Q.a2)(c,u[h],d),l[0][h]=c[0],l[1][h]=c[1];return f=(0,nt.ci)((0,O.KP)([]),t.styleState,this.sourceAttrs,{},[]),r.layers.filter((function(t){return"raster"===t.type&&(0,nt.FR)(t.filter,f)})).forEach((function(t){"raster"===t.type&&(0,J.XI)({collector:m.modules.collector,generator:Ve.h.generate,args:[l,r.id,t,s]})})),p=this.modules.collector.getAccumulatedData(),n.push({regionId:0,metatileHash:0,styleId:r.id,collectorOutput:p}),i.push.apply(i,p.transferable),[2,Promise.resolve({results:n,transferable:i})]}}))}))},t.prototype.getAttributes=function(){return this.attributes},t.prototype.setAttributes=function(t){this.attributes=t},t.prototype.destroy=function(){this.tileLoader.destroy()},t}(),Bl=function(){function t(t,e){var n,i;this.type="raster",this.id=(0,je.Q)(),this.modules=t.modules,this.source=new jl(this.id,this.modules,e);var r=null!==(n=e.minZoom)&&void 0!==n?n:g.MAP_DEFAULTS.minZoom,o=null!==(i=e.maxZoom)&&void 0!==i?i:g.MAP_DEFAULTS.maxZoom;this.layer=new Be.I(r,o,r,o,this.modules,t.state,this.source),this.modules.tileManager.addTileLayer(this.layer)}return t.prototype.destroy=function(){this.source.deleteTextures(),this.modules.tileManager.removeTileLayer(this.layer),this.layer.destroy()},t.prototype.getAttributes=function(){return this.source.getAttributes()},t.prototype.getId=function(){return this.source.id},t.prototype.setAttributes=function(t){this.source.setAttributes(t),this.layer.redraw()},t}(),Ul=function(t){function e(e,n){var i,r=t.call(this,e)||this;return r.position=(0,w.yq)(n.coordinates),r.zIndex=null!==(i=n.zIndex)&&void 0!==i?i:0,r.isDestroyed=!1,r.labelKey="onlineMarker-"+r.uniqId,r.setIcon(n.icon),r}return(0,j.ZT)(e,t),e.prototype.destroy=function(){this.isDestroyed=!0,this.modules.identifier.resetCache(),this.modules.labeler.removeLabels(this.labelKey),t.prototype.destroy.call(this)},e.prototype.setIcon=function(t){var e=this,n=t.url,i=t.transformer,r=t.size,o=t.anchor;this.modules.imageCache.getRasterSet(n,i,r,o).then((function(t){if(!e.isDestroyed){e.removeIcon();var i=(0,tt.qw)({type:"point",id:"dynamic-onlineMarker-"+e.uniqId,minzoom:-1/0,maxzoom:1/0,style:{iconImage:n,iconAnchor:o}}),a=(0,$.FJ)({id:(0,V.Ru)(0,0)}),s=e.modules,l=s.collector,c=s.dynamicStyle,u=s.styleManager,d=s.defaultSource,h=e.zIndex;if(i){c.addLayer(i,h),c.appendRasterSet(t,(0,Re.fF)(n,i.style.iconAnchor[0],i.style.iconAnchor[1]));var f=(0,Q.IR)(e.position);(0,J.XI)({collector:l,generator:Ml.p,args:[c.getStyle(),i,f,d.getId(),{},O.nF,a,[[0],[0]],(0,Xs.o1)(window.devicePixelRatio)]});var p=l.getAccumulatedData(),m=p.identifyIds,v=p.labels;if(v.length){var _=[{metatileHash:-1,labels:v,styleId:c.getStyle().id}],y=(0,Sl.v)(_,Vo.AL.DynamicObject,u,e.mapState.styleState,e.mapState.styleZoom);if(1===y.length){var g=y[0];(0,De.vg)(l,g,[0,0,0],0,t.rasters[0]);var b=l.getAccumulatedData();l.reset();var w=new G.W("dynamicObject",b.data,e.modules.renderer,(0,Q.IR)(e.position),e);e.tileObjects.push(w),e.identifyIds=[m],e.modules.tileManager.addObject(w),e.modules.layers.addLayer(e),e.modules.identifier.debouncedFillCache(),e.modules.labeler.removeLabels(e.labelKey),e.modules.labeler.addLabelBox(e.labelKey,{id:e.uniqId,width:r[0],height:r[1],position:e.position,offset:[-o[0],-o[1]],labelingGroup:"marker"}),e.mapState.needRerender=!0}}}}}))},e.prototype.removeIcon=function(){var t=this.tileObjects[0];t&&(t.clean(this.mapState),this.modules.tileManager.removeObject(t),this.tileObjects=[])},e}(N);function Zl(t){return{type:"data",key:(0,Q.gx)(t),coords:t,zoomLevel:t[2],detailLevel:t[3],needFetch:!1,needAbortFetch:!1,status:_s.z3.Initial}}function Nl(t,e,n,i,r){return function(t,e,n,i,r,o){return{type:"data",maxDetailLevel:o,minDetailLevel:r,maxZoomLevel:i,minZoomLevel:n,zoomLevel:Math.floor(e),tiles:{},viewportTiles:[]}}(0,t,e,n,i,r)}var Hl=function(t){function e(e,n,i){var r=t.call(this)||this;return r.prevZoomLevel=0,r.mapState=e,r.modules=n,r.config=i,r.gridState=Nl(e.styleZoom,i.minZoom,i.maxZoom,i.minZoom,i.maxZoom),r.viewportDiffer=new Zt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"demMode",type:"boolean"}]),r.dataTileLoader=new ri.U("json"),r.modules.layers.addLayer(r),r}return(0,j.ZT)(e,t),e.prototype.destroy=function(){var t;(t=this.gridState).tiles={},t.viewportTiles=[],this.modules.layers.removeLayer(this)},e.prototype.update=function(){var t=!0;if(this.viewportDiffer.check(this.mapState)){var e=Math.floor(this.mapState.styleZoom);e!==this.prevZoomLevel&&(t=!1),this.prevZoomLevel=e,this.gridState.zoomLevel=e,function(t,e,n){if(t.zoomLevel<t.minZoomLevel)t.viewportTiles=[];else{var i=(0,b.uZ)(t.zoomLevel,t.minZoomLevel,t.maxZoomLevel),r=(0,b.uZ)(t.zoomLevel,t.minDetailLevel,t.maxDetailLevel);t.viewportTiles=(0,Q.b5)(e,i,r).map(Q.gx);for(var o=0;o<t.viewportTiles.length;o++){var a=t.viewportTiles[o],s=t.tiles[a];s||(s=t.tiles[a]=n((0,Q.cL)(a)))}}}(this.gridState,this.mapState.tilesBounds,Zl),this.emit("tilesSetChanged",{tileIds:this.gridState.viewportTiles})}for(var n in this.gridState.tiles)this.gridState.viewportTiles.includes(n)?this.gridState.tiles[n].status===_s.z3.Initial&&(this.gridState.tiles[n].needFetch=!0,this.gridState.tiles[n].status=_s.z3.Loading):this.gridState.tiles[n].status===_s.z3.Loading&&(this.gridState.tiles[n].needAbortFetch=!0);t&&(this.fetch(function(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needFetch&&(i.needFetch=!1,e.push(i))}return e}(this.gridState)),this.abortFetch(function(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needAbortFetch&&(i.needAbortFetch=!1,e.push(i))}return e}(this.gridState)),this.clearTiles(function(t,e){var n=new Set(t.viewportTiles),i=[];for(var r in t.tiles){var o=t.tiles[r],a=!e||e(o);!n.has(r)&&a&&i.push(o)}return i}(this.gridState)))},e.prototype.fetch=function(t){var e=this;t.sort((function(t,n){return(0,Q.qu)(e.mapState.center,t,n)})).forEach((function(t){return e.fetchTile(t)}))},e.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){e.dataTileLoader.abortRequest(t.key)}))},e.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];delete this.gridState.tiles[i.key],this.emit("dataTileCleared",{tileId:i.key})}},e.prototype.fetchTile=function(t){var e=this,n=this.config.tsURLTemplate;this.dataTileLoader.fetch(t.coords,n).then((function(n){e.emit("dataTileLoaded",{tileId:t.key,data:n})}))},e}(B.c)},1859:function(t,e,n){"use strict";n.d(e,{V:function(){return c}});var i=n(9450),r=n(127),o=n(1026),a=n(372),s=n(3308),l=[0,0,1],c=function(){function t(t){this.state=t,this.position=[0,0,0],this.projectionMatrix=[],this.viewMatrix=[],this.viewProjectionMatrix=[],this.viewProjectionMatrixInverse=[],this.update()}return t.prototype.setState=function(t){this.state=t,this.update()},t.prototype.update=function(){this.updatePosition(),this.updateProjectionMatrix(),this.updateViewMatrix(),r.Jp(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),r.U_(this.viewProjectionMatrixInverse,this.viewProjectionMatrix)},t.prototype.putProject=function(t,e){var n=this.state,i=n.size,r=n.viewport,o=this.viewProjectionMatrix,a=e[0],s=e[1],l=e[2],c=i[0]/2,u=i[1]/2,d=o[3]*a+o[7]*s+o[11]*l+o[15];t[0]=c+r.left+(o[0]*a+o[4]*s+o[12])*c/d,t[1]=u+r.top-(o[1]*a+o[5]*s+o[9]*l+o[13])*u/d},t.prototype.project=function(t){var e=[0,0,0];return this.putProject(e,t),e},t.prototype.unproject=function(t){var e=this.state,n=e.size,r=e.viewport,o=[(t[0]-r.left)/n[0]*2-1,-(t[1]-r.top)/n[1]*2+1,0];if(i.fF(o,o,this.viewProjectionMatrixInverse),o[0]-=this.position[0],o[1]-=this.position[1],o[2]-=this.position[2],i.Fv(o,o),0!==o[2]){var a=-this.position[2]/o[2];a>=0?(o[0]=this.position[0]+o[0]*a,o[1]=this.position[1]+o[1]*a,o[2]=this.position[2]+o[2]*a):o[0]=o[1]=o[2]=0}else o[0]=o[1]=o[2]=0;return o},t.prototype.getViewportVertices=function(){var t=this.state,e=t.size,n=t.viewport;return[this.unproject([n.left,e[1]+n.top]),this.unproject([e[0]+n.left,e[1]+n.top]),this.unproject([e[0]+n.left,n.top]),this.unproject([n.left,n.top])]},t.prototype.updatePosition=function(){var t=this.state,e=t.center,n=t.rotation,i=t.zoom,r=t.pitch,o=t.size,a=(0,s.r9)(i,o),l=Math.max(a*Math.sin(r),1);this.position[0]=e[0]+Math.sin(n)*l,this.position[1]=e[1]-Math.cos(n)*l,this.position[2]=a*Math.cos(r)},t.prototype.updateViewMatrix=function(){r.zB(this.viewMatrix,this.position,this.state.center,l)},t.prototype.updateProjectionMatrix=function(){var t=o.camera.fov,e=o.camera.near,n=o.camera.far,i=this.correctViewAndSize(),r=i.size,s=i.view,l=r[0]/r[1],c=e*Math.tan((0,a.Id)(t)/2),u=2*c,d=l*u,h=-d/2;s&&(h+=s.x*d/r[0],c-=s.y*u/r[1],d*=s.width/r[0],u*=s.height/r[1]);var f=h+d,p=c-u,m=this.projectionMatrix;m[0]=2*e/(f-h),m[5]=2*e/(c-p),m[8]=(f+h)/(f-h),m[9]=(c+p)/(c-p),m[10]=-(n+e)/(n-e),m[11]=-1,m[14]=-2*n*e/(n-e),m[1]=m[2]=m[3]=m[4]=m[6]=m[7]=m[12]=m[13]=m[15]=0},t.prototype.correctViewAndSize=function(){var t=this.state,e=t.size,n=t.pitch,i=t.padding,r=Math.max(0,i.top-i.bottom)*Math.tan(n),o=(0,s.pc)(e[1])+r,a={x:(i.right-i.left)/2,y:(i.bottom-i.top)/2,width:e[0],height:e[1]};return a.y+=(o-e[1])/2,{view:a,size:[e[0],o]}},t}()},6006:function(t,e,n){"use strict";n.d(e,{n:function(){return r}});var i=n(655),r=function(){function t(t,e,n){this.id=t,this.modules=e,this.options=n,this.type="geojson",this.worker=new this.modules.workers.parser.GeoJsonSource(this.options,this.id),this.attributes=n.attributes||{}}return t.prototype.fetchTile=function(t){return this.worker.fetchTile(t).then((function(){return[{regionId:0,metatileHash:-2}]}))},t.prototype.generateTile=function(t,e,n,i,r){return this.worker.generateTile(t,e,n,i,r)},t.prototype.getObjectAttributes=function(t,e){return(0,i.mG)(this,void 0,void 0,(function(){return(0,i.Jh)(this,(function(n){return[2,this.worker.getObjectAttributes(t,e)]}))}))},t.prototype.abortTileFetch=function(t){this.worker.abortTileFetch(t)},t.prototype.deleteTile=function(t){this.worker.deleteTile(t)},t.prototype.setAttributes=function(t){this.worker.setSourceAttrs(t),this.attributes=t},t.prototype.getAttributes=function(){return this.attributes},t.prototype.destroy=function(){this.worker.destroy()},t.prototype.setData=function(t){return(0,i.mG)(this,void 0,void 0,(function(){return(0,i.Jh)(this,(function(e){switch(e.label){case 0:return this.options=this.options="string"==typeof t?(0,i.pi)((0,i.pi)({},this.options),{url:t}):(0,i.pi)((0,i.pi)({},this.options),{data:t}),[4,this.worker.setData(t)];case 1:return[2,e.sent()]}}))}))},t}()},4424:function(t,e,n){"use strict";n.d(e,{Y0:function(){return o},Sj:function(){return a},fZ:function(){return l},X4:function(){return c}});var i=n(5109),r={point:{point:!0,heatmap:!0},polygon:{polygon:!0,polygonExtrusion:!0},line:{line:!0,lineExtrusion:!0,labelLine:!0,dashedLine:!0,oneWayLine:!0}};function o(t,e){return!!r[t][e]}function a(t){for(var e=t.vertices[0],n=t.vertices[1],i=0,r=0;r<e.length-1;r++)i+=Math.hypot(e[r]-e[r+1],n[r]-n[r+1]);return i}function s(t,e){var n=new Set(e[0].map((function(n,i){return e[0][i]===t[0]&&t[1]===e[1][i]?i:-1})));return Array.from(n)}function l(t,e){var n=s([t[0][0],t[1][0]],e),i=s([t[0][1],t[1][1]],e),r=s([t[0][2],t[1][2]],e);n.forEach((function(e){return i.forEach((function(n){return r.forEach((function(i){!function(t,e,n,i){e>=0&&n>=0&&1===Math.abs(e-n)&&(t[2][0]=1),n>=0&&i>=0&&1===Math.abs(n-i)&&(t[2][1]=1),e>=0&&i>=0&&1===Math.abs(e-i)&&(t[2][2]=1)}(t,e,n,i)}))}))}))}function c(){return(0,i.KP)(["id","db_label","db_label2","selected","hovered","componentDistanceStart","objectLength","beginningIsCut","endingIsCut"],["Commercial_poi_default","Commercial_poi_city"])}},5850:function(t,e,n){"use strict";n.d(e,{f7:function(){return l},Jb:function(){return c},rR:function(){return u},gs:function(){return f},Xm:function(){return p}});var i=n(655),r=n(558),o=n(6006),a=n(1026),s=n(5424),l=15,c=256,u=17,d=function(){function t(t,e,n){var i,c;this.type="geojson",this.id=(0,s.Q)(),this.modules=t.modules,this.mapglApiSource=n,this.sourceCore=new o.n(this.id,this.modules,e);var d=null!==(i=e.minZoom)&&void 0!==i?i:a.MAP_DEFAULTS.minZoom,h=Math.min(null!==(c=e.maxZoom)&&void 0!==c?c:l,u);this.layer=new r.I(d,h,d,u,this.modules,t.state,this.sourceCore),this.modules.tileManager.addTileLayer(this.layer)}return t.prototype.destroy=function(){this.modules.tileManager.removeTileLayer(this.layer),this.layer.destroy(),this.modules.sourceStorage.removeSource(this.getId()),this.sourceCore.destroy()},t.prototype.setAttributes=function(t){this.sourceCore.setAttributes(t),this.layer.redraw()},t.prototype.getAttributes=function(){return this.sourceCore.getAttributes()},t.prototype.getId=function(){return this.sourceCore.id},t}(),h={type:"FeatureCollection",features:[]},f=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.subtype="internal",r.data=n.data,r.modules.sourceStorage.addSource(r),r}return(0,i.ZT)(e,t),e.prototype.getFeatureById=function(t){return"FeatureCollection"===this.data.type?this.data.features[t.lo]:this.data},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.data=h},e.prototype.setData=function(t){return(0,i.mG)(this,void 0,void 0,(function(){return(0,i.Jh)(this,(function(e){switch(e.label){case 0:return[4,this.sourceCore.setData(t)];case 1:return e.sent()&&(this.data=t,this.layer.onSourceDataChange(),this.modules.identifier.resetCache()),[2]}}))}))},e}(d),p=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.subtype="external",r.modules.sourceStorage.addSource(r),r}return(0,i.ZT)(e,t),e.prototype.getObjectAttributes=function(t,e){return this.sourceCore.getObjectAttributes(t,e)},e.prototype.setDataUrl=function(t){return(0,i.mG)(this,void 0,void 0,(function(){return(0,i.Jh)(this,(function(e){switch(e.label){case 0:return[4,this.sourceCore.setData(t)];case 1:return e.sent()&&(this.layer.onSourceDataChange(),this.modules.identifier.resetCache()),[2]}}))}))},e}(d)},47:function(t,e,n){"use strict";n.d(e,{T:function(){return vt}});var i=n(655),r=n(8131),o=n(5951),a=n(3526),s=n(5109),l=n(5630),c=n(4590),u=n(4424),d=n(5850);function h(t,e,n,i){for(var r,o=i,a=n-e>>1,s=n-e,l=t[e],c=t[e+1],u=t[n],d=t[n+1],p=e+3;p<n;p+=3){var m=f(t[p],t[p+1],l,c,u,d);if(m>o)r=p,o=m;else if(m===o){var v=Math.abs(p-a);v<s&&(r=p,s=v)}}o>i&&(r-e>3&&h(t,e,r,i),t[r+2]=o,n-r>3&&h(t,r,n,i))}function f(t,e,n,i,r,o){var a=r-n,s=o-i;if(0!==a||0!==s){var l=((t-n)*a+(e-i)*s)/(a*a+s*s);l>1?(n=r,i=o):l>0&&(n+=a*l,i+=s*l)}return(a=t-n)*a+(s=e-i)*s}function p(t,e,n,i,r){var o={id:null==t?null:t,index:r,type:e,geometry:n,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===e||"MultiPoint"===e||"LineString"===e)m(o,n);else if("Polygon"===e)m(o,n[0]);else if("MultiLineString"===e)for(var a=0,s=n;a<s.length;a++)m(o,s[a]);else if("MultiPolygon"===e)for(var l=0,c=n;l<c.length;l++)m(o,c[l][0]);return o}function m(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function v(t,e,n,i){if(e.geometry){var r=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],l=e.id;if(n.promoteId?l=e.properties[n.promoteId]:n.generateId&&(l=i||0),"Point"===o)_(r,s);else if("MultiPoint"===o)for(var c=0,u=r;c<u.length;c++)_(u[c],s);else if("LineString"===o)y(r,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(var d=0,h=r;d<h.length;d++)y(h[d],s=[],a,!1),t.push(p(l,"LineString",s,e.properties,i));return}g(r,s,a,!1)}else if("Polygon"===o)g(r,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(var f=0,m=e.geometry.geometries;f<m.length;f++)v(t,{id:l,geometry:m[f],properties:e.properties},n,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(var b=0,w=r;b<w.length;b++){var x=[];g(w[b],x,a,!0),s.push(x)}}t.push(p(l,o,s,e.properties,i))}}function _(t,e){e.push(b(t[0]),w(t[1]),0)}function y(t,e,n,i){for(var r,o,a=0,s=0;s<t.length;s++){var l=b(t[s][0]),c=w(t[s][1]);e.push(l,c,0),s>0&&(a+=i?(r*c-l*o)/2:Math.sqrt(Math.pow(l-r,2)+Math.pow(c-o,2))),r=l,o=c}var u=e.length-3;e[2]=1,h(e,0,u,n),e[u+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function g(t,e,n,i){for(var r=0;r<t.length;r++){var o=[];y(t[r],o,n,i),e.push(o)}}function b(t){return t/360+.5}function w(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function x(t,e,n,i,r,o,a,s){if(i/=e,o>=(n/=e)&&a<i)return t;if(a<n||o>=i)return null;for(var l=[],c=0,u=t;c<u.length;c++){var d=u[c],h=d.geometry,f=d.type,m=0===r?d.minX:d.minY,v=0===r?d.maxX:d.maxY;if(m>=n&&v<i)l.push(d);else if(!(v<n||m>=i)){var _=[];if("Point"===f||"MultiPoint"===f)S(h,_,n,i,r);else if("LineString"===f)I(h,_,n,i,r,!1,s.lineMetrics);else if("MultiLineString"===f)P(h,_,n,i,r,!1);else if("Polygon"===f)P(h,_,n,i,r,!0);else if("MultiPolygon"===f)for(var y=0,g=h;y<g.length;y++){var b=[];P(g[y],b,n,i,r,!0),b.length&&_.push(b)}if(_.length){if(s.lineMetrics&&"LineString"===f){for(var w=0,x=_;w<x.length;w++){var M=x[w];l.push(p(d.id,f,M,d.tags,d.index))}continue}"LineString"!==f&&"MultiLineString"!==f||(1===_.length?(f="LineString",_=_[0]):f="MultiLineString"),"Point"!==f&&"MultiPoint"!==f||(f=3===_.length?"Point":"MultiPoint"),l.push(p(d.id,f,_,d.tags,d.index))}}}return l.length?l:null}function S(t,e,n,i,r){for(var o=0;o<t.length;o+=3){var a=t[o+r];a>=n&&a<=i&&T(e,t[o],t[o+1],t[o+2])}}function I(t,e,n,i,r,o,a){for(var s,l,c=M(t),u=0===r?L:E,d=t.start,h=0;h<t.length-3;h+=3){var f=t[h],p=t[h+1],m=t[h+2],v=t[h+3],_=t[h+4],y=0===r?f:p,g=0===r?v:_,b=!1;a&&(s=Math.sqrt(Math.pow(f-v,2)+Math.pow(p-_,2))),y<n?g>n&&(l=u(c,f,p,v,_,n),a&&(c.start=d+s*l)):y>i?g<i&&(l=u(c,f,p,v,_,i),a&&(c.start=d+s*l)):T(c,f,p,m),g<n&&y>=n&&(l=u(c,f,p,v,_,n),b=!0),g>i&&y<=i&&(l=u(c,f,p,v,_,i),b=!0),!o&&b&&(a&&(c.end=d+s*l),e.push(c),c=M(t)),a&&(d+=s)}var w=t.length-3,x=t[w],S=t[w+1],I=t[w+2],P=0===r?x:S;P>=n&&P<=i&&T(c,x,S,I),w=c.length-3,o&&w>=3&&(c[w]!==c[0]||c[w+1]!==c[1])&&T(c,c[0],c[1],c[2]),c.length&&e.push(c)}function M(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function P(t,e,n,i,r,o){for(var a=0,s=t;a<s.length;a++)I(s[a],e,n,i,r,o,!1)}function T(t,e,n,i){t.push(e,n,i)}function L(t,e,n,i,r,o){var a=(o-e)/(i-e);return T(t,o,n+(r-n)*a,1),a}function E(t,e,n,i,r,o){var a=(o-n)/(r-n);return T(t,e+(i-e)*a,o,1),a}function k(t,e){for(var n=[],i=0;i<t.length;i++){var r=t[i],o=r.type,a=void 0;if("Point"===o||"MultiPoint"===o||"LineString"===o)a=z(r.geometry,e);else if("MultiLineString"===o||"Polygon"===o){a=[];for(var s=0,l=r.geometry;s<l.length;s++){var c=l[s];a.push(z(c,e))}}else if("MultiPolygon"===o){a=[];for(var u=0,d=r.geometry;u<d.length;u++){for(var h=[],f=0,m=d[u];f<m.length;f++){var v=m[f];h.push(z(v,e))}a.push(h)}}n.push(p(r.id,o,a,r.tags,r.index))}return n}function z(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var i=0;i<t.length;i+=3)n.push(t[i]+e,t[i+1],t[i+2]);return n}function C(t,e){if(t.transformed)return t;for(var n=1<<t.z,i=t.x,r=t.y,o=0,a=t.features;o<a.length;o++){var s=a[o],l=s.geometry,c=s.type;if(s.geometry=[],1===c)for(var u=0;u<l.length;u+=2)s.geometry.push(D(l[u],l[u+1],e,n,i,r));else if(2===c)s.geometry=A(l,e,n,i,r);else for(var d=0;d<l.length;d++)s.geometry.push(A(l[d],e,n,i,r))}return t.transformed=!0,t}function A(t,e,n,i,r){for(var o=[],a=0;a<t.length;a++){for(var s=[],l=0;l<t[a].length;l+=2)s.push(D(t[a][l],t[a][l+1],e,n,i,r));o.push(s)}return o}function D(t,e,n,i,r,o){return[Math.round(n*(t*i-r)),Math.round(n*(e*i-o))]}function F(t,e,n,i,r){for(var o=e===r.maxZoom?0:r.tolerance/((1<<e)*r.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:t.length,source:null,x:n,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0,l=t;s<l.length;s++)R(a,l[s],o,r);return a}function R(t,e,n,i){var r=e.geometry,o=e.type,a=[];if(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),"Point"===o||"MultiPoint"===o)for(var s=0;s<r.length;s+=3)a.push(r[s],r[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)O(a,r,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o){for(var l=0;l<r.length;l++)O(a,r[l],t,n,"Polygon"===o,0===l);"Polygon"===o&&a.length&&(a=[a])}else if("MultiPolygon"===o)for(var c=0;c<r.length;c++){for(var u=r[c],d=[],h=0;h<u.length;h++)O(d,u[h],t,n,!0,0===h);d.length&&a.push(d)}if(a.length){var f=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var p in f={},e.tags)f[p]=e.tags[p];f.mapbox_clip_start=r.start/r.size,f.mapbox_clip_end=r.end/r.size}var m={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:f};null!==e.id&&(m.id=e.id),i.generateIndex&&(m.index=e.index),t.features.push(m)}}function O(t,e,n,i,r,o){var a=i*i;if(i>0&&e.size<(r?a:i))n.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===i||e[l+2]>a)&&(n.numSimplified++,s.push(e[l],e[l+1])),n.numPoints++;r&&function(t,e){for(var n=0,i=0,r=t.length,o=r-2;i<r;o=i,i+=2)n+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(n>0===e)for(var a=0,s=t.length;a<s/2;a+=2){var l=t[a],c=t[a+1];t[a]=t[s-2-a],t[a+1]=t[s-1-a],t[s-2-a]=l,t[s-1-a]=c}}(s,o),t.push(s)}}var j=1,B=2,U=3,Z={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,generateIndex:!1,debug:0},N=function(){function t(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(Z),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)v(n,t.features[i],e,i);else"Feature"===t.type?v(n,t,e,0):v(n,{geometry:t},e,0);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),i=function(t,e){var n=e.buffer/e.extent,i=t,r=x(t,1,-1-n,n,0,-1,2,e),o=x(t,1,1-n,2+n,0,-1,2,e);return(r||o)&&(i=x(t,1,-n,1+n,0,-1,2,e)||[],r&&(i=k(r,1).concat(i)),o&&(i=i.concat(k(o,-1)))),i}(i,e),i.length&&this.splitTile(i,0,0,0),n&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}return t.prototype.splitTile=function(t,e,n,i,r,o,a){for(var s=[t,e,n,i],l=this.options,c=l.debug;s.length;){i=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var u=1<<e,d=H(e,n,i),h=this.tiles[d];if(!h&&(c>1&&console.time("creation"),h=this.tiles[d]=F(t,e,n,i,l),this.tileCoords.push({z:e,x:n,y:i}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,i,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,null==r){if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===r)continue;if(null!=r){var p=r-e;if(n!==o>>p||i!==a>>p)continue}}if(h.source=null,0!==t.length){c>1&&console.time("clipping");var m=.5*l.buffer/l.extent,v=.5-m,_=.5+m,y=1+m,g=null,b=null,w=null,S=null,I=x(t,u,n-m,n+_,0,h.minX,h.maxX,l),M=x(t,u,n+v,n+y,0,h.minX,h.maxX,l);t=null,I&&(g=x(I,u,i-m,i+_,1,h.minY,h.maxY,l),b=x(I,u,i+v,i+y,1,h.minY,h.maxY,l),I=null),M&&(w=x(M,u,i-m,i+_,1,h.minY,h.maxY,l),S=x(M,u,i+v,i+y,1,h.minY,h.maxY,l),M=null),c>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*n,2*i),s.push(b||[],e+1,2*n,2*i+1),s.push(w||[],e+1,2*n+1,2*i),s.push(S||[],e+1,2*n+1,2*i+1)}}},t.prototype.getTile=function(t,e,n){t=+t,e=+e,n=+n;var i=this.options,r=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=H(t,e=e+a&a-1,n);if(this.tiles[s])return C(this.tiles[s],r);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var l,c=t,u=e,d=n;!l&&c>0;)c--,u>>=1,d>>=1,l=this.tiles[H(c,u,d)];return l&&l.source?(o>1&&(console.log("found parent tile z%d-%d-%d",c,u,d),console.time("drilling down")),this.splitTile(l.source,c,u,d,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?C(this.tiles[s],r):null):null},t}();function H(t,e,n){return 32*((1<<t)*n+e)+t}var G=n(9450),V=n(9187),W=n(242),q=n(372);function X(t,e){var n=[];return t.geometry.forEach((function(i){var r=[],o=[],a=[];i.forEach((function(t){a.push.apply(a,function(t,e){for(var n=[],i=[],r=0;r<t.length;r++){var o=t[r];if(i.push(Q(o,e)),$(o,e)){var a=t[r+1];if(!a)break;tt(o,a,e)&&(i.length>1&&n.push(i),i=[])}}return i.length>1&&n.push(i),n}(t,e)),r.length&&o.push(r.length),r.push.apply(r,t)}));for(var s=[],l=0;l<r.length;l++)s.push(r[l][0]),s.push(r[l][1]);var c=V(s,o),d=G.Ue(),h=function(i){for(var o=[[],[],[]],s=0;s<3;s++)J(d,r[c[i+2-s]],e),o[0][s]=d[0],o[1][s]=d[1],o[2][s]=0;a.forEach((function(t){var e=[[],[],[]];t.forEach((function(t,n){e[0][n]=t[0],e[1][n]=t[1]})),(0,u.fZ)(o,e)})),n.push({tags:t.tags,id:t.id,index:t.index,type:"polygon",vertices:o})};for(l=0;l<c.length;l+=3)h(l)})),n}function Y(t,e){var n=G.Ue();return t.geometry.map((function(i){var r=[[],[]];return i.forEach((function(t,i){J(n,t,e),r[0][i]=n[0],r[1][i]=n[1]})),{tags:t.tags,id:t.id,index:t.index,type:"line",vertices:r}}))}function K(t,e){var n=G.Ue();return t.geometry.map((function(i){return J(n,i,e),{tags:t.tags,id:t.id,index:t.index,type:"point",vertices:[[n[0]],[n[1]]]}}))}function J(t,e,n){var i=Q(e,n);t[0]=i[0],t[1]=i[1],t[2]=e[2]}function Q(t,e){return[(0,q.uZ)(t[0]/e*W.Bq,0,W.Bq),(0,q.uZ)((e-t[1])/e*W.Bq,0,W.Bq)]}function $(t,e){return t[0]<0||t[0]>e||t[1]<0||t[1]>e}function tt(t,e,n){return t[0]>n&&e[0]>n||t[0]<0&&e[0]<0||t[1]>n&&e[1]>n||t[1]<0&&e[1]<0}var et=4096,nt={maxZoom:d.f7,tolerance:3,extent:et,buffer:1,debug:0,lineMetrics:!1,promoteId:null,generateId:!1,generateIndex:!0,indexMaxZoom:0,indexMaxPoints:1e5},it=function(){function t(t){this.options=t}return t.prototype.fetchTile=function(t){var e=(0,a._W)(t),n=e[0],i=e[1],r=e[2],o={components:[]},s=this.geoJsonVtInstance.getTile(r,n,i);if(!s)return Promise.resolve(o);for(var l=0,c=s.features;l<c.length;l++){var u=c[l];switch(u.type){case j:o.components=o.components.concat(K(u,et));break;case B:o.components=o.components.concat(Y(u,et));break;case U:o.components=o.components.concat(X(u,et));break;default:console.warn("unsupported type ",s)}}return Promise.resolve(o)},t.prototype.destroy=function(){this.geoJsonVT=void 0},Object.defineProperty(t.prototype,"geoJsonVtInstance",{get:function(){var t,e,n;return this.geoJsonVT||(this.geoJsonVT=(e=this.options.data,n=(0,i.pi)((0,i.pi)({},nt),{maxZoom:null!==(t=this.options.maxZoom)&&void 0!==t?t:nt.maxZoom}),new N(e,n))),this.geoJsonVT},enumerable:!1,configurable:!0}),t}(),rt=n(3308);function ot(t,e){switch(t.type){case"Point":e(t.coordinates);break;case"LineString":case"MultiPoint":t.coordinates.forEach(e);break;case"Polygon":case"MultiLineString":t.coordinates.forEach((function(t){return t.forEach(e)}));break;case"MultiPolygon":t.coordinates.forEach((function(t){return t.forEach((function(t){return t.forEach(e)}))}))}}function at(t,e){var n={components:[]};return t.features.forEach((function(t,r){var o;(o=n.components).push.apply(o,st(t.geometry,e).map((function(e){return(0,i.pi)((0,i.pi)({},e),{index:r,id:t.id,tags:t.properties||{}})})))})),n}function st(t,e){switch(t.type){case"GeometryCollection":var n=[];return t.geometries.forEach((function(t){n=n.concat(st(t,e))})),n;case"Point":case"MultiPoint":return function(t,e){return"Point"===t.type?[lt(t.coordinates,e)]:t.coordinates.map((function(t){return lt(t,e)}))}(t,e);case"LineString":case"MultiLineString":return function(t,e){return"LineString"===t.type?[ct(t.coordinates,e)]:t.coordinates.map((function(t){return ct(t,e)}))}(t,e);case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?ut(t.coordinates,e):t.coordinates.reduce((function(t,n){return t.concat(ut(n,e))}),[])}(t,e)}}function lt(t,e){var n=[0,0,0];return(0,a.a2)(n,(0,rt.yq)(t),e),{type:"point",vertices:[[n[0]],[n[1]]]}}function ct(t,e){var n=[[],[]],i=[0,0,0];return t.forEach((function(t,r){(0,a.a2)(i,(0,rt.yq)(t),e),n[0][r]=i[0],n[1][r]=i[1]})),{type:"line",vertices:n}}function ut(t,e){var n=[],i=[],r=[],o=[],s=[];t.forEach((function(t){var n=t.map((function(t){return(0,a.a2)(s,(0,rt.yq)(t),e),[Math.max(Math.min(s[0],65535),0),Math.max(Math.min(s[1],65535),0)]}));o.push(n),i.length&&r.push(i.length),i.push.apply(i,n)}));for(var l=[],c=0;c<i.length;c++)l.push(i[c][0]),l.push(i[c][1]);var d=V(l,r),h=function(t){for(var e=[[],[],[]],r=0;r<3;r++)e[0][r]=i[d[t+r]][0],e[1][r]=i[d[t+r]][1],e[2][r]=0;o.forEach((function(t){var n=[[],[],[]];t.forEach((function(t,e){n[0][e]=t[0],n[1][e]=t[1]})),(0,u.fZ)(e,n)})),n.push({type:"polygon",vertices:e})};for(c=0;c<d.length;c+=3)h(c);return n}var dt=n(5452),ht=n(9170),ft=n(1026),pt=function(){function t(t){var e=this;this.tileLoader=new dt.U("json"),this.options=t,this.url=function(t){var n=e.options.flipY?t:(0,a._W)(t),i=n[0],r=n[1],o=n[2];return(0,ht.IG)(e.options.url,{x:i.toString(),y:r.toString(),z:o.toString(),subdomain:ft.tiles.subdomains[Math.abs(i+r)%ft.tiles.subdomains.length]})}}return t.prototype.fetchTile=function(t){var e=this;return this.tileLoader.fetch(t,this.url).then((function(n){if(!n)return{components:[]};if(e.options.hillshadeEncoded){var i=(0,a._W)(t),r=i[0],o=i[1],s=i[2],l=0,c=0;u=function(t){var e,n;l-=t[0],c-=t[1],t[0]=(e=r+l/d.Jb,n=s,e/Math.pow(2,n)*360-180),t[1]=function(t,e){var n=Math.PI-2*Math.PI*t/Math.pow(2,e);return 180/Math.PI*Math.atan(.5*(Math.exp(n)-Math.exp(-n)))}(o+c/d.Jb,s)},n.features.forEach((function(t){"GeometryCollection"===t.geometry.type?t.geometry.geometries.forEach((function(t){return ot(t,u)})):ot(t.geometry,u)}))}var u;return at(n,(0,a.Bs)(t))}))},t.prototype.abortTile=function(t){this.tileLoader.abortRequest((0,a.gx)(t))},t.prototype.destroy=function(){this.tileLoader.destroy()},t}(),mt=n(7624),vt=function(){function t(t,e,n){this.scope=t,this.options=e,this.id=n,t.sources[n]=this,this.tileData={},this.styleManager=t.styleManager,this.collector=t.collector,this.sourceAttrs=this.options.attributes||{},this.metatile=(0,u.X4)(),this.tileServer="url"in e?new pt(e):new it(e)}return t.prototype.fetchTile=function(t){var e=this,n=(0,a.gx)(t);return this.tileData[n]?Promise.resolve(this.tileData[n]):this.tileServer.fetchTile(t).then((function(t){return e.tileData[n]=t,t}))},t.prototype.abortTileFetch=function(t){this.tileServer instanceof pt&&this.tileServer.abortTile(t)},t.prototype.generateTile=function(t,e,n,i,d){var h=this,f=(0,a.gx)(e),p=this.tileData[f],m=(0,a.Bs)(e),v=[],_=[],y=this.styleManager.getStyle(n),g=new c.c,b=new c.c(i);if(!y)return Promise.resolve({results:v,transferable:_});p&&p.components.forEach((function(e){var n=h.metatile.tileProps,i=[],a=Object.keys(e.tags);(0,s.Qy)(h.metatile,a);for(var f=0,p=a;f<p.length;f++)i[n[x=p[f]]]=e.tags[x];var v=Object.keys(h.sourceAttrs);(0,s.Qy)(h.metatile,v);for(var _=0,w=v;_<w.length;_++){var x;i[n[x=w[_]]]=h.sourceAttrs[x]}var S="url"in h.options&&h.options.preventInteractions?NaN:(0,r.Ru)(e.index,h.id);if("number"!=typeof S){var I=b.has(S);i[n.selected]=I?1:0,g.add(S)}var M=m.coords,P=M[3],T=(0,l.o1)(d),L=(0,mt.OW)(h.metatile,t.styleState,h.sourceAttrs,n,i),E=h.styleManager.getLayers(y.id,n,i).filter((function(t){return(0,u.Y0)(e.type,t.type)})).filter((function(t){return(0,mt.FR)(t.filter,L)}));i[n.id]=S,h.options.identifyAsDefaultSource&&(i[n.id]=(0,r.IL)(i[n.db_id])),"point"!==e.type&&"line"!==e.type||(void 0===i[n.db_label]&&(i[n.db_label]=NaN),void 0===i[n.db_label2]&&(i[n.db_label2]=NaN)),"line"===e.type&&(i[n.componentDistanceStart]=0,i[n.objectLength]=(0,u.Sj)(e),i[n.beginningIsCut]=0,i[n.endingIsCut]=0),(0,o.PA)(h.collector,y,E,P,h.metatile,n,i,h.id,h.sourceAttrs,t.styleState,M,T,e.vertices,new c.c)})),this.collector.setGeoIds(new Uint32Array(g.toFlatArray()));var w=this.collector.getAccumulatedData();return v.push({regionId:0,metatileHash:W.L2,collectorOutput:w,styleId:y.id}),_.push.apply(_,w.transferable),this.scope.debouncedResetCollector(),this.scope.syncNewRasterSets(),Promise.resolve({results:v,transferable:_})},t.prototype.getObjectAttributes=function(t,e){var n=this.tileData[e];if(n){var i=n.components.find((function(e){return e.index===t}));if(i)return i.tags}},t.prototype.deleteTile=function(t){delete this.tileData[(0,a.gx)(t)]},t.prototype.setSourceAttrs=function(t){this.sourceAttrs=t},t.prototype.destroy=function(){delete this.scope.sources[this.id],this.tileData={},this.sourceAttrs={},this.tileServer.destroy()},t.prototype.setData=function(t){if("string"==typeof t){if(this.tileServer instanceof pt)return this.tileServer.destroy(),this.options=(0,i.pi)((0,i.pi)({},this.options),{url:t}),this.tileServer=new pt(this.options),this.tileData={},Promise.resolve(!0)}else if(this.tileServer instanceof it)return this.tileServer.destroy(),this.options=(0,i.pi)((0,i.pi)({},this.options),{data:t}),this.tileServer=new it(this.options),this.tileData={},Promise.resolve(!0);return Promise.resolve(!1)},t}()},5424:function(t,e,n){"use strict";n.d(e,{Q:function(){return r}});var i=1;function r(){return i++}},3062:function(t,e,n){"use strict";n.d(e,{dx:function(){return a},qS:function(){return l},lG:function(){return u},nt:function(){return d}});var i=n(655),r=n(3526),o={db_id:"id",tech_db_beginning_is_cut:"beginningIsCut",tech_db_ending_is_cut:"endingIsCut",tech_db_previous_point_x:"previousPointX",tech_db_previous_point_y:"previousPointY",tech_db_next_point_x:"nextPointX",tech_db_next_point_y:"nextPointY",tech_db_object_length:"objectLength",tech_db_component_distance_start:"componentDistanceStart",tech_db_component_distance_end:"componentDistanceEnd"},a=function(t){var e;return null!==(e=o[t])&&void 0!==e?e:t},s={objectClass:"db_object_class",sublayer:"db_sublayer"};function l(t){var e;return null!==(e=s[t])&&void 0!==e?e:t}var c={Class:"db_class",DisputePosition:"db_dispute_position",ObjectClass:"db_object_class",ParkingType:"db_parking_type",Sublayer:"db_sublayer",Subsublayer:"db_subsublayer"},u=function(t){var e,n,i;t.enumerationValues?t.enumerationValues=Object.keys(t.enumerationValues).reduce((function(e,n){return e[function(t){var e;return null!==(e=c[t])&&void 0!==e?e:t}(n)]=t.enumerationValues[n],e}),{}):t.enumerationValues={db_class:null!==(e=t.classes)&&void 0!==e?e:{},db_object_class:null!==(n=t.objectClasses)&&void 0!==n?n:{},db_sublayer:null!==(i=t.sublayers)&&void 0!==i?i:{}}},d=function(){function t(t,e,n){this.id=t,this.modules=e,this.options=n,this.type="terrain",this.sourceAttrs={}}return t.prototype.fetchTile=function(t,e){var n=this.modules,i=n.assetManager,o=n.map;return n.workers.parser.fetchTile({coords:t,tileServer:this.options.tileServer,tileSet:this.options.tileSet,tileProtocol:this.options.tileProtocol,subdomains:this.options.subdomains,tileKey:this.options.tileKey,appId:this.options.appId,lang:e.lang,defaultLang:this.options.defaultLang,sessionId:this.options.sessionId}).then((function(n){if(n){var a=n.metadata,s=n.invalidTileKey;return a.forEach((function(n){i.loadMetatile(n.metatileHash,n.regionId),o.emit("tileload",{tileCoords:t,regionId:n.regionId}),(0,r.FP)(n.regionId)&&e.shownRegionIds.add(n.regionId)})),s&&o.emit("invalidtilekey"),a}}))},t.prototype.generateTile=function(t,e,n,o,a,s){return void 0===s&&(s={}),this.modules.workers.parser.generateTile((0,i.pi)({styleId:n,tileInfo:(0,r.Bs)(e),pixelRatio:a,selectedIds:o,styleState:t.styleState,floorsEnabled:t.floorsEnabled,sourceId:this.id},s))},t.prototype.abortTileFetch=function(t){this.modules.workers.parser.abortTileRequest((0,r.gx)(t))},t.prototype.deleteTile=function(t){this.modules.workers.parser.deleteTile((0,r.gx)(t))},t.prototype.setAttributes=function(t){this.sourceAttrs=t},t.prototype.getAttributes=function(){return this.sourceAttrs},t.prototype.destroy=function(){},t}()},3131:function(t,e,n){"use strict";n.d(e,{T:function(){return i}});var i=[{id:"__2gis_comm_poi",type:"point",style:{textFont:["Noto_Sans_Semibold",["step",["zoom"],"Noto_Sans",16,"Noto_Sans"]],iconImage:"peak",iconWidth:["interpolate",["linear"],["zoom"],15,22,16.8,30],textColor:"#3A3A3A",visibility:"visible",textFontSize:[["interpolate",["linear"],["zoom"],15.5,11,18,13],["interpolate",["linear"],["zoom"],15.5,10,18,12]],textHaloColor:"rgba(255,255,255,0.5)",textHaloWidth:.9,iconLabelingGroup:n(7357).n3,iconLabelingMargin:{leftRight:6,topBottom:6}},filter:["all",["match",["get","db_sublayer"],["Commercial_poi_default","Commercial_poi_city"],!0,!1],["any",["==",["in",["get","db_building_id"],["global","_activeFloorBuildingIds"]],!1],["in",["get","db_plan_id"],["global","_activeFloorIds"]]]]}]},9508:function(t,e,n){"use strict";n.d(e,{h:function(){return u}});var i=n(655),r=n(8550);function o(t){return"boolean"!=typeof t&&"attrs"===t.type}function a(t){return"boolean"!=typeof t&&"unextractable"===t.type}function s(t){if(!(0,r.Uu)(t))return[Boolean(t)];var e=[],n=[];switch(t.type){case"all":for(var i=0,c=t.array.map(s);i<c.length;i++){for(var u=[],d=0,h=c[i];d<h.length;d++){var f=h[d];if(!1===f)return[!1];o(f)?u.push(f):a(f)&&n.push(f)}u.length>0&&(e=0===e.length?u:l(e,u))}break;case"match":if(!(0,r.Uu)(t.input)||"get"!==t.input.type&&"sourceAttr"!==t.input.type)return[{type:"unextractable",exp:t}];for(var p=t.input.property,m=t.defaultOutput,v=function(t){var i=s(t.output),r=[];t.values.forEach((function(t){var e;r.push({type:"attrs",attrs:(e={},e[p]=t,e)})}));for(var c=0,u=i;c<u.length;c++){var d=u[c];if(o(d))for(var h=0,f=l([d],r);h<f.length;h++){var v=f[h];e.push(v)}else if(a(d)){n.push(d);for(var _=0,y=r;_<y.length;_++){var g=y[_];e.push(g)}}else if(!0===d&&!m)for(var b=0,w=r;b<w.length;b++)g=w[b],e.push(g)}},_=0,y=t.cases;_<y.length;_++)v(y[_]);break;default:return[{type:"unextractable",exp:t}]}return e.concat(n)}function l(t,e){for(var n=[],r=0,o=t;r<o.length;r++)for(var a=o[r],s=0,l=e;s<l.length;s++){var c=l[s];n.push({type:"attrs",attrs:(0,i.pi)((0,i.pi)({},a.attrs),c.attrs)})}return n}var c=function(){function t(){this.layers=[],this.keyStat={},this.orderedKeys=[],this.tree=null,this.treeNodesCount=0,this.traverseCount=0,this.traverseIterations=0}return t.prototype.addLayers=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];"custom"!==i.type&&i.filter&&(this.layers.push(i),this.statLayerKeys(i))}this.buildTree()},t.prototype.getLayers=function(t,e){var n=this,i=[],r=function(o,a){if(n.traverseIterations+=1,o){for(var s=0,l=o.leafs;s<l.length;s++){var c=l[s];i.push(c)}var u=n.orderedKeys[a];if(u){var d=e[t[u]];void 0!==d?(r(o.children[d],a+1),r(o.novalue,a+1)):r(o.novalue,a+1)}}};return this.traverseCount+=1,r(this.tree,0),i},t.prototype.stat=function(){var t=this.traverseIterations/this.traverseCount||0;return{tree:this.tree,treeNodes:this.treeNodesCount,layers:this.layers.length,keyStat:this.keyStat,itersPerTraverse:t}},t.prototype.statLayerKeys=function(t){var e=s(t.filter).filter((function(t){return o(t)}))[0];if(e&&o(e))for(var n in e.attrs)void 0===this.keyStat[n]&&(this.keyStat[n]=0),this.keyStat[n]+=1},t.prototype.getOrderedKeys=function(){return Object.entries(this.keyStat).sort((function(t,e){t[0];var n=t[1];return e[0],e[1]-n})).map((function(t){var e=t[0];return t[1],e}))},t.prototype.buildTree=function(){this.orderedKeys=this.getOrderedKeys();for(var t=[],e=0,n=this.layers;e<n.length;e++){var i=n[e],r=s(i.filter).filter(o);0===r.length&&t.push(i);for(var a=0,l=r;a<l.length;a++)for(var c=l[a],u=new Set(Object.keys(c.attrs)),d=0,h=c.attrs,f=this.tree,p=0;p<=this.orderedKeys.length;p++){if(d===u.size){null==f||f.leafs.push(i);break}var m=this.orderedKeys[p],v=this.orderedKeys[p+1]||"";if(f||(f=this.makeTreeNode(m),null===this.tree&&(this.tree=f)),u.has(m)){var _=h[m];f.children[_]||(f.children[_]=this.makeTreeNode(v)),f=f.children[_],d+=1}else f.novalue||(f.novalue=this.makeTreeNode(v)),f=f.novalue}}t.length>0&&(this.tree||(this.tree=this.makeTreeNode("")),this.tree.leafs=t)},t.prototype.makeTreeNode=function(t){return this.treeNodesCount+=1,{key:t,children:{},novalue:null,leafs:[]}},t}(),u=function(){function t(){this.metaStyles=new Map,this.layerTrees=new Map}return t.prototype.proxySyncStyle=function(t){var e=new c;e.addLayers(t.layers),this.layerTrees.set(t.id,e),this.metaStyles.set(t.id,t)},t.prototype.getStyle=function(t){return this.metaStyles.get(t)},t.prototype.getLayers=function(t,e,n){var i=this.layerTrees.get(t);return i?i.getLayers(e,n):[]},t}()},7667:function(t,e,n){"use strict";n.d(e,{l:function(){return p}});var i=n(242),r=n(378),o=n(1992),a=n(43),s=n(2714),l=n(4178),c=n(7031),u=r.Ue(),d=r.Ue(),h={type:l.SP.Entrance,offsetMultiplier:18,cDist:0,oLen:0,px:[],py:[],count:0,localID:0};function f(t,e,n,i){return h.px=t[0],h.py=t[1],h.oLen=n/65536,h.count=e,h.localID=i,h}var p=(0,s.D)({symbol:"arrow",sinks:{stroke:{stride:36,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.segmentEnd=new Uint16Array(e,4),t.views.texExtender=new Uint16Array(e,8),t.views.arrowExtender=new Uint16Array(e,10),t.views.extender=new Int16Array(e,12),t.views.direction=new Int16Array(e,16),t.views.vertexDistance=new Float32Array(e,20),t.views.objectLength=new Float32Array(e,24),t.views.type=new Float32Array(e,28),t.views.localID=new Uint32Array(e,32)},packObjectAttributes:function(t,e,n,i,r,o){return(0,c.v$)([t,e,n>2?1:0],i,r,o)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],isLongArrow:t[2],tileData:t.slice(3)}}}},generate:function(t,e,n,i,r,o){var s=o[0],c=o[1],u=o[0].length,d=function(t,e,n){for(var i=0,r=1;r<n;r++){var o=t[r]-t[r-1],a=e[r]-e[r-1];i+=Math.sqrt(o*o+a*a)}return i}(s,c,u),h=t.getBucket(n.type,"stroke",p.sinks.stroke.packObjectAttributes(e,n.innerId,u,n.dataKeys,i,r),p.sinks.stroke.binder),v=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),_=f(o,u,d,v);(0,a.W)(o[0],o[1],u,l.CJ.Flat,l.kU.ObjectEnding,l.kU.ObjectEnding,0,0,0,0,_,h);var y=0;m(h,l.gD.StartBorder,s[0],c[0],s[1],c[1],0,0,y,d,v);for(var g=0;g<u-1;g++){if(0!==g){var b=s[g]-s[g-1],w=c[g]-c[g-1];y+=Math.sqrt(b*b+w*w)}m(h,l.gD.Arrow,s[g],c[g],s[g+1],c[g+1],-1,0,y,d,v)}}});function m(t,e,n,i,r,o,a,s,l,c,u){!function(t,e,n,i,r,o,a){var s=t.elements,l=t.indices,c=l.buffer,u=l.offset,d=s.offset;c[u]=d+e,c[u+1]=d+n,c[u+2]=d+i,c[u+3]=d+r,c[u+4]=d+o,c[u+5]=d+a,l.offset=u+6}(t,1,2,0,0,2,3),v(t,e,n,i,r,o,a,s,-1,-1,l,c,!0,u),v(t,e,n,i,r,o,a,s,1,-1,l,c,!1,u),v(t,e,n,i,r,o,a,s,1,1,l,c,!1,u),v(t,e,n,i,r,o,a,s,-1,1,l,c,!0,u)}function v(t,e,n,r,a,s,l,c,h,f,p,m,v,_){var y=t.elements,g=y.stride*y.offset>>1,b=g>>1;(0,o.uI)(u,n,r,a,s),(0,o.fN)(d,u),t.views.position[g]=n,t.views.position[g+1]=r,t.views.segmentEnd[g]=a,t.views.segmentEnd[g+1]=s,t.views.texExtender[g]=(0,o.am)(d[0]*f*(v?-1:1)*i.Gt,d[1]*f*(v?-1:1)*i.Gt),t.views.arrowExtender[g]=(0,o.am)(h*i.Gt,f*i.Gt);var w=h+l,x=f+c,S=u[0]*w+d[0]*x,I=u[1]*w+d[1]*x;t.views.extender[g]=Math.round(S*i.Gt*127),t.views.extender[g+1]=Math.round(I*i.Gt*127),t.views.direction[g]=Math.round(127*u[0]),t.views.direction[g+1]=Math.round(127*u[1]),t.views.vertexDistance[b]=p/65536,t.views.objectLength[b]=m/65536,t.views.type[b]=e,t.views.localID[b]=_,t.elements.offset++}},5869:function(t,e,n){"use strict";n.d(e,{p:function(){return o}});var i=n(2714),r=n(7031),o=(0,i.D)({symbol:"circle",sinks:{fill:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int16Array(e,4),t.views.localID=new Uint32Array(e,8)},packObjectAttributes:function(t,e,n,i,o){return(0,r.v$)([t,e],n,i,o)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,r,s){var l=t.getBucket(n.type,"fill",o.sinks.fill.packObjectAttributes(e,n.innerId,n.dataKeys,i,r),o.sinks.fill.binder),c=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),u=s[0][0],d=s[1][0];!function(t,e,n,i,r,o,a){var s=t.elements,l=t.indices,c=l.buffer,u=l.offset,d=s.offset;c[u]=d+e,c[u+1]=d+n,c[u+2]=d+i,c[u+3]=d+r,c[u+4]=d+o,c[u+5]=d+a,l.offset=u+6}(l,0,2,1,0,3,2),a(l,u,d,-1,-1,c),a(l,u,d,-1,1,c),a(l,u,d,1,1,c),a(l,u,d,1,-1,c)}});function a(t,e,n,i,r,o){var a=t.elements.offset*t.elements.stride>>1,s=a>>1;t.views.position[a]=e,t.views.position[a+1]=n,t.views.extender[a]=i,t.views.extender[a+1]=r,t.views.localID[s]=o,t.elements.offset++}},4456:function(t,e,n){"use strict";n.d(e,{L:function(){return c}});var i=n(43),r=n(4178),o=n(2714),a=n(7031),s={type:r.SP.Striped,cDist:0,oLen:0,localID:0,offsetMultiplier:14};function l(t,e,n){return s.cDist=t,s.oLen=e,s.localID=n,s}var c=(0,o.D)({symbol:"dashedLine",sinks:{stroke:{stride:28,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int16Array(e,4),t.views.texExtender=new Uint16Array(e,8),t.views.vertexDistance=new Float32Array(e,12),t.views.componentDistance=new Float32Array(e,16),t.views.objectLength=new Float32Array(e,20),t.views.localID=new Uint32Array(e,24)},packObjectAttributes:function(t,e,n,i,r){return(0,a.v$)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,o,a,s){var u=t.getBucket(n.type,"stroke",c.sinks.stroke.packObjectAttributes(e,n.innerId,n.dataKeys,o,a),c.sinks.stroke.binder),d=t.idIndexer.getIndex(a[o.id],e,n,a[o.db_sublayer]),h=l(a[o.componentDistanceStart]/65536,a[o.objectLength]/65536,d),f=!Number.isNaN(a[o.beginningIsCut])&&0!==a[o.beginningIsCut],p=!Number.isNaN(a[o.endingIsCut])&&0!==a[o.endingIsCut];(0,i.W)(s[0],s[1],s[0].length,r.CJ.Flat,f?r.kU.TileCut:r.kU.ObjectEnding,p?r.kU.TileCut:r.kU.ObjectEnding,a[o.previousPointX],a[o.previousPointY],a[o.nextPointX],a[o.nextPointY],h,u)}})},1524:function(t,e,n){"use strict";n.d(e,{_:function(){return a}});var i=n(2714),r=n(3540),o=n(242),a=(0,i.D)({symbol:"dem",sinks:{mesh:{stride:4,binder:function(t,e){},packObjectAttributes:function(t,e){return[t,e]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(3)}}},elevation:{stride:8,binder:function(t,e){},packObjectAttributes:function(t,e,n){return[t,e,n]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],tileData:t.slice(4)}}}},generateElevation:function(t,e,n,i,s){var l=new Uint16Array(e.reduce((function(t,e){var n=e[0],i=e[1],a=e[2],s=e[3];return t.push(n*o.Bq,i*o.Bq,(0,r.Bb)(a),(0,r.Bb)(s)),t}),[]));return{symbol:a.symbol,sink:"elevation",buffer:l.buffer,generatedObjects:[{attributes:a.sinks.elevation.packObjectAttributes(n,i,s),rangeStart:0,rangeEnd:l.buffer.byteLength}]}}})},5855:function(t,e,n){"use strict";n.d(e,{B:function(){return o}});var i=n(2714),r=n(7624),o=(0,i.D)({symbol:"heatmap",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Float32Array(e)},packObjectAttributes:function(t,e,n,i){return[t,e,n,i]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],rampTextureIndex:t[3],tileData:t.slice(4)}}},framebuffer:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.weight=new Float32Array(e,4),t.views.widen=new Int8Array(e,8)},packObjectAttributes:function(t,e){return[t,e]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,a){var c=i[0],u=i[1],d=Number((0,r.FR)(n.style.weight,a));if(Number.isNaN(d))console.error("Can't resolve style.weight to number");else for(var h=t.getBucket(n.type,"framebuffer",o.sinks.framebuffer.packObjectAttributes(e,n.innerId),o.sinks.framebuffer.binder),f=0;f<c.length;f++)l(h,0,1,2,2,1,3),s(h,c[f],u[f],-1,-1,d),s(h,c[f],u[f],1,-1,d),s(h,c[f],u[f],-1,1,d),s(h,c[f],u[f],1,1,d)},generateTexture:function(t,e,n,i,r){var s=[-1,1,1,-1],l=[-1,-1,1,1],c=t.getBucket(n.type,"fill",o.sinks.fill.packObjectAttributes(e,n.innerId,i,r),o.sinks.fill.binder),u=c.elements.offset;!function(t,e,n,i,r,o,a,s){var l=t.buffer,c=t.offset;l[c]=e+n,l[c+1]=e+i,l[c+2]=e+r,l[c+3]=e+o,l[c+4]=e+a,l[c+5]=e+s,t.offset=c+6}(c.indices,u,0,1,2,0,2,3),a(c,u++,s[0],l[0]),a(c,u++,s[1],l[1]),a(c,u++,s[2],l[2]),a(c,u++,s[3],l[3]),c.elements.offset=u}});function a(t,e,n,i){var r=2*e;t.views.position[r]=n,t.views.position[r+1]=i}function s(t,e,n,i,r,o){var a=t.elements.offset*t.elements.stride,s=a>>1,l=s>>1;t.views.position[s]=e,t.views.position[s+1]=n,t.views.weight[l]=o,t.views.widen[a]=i,t.views.widen[a+1]=r,t.elements.offset++}function l(t,e,n,i,r,o,a){var s=t.elements,l=t.indices,c=l.buffer,u=l.offset,d=s.offset;c[u]=d+e,c[u+1]=d+n,c[u+2]=d+i,c[u+3]=d+r,c[u+4]=d+o,c[u+5]=d+a,l.offset=u+6}},6591:function(t,e,n){"use strict";function i(t,e){return 0===t?0:Math.min(2*t-1,2*(e-t))}n.d(e,{X:function(){return i}})},8297:function(t,e,n){"use strict";n.d(e,{$Y:function(){return a},Uu:function(){return s},k8:function(){return l}});var i=n(1026),r=n(7244),o=[0,0];function a(t,e,n,a,s,l){var u=s.style,d=u.textLineHeight,h=u.textLetterSpacing;l===r.bR.Icon&&(d=s.style.iconTextLineHeight,h=s.style.iconTextLetterSpacing);for(var f=e.identifyPoiLabelIndex,p=a.lines,m=(a.maxWidth,d*i.fonts.baseSize),v=function(t,e,n){var i;switch(t){case 0:i=e/2+e*(n-1);break;case 2:i=-e/2;break;default:i=1&n?e*(n>>1):e/2+e*(n-1>>1)}return i}(1,m,p.length),_=0;_<p.length;_++){var y=0;y=-p[_].width/2,o[0]=y,o[1]=v;for(var g=p[_].glyphs,b=0;b<g.length;b++){var w=g[b];void 0!==w.bitmap&&c(t[w.range],n,o,w,f),o[0]+=w.advance+i.fonts.baseSize*h}v-=m}}function s(t,e,n,i,r,o,a){var s=n[1]+i.top,l=n[0]+i.left,c=s-i.height,u=l+i.width,h=Math.sin(r),p=Math.cos(r),m=l*p-s*h,v=l*h+s*p,_=u*p-s*h,y=u*h+s*p,g=l*p-c*h,b=l*h+c*p,w=u*p-c*h,x=u*h+c*p,S=t.elements.offset;d(t,e,m,v,i.texLeft,i.texTop,o,a),d(t,e,_,y,i.texRight,i.texTop,o,a),d(t,e,g,b,i.texLeft,i.texBottom,o,a),d(t,e,w,x,i.texRight,i.texBottom,o,a),f(t.indices,S,1,0,3,2,3,0)}function l(t,e,n){var i=t.elements.offset,r=127*Math.cos(n),o=127*Math.sin(n);h(t,e,r,o,-1,-1),h(t,e,r,o,1,-1),h(t,e,r,o,1,1),h(t,e,r,o,-1,1),f(t.indices,i,0,1,2,2,3,0)}function c(t,e,n,i,r){var o=n[1]+i.top,a=n[0]+i.left,s=o-i.height,l=a+i.width,c=t.elements.offset;u(t,e,a,o,i.texLeft,i.texTop,r),u(t,e,l,o,i.texRight,i.texTop,r),u(t,e,a,s,i.texLeft,i.texBottom,r),u(t,e,l,s,i.texRight,i.texBottom,r),f(t.indices,c,1,0,3,2,3,0)}function u(t,e,n,i,r,o,a){var s=t.elements,l=s.stride*s.offset>>1,c=l>>1;t.views.position[l]=e[0],t.views.position[l+1]=e[1],t.views.position[l+2]=e[2],t.views.cornerOffset[l]=n,t.views.cornerOffset[l+1]=i,t.views.texCoords[l]=r,t.views.texCoords[l+1]=o,t.views.localID[c]=a,s.offset++}function d(t,e,n,i,r,o,a,s){var l=t.elements,c=l.stride*l.offset>>1;t.views.position[c]=e[0],t.views.position[c+1]=e[1],t.views.position[c+2]=e[2],t.views.texCoords[c]=r,t.views.texCoords[c+1]=o,c>>=1,t.views.cornerOffset[c]=n,t.views.cornerOffset[c+1]=i,t.views.styleZoomLimits[c]=a,t.views.styleZoomLimits[c+1]=s,l.offset++}function h(t,e,n,i,r,o){var a=t.elements,s=a.stride*a.offset/2;t.views.position[s]=e[0],t.views.position[s+1]=e[1],t.views.direction[s]=n,t.views.direction[s+1]=i,t.views.widenDirection[s]=r,t.views.widenDirection[s+1]=o,a.offset++}function f(t,e,n,i,r,o,a,s){var l=t.buffer,c=t.offset;l[c]=e+n,l[c+1]=e+i,l[c+2]=e+r,l[c+3]=e+o,l[c+4]=e+a,l[c+5]=e+s,t.offset=c+6}},4178:function(t,e,n){"use strict";var i,r,o,a;n.d(e,{SP:function(){return i},gD:function(){return r},kU:function(){return o},CJ:function(){return a}}),function(t){t.Striped="Striped",t.Entrance="Entrance"}(i||(i={})),function(t){t[t.Line=0]="Line",t[t.Arrow=1]="Arrow",t[t.StartBorder=2]="StartBorder",t[t.LineEnding=3]="LineEnding"}(r||(r={})),function(t){t[t.TileCut=0]="TileCut",t[t.ObjectEnding=1]="ObjectEnding"}(o||(o={})),function(t){t[t.Flat=0]="Flat",t[t.Circle=1]="Circle"}(a||(a={}))},43:function(t,e,n){"use strict";n.d(e,{W:function(){return g}});var i,r,o,a=n(1992),s=n(4178),l=n(242),c=[.5,.5],u=[.5,.5],d=[.5,.5],h=[.5,.5],f=[0,0],p=0,m=0,v=0,_=0,y={x:0,y:0,xn2:0,yn2:0,xn1:0,yn1:0,noTurn:!0,leftTurn:!1,sharpTurn:!1,reverseTurn:!1,extender:[.5,.5],faExtender:[.5,.5],saExtender:[.5,.5]};function g(t,e,n,l,u,h,f,y,g,w,T,E){var k,z,C,A,D,F,R,O,j,B;if(0!==n)if(o=T,i=(r=E).indices,m=r.elements.offset,p=0,v=0,_=0,1===n)k=t[0],z=e[0],B=0,L(i,m,0,2,1,1,2,3),P(r,o,0,k,z,1,-1,1,-1,B,!1),P(r,o,0,k,z,-1,-1,-1,-1,B,!1),P(r,o,0,k,z,1,1,1,1,B,!1),P(r,o,0,k,z,-1,1,-1,1,B,!1),p+=4;else{switch(C=t[0],A=e[0],D=t[1],F=e[1],B=0,u){case s.kU.TileCut:(0,a.AE)(c,C,A,f,y),(0,a.AE)(d,D,F,C,A),(j=b(D,F,c[0],c[1],d[0],d[1])).noTurn?S(C,A,d[0],d[1],B):x(0,C,A,c[0],c[1],d[0],d[1],B);break;case s.kU.ObjectEnding:(0,a.AE)(d,D,F,C,A),l===s.CJ.Flat?S(C,A,d[0],d[1],B):(S(C,A,-d[0],-d[1],B),x(0,C,A,-d[0],-d[1],d[0],d[1],B));break;default:throw new Error("LoftedLine: unknown Ending Type")}for(var U=n-1,Z=1;Z<U;Z++){C=t[Z-1],A=e[Z-1],D=t[Z],F=e[Z],R=t[Z+1],O=e[Z+1];var N=D-C,H=F-A;B+=Math.sqrt(N*N+H*H)/65536,(0,a.AE)(c,D,F,C,A),(0,a.AE)(d,R,O,D,F),x(Z,D,F,c[0],c[1],d[0],d[1],B)}C=t[n-2],A=e[n-2];var G=(D=t[U])-C,V=(F=e[U])-A;switch(B+=Math.sqrt(G*G+V*V)/65536,h){case s.kU.TileCut:(0,a.AE)(c,D,F,C,A),(0,a.AE)(d,g,w,D,F),(j=b(D,F,c[0],c[1],d[0],d[1])).noTurn?I(U,D,F,d[0],d[1],B):M(U,B,j);break;case s.kU.ObjectEnding:(0,a.AE)(d,D,F,C,A),I(U,D,F,d[0],d[1],B),l===s.CJ.Circle&&x(U,D,F,d[0],d[1],-d[0],-d[1],B);break;default:throw new Error("LoftedLine: unknown Ending Type")}}}function b(t,e,n,i,r,o){var s=function(t,e,n,i,r,o){var a=y;a.x=t,a.y=e,a.xn2=n,a.yn2=i,a.xn1=r,a.yn1=o;var s=n*r+i*o;return a.noTurn=s>.9999,a.leftTurn=n*-o+i*r<0,a.sharpTurn=s<0,a.reverseTurn=s<-.9999,a}(t,e,n,i,r,o);if(s.noTurn||s.reverseTurn)s.extender[0]=0,s.extender[1]=0,s.faExtender[0]=0,s.faExtender[1]=0,s.saExtender[0]=0,s.saExtender[1]=0;else{(0,a.ax)(u,n,i,r,o);var l=u[0],c=u[1];s.extender[0]=l,s.extender[1]=c,s.faExtender[0]=l-2*n,s.faExtender[1]=c-2*i,s.saExtender[0]=l-2*r,s.saExtender[1]=c-2*o}return s}function w(t,e,n,i,s,l,c,d){(0,a.ax)(u,i,s,l,c),i*-c+s*l<0?P(r,o,t,e,n,-u[0],-u[1],-u[0],-u[1],d,!1):P(r,o,t,e,n,u[0],u[1],u[0],u[1],d,!1),p++}function x(t,e,n,s,l,c,u,d){var f=b(e,n,s,l,c,u);M(t,d,f),function(t,e,n){if(!n.noTurn){var s,l,c=n.sharpTurn?2:1;n.reverseTurn?(s=_,l=v):n.leftTurn?(s=v,l=p+c):(s=p+c,l=_);var u=p;if(n.leftTurn,T(i,m,v,_,u),n.sharpTurn){var d=p+1;n.leftTurn?L(i,m,u,d,s,s,d,l):L(i,m,u,l,d,d,l,s)}else n.leftTurn,T(i,m,u,l,s);n.sharpTurn?(n.leftTurn?(0,a.AE)(h,n.xn2,n.yn2,n.xn1,n.yn1):(0,a.AE)(h,n.xn1,n.yn1,n.xn2,n.yn2),w(t,n.x,n.y,n.xn2,n.yn2,h[0],h[1],e),w(t,n.x,n.y,h[0],h[1],n.xn1,n.yn1,e)):w(t,n.x,n.y,n.xn2,n.yn2,n.xn1,n.yn1,e),n.reverseTurn||(n.leftTurn?P(r,o,t,n.x,n.y,-n.xn1,-n.yn1,-n.xn1,-n.yn1,e,!1):P(r,o,t,n.x,n.y,n.xn1,n.yn1,n.xn1,n.yn1,e,!1),p++),_=l,v=s}}(t,d,f),function(t,e,n){if(!n.noTurn&&!n.reverseTurn){var a=p+1,s=p;n.leftTurn?(P(r,o,t,n.x,n.y,-n.xn1,-n.yn1,n.saExtender[0],n.saExtender[1],e,!1),P(r,o,t,n.x,n.y,n.xn1,n.yn1,n.extender[0],n.extender[1],e,!1)):(P(r,o,t,n.x,n.y,-n.xn1,-n.yn1,-n.extender[0],-n.extender[1],e,!1),P(r,o,t,n.x,n.y,n.xn1,n.yn1,-n.saExtender[0],-n.saExtender[1],e,!1)),p+=2,n.leftTurn?L(i,m,_,s,v,v,s,a):L(i,m,v,_,a,a,_,s),_=s,v=a}}(t,d,f)}function S(t,e,n,i,a){P(r,o,0,t,e,-n,-i,-n,-i,a,!1),P(r,o,0,t,e,n,i,n,i,a,!1),p+=2,v=1,_=0}function I(t,e,n,a,s,l){var c=p+1,u=p;P(r,o,t,e,n,-a,-s,-a,-s,l,!1),P(r,o,t,e,n,a,s,a,s,l,!1),p+=2,L(i,m,_,u,v,v,u,c),v=c,_=u}function M(t,e,n){if(!n.noTurn){var a=p+1,s=p;if(n.reverseTurn?(P(r,o,t,n.x,n.y,-n.xn2,-n.yn2,-n.xn2,-n.yn2,e,!1),P(r,o,t,n.x,n.y,n.xn2,n.yn2,n.xn2,n.yn2,e,!1)):n.leftTurn?(P(r,o,t,n.x,n.y,-n.xn2,-n.yn2,n.faExtender[0],n.faExtender[1],e,!0),P(r,o,t,n.x,n.y,n.xn2,n.yn2,n.extender[0],n.extender[1],e,!0)):(P(r,o,t,n.x,n.y,-n.xn2,-n.yn2,-n.extender[0],-n.extender[1],e,!0),P(r,o,t,n.x,n.y,n.xn2,n.yn2,-n.faExtender[0],-n.faExtender[1],e,!0)),p+=2,L(i,m,_,s,v,v,s,a),_=s,v=a,!n.reverseTurn){var l=p+1,c=p;n.leftTurn?(P(r,o,t,n.x,n.y,-n.xn2,-n.yn2,-n.xn2,-n.yn2,e,!1),P(r,o,t,n.x,n.y,0,0,0,0,e,!1),L(i,m,a,s,l,l,s,c)):(P(r,o,t,n.x,n.y,0,0,0,0,e,!1),P(r,o,t,n.x,n.y,n.xn2,n.yn2,n.xn2,n.yn2,e,!1),L(i,m,s,c,a,a,c,l)),p+=2,_=c,v=l}}}function P(t,e,n,i,r,o,c,u,d,h,p){var m=t.elements.offset*e.offsetMultiplier,v=m>>1;if(t.views.position[m]=i,t.views.position[m+1]=r,t.views.extender[m]=Math.floor(u*l.Gt*127+.5),t.views.extender[m+1]=Math.floor(d*l.Gt*127+.5),e.type===s.SP.Striped)t.views.texExtender[m]=(0,a.am)(o*l.Gt,c*l.Gt),"componentDistance"in t.views&&(t.views.componentDistance[v]=e.cDist);else if(e.type===s.SP.Entrance){var _=e.px,y=e.py,g=0===n,b=n===e.count-1,w=g?n:n-1,x=g?n+1:n;(0,a.uI)(f,_[w],y[w],_[x],y[x]),"direction"in t.views&&(t.views.direction[m]=Math.round(127*f[0]),t.views.direction[m+1]=Math.round(127*f[1]),t.views.type[v]=b?s.gD.LineEnding:s.gD.Line),t.views.texExtender[m]=(0,a.am)(o*(p||b?-1:1)*l.Gt,c*(p||b?-1:1)*l.Gt)}t.views.vertexDistance[v]=h,t.views.objectLength[v]=e.oLen,t.views.localID[v]=e.localID,t.elements.offset++}function T(t,e,n,i,r){var o=t.buffer,a=t.offset;o[a]=e+n,o[a+1]=e+i,o[a+2]=e+r,t.offset=a+3}function L(t,e,n,i,r,o,a,s){var l=t.buffer,c=t.offset;l[c]=e+n,l[c+1]=e+i,l[c+2]=e+r,l[c+3]=e+o,l[c+4]=e+a,l[c+5]=e+s,t.offset=c+6}},2066:function(t,e,n){"use strict";n.d(e,{n:function(){return s}});var i=n(9450),r=i.Ue(),o=i.Ue(),a=i.Ue();function s(t,e,n,s,c,u,d,h){i.t8(r,e,n,s),i.t8(o,c,u,d),i.lu(a,o,r),i.fS(o,r)||(i.Fv(a,a),i.bA(a,a,127)),function(t,e,n,i,r,o,a){var s=t.indices.buffer,l=t.indices.offset,c=t.elements.offset;s[l]=c+e,s[l+1]=c+n,s[l+2]=c+i,s[l+3]=c+r,s[l+4]=c+o,s[l+5]=c+a,t.indices.offset=l+6}(t,0,1,3,3,1,2),l(t,r,a,1,h),l(t,r,a,-1,h),l(t,o,a,-1,h),l(t,o,a,1,h)}function l(t,e,n,i,r){var o=t.elements.offset*t.elements.stride,a=o>>1;t.views.position[a]=e[0],t.views.position[a+1]=e[1],t.views.position[a+2]=e[2],t.views.directionDistance[o]=n[0],t.views.directionDistance[o+1]=n[1],t.views.directionDistance[o+2]=n[2],t.views.directionDistance[o+3]=i,"demPosition"in t.views&&(r=null!=r?r:e,t.views.demPosition[a]=r[0],t.views.demPosition[a+1]=r[1]),t.elements.offset++}},8027:function(t,e,n){"use strict";n.d(e,{e:function(){return _}});var i=n(242),r=n(378),o=n(372),a=n(1992),s=r.Ue(),l=r.Ue(),c=r.Ue(),u=r.Ue(),d=r.Ue(),h=r.Ue(),f=r.Ue(),p=r.Ue(),m=0,v=0;function _(t,e,n,i,r,o,l,c,u){if(!(i<2)){if((0,a.uI)(s,e[0],n[0],e[1],n[1]),m=0,r){var d=void 0!==c?c[0]:0,h=void 0!==u?u[0]:0;g(t,e[0],n[0],-s[0],-s[1],d,h,l)}for(var f=1;f<i;f++)y(t,e,n,f,i,l,c,u);o&&(d=void 0!==c?c[i-1]:0,h=void 0!==u?u[i-1]:0,g(t,e[i-1],n[i-1],s[0],s[1],d,h,l))}}function y(t,e,n,_,y,w,x,S){var I=_===y-1;if(r.t8(d,e[_-1],n[_-1]),r.t8(h,e[_],n[_]),void 0!==x&&void 0!==S?(r.t8(c,x[_-1],S[_-1]),r.t8(u,x[_],S[_])):(r.t8(c,0,0),r.t8(u,0,0)),(0,a.fN)(p,s),I)v=0;else{r.t8(f,e[_+1],n[_+1]),(0,a.uI)(l,h[0],h[1],f[0],f[1]);var M=(0,o.uZ)(r.AK(s,l),-1,1);if(M<=0)v=0,g(t,h[0],h[1],s[0],s[1],u[0],u[1],w);else{var P=Math.sqrt((1-M)/(1+M)),T=(0,o.Xx)(r.AK(p,l));v=P*T}}!function(t,e,n,i,r,o,a){var s=t.indices.buffer,l=t.indices.offset,c=t.elements.offset;s[l]=c+e,s[l+1]=c+n,s[l+2]=c+i,s[l+3]=c+r,s[l+4]=c+o,s[l+5]=c+a,t.indices.offset=l+6}(t,0,1,3,3,1,2);var L=p[0]*i.Gt,E=p[1]*i.Gt;b(t,d[0],d[1],(p[0]+s[0]*m)*i.Gt,(p[1]+s[1]*m)*i.Gt,L,E,c[0],c[1],w),b(t,d[0],d[1],(-p[0]-s[0]*m)*i.Gt,(-p[1]-s[1]*m)*i.Gt,-L,-E,c[0],c[1],w),b(t,h[0],h[1],(-p[0]+s[0]*v)*i.Gt,(-p[1]+s[1]*v)*i.Gt,-L,-E,u[0],u[1],w),b(t,h[0],h[1],(p[0]-s[0]*v)*i.Gt,(p[1]-s[1]*v)*i.Gt,L,E,u[0],u[1],w),I||(r.JG(s,l),m=v)}function g(t,e,n,i,r,o,a,s){!function(t,e,n,i){var r=t.indices.buffer,o=t.indices.offset,a=t.elements.offset;r[o]=a+e,r[o+1]=a+n,r[o+2]=a+i,t.indices.offset=o+3}(t,0,1,2);var l=.01*-i,c=.01*-r;b(t,e,n,i+l,r+c,i,r,o,a,s),b(t,e,n,-r+l,i+c,-r,i,o,a,s),b(t,e,n,r+l,-i+c,r,-i,o,a,s)}function b(t,e,n,i,r,o,a,s,l,c){var u=t.elements.offset*t.elements.stride,d=u>>1,h=u>>2;t.views.position[d]=e,t.views.position[d+1]=n,t.views.extender[u]=127*i,t.views.extender[u+1]=127*r,t.views.normal[u]=127*o,t.views.normal[u+1]=127*a,"shift"in t.views&&(t.views.shift[h]=s,t.views.shift[h+1]=l),"localID"in t.views&&(t.views.localID[h]=c),t.elements.offset++}},6119:function(t,e,n){"use strict";n.d(e,{C:function(){return s},b:function(){return l}});var i=n(6591),r=n(1992),o=[.5,.5],a=[.5,.5];function s(t,e,n,o,s,l){for(var c=t.elements.offset,p=(0,i.X)(e-1,e),m=n[p],v=o[p],y=s?s[p]:0,g=c,b=0;b<e;b++){var w=(0,i.X)(b,e),x=b===e-1,S=n[w],I=o[w],M=s?s[w]:x?0:1;0!==y&&((0,r.uI)(a,m,v,S,I),_(t,c,M,x?g:c+4),d(t,c,m,v,S,I),l?u(t,c,l[0],l[1],l[0],l[1]):u(t,c,m,v,S,I),h(t,c,(0,r.am)(a[1],-a[0])),f(t,c,(0,r.af)(a)),c+=4),m=S,v=I,y=M}t.elements.offset=c}function l(t,e,n,s,l,u,d){var h=t.elements.offset,f=(0,i.X)(e-2,e),y=(0,i.X)(e-1,e),g=n[y],b=s[y],w=l?l[f]:1,x=l?l[y]:0;(0,r.AE)(o,n[f],s[f],g,b);for(var S=o[0],I=o[1],M=0;M<e;M++){var P=(0,i.X)(M,e),T=M===e-1,L=n[P],E=s[P],k=l?l[P]:T?0:1;(0,r.uI)(a,g,b,L,E);var z=a[1],C=-a[0];0!==w&&(0===x?(o[0]=S,o[1]=I):c(o,S,I,z,C),(0,r.m2)(a,S,I,o[0],o[1]),_(t,h,0,0),p(t,h,g,b,u,null!=d?d:[g,b]),m(t,h,(0,r.af)(o),(0,r.af)(a)),v(t,h),h+=4),g=L,b=E,w=x,x=k,S=z,I=C}t.elements.offset=h}function c(t,e,n,i,r){var o,a,s;e*i+n*r>0?(o=e+i,a=n+r,s=1/Math.sqrt(o*o+a*a),t[0]=o*s,t[1]=a*s):(a=e-i,0!=(o=r-n)&&0!==a?(s=1/Math.sqrt(o*o+a*a),t[0]=o*s,t[1]=a*s):(t[0]=0,t[1]=0))}function u(t,e,n,i,r,o){var a=t.views.demPosition,s=t.elements.stride/a.BYTES_PER_ELEMENT;a[e*=s]=n,a[e+1]=i,a[e+=s]=n,a[e+1]=i,a[e+=s]=r,a[e+1]=o,a[e+=s]=r,a[e+1]=o}function d(t,e,n,i,r,o){var a=t.views,s=a.position,l=a.distance,c=t.elements.stride/s.BYTES_PER_ELEMENT;s[e*=c]=n,s[e+1]=i,s[e+2]=0,l[e]=0,s[e+=c]=n,s[e+1]=i,s[e+2]=0,l[e]=-32767,s[e+=c]=r,s[e+1]=o,s[e+2]=0,l[e]=-32767,s[e+=c]=r,s[e+1]=o,s[e+2]=0,l[e]=0}function h(t,e,n){var i=t.elements.stride/t.views.normals.BYTES_PER_ELEMENT;e*=i;for(var r=0;r<4;r++)t.views.normals[e]=n,t.views.normals[e+1]=127,e+=i}function f(t,e,n){var i=t.elements.stride/t.views.direction.BYTES_PER_ELEMENT;e*=i;for(var r=0;r<4;r++)t.views.direction[e]=n,t.views.direction[e+1]=0,e+=i}function p(t,e,n,i,r,o){var a=t.elements.stride/t.views.position.BYTES_PER_ELEMENT;e*=a,t.views.position[e]=n,t.views.position[e+1]=i,t.views.position[e+2]=0,t.views.distance[e]=32767,t.views.demPosition[e]=o[0],t.views.demPosition[e+1]=o[1],e+=a,t.views.position[e]=n,t.views.position[e+1]=i,t.views.position[e+2]=0,t.views.distance[e]=-32767,t.views.demPosition[e]=o[0],t.views.demPosition[e+1]=o[1],e+=a,t.views.position[e]=n,t.views.position[e+1]=i,t.views.position[e+2]=r,t.views.distance[e]=-32767,t.views.demPosition[e]=o[0],t.views.demPosition[e+1]=o[1],e+=a,t.views.position[e]=n,t.views.position[e+1]=i,t.views.position[e+2]=r,t.views.distance[e]=32767,t.views.demPosition[e]=o[0],t.views.demPosition[e+1]=o[1]}function m(t,e,n,i){var r=t.elements.stride/t.views.normals.BYTES_PER_ELEMENT;e*=r;for(var o=0;o<4;o++)t.views.normals[e]=n,t.views.normals[e+1]=i,e+=r}function v(t,e){var n=t.elements.stride/t.views.direction.BYTES_PER_ELEMENT;e*=n;for(var i=0;i<4;i++)t.views.direction[e]=0,t.views.direction[e+1]=127,e+=n}function _(t,e,n,i){var r=t.indices.buffer,o=t.indices.offset;r[o++]=e,r[o++]=e+1,r[o++]=e+3,r[o++]=e+3,r[o++]=e+1,r[o++]=e+2,0!==n&&(r[o++]=e+2,r[o++]=i+1,r[o++]=i+0),t.indices.offset=o}},816:function(t,e,n){"use strict";n.d(e,{y:function(){return o}});var i=n(1992),r=n(6591);function o(t,e,n,o,d,h,f,p){for(var m=t.elements.offset,v=0;v<e;v++){var _=(0,r.X)(v,e),y=v===e-1;if(d&&1===d[_]||!d&&!y){var g=n[_],b=o[_],w=(v+1)%e,x=(0,r.X)(w,e),S=n[x],I=o[x];u(t,m),a(t,m,g,b,S,I,h),p?s(t,m,p[0],p[1],p[0],p[1]):s(t,m,g,b,S,I),l(t,m,(0,i.zj)(g,b,S,I)),void 0!==f&&"localID"in t.views&&void 0!==t.views.localID&&c(t.views.localID,m,f,t.elements.stride),m+=4}}t.elements.offset=m}function a(t,e,n,i,r,o,a){var s=t.views.position,l=t.elements.stride/s.BYTES_PER_ELEMENT;s[e*=l]=n,s[e+1]=i,s[e+2]=0,s[e+=l]=n,s[e+1]=i,s[e+2]=a,s[e+=l]=r,s[e+1]=o,s[e+2]=0,s[e+=l]=r,s[e+1]=o,s[e+2]=a}function s(t,e,n,i,r,o){var a=t.views.demPosition,s=t.elements.stride/a.BYTES_PER_ELEMENT;a[e*=s]=n,a[e+1]=i,a[e+=s]=n,a[e+1]=i,a[e+=s]=r,a[e+1]=o,a[e+=s]=r,a[e+1]=o}function l(t,e,n){var i=t.elements.stride/t.views.normal.BYTES_PER_ELEMENT;e*=i;for(var r=0;r<4;r++)t.views.normal[e]=n,t.views.normal[e+1]=0,e+=i}function c(t,e,n,i){var r=i/t.BYTES_PER_ELEMENT;t[e*=r]=n,t[e+=r]=n,t[e+=r]=n,t[e+=r]=n}function u(t,e){var n=t.indices.buffer,i=t.indices.offset;n[i++]=e,n[i++]=e+3,n[i++]=e+1,n[i++]=e,n[i++]=e+2,n[i++]=e+3,t.indices.offset=i}},5951:function(t,e,n){"use strict";n.d(e,{PA:function(){return J},XI:function(){return q},kF:function(){return X},Pn:function(){return $},SV:function(){return Q},vP:function(){return K}});var i=n(655),r=n(5465),o=n(2714),a=n(8027),s=n(7031),l=(0,o.D)({symbol:"shiftedLine",sinks:{solid:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int8Array(e,4),t.views.normal=new Int8Array(e,6),t.views.shift=new Float32Array(e,8)},packObjectAttributes:function(t,e,n,i,r){return(0,s.v$)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,r,o){var s=!Number.isNaN(r[i.beginningIsCut])&&0!==r[i.beginningIsCut],c=!Number.isNaN(r[i.endingIsCut])&&0!==r[i.endingIsCut],u=t.getBucket(n.type,"solid",l.sinks.solid.packObjectAttributes(e,n.innerId,n.dataKeys,i,r),l.sinks.solid.binder);(0,a.e)(u,o[0],o[1],o[0].length,!s,!c,0,o[2],o[3])}}),c=n(3021),u=n(4456),d=n(8112),h=n(7667),f=n(5869),p=n(378),m=n(816),v=n(2066),_=n(6119),y=p.Ue(),g=p.Ue(),b=p.Ue(),w=p.Ue(),x=function(t,e,n,i,r,o){return(0,s.v$)([t,e],n,i,r,o)},S=function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}},I=(0,o.D)({symbol:"lineExtrusion",sinks:{fill:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.normal=new Uint16Array(e,8),t.views.demPosition=new Uint16Array(e,16)},packObjectAttributes:x,unpackObjectAttributes:S},topStroke:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,8),t.views.demPosition=new Uint16Array(e,12)},packObjectAttributes:x,unpackObjectAttributes:S},sideStroke:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.distance=new Int16Array(e,6),t.views.normals=new Uint16Array(e,8),t.views.direction=new Uint16Array(e,12),t.views.demPosition=new Uint16Array(e,16)},packObjectAttributes:x,unpackObjectAttributes:S}},generate:function(t,e,n,i,r,o,a){for(var s=a[0],l=a[1],c=s.length,u=t.getBucket(n.type,"fill",I.sinks.fill.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),I.sinks.fill.binder),d=t.getBucket(n.type,"topStroke",I.sinks.topStroke.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),I.sinks.topStroke.binder),h=t.getBucket(n.type,"sideStroke",I.sinks.sideStroke.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),I.sinks.sideStroke.binder),f=0;f<c-1;f++){var x=s[f],S=l[f],M=s[f+1],P=l[f+1];p.t8(y,x,M),p.t8(g,S,P),p.t8(b,M,x),p.t8(w,P,S),(0,m.y)(u,2,y,g,void 0,1),(0,v.n)(d,x,S,1,M,P,1),(0,_.C)(h,2,y,g,void 0),(0,_.C)(h,2,b,w,void 0),(0,_.b)(h,2,y,g,void 0,1)}p.t8(y,s[c-1],s[0]),p.t8(g,l[c-1],l[0]),(0,_.b)(h,2,y,g,void 0,1)}}),M=n(2004),P=n(5570),T=n(3526),L=n(3308),E=n(8297),k=n(1026),z=n(372),C=n(7624),A=n(242),D=[0,0,0],F=[0,0],R=(0,o.D)({symbol:"labelLine",sinks:{raster:{stride:28,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.texCoords=new Uint16Array(e,8),t.views.cornerOffset=new Float32Array(e,12),t.views.styleZoomLimits=new Float32Array(e,20)},packObjectAttributes:function(t,e,n,i){return(0,s.LY)([t.styleId,t.layer.innerId,e,n,i],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],range:t[3],fontIndex:t[4],tileData:t.slice(5)}}}},processElement:function(t,e,n,i,r,o,a){var s,l=n.label,c=n.anchorPosition,u=n.anchorSegmentIndex,d=n.halfLabelWidth,h=n.layer;if("labelLine"===h.type){for(var f=l.axis,p=o.center,m=o.styleZoom,v=(0,C.bs)(m,o.styleState,!1,l.tileData),_=(0,C.Q9)(h.style.textFont,v),y=null!==(s=t.fontNameToIndex[_])&&void 0!==s?s:t.fontNameToIndex[A.Uo],g={},b=0,w=l.ranges;b<w.length;b++){var x=w[b];g[x]=e.getBucket("labelLine","raster",R.sinks.raster.packObjectAttributes(l,i,x,y),R.sinks.raster.binder)}var S=l.textMetrics.lines[0],I=(0,C.vn)(h.style.textFontSize,v)/k.fonts.baseSize,M=S.glyphs,P=function(t,e,n,i){var r=t.interpolate(e-n,t.getSegmentIndex(e-n)),o=t.interpolate(e+n,t.getSegmentIndex(e+n)),a=Math.atan2(o[1]-r[1],o[0]-r[0])-i;return Math.cos(a)<0}(f,c,d,o.rotation);F[0]=-S.width/2,F[1]=0;for(var O=0;O<M.length;O++){for(var j=M[O],B=(F[0]+j.left+j.width/2)*I*(P?-1:1),U=(0,z.Xx)(B)||1,Z=-1/0,N=1/0,H=u;H>=1&&H<f.vertexCount&&!(N<n.overflowStyleZoom);H+=U,N=Z){var G=1===U?H:H-1;Z=(0,L.X$)((0,L.to)(B,f.lengths[G]-c),p);var V=f.interpolate(c,H);(0,T.a2)(D,V,a),(0,T.hm)(D)&&void 0!==j.bitmap&&(0,E.Uu)(g[j.range],D,F,j,V[3]+(P?Math.PI:0),Math.max(Z,n.overflowStyleZoom),N)}F[0]+=j.advance+k.fonts.baseSize*h.style.textLetterSpacing}}},getLabelingInfo:function(){}}),O=[0,0,0],j=(0,o.D)({symbol:"oneWayLine",sinks:{raster:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.direction=new Uint16Array(e,8),t.views.widenDirection=new Uint16Array(e,12)},packObjectAttributes:function(t,e){return[t.styleId,t.layer.innerId,e]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],tileData:t.slice(3)}}}},processElement:function(t,e,n,i,r,o,a){var s=n.label,l=n.anchorWorld;if((0,T.a2)(O,l,a),(0,T.hm)(O)){var c=e.getBucket("oneWayLine","raster",j.sinks.raster.packObjectAttributes(s,i),j.sinks.raster.binder);(0,E.k8)(c,O,l[3])}},getLabelingInfo:function(){}}),B=n(7244),U=n(2089),Z=n(5855),N=n(1524),H=n(2388),G=n(7540),V=function(t,e,n,i,r,o,a,l,c){var u=a.tileProps,d={type:G.R2.Line,styleId:e,layerId:n.innerId,sourceId:r,tileCoords:i,id:l[u.id],componentDistanceStart:(0,G.hs)(l[u.componentDistanceStart],0),componentDistanceEnd:(0,G.hs)(l[u.componentDistanceEnd],0),objectLength:(0,G.hs)(l[u.objectLength],0),labelPriority:(0,G.hs)(l[u.db_label_priority],0),vertices:[c[0],c[1]],tileData:(0,s.v$)([],n.dataKeys,u,l,o)};t.addLabel(d)},W=function(t,e,n,i,r,o,a,l,c){var u=a.tileProps,d={type:G.R2.OneWayLine,styleId:e,layerId:n.innerId,sourceId:r,tileCoords:i,id:l[u.id],componentDistanceStart:(0,G.hs)(l[u.componentDistanceStart],0),componentDistanceEnd:(0,G.hs)(l[u.componentDistanceEnd],0),objectLength:(0,G.hs)(l[u.objectLength],0),labelPriority:(0,G.hs)(l[u.db_label_priority],0),vertices:[c[0],c[1]],tileData:(0,s.v$)([],n.dataKeys,u,l,o)};t.addLabel(d)};function q(t){var e=t.collector,n=t.generator,r=t.args;do{n.apply(void 0,(0,i.ev)([e],r))}while(e.isOverloaded())}var X={arrow:h.l,line:r.z,polygon:P.a,labelLine:R,lineExtrusion:I,polygonExtrusion:c.p,oneWayLine:j,dashedLine:u.L,shiftedLine:l,circle:f.p,buildingModel:d.X,point:B.uF,stretchableImage:U.z,raster:M.h,heatmap:Z.B,dem:N._},Y={labelLine:R,oneWayLine:j,point:B.uF};function K(t,e){var n=X[t];return n?n.sinks[e].stride:0}function J(t,e,n,i,o,a,s,d,f,p,m,v,_,y,g){n.forEach((function(n){if((void 0===i||!(n.maxzoom<=i||n.minzoom>=i+1&&i!==k.tiles.maxDetailLevel))&&(!a.hovered||Number.isNaN(s[a.hovered])||1!==s[a.hovered]||"polygon"===n.type||"polygonExtrusion"===n.type||"point"===n.type))do{switch(n.type){case"line":r.z.generate(t,e.id,n,a,s,_);break;case"dashedLine":u.L.generate(t,e.id,n,a,s,_);break;case"shiftedLine":l.generate(t,e.id,n,a,s,_);break;case"polygon":P.a.generate(t,e.id,n,a,s,_,y);break;case"polygonExtrusion":c.p.generate(t,e.id,n,o,p,f,a,s,_,!0,y);break;case"labelLine":V(t,e.id,n,m,d,f,o,s,_);break;case"oneWayLine":W(t,e.id,n,m,d,f,o,s,_);break;case"point":(0,H.p)(t,e,n,m,d,f,o,s,_,v,g);break;case"lineExtrusion":I.generate(t,e.id,n,f,a,s,_);break;case"arrow":h.l.generate(t,e.id,n,a,s,_);break;case"heatmap":var b=(0,C.OW)(o,p,f,a,s);Z.B.generate(t,e.id,n,_,b)}}while(t.isOverloaded())}))}function Q(t,e,n,i,r,o,a,s){var l=Y[e.type];if(l)do{l.processElement(t,n,i,r,o,a,s)}while(n.isOverloaded())}function $(t,e,n,i,r,o,a){var s=Y[i.type];s&&s.getLabelingInfo(t,e,n,r,o,a)}},5465:function(t,e,n){"use strict";n.d(e,{z:function(){return a}});var i=n(2714),r=n(8027),o=n(7031),a=(0,i.D)({symbol:"line",sinks:{solid:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int8Array(e,4),t.views.normal=new Int8Array(e,6),t.views.localID=new Uint32Array(e,8)},packObjectAttributes:function(t,e,n,i,r){return(0,o.v$)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,o,s){var l=!Number.isNaN(o[i.beginningIsCut])&&0!==o[i.beginningIsCut],c=!Number.isNaN(o[i.endingIsCut])&&0!==o[i.endingIsCut],u=t.idIndexer.getIndex(o[i.id],e,n,o[i.db_sublayer]),d=t.getBucket(n.type,"solid",a.sinks.solid.packObjectAttributes(e,n.innerId,n.dataKeys,i,o),a.sinks.solid.binder);(0,r.e)(d,s[0],s[1],s[0].length,!l,!c,u)}})},8112:function(t,e,n){"use strict";n.d(e,{X:function(){return c}});var i=n(2714),r=n(2066),o=n(8131),a=n(7031),s=n(242),l=[s.Bq/2,s.Bq/2],c=(0,i.D)({symbol:"buildingModel",sinks:{fill:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.texCoords=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12),t.views.demPosition=new Uint16Array(e,16)},packObjectAttributes:function(t,e,n,i,r,o,s,l,c){return(0,a.v$)([t,e,n,i,o,r],s,l,c)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],texture:t[2],primitiveType:t[3],id:Number.isNaN(t[4])?void 0:(0,o.Ak)(t[4]),matrix:t[5],tileData:t.slice(6)}}},stroke:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,8),t.views.demPosition=new Uint16Array(e,12)},packObjectAttributes:function(t,e,n,i,r,o,s){return(0,a.v$)([t,e,i,n],r,o,s)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],id:Number.isNaN(t[2])?void 0:(0,o.Ak)(t[2]),matrix:t[3],tileData:t.slice(4)}}}},processSubmesh:function(t,e,n,i,r,o,a,s,l,d){var h=n.tileProps,f=r[h.id],p=i.idIndexer.getIndex(f,t,e,r[h.db_sublayer]),m=i.getBucket(e.type,"fill",c.sinks.fill.packObjectAttributes(t,e.innerId,l,s,d,f,e.dataKeys,h,r),c.sinks.fill.binder);!function(t,e){for(var n=t.elements.offset,i=t.indices.offset,r=0;r<e.length;r++)t.indices.buffer[i++]=n+e[r];t.indices.offset=i}(m,a);for(var v=0;v<o.length;v++)u(m,o,v,p)},processOuterEdge:function(t,e,n,i,o,a,s,u){for(var d=n.tileProps,h=o[d.id],f=i.getBucket(e.type,"stroke",c.sinks.stroke.packObjectAttributes(t,e.innerId,u,h,e.dataKeys,d,o),c.sinks.stroke.binder),p=0;p<s.length;p+=2){var m=5*s[p],v=5*s[p+1];(0,r.n)(f,a[m],a[m+1],a[m+2],a[v],a[v+1],a[v+2],l)}}});function u(t,e,n,i){var r=t.elements.offset,o=c.sinks.fill.stride,a=5*n,s=r*(o/t.views.position.BYTES_PER_ELEMENT),u=r*(o/t.views.localID.BYTES_PER_ELEMENT);t.views.position[s]=e[a],t.views.position[s+1]=e[a+1],t.views.position[s+2]=e[a+2],t.views.texCoords[s]=e[a+3],t.views.texCoords[s+1]=e[a+4],t.views.demPosition[s]=l[0],t.views.demPosition[s+1]=l[1],t.views.localID[u]=i,t.elements.offset++}},7244:function(t,e,n){"use strict";n.d(e,{bR:function(){return T},uF:function(){return R},vg:function(){return j},qp:function(){return O}});var i=n(3540),r=n(242);function o(t,e){var n=t.reduce((function(t,e){return t.concat(e)}),[0]).concat(e),i=n.length-1;return{coords:n.slice(n[0]===n[1]?1:0,n[i-1]===n[i]?i:i+1),isOddStretchable:a(t)}}function a(t){var e;return!(null===(e=null==t?void 0:t[0])||void 0===e?void 0:e[0])}function s(t,e,n,i){if(t.coords.length<2)throw new Error("The source coords array must have at least two coordinates");return t.coords.map((function(r,o){return(e+r+i*(0===o?-1:o===t.coords.length-1?1:0))/n}))}function l(t,e){for(var n=c(t),i=n.stretchSize,r=n.fixSize,o=t.coords,a=t.isOddStretchable,s=e<r?r:e,l=[o[0]],u=1;u<o.length;u++){var d=o[u-1],h=o[u],f=u%2==(a?1:0),p=l[l.length-1];f?l.push(Math.round((s-r)*(h-d)/i)+p):l.push(p+h-d)}return l}function c(t){var e=t.coords,n=t.isOddStretchable;if(e.length<2)throw new Error("An axis must have at least two coordinates");if(2===e.length)return{stretchSize:e[e.length-1],fixSize:0};for(var i=0,r=n?0:1;r<e.length-1;r+=2)i+=e[r+1]-e[r];return{stretchSize:i,fixSize:e[e.length-1]-i}}function u(t,e,n){void 0===n&&(n=0);var i=t[t.length-1]-t[0],r=t.map((function(t){return Math.round(t-i/2+n)}));return 2===r.length?r[r.length-1]+=2*e:(r[0]-=e,r[r.length-1]+=e),r}function d(t,e,n,i,a,c,d,h,f){var p=function(t,e,n,i){return void 0===n&&(n=[]),void 0===i&&(i=[]),{x:o(n,t),y:o(i,e)}}(n.w,n.h,h,f),m=function(t,e,n,i,r){return[s(t.x,e,i[0],r),s(t.y,n,i[1],r)]}(p,n.x,n.y,e,r.CW),v=function(t,e,n,i,r,o){return void 0===r&&(r=0),void 0===o&&(o=0),[u(l(t.x,e),i,r),u(l(t.y,n),i,o)]}(p,i,a,r.CW,c,d);t.set(v,m)}function h(t,e,n,r,o,a,s,l,c,u,d){var h=12*t.elements.offset;t.views.position[h]=e,t.views.position[h+1]=n,t.views.position[h+2]=r,t.views.cornerOffset[h]=o,t.views.cornerOffset[h+1]=-a,t.views.texCoords[h]=(0,i.Bb)(s),t.views.texCoords[h+1]=(0,i.Bb)(l),t.views.scales[h]=(0,i.KF)(c),t.views.scales[h+1]=(0,i.wj)(u),h>>=1,t.views.localID[h]=d,t.elements.offset++}function f(t,e,n,i,r,o,a){var s=t.elements,l=t.indices,c=l.buffer,u=l.offset,d=s.offset;c[u]=d+e,c[u+1]=d+n,c[u+2]=d+i,c[u+3]=d+r,c[u+4]=d+o,c[u+5]=d+a,l.offset=u+6}var p=function(){function t(){this.countX=0,this.countY=0,this.textureX=[],this.textureY=[],this.stretchedX=[],this.stretchedY=[]}return t.prototype.reset=function(){this.countX=0,this.countY=0},t.prototype.set=function(t,e){this.countX=e[0].length,this.countY=e[1].length,this.textureX=e[0],this.textureY=e[1],this.stretchedX=t[0],this.stretchedY=t[1]},t.prototype.isEmpty=function(){return 0===this.countX||0===this.countY},t}(),m=n(8297),v=n(6507),_=n(1026),y=n(7624);function g(t,e,n,i,r){if(!r)return[t.w/e,t.h/e];var o=x(n,i,r),a=n.style.iconTextPadding;return[a[3]+a[1]+o[0],a[0]+a[2]+o[1]]}function b(t,e,n){return S((0,y.vn)(t.style.textFontSize,e),t.style.textLineHeight,n)}function w(t,e,n){return S((0,y.vn)(t.style.textFontSize2,e),t.style.textLineHeight,n)}function x(t,e,n){return S((0,y.vn)(t.style.iconTextFontSize,e),t.style.iconTextLineHeight,n)}function S(t,e,n){return[t/_.fonts.baseSize*n.maxWidth,t*e*n.lines.length]}function I(t,e,n){var i,r,o=null!==(i=n[0])&&void 0!==i?i:0,a=null!==(r=n[1])&&void 0!==r?r:0;return[(.5-t.anchorX)*e[0]+o,(.5-t.anchorY)*e[1]+a]}function M(t,e,n,i,r){var o,a,s,l,c=null!==(o=n[0])&&void 0!==o?o:.5,u=null!==(a=n[1])&&void 0!==a?a:.5,d=null!==(s=r[0])&&void 0!==s?s:0,h=null!==(l=r[1])&&void 0!==l?l:0;return[t[0]/2-c*e[0]-i[3]+d,t[1]/2-u*e[1]-i[0]+h]}function P(t,e,n,i,r){var o=e[0],a=e[1],s=n[0],l=n[1],c=0,u=0,d=l/2+a/2,h=l/2-a/2,f=-d,p=-h,m=s/2+o/2,v=s/2-o/2,_=-m,y=-v;switch(t){case"bottomCenter":u=d+r;break;case"rightCenter":c=m+r;break;case"topCenter":u=f-r;break;case"leftCenter":c=_-r;break;case"bottomRight":c=v,u=d+r;break;case"topRight":c=v,u=f-r;break;case"bottomLeft":c=y,u=d+r;break;case"rightBottom":c=m+r,u=p;break;case"rightTop":c=m+r,u=h;break;case"topLeft":c=y,u=f-r;break;case"leftTop":c=_-r,u=h;break;case"leftBottom":c=_-r,u=p}return[c+i[0],u+i[1]]}var T,L=n(2714),E=n(3526),k=n(2626),z=n(8550),C=n(3571),A=n(7031);!function(t){t[t.Icon=0]="Icon",t[t.First=1]="First",t[t.Second=2]="Second"}(T||(T={}));var D=new p,F=[0,0,0],R=(0,L.D)({symbol:"point",sinks:{raster:{stride:24,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.cornerOffset=new Int16Array(e,8),t.views.texCoords=new Uint16Array(e,12),t.views.scales=new Int16Array(e,16),t.views.localID=new Uint32Array(e,20)},packObjectAttributes:function(t,e,n){return(0,A.LY)([t.styleId,t.layer.innerId,e,n],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],atlasIndex:t[3],tileData:t.slice(5)}}},text:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.cornerOffset=new Int16Array(e,8),t.views.texCoords=new Uint16Array(e,12),t.views.localID=new Uint32Array(e,16)},packObjectAttributes:function(t,e,n,i,r,o){return(0,A.LY)([t.styleId,t.layer.innerId,e,n,i[0],-i[1],r,o],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],range:t[3],offsetX:t[4],offsetY:t[5],labelIndex:t[6],fontIndex:t[7],tileData:t.slice(8)}}}},processElement:function(t,e,n,i,o,a,s){var l,c,u=n.layer,d=n.label;if("point"===u.type){var h,f=(0,y.bs)(a.styleZoom,a.styleState,!0,d.tileData),p=U(f,t,o,d),m=p?g(p,o,u,f,d.iconTextMetrics):[0,0],v=[0,0];if(p&&(v=d.iconTextMetrics?M(m,h=x(u,f,d.iconTextMetrics),u.style.iconTextAnchor,u.style.iconTextPadding,u.style.iconTextOffset):I(p,m,u.style.iconOffset)),(0,E.a2)(F,n.anchorWorld,s),(0,E.hm)(F))switch(n.type){case k.Dl.Icon:if(!p)return;var _=t.icons[(0,y.Q9)(u.style.iconImage,f)];if(B(e,d,F,i,p,m[0]*o,m[1]*o,v[0]*o,v[1]*o,null===(l=null==_?void 0:_.stretchX)||void 0===l?void 0:l.map((function(t){var e=t[0],n=t[1];return[e*o,n*o]})),null===(c=null==_?void 0:_.stretchY)||void 0===c?void 0:c.map((function(t){var e=t[0],n=t[1];return[e*o,n*o]}))),!h)return;return void function(t,e,n,i,o,a,s,l){var c,u=n.iconTextMetrics;if(u&&l.style.iconTextFont){var d=(0,y.bs)(o.styleZoom,o.styleState,!1,n.tileData),h=(0,y.Q9)(l.style.iconTextFont,d),f=null!==(c=t.fontNameToIndex[h])&&void 0!==c?c:t.fontNameToIndex[r.Uo];O(e,n,T.Icon,u,i,a,s,l,f)}}(t,e,n.label,F,a,i,function(t,e,n){var i,r,o,a,s=null!==(i=e[0])&&void 0!==i?i:.5,l=null!==(r=e[1])&&void 0!==r?r:.5,c=null!==(o=n[0])&&void 0!==o?o:0,u=null!==(a=n[1])&&void 0!==a?a:0;return[(.5-s)*t[0]+c,(.5-l)*t[1]+u]}(h,u.style.iconTextAnchor,u.style.iconTextOffset),u);case k.Dl.PoiText:return void function(t,e,n,i,o,a,s,l,c){var u,d=n.label,h=d.textMetrics,f=(0,y.bs)(a.styleZoom,a.styleState,!1,d.tileData),p=(0,y.Q9)(c.style.textFont,f);if(p.length){var m=b(c,f,h),v=null!==(u=t.fontNameToIndex[p])&&void 0!==u?u:t.fontNameToIndex[r.Uo],_=P(n.parent?c.style.textPlacement:"centerCenter",o,m,l,(0,y.vn)(c.style.textOffset,f));O(e,d,T.First,d.textMetrics,i,s,_,c,v)}}(t,e,n,F,m,a,i,v,u);case k.Dl.PoiText2:return void function(t,e,n,i,o,a,s,l,c){var u,d,h=n.label,f=h.textMetrics,p=h.textMetrics2;if(p&&c.style.textFont2){var m=(0,y.bs)(a.styleZoom,a.styleState,!1,h.tileData),v=b(c,m,f),_=w(c,m,p),g=(0,y.vn)(c.style.textOffset,m),x=(0,y.vn)(null!==(u=c.style.textOffset2)&&void 0!==u?u:0,m,0),S=(0,y.Q9)(c.style.textFont2,m),I=null!==(d=t.fontNameToIndex[S])&&void 0!==d?d:t.fontNameToIndex[r.Uo],M=P(c.style.textPlacement,o,[_[0],v[1]],l,g);M[1]+=(v[1]+_[1])/2+x,O(e,h,T.Second,p,i,s,M,c,I)}}(t,e,n,F,m,a,i,v,u)}}},getLabelingInfo:function(t,e,n,i,r,o){var a=t.layer;if("point"===a.type){t.labelingElements.length=0;var s=(0,y.bs)(i.styleZoom,i.styleState,!0,t.tileData),l=U(s,n,o,t),c=l?g(l,o,a,s,t.iconTextMetrics):[0,0],u=[0,0];if(l){u=t.iconTextMetrics?M(c,x(a,s,t.iconTextMetrics),a.style.iconTextAnchor,a.style.iconTextPadding,a.style.iconTextOffset):I(l,c,a.style.iconOffset);var d=new v.x(t,k.Dl.Icon,e,i.buildingHeight,r,n);d.boxes.push([-c[0]/2+u[0],-c[1]/2+u[1],c[0]/2+u[0],c[1]/2+u[1]]),t.labelingElements.push(d)}var h=(0,y.Q9)(a.style.textFont,s);t.label.length>0&&h.length&&(function(t,e,n,i,r,o,a,s){var l=t.textMetrics;if(l){var c=(0,y.bs)(r.styleZoom,r.styleState,!1,t.tileData),u=(0,y.vn)(s.style.textOffset,c),d=b(s,c,l),h=new v.x(t,k.Dl.PoiText,e,r.buildingHeight,o,n);t.labelingElements.length>0&&(h.parent=t.labelingElements[0]);var f=P(h.parent?s.style.textPlacement:"centerCenter",i,d,a,u);h.boxes.push([f[0]-d[0]/2,f[1]-d[1]/2,f[0]+d[0]/2,f[1]+d[1]/2]),t.labelingElements.push(h)}}(t,e,n,c,i,r,u,a),t.label2&&function(t,e,n,i,r,o,a,s){var l,c=t.textMetrics,u=t.textMetrics2;if(u){var d=(0,y.bs)(r.styleZoom,r.styleState,!1,t.tileData),h=b(s,d,c),f=w(s,d,u),p=(0,y.vn)(s.style.textOffset,d),m=(0,y.vn)(null!==(l=s.style.textOffset2)&&void 0!==l?l:0,d,0),_=new v.x(t,k.Dl.PoiText2,e,r.buildingHeight,o,n);t.labelingElements.length>1?(_.parent=t.labelingElements[0],_.firstLabel=t.labelingElements[1]):t.labelingElements.length>0&&(_.parent=t.labelingElements[0],_.firstLabel=t.labelingElements[0]);var g=P(s.style.textPlacement,i,[f[0],h[1]],a,p);g[1]+=(h[1]+f[1])/2+m,_.boxes.push([g[0]-f[0]/2,g[1]-f[1]/2,g[0]+f[0]/2,g[1]+f[1]/2]),t.labelingElements.push(_)}}(t,e,n,c,i,r,u,a))}}});function O(t,e,n,i,r,o,a,s,l){for(var c={},u=0,d=e.ranges;u<d.length;u++){var h=d[u];c[h]=t.getBucket("point","text",R.sinks.text.packObjectAttributes(e,o,h,a,n,l),R.sinks.text.binder)}(0,m.$Y)(c,e,r,i,s,n)}function j(t,e,n,i,r){return B(t,e,n,i,r,r.w,r.h,r.w*(.5-r.anchorX),r.h*(.5-r.anchorY),void 0,void 0)}function B(t,e,n,i,o,a,s,l,c,u,p){if(!(a<=0||s<=0)&&"point"===e.layer.type){d(D,_.atlasSize,o,a,s,l,c,u,p),t.atlasPacker.addRastersToLoad(e.styleId,o);var m=t.getBucket("point","raster",R.sinks.raster.packObjectAttributes(e,i,o.atlasIndex),R.sinks.raster.binder);!function(t,e,n,i,o,a,s,l){for(var c=i.textureX,u=i.textureY,d=i.stretchedX,p=i.stretchedY,m=i.countX,v=i.countY,_=a!==-1/0?a:r.vL,y=s!==1/0?s:r.Fv,g=0;g<m-1;g++)for(var b=c[g],w=c[g+1],x=d[g],S=d[g+1],I=0;I<v-1;I++){var M=u[I],P=u[I+1],T=p[I],L=p[I+1];f(o,0,2,1,1,2,3),h(o,t,e,n,x,T,b,M,_,y,l),h(o,t,e,n,S,T,w,M,_,y,l),h(o,t,e,n,x,L,b,P,_,y,l),h(o,t,e,n,S,L,w,P,_,y,l)}}(n[0],n[1],n[2],D,m,-1/0,1/0,e.identifyIndex)}}function U(t,e,n,i){var r=e.rasterSets,o=i.layer;if("point"===o.type){var a;if(i.pointType===k.a_.Commercial||i.pointType===k.a_.Landmark)a=r.byKey[(0,z.zV)(i.idLo,i.idHi)];else{var s=(0,y.Q9)(o.style.iconImage,t);s.length&&(a=r.byKey[(0,z.fF)(s,o.style.iconAnchor[0],o.style.iconAnchor[1])])}if(a){var l=(0,y.vn)(o.style.iconWidth,t),c=(0,C.Bl)(a.rasters,l*n,!0);if(void 0!==c)return a.rasters[c]}}}},5570:function(t,e,n){"use strict";n.d(e,{a:function(){return h}});var i=n(2714),r=n(8131),o=n(6591),a=n(2066),s=n(1253),l=n(7031),c=(0,r.Ru)(NaN,NaN);function u(t,e,n,i,r,o){return(0,l.v$)([t,e,n],i,r,o)}var d=function(t){return{styleId:t[0],layerId:t[1],hiddenObjectId:Number.isNaN(t[2])?void 0:(0,r.Ak)(t[2]),tileData:t.slice(3)}},h=(0,i.D)({symbol:"polygon",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.localID=new Uint32Array(e,4)},packObjectAttributes:u,unpackObjectAttributes:d},stroke:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,4)},packObjectAttributes:u,unpackObjectAttributes:d}},generate:function(t,e,n,i,r,l,u){var d=l[0],m=l[1],v=l[2],_=r[i.id],y="number"!=typeof _&&u&&u.has(_)?_:c,g=r[i.hovered]?s.gl:t.idIndexer.getIndex(_,e,n,r[i.db_sublayer]);!function(t,e,n,i,r){var o=t.indices.buffer,a=t.indices.offset,s=t.elements.offset,l=s;f(t,s++,n[0],i[0],r),f(t,s++,n[1],i[1],r);for(var c=2;c<e;c++)p(o,a,l,c),f(t,s++,n[c],i[c],r),a+=3;t.elements.offset=s,t.indices.offset=a}(t.getBucket(n.type,"fill",h.sinks.fill.packObjectAttributes(e,n.innerId,y,n.dataKeys,i,r),h.sinks.fill.binder),d.length,d,m,g),function(t,e,n,i,r){for(var s=0;s<e;s++){var l=(0,o.X)(s,e);if(1===r[l]){var c=(0,o.X)((s+1)%e,e);(0,a.n)(t,n[l],i[l],0,n[c],i[c],0)}}}(t.getBucket(n.type,"stroke",h.sinks.stroke.packObjectAttributes(e,n.innerId,y,n.dataKeys,i,r),h.sinks.stroke.binder),d.length,d,m,v)}});function f(t,e,n,i,r){e*=4,t.views.position[e]=n,t.views.position[e+1]=i,e>>=1,t.views.localID[e]=r}function p(t,e,n,i){i%2==0?(t[e]=n+i-2,t[e+1]=n+i-1,t[e+2]=n+i):(t[e]=n+i-1,t[e+1]=n+i-2,t[e+2]=n+i)}},3021:function(t,e,n){"use strict";n.d(e,{p:function(){return y}});var i=n(6591),r=n(3526),o=n(8131),a=n(2714),s=n(816),l=n(6119),c=n(2066),u=n(1253),d=n(7031),h=n(7120),f=n(242),p=(0,o.Ru)(NaN,NaN),m=f.Bq/2,v=function(t,e,n,i,r,o,a){return(0,d.v$)([t,e,n],i,r,o,a)},_=function(t){return{styleId:t[0],layerId:t[1],hiddenObjectId:Number.isNaN(t[2])?void 0:(0,o.Ak)(t[2]),tileData:t.slice(3)}},y=(0,a.D)({symbol:"polygonExtrusion",sinks:{sideFill:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.normal=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12),t.views.demPosition=new Uint16Array(e,16)},packObjectAttributes:v,unpackObjectAttributes:_},topFill:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.normal=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12),t.views.demPosition=new Uint16Array(e,16)},packObjectAttributes:v,unpackObjectAttributes:_},sideStroke:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.distance=new Int16Array(e,6),t.views.normals=new Uint16Array(e,8),t.views.direction=new Uint16Array(e,12),t.views.demPosition=new Uint16Array(e,16)},packObjectAttributes:v,unpackObjectAttributes:_},topStroke:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,8),t.views.demPosition=new Uint16Array(e,12)},packObjectAttributes:v,unpackObjectAttributes:_}},generate:function(t,e,n,o,a,d,m,_,S,I,M,P){var T=S[0],L=S[1],E=S[2],k=T.length;P||(P=function(t,e,n){for(var r,o=Math.pow(f.Bq,2),a=t.length,s=h.Ue(),l=0;l<a;l++){r||h.aM(s,[t[l],e[l]]);var c=(0,i.X)(l,a);if(0===n[c]){var u=[t[c],e[c]],d=(0,i.X)((l+1)%a,a),p=[t[d],e[d]];if(x(u)){var m=w(u);m<o&&(r=u,o=m);var v=w(p);v<o&&(r=p,o=v)}else r=[(t[c]+t[d])/2,(e[c]+e[d])/2]}}return r||(r=[],h.be(r,s)),r}(T,L,E));var z=_[m.hovered],C=Math.round((0,r.VW)(_[m.db_height])),A=_[m.id],D=z?u.gl:t.idIndexer.getIndex(A,e,n,_[m.db_sublayer]),F="number"!=typeof A&&M&&M.has(A)?A:p,R=v(e,n.innerId,F,n.dataKeys,m,_,d);if(C>0){var O=t.getBucket("polygonExtrusion","sideFill",R,y.sinks.sideFill.binder);(0,s.y)(O,k,T,L,E,C,D,P);var j=t.getBucket("polygonExtrusion","sideStroke",R,y.sinks.sideStroke.binder);I&&((0,l.C)(j,k,T,L,E,P),(0,l.b)(j,k,T,L,E,C,P))}!function(t,e,n,i,r,o,a){var s=t.elements.offset,l=s;g(t,s++,n[0],i[0],r,o,a),g(t,s++,n[1],i[1],r,o,a);for(var c=2;c<e;c++)b(t,l,c),g(t,s++,n[c],i[c],r,o,a);t.elements.offset=s}(t.getBucket("polygonExtrusion","topFill",R,y.sinks.topFill.binder),k,T,L,C,D,P),function(t,e,n,r,o,a,s){for(var l=0;l<e;l++){var u=(0,i.X)(l,e);if(o&&1===o[u]){var d=(0,i.X)((l+1)%e,e);(0,c.n)(t,n[u],r[u],a,n[d],r[d],a,s)}}}(t.getBucket("polygonExtrusion","topStroke",R,y.sinks.topStroke.binder),k,T,L,E,C,P)}});function g(t,e,n,i,r,o,a){var s=t.elements.stride,l=e*(s/t.views.position.BYTES_PER_ELEMENT);t.views.position[l]=n,t.views.position[l+1]=i,t.views.position[l+2]=r,t.views.normal[l]=0,t.views.normal[l+1]=127,t.views.demPosition[l]=a[0],t.views.demPosition[l+1]=a[1];var c=e*(s/t.views.localID.BYTES_PER_ELEMENT);t.views.localID[c]=o}function b(t,e,n){var i=t.indices.buffer,r=t.indices.offset;n%2==0?(i[r++]=e+n-2,i[r++]=e+n-1,i[r++]=e+n):(i[r++]=e+n-1,i[r++]=e+n-2,i[r++]=e+n),t.indices.offset=r}function w(t){return Math.pow(m-Math.abs(t[0]-m),2)+Math.pow(m-Math.abs(t[1]-m),2)}function x(t){return 0===t[0]||t[0]===f.Bq||0===t[1]||t[1]===f.Bq}},7540:function(t,e,n){"use strict";n.d(e,{R2:function(){return i},hs:function(){return o},It:function(){return a}});var i,r=n(7624);function o(t,e){return Number.isNaN(t)?e:t}function a(t,e){if(!t)return"";var n=(0,r.FR)(t,e);return Number.isNaN(n)||!n&&0!==n?"":String(n)}!function(t){t[t.Point=0]="Point",t[t.Line=1]="Line",t[t.OneWayLine=2]="OneWayLine"}(i||(i={}))},2388:function(t,e,n){"use strict";n.d(e,{p:function(){return f}});var i=n(7277),r=n(1026),o=n(3571),a=n(8550),s=n(5630),l=n(7624),c=n(1253),u=n(7031),d=n(2626),h=n(7540),f=function(t,e,n,f,p,m,v,_,y,g,b){var w=v.tileProps;if(function(t,e,n,c,u,d,h){var f=c.tileProps,p=e.rasterSets,m=e.icons,v=(0,s.fL)(d),_=(0,l.EG)(n.style.iconWidth),y=(0,i.Ty)(u[f.db_sublayer]),g=(0,i.Cz)(u[f.db_sublayer]);if(y||g){if(h)return;var b=y?r.commercialPoi.rasterSizes:r.landmarkRasterSizes,w=(0,o.rA)(u[f.id],b,u[f.db_region],f.url_src?u[f.url_src]:void 0);t.atlasPacker.addNewRasterSet(e.id,w),t.atlasPacker.pack(w,_,v)}else(0,l.EG)(n.style.iconImage).forEach((function(i){if(i.length){var r=n.style.iconAnchor,o=p.byKey[(0,a.fF)(i,r[0],r[1])];if(!o)throw new Error("Not found raster set with image "+i+", anchorX: "+r[0]+", anchorY: "+r[1]);if(o.isSvg){var s=m[i],l=s?[{w:s.width,h:s.height}]:_.map((function(t){return{w:t,h:t}}));t.atlasPacker.packSvg(o,l,v),h&&o.rasters.forEach((function(n){return t.atlasPacker.addRastersToLoad(e.id,n)}))}}}))}(t,e,n,v,_,g,b),!b){var x=_[w.id],S=c.gl,I=c.gl;Number.isNaN(x)||(S=t.idIndexer.getIndex(x,e.id,n,_[w.db_sublayer],_[w.db_object_class],0,v),I=t.idIndexer.getIndex(x,e.id,n,_[w.db_sublayer],_[w.db_object_class],1,v));var M=d.a_.Common;(0,i.Ty)(_[w.db_sublayer])?M=d.a_.Commercial:(0,i.Cz)(_[w.db_sublayer])&&(M=d.a_.Landmark);var P=1===y[0].length?d._r.Point:d._r.Line,T=[];T=P===d._r.Point?[[y[0][0]],[y[1][0]],3===y.length?[y[2][0]]:[0]]:[y[0],y[1]];var L={type:h.R2.Point,pointType:M,geometryType:P,styleId:e.id,layerId:n.innerId,sourceId:p,tileCoords:f,id:_[w.id],identifyIndex:S,identifyPoiLabelIndex:I,labelPriority:(0,h.hs)(_[w.db_label_priority],0),label2Priority:(0,h.hs)(_[w.db_label2_priority],0),iconPriority:(0,h.hs)(_[w.db_icon_priority],0),hovered:(0,h.hs)(_[w.hovered],0),componentDistanceStart:(0,h.hs)(_[w.componentDistanceStart],0),componentDistanceEnd:(0,h.hs)(_[w.componentDistanceEnd],0),objectLength:(0,h.hs)(_[w.objectLength],0),vertices:T,tileData:(0,u.v$)([],n.dataKeys,w,_,m)};t.addLabel(L)}}},2004:function(t,e,n){"use strict";n.d(e,{h:function(){return o}});var i=n(2714),r=n(3540),o=(0,i.D)({symbol:"raster",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.txtrCoords=new Uint16Array(e,4)},packObjectAttributes:function(t,e,n){return[t,e,n]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],tileData:t.slice(3)}}}},generate:function(t,e,n,i,r){var s=e[0],l=e[1],c=t.getBucket(i.type,"fill",o.sinks.fill.packObjectAttributes(n,i.innerId,r),o.sinks.fill.binder),u=c.elements.offset;!function(t,e,n,i,r,o,a,s){var l=t.buffer,c=t.offset;l[c]=e+n,l[c+1]=e+i,l[c+2]=e+r,l[c+3]=e+o,l[c+4]=e+a,l[c+5]=e+s,t.offset=c+6}(c.indices,u,0,1,2,2,1,3),a(c,u++,s[0],l[0],0,1),a(c,u++,s[1],l[1],1,1),a(c,u++,s[2],l[2],0,0),a(c,u++,s[3],l[3],1,0),c.elements.offset=u}});function a(t,e,n,i,o,a){e*=4,t.views.position[e]=n,t.views.position[e+1]=i,t.views.txtrCoords[e]=(0,r.Bb)(o),t.views.txtrCoords[e+1]=(0,r.Bb)(a)}},2089:function(t,e,n){"use strict";n.d(e,{z:function(){return f}});var i=n(2714),r=n(3540),o=n(242);function a(t,e){var n=t.reduce((function(t,e){return t.concat(e)}),[0]).concat(e),i=n.length-1;return{coords:n.slice(n[0]===n[1]?1:0,n[i-1]===n[i]?i:i+1),isOddStretchable:s(t)}}function s(t){var e;return!(null===(e=null==t?void 0:t[0])||void 0===e?void 0:e[0])}function l(t){var e=t.coords;if(e.length<2)throw new Error("The source coords array must have at least two coordinates");var n=e[e.length-1]+2*o.Hg;return e.map((function(t,i){return(t+o.Hg*(0===i?0:i===e.length-1?2:1))/n}))}function c(t,e){for(var n=u(t),i=n.stretchSize,r=n.fixSize,o=t.coords,a=t.isOddStretchable,s=e<r?r:e,l=[o[0]],c=1;c<o.length;c++){var d=o[c-1],h=o[c],f=c%2==(a?1:0),p=l[l.length-1];f?l.push(Math.round((s-r)*(h-d)/i)+p):l.push(p+h-d)}return l}function u(t){var e=t.coords,n=t.isOddStretchable;if(e.length<2)throw new Error("An axis must have at least two coordinates");if(2===e.length)return{stretchSize:e[e.length-1],fixSize:0};for(var i=0,r=n?0:1;r<e.length-1;r+=2)i+=e[r+1]-e[r];return{stretchSize:i,fixSize:e[e.length-1]-i}}function d(t,e){void 0===e&&(e=0);var n=t[t.length-1]-t[0];return t.map((function(t){return Math.round(t-n/2+e)}))}function h(t){return t.map((function(t){return t*window.devicePixelRatio}))}var f=(0,i.D)({symbol:"stretchableImage",sinks:{fill:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.vrtxOffset=new Int16Array(e,4),t.views.txtrCoords=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12)},packObjectAttributes:function(t,e,n){return[t,e,n]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],tileData:t.slice(3)}}}},generate:function(t,e,n,i,r,o,s){var u=n.style,v=u.offset,_=u.stretchX,y=u.stretchY,g=u.sourceSize,b=u.targetSize,w=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),x=t.getBucket("stretchableImage","fill",f.sinks.fill.packObjectAttributes(e,n.innerId,o),f.sinks.fill.binder),S=function(t,e,n){var i=t[0],r=t[1];return void 0===e&&(e=[]),void 0===n&&(n=[]),{x:a(e,i),y:a(n,r)}}(g,_,y),I=function(t){var e=t.x,n=t.y;return[l(e),l(n)]}(S),M=function(t,e){var n=t.x,i=t.y,r=e.targetSize,o=r[0],a=r[1],s=e.offset;return[h(d(c(n,o),s&&s[0])),h(d(c(i,a),s&&s[1]))]}(S,{targetSize:b,offset:v});!function(t,e,n,i,r){for(var o=e[0],a=e[1],s=n[0],l=n[1],c=i[0],u=i[1],d=t.elements.offset,h=o.length,f=a.length,v=0;v<h-1;v++)for(var _=o[v],y=o[v+1],g=s[v],b=s[v+1],w=0;w<f-1;w++){var x=a[w],S=a[w+1],I=l[w],M=l[w+1];m(t.indices,d,0,1,2,2,1,3),p(t,d++,c,u,g,I,_,x,r),p(t,d++,c,u,b,I,y,x,r),p(t,d++,c,u,g,M,_,S,r),p(t,d++,c,u,b,M,y,S,r)}t.elements.offset=d}(x,I,M,s,w)}});function p(t,e,n,i,o,a,s,l,c){e*=8,t.views.position[e]=n,t.views.position[e+1]=i,t.views.vrtxOffset[e]=o,t.views.vrtxOffset[e+1]=-a,t.views.txtrCoords[e]=(0,r.Bb)(s),t.views.txtrCoords[e+1]=(0,r.Bb)(l),e>>=1,t.views.localID[e]=c}function m(t,e,n,i,r,o,a,s){var l=t.buffer,c=t.offset;l[c]=e+n,l[c+1]=e+i,l[c+2]=e+r,l[c+3]=e+o,l[c+4]=e+a,l[c+5]=e+s,t.offset=c+6}},8977:function(t,e,n){"use strict";n.d(e,{g:function(){return a}});var i=n(5109),r=n(242),o=n(372),a=function(){this.dictionaries={},this.reverseDictionaries={},this.version="",this.defaultProps={},this.tileProps=i.Dz,this.tilePropsByIndex=(0,o.l4)(i.Dz),this.hash=r.DL}},4524:function(t,e,n){"use strict";n.d(e,{r:function(){return d}});var i=n(6975),r=n(5715),o=n(3526);function a(t){var e=t.currentMod;return void 0!==e&&e.ready}function s(t,e){var n=t.currentMod;return void 0!==n&&void 0!==e[n.key]}function l(t,e){var n=e.currentMod;void 0!==n&&(t[n.key]=n)}function c(t,e,n){for(var i=0,r=e;i<r.length;i++)for(var a=r[i],s=0,l=(0,o.aM)(n,a);s<l.length;s++)c=t,u=void 0,void 0!==(u=l[s].currentMod)&&delete c[u.key];var c,u}var u=n(5180);function d(t,e,n){for(var i in h(t,e,n),f(t),p(t),t.displayedMods)t.tileModsCache.get(i);m(t),v(t)}function h(t,e,n){for(var i in t.tiles)(0,u.qC)(t.tiles[i],t.tileModsCache,e,n)}function f(t){switch(t.tilesAppearance){case i.W.ByOne:(0,r.TQ)(t);break;case i.W.WaitingLayer:(0,r.ej)(t.tiles,t.viewportTiles)&&(t.tilesAppearance=i.W.ByOne,(0,r.TQ)(t))}}function p(t){var e=t.tiles,n=t.viewportTiles,r=t.zoomDirection,u=t.zoomStartZoom,d=t.maxZoomLevel,h=t.zoomLevel,f=t.displayedMods;switch(r){case i.Y.Stationary:t.displayedMods=function(t,e){for(var n={},i=0,r=e;i<r.length;i++){var o=t[r[i]];a(o)&&l(n,o)}return n}(e,n);break;case i.Y.ZoomingIn:t.displayedMods=function(t,e,n,i,r){for(var u={},d=[],h=0,f=e;h<f.length;h++){var p=t[f[h]];if(a(p))l(u,p);else for(var m=p.detailLevel-1;m>=i;m--){var v=(0,o.xG)(t,p,m,r);if(void 0!==v&&!d.includes(v)&&a(v)&&s(v,n)){l(u,v),d.push(v);break}}}return c(u,d,t),u}(e,n,f,u,d);break;case i.Y.ZoomingOut:t.displayedMods=function(t,e,n,i,r,u){var d={},h=[],f=new Set(e);for(var p in t){var m=t[p];f.has(m.key)?a(m)&&(l(d,m),h.push(m)):m.detailLevel>r||m.detailLevel<i||f.has((0,o.pV)(m,i,u))&&a(m)&&s(m,n)&&(l(d,m),m.detailLevel<r&&h.push(m))}return c(d,h,t),d}(e,n,f,h,u,d)}}function m(t){var e=t.tiles,n=t.displayedMods,i=t.viewportTiles;for(var r in e)if(!i.includes(r)){var o=e[r],a=o.currentMod;a&&!n[a.key]&&(0,u.U9)(o)}}function v(t){switch(t.zoomDirection){case i.Y.ZoomingIn:(t.zoomLevel<=t.zoomStartZoom||_(t))&&(t.zoomDirection=i.Y.Stationary,t.zoomStartZoom=t.zoomLevel);break;case i.Y.ZoomingOut:(t.zoomLevel>=t.zoomStartZoom||_(t))&&(t.zoomDirection=i.Y.Stationary,t.zoomStartZoom=t.zoomLevel)}}function _(t){for(var e=t.tiles,n=t.viewportTiles,i=t.displayedMods,r=0;r<n.length;r++){var o=e[n[r]],a=(0,u.hW)(o);if(!a)return!1;if(void 0===i[a.key])return!1}return!0}},3166:function(t,e,n){"use strict";n.d(e,{YY:function(){return a},bj:function(){return s},TZ:function(){return l},I2:function(){return c},cA:function(){return u}});var i=n(6975),r=n(5715),o=n(5180);function a(t,e,n,a){var s;for(var l in n.selectedIds=a,n.tilesAppearance=i.W.WaitingLayer,(0,r.eh)(n),n.tiles){var c=n.tiles[l];(0,o.IF)(t,e,c,n.sourceId,null===(s=c.hover)||void 0===s?void 0:s.id,!0)}}function s(t,e,n,i){if(!e.disableHoverStyles){for(var r in n.tiles){var a=n.tiles[r];(0,o.IF)(t,e,a,n.sourceId,i)}t.labeler.disableThrottleUpdateOnce()}}function l(t,e){t.styleState=e,(0,r.eh)(t)}function c(t,e,n){t.tilesAppearance=i.W.GlobalWaiting,t.styleId=e,t.styleRevision=n,(0,r.eh)(t)}function u(t){t.tilesAppearance=i.W.ByOne,(0,r.TQ)(t)}},3378:function(t,e,n){"use strict";n.d(e,{o:function(){return l}});var i=n(6975),r=n(372),o=n(3526),a=n(1026),s=n(5715);function l(t,e){c(t,e.styleZoom,e.zoom),u(t,e.tilesBounds),d(t),(0,s.eh)(t)}function c(t,e,n){var r=(0,s.uk)(t.type,n,e),o=r-t.zoomLevel;t.zoomDirection===i.Y.Stationary&&(o>0?(t.zoomDirection=i.Y.ZoomingIn,t.zoomStartZoom=t.zoomLevel):o<0&&(t.zoomDirection=i.Y.ZoomingOut,t.zoomStartZoom=t.zoomLevel)),t.zoomLevel=r}function u(t,e){if(t.zoomLevel<t.minZoomLevel)t.viewportTiles=[];else{var n=(0,r.uZ)(t.zoomLevel,t.minZoomLevel,t.maxZoomLevel),i=(0,r.uZ)(t.zoomLevel,t.minDetailLevel,t.maxDetailLevel);t.viewportTiles=(0,o.b5)(e,n,i).map(o.gx)}}function d(t){var e=Math.round((Object.keys(t.displayedMods).length+t.viewportTiles.length)*a.tiles.cacheRatio);t.tileModsCacheMaxCount<e&&(t.tileModsCacheMaxCount=e),e>t.tileModsCacheMaxCount/2&&t.tileModsCache.setSize(e)}},5715:function(t,e,n){"use strict";n.d(e,{eh:function(){return d},ej:function(){return h},w1:function(){return f},lH:function(){return p},e:function(){return m},HM:function(){return v},y7:function(){return _},uk:function(){return y},d1:function(){return g},aq:function(){return b},TQ:function(){return w}});var i=n(372),r=n(5180),o=n(3526),a=n(2140),s=n(6975),l=n(7170),c=n(1026),u=n(2690);function d(t){var e=t.viewportTiles;for(var n in t.tiles)(0,r.bt)(t.tiles[n]);for(var i=0;i<e.length;i++){n=e[i];var a=t.tiles[n];a||(a=t.tiles[n]=(0,r.Tp)(t.type,(0,o.cL)(n),t.sourceId));var s=new u.l(t.selectedIds,t.styleState,a.revision,t.styleId,t.styleRevision);(0,r.a7)(a,s,t.tileModsCache)}}function h(t,e){for(var n=0;n<e.length;n++){var i=t[e[n]],o=(0,r.hW)(i);if(!o||!o.ready)return!1}return!0}function f(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needFetch&&(i.needFetch=!1,e.push(i))}return e}function p(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needAbortFetch&&(i.needAbortFetch=!1,e.push(i))}return e}function m(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needGenerate&&(i.needGenerate=!1,e.push(i))}return e}function v(t){var e=new Set(t.viewportTiles),n=new Set(t.tileModsCache.getData().map((function(t){return t.tile}))),i=[];for(var o in t.tiles){var a=t.tiles[o];!(0,r.LC)(a)||e.has(o)||t.zoomDirection!==s.Y.Stationary||n.has(a)||i.push(a)}return i}function _(t,e,n,i,r,o,c,u){var d=c.styleManager.getStyle(u.handyStyleId);return{type:t,sourceId:e,styleId:u.handyStyleId,styleRevision:(null==d?void 0:d.id)||0,styleState:u.styleState,minZoomLevel:n,maxZoomLevel:i,minDetailLevel:r,maxDetailLevel:o,tiles:{},viewportTiles:[],zoomLevel:y(t,u.zoom,u.styleZoom),zoomDirection:s.Y.Stationary,zoomStartZoom:0,tileModsCache:new a.L(0,(function(t,e){c.labeler.removeLabels(e.labelsKey),(0,l.Bp)(e,u)})),tileModsCacheMaxCount:0,selectedIds:[],displayedMods:{},tilesAppearance:s.W.ByOne,mapState:u,stopLabelAnimation:!1}}function y(t,e,n){return"raster"===t?Math.round(e):Math.floor(n)}function g(t){for(var e in t.tiles)(0,r.QT)(t.tiles[e],t.mapState);t.tiles={},t.viewportTiles=[],t.zoomDirection=s.Y.Stationary,t.tileModsCache.reset(),t.displayedMods={},t.tilesAppearance=s.W.ByOne}function b(t,e,n,r){var a=n.displayedMods,s=(0,i.$X)(a,r);s.forEach((function(n){if(void 0!==n.objects){var i=!0;for(var a in r)if((0,o.HL)(n.tile,r[a].tile)){i=!1;break}n.objects.forEach((function(n){t.addObject(n),i&&n.startTicker(e,c.tileAnimation.type,c.tileAnimation.time,0,1)}))}}));var l=(0,i.$X)(r,a);l.forEach((function(e){var n;void 0!==e.objects&&(e.objects.forEach((function(e){return t.removeObject(e)})),null===(n=e.tile.hover)||void 0===n||n.tileObjects.forEach((function(e){return t.removeObject(e)})))}));var u=s.length>0||l.length>0;return u&&(e.needLabeling=!0,e.needRerender=!0),u}function w(t){t.viewportTiles.forEach((function(e){return(0,r.bg)(t.tiles[e])}))}},5180:function(t,e,n){"use strict";n.d(e,{z3:function(){return i},Tp:function(){return h},IF:function(){return f},_v:function(){return m},LC:function(){return v},QT:function(){return _},U9:function(){return y},hW:function(){return g},bt:function(){return b},a7:function(){return w},qC:function(){return S},bg:function(){return I},b9:function(){return M},NQ:function(){return P}});var i,r=n(4590),o=n(7170),a=n(3526),s=n(8131),l=n(5233),c=n(1026),u=n(2690),d=n(2626);function h(t,e,n){return{type:t,sourceId:n,key:(0,a.gx)(e),labelsKey:t+"_"+n,coords:e,zoomLevel:e[2],detailLevel:e[3],needFetch:!1,revision:0,needAbortFetch:!1,needGenerate:!1,status:i.Initial,oldHoverTileObjects:[]}}function f(t,e,n,i,r,o){var u=[];n.oldHoverTileObjects.forEach((function(n){n.tickerFinished(e)?(t.tileManager.removeObject(n),n.clean(e)):u.push(n)})),n.oldHoverTileObjects=u,void 0!==r?e.performanceCaveatEmitted||(o||!n.hover||(0,s.v7)(n.hover.id,r))&&function(t,e,n,i,r){n.idSet&&n.idSet.has(i)&&function(t,e){return Math.min(Math.floor(t.styleZoom),c.tiles.maxDetailLevel)===e.coords[3]}(e,n)?function(t,e,n,i){var r=e.newMod||e.currentMod,o=t.map.state,s={tileInfo:(0,a.Bs)(e.coords),pixelRatio:self.devicePixelRatio,selectedIds:(null==r?void 0:r.params.getSelectedIds())||[],styleId:o.handyStyleId,styleState:o.styleState,floorsEnabled:t.map.state.floorsEnabled,hoverId:n,sourceId:i};return t.workers.parser.generateTile(s)}(t,n,i,r).then((function(r){p(t,n,e);var o={id:i,tileObjects:[],generatedData:[]},a=[];r.results.forEach((function(i){var r=new l.W("hover",i.collectorOutput.data,t.renderer,n.coords),s=i.collectorOutput,u=s.packedRasters,d=s.rastersToLoad;void 0!==u&&t.assetManager.prepareRasters(i.styleId,u),t.assetManager.loadRasters(d),o.tileObjects.push(r),t.tileManager.addObject(r),r.startTicker(e,c.houseHover.inAnimationType,c.houseHover.inAnimationTime,0,1),i.collectorOutput.labels.length&&a.push({metatileHash:i.metatileHash,labels:i.collectorOutput.labels,styleId:i.styleId})})),o.generatedData=r.results,t.labeler.addLabels("label_hover",d.AL.Tile,a),t.identifier.debouncedFillCache(),n.hover=o})):p(t,n,e)}(t,e,n,r,i):p(t,n,e)}function p(t,e,n){e.hover&&(e.hover.tileObjects.forEach((function(t){e.oldHoverTileObjects.push(t),t.startTicker(n,c.houseHover.outAnimationType,c.houseHover.outAnimationTime,1,0)})),e.hover=void 0,t.labeler.removeLabels("label_hover"),t.identifier.debouncedFillCache())}function m(t){if(t.newMod&&t.newMod.needGenerate)return t.newMod.needGenerate=!1,t.newMod}function v(t){return(!t.currentMod||(0,o.jW)(t.currentMod))&&(!t.newMod||(0,o.jW)(t.newMod))}function _(t,e){t.currentMod&&(0,o.Bp)(t.currentMod,e),t.newMod&&(0,o.Bp)(t.newMod,e)}function y(t){t.currentMod=void 0}function g(t){return t.currentMod&&t.currentMod.useful?t.currentMod:t.newMod&&t.newMod.useful?t.newMod:void 0}function b(t){t.currentMod&&(t.currentMod.useful=!1),t.newMod&&(t.newMod.useful=!1)}function w(t,e,n){if(t.idSet&&e.setTileIds(t.idSet),t.currentMod||t.newMod){if(t.currentMod&&u.l.equal(t.currentMod.params,e))return t.currentMod.useful=!0,void(t.newMod=void 0);t.newMod&&u.l.equal(t.newMod.params,e)?t.newMod.useful=!0:x(t,e,n)}else x(t,e,n)}function x(t,e,n){var i=(0,a.vl)(t.coords,e),r=n.get(i);r?(t.newMod=r,t.newMod.useful=!0):(t.newMod=(0,o.es)(t,i,e),t.idSet&&t.newMod.params.setTileIds(t.idSet))}function S(t,e,n,r){switch(t.status){case i.Initial:t.newMod&&t.newMod.useful&&(t.status=i.Loading,t.needFetch=!0);break;case i.Loading:t.newMod&&t.newMod.useful?t.serverMetadata&&(t.status=i.Loaded):(t.status=i.Initial,t.needAbortFetch=!0);case i.Loaded:}t.currentMod&&(0,o.zL)(t.currentMod,e,n,r),t.newMod&&((0,o.zL)(t.newMod,e,n,r),t.newMod.needGenerate&&(t.needGenerate=!0))}function I(t){t.newMod&&t.newMod.ready&&(t.currentMod=t.newMod,t.newMod=void 0)}function M(t){var e=new r.c;return t.forEach((function(t){e.addFromFlatArray(t.collectorOutput.geoIds)})),e}function P(t){t.status===i.Loading&&(t.needAbortFetch=!0),t.status=i.Initial,t.serverMetadata=void 0,t.revision++}!function(t){t[t.Initial=0]="Initial",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded"}(i||(i={}))},558:function(t,e,n){"use strict";n.d(e,{I:function(){return m}});var i=n(655),r=n(3526),o=n(3378),a=n(5180),s=n(7170),l=n(5582),c=n(2626),u=n(5715),d=n(4524),h=n(3166),f=n(6975);function p(t){t.tilesAppearance=f.W.WaitingLayer,t.stopLabelAnimation=!0,Object.keys(t.tiles).forEach((function(e){(0,a.NQ)(t.tiles[e])})),(0,u.eh)(t)}var m=function(){function t(t,e,n,i,r,o,a){this.modules=r,this.mapState=o,this.prevStyleState=o.styleState,this.sourceCore=a,this.gridState=(0,u.y7)(a.type,a.id,t,e,n,i,r,this.mapState)}return t.prototype.destroy=function(){(0,u.d1)(this.gridState)},t.prototype.redraw=function(){(0,u.d1)(this.gridState),(0,o.o)(this.gridState,this.mapState)},t.prototype.getDisplayedIdentifyData=function(){var t,e,n=[],i=function(i){var o=r.gridState.displayedMods[i];null===(t=o.generatedData)||void 0===t||t.concat((null===(e=o.tile.hover)||void 0===e?void 0:e.generatedData)||[]).forEach((function(t){return n.push({ids:t.collectorOutput.identifyIds,metatileHash:t.metatileHash,sourceId:o.tile.sourceId,tileKey:o.tile.key})}))},r=this;for(var o in this.gridState.displayedMods)i(o);return n},t.prototype.getLabelingData=function(){var t={sourceId:this.gridState.sourceId,animate:!this.gridState.stopLabelAnimation,labelsKeys:[]};for(var e in this.gridState.displayedMods){var n=this.gridState.displayedMods[e];t.labelsKeys.push(n.labelsKey)}return this.gridState.stopLabelAnimation&&this.viewportTilesReady()&&(this.gridState.stopLabelAnimation=!1),t},t.prototype.getViewportTiles=function(){for(var t=[],e=this.gridState.viewportTiles,n=0;n<e.length;n++){var i=this.gridState.tiles[e[n]];i&&t.push(i)}return t},t.prototype.viewportTilesReady=function(){return(0,u.ej)(this.gridState.tiles,this.gridState.viewportTiles)},t.prototype.displayedTilesAnimationFinished=function(){for(var t in this.gridState.displayedMods){var e=this.gridState.displayedMods[t];if(e.objects)for(var n=0,i=e.objects;n<i.length;n++)if(!i[n].tickerFinished(this.mapState))return!1}return!0},t.prototype.activateStyleUpdating=function(){(0,h.I2)(this.gridState,this.mapState.handyStyleId,this.modules.styleManager.getStyleRevision(this.mapState.handyStyleId))},t.prototype.finishStyleUpdating=function(){(0,h.cA)(this.gridState)},t.prototype.setSelectedIds=function(){(0,h.YY)(this.modules,this.mapState,this.gridState,this.mapState.selectedIds)},t.prototype.setHoverId=function(t){(0,h.bj)(this.modules,this.mapState,this.gridState,t)},t.prototype.resetHoverId=function(){(0,h.bj)(this.modules,this.mapState,this.gridState)},t.prototype.onSourceDataChange=function(){p(this.gridState)},t.prototype.getTileCount=function(){var t=0;for(var e in this.gridState.displayedMods){var n=this.gridState.displayedMods[e].objects;void 0!==n&&(t+=n.length)}return t},t.prototype.isBlank=function(){for(var t=0,e=this.gridState.viewportTiles;t<e.length;t++){var n=e[t],i=this.gridState.tiles[n],r=i.serverMetadata;if(void 0!==r&&0!==r.length){var o=(0,a.hW)(i);if(o&&o.ready)return!1}}return!0},t.prototype.updateViewport=function(){(0,o.o)(this.gridState,this.mapState)},t.prototype.update=function(){var t=(0,i.pi)({},this.gridState.displayedMods);this.mapState.styleState!==this.prevStyleState&&(0,h.TZ)(this.gridState,this.mapState.styleState),(0,d.r)(this.gridState,this.mapState,this.modules),this.fetch((0,u.w1)(this.gridState)),this.abortFetch((0,u.lH)(this.gridState)),this.generate((0,u.e)(this.gridState)),this.clearTiles((0,u.HM)(this.gridState)),(0,u.aq)(this.modules.tileManager,this.mapState,this.gridState,t)},t.prototype.fetch=function(t){var e=this;t.sort((function(t,n){return(0,r.qu)(e.mapState.center,t,n)})).forEach((function(t){e.sourceCore.fetchTile(t.coords,e.mapState).then((function(e){t.status===a.z3.Loading&&(t.serverMetadata=e)}))}))},t.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){return e.sourceCore.abortTileFetch(t.coords)}))},t.prototype.generate=function(t){var e=this,n=[];t.sort((function(t,n){return(0,r.qu)(e.mapState.center,t,n)})).forEach((function(t){var i=(0,a._v)(t);if(i){var r={tileCoords:t.coords,selectedIds:i.params.getSelectedIds(),styleId:i.params.styleId};n.push(r),e.sourceCore.generateTile(e.mapState,r.tileCoords,r.styleId,r.selectedIds,devicePixelRatio).then((function(n){var r=n.results;r.forEach((function(t){var n=t.styleId,i=t.metatileHash,r=t.regionId,o=t.collectorOutput,a=o.packedRasters,s=o.rastersToLoad,c=o.floorHidingMap;void 0!==a&&e.modules.assetManager.prepareRasters(n,a),e.modules.assetManager.loadRasters(s),e.modules.floorManager.prepareFloors(r,i,new l.g(c),e.sourceCore.type)})),t.idSet=(0,a.b9)(r),(0,s.aK)(i,r,t.idSet),e.modules.labeler.addTileLabels(i.labelsKey,c.AL.Tile,(0,s.Hd)(i))}))}})),"terrain"===this.sourceCore.type&&(n.forEach((function(t){e.sourceCore.generateTile(e.mapState,t.tileCoords,t.styleId,t.selectedIds,devicePixelRatio,{generateOnlySelectedPoi:!0}).then((function(t){t.results.forEach((function(t){var n=t.collectorOutput,i=t.styleId,r=n.packedRasters,o=n.rastersToLoad;void 0!==r&&e.modules.assetManager.prepareRasters(i,r),e.modules.assetManager.loadRasters(o)}))}))})),n.forEach((function(t){e.sourceCore.generateTile(e.mapState,t.tileCoords,t.styleId,t.selectedIds,devicePixelRatio,{generateOnlyHoveredPoi:!0}).then((function(t){t.results.forEach((function(t){var n=t.collectorOutput,i=t.styleId,r=n.packedRasters,o=n.rastersToLoad;void 0!==r&&e.modules.assetManager.prepareRasters(i,r),e.modules.assetManager.loadRasters(o)}))}))})))},t.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.sourceCore.deleteTile(i.coords),delete this.gridState.tiles[i.key]}},t}()},7170:function(t,e,n){"use strict";n.d(e,{es:function(){return a},aK:function(){return s},Hd:function(){return l},Bp:function(){return c},jW:function(){return u},zL:function(){return d}});var i,r=n(5233),o=n(1026);function a(t,e,n){return{key:e,labelsKey:t.labelsKey+"_"+e,useful:!0,ready:!1,needGenerate:!1,tile:t,status:i.Initial,params:n.clone()}}function s(t,e,n){t.status===i.Generating&&(t.generatedData=e),n&&t.params.setTileIds(n)}function l(t){var e=t.generatedData,n=[];if(!e)return n;for(var i=0;i<e.length;i++){var r=e[i];r.collectorOutput.labels&&n.push({metatileHash:r.metatileHash,labels:r.collectorOutput.labels,styleId:r.styleId})}return n}function c(t,e){t.status=i.Initial,t.generatedData=void 0,void 0!==t.objects&&t.objects.forEach((function(t){return t.clean(e)})),t.objects=void 0,t.ready=!1,t.tile.currentMod===t&&(t.tile.currentMod=void 0)}function u(t){return t.status===i.Initial}function d(t,e,n,a){var s=a.renderer;switch(t.status){case i.Initial:t.useful&&(t.status=i.Loading);break;case i.Loading:t.useful?t.tile.serverMetadata&&(t.status=i.Loaded):t.status=i.Initial;break;case i.Loaded:(function(t,e,n){switch(t.tile.type){case"terrain":return Boolean(t.useful&&t.tile.serverMetadata&&function(t,e,n){for(var i=n.assetManager,r=n.modelLayer,a=0;a<t.length;a++){var s=t[a],l=s.regionId,c=s.metatileHash;if(!i.getMetatile(c)||e.styleZoom>o.loadModelsInfoStyleZoom&&!r.isModelsInfoLoaded(l))return!1}return!0}(t.tile.serverMetadata,e,n));case"traffic":return Boolean(t.useful&&t.tile.serverMetadata);case"raster":case"geojson":case"dem":return Boolean(t.useful);default:return!1}})(t,n,a)&&(t.status=i.Generating,t.needGenerate=!0);break;case i.Generating:t.generatedData&&(t.status=i.Generated,t.ready=!0,t.objects=t.generatedData.map((function(e){var n=e.collectorOutput.data;return new r.W(t.tile.type,n,s,t.tile.coords)})),e.add(t.key,t))}}!function(t){t[t.Initial=0]="Initial",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Generating=3]="Generating",t[t.Generated=4]="Generated"}(i||(i={}))},2690:function(t,e,n){"use strict";n.d(e,{l:function(){return s}});var i=n(655),r=n(8131),o=n(372),a=n(3526),s=function(){function t(t,e,n,r,o){this.selectedIds=t.slice(),this.styleState=(0,i.pi)({},e),this.tileRevision=n,this.styleRevision=o,this.styleId=r}return t.equal=function(t,e){return t.tileRevision===e.tileRevision&&t.styleId===e.styleId&&t.styleRevision===e.styleRevision&&(0,r.y5)(t.getSelectedIds(),e.getSelectedIds())&&(0,o.vZ)(t.styleState,e.styleState)},t.prototype.clone=function(){return new t(this.selectedIds,this.styleState,this.tileRevision,this.styleId,this.styleRevision)},t.prototype.stringify=function(){var t=this.selectedIds.map((function(t){return t.lo+","+t.hi})).join("|");return"sId="+this.styleId+"_sRev="+this.styleRevision+"_tRev="+this.tileRevision+"_sel="+t+"_sSt="+JSON.stringify(this.styleState)},t.prototype.getSelectedIds=function(){return this.tileIds?(0,a.vX)(this.selectedIds,this.tileIds):this.selectedIds.slice()},t.prototype.setTileIds=function(t){this.tileIds=t},t}()},5233:function(t,e,n){"use strict";n.d(e,{W:function(){return f}});var i=n(127),r=n(9450),o=n(3526),a=n(6384),s=n(7322),l=n(5951);function c(t,e,n){var i=new s.Z(n);i.drawType=s.Z.StaticDraw,i.prepare(t.getRenderingContext());var r=[];return e.forEach((function(e){var n=t.getShaderProgram(e.programName);r.push(e.vaoCreator(i,n))})),{buffer:i,vaos:r}}var u=n(242),d=n(258),h=0,f=function(){function t(t,e,n,r,o){void 0===r&&(r=[0,0,0,0]),this.tickerName="tile-fade-"+t+"-"+h++,this.readiness=1,this.purpose=t,this.dynamicObject=o,this.mvpMatrix=new Float32Array(i.Ue()),this.demMvpMatrix=new Float32Array(i.Ue()),this.setTileCoords(r);var s=function(t,e,n){for(var i=[],r=[],o=[],s=0;s<e.length;s++){var u=e[s],d=u.symbol,h=u.sink,f=u.generatedObjects,p=u.buffer,m=t.symbolSettingsList[d];if(void 0!==m){var v=m[h];if(void 0!==v){var _=c(t,v,p),y=_.buffer,g=_.vaos;i.push(y);for(var b=0;b<f.length;b++)for(var w=f[b],x=w.rangeStart,S=w.rangeEnd,I=w.attributes,M=l.kF[d].sinks[h].unpackObjectAttributes(I),P=0;P<v.length;P++){var T=v[P],L=T.uniformSet||"fill",E={type:a.H.Tile,layerSettings:T,stride:(0,l.vP)(d,h),rangeStart:x,rangeEnd:S,attributes:M,attributesHash:JSON.stringify(I)+"_"+L+"_"+n.detailLevel,vao:g[P],tile:n,symbol:d,sink:h};T.identify?o.push(E):r.push(E)}}}}return{buffers:i,objects:r,identifyObjects:o}}(n,e,this),u=s.buffers,d=s.objects,f=s.identifyObjects;this.buffers=u,this.children=d,this.identifyChildren=f}return t.prototype.setTileCoords=function(t){var e=t[2],n=t[3],a=(0,o.aq)(e);this.size=a,this.zoomLevel=e,this.detailLevel=n,this.modelMatrix=i.wA(i.Ue(),(0,o.Oy)(t),r.al(a,a,u._9))},t.prototype.updateMvpMatrix=function(t){i.dC(this.mvpMatrix,t,this.modelMatrix)},t.prototype.updateDemMvpMatrix=function(t){i.dC(this.demMvpMatrix,t,this.modelMatrix)},t.prototype.startTicker=function(t,e,n,i,r){d.BL(this.tickerName,{easing:e},t,i,r,n)},t.prototype.updateTicker=function(t){var e=this;d.Vx(this.tickerName,{step:function(t,n){e.readiness=n}},t)},t.prototype.tickerFinished=function(t){return!d.rS(this.tickerName,t)},t.prototype.clean=function(t){for(var e=0,n=this.buffers;e<n.length;e++)n[e].remove();this.buffers=[],this.children=[],this.identifyChildren=[],d.sT(this.tickerName,t)},t}()},2714:function(t,e,n){"use strict";function i(t){return t}n.d(e,{D:function(){return i}})},2626:function(t,e,n){"use strict";var i,r,o,a,s;n.d(e,{a_:function(){return i},_r:function(){return r},AL:function(){return o},m3:function(){return a},Dl:function(){return s}}),function(t){t[t.Common=0]="Common",t[t.Commercial=1]="Commercial",t[t.Landmark=2]="Landmark"}(i||(i={})),function(t){t[t.Point=0]="Point",t[t.Line=1]="Line"}(r||(r={})),function(t){t[t.Tile=0]="Tile",t[t.Floor=1]="Floor",t[t.DynamicObject=2]="DynamicObject",t[t.PersonalPoi=3]="PersonalPoi"}(o||(o={})),function(t){t[t.Dead=0]="Dead",t[t.Alive=1]="Alive",t[t.Unused=2]="Unused",t[t.CommercialAlive=3]="CommercialAlive",t[t.CommercialDead=4]="CommercialDead"}(a||(a={})),function(t){t[t.Text=0]="Text",t[t.Icon=1]="Icon",t[t.PoiText=2]="PoiText",t[t.PoiText2=3]="PoiText2",t[t.OneWayLine=4]="OneWayLine",t[t.LineText=5]="LineText",t[t.Box=6]="Box"}(s||(s={}))},2267:function(t,e,n){"use strict";var i;n.d(e,{f:function(){return i}}),function(t){t[t.Static=0]="Static",t[t.Unique=1]="Unique",t[t.Loaded=2]="Loaded"}(i||(i={}))},6384:function(t,e,n){"use strict";var i;n.d(e,{H:function(){return i}}),function(t){t[t.Tile=0]="Tile",t[t.Custom=1]="Custom"}(i||(i={}))},6975:function(t,e,n){"use strict";var i,r;n.d(e,{Y:function(){return i},W:function(){return r}}),function(t){t[t.Stationary=0]="Stationary",t[t.ZoomingIn=1]="ZoomingIn",t[t.ZoomingOut=2]="ZoomingOut"}(i||(i={})),function(t){t[t.ByOne=0]="ByOne",t[t.WaitingLayer=1]="WaitingLayer",t[t.GlobalWaiting=2]="GlobalWaiting"}(r||(r={}))},4773:function(t,e,n){"use strict";function i(t,e){var n=new XMLHttpRequest;if(n.open("GET",t.url,!0),n.responseType="arraybuffer",t.headers)for(var i in t.headers)n.setRequestHeader(i,t.headers[i]);return n.onerror=function(){e({status:0,message:"Network error"},new ArrayBuffer(0))},n.onload=function(){n.status>=200&&n.status<300&&n.response?e(void 0,n.response):e({status:n.status,message:n.statusText},new ArrayBuffer(0))},n.send(),n}function r(t,e){var n=new XMLHttpRequest;if(n.open("GET",t.url,!0),t.headers)for(var i in t.headers)n.setRequestHeader(i,t.headers[i]);return n.onerror=function(){e({status:0,message:"Network error"},{})},n.onload=function(){if(0===n.response.byteLength&&200===n.status)return e({status:0,message:"No content"},{});if(n.status>=200&&n.status<300&&n.response&&n.response.length){var i=void 0;try{i=JSON.parse(n.response),e(void 0,i)}catch(n){e({status:0,message:"Json parse data error from url "+t.url},{})}}else e({status:n.status,message:n.statusText},{})},n.send(),n}n.d(e,{n:function(){return i},L:function(){return r}})},372:function(t,e,n){"use strict";n.d(e,{uZ:function(){return a},Xx:function(){return s},Te:function(){return l},Id:function(){return c},ZY:function(){return u},Kv:function(){return d},AB:function(){return h},kn:function(){return f},l4:function(){return p},$X:function(){return m},sB:function(){return v},vO:function(){return _},Kh:function(){return y},TH:function(){return g},vZ:function(){return b},VJ:function(){return w},t7:function(){return x}});var i=n(655),r=n(9450),o=n(1859);function a(t,e,n){return t=Math.max(t,e),Math.min(t,n)}function s(t){return 0==(t=+t)||Number.isNaN(t)?t:t>0?1:-1}function l(t,e){return[e[0]/t[0]*2-1,-e[1]/t[1]*2+1]}function c(t){return t*Math.PI/180}function u(t){return t/Math.PI*180}function d(t,e,n){void 0!==n.zoom&&(n.zoom=a(n.zoom,t.minZoom,t.maxZoom));var s=new o.V(t),l=s.unproject(e);s.setState((0,i.pi)((0,i.pi)({},t),n));var c=s.unproject(e),u=r.Ue();return r.lu(u,l,c),u}function h(t){return t>>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16)}function f(t,e){var n=(0,i.pi)({},e);for(var r in t)void 0!==t[r]&&(n[r]=t[r]);return n}function p(t){var e={};for(var n in t)e[t[n]]=n;return e}function m(t,e){var n=[];for(var i in t)e[i]||n.push(t[i]);return n}function v(t,e,n){return a((n-t)/(e-t),0,1)}function _(t){return t%1}function y(t,e,n){return t>=e&&t<=n}function g(t,e){if(t.size!==e.size)return!1;for(var n=0,i=Array.from(t);n<i.length;n++){var r=i[n];if(!e.has(r))return!1}return!0}function b(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var n=Array.isArray(t),i=Array.isArray(e),r=void 0,o=void 0,a=void 0;if(n&&i){if((o=t.length)!==e.length)return!1;for(r=o;0!=r--;)if(!b(t[r],e[r]))return!1;return!0}if(n!==i)return!1;var s=t instanceof Date,l=e instanceof Date;if(s!==l)return!1;if(s&&l)return t.getTime()===e.getTime();var c=t instanceof RegExp,u=e instanceof RegExp;if(c!==u)return!1;if(c&&u)return t.toString()===e.toString();var d=Object.keys(t);if((o=d.length)!==Object.keys(e).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,d[r]))return!1;for(r=o;0!=r--;)if(!b(t[a=d[r]],e[a]))return!1;return!0}return t!=t&&e!=e}function w(t,e){var n=t.indexOf(e);return-1!==n&&(t.splice(n,1),!0)}function x(t,e,n){return t+(e-t)*n}},3795:function(t,e,n){"use strict";n.d(e,{cX:function(){return s}}),n(7322),n(1026);var i=n(3936),r=n(5109),o=n(5951),a=n(5465);function s(t,e){var n=65535,s=[new Uint16Array([0,n,n,0,0]),new Uint16Array([0,0,n,n,0])],l=(0,i.FJ)({});(0,o.XI)({collector:t,generator:a.z.generate,args:[i.jf,e,r.Dz,l,s]})}},3410:function(t,e,n){"use strict";n.d(e,{dm:function(){return w},rq:function(){return x},JA:function(){return b},Xq:function(){return S}});var i=n(3614),r=n.n(i),o=n(9899),a=n(789),s=function(){this.name="",this.range="",this.glyphs={}},l=function(){this.id=0,this.range=0,this.bitmap=null,this.top=0,this.left=0,this.advance=0,this.x=0,this.y=0,this.width=0,this.height=0,this.texTop=0,this.texLeft=0,this.texRight=0,this.texBottom=0},c=function(t,e){this.stacks=t.readFields(u,[],e)};function u(t,e,n){if(1===t){var i=n.readMessage(d,new s);e.push(i)}}function d(t,e,n){switch(t){case 1:e.name=n.readString();break;case 2:e.range=n.readString();break;case 3:var i=n.readMessage(h,new l);e.glyphs[i.id]=i}}function h(t,e,n){switch(t){case 1:e.id=n.readVarint(),e.range=(0,a.rx)(e.id);break;case 2:e.bitmap=n.readBytes();break;case 3:e.width=n.readVarint()+6;break;case 4:e.height=n.readVarint()+6;break;case 5:e.left=n.readSVarint()-3;break;case 6:e.top=n.readSVarint()+17+3;break;case 7:e.advance=n.readVarint()}}var f=n(3540),p=n(372),m=n(1026),v=n(6328),_=n(7624),y=n(242),g=function(t,e,n){for(var i=[],r=0,o=0;o<t.length;o++){var a=t.charCodeAt(o),s=e&&e[a];s?(i.push(s),r+=s.advance):a!==m.fonts.bomCharCode&&(0,v.Q7)(t[o],a)}this.glyphs=i,this.width=r+m.fonts.baseSize*n*(t.length-1)};function b(t,e,n){for(var i={lines:[],maxWidth:0},r=t.split("\n"),o=0;o<r.length;o++){var a=new g(r[o],n,e);i.lines.push(a),a.width>i.maxWidth&&(i.maxWidth=a.width)}return i}function w(t,e,n){for(var i=0,r=e;i<r.length;i++){var o=r[i];if(!n.has(t,o))return!1}return!0}function x(t,e,n){if(void 0!==t){var i=(0,_.Q9)(t,e);if(""!==i)return void 0===n.fontNameToIndex[i]?y.Uo:i}}function S(t){var e=new c(new(r())(new Uint8Array(t))).stacks[0].glyphs,n=function(t){for(var e=[],n=new o.Z(512,512,{autoResize:!0}),i=Object.keys(t),r=0;r<i.length;r++)(a=t[i[r]]).bitmap&&e.push({glyph:a,width:a.width,height:a.height});for(n.pack(e,{inPlace:!0}),n.shrink(),r=0;r<e.length;r++){var a;(a=e[r].glyph).x=e[r].x,a.y=e[r].y}return{width:(0,p.AB)(n.w),height:(0,p.AB)(n.h)}}(e),i=n.width,a=n.height;!function(t,e,n){for(var i=Object.keys(t),r=0;r<i.length;r++){var o=t[i[r]];o.bitmap&&(o.texTop=(0,f.Bb)(o.y/n),o.texLeft=(0,f.Bb)(o.x/e),o.texBottom=(0,f.Bb)((o.y+o.height)/n),o.texRight=(0,f.Bb)((o.x+o.width)/e))}}(e,i,a);var s=function(t,e,n){for(var i=new Uint8Array(e*n),r=Object.keys(t),o=0;o<r.length;o++){var a=t[r[o]];if(a.bitmap)for(var s=0;s<a.height;s++)for(var l=e*(a.y+s)+a.x,c=a.width*s,u=0;u<a.width;u++)i[l+u]=a.bitmap[c+u]}return i.buffer}(e,i,a);return{glyphData:e,bitmap:s,width:i,height:a}}},3308:function(t,e,n){"use strict";n.d(e,{Ax:function(){return u},yq:function(){return d},PA:function(){return h},pc:function(){return f},r9:function(){return p},nn:function(){return m},EO:function(){return v},X$:function(){return y},Z3:function(){return g},Qn:function(){return b},a4:function(){return w},Xg:function(){return x},vn:function(){return S},XV:function(){return I},Vv:function(){return M},h0:function(){return P},ik:function(){return T},to:function(){return L},gr:function(){return z},Iy:function(){return C},$X:function(){return A},v3:function(){return D}});var i=n(378),r=n(9450),o=n(1026),a=n(242),s=n(372),l=n(7120),c=n(1859),u=40075e3;function d(t){var e=a.sX/2,n=Math.sin((0,s.Id)(t[1])),i=t[0]*a.sX/360,o=Math.log((1+n)/(1-n))*a.sX/(4*Math.PI);return r.al((0,s.uZ)(i,-e,e),(0,s.uZ)(o,-e,e),0)}function h(t){var e=[0,0];e[0]=360*t[0]/a.sX;var n=-2*Math.PI/a.sX;return e[1]=90-2*(0,s.ZY)(Math.atan(Math.exp(t[1]*n))),e}function f(t){return Math.max(t,o.camera.minCalculationScreenHeight)}function p(t,e){return f(e[1])*a.sX/(2*a.y4*Math.tan((0,s.Id)(o.camera.fov)/2)*Math.pow(2,t))}function m(t,e){return Math.log(f(e[1])*a.sX/(2*a.y4*Math.tan((0,s.Id)(o.camera.fov)/2)*t))/Math.LN2}function v(t){return a.Cd*Math.pow(2,-t)}function _(t){var e=h(t)[1],n=1/(2*Math.cos((0,s.Id)(e)));return Math.log(n)/Math.log(2)}function y(t,e){var n=_(e)*(0,s.sB)(9,10,t);return t+(0,s.uZ)(n,-1,0)}function g(t,e){var n=_(e),i=n*(0,s.sB)(9,10+n,t);return t-(0,s.uZ)(i,-1,0)}function b(t,e){return a.LF*(t/a.$U)/e}function w(t,e){return e*(a.sX/u)*x(t[1])}function x(t){return 1/Math.cos((0,s.Id)(t))}function S(t,e){var n=Math.PI/180,i=t[1]*n,r=e[1]*n,o=Math.sin((e[1]-t[1])*n/2),a=Math.sin((e[0]-t[0])*n/2),s=o*o+Math.cos(i)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return Math.round(6371e3*l)}function I(t){var e=0;if(t.length>1)for(var n=0;n<t.length-1;n++)e+=S(t[n],t[n+1]);return e}var M=l.Ue([-a.sX/2,-a.sX/2],[a.sX/2,a.sX/2]);function P(t,e){return t*Math.pow(2,-e)*a.sX/a.y4}function T(t,e){return t*Math.pow(2,e)*a.y4/a.sX}function L(t,e){return 0===t?-1/0:-Math.log(e*a.y4/(t*a.sX))/Math.LN2}var E=i.Ue(),k=i.Ue();function z(t,e,n){i.$X(E,n,t),i.$X(k,e,t);var r=i.AK(E,k)/i.kE(E);return Math.atan2(r,t[2])}function C(t){var e=t[0],n=t[1];return(0,s.Kh)(e,-180,180)&&(0,s.Kh)(n,-90,90)}function A(t,e,n,i,r,o,a,l,u,f){void 0===a&&(a={top:0,right:0,bottom:0,left:0}),void 0===l&&(l={top:0,right:0,bottom:0,left:0});var p=new c.V({center:d(t),zoom:e,rotation:(0,s.Id)(n),size:i,pitch:(0,s.Id)(r),viewport:a,padding:l}),m=h(p.unproject(o)),v=h(p.unproject([o[0]+u,o[1]+f]));return Math.max(1,S(m,v))}function D(t){var e=2*Math.PI;return(t%=e)<0&&(t+=e),t}},6328:function(t,e,n){"use strict";n.d(e,{Q7:function(){return r},cM:function(){return a}});var i=n(789);function r(t,e){a("No glyph for character "+t+" (code = "+e+", range = "+(0,i.rx)(e)+")")}var o=new Set;function a(t){o.has(t)||(console.log(t),o.add(t))}},7120:function(t,e,n){"use strict";n.d(e,{Ue:function(){return a},X3:function(){return s},aM:function(){return l},JG:function(){return c},mc:function(){return u},be:function(){return d},Rk:function(){return h},r3:function(){return f},kK:function(){return p}});var i=n(378),r=n(372),o=n(3308);function a(t,e){return{min:t||i.al(1/0,1/0),max:e||i.al(-1/0,-1/0)}}function s(t){return a((0,o.yq)(t.southWest),(0,o.yq)(t.northEast))}function l(t,e){i.VV(t.min,t.min,e),i.Fp(t.max,t.max,e)}function c(t,e){t.min[0]=e.min[0],t.max[0]=e.max[0],t.min[1]=e.min[1],t.max[1]=e.max[1]}function u(t){t.min[0]=1/0,t.max[0]=-1/0,t.min[1]=1/0,t.max[1]=-1/0}function d(t,e){t[0]=e.min[0]+(e.max[0]-e.min[0])/2,t[1]=e.min[1]+(e.max[1]-e.min[1])/2}function h(t,e,n){t[0]=(0,r.uZ)(n[0],e.min[0],e.max[0]),t[1]=(0,r.uZ)(n[1],e.min[1],e.max[1])}function f(t,e){return e[0]<=t.max[0]&&e[0]>=t.min[0]&&e[1]<=t.max[1]&&e[1]>=t.min[1]}function p(t,e){var n=t.min[0]<=e.max[0]&&e.min[0]<=t.max[0],i=t.min[1]<=e.max[1]&&e.min[1]<=t.max[1];return n&&i}},8764:function(t,e,n){"use strict";n.d(e,{hS:function(){return a},Oy:function(){return s},iE:function(){return l},z_:function(){return h},Jh:function(){return f},Z4:function(){return p}});var i=n(9450),r=n(378),o=n(7120);function a(t,e){return{a:t[1]-e[1],b:e[0]-t[0],c:t[0]*e[1]-e[0]*t[1]}}function s(t,e){return Math.abs(l(t,e))}function l(t,e){return(e.a*t[0]+e.b*t[1]+e.c)/Math.sqrt(e.a*e.a+e.b*e.b)}function c(t,e,n){var r=a(t,e),o=r.a,s=r.b,l=r.c;return i.al(-(s*n+l)/o,n,0)}var u=o.Ue(),d=o.Ue();function h(t,e,n){for(var i,o=e[e.length-1]*n,a=t[0],s=0,l=[a],c=1;c<t.length&&!i;){var u=t[c],d=e[c],h=u;if(d>o){if(!i){var f=(o-s)/(d-s);i=[],r.t7(i,a,u,f)}h=i}l.push(h),a=h,s=e[c],c++}return l}function f(t,e){var n=t[0];o.mc(u),o.aM(u,n);for(var r,s,l,h,f,p=[n],m=[p],v=1;v<t.length;){var _=t[v],y=!1,g=_;o.JG(d,u),o.aM(d,g),d.max[0]-d.min[0]>e&&(r=d.max[0]===g[0]?d.min[0]+e:d.max[0]-e,s=void 0,l=void 0,h=void 0,f=void 0,l=(s=a(n,g)).a,h=s.b,f=s.c,g=i.al(r,-(l*r+f)/h,0),y=!0),y&&(o.JG(d,u),o.aM(d,g)),d.max[1]-d.min[1]>e&&(g=c(n,g,d.max[1]===g[1]?d.min[1]+e:d.max[1]-e),y=!0),y?(p.push(g),o.mc(u),o.aM(u,g),p=[g],m.push(p),n=g):(p.push(_),o.aM(u,_),n=_,v++)}return m}function p(t,e,n){var i=t[0]-e[0],r=t[1]-e[1],o=n[0]-e[0],a=n[1]-e[1],s=o*o+a*a,l=0!==s?(i*o+r*a)/s:0;return l<0?e:l>1?n:[e[0]+l*o,e[1]+l*a]}},5275:function(t,e,n){"use strict";n.d(e,{B:function(){return o},M:function(){return a}});var i=n(7120),r=n(8764);function o(t){var e=t[0][0],n=t[0][1],i=t[1][0],r=t[1][1],o=t[2][0],a=t[2][1],s=t[3][0],l=t[3][1];return{min:[Math.min(e,i,o,s),Math.min(n,r,a,l)],max:[Math.max(e,i,o,s),Math.max(n,r,a,l)]}}function a(t,e){var n=o(t);if(!(0,i.kK)(e,n))return!1;for(var a=[(0,r.hS)(t[3],t[2]),(0,r.hS)(t[1],t[0]),(0,r.hS)(t[0],t[3]),(0,r.hS)(t[2],t[1])],s=[e.min,e.max,[e.min[0],e.max[1]],[e.max[0],e.min[1]]],l=0,c=a;l<c.length;l++){for(var u=c[l],d=!0,h=0;h<s.length;h++){var f=s[h];if(u.a*f[0]+u.b*f[1]+u.c<0){d=!1;break}}if(d)return!1}return!0}},1992:function(t,e,n){"use strict";n.d(e,{AE:function(){return r},zj:function(){return o},uI:function(){return a},ax:function(){return s},am:function(){return l},af:function(){return c},m2:function(){return u},fN:function(){return d},se:function(){return h},Hl:function(){return f},L$:function(){return p},hk:function(){return m}});var i=n(378);function r(t,e,n,i,r){if(e!==i||n!==r){var o=r-n,a=e-i,s=1/Math.sqrt(o*o+a*a);t[0]=o*s,t[1]=a*s}else t[0]=0,t[1]=0}function o(t,e,n,i){var r=0;if(t!==n||e!==i){var o=i-e,a=t-n,s=1/Math.sqrt(o*o+a*a);r=(a=127*(a*=s)+(a<0?-.5:.5)<<24>>>16)+(o=127*(o*=s)+(o<0?-.5:.5)<<24>>>24)}return r}function a(t,e,n,i,r){if(e!==i||n!==r){var o=i-e,a=r-n,s=1/Math.sqrt(o*o+a*a);t[0]=o*s,t[1]=a*s}else t[0]=0,t[1]=0}function s(t,e,n,i,r){var o=e+i,a=n+r,s=e*o+n*a;if(0!==s){var l=1/s;t[0]=o*l,t[1]=a*l}else t[0]=0,t[1]=0}function l(t,e){return(127*e+(e<0?-.5:.5)<<24>>>16)+(127*t+(t<0?-.5:.5)<<24>>>24)}function c(t){var e=127*t[0]+(t[0]<0?-.5:.5)<<24>>>24;return(127*t[1]+(t[1]<0?-.5:.5)<<24>>>16)+e}function u(t,e,n,i,r){t[0]=e*i+n*r,t[1]=n*i-e*r}function d(t,e){t[0]=-e[1],t[1]=e[0]}function h(t){return 0===t[0]&&0===t[1]}function f(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function p(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}function m(t,e){var n=Math.cos(e)*t[0]-Math.sin(e)*t[1],r=Math.sin(e)*t[0]+Math.cos(e)*t[1];i.t8(t,n,r)}},5109:function(t,e,n){"use strict";n.d(e,{SD:function(){return o},GG:function(){return a},ev:function(){return s},KP:function(){return l},Qy:function(){return c},Dz:function(){return d},nF:function(){return h}});var i=n(372),r=n(3704);function o(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]*Math.pow(256,t.length-1-n);return e}function a(t){for(var e=new Uint8Array(6),n=0;n<6;n++)e[n]=255&Math.floor(t/Math.pow(256,5-n));return encodeURIComponent(r.c(e))}function s(t){var e=function(t,e){var n={};t.forEach((function(t,e){n[t]=e}));var i=t.length;for(var r in n.selected=i++,n.hovered=i++,n.dpi=i++,n.isRealtime=i++,n.pixelDensityPreset=i++,e)void 0===n[r]&&(n[r]=i++);return n}(t.tileProps,t.defaultProps),n={};for(var r in t.defaultProps)n[r]={index:e[r],value:t.defaultProps[r]};return{version:t.version,dictionaries:t.enumerationValues,reverseDictionaries:Object.keys(t.enumerationValues).reduce((function(e,n){return e[n]=(0,i.l4)(t.enumerationValues[n]),e}),{}),tileProps:e,tilePropsByIndex:(0,i.l4)(e),defaultProps:n}}function l(t,e){var n={};if(e)for(var i=0;i<e.length;i++)n[e[i]]=i;return s({enumerationValues:{db_sublayer:n},version:"",zenithVersion:"",date:"",defaultProps:{},tileProps:t})}function c(t,e){for(var n=t.tileProps,i=Object.keys(n).length,r=0,o=e;r<o.length;r++){var a=o[r];void 0===n[a]&&(n[a]=i,i+=1)}}var u=0,d={beginningIsCut:u++,class:u++,componentDistanceEnd:u++,componentDistanceStart:u++,db_icon_priority:u++,db_label_priority:u++,db_label2_priority:u++,dpi:u++,endingIsCut:u++,height:u++,db_hidden_by_plan_building_id:u++,id:u++,isRealtime:u++,db_label:u++,db_label2:u++,nextPointX:u++,nextPointY:u++,db_object_class:u++,objectLength:u++,pixelDensityPreset:u++,previousPointX:u++,previousPointY:u++,db_region:u++,selected:u++,hovered:u++,db_sublayer:u++,traffic_color:u++,traffic_road_class:u++,traffic_road_z_level:u++},h={version:"0.0.0",tileProps:d,tilePropsByIndex:(0,i.l4)(d),defaultProps:{},dictionaries:{},reverseDictionaries:{}}},7031:function(t,e,n){"use strict";function i(t,e,n,i,r){for(var o=0,a=e.length;o<a;o++){var s=e[o],l=0;"get"===s.type?l=i[n[s.key]]:r&&"sourceAttr"===s.type&&(l=r[s.key]),t.push(l)}return t}function r(t,e){for(var n=0,i=e.length;n<i;n++)t.push(e[n]);return t}function o(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(Array.isArray(i))return!!Array.isArray(r)&&o(i,r);if(!(i===r||"number"==typeof i&&"number"==typeof r&&Number.isNaN(i)&&Number.isNaN(r)))return!1}return!0}n.d(e,{v$:function(){return i},LY:function(){return r},wy:function(){return o}})},3540:function(t,e,n){"use strict";function i(t){var e=256*Math.log(t);return e+(e<0?-.5:.5)<<16>>16}function r(t){return 32768*t+.5<<16>>>16}function o(t){return 256*Math.log(t)+.5<<16>>16}n.d(e,{wj:function(){return i},Bb:function(){return r},KF:function(){return o}})},5378:function(t,e){"use strict";var n=e.Z={};n.read=function(t,e){return t.readFields(n._readField,{id:"",name:"",address:"",type:0,regionId:0,branchId:"",branchCount:0,buildings:[],hull:[],tileCoords:[],center:[],centroid:[],scaleFactor:0,viewAngle:0,bound:null,floorCount:0,defaultFloor:0,floorNames:[],entities:[],floorGeometries:[],outdoors:[],metaRubrics:[],version:0,hybrids:[]},e)},n._readField=function(t,e,i){1===t?e.id=i.readString():2===t?e.name=i.readString():3===t?e.address=i.readString():4===t?e.type=i.readVarint():5===t?e.regionId=i.readVarint():6===t?e.branchId=i.readString():7===t?e.branchCount=i.readVarint():8===t?e.buildings.push(i.readString()):9===t?i.readPackedSVarint(e.hull):10===t?i.readPackedDouble(e.tileCoords):11===t?i.readPackedSVarint(e.center):12===t?i.readPackedDouble(e.centroid):13===t?e.scaleFactor=i.readDouble():14===t?e.viewAngle=i.readDouble():15===t?e.bound=n.Bound.read(i,i.readVarint()+i.pos):16===t?e.floorCount=i.readVarint():17===t?e.defaultFloor=i.readVarint():18===t?e.floorNames.push(i.readString()):19===t?e.entities.push(n.Entity.read(i,i.readVarint()+i.pos)):20===t?e.floorGeometries.push(n.Floor.read(i,i.readVarint()+i.pos)):21===t?e.outdoors.push(n.OutdoorObject.read(i,i.readVarint()+i.pos)):22===t?e.metaRubrics.push(n.Metarubric.read(i,i.readVarint()+i.pos)):23===t?e.version=i.readVarint():24===t&&e.hybrids.push(i.readString())},n.write=function(t,e){if(t.id&&e.writeStringField(1,t.id),t.name&&e.writeStringField(2,t.name),t.address&&e.writeStringField(3,t.address),t.type&&e.writeVarintField(4,t.type),t.regionId&&e.writeVarintField(5,t.regionId),t.branchId&&e.writeStringField(6,t.branchId),t.branchCount&&e.writeVarintField(7,t.branchCount),t.buildings)for(var i=0;i<t.buildings.length;i++)e.writeStringField(8,t.buildings[i]);if(t.hull&&e.writePackedSVarint(9,t.hull),t.tileCoords&&e.writePackedDouble(10,t.tileCoords),t.center&&e.writePackedSVarint(11,t.center),t.centroid&&e.writePackedDouble(12,t.centroid),t.scaleFactor&&e.writeDoubleField(13,t.scaleFactor),t.viewAngle&&e.writeDoubleField(14,t.viewAngle),t.bound&&e.writeMessage(15,n.Bound.write,t.bound),t.floorCount&&e.writeVarintField(16,t.floorCount),t.defaultFloor&&e.writeVarintField(17,t.defaultFloor),t.floorNames)for(i=0;i<t.floorNames.length;i++)e.writeStringField(18,t.floorNames[i]);if(t.entities)for(i=0;i<t.entities.length;i++)e.writeMessage(19,n.Entity.write,t.entities[i]);if(t.floorGeometries)for(i=0;i<t.floorGeometries.length;i++)e.writeMessage(20,n.Floor.write,t.floorGeometries[i]);if(t.outdoors)for(i=0;i<t.outdoors.length;i++)e.writeMessage(21,n.OutdoorObject.write,t.outdoors[i]);if(t.metaRubrics)for(i=0;i<t.metaRubrics.length;i++)e.writeMessage(22,n.Metarubric.write,t.metaRubrics[i]);if(t.version&&e.writeVarintField(23,t.version),t.hybrids)for(i=0;i<t.hybrids.length;i++)e.writeStringField(24,t.hybrids[i])},n.ComplexType={mall:{value:0,options:{}},other:{value:1,options:{}},office:{value:2,options:{}}},n.Metarubric={},n.Metarubric.read=function(t,e){return t.readFields(n.Metarubric._readField,{id:"",orgCount:0},e)},n.Metarubric._readField=function(t,e,n){1===t?e.id=n.readString():2===t&&(e.orgCount=n.readVarint())},n.Metarubric.write=function(t,e){t.id&&e.writeStringField(1,t.id),t.orgCount&&e.writeVarintField(2,t.orgCount)},n.Bound={},n.Bound.read=function(t,e){return t.readFields(n.Bound._readField,{min:[],max:[]},e)},n.Bound._readField=function(t,e,n){1===t?n.readPackedSVarint(e.min):2===t&&n.readPackedSVarint(e.max)},n.Bound.write=function(t,e){t.min&&e.writePackedSVarint(1,t.min),t.max&&e.writePackedSVarint(2,t.max)},n.Entity={},n.Entity.read=function(t,e){return t.readFields(n.Entity._readField,{id:"",sublayer:"",coordinates:[],iconId:0,areaId:0,firmId:"",floorIndex:0,floorName:"",text:"",layer:"",priority:0,textPriority:0,type:0,text2:"",humanReadableIconId:""},e)},n.Entity._readField=function(t,e,n){1===t?e.id=n.readString():2===t?e.sublayer=n.readString():3===t?n.readPackedVarint(e.coordinates):4===t?e.iconId=n.readVarint():5===t?e.areaId=n.readVarint():6===t?e.firmId=n.readString():7===t?e.floorIndex=n.readVarint():8===t?e.floorName=n.readString():9===t?e.text=n.readString():10===t?e.layer=n.readString():11===t?e.priority=n.readVarint(!0):12===t?e.textPriority=n.readVarint(!0):13===t?e.type=n.readVarint():14===t?e.text2=n.readString():15===t&&(e.humanReadableIconId=n.readString())},n.Entity.write=function(t,e){t.id&&e.writeStringField(1,t.id),t.sublayer&&e.writeStringField(2,t.sublayer),t.coordinates&&e.writePackedVarint(3,t.coordinates),t.iconId&&e.writeVarintField(4,t.iconId),t.areaId&&e.writeVarintField(5,t.areaId),t.firmId&&e.writeStringField(6,t.firmId),t.floorIndex&&e.writeVarintField(7,t.floorIndex),t.floorName&&e.writeStringField(8,t.floorName),t.text&&e.writeStringField(9,t.text),t.layer&&e.writeStringField(10,t.layer),t.priority&&e.writeVarintField(11,t.priority),t.textPriority&&e.writeVarintField(12,t.textPriority),t.type&&e.writeVarintField(13,t.type),t.text2&&e.writeStringField(14,t.text2),t.humanReadableIconId&&e.writeStringField(15,t.humanReadableIconId)},n.Floor={},n.Floor.read=function(t,e){return t.readFields(n.Floor._readField,{name:"",rooms:[],ids:[]},e)},n.Floor._readField=function(t,e,i){1===t?e.name=i.readString():2===t?e.rooms.push(n.Room.read(i,i.readVarint()+i.pos)):3===t&&e.ids.push(i.readString())},n.Floor.write=function(t,e){if(t.name&&e.writeStringField(1,t.name),t.rooms)for(var i=0;i<t.rooms.length;i++)e.writeMessage(2,n.Room.write,t.rooms[i]);if(t.ids)for(i=0;i<t.ids.length;i++)e.writeStringField(3,t.ids[i])},n.Room={},n.Room.read=function(t,e){return t.readFields(n.Room._readField,{id:0,type:0,sublayer:"",isIsland:!1,firmIds:[],area:[],wallSide:[],wallTop:[],areaSublayer:"",wallSublayer:""},e)},n.Room._readField=function(t,e,n){1===t?e.id=n.readVarint():2===t?e.type=n.readVarint():3===t?e.sublayer=n.readString():4===t?e.isIsland=n.readBoolean():5===t?e.firmIds.push(n.readString()):6===t?e.area.push(n.readBytes()):7===t?e.wallSide.push(n.readBytes()):8===t?e.wallTop.push(n.readBytes()):9===t?e.areaSublayer=n.readString():10===t&&(e.wallSublayer=n.readString())},n.Room.write=function(t,e){if(t.id&&e.writeVarintField(1,t.id),t.type&&e.writeVarintField(2,t.type),t.sublayer&&e.writeStringField(3,t.sublayer),t.isIsland&&e.writeBooleanField(4,t.isIsland),t.firmIds)for(var n=0;n<t.firmIds.length;n++)e.writeStringField(5,t.firmIds[n]);if(t.area)for(n=0;n<t.area.length;n++)e.writeBytesField(6,t.area[n]);if(t.wallSide)for(n=0;n<t.wallSide.length;n++)e.writeBytesField(7,t.wallSide[n]);if(t.wallTop)for(n=0;n<t.wallTop.length;n++)e.writeBytesField(8,t.wallTop[n]);t.areaSublayer&&e.writeStringField(9,t.areaSublayer),t.wallSublayer&&e.writeStringField(10,t.wallSublayer)},n.OutdoorObject={},n.OutdoorObject.read=function(t,e){return t.readFields(n.OutdoorObject._readField,{type:"",vertices:[],width:0},e)},n.OutdoorObject._readField=function(t,e,n){1===t?e.type=n.readString():2===t?e.vertices.push(n.readBytes()):3===t&&(e.width=n.readDouble())},n.OutdoorObject.write=function(t,e){if(t.type&&e.writeStringField(1,t.type),t.vertices)for(var n=0;n<t.vertices.length;n++)e.writeBytesField(2,t.vertices[n]);t.width&&e.writeDoubleField(3,t.width)}},9942:function(t,e){"use strict";var n=e.w={};n.read=function(t,e){return t.readFields(n._readField,{tiles:[]},e)},n._readField=function(t,e,i){1===t&&e.tiles.push(n.Tile.read(i,i.readVarint()+i.pos))},n.write=function(t,e){if(t.tiles)for(var i=0;i<t.tiles.length;i++)e.writeMessage(1,n.Tile.write,t.tiles[i])},n.Tile={},n.Tile.read=function(t,e){return t.readFields(n.Tile._readField,{x:0,y:0,zoom:0},e)},n.Tile._readField=function(t,e,n){1===t?e.x=n.readVarint():2===t?e.y=n.readVarint():3===t&&(e.zoom=n.readVarint())},n.Tile.write=function(t,e){t.x&&e.writeVarintField(1,t.x),t.y&&e.writeVarintField(2,t.y),t.zoom&&e.writeVarintField(3,t.zoom)};var i=e.F={};i.read=function(t,e){return t.readFields(i._readField,{tileGroups:[]},e)},i._readField=function(t,e,n){1===t&&e.tileGroups.push(i.TileGroup.read(n,n.readVarint()+n.pos))},i.write=function(t,e){if(t.tileGroups)for(var n=0;n<t.tileGroups.length;n++)e.writeMessage(1,i.TileGroup.write,t.tileGroups[n])},i.TileGroup={},i.TileGroup.read=function(t,e){return t.readFields(i.TileGroup._readField,{x:0,y:0,zoom:0,tiles:[]},e)},i.TileGroup._readField=function(t,e,n){1===t?e.x=n.readVarint():2===t?e.y=n.readVarint():3===t?e.zoom=n.readVarint():4===t&&e.tiles.push(i.TileGroup.Tile.read(n,n.readVarint()+n.pos))},i.TileGroup.write=function(t,e){if(t.x&&e.writeVarintField(1,t.x),t.y&&e.writeVarintField(2,t.y),t.zoom&&e.writeVarintField(3,t.zoom),t.tiles)for(var n=0;n<t.tiles.length;n++)e.writeMessage(4,i.TileGroup.Tile.write,t.tiles[n])},i.TileGroup.Tile={},i.TileGroup.Tile.read=function(t,e){return t.readFields(i.TileGroup.Tile._readField,{regionId:0,hash:null,data:null},e)},i.TileGroup.Tile._readField=function(t,e,n){1===t?e.regionId=n.readVarint():2===t?e.hash=n.readBytes():3===t&&(e.data=n.readBytes())},i.TileGroup.Tile.write=function(t,e){t.regionId&&e.writeVarintField(1,t.regionId),t.hash&&e.writeBytesField(2,t.hash),t.data&&e.writeBytesField(3,t.data)}},3571:function(t,e,n){"use strict";n.d(e,{rA:function(){return c},W8:function(){return u},Bl:function(){return d}});var i=n(655),r=n(2267),o=n(8550),a=10001,s={w:0,h:0,anchorX:.5,anchorY:.5,x:0,y:0,atlasIndex:0,isPacked:!1},l={};function c(t,e,n,c){var u=(0,o.zV)(t.lo,t.hi);if(!l[u]){var d=a++;l[u]={type:r.f.Unique,isSvg:!1,index:d,key:u,name:"",fileName:"",id:t,regionId:n,url:c,rasters:e.map((function(t,e){return(0,i.pi)((0,i.pi)({},s),{rasterSetIndex:d,rasterIndex:e,w:t,h:t})}))}}return l[u]}function u(t){var e=a++;return{type:r.f.Loaded,isSvg:!1,index:e,key:"loaded-"+e,name:"",fileName:"",rasters:t.map((function(t,n){return(0,i.pi)((0,i.pi)({},t),{rasterIndex:n,rasterSetIndex:e})}))}}function d(t,e,n){for(var i,r=1/0,o=0;o<t.length;o++){var a=t[o];if(!n||a.isPacked){var s=Math.abs(a.w-e);s<r&&(i=o,r=s)}}return i}},3065:function(t,e,n){"use strict";n.d(e,{ng:function(){return f},dp:function(){return o},iY:function(){return r},GY:function(){return s},rJ:function(){return a},w7:function(){return c}});var i=n(9099),r=function(t){return t},o=null,a=!1,s=new Promise((function(t){o=function(){a=!0,t()}})),l=new Set(["ar"]);function c(t,e,n){var r=e.workers.labeling;"always-off"===t||"depends-on-language"===t&&!l.has(n)?r.markRtlPluginLoaded().then((function(){null!==o&&o()})):fetch(i.k0,{integrity:i.aT}).then((function(t){return t.text()})).then((function(t){return Promise.all([r.loadRtlPlugin(t),Promise.resolve(f(t))])}))}var u,d,h,f=(u=function(t){new Function(t)(),r=globalThis.mapglRtlPlugin.processRtl,o&&o()},h=!1,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h?d:(h=!0,d=u.apply(this,t))})},789:function(t,e,n){"use strict";n.d(e,{zT:function(){return r},lD:function(){return o},rx:function(){return a},Go:function(){return s}});var i=n(1026);function r(t){for(var e="",n=0;n<t.length;){var i=t[n++];if(i>127){if(i>191&&i<224){if(n>=t.length)return console.error("Incomplete 2-byte sequence"),e;i=(31&i)<<6|63&t[n]}else if(i>223&&i<240){if(n+1>=t.length)return console.error("Incomplete 3-byte sequence"),e;i=(15&i)<<12|(63&t[n])<<6|63&t[++n]}else{if(!(i>239&&i<248))return console.error("Unknown multibyte start 0x"+i.toString(16)+" at index "+(n-1)),e;if(n+2>=t.length)return console.error("Incomplete 4-byte sequence"),e;i=(7&i)<<18|(63&t[n])<<12|(63&t[++n])<<6|63&t[++n]}++n}if(i<=65535)e+=String.fromCharCode(i);else{if(!(i<=1114111))return console.error("Code point 0x"+i.toString(16)+" exceeds UTF-16 reach"),e;i-=65536,e+=String.fromCharCode(i>>10|55296),e+=String.fromCharCode(1023&i|56320)}}return e}function o(t,e){if(t.length<=e||-1!==t.indexOf("\n"))return t;var n=[];return t.split(" ").forEach((function(t){var i=n.length-1;0===n.length||n[i].length+t.length>=e?n.push(t):n[i]+=" "+t})),n.join("\n")}function a(t){return Math.floor(t/256)}function s(t){var e=new Set;return t.forEach((function(t){if(void 0!==t)for(var n=0;n<t.length;n++){var r=t.charCodeAt(n);r!==i.fonts.bomCharCode&&e.add(a(r))}})),Array.from(e)}},5452:function(t,e,n){"use strict";n.d(e,{U:function(){return o}});var i=n(3526),r=n(4773),o=function(){function t(t){this.dataType=t,this.pendingRequests=new Map}return t.prototype.fetch=function(t,e){var n=this;return new Promise((function(o){var a=e(t),s=(0,i.gx)(t),l=("json"===n.dataType?r.L:r.n)({url:a},(function(t,e){if(n.pendingRequests.delete(s),void 0!==t)return 204!==t.status&&console.error(t),void o(void 0);o(e)}));n.pendingRequests.set(s,{xhr:l,resolve:o})}))},t.prototype.destroy=function(){var t=this;this.pendingRequests.forEach((function(e,n){t.abortRequest(n)}))},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(void 0),this.pendingRequests.delete(t))},t}()},5964:function(t,e,n){"use strict";n.d(e,{c:function(){return i}});var i=function(){function t(){this.events={}}return t.prototype.on=function(t,e){var n=this.events[t];return n||(n=this.events[t]=[]),n.push(e),this},t.prototype.once=function(t,e){var n=this,i=function(r){n.off(t,i),e.call(n,r)};return this.on(t,i),this},t.prototype.off=function(t,e){var n=this.events[t];if(!n)return this;var i=n.indexOf(e);return-1!==i&&n.splice(i,1),this},t.prototype.emit=function(t,e){var n=this.events[t];if(!n)return this;for(var i=n.slice(),r=0;r<i.length;r++)i[r].call(this,e);return this},t}()},5582:function(t,e,n){"use strict";n.d(e,{g:function(){return r}});var i=n(8131),r=function(){function t(t){void 0===t&&(t={}),this.map=t}return t.prototype.set=function(t,e){var n=this.map[t.lo];void 0===n&&(n=this.map[t.lo]={}),n[t.hi]=e},t.prototype.get=function(t){if(void 0!==this.map[t.lo])return this.map[t.lo][t.hi]},t.prototype.serialize=function(){return this.map},t.prototype.forEach=function(t){for(var e in this.map)for(var n in this.map[e])t(this.map[e][n],(0,i.Ru)(Number(e),Number(n)))},t.prototype.clear=function(){this.map={}},t}()},4590:function(t,e,n){"use strict";n.d(e,{c:function(){return i}});var i=function(){function t(t){void 0===t&&(t=[]),this.map={};for(var e=0,n=t;e<n.length;e++){var i=n[e];this.add(i)}}return t.prototype.has=function(t){var e=this.map[t.hi];return void 0!==(null==e?void 0:e[t.lo])},t.prototype.add=function(t){var e=this.map[t.hi];e||(e=this.map[t.hi]={}),e[t.lo]=!0},t.prototype.addFromFlatArray=function(t){for(var e=this.map,n=0;n<t.length/2;n++){var i=t[2*n+1],r=e[i];r||(r=e[i]={}),r[t[2*n]]=!0}},t.prototype.toFlatArray=function(){var t=this.map,e=[];for(var n in t){var i=t[n];for(var r in i)e.push(Number(r),Number(n))}return e},t}()},8131:function(t,e,n){"use strict";n.d(e,{Ru:function(){return r},nI:function(){return o},v7:function(){return a},y5:function(){return s},Ak:function(){return l},IL:function(){return c}});var i=1e5;function r(t,e){return{type:64,lo:t,hi:e}}function o(t){return null!==t&&"object"==typeof t&&64===t.type}function a(t,e){return t.lo===e.lo&&t.hi===e.hi}function s(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!a(t[n],e[n]))return!1;return!0}function l(t){return y(t.lo,t.hi)}function c(t){var e=g(t);return r(e[0],e[1])}function u(t){return[t%i,Math.floor(t/i)%i,0,0]}function d(t){for(var e=0,n=0;n<4;n++){var r=4294967296*t[n]+e;e=Math.floor(r/i),t[n]=r%i}}function h(t,e){for(var n=4294967296,r=4,o=0;--r>=0;){var a=o*i+e[r],s=Math.floor(a/n);o=a-s*n,t[r]=s}}function f(t,e){for(var n=0,r=0;r<4;r++){var o=t[r]+e[r]+n;n=Math.floor(o/i),t[r]=o%i}}function p(t,e){for(var n=0,r=0;r<4;r++){var o=t[r]-e[r]-n;o<0?(o+=i,n=1):n=0,t[r]=o}}function m(t){for(var e=!0,n=4,i="";--n>=0;){var r=String(t[n]);e?0!==t[n]&&(i+=r,e=!1):i+="00000".slice(r.length)+r}return i.length||(i="0"),i}function v(t){for(var e=4,n=0;--e>=0;)n=n*i+t[e];return n}function _(t){t="00000000000000000000".slice(t.length)+t;for(var e=[0,0,0,0],n=0;n<4;n++){var i=parseInt(t.slice(5*n,5*(n+1)),10);e[3-n]=i}return e}function y(t,e){var n=u(t),i=u(e);return d(i),f(i,n),m(i)}function g(t){var e=_(t),n=u(0);h(n,e);var i=v(n);return d(n),p(e,n),[v(e),i]}},2140:function(t,e,n){"use strict";n.d(e,{L:function(){return r}});var i=function(){},r=function(){function t(t,e){void 0===e&&(e=i),this.queue=[],this.data={},this.size=t,this.onRemove=e}return t.prototype.add=function(t,e){this.data[t]||(this.queue.push(t),this.data[t]=e,this.shrink(this.size))},t.prototype.remove=function(t){this.data[t]&&(this.queue.splice(this.queue.indexOf(t),1),delete this.data[t])},t.prototype.get=function(t){var e=this.data[t];return e&&(this.queue.splice(this.queue.indexOf(t),1),this.queue.push(t)),e},t.prototype.reset=function(){this.shrink(0)},t.prototype.setSize=function(t){this.size=t,this.shrink(t)},t.prototype.getSize=function(){return this.size},t.prototype.keys=function(){return this.queue},t.prototype.getData=function(){var t=this;return Object.keys(this.data).map((function(e){return t.data[e]}))},t.prototype.shrink=function(t){for(;this.queue.length>t;){var e=this.queue.shift(),n=this.data[e];delete this.data[e],this.onRemove(e,n)}},t}()},6670:function(t,e,n){"use strict";n.d(e,{c:function(){return i}});var i=function(){function t(){this.map={}}return t.prototype.set=function(t,e,n){void 0===this.map[t]&&(this.map[t]={}),this.map[t][e]=n},t.prototype.get=function(t,e){var n=this.map[t];if(void 0!==n)return n[e]},t.prototype.has=function(t,e){var n=this.map[t];return void 0!==n&&void 0!==n[e]},t}()},5630:function(t,e,n){"use strict";n.d(e,{o1:function(){return r},fL:function(){return o},aU:function(){return a}});var i=n(242);function r(t){return i.$U*t}function o(t){return t/i.$U}function a(t){return!!t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i)}},7277:function(t,e,n){"use strict";n.d(e,{Ty:function(){return s},h3:function(){return l},Cz:function(){return c}});var i=n(1026),r=new Set(i.commercialSublayers),o=new Set(i.personalSublayers),a=new Set(i.landmarkPoiSublayers);function s(t){return r.has(t)}function l(t){return o.has(t)}function c(t){return a.has(t)}},4406:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var i=n(655),r=function(){function t(t){var e=this;this.fnRegistry=t,this.onClassCreate=function(t){var n,r,o=t.id,a=t.name,s=t.args,l=e.classes.get(a);if(l){var c=l.scope?new((n=l.ClassConstructor).bind.apply(n,(0,i.ev)([void 0,l.scope],s))):new((r=l.ClassConstructor).bind.apply(r,(0,i.ev)([void 0],s)));l.hosts.set(o,c)}else console.error("ClassRegistry#onClassCreate: class "+a+" not found")},this.onMethodUse=function(t){var n=t.id,i=t.name,r=t.method,o=t.args,a=e.classes.get(i);if(a){var s=a.hosts.get(n);if(s){if(s[r])return"destroy"===r&&a.hosts.delete(n),s[r].apply(s,o);console.error("ClassRegistry#onMethodUse: method "+r+" in instance "+n+" in class "+i+" not found")}else console.error("ClassRegistry#onMethodUse: instance "+n+" in class "+i+" not found")}else console.error("ClassRegistry#onMethodUse: class "+i+" not found")},this.classes=new Map,this.idCounter=0,this.fnRegistry.set("createClass",this.onClassCreate),this.fnRegistry.set("classMethodUse",this.onMethodUse)}return t.prototype.set=function(t,e,n){var i=this,r={ClassConstructor:e,hosts:new Map,proxies:new Map,scope:n};return this.classes.set(t,r),{get:function(n){var r=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.id=i.idCounter++,i.fnRegistry.get(n,"createClass")({id:this.id,args:e,name:t})};return Object.getOwnPropertyNames(e.prototype).forEach((function(e){"constructor"!==e&&(r.prototype[e]=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return i.fnRegistry.get(n,"classMethodUse")({id:this.id,name:t,method:e,args:r})})})),r}}},t}()},1462:function(t,e,n){"use strict";n.d(e,{H:function(){return a},D:function(){return s}});var i=n(655),r=n(5017),o=n(5964),a=function(t){function e(){var e=t.call(this)||this;return e.workers=new Map,e}return(0,i.ZT)(e,t),e.prototype.addWorker=function(t,e){var n=this;this.workers.set(t,e),e.addEventListener("message",(function(e){var i=e.data,r=i.to,o=i.msg,a=i.transferable,s={from:t,to:r,msg:o,transferable:a};n.routeMessage(s)}))},e.prototype.send=function(t,e,n){var i=this.workers.get(t);if(i){var o={to:t,from:r.P.Main,msg:e,transferable:n};void 0!==n?i.postMessage(o,n):i.postMessage(o)}},e.prototype.broadcast=function(t){this.workers.forEach((function(e,n){var i={to:n,from:r.P.Main,msg:t};e.postMessage(i)}))},e.prototype.routeMessage=function(t){var e=t.from,n=t.to,i=t.transferable,o=t.msg.type;if(n===r.P.Main)this.emit("message",t);else if(n===r.P.All)e!==r.P.Main&&this.emit(o,t),this.workers.forEach((function(n,r){r!==e&&(void 0!==i?n.postMessage(t,i):n.postMessage(t))}));else{var a=this.workers.get(n);a&&(void 0!==i?a.postMessage(t,i):a.postMessage(t))}},e}(o.c),s=function(t){function e(e){var n=t.call(this)||this;return n.worker=e,e.addEventListener("message",(function(t){var e=t.data;n.emit("message",e)})),n}return(0,i.ZT)(e,t),e.prototype.send=function(t,e,n){var i={to:t,msg:e,transferable:n};this.worker.postMessage(i,n)},e.prototype.broadcast=function(t){var e={to:r.P.All,msg:t};this.worker.postMessage(e)},e}(o.c)},2244:function(t,e,n){"use strict";n.d(e,{J:function(){return r}});var i=n(5017),r=function(){function t(t){var e=this;this.onMessage=function(t){var n=t.from,r=t.msg;switch(r.type){case i.C.FunctionUse:e.onFunctionUse(r,n);break;case i.C.FunctionResult:e.onFunctionResult(r)}},this.connector=t,this.functions=new Map,this.functionIdCounter=0,this.pendingFunctions=new Map,t.on("message",this.onMessage)}return t.prototype.set=function(t,e){this.functions.set(t,e)},t.prototype.get=function(t,e){var n=this;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=n.functionIdCounter++,s=new Promise((function(t){n.pendingFunctions.set(a,t)})),l={type:i.C.FunctionUse,data:{id:a,name:e,args:r}};return n.connector.send(t,l),s}},t.prototype.onFunctionUse=function(t,e){var n=this,i=t.data,r=i.name,o=i.args,a=i.id,s=this.functions.get(r);if(s){var l=s.apply(void 0,o);l&&l.then?Promise.resolve(l).then((function(t){return n.sendFunctionResult(e,a,t)})):this.sendFunctionResult(e,a,l)}else console.error("FnRegistry#onFunctionUse: function "+r+" not found")},t.prototype.sendFunctionResult=function(t,e,n){var r={type:i.C.FunctionResult,data:{id:e,result:n}};n&&n.transferable?this.connector.send(t,r,n.transferable):this.connector.send(t,r)},t.prototype.onFunctionResult=function(t){var e=t.data,n=e.id,i=e.result,r=this.pendingFunctions.get(n);r?(r(i),this.pendingFunctions.delete(n)):console.error("FnRegistry#onFunctionResult: pending function "+n+" not found")},t}()},5017:function(t,e,n){"use strict";var i,r;n.d(e,{P:function(){return i},C:function(){return r}}),function(t){t[t.Main=0]="Main",t[t.Parser=1]="Parser",t[t.Labeling=2]="Labeling",t[t.All=3]="All"}(i||(i={})),function(t){t[t.FunctionUse=0]="FunctionUse",t[t.FunctionResult=1]="FunctionResult"}(r||(r={}))},258:function(t,e,n){"use strict";n.d(e,{rS:function(){return N},U2:function(){return B},BL:function(){return U},sT:function(){return Z},Vx:function(){return H}});var i={};n.r(i),n.d(i,{ease:function(){return l},easeInBack:function(){return A},easeInCirc:function(){return T},easeInCubic:function(){return h},easeInElastic:function(){return k},easeInExpo:function(){return I},easeInOutBack:function(){return F},easeInOutCirc:function(){return E},easeInOutCubic:function(){return p},easeInOutElastic:function(){return C},easeInOutExpo:function(){return P},easeInOutQuad:function(){return d},easeInOutQuart:function(){return _},easeInOutQuint:function(){return b},easeInOutSine:function(){return S},easeInQuad:function(){return c},easeInQuart:function(){return m},easeInQuint:function(){return y},easeInSine:function(){return w},easeOutBack:function(){return D},easeOutBounce:function(){return R},easeOutCirc:function(){return L},easeOutCubic:function(){return f},easeOutElastic:function(){return z},easeOutExpo:function(){return M},easeOutQuad:function(){return u},easeOutQuart:function(){return v},easeOutQuint:function(){return g},easeOutSine:function(){return x},inertia:function(){return O},linear:function(){return a}});var r=n(655),o=n(1026);function a(t,e,n,i,r){return n+i/r*e}var s=n(3431)(.25,.1,.25,1);function l(t,e,n,i,r){return n+i*s(e/r)}function c(t,e,n,i,r){return i*(e/=r)*e+n}function u(t,e,n,i,r){return-i*(e/=r)*(e-2)+n}function d(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e+n:-i/2*(--e*(e-2)-1)+n}function h(t,e,n,i,r){return i*(e/=r)*e*e+n}function f(t,e,n,i,r){return i*((e=e/r-1)*e*e+1)+n}function p(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n}function m(t,e,n,i,r){return i*(e/=r)*e*e*e+n}function v(t,e,n,i,r){return-i*((e=e/r-1)*e*e*e-1)+n}function _(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e*e+n:-i/2*((e-=2)*e*e*e-2)+n}function y(t,e,n,i,r){return i*(e/=r)*e*e*e*e+n}function g(t,e,n,i,r){return i*((e=e/r-1)*e*e*e*e+1)+n}function b(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e*e*e+n:i/2*((e-=2)*e*e*e*e+2)+n}function w(t,e,n,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+n}function x(t,e,n,i,r){return i*Math.sin(e/r*(Math.PI/2))+n}function S(t,e,n,i,r){return-i/2*(Math.cos(Math.PI*e/r)-1)+n}function I(t,e,n,i,r){return 0==e?n:i*Math.pow(2,10*(e/r-1))+n}function M(t,e,n,i,r){return e==r?n+i:i*(1-Math.pow(2,-10*e/r))+n}function P(t,e,n,i,r){return 0==e?n:e==r?n+i:(e/=r/2)<1?i/2*Math.pow(2,10*(e-1))+n:i/2*(2-Math.pow(2,-10*--e))+n}function T(t,e,n,i,r){return-i*(Math.sqrt(1-(e/=r)*e)-1)+n}function L(t,e,n,i,r){return i*Math.sqrt(1-(e=e/r-1)*e)+n}function E(t,e,n,i,r){return(e/=r/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+n:i/2*(Math.sqrt(1-(e-=2)*e)+1)+n}function k(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:1==(e/=r)?n+i:(a||(a=.3*r),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),-s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)+n)}function z(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:1==(e/=r)?n+i:(a||(a=.3*r),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+i+n)}function C(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:2==(e/=r/2)?n+i:(a||(a=r*(.3*1.5)),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*-.5+n:s*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+i+n)}function A(t,e,n,i,r,o){return null==o&&(o=1.70158),i*(e/=r)*e*((o+1)*e-o)+n}function D(t,e,n,i,r,o){return null==o&&(o=1.70158),i*((e=e/r-1)*e*((o+1)*e+o)+1)+n}function F(t,e,n,i,r,o){return null==o&&(o=1.70158),(e/=r/2)<1?i/2*(e*e*((1+(o*=1.525))*e-o))+n:i/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+n}function R(t,e,n,i,r){return(e/=r)<1/2.75?i*(7.5625*e*e)+n:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+n:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+n:i*(7.5625*(e-=2.625/2.75)*e+.984375)+n}function O(t,e,n,i,r){return i*(1-Math.pow(1-e/r,o.inertia.nonLinearity+1))+n}var j={easing:"easeInOutQuad",forceFinalValue:!0,renderAfterUpdate:!0};function B(t,e){return e.tickers[t]}function U(t,e,n,i,o,a,s){var l;e.animationGroup&&(l=Object.keys(n.tickers).filter((function(t){return n.tickers[t].animationGroup===e.animationGroup}))),n.tickers[t]=(0,r.pi)((0,r.pi)((0,r.pi)({},j),e),{from:i,to:o,duration:a,attributes:s,startTime:n.time,alreadyStartedGroupTickers:l})}function Z(t,e){delete e.tickers[t]}function N(t,e){return!!e.tickers[t]}function H(t,e,n){var i=n.tickers[t];if(i)if(i.alreadyStartedGroupTickers&&i.alreadyStartedGroupTickers.some((function(t){return!!n.tickers[t]})))i.startTime=n.time;else{var r,o=n.time-i.startTime;if(i.from.length){r=[];for(var a=0;a<i.from.length;a++){var s=G(i.easing,i.from[a],i.to[a],i.duration,o);r.push(s)}}else r=G(i.easing,i.from,i.to,i.duration,o);var l=!1;o>=i.duration&&(i.forceFinalValue&&(r=i.to),l=!0),e.step&&e.step(n,r,i.attributes),l&&(Z(t,n),e.complete&&e.complete(n)),i.renderAfterUpdate&&(n.needRerender=!0)}}function G(t,e,n,r,o){return i[t](null,o,e,n-e,r)}},3526:function(t,e,n){"use strict";n.d(e,{Bs:function(){return p},gx:function(){return m},vl:function(){return v},cL:function(){return _},CJ:function(){return y},xH:function(){return g},VV:function(){return b},Sl:function(){return w},Ny:function(){return x},b5:function(){return S},rL:function(){return I},HL:function(){return M},pV:function(){return T},xG:function(){return L},aM:function(){return E},qu:function(){return k},vX:function(){return z},FP:function(){return C},Z$:function(){return A},a2:function(){return D},aq:function(){return F},hm:function(){return R},C5:function(){return O},VW:function(){return j},Oy:function(){return B},IR:function(){return U},z6:function(){return N},x7:function(){return H},_W:function(){return G}});var i=n(378),r=n(9450),o=n(3704),a=n(3614),s=n.n(a),l=n(5109),c=n(9170),u=n(5275),d=n(9942),h=n(242),f=n(7120);function p(t){return{coords:t,size:F(t[2]),offset:B(t)}}function m(t){return t[0]+"_"+t[1]+"_"+t[2]+"_"+t[3]}function v(t,e){return m(t)+"_"+e.stringify()}function _(t){var e=t.split("_");return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}function y(t){var e=new(s())(t),n=d.F.read(e).tileGroups[0],i=n.x,r=n.y,o=n.zoom;return n.tiles.map((function(t){var e=t.regionId,n=t.hash,a=t.data;return a||(console.warn("Tile "+o+"_"+i+"_"+r+" from region "+e+" is corrupt (has no data)"),a=new Uint8Array(0)),{data:a,regionId:e,metatileHash:(0,l.SD)(n)}}))}function g(t){return t.map((function(t){return{regionId:t.regionId,metatileHash:t.metatileHash}}))}function b(t){var e=4*Math.ceil(t.byteLength/4),n=new ArrayBuffer(e);return new Uint8Array(n).set(t),n}function w(t){var e=t[0],n=t[1],i=t[2];return{min:B([e,n,i,i]),max:B([e+1,n+1,i,i])}}function x(t,e){var n=w(t);return(0,u.M)(e,n)}function S(t,e,n){for(var i=(0,u.B)(t),r=2147483648,o=F(e),a=Math.pow(2,e)-1,s=Math.max(Math.floor((i.min[0]+r)/o),0),l=Math.min(Math.floor((i.max[0]+r)/o),a),c=Math.max(Math.floor((i.min[1]+r)/o),0),d=Math.min(Math.floor((i.max[1]+r)/o),a),h=[],f=s;f<=l;f++)for(var p=c;p<=d;p++){var m=[f,p,e,n];x(m,t)&&h.push(m)}return h}function I(t,e,n,i,r,a,l,u,h,f){var p=new(s()),m={tiles:[{x:r[0],y:r[1],zoom:r[2]}]};return d.w.write(m,p),(0,c.Gr)("tiles",{host:t,tileSet:e,tileKey:a,sessionId:f,protocol:n,appId:l,lang:u,defaultLang:h,subdomain:i[Math.abs(r[0]+r[1])%i.length],request:encodeURIComponent(o.c(p.finish()))})}function M(t,e){var n=t.coords,i=e.coords,r=n[2],o=i[2];return r===o?n[0]===i[0]&&n[1]===i[1]:r<o?P(t,e):P(e,t)}function P(t,e){if(e.zoomLevel<t.zoomLevel)return!1;if(e.zoomLevel===t.zoomLevel)return e.coords[0]===t.coords[0]&&e.coords[1]===t.coords[1]&&e.detailLevel>t.detailLevel;var n=Math.pow(2,e.coords[2]-t.coords[2]),i=t.coords[0]*n,r=i+n,o=t.coords[1]*n,a=o+n,s=e.coords[0],l=e.coords[1];return s>=i&&s<r&&l>=o&&l<a}function T(t,e,n){var i=t.coords,r=Math.min(e,n),o=Math.pow(2,t.zoomLevel-r);return m([Math.floor(i[0]/o),Math.floor(i[1]/o),r,e])}function L(t,e,n,i){return t[T(e,n,i)]}function E(t,e){var n=[];for(var i in t){var r=t[i];P(e,r)&&n.push(r)}return n}function k(t,e,n){return i.TE(t,Z(e.coords))-i.TE(t,Z(n.coords))}function z(t,e){return t.filter((function(t){return e.has(t)}))}function C(t){return t>=1&&t<=65535}function A(t,e,n){t[0]=e[0]*n.size/h.Bq+n.offset[0],t[1]=e[1]*n.size/h.Bq+n.offset[1],t[2]=e[2]*h._9/h.Bq}function D(t,e,n){t[0]=(e[0]-n.offset[0])*h.Bq/n.size,t[1]=(e[1]-n.offset[1])*h.Bq/n.size,t[2]=e[2]*h.Bq/h._9}function F(t){return Math.pow(2,32-t)}function R(t){return t[0]>=0&&t[0]<=h.Bq&&t[1]>=0&&t[1]<=h.Bq}function O(t,e){return t*h.sX/(h.Bq*Math.pow(2,e))}function j(t){return t/h._9*h.Bq}function B(t){var e=F(t[2]),n=2147483648;return r.al(t[0]*e-n,t[1]*e-n,0)}function U(t){var e=2147483648;return[t[0]+e,t[1]+e,32,32]}function Z(t){var e=F(t[2]),n=2147483648;return r.al((t[0]+.5)*e-n,(t[1]+.5)*e-n,0)}function N(t,e){var n=2147483648,i=F(e);return[(t[0]-i/2+n)/i,(t[1]-i/2+n)/i,e,e]}function H(t,e){void 0===e&&(e=1);var n=Math.max(t.max[0]-t.min[0],t.max[1]-t.min[1],1)*e,r=32-Math.log(n)/Math.LN2,o=i.Ue();return(0,f.be)(o,t),N(o,r)}var G=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return[e,Math.pow(2,i)-1-n,i,r]}},7097:function(t,e,n){"use strict";function i(t,e,n){var i,r,o,a,s=function(){var l=Date.now()-o;l<e&&l>=0?i=setTimeout(s,e-l):(i=null,n||(a=t.apply(void 0,r),i||(r=null)))};return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];r=l,o=Date.now();var u=n&&!i;return i||(i=setTimeout(s,e)),u&&(a=t.apply(void 0,r),r=null),a}}n.d(e,{D:function(){return i}})},9170:function(t,e,n){"use strict";n.d(e,{XK:function(){return a},Gr:function(){return l},IG:function(){return c},Sy:function(){return u}});var i=n(655),r=n(1026),o=/\{(\w+)\}/g;function a(t,e){return t.replace(o,(function(t,n){return e[n]}))}function s(t){var e=t.split("?"),n=e[0],i=e[1];if(!i)return n;var r=i.split("&").map((function(t){return t.split("=")})).filter((function(t){return"undefined"!==t[1]})).map((function(t){return t.join("=")})).join("&");return r.length?n+"?"+r:n}function l(t,e){var n=a(e.host,{subdomain:e.subdomain});return s(a(r.urls[t],(0,i.pi)((0,i.pi)({},e),{host:n})))}function c(t,e){return s(a(t,e))}function u(t,e){for(var n=0,i=0;i<e.length;i++)n+=e.charCodeAt(i);return t[n%t.length]}},1253:function(t,e,n){"use strict";n.d(e,{gl:function(){return i},TD:function(){return l}});var i=Math.pow(2,32)-1,r=i-1,o={},a=["main","parser","labeling"],s=0;a.forEach((function(t){var e=s+Math.floor(r/a.length);o[t]={min:s,max:e-1e6},s=e}));var l=function(){function t(t){this.minIdentifyIndex=o[t].min,this.maxIdentifyIndex=o[t].max,this.index=this.minIdentifyIndex,this.ids=[],this.phases=[],this.sublayers=[],this.styleIds=[],this.layerIds=[],this.instanceIds=[],this.objectClasses=[],this.strings={}}return t.prototype.getIndex=function(t,e,n,r,o,a,s){var l,c,u;if(void 0===a&&(a=0),"number"==typeof t)return i;var d=this.index+this.ids.length/2;if(this.ids.push(t.lo,t.hi),this.phases.push(n.renderIndex),this.sublayers.push(null!==(c=null===(l=null==s?void 0:s.dictionaries.db_sublayer)||void 0===l?void 0:l[r])&&void 0!==c?c:NaN),this.styleIds.push(e),this.layerIds.push(n.innerId),this.instanceIds.push(a),"string"==typeof o){var h=null===(u=null==s?void 0:s.dictionaries.db_object_class)||void 0===u?void 0:u[o];h?this.objectClasses.push(h):(this.objectClasses.push(0),this.strings[d]={objectClass:o})}else this.objectClasses.push(i);return d},t.prototype.getPacked=function(){var t=new Uint32Array(this.ids).buffer,e=new Float32Array(this.phases).buffer,n=new Uint32Array(this.sublayers).buffer,i=new Uint16Array(this.styleIds).buffer,r=new Uint32Array(this.layerIds).buffer,o=new Uint8Array(this.instanceIds).buffer,a=new Uint32Array(this.objectClasses).buffer,s=this.index,l=this.index+this.ids.length-1;this.index=this.index+this.ids.length,this.index>this.maxIdentifyIndex&&(this.index=this.minIdentifyIndex);var c=this.strings;return this.ids=[],this.phases=[],this.sublayers=[],this.styleIds=[],this.layerIds=[],this.instanceIds=[],this.objectClasses=[],this.strings={},{idBuffer:t,startIndex:s,endIndex:l,phaseBuffer:e,sublayerBuffer:n,styleIdBuffer:i,layerIdBuffer:r,instanceIdBuffer:o,objectClassBuffer:a,strings:c}},t}()},834:function(t,e,n){"use strict";n.d(e,{P:function(){return m}});var i=n(5951),r=.8,o=function(){function t(t,e){this.offset=0,this.stride=e,this.buffer=new ArrayBuffer(t),this.view=new Int32Array(this.buffer),this.comittedOffsets=0,this.watermark=t/e*r}return t.prototype.extend=function(){var t=2*this.buffer.byteLength;this.watermark=t/this.stride*r;var e=new ArrayBuffer(t),n=new Int32Array(e);return n.set(this.view),this.buffer=e,this.view=n,e},t}(),a=function(){function t(t){this.offset=0,this.buffer=new Int32Array(t),this.comittedOffsets=0,this.watermark=t*r}return t.prototype.extend=function(){var t=2*this.buffer.length;this.watermark=t*r;var e=new Int32Array(t);e.set(this.buffer),this.buffer=e},t}(),s=function(){function t(t,e,n,r){var s="buildingModel"!==t?67200:336e3,l=(0,i.vP)(t,e);this.elements=new o(s,l),this.indices=new a(2*s/l),this.views={},this.binder=r,r(this,this.elements.buffer),this.attributes=n}return t.prototype.resetOffsets=function(){this.elements.offset=0,this.elements.comittedOffsets=0,this.indices.offset=0,this.indices.comittedOffsets=0},t.prototype.commit=function(){this.elements.comittedOffsets=this.elements.offset,this.indices.comittedOffsets=this.indices.offset},t.prototype.rollback=function(){this.elements.offset=this.elements.comittedOffsets,this.indices.offset=this.indices.comittedOffsets},t.prototype.checkWatermarks=function(){var t=0,e=this.elements;e.offset>e.watermark&&(e.offset>=e.buffer.byteLength/e.stride&&(t=1),this.binder(this,e.extend()));var n=this.indices;return n.offset>n.watermark&&(n.offset>=n.buffer.length&&(t=1),n.extend()),t},t}(),l=n(1253),c=n(9899),u=n(1026),d=n(3571),h=function(){function t(){this.packer=new c.Z(u.atlasSize[0],u.atlasSize[1]),this.currentAtlasIndex=0,this.packedRasters=[],this.rastersToLoad=[],this.newRasterSets=new Map}return t.prototype.addNewRasterSet=function(t,e){var n=this.newRasterSets.get(t);n||(n=[],this.newRasterSets.set(t,n)),n.push(e)},t.prototype.pack=function(t,e,n){t.isSvg?this.packSvg(t,e.map((function(t){return{w:t,h:t}})),n):this.packPng(t,e,n)},t.prototype.packSvg=function(t,e,n){for(var i=t.rasters,r=new Set,o=0,a=i;o<a.length;o++){var s=a[o],l=s.w,d=s.h;r.add(l+"_"+d)}for(var h=0,f=e;h<f.length;h++){var p=f[h];if(l=p.w*n,d=p.h*n,!r.has(l+"_"+d)){var m=this.packer.packOne(l+2,d+2);null===m&&(this.packer=new c.Z(u.atlasSize[0],u.atlasSize[1]),this.currentAtlasIndex++,m=this.packer.packOne(l+2,d+2));var v=i.length,_={rasterSetIndex:t.index,rasterIndex:v,w:l,h:d,x:m.x+1,y:m.y+1,anchorX:t.anchorX,anchorY:t.anchorY,atlasIndex:this.currentAtlasIndex,isPacked:!0};i.push(_),this.packedRasters.push(t.index,v,_.x,_.y,_.w,_.h,this.currentAtlasIndex)}}},t.prototype.addRastersToLoad=function(t,e){this.rastersToLoad.push(t,e.rasterSetIndex,e.rasterIndex)},t.prototype.getNewRasterSets=function(){var t=this.newRasterSets;return this.newRasterSets=new Map,t},t.prototype.getPackedRasters=function(){if(0!==this.packedRasters.length){var t=new Uint16Array(this.packedRasters);return this.packedRasters=[],t}},t.prototype.getRastersToLoad=function(){var t=new Float64Array(this.rastersToLoad);return this.rastersToLoad=[],t},t.prototype.packPng=function(t,e,n){for(var i=t.rasters,r=0,o=e;r<o.length;r++){var a=o[r]*n,s=(0,d.Bl)(i,a,!1);if(void 0!==s){var l=t.rasters[s];if(!l.isPacked){var h=this.packer.packOne(l.w+2,l.h+2);null===h&&(this.packer=new c.Z(u.atlasSize[0],u.atlasSize[1]),this.currentAtlasIndex++,h=this.packer.packOne(l.w+2,l.h+2)),l.x=h.x+1,l.y=h.y+1,l.atlasIndex=this.currentAtlasIndex,l.isPacked=!0,this.packedRasters.push(t.index,s,l.x,l.y,l.w,l.h,this.currentAtlasIndex)}}}},t}(),f=n(7031),p=n(5582),m=function(){function t(t){this.atlasPacker=new h,this.geoIds=new Uint32Array(0),this.floorHidingMap=new p.g,this.addedBuckets=[],this.labels=[],this.idIndexer=new l.TD(t),this.buckets={},this.reset()}return t.prototype.reset=function(){this.buckets={},this.addedBuckets=[],this.geoIds=new Uint32Array(0),this.floorHidingMap.clear(),this.labels=[]},t.prototype.addLabel=function(t){this.labels.push(t)},t.prototype.getBucket=function(t,e,n,i){var r=this.buckets[t];void 0===r&&(r={},this.buckets[t]=r);var o=r[e];void 0===o&&(o=r[e]=[]);for(var a=o.length-1;a>=0;a--){var l=o[a];if((0,f.wy)(n,l.attributes))return this.addedBuckets.push(l),l}var c=new s(t,e,n,i);return o.push(c),this.addedBuckets.push(c),c},t.prototype.isOverloaded=function(){for(var t=this.addedBuckets,e=0,n=0;n<t.length;)e+=t[n++].checkWatermarks();var i=e>0;if(i)for(;n--;)t[n].rollback();else for(;n--;)t[n].commit();return t.length=0,i},t.prototype.setGeoIds=function(t){this.geoIds=t},t.prototype.addFloorHidingMap=function(t,e){var n=this.floorHidingMap.get(e);void 0===n&&(n=[]),n.push(t.lo,t.hi),this.floorHidingMap.set(e,n)},t.prototype.getAccumulatedData=function(){var t=this.buckets,e=[],n=[];for(var r in t){var o=r,a=t[o];if(a)for(var s in a){var l=s,c=a[l];if(c){for(var u=(0,i.vP)(o,l)/4,d=0,h=0;h<c.length;h++)d+=c[h].indices.offset;if(0!==d){var f=[],p=new Int32Array(d*u),m=0;for(h=0;h<c.length;h++){var v=c[h],_=v.elements,y=v.indices,g=v.attributes,b=_.view,w=y.buffer;if(0!==_.offset){for(var x=m,S=0;S<y.offset;S++)for(var I=w[S]*u,M=0;M<u;M++)p[m++]=b[I+M];f.push({attributes:g,rangeStart:4*x,rangeEnd:4*m}),v.resetOffsets()}}e.push({symbol:o,sink:l,buffer:p.buffer,generatedObjects:f}),n.push(p.buffer)}}}}var P=this.idIndexer.getPacked();n.push(P.idBuffer,P.phaseBuffer);var T=this.atlasPacker.getPackedRasters();void 0!==T&&n.push(T.buffer);var L=this.atlasPacker.getRastersToLoad();n.push(L.buffer);var E=new Uint32Array(this.geoIds);n.push(E.buffer);var k=this.floorHidingMap.serialize();this.floorHidingMap.clear();var z=this.labels;return this.labels=[],{data:e,labels:z,geoIds:E,floorHidingMap:k,packedRasters:T,rastersToLoad:L,identifyIds:P,transferable:n}},t}()},6507:function(t,e,n){"use strict";n.d(e,{x:function(){return s}});var i=n(2626),r=n(7357),o=n(1245),a=new Map,s=function(){function t(t,e,n,s,l,c){switch(this.anchorWorld=[0,0,0,0],this.groupPriority=0,this.labelingGroup=r.T_,this.marginTopBottom=0,this.marginLeftRight=0,this.type=e,this.label=t,this.layer=t.layer,this.id=t.id+"_"+e+"_"+Math.floor(n[0]/1e3)+"_"+Math.floor(n[1]/1e3)+this.getIconLabelPriorityToId(t),o.JG(this.anchorWorld,n),this.anchorWorld[2]*=s,this.anchorScreen=l.project(this.anchorWorld),this.anchorPosition=0,this.anchorSegmentIndex=0,this.halfLabelWidth=0,this.itemPriority=e===i.Dl.Icon?t.iconPriority:t.labelPriority,t.pointType===i.a_.Commercial&&(a.has(this.id)?this.commercialPriority=a.get(this.id):(this.commercialPriority=Math.random(),a.set(this.id,this.commercialPriority))),this.layer.type){case"labelLine":this.labelingGroup=this.layer.style.labelingGroup,this.groupPriority=this.layer.style.textPriority;break;case"oneWayLine":this.labelingGroup=this.layer.style.labelingGroup,this.groupPriority=this.layer.style.priority;break;case"point":e===i.Dl.PoiText?(this.labelingGroup=this.layer.style.allowOverlap?r.R_:this.layer.style.textLabelingGroup,this.groupPriority=this.layer.style.iconImage?Math.min(this.layer.style.textPriority,this.layer.style.iconPriority):this.layer.style.textPriority,this.marginTopBottom=this.layer.style.textLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.textLabelingMargin.leftRight):e===i.Dl.PoiText2?(this.labelingGroup=this.layer.style.allowOverlap?r.R_:this.layer.style.textLabelingGroup2,this.groupPriority=Math.min(this.layer.style.textPriority,this.layer.style.iconPriority),this.marginTopBottom=this.layer.style.textLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.textLabelingMargin.leftRight):(this.labelingGroup=this.layer.style.allowOverlap?r.R_:this.layer.style.iconLabelingGroup,this.groupPriority=this.layer.style.iconPriority,this.marginTopBottom=this.layer.style.iconLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.iconLabelingMargin.leftRight)}this.labelingGroupTable=c.labelingGroups.table,this.overflowStyleZoom=-1/0,this.boxes=[],this.placementIndex=0}return t.prototype.getIconLabelPriorityToId=function(t){var e=t.layer;return"point"===e.type?"_"+e.style.iconPriority.toFixed(0)+"_"+e.style.textPriority.toFixed(0):""},t}()},6721:function(t,e,n){"use strict";var i=n(655),r=n(1026),o=n(5951),a=n(7097),s=n(9798),l=n(2626);function c(t,e,n){var i=t[e];if(void 0!==i)return i[n]}var u=n(5510);function d(t,e,n){var i=n.minX,r=n.maxX,o=n.minY,a=n.maxY;t.push(i,o,r-i,a-o,e)}function h(t,e,n,i){var r=t.anchorScreen,o=t.boxes[e];return{element:t,minX:r[0]+o[0]-n|0,maxX:r[0]+o[2]+n|0,minY:r[1]+o[1]-i|0,maxY:r[1]+o[3]+i|0}}function f(t,e){if(t.parent===e||t.firstLabel===e||e.parent===t||e.firstLabel===t)return!1;var n=t.labelingGroup,i=e.labelingGroup;return function(t,e,n,i){var r=c(t,n,i),o=c(e,n,i);return void 0===r&&void 0===o||(void 0===r?void 0===o||o:void 0===o?void 0===r||r:r||o)}(t.labelingGroupTable,e.labelingGroupTable,n,i)}function p(t,e,n,i,r,o){var a=h(e,n,i,r);if(a.minX>o.maxX||a.maxX<o.minX||a.minY>o.maxY||a.maxY<o.minY)return!0;for(var s=t.search(a),l=0;l<s.length;l++)if(f(e,s[l].element))return!0;return!1}function m(t,e,n,i,r){for(var o=!0,a=0;a<t.boxes.length;a++)if(p(e,t,a,t.marginLeftRight,t.marginTopBottom,n)){if(o=!1,r)for(var s=0;s<t.boxes.length;s++){var c=h(t,s,t.marginLeftRight,t.marginTopBottom);d(r,s===a?l.m3.Dead:s<a?l.m3.Alive:l.m3.Unused,c)}break}if(o)for(a=0;a<t.boxes.length;a++)c=h(t,a,t.marginLeftRight,t.marginTopBottom),e.insert(c),r&&d(r,l.m3.Alive,c);t.placementIndex=o?0:-1}function v(t,e,n,i,r){t.placementIndex=-1;for(var o=0;o<t.boxes.length;o++)if(!t.firstLabel||t.firstLabel.placementIndex===o){if(!p(e,t,o,t.marginLeftRight,t.marginTopBottom,n)){var a=h(t,o,t.marginLeftRight,t.marginTopBottom);if(e.insert(a),t.placementIndex=o,r){d(r,l.m3.Alive,a);for(var s=o+1;s<t.boxes.length;s++)d(r,l.m3.Unused,h(t,s,t.marginLeftRight,t.marginTopBottom))}break}r&&d(r,l.m3.Dead,h(t,o,t.marginLeftRight,t.marginTopBottom))}}function _(t){return t.type!==l.Dl.Box&&void 0!==t.commercialPriority}function y(t,e,n,i){var o=e.debugLabels?[]:void 0,a=e.size,c=e.viewport,f=a[0],y=a[1],g=(r.labeling.tileMultiplier-1)/2,b=Math.round(f*g),w=Math.round(y*g),x={minX:c.left-b,maxX:c.left+f+b,minY:c.top-w,maxY:c.top+y+w},S=u();t.filter(_).sort((function(t,e){return(n.has(e.id)?1:0)-(n.has(t.id)?1:0)||t.commercialPriority-e.commercialPriority})).forEach((function(t){!function(t,e,n,i,r,o){var a,s;if(i.has(t.id)?(a=r.visibleLeftRight,s=r.visibleTopBottom):(a=r.appearLeftRight,s=r.appearTopBottom),p(e,t,0,a,s,n))t.placementIndex=-1,o&&d(o,l.m3.CommercialDead,h(t,0,a,s));else{t.placementIndex=0;var c=h(t,0,r.visibleLeftRight,r.visibleTopBottom);e.insert(c),o&&d(o,l.m3.CommercialAlive,c)}}(t,S,x,n,i,o)})),S.clear();for(var I=t.sort((function(t,e){var i=t.label instanceof s._?t.label.hovered:0,r=e.label instanceof s._?e.label.hovered:0;return e.groupPriority-t.groupPriority||(_(e)?1:0)-(_(t)?1:0)||(n.has(e.id)?1:0)-(n.has(t.id)?1:0)||r-i||e.itemPriority-t.itemPriority||e.label.idHi-t.label.idHi||e.label.idLo-t.label.idLo||e.label.layer.innerId-t.label.layer.innerId||e.anchorWorld[0]-t.anchorWorld[0]||e.anchorWorld[1]-t.anchorWorld[1]})),M=0;M<I.length;M++){var P=I[M];if(-1!==P.placementIndex)switch(P.type){case l.Dl.LineText:case l.Dl.Icon:m(P,S,x,0,o);break;case l.Dl.Box:if(!P.parent||P.parent&&-1!==P.parent.placementIndex){m(P,S,x,0,o);break}P.placementIndex=-1;break;case l.Dl.PoiText:case l.Dl.PoiText2:P.parent&&-1===P.parent.placementIndex||P.firstLabel&&-1===P.firstLabel.placementIndex?P.placementIndex=-1:v(P,S,x,0,o)}}return o}var g=n(834),b=function(){function t(t,e,n){this.line=t,this.lengths=[],this.angles=[];for(var i=e,r=t[0],o=t[1],a=t.length/3,s=0;s<a;s++){var l=t[3*s]-r,c=t[3*s+1]-o;i+=Math.sqrt(l*l+c*c),this.lengths.push(i),r+=l,o+=c}for(this.finishLength=this.lengths[this.lengths.length-1],this.startLength=this.lengths[0],this.midLength=n/2,this.vertexCount=a,this.angles.push(0),s=1;s<a;s++){var u=this.line[3*(s-1)],d=this.line[3*s],h=this.line[3*(s-1)+1],f=this.line[3*s+1];this.angles.push(Math.atan2(f-h,d-u))}}return t.prototype.interpolate=function(t,e){var n=e,i=n-1,r=this.lengths[i],o=(t-r)/(this.lengths[n]-r);return[(1-o)*this.line[3*i]+o*this.line[3*n],(1-o)*this.line[3*i+1]+o*this.line[3*n+1],0,this.angles[e]]},t.prototype.getSegmentIndex=function(t){for(var e=0;e<this.lengths.length;e++)if(t<this.lengths[e])return e;return this.lengths.length},t}(),w=function(){function t(){this.labels={}}return t.prototype.add=function(t){var e=t.id,n=t.componentDistanceStart;void 0===this.labels[e]&&(this.labels[e]={});var i=this.labels[e];void 0===i[n]&&(i[n]=[]),i[n].push(t)},t.prototype.merge=function(){var t=[];for(var e in this.labels)for(var n=this.labels[e],i=Object.keys(n).sort((function(t,e){return Number(t)-Number(e)})),r=0;r<i.length;){var o=i[r];if(0!==n[o].length){for(var a=[],s=n[o].pop();void 0!==s;)a.push(s),s=0===s.componentDistanceStart&&0===s.componentDistanceEnd||void 0===n[s.componentDistanceEnd]?void 0:n[s.componentDistanceEnd].pop();if(1===a.length){var l=a[0];l.axis=new b(l.mapPointVertices,l.componentDistanceStartWorld,l.objectLengthWorld),t.push(l)}else a.length>1&&t.push(this.stitch(a))}else r++}return t},t.prototype.stitch=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].mapPointVertices.length;e-=3*(t.length-1);var i=new Int32Array(e),r=0;for(n=0;n<t.length;n++)for(var o=t[n].mapPointVertices,a=n>0?3:0;a<o.length;a++)i[r++]=o[a];var s=t[0];return s.axis=new b(i,s.componentDistanceStartWorld,s.objectLengthWorld),t[0]},t}(),x=n(6507),S=n(378),I=n(9450),M=n(242),P=function(t,e,n,i,r,o,a,s,c,u,d,h){this.type=l.Dl.Box,this.marginTopBottom=0,this.marginLeftRight=0,this.id=String(t),this.label={layer:{innerId:0},styleId:-100,idLo:t,idHi:0,symbol:"nevermind",phase:NaN},this.groupPriority=null!=h?h:M.Rw,this.itemPriority=null!=d?d:1,this.parent=u,this.placementIndex=0,this.labelingGroup=c,this.labelingGroupTable=s.labelingGroups.table,this.anchorWorld=I.Ue(),I.JG(this.anchorWorld,i),this.anchorWorld[2]*=o,this.anchorScreen=a.project(this.anchorWorld),S.IH(this.anchorScreen,this.anchorScreen,r),this.boxes=[[0,0,e,n]]},T=n(3308),L=n(372),E=n(3410),k=n(7624),z=n(3936),C=n(7357),A=n(3065),D=(0,L.Id)(r.labeling.axisAngleToleranceDeg),F=r.labeling.axisCheckDistancePx,R=(0,L.Id)(r.labeling.lineLabelsHidePitchDeg);function O(t,e,n,i,r,o,a,s,c,u,d){for(var h=[],f=[],p=[],m=[],v={},_=function(t,e){for(var n={personalPoi:new Set,commercialPoi:new Set},i=0,r=t;i<r.length;i++){var o=r[i],a=e.get(o);if(void 0!==a)for(var s=0,c=a;s<c.length;s++){var u=c[s];u.source===l.AL.PersonalPoi?n.personalPoi.add(u.id):u.pointType===l.a_.Commercial&&n.commercialPoi.add(u.id)}}return n}(t,r),y=new w,g=0;g<t.length;g++){var b=t[g],x=r.get(b);if(void 0!==x)for(var S=0;S<x.length;S++){var I=x[S];if(L=i.getStyle(I.styleId)){if(!(I.source===l.AL.Tile&&u.has(I.id)||I.source!==l.AL.PersonalPoi&&_.personalPoi.has(I.id)&&I.pointType!==l.a_.Commercial||I.source===l.AL.PersonalPoi&&_.commercialPoi.has(I.id)))switch(I.layer.type){case"point":if(j(I,a,s,e.styleState,e.styleZoom,L,d)&&W(I,e.styleZoom))if(I.geometryType===l._r.Line)y.add(I);else{var M=[I.mapPointVertices[0],I.mapPointVertices[1],I.mapPointVertices[2],0];B(m,p,v,I,M,n,e,L,c)}break;case"labelLine":j(I,a,s,e.styleState,e.styleZoom,L,d)&&W(I,e.styleZoom)&&y.add(I);break;case"oneWayLine":W(I,e.styleZoom)&&y.add(I)}}else console.error("Not found style "+I.styleId+" in labeling#collectLabelingElements")}}var T=y.merge();for(g=0;g<T.length;g++){var L;I=T[g],(L=i.getStyle(I.styleId))?"point"===I.layer.type?U(m,p,v,I,L,n,e,c):Z(f,m,I,L,n,e):console.error("Not found style "+I.styleId+" in labeling#collectLabelingElements")}return o.forEach((function(t){var r,o=t.id,a=t.width,s=t.height,l=t.position,c=t.offset,u=t.labelingGroup,d=t.parentPoiId;if(!d||(r=v[d])){var f=i.getStyle(z.jf);if(f){var p=new P(o,a,s,l,c,e.buildingHeight,n,f,u,r,null==r?void 0:r.itemPriority,null==r?void 0:r.groupPriority);h.push(p)}else console.error("Not found style "+z.jf+" in labeling#collectLabelingElements")}})),{boxElements:h,oneWayTileElements:f,noLabelingElements:p,otherTileElements:m}}function j(t,e,n,i,r,o,a){var s,l=t.layer;if("point"!==l.type&&"labelLine"!==l.type)return!1;var c=(0,k.bs)(r,i,!1,t.tileData);if(A.rJ&&!t.rtlProcessed&&(t.label=null!==(s=(0,A.iY)(t.label))&&void 0!==s?s:"",t.label2=(0,A.iY)(t.label2),t.iconLabel=(0,A.iY)(t.iconLabel),t.updateRanges(),a(M.Uo,t.ranges),(0,k.EG)(l.style.textFont).forEach((function(e){e.length&&a(e,t.ranges)})),"point"===l.type&&l.style.textFont2&&(0,k.EG)(l.style.textFont2).forEach((function(e){e.length&&a(e,t.ranges)})),"point"===l.type&&l.style.iconTextFont&&(0,k.EG)(l.style.iconTextFont).forEach((function(e){e.length&&a(e,t.ranges)})),t.rtlProcessed=!0),!t.rtlProcessed)return!1;var u,d=t.ranges,h=(0,E.rq)(l.style.textFont,c,o);if(h&&t.label&&(0,E.dm)(h,d,n)&&(u=(0,E.JA)(t.label,l.style.textLetterSpacing,e[h]),t.textMetrics=u),"labelLine"===l.type)return!h||!!u;var f=(0,E.rq)(l.style.iconTextFont,c,o);f&&t.iconLabel&&(0,E.dm)(f,d,n)&&(t.iconTextMetrics=(0,E.JA)(t.iconLabel,l.style.iconTextLetterSpacing,e[f]));var p=(0,E.rq)(l.style.textFont2,c,o);return h&&t.label&&p&&t.label2&&(0,E.dm)(p,d,n)&&(t.textMetrics2=(0,E.JA)(t.label2,l.style.textLetterSpacing,e[p])),h&&t.label?!(!u||f&&t.iconLabel&&!t.iconTextMetrics||p&&t.label2&&!t.textMetrics2):!f||!t.iconLabel||!!t.iconTextMetrics}function B(t,e,n,i,r,a,s,c,u){var d;(0,o.Pn)(i,r,c,i.layer,s,a,u);for(var h=0;h<i.labelingElements.length;h++){var f=i.labelingElements[h];f.labelingGroup!==C.R_&&(null===(d=f.parent)||void 0===d?void 0:d.labelingGroup)!==C.R_?(t.push(f),f.type===l.Dl.Icon&&(n[f.label.id]=f)):e.push(f)}}function U(t,e,n,i,r,o,a,s){var l=i.layer;if("point"===l.type)for(var c=a.zoom,u=a.styleZoom,d=Math.floor(u),h=c+(d-u),f=i.axis,p=f.startLength,m=f.midLength,v=f.finishLength,_=(0,k.bs)(d,a.styleState,!1,i.tileData),y=Math.max((0,T.h0)((0,k.vn)(l.style.duplicationSpacing,_),h),1),g=(0,T.h0)(l.style.endingOffsets,c),b=p+g,w=v-g,x=p+(m-p)%y;x<w;x+=y)if(x>b){var S=i.axis,I=x,M=S.getSegmentIndex(I);B(t,e,n,i,S.interpolate(I,M),o,a,r,s)}}function Z(t,e,n,i,o,a){var s=n.layer;if("labelLine"===s.type||"oneWayLine"===s.type){var l,c,u,d,h=a.zoom,f=a.styleZoom,p=Math.floor(f),m=h+(p-f),v=n.axis,_=v.startLength,y=v.midLength,g=v.finishLength,b=(0,k.bs)(f,a.styleState,!1,n.tileData),w=(0,k.bs)(p,a.styleState,!1,n.tileData);if("labelLine"===s.type){var x=(0,k.vn)(s.style.textFontSize,b)/r.fonts.baseSize,S=(0,k.vn)(s.style.textFontSize,w)/r.fonts.baseSize;l=n.textMetrics.maxWidth*x,c=n.textMetrics.maxWidth*S,u=(0,T.h0)((0,k.vn)(s.style.textDuplicationSpacing,w),m),d=(0,T.h0)(s.style.lineEndingOffsets,h)}else l=(0,k.vn)(s.style.lineLength,b),c=(0,k.vn)(s.style.lineLength,w),u=(0,T.h0)((0,k.vn)(s.style.duplicationSpacing,w),m),d=(0,T.h0)(s.style.endingOffsets,h);for(var I=(0,T.h0)(c,m),M=(0,T.h0)(l,h)/2,P=u+I,L=_+(y-_)%P,E=_+M+d,z=g-M-d,C="labelLine"!==s.type?t:e,A=L;A<z;A+=P)A>E&&N(C,n,A,M,l,o,a,i)}}function N(t,e,n,i,o,a,s,c){var u=e.axis,d=s.zoom,h=s.styleZoom,f=u.startLength,p=u.finishLength,m=u.getSegmentIndex(n),v=u.interpolate(n,m);if(!((0,T.gr)(a.position,v,s.center)>R)&&function(t,e,n,i,o,a){if("oneWayLine"===t.layer.type)return!0;for(var s=t.axis,l=(0,k.bs)(o,a,!1,t.tileData),c=(0,k.vn)(t.layer.style.textFontSize,l)/r.fonts.baseSize,u=s.getSegmentIndex(e-n),d=s.getSegmentIndex(e+n),h=(0,T.h0)(F*c,i),f=u;f<d;f++){if(f>1&&H(s.angles[f-1],s.angles[f])>D)return!1;var p=s.getSegmentIndex(s.lengths[f]-h);if(0!==p&&H(s.angles[p],s.angles[s.getSegmentIndex(s.lengths[f]+h)])>D)return!1}return!0}(e,n,i,d,h,s.styleState)){var _="oneWayLine"===e.layer.type,y=_?l.Dl.OneWayLine:l.Dl.LineText,g=new x.x(e,y,v,s.buildingHeight,a,c);g.anchorPosition=n,g.anchorSegmentIndex=m,g.halfLabelWidth=i,_||(g.overflowStyleZoom=(0,T.X$)((0,T.to)(o,p-f),v),function(t,e,n,i,r,o){var a=e.axis,s=e.layer;if("labelLine"===s.type){for(var l=r.zoom,c=r.styleZoom,u=(0,k.bs)(c,r.styleState,!1,e.tileData),d=(0,k.vn)(s.style.textFontSize,u),h=d/2,f=(0,T.h0)(d,l),p=(0,T.h0)(s.style.textLabelingSideMargin,l),m=n-i+f/2-p,v=n+i-f/2+p,_=a.getSegmentIndex(m),y=m;y<v;y+=f){for(;a.lengths[_]<y;)_++;V(t,a,y,_,o,h)}for(;a.lengths[_]<v;)_++;V(t,a,v,_,o,h)}}(g,e,n,i,s,a)),t.push(g)}}function H(t,e){var n=Math.abs(t-e);return n>Math.PI?2*Math.PI-n:n}var G=[0,0];function V(t,e,n,i,r,o){r.putProject(G,e.interpolate(n,i)),G[0]=G[0]-t.anchorScreen[0],G[1]=G[1]-t.anchorScreen[1],t.boxes.push([G[0]-o,G[1]-o,G[0]+o,G[1]+o])}function W(t,e){var n=t.source,i=t.detailLevel,o=t.layer,a=o.minzoom,s=o.maxzoom,c=n===l.AL.PersonalPoi,u=c||a>i,d=c||s<i+1||i===r.tiles.maxDetailLevel;return(!u||e>=a)&&(!d||e<s)}var q=n(1462),X=n(2244),Y=n(6670),K=n(5017),J=n(9508),Q=n(5275),$=n(7120),tt=n(1859),et=new Map;!function(t){var e=new q.D(t),n=new X.J(e),c=new g.P("labeling"),u=new J.h,d=n.get(K.P.Main,"loadFont"),h=new Map,f=new Map,p=[],m=new Map,v=new Y.c,b=new Y.c,w={},x=(0,a.D)((function(){return c.reset()}),r.workerResetDebounceTime);function S(t,e){for(var n=0,i=e;n<i.length;n++){var r=i[n];v.has(t,r)||(d(t,r),v.set(t,r,!0))}}function I(t,e,n){if(t.has(n.label.sourceId))return 0;var i=e.get(n.id);return void 0===i||void 0===i.placementIndex||i.type===l.Dl.Icon&&i.layer.innerId!==n.layer.innerId?1:i.placementIndex===n.placementIndex?0:1}n.set("appendLabels",(function(t,e,n,i,r){var o=(0,s.v)(n,e,u,i,r);h.set(t,o)})),n.set("appendLabelBox",(function(t,e){f.set(t,e)})),n.set("removeEmptyBoxLabel",(function(t){f.delete(t)})),n.set("removeLabels",(function(t){h.delete(t),f.delete(t)})),n.set("processLabels",(function(t,e,n,r,a,s,d,v){var g=new Set(s),M=new tt.V(n),P=new Set,T=e;t.forEach((function(t){var e=t.sourceId,n=t.animate,i=t.labelsKeys;n||P.add(e),T.push.apply(T,i)}));for(var L=O(T,n,M,u,h,f,w,b,a,g,S),E=L.boxElements,k=L.oneWayTileElements,z=L.otherTileElements,C=L.noLabelingElements,A=y((0,i.ev)((0,i.ev)([],z),E),n,v?et:m,d),D=(0,i.ev)((0,i.ev)((0,i.ev)([],C),k),z),F=new Map,R=0;R<D.length;R++)-1!==(at=D[R]).placementIndex&&F.set(at.id,at);for(R=0;R<D.length;R++){var j=(at=D[R]).label,B=j.styleId,U=j.layer;if(-1!==at.placementIndex){var Z=I(P,m,at);(N=u.getStyle(B))?(0,o.SV)(N,U,c,at,Z,a,n,r):console.error("Not found style "+B+" in labeling#processLabels")}}for(R=0;R<p.length;R++){var N,H=p[R],G=H.id,V=H.label;if(U=H.layer,B=V.styleId,N=u.getStyle(B)){if(!P.has(H.label.sourceId)){var W=H.placementIndex,q=F.get(G);-1!==W&&(H.placementIndex!==(null==q?void 0:q.placementIndex)||H.type===l.Dl.Icon&&H.layer.innerId!==(null==q?void 0:q.layer.innerId))&&(n.styleZoom<H.overflowStyleZoom||n.styleZoom<U.minzoom||n.styleZoom>=U.maxzoom||(0,o.SV)(N,U,c,H,-1,a,n,r))}}else console.error("Not found style "+B+" in labeling#processLabels")}p=D,m=F;for(var X=c.getAccumulatedData(),Y=[],K=0,J=E;K<J.length;K++)-1!==(at=J[K]).placementIndex&&Y.push(at.label.idLo);for(var nt=new Set,it=(0,Q.B)(n.tilesBounds),rt=0,ot=z;rt<ot.length;rt++){var at;-1!==(at=ot[rt]).placementIndex&&_(at)&&$.r3(it,at.anchorWorld)&&nt.add(at.label.id)}var st={survivedLabelBoxIds:Y,survivedCommPoiIds:Array.from(nt),collectorOutput:X,transferable:X.transferable};if(A){var lt=new Int32Array(A.length);lt.set(A),st.labels=lt.buffer}return x(),st})),n.set("appendFont",(function(t,e){w[t]||(w[t]={});var n=w[t];for(var i in e)n[i]=e[i]})),n.set("markFontAsLoaded",(function(t,e){b.set(t,e,!0)})),n.set("addNewRasterSets",(function(t,e){var n=u.getStyle(t);if(n){var i=n.rasterSets;e.forEach((function(t){i.byIndex[t.index]=t,i.byKey[t.key]=t}))}else console.error("Not found style "+t+" in labeling#addNewRasterSets")})),n.set("updatePackingInfo",(function(t,e){var n=u.getStyle(t);if(n)for(var i=n.rasterSets,r=e.length/7,o=0;o<r;o++){var a=e[7*o],s=e[7*o+1],l=e[7*o+6],c=e[7*o+2],d=e[7*o+3],h=e[7*o+4],f=e[7*o+5],p=i.byIndex[a];if(void 0!==p)if(p.isSvg)p.rasters[s]={rasterIndex:s,rasterSetIndex:a,x:c,y:d,w:h,h:f,anchorX:p.anchorX,anchorY:p.anchorY,atlasIndex:l,isPacked:!0};else{var m=p.rasters[s];if(void 0===m){console.error("Not found raster with index "+s+" and raster set index "+a);continue}m.x=c,m.y=d,m.atlasIndex=l,m.isPacked=!0}else console.error("Not found raster set with index "+a)}else console.error("Not found style "+t+" in labeling#updatePackingInfo")})),n.set("clearPreviousLabels",(function(){p=[],m.clear()})),n.set("syncStyle",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.proxySyncStyle.apply(u,t)})),n.set("loadRtlPlugin",A.ng),n.set("markRtlPluginLoaded",(function(){A.dp&&(0,A.dp)()}))}(self)},9798:function(t,e,n){"use strict";n.d(e,{v:function(){return u},_:function(){return d}});var i=n(789),r=n(8131),o=n(2626),a=n(3526),s=n(7540),l=n(1253);function c(t){return"labelLine"===t.type||"point"===t.type||"oneWayLine"===t.type}function u(t,e,n,i,r){for(var o=[],a=0,l=t;a<l.length;a++)for(var u=l[a],h=0,f=u.labels;h<f.length;h++){var p=f[h],m=n.getStyle(p.styleId);if(m){var v=m.layersById[p.layerId];if(v&&c(v)){var _=new d(p,v,e,u.metatileHash);switch(p.type){case s.R2.Point:_.setSpecificPointAttributes(p,i,r);break;case s.R2.Line:_.setSpecificLineAttributes(p,i,r);break;case s.R2.OneWayLine:_.setSpecificOneWayAttributes(p)}o.push(_)}else console.error("Not found layer: "+p.layerId+" in style "+p.styleId+" in unpackPreLabelingResult")}else console.error("Not found style "+p.styleId+" in unpackPreLabelingResult")}return o}var d=function(){function t(t,e,n,i){this.rtlProcessed=!1,this.labelingElements=[],this.id="",this.idLo=0,this.idHi=0,this.detailLevel=0,this.labelPriority=0,this.label="",this.ranges=[],this.pointType=o.a_.Common,this.iconPriority=0,this.identifyIndex=l.gl,this.identifyPoiLabelIndex=l.gl,this.hovered=0,this.label2Priority=0,this.mapPointVertices=[0,0,0],this.componentDistanceStartWorld=0,this.componentDistanceEnd=0,this.componentDistanceStart=0,this.objectLengthWorld=0,this.layer=e,this.styleId=t.styleId,this.source=n,this.sourceId=t.sourceId,this.metatileHash=i,this.geometryType=t.type===s.R2.Point?t.geometryType:o._r.Line,this.tileData=t.tileData,this.labelPriority=t.labelPriority,this.detailLevel=t.tileCoords[2],this.idLo=t.id.lo,this.idHi=t.id.hi,this.id=(0,r.Ak)(t.id)}return t.prototype.setSpecificPointAttributes=function(t,e,n){if("point"!==this.layer.type)throw new Error("Label: layer type is not a point");var r=this.layer.style;this.pointType=t.pointType,this.label2Priority=t.label2Priority,this.iconPriority=t.iconPriority,this.identifyIndex=t.identifyIndex,this.identifyPoiLabelIndex=t.identifyPoiLabelIndex,this.hovered=t.hovered;var l={type:"labeling",interpolateExpressionAsStep:!0,tileData:t.tileData,styleState:e,styleZoom:n};this.label=(0,i.lD)((0,s.It)(r.textField,l),r.textMaxLengthPerLine),r.textField2&&(this.label2=(0,i.lD)((0,s.It)(r.textField2,l),r.textMaxLengthPerLine)),"point"===this.layer.type&&r.iconTextField&&(this.iconLabel=(0,i.lD)((0,s.It)(r.iconTextField,l),r.textMaxLengthPerLine));var c=(0,a.Bs)(t.tileCoords);this.mapPointVertices=[];var u=[0,0,0],d=[0,0,0];if(t.geometryType===o._r.Point)u[0]=t.vertices[0][0],u[1]=t.vertices[1][0],u[2]=t.vertices[2][0],(0,a.Z$)(this.mapPointVertices,u,c),this.layer.style.allowElevation||(this.mapPointVertices[2]=0);else{for(var h=0;h<t.vertices[0].length;h++)u[0]=t.vertices[0][h],u[1]=t.vertices[1][h],(0,a.Z$)(d,u,c),this.mapPointVertices.push(d[0],d[1],d[2]);this.componentDistanceStart=t.componentDistanceStart,this.componentDistanceEnd=t.componentDistanceEnd,this.componentDistanceStartWorld=(0,a.C5)(this.componentDistanceStart,t.tileCoords[2]),this.objectLengthWorld=(0,a.C5)(t.objectLength,t.tileCoords[2])}},t.prototype.setSpecificLineAttributes=function(t,e,n){if("labelLine"!==this.layer.type)throw new Error("Label: layer type is not a labelLine");var i={type:"labeling",interpolateExpressionAsStep:!0,tileData:t.tileData,styleState:e,styleZoom:n};this.label=(0,s.It)(this.layer.style.textField,i);var r=(0,a.Bs)(t.tileCoords);this.mapPointVertices=[];for(var o=[0,0,0],l=[0,0,0],c=0;c<t.vertices[0].length;c++)o[0]=t.vertices[0][c],o[1]=t.vertices[1][c],(0,a.Z$)(l,o,r),this.mapPointVertices.push(l[0],l[1],l[2]);this.componentDistanceStart=t.componentDistanceStart,this.componentDistanceEnd=t.componentDistanceEnd,this.componentDistanceStartWorld=(0,a.C5)(this.componentDistanceStart,t.tileCoords[2]),this.objectLengthWorld=(0,a.C5)(t.objectLength,t.tileCoords[2])},t.prototype.setSpecificOneWayAttributes=function(t){var e=(0,a.Bs)(t.tileCoords);this.mapPointVertices=[];for(var n=[0,0,0],i=[0,0,0],r=0;r<t.vertices[0].length;r++)n[0]=t.vertices[0][r],n[1]=t.vertices[1][r],(0,a.Z$)(i,n,e),this.mapPointVertices.push(i[0],i[1],i[2]);this.componentDistanceStart=t.componentDistanceStart,this.componentDistanceEnd=t.componentDistanceEnd,this.componentDistanceStartWorld=(0,a.C5)(this.componentDistanceStart,t.tileCoords[2]),this.objectLengthWorld=(0,a.C5)(t.objectLength,t.tileCoords[2])},t.prototype.updateRanges=function(){this.ranges=(0,i.Go)([this.label,this.label2,this.iconLabel])},t}()},9703:function(t,e,n){"use strict";var i=n(655),r=n(3614),o=n.n(r),a=n(7097),s=n(1026),l=n(242),c=n(9187),u=n(3021),d=n(7277),h=n(8131),f=n(4590),p=n(6591),m=n(7624),v=n(5570),_=n(2388),y=n(5630),g=[l.Bq/2,l.Bq/2],b=[[0],[0],[0]],w=[[0],[0],[0]],x={};function S(t,e,n,i,r,o,a,l){var d=n.tileProps;e[d.db_height]=s.floors.islandHeight,e[d.db_sublayer]=t.areaSublayer,e[d.selected]=l?1:0,e[d.db_region]=a,i.layers.forEach((function(a){if("polygonExtrusion"===a.type&&(0,m.FR)(a.filter,(0,m.ci)(n,r,x,d,e)))for(var s=0;s<t.area.length;s++){var l=T(t.area[s]),h=P(l),f=h.x,p=h.y,v=c(l);b[0].length=0,b[1].length=0,b[2].length=0;for(var _=0;_<v.length;_+=3){for(var y=0;y<3;y++)b[0][y]=f[v[_+y]],b[1][y]=p[v[_+y]],b[2][y]=1;do{u.p.generate(o,i.id,a,n,r,x,d,e,b,!1)}while(o.isOverloaded())}}}))}function I(t,e,n,i,r,o,a,s){var l=n.tileProps;e[l.db_sublayer]=t.areaSublayer,e[l.selected]=s?1:0,e[l.db_region]=a,i.layers.forEach((function(a){if("polygon"===a.type&&(0,m.FR)(a.filter,(0,m.ci)(n,r,x,l,e)))for(var s=0;s<t.area.length;s++){var u=T(t.area[s]),d=P(u),h=d.x,f=d.y,p=c(u);b[0].length=0,b[1].length=0,b[2].length=0;for(var _=0;_<p.length;_+=3){for(var y=0;y<3;y++)b[0][y]=h[p[_+y]],b[1][y]=f[p[_+y]],b[2][y]=0;do{v.a.generate(o,i.id,a,l,e,b)}while(o.isOverloaded())}}}))}function M(t,e,n,i,r,o,a,l){if(t.wallSublayer){var c=n.tileProps;e[c.db_height]=s.floors.wallHeight,e[c.db_sublayer]=t.wallSublayer,e[c.selected]=l?1:0,e[c.db_region]=a,i.layers.forEach((function(a){if("polygonExtrusion"===a.type&&(0,m.FR)(a.filter,(0,m.ci)(n,r,x,c,e)))for(var s=0;s<t.wallTop.length;s++){var l=P(T(t.wallTop[s])),d=l.x,h=l.y,f=l.count;b[0].length=0,b[1].length=0,b[2].length=0;for(var v=0;v<f;v++){var _=(0,p.X)(v,f);b[0][_]=d[v],b[1][_]=h[v],b[2][_]=1}do{u.p.generate(o,i.id,a,n,r,x,c,e,b,!1,void 0,g)}while(o.isOverloaded())}}))}}function P(t){for(var e=[],n=[],i=0;i<t.length/2;i++)e[i]=t[2*i],n[i]=t[2*i+1];return{x:e,y:n,count:e.length}}function T(t){for(var e=new Uint16Array(t.length/2),n=0;n<t.length/2;n++)e[n]=t[2*n]|t[2*n+1]<<8;return e}var L=n(9450),E=n(127),k=n(8112),z={1:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]&255,t[n]=e},2:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]&65535,t[n]=e},4:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]>>>0,t[n]=e},8:function(t){for(var e=0,n=0,i=0,r=0;r<t.length;r+=2)n=(i=n+t[r])>>>0,t[r]=n,e=e+t[r+1]+(i>4294967295?1:0)>>>0,t[r+1]=e}},C=function(){function t(t){this.offset=0,this.buffer=t,this.u8=new Uint8Array(t),this.u16=new Uint16Array(t),this.u32=new Uint32Array(t),this.s8=new Int8Array(t),this.s16=new Int16Array(t),this.s32=new Int32Array(t),this.f32=new Float32Array(t)}return t.prototype.readS8=function(){return this.s8[this.offset++]},t.prototype.readU16=function(){var t=this.u16[this.offset>>1];return this.offset+=2,t},t.prototype.readU32=function(){var t=this.u32[this.offset>>2];return this.offset+=4,t},t.prototype.readF32=function(){var t=this.f32[this.offset>>2];return this.offset+=4,t},t.prototype.readU8Vector=function(t){void 0===t&&(t=1);var e=this.readU32()*t,n=3&-e,i=this.u8.subarray(this.offset,this.offset+e);return this.offset+=e+n,i},t.prototype.readU16Vector=function(t){void 0===t&&(t=1);var e=this.readU32()*t*2,n=3&-e,i=this.u16.subarray(this.offset>>1,this.offset+e>>1);return this.offset+=e+n,i},t}();function A(t,e,n,i){var r=e.BYTES_PER_ELEMENT;t.offset+=-t.offset&r-1;var o=new e(t.buffer,t.offset,n);return t.offset+=r*n,i&&z[r](o),o}function D(t,e,n){t.offset+=7&-t.offset;var i=new Uint32Array(t.buffer,t.offset,2*e);return t.offset+=8*e,n&&z[8](i),i}function F(t,e,n){t.offset+=3&-t.offset;var i,r=new Uint32Array(t.buffer,t.offset,e),o=new Float32Array(t.buffer,t.offset,e);if(t.offset+=4*e,n){var a=0;for(i=0;i<e;i++)a=a+r[i]>>>0,o[i]=a/1e3}else for(i=0;i<e;i++)o[i]=r[i]/1e3;return o}function R(t,e,n){t.offset+=3&-t.offset;var i,r=new Int32Array(t.buffer,t.offset,e),o=new Float32Array(t.buffer,t.offset,e);if(t.offset+=4*e,n){var a=0;for(i=0;i<e;i++)a=a+r[i]>>>0,o[i]=(0|a)/1e3}else for(i=0;i<e;i++)o[i]=r[i]/1e3;return o}function O(t,e,n){switch(n){case 2:case 10:return A(t,Uint8Array,e);case 3:return A(t,Uint8Array,e,!0);case 4:return A(t,Uint16Array,e);case 5:return A(t,Uint16Array,e,!0);case 6:case 25:return A(t,Uint32Array,e);case 7:return A(t,Uint32Array,e,!0);case 8:case 19:return D(t,e);case 9:case 20:return D(t,e,!0);case 11:return function(t,e){for(var n=t.offset,i=t.u8,r=t.buffer,o=[];e--;)o.push(0|i[n++]);for(var a=[];++e<o.length;){var s=o[e];255===s&&(s=i[n++]|i[n++]<<8|i[n++]<<16|0),a.push(new Uint8Array(r,n,s)),n+=s}return t.offset=n,a}(t,e);case 12:return function(t,e){t.offset+=3&-t.offset;for(var n=t.offset,i=t.u32,r=t.buffer,o=[],a=0;a<e;a++)o.push(i[n>>2]),n+=4;var s=[];for(a=0;a<e;a++){var l=o[a];n+=7&-n,s.push(new Uint8Array(r,n,l)),n+=l}return t.offset=n,s}(t,e);case 13:return A(t,Int8Array,e);case 14:return A(t,Int8Array,e,!0);case 15:return A(t,Int16Array,e);case 16:return A(t,Int16Array,e,!0);case 17:return A(t,Int32Array,e);case 18:return A(t,Int32Array,e,!0);case 21:return F(t,e);case 22:return F(t,e,!0);case 23:return R(t,e);case 24:return R(t,e,!0);default:throw new Error("Unknown stream type "+n)}}function j(t){for(var e=0,n=0;n<t.length;n++)e+=t[n];return e}function B(t,e,n){return new t.constructor(t.buffer,t.byteOffset+e*t.BYTES_PER_ELEMENT,n)}function U(t,e,n,i,r,o,a){var s=r.matrix,l=r.offset,c=r.id,u=r.selected,d=new C(i),h=[],f={};if(!t)return{objects:n.getAccumulatedData(),textures:h};if(1296191066!==d.readU32()||1!==d.readU16())return{objects:n.getAccumulatedData(),textures:[]};d.readU16();for(var p=d.readU32(),v=0;v<p;v++)h.push(d.readU8Vector());var _=o.tileProps,y=[],g=Object.keys(_).length;for(v=0;v<g;v++)y[v]=NaN;y[_.db_sublayer]="Building_model",y[_.id]=c,y[_.selected]=u?1:0,y[_.db_region]=a,n.setGeoIds(new Uint32Array([c.lo,c.hi]));var b=d.offset;return t.layers.forEach((function(i){"buildingModel"===i.type&&(0,m.FR)(i.filter,(0,m.ci)(o,e,f,_,y))&&(d.offset=b,function(t,e,n,i,r,o,a,s){for(var l=i.readU32(),c=0;c<l;c++){var u=i.readU32(),d=L.al(i.readF32(),i.readF32(),i.readF32()),h=L.al(i.readF32(),i.readF32(),i.readF32()),f=L.lu(L.Ue(),h,d),p=E.Ue();E.Iu(p,r,d),E.bA(p,p,f),p[12]+=o[0],p[13]+=o[1];for(var m=i.readU16Vector(5),v=i.readU32(),_=0;_<v;_++){var y=i.readU32(),g=i.readU16Vector();do{k.X.processSubmesh(t.id,e,a,n,s,m,g,y,u,p)}while(n.isOverloaded())}var b=i.readU16Vector();do{k.X.processOuterEdge(t.id,e,a,n,s,m,b,p)}while(n.isOverloaded())}}(t,i,n,d,s,l,o,y))})),{objects:n.getAccumulatedData(),textures:h}}var Z,N=n(5951),H=n(3526),G=n(789),V=[],W=new Int32Array(256),q=[],X=[],Y=[0,0,0,0,0],K=0,J=0,Q=0,$=[];function tt(t,e,n,i,r,o,a,s,l,c){var u=r.tileInfo,d=r.pixelRatio,h=r.selectedIds,p=r.floorsEnabled,m=r.hoverId,v=r.generateOnlySelectedPoi,_=r.generateOnlyHoveredPoi,g=o.data,b=new f.c(h),w=(0,H.VV)(g);if(w.byteLength<8)return i.getAccumulatedData();V.length=0;var x=new C(w);if(1279676242!==x.readU32())return i.getAccumulatedData();if(2!==x.readU16())return console.error("Unsupported tile format version"),i.getAccumulatedData();x.readU16();var S=u.coords,I=(0,y.o1)(d);return function(t){var e=t.u8,n=t.offset,i=t.u32[n>>2];for(K=i,J=n+=4;i--;)n=2*e[n++]+n,n=e[n++]+n;t.offset=n+(3&-n)}(x),function(t){var e=t.u32[t.offset>>2];t.offset+=4,Z=A(t,Uint8Array,e);for(var n=A(t,Uint32Array,e),i=0;i<e;i++){var r=Z[i];V[i]=O(t,n[i],r),W[i]=0}}(x),function(t,e,n,i,r,o,a,s,l,c,u,d,h,f,p,m){for(var v=K,_=A(r,Int32Array,v),y=j(_),g=A(r,Uint8Array,y,!0),b=A(r,Uint8Array,j(g),!0),w=A(r,Uint8Array,y,!0),x=A(r,Uint8Array,j(w),!0),S=A(r,Uint16Array,y,!0),I=0,M=0,P=0,T=0;T<v;T++){var L=_[T];if(rt(r,l,c),0===T){var E=V[X[1]];i.setGeoIds(E)}for(var k=0;k<L;k++){var z=g[I];z>0&&(et(c,z,b,M,l),M+=z);var C=w[I];C>0&&(nt(c,C,x,P),P+=C);var D=S[I];D>0&&it(t,e,n,i,D,o,a,s,l,c,u,d,h,f,p,m),I++}}ot()}(t,e,n,i,x,S,I,b,a,s,l,p,c,m,v,_),i.getAccumulatedData()}function et(t,e,n,i,r){for(var o;e--;){var a=n[i++],s=X[a],l=q[a],c=Z[s];if(8===c||9===c||19===c||20===c)t[l]=(0,h.Ru)(V[s][W[s]],V[s][W[s]+1]),W[s]+=2;else{var u=V[s][W[s]];switch(l){case r.tileProps.db_label:case r.tileProps.db_label2:t[l]=(0,G.zT)(u);break;default:var d=r.tilePropsByIndex[l];d&&r.reverseDictionaries[d]?t[l]=null!==(o=r.reverseDictionaries[d][u])&&void 0!==o?o:u:t[l]=u}W[s]++}}}function nt(t,e,n,i){for(;e--;){var r=n[i++];t[q[r]]=NaN}}function it(t,e,n,i,r,o,a,l,c,u,f,p,v,_,y,g){for(var b=c.tileProps,w=c.defaultProps,x=o[3],S={},I=0;I<Q;I++){var M=Y[I];$[I]=B(V[M],W[M],r),W[M]=W[M]+r}if(void 0===b.db_sublayer||Number.isNaN(u[b.db_sublayer])||!(0,d.Ty)(u[b.db_sublayer])){var P=u[b.id],T="number"!=typeof P&&l.has(P);y&&(T=!0);var L=!!g;if(!L&&void 0!==_){if("number"==typeof P||!(0,h.v7)(_,P))return;L=!0}for(var E in u[b.selected]=T?1:0,u[b.hovered]=L?1:0,w){var k=w[E];Number.isNaN(u[k.index])&&(u[k.index]=k.value)}"number"!=typeof P&&p&&u[b.db_hidden_by_plan_building_id]&&x>=Math.floor(s.floors.displayStyleZoom)&&(f.add(P),i.addFloorHidingMap(P,u[b.db_hidden_by_plan_building_id]));var z=(0,m.ci)(c,n,S,b,u),C=e.getLayers(t.id,b,u).filter((function(t){return(0,m.FR)(t.filter,z)}));(0,N.PA)(i,t,C,x,c,b,u,v,S,n,o,a,$,f,y||g)}}function rt(t,e,n){var i,r,o=Object.keys(e.tileProps).length,a=t.u8,s=J;for(r=1;r<o;r++)n[r]=NaN;for(i=a[s++],r=0;r<i;r++)q[r]=a[s++],X[r]=a[s++];for(i=a[s++],r=0;r<i;r++)Y[r]=a[s++];Q=i,J=s,ot()}function ot(){$.length=0}var at=n(834),st=n(4773),lt=n(5378),ct=n(2267),ut=n(1462),dt=n(2244),ht=n(5017),ft=function(){function t(){this.cache=new Map,this.pendingRequests=new Map}return t.prototype.fetch=function(t){var e=this,n=t.coords,i=t.tileServer,r=t.tileSet,o=t.tileProtocol,a=t.subdomains,s=t.tileKey,l=t.appId,c=t.lang,u=t.defaultLang,d=t.sessionId;return new Promise((function(t){var h=(0,H.rL)(i,r,o,a,n,s,l,c,u,d),f=(0,H.gx)(n),p=(0,st.n)({url:h},(function(n,i){var r=!1;if(e.pendingRequests.delete(f),void 0!==n||0===i.byteLength)return void 0!==n&&(console.error(n),403===n.status&&(r=!0)),e.cache.set(f,[]),void t({metadata:[],invalidTileKey:r});var o=(0,H.CJ)(i),a=(0,H.xH)(o);e.cache.set(f,o),t({metadata:a,invalidTileKey:r})}));e.pendingRequests.set(f,{xhr:p,resolve:t})}))},t.prototype.get=function(t){return this.cache.get(t)||[]},t.prototype.delete=function(t){this.cache.delete(t)},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(),this.pendingRequests.delete(t))},t}(),pt=n(7120),mt=n(3308),vt=[],_t=n(9170),yt=function(){function t(){this.cache=new Map,this.pendingRequests=new Map}return t.prototype.fetch=function(t,e,n,i,r){var o=this;return new Promise((function(a){var s=gt(t,i,r,e,n),l=(0,H.gx)(t),c=(0,st.L)({url:s},(function(t,e){if(o.pendingRequests.delete(l),void 0!==t)return 204!==t.status&&console.error(t),o.cache.set(l,void 0),void a();var n=e[0];n?o.cache.set(l,n):o.cache.set(l,void 0),a()}));o.pendingRequests.set(l,{xhr:c,resolve:a})}))},t.prototype.get=function(t){return this.cache.get(t)},t.prototype.delete=function(t){this.cache.delete(t)},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(),this.pendingRequests.delete(t))},t}();function gt(t,e,n,i,r){var o=Math.pow(2,t[2])-1,a=t[0],l=(16777215&o-t[1])*(1<<24)+(16777215&a);return(0,_t.XK)(s.traffic.url,{protocol:r,host:i,z:String(t[2]),tiles:String(l),regions:e.join(","),time:String(n)})}var bt=n(9508),wt=function(t){function e(e){var n=t.call(this)||this;return n.obClassEnumIndex=0,n.sublayerEnumIndex=0,n.workerParserSyncMetatile=e.get(ht.P.Main,"syncMetatile"),n}return(0,i.ZT)(e,t),e.prototype.addData=function(t){var e=this;this.dictionaries.db_sublayer||(this.dictionaries.db_sublayer={},this.reverseDictionaries.db_sublayer={}),t.sublayers.forEach((function(t){if(void 0===e.dictionaries.db_sublayer[t]){var n=e.sublayerEnumIndex++;e.dictionaries.db_sublayer[t]=n,e.reverseDictionaries.db_sublayer[n]=t}})),this.dictionaries.db_object_class||(this.dictionaries.db_object_class={},this.reverseDictionaries.db_object_class={}),t.objectClasses.forEach((function(t){if(void 0===e.dictionaries.db_object_class[t]){var n=e.obClassEnumIndex++;e.dictionaries.db_object_class[t]=n,e.reverseDictionaries.db_object_class[n]=t}})),this.workerParserSyncMetatile({dictionaries:this.dictionaries,reverseDictionaries:this.reverseDictionaries})},e}(n(8977).g),xt=(n(3795),n(3936),n(5109)),St=n(4406),It=n(47);!function(t){var e=new ut.D(t),n=new dt.J(e),r=new St.Z(n),c=new ft,u=new yt,p=new bt.h,v={main:{addNewRasterSets:n.get(ht.P.Main,"addNewRasterSets")},labeling:{addNewRasterSets:n.get(ht.P.Labeling,"addNewRasterSets")}},g={},b=new f.c,P={},T=new at.P("parser"),E=[],k=function(){var t=T.atlasPacker.getNewRasterSets();t.size&&t.forEach((function(t,e){v.main.addNewRasterSets(e,t),v.labeling.addNewRasterSets(e,t)}))},z=(0,a.D)((function(){return T.reset()}),s.workerResetDebounceTime),C={sources:{},collector:T,styleManager:p,syncNewRasterSets:k,debouncedResetCollector:z};r.set("GeoJsonSource",It.T,C);var A=function(t,e){g[t]=e};n.set("setMetatile",A);var D=new wt(n);A(l.DL,D),n.set("appendHiddenObjectIds",(function(t){t.forEach((function(t){return b.add(t)}))})),n.set("prepareAtlas",(function(e){return new Promise((function(n){(0,st.n)({url:e},(function(e,i){if(e||0===i.byteLength)n(void 0);else if(t.createImageBitmap){var r=new Blob([i],{type:"image/png"});createImageBitmap(r).then((function(t){n({isBitmap:!0,data:[t],transferable:[t]})}))}else n({isBitmap:!1,data:[i],transferable:[i]})}))}))})),n.set("fetchTile",(function(t){return c.fetch(t)})),n.set("deleteTile",(function(t){c.delete(t)})),n.set("abortTileRequest",(function(t){c.abortRequest(t)})),n.set("generateTile",(function(t){var e=t.tileInfo.coords,n=(0,H.gx)(e),i=c.get(n),r=[],o=[];return i.forEach((function(e){var n=e.regionId,i=e.metatileHash,a=p.getStyle(t.styleId);if(a){var s=tt(a,p,t.styleState,T,t,e,g[i],E,b,t.sourceId);r.push({regionId:n,metatileHash:i,collectorOutput:s,styleId:a.id}),o.push.apply(o,s.transferable)}})),z(),k(),{results:r,transferable:o}})),n.set("fetchTrafficTile",(function(t){return u.fetch(t.coords,t.tileServer,t.tileProtocol,t.regionIds,t.timestamp)})),n.set("deleteTrafficTile",(function(t){u.delete(t)})),n.set("abortTrafficTileRequest",(function(t){u.abortRequest(t)}));var F=(0,xt.KP)(["db_sublayer","traffic_road_class","traffic_color","traffic_road_z_level"],["Traffic_jams"]);n.set("generateTrafficTile",(function(t){var e=t.coords,n=t.pixelRatio,i=t.styleState,r=t.styleId,o=t.sourceId,a=(0,H.gx)(e),s=[],l=[],c=p.getStyle(r);if(!c)return{results:s,transferable:l};var d=u.get(a);if(d){var h=function(t,e,n,i,r,o,a,s){if(!n)return t.getAccumulatedData();for(var l=a[3],c=e.tileProps,u=Object.keys(c).length,d=[],h=(0,y.o1)(r),p={},v=0,_=o.tile;v<_.length;v++){for(var g=_[v],b=g.color,w=void 0===b?0:b,x=g.geo,S=g.road,I=g.normals,M=g.zLevel,P=void 0===M?0:M,T=0;T<u;T++)d[T]=NaN;d[c.db_sublayer]="Traffic_jams",d[c.traffic_color]=w,d[c.traffic_road_class]=S,d[c.traffic_road_z_level]=P,d[c.beginningIsCut]=0,d[c.endingIsCut]=0;var L=function(r){for(var o=x[r],u=I[r],v=[[],[],[],[]],_=0;_<o.length;_++)v[0][_]=o[_][0],v[1][_]=o[_][1],v[2][_]=u[_][0],v[3][_]=u[_][1];var y=(0,m.ci)(e,i,p,c,d),g=n.layers.filter((function(t){return(0,m.FR)(t.filter,y)}));(0,N.PA)(t,n,g,l,e,c,d,s,p,i,a,h,v,new f.c)};for(T=0;T<x.length;T++)L(T)}return t.getAccumulatedData()}(T,F,c,i,n,d,e,o);s.push({regionId:1,metatileHash:0,styleId:c.id,collectorOutput:h})}return{results:s,transferable:l}})),n.set("packRasters",(function(t){for(var e=0;e<t.length;e+=3){var n=t[e+2],i={type:ct.f.Loaded,isSvg:!1,index:n,key:"loaded-"+n,name:"",fileName:"",rasters:[{rasterSetIndex:n,rasterIndex:0,w:t[e],h:t[e+1],atlasIndex:0,x:0,y:0,isPacked:!1,anchorX:0,anchorY:0}]};T.atlasPacker.pack(i,[t[e]],1)}var r=T.atlasPacker.getPackedRasters(),o=[];return void 0!==r&&o.push(r.buffer),{packedRasters:r,transferable:o}})),n.set("generateModel",(function(e){var n=e.regionId,r=e.metatileHash,o=e.styleId,a=e.url;return new Promise((function(s){(0,st.n)({url:a},(function(a,l){if(a||0===l.byteLength)s({objects:T.getAccumulatedData(),textures:{isBitmap:!1,data:[]}});else{var c=p.getStyle(o);if(c){var u=U(c,e.styleState,T,l,e,g[r],n),d=u.objects,h=u.textures;if(t.createImageBitmap){var f=h.map((function(t){var e=new Blob([t],{type:"image/png"});return createImageBitmap(e)}));Promise.all(f).then((function(t){s({objects:d,textures:{isBitmap:!0,data:t},transferable:(0,i.ev)((0,i.ev)([],d.transferable),t)}),z()}))}else s({objects:d,textures:{isBitmap:!1,data:h},transferable:(0,i.ev)((0,i.ev)([],d.transferable),[l])}),z()}else s({objects:T.getAccumulatedData(),textures:{isBitmap:!1,data:[]}})}}))}))})),n.set("loadFloor",(function(t,e){return new Promise((function(n){(0,st.n)({url:e+"/complexes/"+t+"?fields=floorGeometries&format=pbf"},(function(e,r){if(e||0===r.byteLength)n({type:"error",errorStatus:e?e.status:0});else{var a=new(o())(r),s=lt.Z.read(a),l=s.tileCoords;P[t]=(0,i.pi)((0,i.pi)({},s),{tileCoords:[l[0],l[1],l[2],l[2]]}),D.addData(function(t){for(var e=new Set,n=new Set,i=t.floorGeometries,r=t.entities,o=0;o<i.length;o++)for(var a=i[o].rooms,s=0;s<a.length;s++){var l=a[s],c=l.sublayer,u=l.areaSublayer,d=l.wallSublayer;e.add(c),d&&e.add(d),e.add(u)}for(o=0;o<r.length;o++){var h=r[o],f=h.humanReadableIconId;c=h.sublayer,e.add(c),f&&n.add(f)}return{sublayers:e,objectClasses:n}}(P[t]));var c={};s.entities.forEach((function(t){t.firmId&&(c[t.firmId]=t.floorIndex)})),n({type:"success",center:s.center,bound:s.bound,defaultFloor:s.defaultFloor,floors:s.floorGeometries.map((function(t){return{ids:t.ids,name:t.name}})),buildings:s.buildings.concat(s.hybrids),firmsToFloorIndexMap:c})}}))}))})),n.set("generateFloor",(function(t,e,n,i,r,o,a,s,l){var c,u={tileCoords:P[t].tileCoords,collectorOutput:T.getAccumulatedData(),styleId:0},v=p.getStyle(o);return v?(c=l?T.getAccumulatedData():function(t,e,n,i,r,o,a,s,l,c){var u,p=i.floorGeometries,v=i.defaultFloor,g=i.tileCoords,b=i.entities,P=r.tileProps,T=(0,y.o1)(a),L=new f.c,E=new f.c(l),k=[],z=Object.keys(P).length;Number.isNaN(s)&&(s=v);for(var C=p[s],A=0;A<C.rooms.length;A++){for(var D=C.rooms[A],F=0;F<z;F++)k[F]=NaN;var R=!1;if(D.firmIds.length){var O=(0,h.IL)(D.firmIds[0]);L.add(O),R=E.has(O),k[P.id]=O}D.isIsland?S(D,k,r,t,e,n,o,R):(I(D,k,r,t,e,n,o,R),M(D,k,r,t,e,n,o,R))}for(A=0;A<b.length;A++){var j=b[A],B=j.sublayer;if(j.floorIndex===s&&!(0,d.Ty)(B)){for(var U=0;U<z;U++)k[U]=NaN;w[0]=[j.coordinates[0]],w[1]=[j.coordinates[1]];for(var Z=0;Z<z;Z++)k[Z]=NaN;k[P.db_sublayer]=B,R=!1;var N=j.firmId||j.id;N&&(O=(0,h.IL)(N),R=E.has(O),L.add(O),k[P.id]=O),k[P.selected]=R?1:0,k[P.db_region]=o,(0,d.Ty)(B)||(k[P.db_object_class]=null!==(u=j.humanReadableIconId)&&void 0!==u?u:r.reverseDictionaries.db_object_class[j.iconId]),k[P.db_label]=j.text,k[P.db_label2]=j.text2,k[P.db_icon_priority]=j.priority,k[P.db_label_priority]=j.textPriority,t.layers.forEach((function(i){"point"===i.type&&(0,m.FR)(i.filter,(0,m.ci)(r,e,x,P,k))&&(0,_.p)(n,t,i,g,c,x,r,k,w,T)}))}}return n.setGeoIds(new Uint32Array(L.toFlatArray())),n.getAccumulatedData()}(v,a,T,P[t],D,e,n,i,r,s),z(),k(),{tileCoords:P[t].tileCoords,collectorOutput:c,transferable:c.transferable,styleId:v.id}):u})),n.set("generatePersonalPoi",(function(t,e,n,i,r,o,a,s){var l=p.getStyle(o);if(l){var c=function(t,e,n,i,r,o,a,s,l){var c,u,d,p=i.tileProps,v=i.dictionaries,_=Object.keys(p).length,g=new f.c(a),b=[],w={};if(void 0===(null===(c=v.db_sublayer)||void 0===c?void 0:c.s_personal_poi))return t.getAccumulatedData();for(var x=0;x<_;x++)b[x]=NaN;for(var S=(0,y.o1)(o),I=pt.Ue(),M=[],P=0,T=s;P<T.length;P++){var E=T[P],k=(0,mt.yq)(E.point);pt.aM(I,k),M.push(k)}var z=(0,H.x7)(I),C=(0,H.Bs)(z),A=function(o){var a=s[o],c=L.Ue();(0,H.a2)(c,M[o],C);for(var v=(0,h.IL)(a.id),y=[[c[0]],[c[1]]],x=0;x<_;x++)b[x]=NaN;b[p.id]=(0,h.IL)(a.id),b[p.db_sublayer]="s_personal_poi",b[p.db_object_class]=null!==(u=a.humanReadableClassId)&&void 0!==u?u:null===(d=i.reverseDictionaries.db_object_class)||void 0===d?void 0:d[a.classId],b[p.db_label]=a.name,b[p.db_icon_priority]=1,b[p.db_label_priority]=0,b[p.selected]=g.has(v)?1:0,b[p.db_region]=r;var I=(0,m.ci)(i,n,w,p,b);vt=e.layers.filter((function(t){return(0,m.FR)(t.filter,I)}));var P=new f.c;(0,N.PA)(t,e,vt,void 0,i,p,b,l,w,n,z,S,y,P)};for(x=0;x<s.length;x++)A(x);return t.getAccumulatedData()}(T,l,a,g[n],e,i,r,t,s);return z(),k(),{collectorOutput:c,transferable:c.transferable,styleId:l.id}}})),n.set("syncStyle",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p.proxySyncStyle.apply(p,t)}))}(self)},655:function(t,e,n){"use strict";n.d(e,{ZT:function(){return r},pi:function(){return o},mG:function(){return a},Jh:function(){return s},ev:function(){return l}});var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function a(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function s(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function l(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create,Object.create},9899:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var i=r;function r(t,e,n){n=n||{},this.w=t||64,this.h=e||64,this.autoResize=!!n.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function o(t,e,n){this.x=0,this.y=t,this.w=this.free=e,this.h=n}function a(t,e,n,i,r,o,a){this.id=t,this.x=e,this.y=n,this.w=i,this.h=r,this.maxw=o||i,this.maxh=a||r,this.refcount=0}r.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var n,i,r,o,a=[],s=0;s<t.length;s++)if(n=t[s].w||t[s].width,i=t[s].h||t[s].height,r=t[s].id,n&&i){if(!(o=this.packOne(n,i,r)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},r.prototype.packOne=function(t,e,n){var i,r,a,s,l,c,u,d,h={freebin:-1,shelf:-1,waste:1/0},f=0;if("string"==typeof n||"number"==typeof n){if(i=this.getBin(n))return this.ref(i),i;"number"==typeof n&&(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s<this.freebins.length;s++){if(e===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,e,n);e>i.maxh||t>i.maxw||e<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*e)<h.waste&&(h.waste=a,h.freebin=s)}for(s=0;s<this.shelves.length;s++)if(f+=(r=this.shelves[s]).h,!(t>r.free)){if(e===r.h)return this.allocShelf(s,t,e,n);e>r.h||e<r.h&&(a=(r.h-e)*t)<h.waste&&(h.freebin=-1,h.waste=a,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,e,n):-1!==h.shelf?this.allocShelf(h.shelf,t,e,n):e<=this.h-f&&t<=this.w?(r=new o(f,this.w,e),this.allocShelf(this.shelves.push(r)-1,t,e,n)):this.autoResize?(l=c=this.h,((u=d=this.w)<=l||t>u)&&(d=2*Math.max(t,u)),(l<u||e>l)&&(c=2*Math.max(e,l)),this.resize(d,c),this.packOne(t,e,n)):null},r.prototype.allocFreebin=function(t,e,n,i){var r=this.freebins.splice(t,1)[0];return r.id=i,r.w=e,r.h=n,r.refcount=0,this.bins[i]=r,this.ref(r),r},r.prototype.allocShelf=function(t,e,n,i){var r=this.shelves[t].alloc(e,n,i);return this.bins[i]=r,this.ref(r),r},r.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,n=0;n<this.shelves.length;n++){var i=this.shelves[n];e+=i.h,t=Math.max(i.w-i.free,t)}this.resize(t,e)}},r.prototype.getBin=function(t){return this.bins[t]},r.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},r.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},r.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},r.prototype.resize=function(t,e){this.w=t,this.h=e;for(var n=0;n<this.shelves.length;n++)this.shelves[n].resize(t);return!0},o.prototype.alloc=function(t,e,n){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new a(n,i,this.y,t,e,t,this.h)},o.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}return n.m=t,n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2981)}()},368:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},276:t=>{"use strict";t.exports=function(t){return t[1]}},205:()=>{setTimeout((function(){if("__mapglPlugins"in window)for(var t in window.__mapglPlugins)window.mapgl[t]=window.__mapglPlugins[t]}),0)},965:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="14" viewBox="0 0 20 14" style="margin-top: 4px">\n    <path d="M 18,5 C 18,4 17,1 15,1 H 12 10 C 8,1 7,4 7,5 H 5 v 2 h 1 v 4 c 0,0.6 0,1 1,1 v 2 h 2 v -2 h 7 v 2 h 2 v -2 c 1,0 1,-0.4 1,-1 V 7 h 1 V 5 H 18 z M 10,3 h 2 3 c 2,0 2,1 2,3 H 8 C 8,4 8,3 10,3 z M 9,10 H 8 C 7.4,10 7,9.6 7,9 7,8.4 7.4,8 8,8 h 1 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z m 8,0 H 16 C 15.4,10 15,9.6 15,9 15,8.4 15.4,8 16,8 h 1 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z M 4,4 H 6 V 3 H 4 C 1,3 1,6 1,7 H 0 v 1 h 1 v 4 H 3 V 11 H 5 V 7 H 2 C 2,6 2,4 4,4 z M 3,9 4,10 H 2 V 9 h 1 z" fill="#616161" fill-rule="evenodd"/>\n    <g fill="#fff">\n        <path d="m 16,8 h 1 c 0.4,0 0.7,0.2 0.8,0.5 C 17.9,8.4 18,8.2 18,8 18,7.4 17.6,7 17,7 h -1 c -0.6,0 -1,0.4 -1,1 0,0.2 0.1,0.4 0.2,0.5 C 15.3,8.2 15.6,8 16,8 z"/>\n        <path d="M 8,8 H 9 C 9.4,8 9.7,8.2 9.8,8.5 9.9,8.4 10,8.2 10,8 10,7.4 9.6,7 9,7 H 8 C 7.4,7 7,7.4 7,8 7,8.2 7.1,8.4 7.2,8.5 7.3,8.2 7.6,8 8,8 z"/>\n        <path d="M 6,3 H 4 C 4,3 4,3 4,3 2,3 2,5 2,6 H 2 C 2.1,5 2.5,4 4,4 H 5 6 V 3 z"/>\n        <path d="M0 7H1V8H0z"/>\n        <path d="M 15,2 H 12 10 C 8,2 8,3 8,5 H 8 C 8,3.7 8.3,3 10,3 h 2 3 c 1.7,0 1.9,0.7 2,2 h 0 C 17,3 17,2 15,2 z"/>\n        <path d="M3 9L4 9 3 8 2 8 2 9 2 9 2 9 3 9z"/>\n        <path d="M 7,11 C 6,11 6,10.6 6,10 v 1 c 0,0.6 0,1 1,1 v -1 z"/>\n        <path d="m 18,11 v 1 c 1,0 1,-0.4 1,-1 v -1 c 0,0.6 0,1 -1,1 z"/>\n        <path d="M19 6H20V7H19z"/>\n        <path d="M3 11L1 11 1 12 3 12 3 11 5 11 5 7 5 7 5 10 3 10z"/>\n        <path d="M16 13H18V14H16z"/>\n        <path d="M5 6H6V7H5z"/>\n        <path d="M9 13L7 13 7 14 9 14 9 12 16 12 16 11 9 11z"/>\n    </g>\n    <g fill="#444">\n        <path d="M 2,6 C 2,6.4 2,6.7 2,7 H 5 V 6 H 2 z"/>\n        <path d="M2 9L2 10 4 10 3 9z"/>\n        <path d="M 4,3 H 6 V 2 H 4 C 1,2 1,5 1,6 H 0 V 7 H 1 C 1,6 1,3 4,3 z"/>\n        <path d="M 18,4 C 18,3 17,0 15,0 H 12 10 C 8,0 7,3 7,4 H 6 5 V 5 H 7 C 7,4 8,1 10,1 h 2 3 c 2,0 3,3 3,4 h 2 V 4 h -2 z"/>\n        <path d="M 8,10 H 9 C 9.6,10 10,9.6 10,9 10,8.8 9.9,8.6 9.8,8.5 9.7,8.8 9.4,9 9,9 H 8 C 7.6,9 7.3,8.8 7.2,8.5 7.1,8.6 7,8.8 7,9 c 0,0.6 0.4,1 1,1 z"/>\n        <path d="M 17,6 C 17,5.6 17,5.3 17,5 H 8 c 0,0.3 0,0.6 0,1 h 9 z"/>\n        <path d="M 17.8,8.5 C 17.7,8.8 17.4,9 17,9 H 16 C 15.6,9 15.3,8.8 15.2,8.5 15.1,8.6 15,8.8 15,9 c 0,0.6 0.4,1 1,1 h 1 c 0.6,0 1,-0.4 1,-1 0,-0.2 -0.1,-0.4 -0.2,-0.5 z"/>\n    </g>\n</svg>\n'}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.r(i),n.d(i,{AnimationOptions:()=>r.AnimationOptions,Circle:()=>Mt,CircleMarker:()=>Tt,CircleMarkerOptions:()=>o.CircleMarkerOptions,CircleOptions:()=>o.CircleOptions,Control:()=>p,ControlOptions:()=>o.ControlOptions,ControlPosition:()=>o.ControlPosition,DefaultEventTargetData:()=>t.DefaultEventTargetData,DynamicObjectEventTable:()=>t.DynamicObjectEventTable,DynamicObjectPointerEvent:()=>t.DynamicObjectPointerEvent,Easing:()=>r.Easing,EventTarget:()=>t.EventTarget,EventTargetData:()=>t.EventTargetData,FitBoundsOptions:()=>o.FitBoundsOptions,FloorControl:()=>tt,FloorLevelChangeEvent:()=>t.FloorLevelChangeEvent,FloorPlanHideEvent:()=>t.FloorPlanHideEvent,FloorPlanShowEvent:()=>t.FloorPlanShowEvent,GeoJsonEventTargetData:()=>t.GeoJsonEventTargetData,GeoJsonSource:()=>Ft,GeoJsonSourceOptions:()=>o.GeoJsonSourceOptions,HtmlMarker:()=>St,HtmlMarkerOptions:()=>o.HtmlMarkerOptions,Label:()=>wt,LabelImage:()=>o.LabelImage,LabelOptions:()=>o.LabelOptions,LngLatBounds:()=>e.LngLatBounds,LngLatBoundsClass:()=>Y,Map:()=>pt,MapEvent:()=>t.MapEvent,MapEventTable:()=>t.MapEventTable,MapOptions:()=>o.MapOptions,MapPointerEvent:()=>t.MapPointerEvent,MapSupportOptions:()=>o.MapSupportOptions,Marker:()=>yt,MarkerIconOptions:()=>o.MarkerIconOptions,MarkerLabelOptions:()=>o.MarkerLabelOptions,MarkerOptions:()=>o.MarkerOptions,Padding:()=>o.Padding,PointerEvent:()=>t.PointerEvent,Polygon:()=>zt,PolygonOptions:()=>o.PolygonOptions,Polyline:()=>Et,PolylineOptions:()=>o.PolylineOptions,Raster:()=>At,RasterOptions:()=>o.RasterOptions,RasterSource:()=>o.RasterSource,RasterTileSource:()=>Zt,RasterTileSourceOptions:()=>o.RasterTileSourceOptions,RotationAnimationOptions:()=>r.RotationAnimationOptions,ScaleControl:()=>ft,SourceAttributes:()=>o.SourceAttributes,StretchableImageSource:()=>o.StretchableImageSource,StyleLoadEvent:()=>t.StyleLoadEvent,TrafficControl:()=>R,TrafficScoreEvent:()=>t.TrafficScoreEvent,TrafficVisibilityEvent:()=>t.TrafficVisibilityEvent,ZoomControl:()=>z,_J:()=>h,isSupported:()=>Nt,notSupportedReason:()=>Ht});var t={};n.r(t),n.d(t,{C:()=>U});var e={};n.r(e),n.d(e,{S:()=>Y});var r={};n.r(r);var o={};n.r(o);var a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},a(t,e)};function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var l=function(){return l=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},l.apply(this,arguments)};function c(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function u(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function d(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create;var h=n(3),f=function(){function t(){this.events={}}return t.prototype.on=function(t,e){var n=this.events[t];return n||(n=this.events[t]=[]),n.push(e),this},t.prototype.once=function(t,e){var n=this,i=function(r){n.off(t,i),e.call(n,r)};return this.on(t,i),this},t.prototype.off=function(t,e){var n=this.events[t];if(!n)return this;var i=n.indexOf(e);return-1!==i&&n.splice(i,1),this},t.prototype.emit=function(t,e){var n=this.events[t];if(!n)return this;for(var i=n.slice(),r=0;r<i.length;r++)i[r].call(this,e);return this},t}(),p=function(){function t(t,e,n){var i,r=n.position;this._wrap=document.createElement("div"),this._wrap.style.userSelect="none",this._wrap.innerHTML=e,this._position=r,this._controlPane=t._controlPane,this._container=this._controlPane.getContainerByPosition(r),null===(i=this._container)||void 0===i||i.append(this._wrap)}return t.prototype.destroy=function(){this._wrap.remove()},t.prototype.getPosition=function(){return this._position},t.prototype.setPosition=function(t){this._container.removeChild(this._wrap),this._container=this._controlPane.getContainerByPosition(t),this._container.append(this._wrap),this._position=t},t.prototype.getContainer=function(){return this._wrap},t}(),m=n(379),v=n.n(m),_=n(795),y=n.n(_),g=n(569),b=n.n(g),w=n(565),x=n.n(w),S=n(216),I=n.n(S),M=n(589),P=n.n(M),T=n(585),L={};L.styleTagTransform=P(),L.setAttributes=x(),L.insert=b().bind(null,"head"),L.domAPI=y(),L.insertStyleElement=I();v()(T.Z,L);const E=T.Z&&T.Z.locals?T.Z.locals:void 0;var k='\n    <div class="'+E.root+'">\n        <button class="'+E.button+" "+E.zoomIn+'">\n            <svg\n                xmlns="http://www.w3.org/2000/svg"\n                viewBox="0 0 32 32"\n                width="32"\n                height="32"\n                fill="currentColor"\n            >\n                <path d="M24 15h-7V8h-2v7H8v2h7v7h2v-7h7v-2z"></path>\n            </svg>\n        </button>\n        <button class="'+E.button+" "+E.zoomOut+'">\n            <svg\n                xmlns="http://www.w3.org/2000/svg"\n                viewBox="0 0 32 32"\n                fill="currentColor"\n                width="32"\n                height="32"\n            >\n                <path d="M8 15h16v2H8z"></path>\n            </svg>\n        </button>\n    </div>\n',z=function(t){function e(e,n){var i=t.call(this,e,k,n)||this;return i._zoomIn=function(){i._map.setZoom(i._map.getZoom()+1,{duration:400})},i._zoomOut=function(){i._map.setZoom(i._map.getZoom()-1,{duration:400})},i._checkZoom=function(){var t=i._map.getZoom();t<=i._map.getMinZoom()?i._zoomOutButton.disabled=!0:i._zoomOutButton.disabled=!1,t>=i._map.getMaxZoom()?i._zoomInButton.disabled=!0:i._zoomInButton.disabled=!1},i._map=e,i._zoomInButton=i._wrap.querySelector("."+E.zoomIn),i._zoomOutButton=i._wrap.querySelector("."+E.zoomOut),i._zoomInButton.addEventListener("click",i._zoomIn),i._zoomOutButton.addEventListener("click",i._zoomOut),i._map.on("zoom",i._checkZoom),i}return s(e,t),e.prototype.destroy=function(){this._map.off("zoom",this._checkZoom),this._zoomInButton.removeEventListener("click",this._zoomIn),this._zoomOutButton.removeEventListener("click",this._zoomOut),t.prototype.destroy.call(this)},e}(p),C=n(928),A={};A.styleTagTransform=P(),A.setAttributes=x(),A.insert=b().bind(null,"head"),A.domAPI=y(),A.insertStyleElement=I();v()(C.Z,A);const D=C.Z&&C.Z.locals?C.Z.locals:void 0;var F=n(965),R=function(t){function e(e,n){var i=t.call(this,e,"",n)||this;return i._onClick=function(){i._trafficVisible?(i._map.hideTraffic(),i._map.patchStyleState({trafficOn:!1})):(i._map.showTraffic(),i._map.patchStyleState({trafficOn:!0}))},i._map=e,i._trafficVisible=!1,i._render(),e.on("trafficscore",(function(t){var e=t.score;i._score=e,i._render()})),e.on("trafficshow",(function(){i._trafficVisible=!0,i._render()})),e.on("traffichide",(function(){i._trafficVisible=!1,i._render()})),i}return s(e,t),e.prototype._render=function(){var t=this._trafficVisible?function(t){if(void 0===t)return"";if(t>6)return D.hard;if(t>3)return D.medium;return D.easy}(this._score):D.none,e='\n            <div class="'+D.root+'">\n                <button class="'+D.button+" "+t+'">\n                    '+(this._trafficVisible&&void 0!==this._score?this._score:F)+"\n                </button>\n            </div>\n        ";this._wrap.innerHTML=e,this._wrap.querySelector("."+D.button).addEventListener("click",this._onClick)},e}(p);var O=n(306),j={};j.styleTagTransform=P(),j.setAttributes=x(),j.insert=b().bind(null,"head"),j.domAPI=y(),j.insertStyleElement=I();v()(O.Z,j);const B=O.Z&&O.Z.locals?O.Z.locals:void 0;var U;!function(t){t.osm="osm",t.api="api",t.license="license"}(U||(U={}));var Z=function(t){function e(e,n){var i,r,o=t.call(this,e,(i=!0===n.autoHide,r=!0===n.showSberLogo,"\n    <div class="+B.container+'>\n        <div>\n            <a href="https://dev.2gis.ru" target="_blank">\n                <svg xmlns="http://www.w3.org/2000/svg" width="45" height="14">\n                    <path\n                        fill-rule="evenodd"\n                        clip-rule="evenodd"\n                        fill="#6D7173"\n                        d="M6.964 0c3.865 0 6.99 3.144 6.99 6.994 0 3.862-3.125 7.006-6.99 7.006C3.136 14 0 10.856 0 6.994 0 3.144 3.136 0 6.964 0zm.025 2.45c-2.297 0-3.85 1.805-3.85 3.735 0 .772.172 1.457.575 2.304 2.33.012 2.794 1.446 2.943 2.712l.014.126.061.573h.501l.061-.573.014-.126c.15-1.266.605-2.7 3.017-2.712.416-.847.489-1.532.489-2.291 0-1.955-1.528-3.748-3.825-3.748zm34.142-.21c2.094 0 3.6 1.04 3.869 3.017h-2.12c-.14-.735-.753-1.305-1.775-1.305-.88 0-1.404.418-1.404 1.102 0 .778.884.942 1.757 1.074l.196.029c1.367.203 3.32.596 3.32 2.776 0 2.029-1.698 2.967-3.767 2.967-2.234 0-3.754-1.116-3.881-3.195h2.094c.179.964.894 1.496 1.966 1.496.869 0 1.482-.355 1.482-1.077 0-1.065-1.226-1.09-2.478-1.332-.97-.19-2.796-.659-2.796-2.623 0-1.851 1.417-2.929 3.537-2.929zm-12.365.21c2.174 0 4.013 1.217 4.374 3.338h-2.1c-.323-.941-1.168-1.468-2.299-1.468-1.85 0-2.646 1.443-2.646 2.861 0 1.406.845 2.824 2.659 2.824 1.031 0 1.926-.464 2.323-1.443H28.53V7.006h4.61v.74c0 2.535-1.926 4.154-4.386 4.154-2.498 0-4.684-1.744-4.684-4.694 0-2.911 2.013-4.756 4.696-4.756zm-9.156 0c2.12 0 3.574 1.217 3.574 3.148 0 1.574-.966 2.496-2.658 3.234-1.116.48-1.225.548-2.386.898h5.232v1.82h-7.599V8.845c1.09-.37 2.157-.787 3.65-1.44 1.09-.479 1.68-.921 1.68-1.709 0-.787-.59-1.475-1.593-1.475-1.154 0-1.806.922-1.78 1.93h-2.032C15.685 3.84 17.353 2.45 19.61 2.45zm16.764 0v9.1h-1.978v-9.1h1.978z"\n                    /></svg\n            ></a>\n\n            '+(r?'\n                    <a href="https://dev.2gis.ru" target="_blank">\n                    <svg xmlns="http://www.w3.org/2000/svg" width="54" height="16">\n                        <path\n                            fill="#6D7173"\n                            fill-rule="evenodd"\n                            d="M14.888 6.746a7 7 0 11-2.492-4.193l-1.361 1.004A5.35 5.35 0 008 2.617C5.032 2.617 2.617 5.032 2.617 8S5.032 13.383 8 13.383 13.383 10.968 13.383 8c0-.048 0-.096-.002-.144l1.507-1.11zm-9.553-.613L8 7.803l5.54-4.082c.33.427.613.894.838 1.391L8 9.812l-2.665-1.67v-2.01zm36.44-.942l1.902-1.403h-6.37v8.424h6.37V10.81h-4.552V8.652h3.883V7.25h-3.883V5.19h2.65zM30.287 7.072H32.5c2.01 0 3.115.886 3.115 2.494 0 1.682-1.22 2.646-3.35 2.646h-3.794V3.788h7.251L33.82 5.191h-3.53v1.881zm0 3.737h1.896c1.122 0 1.69-.373 1.691-1.167 0-.777-.537-1.168-1.691-1.168h-1.896v2.335zm18.55-7.02h-3.469v8.423h1.818V9.826h1.65c2.213 0 3.588-1.164 3.588-3.023 0-1.86-1.374-3.015-3.588-3.015zm-.04 4.634h-1.61V5.191h1.61c1.165 0 1.806.574 1.806 1.616 0 1.042-.64 1.616-1.806 1.616zM23.78 10.782c.56 0 1.103-.136 1.57-.393l.402-.22 1.176.866c-.775.832-1.92 1.288-3.23 1.288-1.253 0-2.395-.442-3.217-1.245-.819-.8-1.27-1.91-1.27-3.124 0-1.208.453-2.301 1.275-3.078.817-.773 1.962-1.198 3.224-1.198 1.162 0 2.18.353 2.94 1.022l.087.076-1.304.96a2.77 2.77 0 00-1.653-.517c-1.638 0-2.828 1.17-2.828 2.781 0 1.612 1.19 2.782 2.828 2.782z"\n                        ></path></svg\n                    ></a>\n                ':"")+"\n        </div>\n\n        <div class="+B.text+">\n            <div class="+(i?B.autoHide:"")+'>\n                ©\n                <a\n                    href="https://www.openstreetmap.org/copyright"\n                    target="_blank"\n                    class='+B.link+"\n                    data-type="+U.osm+"\n                    >&nbsp;2GIS, OpenStreetMap contributors\n                </a>\n            </div>\n        </div>\n    </div>\n"),n)||this;return o._onClick=function(t){if(t.target&&((n=t.target)&&"href"in n&&"dataset"in n)){var e=t.target.dataset.type;e&&function(t){return t in U}(e)&&o._map.emit("copyrightclick",{type:e,href:t.target.href,originalEvent:t})}var n},o._map=e,!1===n.interactive&&(o._wrap.style.pointerEvents="none"),o._wrap.querySelector("."+B.container).addEventListener("click",o._onClick),o}return s(e,t),e.prototype.destroy=function(){this._wrap.querySelector("."+B.container).removeEventListener("click",this._onClick),t.prototype.destroy.call(this)},e}(p);var N=n(438),H={};H.styleTagTransform=P(),H.setAttributes=x(),H.insert=b().bind(null,"head"),H.domAPI=y(),H.insertStyleElement=I();v()(N.Z,H);const G=N.Z&&N.Z.locals?N.Z.locals:void 0;var V=function(){function t(t,e){this.rootContainer=t._impl.modules.layout.rootContainer,this.content=e,this.isShown=!1}return t.prototype.display=function(){this.isShown||(this.wrap||(this.wrap=this.initWrap()),this.rootContainer.appendChild(this.wrap),this.isShown=!0)},t.prototype.hide=function(){this.isShown&&(this.wrap&&this.rootContainer.removeChild(this.wrap),this.isShown=!1)},t.prototype.isDisplayed=function(){return this.isShown},t}(),W="\n    <div class="+G.container+">\n        Your MapGL key is invalid. Please contact api@2gis.com to get MapGL key.\n    </div>\n",q=function(t){function e(e){var n=t.call(this,e,W)||this;return e._impl.on("invalidtilekey",(function(){n.isDisplayed()||n.display()})),n}return s(e,t),e.prototype.initWrap=function(){var t=document.createElement("div");return t.classList.add(""+G.wrap),t.innerHTML=this.content,t},e}(V),X=function(){for(var t,e="",n=0;n<32;n++)t=16*Math.random()|0,n>4&&n<21&&!(n%4)&&(e+="-"),e+=(12===n?4:16===n?3&t|8:t).toString(16);return e},Y=function(){function t(t){this.northEast=t.northEast,this.southWest=t.southWest}return t.prototype.extend=function(t){return this.southWest=[Math.min(this.southWest[0],t[0]),Math.min(this.southWest[1],t[1])],this.northEast=[Math.max(this.northEast[0],t[0]),Math.max(this.northEast[1],t[1])],this},t}(),K=n(704),J={};J.styleTagTransform=P(),J.setAttributes=x(),J.insert=b().bind(null,"head"),J.domAPI=y(),J.insertStyleElement=I();v()(K.Z,J);const Q=K.Z&&K.Z.locals?K.Z.locals:void 0;var $='\n    <div class="'+Q.root+'">\n        <div class="'+Q.container+'">\n            <div class="'+Q.scroller+'">\n                <div class="'+Q.content+'" />\n            </div>\n        </div>\n    </div>\n',tt=function(t){function e(e,n){var i=t.call(this,e,$,n)||this;return i._removeButtonsEventListeners=function(){i._content&&i._content.childNodes.forEach((function(t){if(i._handlers.has(t)){var e=i._handlers.get(t);void 0!==e&&t.removeEventListener("click",e)}}))},i._showControl=function(t){var e,n,r=t.currentFloorLevelIndex,o=t.floorPlanId,a=t.floorLevels;if(i._floor={currentFloorLevelIndex:r,floorPlanId:o},i._root.style.display="block",i._content.innerHTML="",a.forEach((function(t){var e=t.floorLevelIndex,o=t.floorLevelName,a=document.createElement("button");a.className=Q.control,a.innerHTML='<div class="'+Q.label+'">'+o+"</div>",a.name=e.toLocaleString(),r===e&&(a.disabled=!0,n=a);var s=i._controlHandler(e);a.addEventListener("click",s),i._handlers.set(a,s),i._content.append(a)})),n&&n.offsetTop){var s=null===(e=n.parentElement)||void 0===e?void 0:e.parentElement;s&&(s.scrollTop=n.offsetTop)}},i._hideControl=function(){i._removeButtonsEventListeners(),i._floor=void 0,i._root.style.display="none"},i._onLevelChange=function(t){i._switchCurrentFloorLevel(t.floorLevelIndex)},i._controlHandler=function(t){return function(){i._switchCurrentFloorLevel(t),i._floor&&i._map.setFloorPlanLevel(i._floor.floorPlanId,t)}},i._switchCurrentFloorLevel=function(t){i._floor&&(i._wrap.querySelector("."+Q.control+'[name="'+i._floor.currentFloorLevelIndex+'"]').disabled=!1,i._wrap.querySelector("."+Q.control+'[name="'+t+'"]').disabled=!0,i._floor.currentFloorLevelIndex=t)},i._map=e,i._root=i._wrap.querySelector("."+Q.root),i._content=i._wrap.querySelector("."+Q.content),i._handlers=new WeakMap,i._root.style.display="none",e.on("floorplanshow",i._showControl),e.on("floorplanhide",i._hideControl),e.on("floorlevelchange",i._onLevelChange),i}return s(e,t),e.prototype.destroy=function(){this._map.off("floorplanshow",this._showControl),this._map.off("floorplanhide",this._hideControl),this._map.off("floorlevelchange",this._onLevelChange),this._removeButtonsEventListeners(),t.prototype.destroy.call(this)},e}(p),et=n(274),nt={};nt.styleTagTransform=P(),nt.setAttributes=x(),nt.insert=b().bind(null,"head"),nt.domAPI=y(),nt.insertStyleElement=I();v()(et.Z,nt);const it=et.Z&&et.Z.locals?et.Z.locals:void 0;var rt=function(){function t(t,e){this.wrap=document.createElement("div"),this.wrap.className=it.controlPane,this.containers={},t._impl.modules.layout.rootContainer.appendChild(this.wrap),this.padding={top:10,right:10,bottom:10,left:10},this.setPadding(e.padding||{})}return t.prototype.setPadding=function(t){var e=this;Object.keys(this.padding).forEach((function(n){e.padding[n]=void 0!==t[n]?t[n]:10,e.wrap.style["margin"+n.replace(/^\w/,(function(t){return t.toUpperCase()}))]=e.padding[n]+"px"}))},t.prototype.getPadding=function(){return l({},this.padding)},t.prototype.destroy=function(){this.wrap.remove()},t.prototype.getContainerByPosition=function(t){var e=this.containers[t];return e||(e=this.containers[t]=this._initControlContainer(t)),e},t.prototype._initControlContainer=function(t){var e=document.createElement("div");return e.classList.add(it.container,it[t]),this.wrap.appendChild(e),e},t}(),ot=function(){function t(t){var e,n,i,r,o=this;this.commPoiQueue=[],this.msgOrderNumber=0,this.utcOffset=(e=(new Date).getTimezoneOffset(),n=e>0?"-":"+",i=""+Math.floor(Math.abs(e)/60),r=""+Math.abs(e)%60,n+(i.length>1?i:"0"+i)+":"+(r.length>1?r:"0"+r)),this.unsentMessages=[],this.onEvent=function(t){var e,n=t.commPoiIds,i=Date.now();(e=o.commPoiQueue).push.apply(e,n.map((function(t){return{id:t,timestamp:i}}))),o.timer||(o.timer=window.setTimeout(o.sendMessages,5e3))},this.onSendFail=function(t){var e;(e=o.unsentMessages).push.apply(e,t),o.timer||(o.timer=window.setTimeout(o.sendMessages,5e3))},this.sendMessages=function(){o.timer=void 0;var t=o.map._impl.state,e=t.tileKey,n=t.sessionId,i=d(d([],o.unsentMessages),o.commPoiQueue.map((function(t){return function(t,e,n,i,r,o){var a={type:302,eventType:"view",eventId:X(),eventOrdinal:n,uiElement:{name:"POI",ownerName:"map"},timestamp:e,utcOffset:r,payload:{POI:{adsHighlight:!0,entity:{id:t,type:"branch"}}},common:{formatVersion:3,appVersion:"v1",product:44,apikey:i}};o&&(a.common.sessionId=o);return a}(t.id,t.timestamp,o.msgOrderNumber++,e,o.utcOffset,n)})));o.commPoiQueue=[],o.unsentMessages=[],i.length&&fetch("https://s1.bss.2gis.com/bss/3",{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}}).then((function(t){t.ok||o.onSendFail(i)}),(function(){return o.onSendFail(i)}))},this.map=t,t._impl.on("commpoishow",this.onEvent)}return t.prototype.destroy=function(){clearTimeout(this.timer),this.commPoiQueue=[],this.timer=void 0,this.map._impl.off("commpoishow",this.onEvent)},t}();var at=2,st=20,lt=n(32),ct={};ct.styleTagTransform=P(),ct.setAttributes=x(),ct.insert=b().bind(null,"head"),ct.domAPI=y(),ct.insertStyleElement=I();v()(lt.Z,ct);const ut=lt.Z&&lt.Z.locals?lt.Z.locals:void 0;var dt={en:"m",ru:"м"},ht={en:"km",ru:"км"},ft=function(t){function e(e,n){var i=t.call(this,e,"",n)||this;return i._render=function(){var t=i._wrap.getBoundingClientRect(),e=i._calcSize([t.x,t.y],t.width||66,0),n='\n            <div class="'+ut.root+'">\n                <div class="'+ut.label+'">\n                    '+function(t,e){if(t<1e3)return t+" "+(dt[e]||dt.en);return(t/1e3).toFixed(1)+" "+(ht[e]||ht.en)}(e,i._map.getLanguage())+"\n                </div>\n            </div>\n        ";i._wrap.innerHTML=n},i._map=e,i._render(),e.on("zoom",i._render),e.on("pitch",i._render),e.on("changeLanguage",i._render),i}return s(e,t),e.prototype.destroy=function(){this._map.off("zoom",this._render),this._map.off("pitch",this._render),this._map.off("changeLanguage",this._render),t.prototype.destroy.call(this)},e.prototype._calcSize=function(t,e,n){return h.mapglUtils.getMetersFromPixelsXY(this._map.getCenter(),this._map.getZoom(),this._map.getRotation(),this._map.getSize(),this._map.getPitch(),t,void 0,this._map.getPadding(),e,n)},e}(p);var pt=function(t){function e(e,n){var i,r,o,a,s=t.call(this)||this;if("string"==typeof e){var c=document.getElementById(e);if(!c)throw new Error("Could not found html element with id: "+e);a=c}else a=e;var u=l(l({},n),{disableHoverStyles:null===(i=n.disableHoverStyles)||void 0===i||i,tileServer:n.tileServer||"tile{subdomain}-sdk.maps.2gis.com",sendAnalytics:!1===n.disableAnalytics,style:n.style||"c080bb6a-8134-4993-93a1-5b4d8c36a59b",styleOptions:n.styleOptions,styleState:n.styleState,minZoom:null!==(r=n.minZoom)&&void 0!==r?r:at,maxZoom:null!==(o=n.maxZoom)&&void 0!==o?o:st,sessionId:X(),hillshade:n.hillshade?{}:void 0});return s._impl=new h.Map(a,u),s._impl.on("idle",(function(t){return s._emitMapEvent("idle",t)})).on("resize",(function(t){return s._emitMapEvent("resize",t)})).on("move",(function(t){return s._emitMapEvent("move",t)})).on("movestart",(function(t){return s._emitMapEvent("movestart",t)})).on("moveend",(function(t){return s._emitMapEvent("moveend",t)})).on("center",(function(t){return s._emitMapEvent("center",t)})).on("centerstart",(function(t){return s._emitMapEvent("centerstart",t)})).on("centerend",(function(t){return s._emitMapEvent("centerend",t)})).on("zoom",(function(t){return s._emitMapEvent("zoom",t)})).on("zoomstart",(function(t){return s._emitMapEvent("zoomstart",t)})).on("zoomend",(function(t){return s._emitMapEvent("zoomend",t)})).on("rotation",(function(t){return s._emitMapEvent("rotation",t)})).on("rotationstart",(function(t){return s._emitMapEvent("rotationstart",t)})).on("rotationend",(function(t){return s._emitMapEvent("rotationend",t)})).on("pitch",(function(t){return s._emitMapEvent("pitch",t)})).on("pitchstart",(function(t){return s._emitMapEvent("pitchstart",t)})).on("pitchend",(function(t){return s._emitMapEvent("pitchend",t)})).on("trafficshow",(function(){return s.emit("trafficshow")})).on("traffichide",(function(){return s.emit("traffichide")})).on("floorcomplexshow",(function(t){var e=t.id,n=t.currentFloor,i=t.floorNames;return s.emit("floorplanshow",{floorPlanId:e,currentFloorLevelIndex:n,floorLevels:i.map((function(t,e){return{floorLevelIndex:e,floorLevelName:t}}))})})).on("floorcomplexhide",(function(t){return s.emit("floorplanhide",{floorPlanId:t.id})})).on("floorcomplexlevelchange",(function(t){return s.emit("floorlevelchange",{floorLevelName:t.floorName,floorLevelIndex:t.floorIndex,floorPlanId:t.id})})),s._impl.on("click",(function(t){return s._emitMapPointerEvent("click",t)})).on("dblclick",(function(t){return s._emitMapPointerEvent("dblclick",t)})).on("contextmenu",(function(t){return s._emitMapPointerEvent("contextmenu",t)})).on("mousemove",(function(t){return s._emitMapPointerEvent("mousemove",t)})).on("mouseover",(function(t){return s._emitMapPointerEvent("mouseover",t)})).on("mouseout",(function(t){return s._emitMapPointerEvent("mouseout",t)})).on("mousedown",(function(t){return s._emitMapPointerEvent("mousedown",t)})).on("mouseup",(function(t){return s._emitMapPointerEvent("mouseup",t)})).on("touchstart",(function(t){return s._emitMapPointerEvent("touchstart",t)})).on("touchend",(function(t){return s._emitMapPointerEvent("touchend",t)})),s._impl.on("trafficscore",(function(t){var e=t.score;return s.emit("trafficscore",{score:e})})),s._impl.on("styleload",(function(t){var e=t.style;return s.emit("styleload",{style:e})})),s._controlPane=new rt(s,{padding:n.controlsLayoutPadding}),s._initControls(n),n.disableBssStatistics||(s._commPoiShowDispatcher=new ot(s)),new q(s),s}return s(e,t),e.prototype.setCenter=function(t,e){return this._impl.setCenter(t,e),this},e.prototype.getCenter=function(){return this._impl.getCenter()},e.prototype.setZoom=function(t,e){return this._impl.setZoom(t,e),this},e.prototype.getZoom=function(){return this._impl.getZoom()},e.prototype.getStyleZoom=function(){return this._impl.getStyleZoom()},e.prototype.setStyleZoom=function(t,e){return this._impl.setStyleZoom(t,e),this},e.prototype.setRotation=function(t,e){return this._impl.setRotation(t,e),this},e.prototype.getRotation=function(){return this._impl.getRotation()},e.prototype.setPitch=function(t,e){return this._impl.setPitch(t,e),this},e.prototype.getPitch=function(){return this._impl.getPitch()},e.prototype.setMinZoom=function(t,e){return this._impl.setMinZoom(t,e),this},e.prototype.getMinZoom=function(){return this._impl.getMinZoom()},e.prototype.getMaxZoom=function(){return this._impl.getMaxZoom()},e.prototype.setMaxZoom=function(t,e){return this._impl.setMaxZoom(t,e),this},e.prototype.setMinPitch=function(t,e){return this._impl.setMinPitch(t,e),this},e.prototype.setMaxPitch=function(t,e){return this._impl.setMaxPitch(t,e),this},e.prototype.getSize=function(){return this._impl.getSize()},e.prototype.getBounds=function(){return new Y(this._impl.getBounds())},e.prototype.project=function(t){return this._impl.project(t)},e.prototype.unproject=function(t){return this._impl.unproject(t)},e.prototype.getProjectionMatrix=function(){return this._impl.getCameraViewProjectionMatrix().slice()},e.prototype.getWebGLContext=function(){return this._impl.getWebGLContext()},e.prototype.getCanvas=function(){return this._impl.getCanvas()},e.prototype.getContainer=function(){return this._impl.getExternalContainer()},e.prototype.invalidateSize=function(){return this._impl.invalidateSize(),this},e.prototype.showTraffic=function(){return this._impl.showTraffic(),this},e.prototype.hideTraffic=function(){return this._impl.hideTraffic(),this},e.prototype.setSelectedObjects=function(t){return void 0===t&&(t=[]),this._impl.setSelectedIds(t),this},e.prototype.setStyleById=function(t){return c(this,void 0,Promise,(function(){return u(this,(function(e){return[2,this._impl.setStyle(t)]}))}))},e.prototype.setLanguage=function(t){return this._impl.setLang(t),this.emit("changeLanguage",{lang:t}),this},e.prototype.getLanguage=function(){return this._impl.state.lang},e.prototype.setFloorPlanLevel=function(t,e){this._impl.changeFloorNumber(t,e)},e.prototype.setMaxBounds=function(t){return this._impl.setMaxBounds(t),this},e.prototype.getPadding=function(){return this._impl.getPadding()},e.prototype.setPadding=function(t,e){return this._impl.setPadding(t,e),this},e.prototype.setStyle=function(t,e){return this._impl.setStyle(t,e)},e.prototype.addLayer=function(t,e){return this._impl.addLayer(t,e),this},e.prototype.removeLayer=function(t){return this._impl.removeLayer(t),this},e.prototype.setAutoHoverMode=function(t){return this._impl.setAutoHoverMode(t),this},e.prototype.fitBounds=function(t,e){return this._impl.fitBounds(t,e),this},e.prototype.setStyleState=function(t){return this._impl.setStyleState(t),this},e.prototype.setStyleOptions=function(t){return this._impl.patchStyleState({trafficOn:t.traffic}),this},e.prototype.setOption=function(t,e){return this._impl.setOption(t,e),this},e.prototype.patchStyleState=function(t){return this._impl.patchStyleState(t),this},e.prototype.destroy=function(){var t;null===(t=this._commPoiShowDispatcher)||void 0===t||t.destroy(),this._controlPane.destroy(),this._impl.destroy()},e.prototype.setControlsLayoutPadding=function(t){this._controlPane.setPadding(t)},e.prototype.getControlsLayoutPadding=function(){return this._controlPane.getPadding()},e.prototype.showLabelsDebug=function(t){this._impl.showLabelsDebug(t)},e.prototype.hideLabelsDebug=function(){this._impl.hideLabelsDebug()},e.prototype._emitMapEvent=function(t,e){this.emit(t,{isUser:e.isUser})},e.prototype._emitMapPointerEvent=function(t,e){var n,i=e.originalEvent,r=e.lngLat,o=e.point,a=e.target,s=e.targetData;if(void 0!==s)switch(s.type){case"geojson":n={type:s.type,source:s.source.mapglApiSource,feature:s.feature};break;case"default":n={type:s.type,id:s.id}}this.emit(t,{originalEvent:i,lngLat:r,point:o,target:void 0!==a?{id:a.id}:void 0,targetData:n})},e.prototype._initControls=function(t){var e=this;if(!1!==t.copyright&&this._impl.modules.tileKeyInfo.getKeyInfo().then((function(n){var i=n.showSberLogo;new Z(e,{position:"string"==typeof t.copyright?t.copyright:"bottomRight",interactive:t.interactiveCopyright,autoHide:t.autoHideOSMCopyright,showSberLogo:i})})),!1!==t.zoomControl){var n="string"==typeof t.zoomControl?t.zoomControl:"topRight";new z(this,{position:n})}if(t.trafficControl){n="string"==typeof t.trafficControl?t.trafficControl:"topRight";new R(this,{position:n})}if(t.scaleControl){n="string"==typeof t.scaleControl?t.scaleControl:"bottomLeft";new ft(this,{position:n})}if(t.floorControl){n="string"==typeof t.floorControl?t.floorControl:"topRight";new tt(this,{position:n})}},e}(f);function mt(t,e){var n=l({},t);for(var i in e)void 0===n[i]&&(n[i]=e[i]);return n}var vt={minZoom:-1/0,maxZoom:1/0,anchor:[.5,.5],offset:[0,18],relativeAnchor:[.5,.5],zIndex:0,lineHeight:1.2,letterSpacing:0,haloRadius:0,fontSize:18,color:"#000000",haloColor:"#ffffff"},_t={minZoom:-1/0,maxZoom:1/0,zIndex:0,icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSI0OHB4IiB2aWV3Qm94PSIwIDAgMzAgNDgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1MS4yICg1NzUxOSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+PHRpdGxlPlBhZ2UgMSBDb3B5PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjUwJSIgeTE9IjUwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+PHN0b3Agc3RvcC1jb2xvcj0iIzFCODlFRSIgb2Zmc2V0PSIwJSI+PC9zdG9wPjxzdG9wIHN0b3AtY29sb3I9IiMzMTk4RUMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGlkPSJSZWNvdmVyeS0wMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgzOS4wMDAwMDAsIC00MjUuMDAwMDAwKSI+PGcgaWQ9IlBhZ2UtMS1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4MzkuMDAwMDAwLCA0MjUuMDAwMDAwKSI+PGVsbGlwc2UgaWQ9Ik92YWwtMyIgZmlsbD0iIzAwMDAwMCIgb3BhY2l0eT0iMC4wMzYzODA1OTciIGN4PSIxNSIgY3k9IjQ1LjUiIHJ4PSIzIiByeT0iMS41Ij48L2VsbGlwc2U+PGVsbGlwc2UgaWQ9Ik92YWwtMy1Db3B5IiBmaWxsPSIjMDAwMDAwIiBvcGFjaXR5PSIwLjAzNjM4MDU5NyIgY3g9IjE1IiBjeT0iNDUuNSIgcng9IjQuNSIgcnk9IjIuNSI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0xNSw0NS44ODM2MzUzIEwxNS44ODIzNTI5LDQ1Ljg4MzYzNTMgQzE1Ljg4MjM1MjksMjkuMjE3NzUyOSAyMC43NzY3NjQ3LDIzLjc5NzQ1ODggMjcuOTg3MzUyOSwyMy43OTc0NTg4IEwyOC4zMjk3MDU5LDIzLjc5NzQ1ODggQzI5LjA3Nzk0MTIsMjEuNTkwNjk0MSAzMCwxNy45OTE1NzY1IDMwLDE1LjAwMDQgQzMwLDcuMTQzOTI5NDEgMjMuNzY3OTQxMiwwLjAwMDQgMTUsMC4wMDA0IEM2LjIzMjA1ODgyLDAuMDAwNCAwLDcuMTQzOTI5NDEgMCwxNS4wMDA0IEMwLDE3Ljk5MTU3NjUgMC45MjIwNTg4MjQsMjEuNTkwNjk0MSAxLjY3MDI5NDEyLDIzLjc5NzQ1ODggTDIuMDEyNjQ3MDYsMjMuNzk3NDU4OCBDOS4yMjQxMTc2NSwyMy43OTc0NTg4IDE0LjExNzY0NzEsMjkuMjE3NzUyOSAxNC4xMTc2NDcxLDQ1Ljg4MzYzNTMgTDE1LDQ1Ljg4MzYzNTMgWiIgaWQ9IkZpbGwtMSIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSI+PC9wYXRoPjwvZz48L2c+PC9nPjwvc3ZnPg==",interactive:!0,hoverSize:[15,43],rotation:0,userData:void 0},yt=function(t){function e(e,n){var i=t.call(this)||this;n.icon||(n.anchor=[15,43]);var r=mt(n,_t);return i.userData=r.userData,i.rootOptions={zIndex:r.zIndex,minZoom:r.minZoom,maxZoom:r.maxZoom},i._impl=new h.Marker(e._impl,{coordinates:r.coordinates,icon:r.icon,zIndex:r.zIndex,minZoom:r.minZoom,maxZoom:r.maxZoom,interactive:r.interactive,label:gt(i.rootOptions,n.label),anchor:n.anchor,size:n.size,rotation:n.rotation,hoverIcon:n.hoverIcon,hoverSize:n.hoverSize,hoverAnchor:n.hoverAnchor}),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return s(e,t),e.prototype.setIcon=function(t){return this._impl.setIcon(t),this},e.prototype.setHoverIcon=function(t){return this._impl.setHoverIcon(t),this},e.prototype.setRotation=function(t){return this._impl.setRotation(t),this},e.prototype.getRotation=function(){return this._impl.getRotation()},e.prototype.setLabel=function(t){return this._impl.setLabel(gt(this.rootOptions,t)),this},e.prototype.setCoordinates=function(t){return this._impl.setCoordinates(t),this},e.prototype.getCoordinates=function(){return this._impl.getCoordinates()},e.prototype.show=function(){return this._impl.show(),this},e.prototype.hide=function(){return this._impl.hide(),this},e.prototype.destroy=function(){this._impl.destroy()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(f);function gt(t,e){var n,i,r;if(e){e.minZoom=Math.max(null!==(n=e.minZoom)&&void 0!==n?n:t.minZoom,t.minZoom),e.maxZoom=Math.min(null!==(i=e.maxZoom)&&void 0!==i?i:t.maxZoom,t.maxZoom),e.zIndex=null!==(r=e.zIndex)&&void 0!==r?r:t.zIndex+1e-5;var o=mt(e,vt);return void 0===e.offset&&void 0!==e.anchor&&(o.offset=e.anchor.map((function(t){return-t}))),{text:o.text,image:e.image,minZoom:o.minZoom,maxZoom:o.maxZoom,color:o.color,fontSize:o.fontSize,haloRadius:o.haloRadius,haloColor:o.haloColor,letterSpacing:o.letterSpacing,lineHeight:o.lineHeight,zIndex:o.zIndex,offset:o.offset,anchor:o.relativeAnchor,font:"Open_Sans"}}}var bt={anchor:[0,0],offset:[0,0],fontSize:24,color:"#000000",haloColor:"#ffffff",haloRadius:0,minZoom:-1/0,maxZoom:1/0,zIndex:0,letterSpacing:0,lineHeight:1.2,relativeAnchor:[.5,.5],userData:void 0},wt=function(){function t(t,e){this.userData=e.userData;var n=mt(e,bt);void 0===e.offset&&void 0!==e.anchor&&(n.offset=e.anchor.map((function(t){return-t}))),this._impl=new h.PointLabel(t._impl,{coordinates:n.coordinates,text:n.text,minZoom:n.minZoom,maxZoom:n.maxZoom,color:n.color,fontSize:n.fontSize,haloRadius:n.haloRadius,haloColor:n.haloColor,letterSpacing:n.letterSpacing,lineHeight:n.lineHeight,zIndex:n.zIndex,offset:n.offset,anchor:n.relativeAnchor,image:e.image,font:"Open_Sans"})}return t.prototype.destroy=function(){this._impl.remove()},t.prototype.show=function(){return this._impl.show(),this},t.prototype.hide=function(){return this._impl.hide(),this},t.prototype.setCoordinates=function(t){return this._impl.setCoordinates(t),this},t.prototype.getCoordinates=function(){return this._impl.getCoordinates()},t}(),xt={minZoom:-1/0,maxZoom:1/0,zIndex:0,anchor:[-0,-0],preventMapInteractions:!0,userData:void 0,interactive:!0},St=function(){function t(t,e){this.userData=e.userData;var n=mt(e,xt);this._impl=new h.HtmlMarker(t._impl,{coordinates:n.coordinates,html:n.html,offset:[-n.anchor[0],-n.anchor[1]],minZoom:n.minZoom,maxZoom:n.maxZoom,zIndex:n.zIndex,preventMapInteractions:n.preventMapInteractions,interactive:n.interactive,animate:false})}return t.prototype.destroy=function(){this._impl.destroy()},t.prototype.setCoordinates=function(t){return this._impl.setPosition(t),this},t.prototype.setAnchor=function(t){return this._impl.setOffset([-t[0],-t[1]]),this},t.prototype.setContent=function(t){return this._impl.setContent(t),this},t.prototype.getCoordinates=function(){return this._impl.getPosition()},t.prototype.getAnchor=function(){var t=this._impl.getOffset();return[-t[0],-t[1]]},t.prototype.getContent=function(){return this._impl.getHtmlElement()},t}(),It={zIndex:0,minZoom:-1/0,maxZoom:1/0,color:"#3388ff33",strokeColor:"#3388ff",strokeWidth:1,interactive:!0,userData:void 0},Mt=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=mt(n,It);var r={coordinates:i.options.coordinates,radius:i.options.radius,minZoom:i.options.minZoom,maxZoom:i.options.maxZoom,interactive:i.options.interactive,color:i.options.color,zIndex:i.options.zIndex,borderWidth:i.options.strokeWidth,borderColor:i.options.strokeColor,segments:150};return i._impl=new h.Circle(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return s(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(f),Pt={interactive:!0,maxZoom:1/0,minZoom:-1/0,color:"#ffffff",radius:20,diameter:NaN,zIndex:0,strokeWidth:3,stroke2Width:0,strokeColor:"#3388ff",stroke2Color:"#00000000",userData:void 0},Tt=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=mt(n,Pt);var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,color:i.options.color,width:Number.isNaN(i.options.diameter)?i.options.radius:i.options.diameter,zIndex:i.options.zIndex,borderWidth:i.options.strokeWidth,borderColor:i.options.strokeColor,border2Width:i.options.stroke2Width,border2Color:i.options.stroke2Color,draggable:!1};return i._impl=new h.CircleMarker(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return s(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(f),Lt={interactive:!0,maxZoom:1/0,minZoom:-1/0,width:3,width2:0,width3:0,color:"#3388ff",color2:"#00000000",color3:"#00000000",zIndex:0,zIndex2:-1,zIndex3:-2,dashLength:0,gapLength:0,gapColor:"#ffffff00",userData:void 0},Et=function(t){function e(e,n){var i=t.call(this)||this;if(i.userData=n.userData,i.options=mt(n,Lt),n.dashLength){var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,width:i.options.width,width2:i.options.width2,dashColor:i.options.color,dash2Color:i.options.color,gapColor:i.options.gapColor,dashLength:i.options.dashLength,dash2Length:0,zIndex:i.options.zIndex,zIndex2:i.options.zIndex2,gapLength:i.options.gapLength>0?i.options.gapLength:i.options.dashLength,displayTileBounds:!1,showAnimation:{animate:!1}};i._impl=new h.DashedPolyline(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)}))}else{r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,width:i.options.width,width2:i.options.width2,width3:i.options.width3,color:i.options.color,color2:i.options.color2,color3:i.options.color3,zIndex:i.options.zIndex,zIndex2:i.options.zIndex2,zIndex3:i.options.zIndex3,displayTileBounds:!1,showAnimation:{animate:!1}};i._impl=new h.Polyline(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)}))}return i}return s(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(f),kt={interactive:!0,maxZoom:1/0,minZoom:-1/0,color:"#3388ff33",zIndex:0,strokeWidth:3,strokeColor:"#3388ff",userData:void 0},zt=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=mt(n,kt);var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,color:i.options.color,zIndex:i.options.zIndex,strokeWidth:i.options.strokeWidth,strokeColor:i.options.strokeColor};return i._impl=new h.Polygon(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return s(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(f),Ct={minZoom:-1/0,maxZoom:1/0,zIndex:0,opacity:1},At=function(){function t(t,e){this.options=mt(e,Ct);var n={bounds:this.options.bounds,image:{url:this.options.image.url},minZoom:this.options.minZoom,maxZoom:this.options.maxZoom,zIndex:this.options.zIndex,opacity:this.options.opacity};this._impl=new h.Raster(t._impl,n)}return t.prototype.updateImage=function(t){return c(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this._impl.updateImage(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.destroy=function(){this._impl.destroy()},t}(),Dt={attributes:{},maxZoom:17},Ft=function(){function t(t,e){this.options=mt(e,Dt),this._impl=new h.GeoJsonSource(t._impl,this.options,this)}return t.prototype.destroy=function(){this._impl.destroy()},t.prototype.setAttributes=function(t){return this._impl.setAttributes(t),this},t.prototype.getAttributes=function(){return this._impl.getAttributes()},t.prototype.setData=function(t){return c(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this._impl.setData(t)];case 1:return e.sent(),[2]}}))}))},t}(),Rt=n(103),Ot={};Ot.styleTagTransform=P(),Ot.setAttributes=x(),Ot.insert=b().bind(null,"head"),Ot.domAPI=y(),Ot.insertStyleElement=I();v()(Rt.Z,Ot);const jt=Rt.Z&&Rt.Z.locals?Rt.Z.locals:void 0;var Bt=function(t){function e(e,n){return t.call(this,e,function(t){return"\n    <div class="+jt.container+">\n        <div class="+jt.text+">\n            "+t+"\n        </div>\n    </div>\n"}(n),{position:"bottomLeft"})||this}return s(e,t),e}(p),Ut={attributes:{},attribution:"",minZoom:at,maxZoom:st},Zt=function(){function t(t,e){this.options=mt(e,Ut),this._impl=new h.RasterTileSource(t._impl,this.options),this._attribution=new Bt(t,this.options.attribution)}return t.prototype.destroy=function(){this._impl.destroy(),this._attribution.destroy()},t.prototype.setAttributes=function(t){return this._impl.setAttributes(t),this},t.prototype.getAttributes=function(){return this._impl.getAttributes()},t}();function Nt(t){return!Ht(t)}function Ht(t){if("undefined"==typeof window||"undefined"==typeof document)return"not a browser";if(!Boolean(Function.prototype&&Function.prototype.bind))return"insufficient Function support";if(!("JSON"in window&&"parse"in JSON&&"stringify"in JSON))return"insufficient JSON support";if(!function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(e),i=null;try{i=new Worker(n),t=!0}catch(e){t=!1}i&&i.terminate();return URL.revokeObjectURL(n),t}())return"insufficient worker support";if(!ArrayBuffer.isView)return"insufficient ArrayBuffer support";if(!function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var n=e.getImageData(0,0,1,1);return n&&n.width===t.width}())return"insufficient Canvas/getImageData support";var e,n=function(t){var e=String(t);void 0===Gt[e]&&(Gt[e]=function(t){var e,n=function(t){var e=document.createElement("canvas"),n={antialias:!1,stencil:!0,failIfMajorPerformanceCaveat:t};if(!("WebGLRenderingContext"in window))return!1;return e.getContext("webgl",n)||e.getContext("experimental-webgl",n)}(t);if(!n)return{ok:!1,msg:"error on get context"};for(var i=0,r=["OES_element_index_uint","OES_standard_derivatives","OES_vertex_array_object"];i<r.length;i++){var o=r[i];if(!n.getExtension(o))return{ok:!1,msg:o+" extension is not supported"}}try{e=n.createShader(n.VERTEX_SHADER)}catch(t){return{ok:!1,msg:"browser block shader API"}}if(!e||n.isContextLost())return{ok:!1};return n.shaderSource(e,"void main() {}"),n.compileShader(e),{ok:!0===n.getShaderParameter(e,n.COMPILE_STATUS)}}(t));return Gt[e]}(t&&t.failIfMajorPerformanceCaveat||!1);return n.ok?Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.isArray?Boolean(Object.keys&&Object.assign&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.freeze)?(e=document.createElement("div"))&&"function"==typeof e.after?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient DOM support":"insufficient Object support":"insufficient Array support":"insufficient WebGL support"+(n.msg?": "+n.msg:"")}var Gt={};setTimeout((function(){var t=Array.from(document.querySelectorAll("script")).find((function(t){return t.src.match("https://mapgl.2gis.com/api/js")}));if(t){var e=function(t){var e=t.split("?")[1];if(e){var n=e.split("&").map((function(t){return t.split("=")})).find((function(t){return"callback"===t[0]}));if(n)return n[1]}}(t.src);if(e){if("function"!=typeof window[e])throw new Error('Not found callback function with name "'+e+'"');window[e]()}}}),0);n(205)})(),i})()}));