!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("prop-types"),require("@emotion/react"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsWidgetMap",["react","prop-types","@emotion/react","decap-cms-ui-default"],e):"object"==typeof exports?exports.DecapCmsWidgetMap=e(require("react"),require("prop-types"),require("@emotion/react"),require("decap-cms-ui-default")):t.DecapCmsWidgetMap=e(t.React,t.DecapCmsDefaultExports.PropTypes,t.DecapCmsDefaultExports.EmotionCore,t.DecapCmsUiDefault)}(window,((t,e,n,i)=>(()=>{var o={77:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var i=n(272),o=n.n(i),r=n(609),s=n.n(r)()(o());s.push([t.id,'.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid rgb(179,197,219);\n background-color: rgba(255,255,255,0.4);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: rgba(0,60,136,0.3);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n.ol-scale-line-inner {\n border: 1px solid #eee;\n border-top: none;\n color: #eee;\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n.ol-scale-singlebar-even{\n background-color: #000000;\n}\n.ol-scale-singlebar-odd{\n background-color: #ffffff;\n}\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: #000000;\n float: right;\n z-index: 10;\n}\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 12px;\n z-index: 11;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-text {\n position: absolute;\n font-size: 14px;\n text-align: center;\n bottom: 25px;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid black;\n}\n\n.ol-unsupported {\n display: none;\n}\n.ol-viewport, .ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n.ol-viewport canvas {\n all: unset;\n}\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n.ol-control {\n position: absolute;\n background-color: rgba(255,255,255,0.4);\n border-radius: 4px;\n padding: 2px;\n}\n.ol-control:hover {\n background-color: rgba(255,255,255,0.6);\n}\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: white;\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: rgba(0,60,136,0.5);\n border: none;\n border-radius: 2px;\n}\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n.ol-compass {\n display: block;\n font-weight: normal;\n font-size: 1.2em;\n will-change: transform;\n}\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n background-color: rgba(0,60,136,0.7);\n}\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n.ol-attribution a {\n color: rgba(0,60,136,0.7);\n text-decoration: none;\n}\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: #000;\n text-shadow: 0 0 2px #fff;\n font-size: 12px;\n}\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n.ol-attribution button {\n flex-shrink: 0;\n}\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n.ol-attribution:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid #7b98bc;\n height: 150px;\n margin: 2px;\n width: 150px;\n}\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 2px;\n left: 2px;\n position: absolute;\n}\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n.ol-overviewmap:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-overviewmap-box {\n border: 2px dotted rgba(0,60,136,0.7);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',"",{version:3,sources:["webpack://./../../node_modules/ol/ol.css"],names:[],mappings:"AAAA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,oCAAoC;EACpC,uCAAuC;AACzC;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8BAA8B;EAC9B,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;AACA;EACE,sBAAsB;EACtB,gBAAgB;EAChB,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;AACA;EACE,UAAU;EACV,YAAY;EACZ,yBAAyB;EACzB,YAAY;EACZ,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,cAAc;EACd,yEAAyE;AAC3E;AACA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,cAAc;EACd,yEAAyE;AAC3E;AACA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,uBAAuB;AACzB;;AAEA;EACE,aAAa;AACf;AACA;EACE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,qBAAqB;EACrB,iBAAiB;EACjB,0CAA0C;AAC5C;AACA;EACE,UAAU;AACZ;AACA;EACE,8BAA8B;EAC9B,yBAAyB;EACzB,sBAAsB;EACtB,qBAAqB;EACrB,iBAAiB;AACnB;AACA;EACE,wBAAwB;EACxB,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,YAAY;EACZ,oBAAoB;EACpB,iBAAiB;EACjB,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,uCAAuC;EACvC,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,uCAAuC;AACzC;AACA;EACE,SAAS;EACT,UAAU;AACZ;AACA;EACE,SAAS;EACT,WAAW;EACX,qDAAqD;AACvD;AACA;EACE,UAAU;EACV,kBAAkB;EAClB,0DAA0D;AAC5D;AACA;EACE,YAAY;EACZ,UAAU;AACZ;AACA;EACE,WAAW;EACX,SAAS;AACX;;AAEA;EACE,cAAc;EACd,WAAW;EACX,UAAU;EACV,YAAY;EACZ,iBAAiB;EACjB,qBAAqB;EACrB,kBAAkB;EAClB,kBAAkB;EAClB,eAAe;EACf,cAAc;EACd,iBAAiB;EACjB,oCAAoC;EACpC,YAAY;EACZ,kBAAkB;AACpB;AACA;EACE,YAAY;EACZ,UAAU;AACZ;AACA;EACE,kBAAkB;AACpB;AACA;EACE,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,UAAU;AACZ;AACA;;EAEE,qBAAqB;EACrB,oCAAoC;AACtC;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,0BAA0B;AAC5B;;;AAGA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,SAAS;EACT,iBAAiB;EACjB,WAAW;EACX,yBAAyB;EACzB,eAAe;AACjB;AACA;EACE,eAAe;EACf,gBAAgB;AAClB;AACA;EACE,YAAY;AACd;AACA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,iCAAiC;AACnC;AACA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;AACA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;AACA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;AACA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;AACA;;EAEE,cAAc;AAChB;AACA;EACE,yBAAyB;EACzB,aAAa;EACb,WAAW;EACX,YAAY;AACd;AACA;EACE,WAAW;EACX,SAAS;EACT,kBAAkB;AACpB;AACA;;EAEE,aAAa;AACf;AACA;EACE,iCAAiC;AACnC;AACA;EACE,qCAAqC;AACvC;;AAEA;EACE,YAAY;AACd",sourcesContent:['.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid rgb(179,197,219);\n background-color: rgba(255,255,255,0.4);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: rgba(0,60,136,0.3);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n.ol-scale-line-inner {\n border: 1px solid #eee;\n border-top: none;\n color: #eee;\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n.ol-scale-singlebar-even{\n background-color: #000000;\n}\n.ol-scale-singlebar-odd{\n background-color: #ffffff;\n}\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: #000000;\n float: right;\n z-index: 10;\n}\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 12px;\n z-index: 11;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-text {\n position: absolute;\n font-size: 14px;\n text-align: center;\n bottom: 25px;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid black;\n}\n\n.ol-unsupported {\n display: none;\n}\n.ol-viewport, .ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n.ol-viewport canvas {\n all: unset;\n}\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n.ol-control {\n position: absolute;\n background-color: rgba(255,255,255,0.4);\n border-radius: 4px;\n padding: 2px;\n}\n.ol-control:hover {\n background-color: rgba(255,255,255,0.6);\n}\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: white;\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: rgba(0,60,136,0.5);\n border: none;\n border-radius: 2px;\n}\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n.ol-compass {\n display: block;\n font-weight: normal;\n font-size: 1.2em;\n will-change: transform;\n}\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n background-color: rgba(0,60,136,0.7);\n}\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n.ol-attribution a {\n color: rgba(0,60,136,0.7);\n text-decoration: none;\n}\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: #000;\n text-shadow: 0 0 2px #fff;\n font-size: 12px;\n}\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n.ol-attribution button {\n flex-shrink: 0;\n}\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n.ol-attribution:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid #7b98bc;\n height: 150px;\n margin: 2px;\n width: 150px;\n}\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 2px;\n left: 2px;\n position: absolute;\n}\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n.ol-overviewmap:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-overviewmap-box {\n border: 2px dotted rgba(0,60,136,0.7);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n'],sourceRoot:""}]);const a=s},609: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,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},272:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},147:function(t){t.exports=function(){"use strict";function t(t,i,o,r,s){!function t(n,i,o,r,s){for(;r>o;){if(r-o>600){var a=r-o+1,l=i-o+1,h=Math.log(a),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(o,Math.floor(i-l*u/a+c)),Math.min(r,Math.floor(i+(a-l)*u/a+c)),s)}var p=n[i],f=o,d=r;for(e(n,o,i),s(n[r],p)>0&&e(n,o,r);f0;)d--}0===s(n[o],p)?e(n,o,d):e(n,++d,r),d<=i&&(o=d+1),i<=d&&(r=d-1)}}(t,i,o||0,r||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return te?1:0}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,i,o,r){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=o)){var a=n+Math.ceil((i-n)/o/2)*o;t(e,a,n,i,r),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var i=this.toBBox,o=[];e;){for(var r=0;r=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var s=this._chooseSplitIndex(n,o,i),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,r(n,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,o,r,a,l,h,c,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),_=s(t,d,n,this.toBBox),y=(o=g,r=_,void 0,void 0,void 0,void 0,a=Math.max(o.minX,r.minX),l=Math.max(o.minY,r.minY),h=Math.min(o.maxX,r.maxX),c=Math.min(o.maxY,r.maxY),Math.max(0,h-a)*Math.max(0,c-l)),v=u(g)+u(_);y=e;f--){var d=t.children[f];a(l,t.leaf?o(d):d),h+=c(l)}return h},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},i}()},552:(t,e,n)=>{var i=n(77);i&&i.__esModule&&(i=i.default),t.exports="string"==typeof i?i:i.toString()},244:e=>{"use strict";e.exports=t},756:t=>{"use strict";t.exports=n},673:t=>{"use strict";t.exports=e},327:t=>{"use strict";t.exports=i}},r={};function s(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,exports:{}};return o[t].call(n.exports,n,n.exports,s),n.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{"use strict";s.d(a,{DecapCmsWidgetMap:()=>Uh});var t=s(244),e=s.n(t),n=s(673),i=s.n(n),o=s(756),r=s(552),l=s.n(r);const h=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function u(t,e){return t>e?1:t0){for(o=1;o0?o-1:o:t[o-1]-e=0||w.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==w.indexOf("webkit")&&-1==w.indexOf("edge")),b=-1!==w.indexOf("macintosh"),S="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,T="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,O="undefined"!=typeof Image&&Image.prototype.decode,P=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}(),R=(C=function(t,e){return C=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])},C(t,e)},function(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}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const I=function(t){function e(e){var n=this,i="Assertion failed. See https://openlayers.org/en/v"+"6.15.1".split("-")[0]+"/doc/errors/#"+e+" for details.";return(n=t.call(this,i)||this).code=e,n.name="AssertionError",n.message=i,n}return R(e,t),e}(Error);function F(t,e){if(!t)throw new I(e)}var M;function k(t,e){var n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e}function L(t,e,n,i,o,r,s,a){var l=Math.sin(r),h=Math.cos(r);return t[0]=i*h,t[1]=o*l,t[2]=-i*l,t[3]=o*h,t[4]=s*i*h-a*i*l+e,t[5]=s*o*l+a*o*h+n,t}function D(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];F(0!==i,32);var o=e[0],r=e[1],s=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/i,t[1]=-r/i,t[2]=-s/i,t[3]=o/i,t[4]=(s*h-a*l)/i,t[5]=-(o*h-r*l)/i,t}function j(t){var e="matrix("+t.join(", ")+")";if(T)return e;var n=M||(M=document.createElement("div"));return n.style.transform=e,n.style.transform}new Array(6);const B={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function G(t){for(var e=[1/0,1/0,-1/0,-1/0],n=0,i=t.length;no&&(l|=B.RIGHT),ar&&(l|=B.ABOVE),l===B.UNKNOWN&&(l=B.INTERSECTING),l}function U(t,e,n,i,o){return o?(o[0]=t,o[1]=e,o[2]=n,o[3]=i,o):[t,e,n,i]}function V(t){return U(1/0,1/0,-1/0,-1/0,t)}function q(t,e,n,i,o){return $(V(o),t,e,n,i)}function H(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function J(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Q(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function $(t,e,n,i,o){for(;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function gt(t){return t[2]=n[2])){var o=ft(n),r=Math.floor((i[0]-n[0])/o)*o;t[0]-=r,t[2]-=r}return t}function yt(t,e,n){return Math.min(Math.max(t,e),n)}var vt="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},mt="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function xt(t,e,n,i,o,r){var s=o-n,a=r-i;if(0!==s||0!==a){var l=((t-n)*s+(e-i)*a)/(s*s+a*a);l>1?(n=o,i=r):l>0&&(n+=s*l,i+=a*l)}return Ct(t,e,n,i)}function Ct(t,e,n,i){var o=n-t,r=i-e;return o*o+r*r}function wt(t){return t*Math.PI/180}function At(t,e){var n=t%e;return n*e<0?n+e:n}function Et(t,e,n){return t+n*(e-t)}function bt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function St(t,e){return Math.floor(bt(t,e))}function Tt(t,e){return Math.ceil(bt(t,e))}var Ot=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Pt=/^([a-z]*)$|^hsla?\(.*\)$/i;function Rt(t){return"string"==typeof t?t:kt(t)}var It=function(){var t={},e=0;return function(n){var i;if(t.hasOwnProperty(n))i=t[n];else{if(e>=1024){var o=0;for(var r in t)0==(3&o++)&&(delete t[r],--e)}i=function(t){var e,n,i,o,r;if(Pt.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}(t)),Ot.exec(t)){var s,a=t.length-1;s=a<=4?1:2;var l=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),n=parseInt(t.substr(1+1*s,s),16),i=parseInt(t.substr(1+2*s,s),16),o=l?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,l&&(o=(o<<4)+o)),r=[e,n,i,o/255]}else 0==t.indexOf("rgba(")?Mt(r=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((r=t.slice(4,-1).split(",").map(Number)).push(1),Mt(r)):F(!1,14);return r}(n),t[n]=i,++e}return i}}();function Ft(t){return Array.isArray(t)?t:It(t)}function Mt(t){return t[0]=yt(t[0]+.5|0,0,255),t[1]=yt(t[1]+.5|0,0,255),t[2]=yt(t[2]+.5|0,0,255),t[3]=yt(t[3],0,1),t}function kt(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+n+","+i+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Lt(t,e,n){return e+":"+t+":"+(n?Rt(n):"null")}var Dt=new(function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var i=Lt(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var o=Lt(t,e,n);this.cache_[o]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}());const jt=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),Bt="propertychange";var Gt="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1,o=arguments.length;i0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var i=n.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=y,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(h),Zt="change",Kt="contextmenu",Ut="click",Vt="keydown",qt="keypress",Ht="touchmove",Jt="wheel";function Qt(t,e,n,i,o){if(i&&i!==t&&(n=n.bind(i)),o){var r=n;n=function(){t.removeEventListener(e,n),r.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function $t(t,e,n,i){return Qt(t,e,n,i,!0)}function te(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),zt(t))}var ee=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ne=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return ee(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(Zt)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,i=new Array(n),o=0;o=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}const we=function(t){function e(e){var n=this,i=Gt({},e);delete i.source,(n=t.call(this,i)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(ge,n.handleSourcePropertyChange_);var o=e.source?e.source:null;return n.setSource(o),n}return xe(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(ge)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(te(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=Qt(t,Zt,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set("map",t)},e.prototype.getMapInternal=function(){return this.get("map")},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(te(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(te(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Qt(t,ve,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);F(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=Qt(this,Zt,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(ge,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(ye);function Ae(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function Ee(t,e){var n=Math.cos(e),i=Math.sin(e),o=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=o,t[1]=r,t}function be(t,e){if(e.canWrapX()){var n=ft(e.getExtent()),i=function(t,e,n){var i=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]i[2])){var r=n||ft(i);o=Math.floor((t[0]-i[0])/r)}return o}(t,e,n);i&&(t[0]-=i*n)}return t}var Se=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Te=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return Se(e,t),e.prototype.dispatchRenderEvent=function(t,e){v()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;L(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),D(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o,r,s,a){var l,h=e.viewState;function u(t,e,n,i){return o.call(r,e,t?n:null,i)}var c=h.projection,p=be(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&i){var d=ft(c.getExtent());f.push([-d,0],[d,0])}for(var g=e.layerStatesArray,_=g.length,y=[],v=[],m=0;m=0;--x){var C=g[x],w=C.layer;if(w.hasRenderer()&&Ce(C,h)&&s.call(a,w)){var A=w.getRenderer(),E=w.getSource();if(A&&E){var b=E.getWrapX()?p:t,S=u.bind(null,C.managed);v[0]=b[0]+f[m][0],v[1]=b[1]+f[m][1],l=A.forEachFeatureAtCoordinate(v,e,n,S,y)}if(l)return l}}if(0!==y.length){var T=1/y.length;return y.forEach((function(t,e){return t.distanceSq+=e*T})),y.sort((function(t,e){return t.distanceSq-e.distanceSq})),y.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){return v()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,o,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,i,g,this,o,r)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){v()},e.prototype.scheduleExpireIconCache=function(t){Dt.canExpireCache()&&t.postRenderFunctions.push(Oe)},e}(h);function Oe(t,e){Dt.expire()}const Pe=Te;var Re=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Ie=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.inversePixelTransform=n,r.frameState=i,r.context=o,r}return Re(e,t),e}(jt);var Fe="ol-hidden",Me="ol-unselectable",ke="ol-control",Le="ol-collapsed",De=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),je=["style","variant","weight","size","lineHeight","family"],Be=function(t){var e=t.match(De);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,o=je.length;i=0;--r)i[r].renderDeclutter(t);!function(t,e){for(var n=t.childNodes,i=0;;++i){var o=n[i],r=e[i];if(!o&&!r)break;o!==r&&(o?r?t.insertBefore(r,o):(t.removeChild(o),--i):t.appendChild(r))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){for(var r=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],h=l.layer;if(h.hasRenderer()&&Ce(l,r)&&o(h)){var u=h.getRenderer().getDataAtPixel(t,e,n);if(u){var c=i(h,u);if(c)return c}}}},e}(Pe),cn="add",pn="remove";var fn=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dn="length",gn=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.element=n,o.index=i,o}return fn(e,t),e}(jt);const _n=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var o=n||{};if(i.unique_=!!o.unique,i.array_=e||[],i.unique_)for(var r=0,s=i.array_.length;r0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;ethis.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(te(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Ht,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(te(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(te),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(Yt),Pn="postrender",Rn="loadstart",In="loadend",Fn="layergroup",Mn="size",kn="target",Ln="view";var Dn=1/0;const jn=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,zt(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},t.prototype.enqueue=function(t){F(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Dn&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,i=e.length,o=e[t],r=n[t],s=t;t>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),h=lt;){var s=this.getParentIndex_(e);if(!(i[s]>r))break;n[e]=n[s],i[e]=i[s],e=s}n[e]=o,i[e]=r},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,o=this.elements_,r=this.priorities_,s=0,a=o.length;for(e=0;e0;)i=(n=this.dequeue()[0]).getKey(),0!==n.getState()||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++o,n.load())},e}(jn);var zn={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Wn={};Wn[zn.RADIANS]=6370997/(2*Math.PI),Wn[zn.DEGREES]=2*Math.PI*6370997/360,Wn[zn.FEET]=.3048,Wn[zn.METERS]=1,Wn[zn.USFEET]=1200/3937;const Nn=zn,Xn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var Yn=42,Zn=256;const Kn=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Wn[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();var Un=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vn=6378137,qn=Math.PI*Vn,Hn=[-qn,-qn,qn,qn],Jn=[-180,-85,180,85],Qn=Vn*Math.log(Math.tan(Math.PI/2)),$n=function(t){function e(e){return t.call(this,{code:e,units:Nn.METERS,extent:Hn,global:!0,worldExtent:Jn,getPointResolution:function(t,e){return t/vt(e[1]/Vn)}})||this}return Un(e,t),e}(Kn),ti=[new $n("EPSG:3857"),new $n("EPSG:102100"),new $n("EPSG:102113"),new $n("EPSG:900913"),new $n("http://www.opengis.net/def/crs/EPSG/0/3857"),new $n("http://www.opengis.net/gml/srs/epsg.xml#3857")];var ei=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ni=[-180,-90,180,90],ii=6378137*Math.PI/180,oi=function(t){function e(e,n){return t.call(this,{code:e,units:Nn.DEGREES,extent:ni,axisOrientation:n,global:!0,metersPerUnit:ii,worldExtent:ni})||this}return ei(e,t),e}(Kn),ri=[new oi("CRS:84"),new oi("EPSG:4326","neu"),new oi("urn:ogc:def:crs:OGC:1.3:CRS84"),new oi("urn:ogc:def:crs:OGC:2:84"),new oi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new oi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new oi("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],si={},ai={};function li(t,e,n){var i=t.getCode(),o=e.getCode();i in ai||(ai[i]={}),ai[i][o]=n}var hi=6371008.8;function ui(t,e,n){var i=n||hi,o=wt(t[1]),r=wt(e[1]),s=(r-o)/2,a=wt(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(o)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var ci=!0;function pi(t,e,n){var i;if(void 0!==e){for(var o=0,r=t.length;o=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(ci=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function Ri(t,e){return t}function Ii(t,e){return t}function Fi(t,e){return t}function Mi(t,e,n){return function(i,o,r,s,a){if(i){if(!o&&!e)return i;var l=e?0:r[0]*o,h=e?0:r[1]*o,u=a?a[0]:0,c=a?a[1]:0,p=t[0]+l/2+u,f=t[2]-l/2+u,d=t[1]+h/2+c,g=t[3]-h/2+c;p>f&&(f=p=(f+p)/2),d>g&&(g=d=(g+d)/2);var _=yt(i[0],p,f),y=yt(i[1],d,g);if(s&&n&&o){var v=30*o;_+=-v*Math.log(1+Math.max(0,p-i[0])/v)+v*Math.log(1+Math.max(0,i[0]-f)/v),y+=-v*Math.log(1+Math.max(0,d-i[1])/v)+v*Math.log(1+Math.max(0,i[1]-g)/v)}return[_,y]}}}function ki(t){return t}function Li(t,e,n,i){var o=ft(e)/n[0],r=ht(e)/n[1];return i?Math.min(t,Math.max(o,r)):Math.min(t,Math.min(o,r))}function Di(t,e,n){var i=Math.min(t,e);return i*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(i=Math.max(i,n),i/=Math.log(1+50*Math.max(0,n/t-1))/50+1),yt(i,n/2,2*e)}function ji(t,e,n,i,o){return function(r,s,a,l){if(void 0!==r){var h=i?Li(t,i,a,o):t;return(void 0===n||n)&&l?Di(r,h,e):yt(r,e,h)}}}function Bi(t){return void 0!==t?0:void 0}function Gi(t){return void 0!==t?t:void 0}function zi(t){return Math.pow(t,3)}function Wi(t){return 1-zi(1-t)}function Ni(t){return 3*t*t-2*t*t*t}function Xi(t){return t}yi(ti),yi(ri),Ai=ti,Ei=function(t,e,n){var i=t.length,o=n>1?n:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(i));for(var s=0;sQn?a=Qn:a<-Qn&&(a=-Qn),r[s+1]=a}return r},bi=function(t,e,n){var i=t.length,o=n>1?n:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(i));for(var s=0;s1)a=n;else{if(p>0){for(var f=0;fo&&(o=h),r=a,s=l}return o}function so(t,e,n,i,o){for(var r=0,s=n.length;r0;){for(var c=h.pop(),p=h.pop(),f=0,d=t[p],g=t[p+1],_=t[c],y=t[c+1],v=p+i;vf&&(u=v,f=m)}f>o&&(l[(u-e)/i]=1,p+i0&&g>f)&&(d<0&&_0&&_>d)?(a=c,l=p):(r[s++]=a,r[s++]=l,h=a,u=l,a=c,l=p)}}return r[s++]=a,r[s++]=l,s}function _o(t,e,n,i,o,r,s,a){for(var l=0,h=n.length;lr&&(h-a)*(r-l)-(o-a)*(u-l)>0&&s++:u<=r&&(h-a)*(r-l)-(o-a)*(u-l)<0&&s--,a=h,l=u}return 0!==s}function Ro(t,e,n,i,o,r){if(0===n.length)return!1;if(!Po(t,e,n[0],i,o,r))return!1;for(var s=1,a=n.length;sC&&Ro(t,e,n,i,h=(c+p)/2,g)&&(x=h,C=w),c=p}return isNaN(x)&&(x=o[r]),s?(s.push(x,g,C),s):[x,g,C]}function Fo(t,e,n,i,o){var r;for(e+=i;e=o[0]&&r[2]<=o[2]||r[1]>=o[1]&&r[3]<=o[3]||Fo(t,e,n,i,(function(t,e){return function(t,e,n){var i=!1,o=K(t,e),r=K(t,n);if(o===B.INTERSECTING||r===B.INTERSECTING)i=!0;else{var s=t[0],a=t[1],l=t[2],h=t[3],u=e[0],c=e[1],p=n[0],f=n[1],d=(f-c)/(p-u),g=void 0,_=void 0;r&B.ABOVE&&!(o&B.ABOVE)&&(i=(g=p-(f-h)/d)>=s&&g<=l),i||!(r&B.RIGHT)||o&B.RIGHT||(i=(_=f-(p-l)*d)>=a&&_<=h),i||!(r&B.BELOW)||o&B.BELOW||(i=(g=p-(f-a)/d)>=s&&g<=l),i||!(r&B.LEFT)||o&B.LEFT||(i=(_=f-(p-s)*d)>=a&&_<=h)}return i}(o,t,e)})))}function ko(t,e,n,i,o){return!!(Mo(t,e,n,i,o)||Po(t,e,n,i,o[0],o[1])||Po(t,e,n,i,o[0],o[3])||Po(t,e,n,i,o[2],o[1])||Po(t,e,n,i,o[2],o[3]))}function Lo(t,e,n,i,o){if(!ko(t,e,n[0],i,o))return!1;if(1===n.length)return!0;for(var r=1,s=n.length;r0}function Bo(t,e,n,i,o){for(var r=void 0!==o&&o,s=0,a=n.length;su&&f1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var i=0;i0},e.prototype.getInteracting=function(){return this.hints_[1]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(0,-this.hints_[0]);for(var e=0,n=this.animations_.length;e=0;--n){for(var i=this.animations_[n],o=!0,r=0,s=i.length;r0?l/a.duration:1;h>=1?(a.complete=!0,h=1):o=!1;var u=a.easing(h);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],f=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var g=c+u*(f-c),_=p+u*(d-p);this.targetCenter_=[g,_]}if(a.sourceResolution&&a.targetResolution){var y=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var v=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(y,0,v,!0);this.targetCenter_=this.calculateCenterZoom(m,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=y,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var x=1===u?At(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var C=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(C,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(o){this.animations_[n]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var w=i[0].callback;w&&Uo(w,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var n,i,o,r=this.getCenterInternal();return void 0!==r&&(Ee(n=[r[0]-e[0],r[1]-e[1]],t-this.getRotation()),o=e,(i=n)[0]+=+o[0],i[1]+=+o[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,i=this.getCenterInternal(),o=this.getResolution();return void 0!==i&&void 0!==o&&(n=[e[0]-t*(e[0]-i[0])/o,e[1]-t*(e[1]-i[1])/o]),n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Oi(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(Xn.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return Ri(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();F(n,1);var i=this.getResolution();F(void 0!==i,2);var o=this.getRotation();return F(void 0!==o,3),at(n,i,o,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Xn.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Ii(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=ft(t)/n[0],o=ht(t)/n[1];return Math.max(i,o)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(n/i)/Math.log(e);return function(t){return n/Math.pow(e,t*o)}},e.prototype.getRotation=function(){return this.get(Xn.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(n/i)/e;return function(t){return Math.log(n/t)/e/o}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),i=this.getCenterInternal(),o=this.padding_;if(o){var r=this.getViewportSizeMinusPadding_();i=qo(i,this.getViewportSize_(),[r[0]/2+o[3],r[1]/2+o[0]],e,n)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,i=this.minZoom_||0;if(this.resolutions_){var o=c(this.resolutions_,t,1);i=o,e=this.resolutions_[o],n=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,n=this.zoomFactor_;return i+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=yt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,yt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(F(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))F(!gt(t),25),n=Yo(i=Ii(t,this.getProjection()));else if("Circle"===t.getType()){var i;(n=Yo(i=Ii(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),rt(i))}else{var o=Ti();n=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),o=t.getFlatCoordinates(),r=t.getStride(),s=1/0,a=1/0,l=-1/0,h=-1/0,u=0,c=o.length;u0&&t[1]>0}function Qo(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var $o=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function tr(t){t instanceof we?t.setMapInternal(null):t instanceof xn&&t.getLayers().forEach(tr)}function er(t,e){if(t instanceof we)t.setMapInternal(e);else if(t instanceof xn)for(var n=t.getLayers().getArray(),i=0,o=n.length;i=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement()&&(!l.handleEvent(t)||t.propagationStopped))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,i=n;if(t){var o=t.viewHints;if(o[0]||o[1]){var r=Date.now()-t.time>8;n=r?0:8,i=r?0:2}}e.getTilesLoading()0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!d(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(var i=0,o=e.length;i0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:Wi}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var i="rotate("+n+"rad)";if(this.autoHide_){var o=this.element.classList.contains(Fe);o||0!==n?o&&0!==n&&this.element.classList.remove(Fe):this.element.classList.add(Fe)}this.label_.style.transform=i}this.rotation_=n}},e}(or);const hr=lr;var ur=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const cr=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),target:i.target})||this;var o=void 0!==i.className?i.className:"ol-zoom",r=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInClassName?i.zoomInClassName:o+"-in",a=void 0!==i.zoomOutClassName?i.zoomOutClassName:o+"-out",l=void 0!==i.zoomInLabel?i.zoomInLabel:"+",h=void 0!==i.zoomOutLabel?i.zoomOutLabel:"–",u=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",c=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=u,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(Ut,n.handleClick_.bind(n,r),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=c,f.appendChild("string"==typeof h?document.createTextNode(h):h),f.addEventListener(Ut,n.handleClick_.bind(n,-r),!1);var d=o+" "+Me+" "+ke,g=n.element;return g.className=d,g.appendChild(p),g.appendChild(f),n.duration_=void 0!==i.duration?i.duration:250,n}return ur(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getZoom();if(void 0!==n){var i=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:i,duration:this.duration_,easing:Wi})):e.setZoom(i)}}},e}(or),pr="active";var fr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function dr(t,e,n,i){var o=t.getZoom();if(void 0!==o){var r=t.getConstrainedZoom(o+e),s=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==i?i:250,easing:Wi})}}const gr=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return fr(e,t),e.prototype.getActive=function(){return this.get(pr)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(pr,t)},e.prototype.setMap=function(t){this.map_=t},e}(se);var _r=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const yr=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:250,n}return _r(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==bn.DBLCLICK){var n=t.originalEvent,i=t.map,o=t.coordinate,r=n.shiftKey?-this.delta_:this.delta_;dr(i.getView(),r,o,this.duration_),n.preventDefault(),e=!0}return!e},e}(gr);var vr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function mr(t){for(var e=t.length,n=0,i=0,o=0;o0}}else if(t.type==bn.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==bn.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){t.activePointers&&(this.targetPointers=t.activePointers)},e}(gr);function Cr(t){var e=arguments;return function(t){for(var n=!0,i=0,o=e.length;i0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(xr);var Mr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const kr=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this,{stopDown:_})||this).condition_=i.condition?i.condition:wr,n.lastAngle_=void 0,n.duration_=void 0!==i.duration?i.duration:250,n}return Mr(e,t),e.prototype.handleDragEvent=function(t){if(Pr(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==Bi){var i=e.getSize(),o=t.pixel,r=Math.atan2(i[1]/2-o[1],o[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=r-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=r}}},e.prototype.handleUpEvent=function(t){return!Pr(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!Pr(t)||!br(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(xr);var Lr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Dr=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return Lr(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new Xo([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(h);const jr=Dr;var Br=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gr=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.coordinate=n,o.mapBrowserEvent=i,o}return Br(e,t),e}(jt);const zr=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new jr(i.className||"ol-dragbox"),n.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:br,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return Br(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var i=n[0]-e[0],o=n[1]-e[1];return i*i+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Gr("boxdrag",t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Gr(e?"boxend":"boxcancel",t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Gr("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(xr);var Wr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Nr=function(t){function e(e){var n=this,i=e||{},o=i.condition?i.condition:Tr;return(n=t.call(this,{condition:o,className:i.className||"ol-dragzoom",minArea:i.minArea})||this).duration_=void 0!==i.duration?i.duration:200,n.out_=void 0!==i.out&&i.out,n}return Wr(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var i=e.rotatedExtentForGeometry(n),o=e.getResolutionForExtentInternal(i),r=e.getResolution()/o;(n=n.clone()).scale(r*r)}e.fitInternal(n,{duration:this.duration_,easing:Wi})},e}(zr);var Xr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Yr=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return Sr(t)&&Or(t)},n.condition_=void 0!==i.condition?i.condition:n.defaultCondition_,n.duration_=void 0!==i.duration?i.duration:100,n.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,n}return Xr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Vt){var n=t.originalEvent,i=n.keyCode;if(this.condition_(t)&&(40==i||37==i||39==i||38==i)){var o=t.map.getView(),r=o.getResolution()*this.pixelDelta_,s=0,a=0;40==i?a=-r:37==i?s=-r:39==i?s=r:a=r;var l=[s,a];Ee(l,o.getRotation()),function(t,e,n){var i=t.getCenterInternal();if(i){var o=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:Xi,center:t.getConstrainedCenter(o)})}}(o,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(gr);var Zr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Kr=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:Or,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return Zr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Vt||t.type==qt){var n=t.originalEvent,i=n.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var o=t.map,r=i=="+".charCodeAt(0)?this.delta_:-this.delta_;dr(o.getView(),r,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(gr),Ur=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[n+2]>t;)n-=3;var i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;var o=this.points_[e]-this.points_[n],r=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(r,o),this.initialVelocity_=Math.sqrt(o*o+r*r)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();var Vr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qr="trackpad";const Hr=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,i)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,n.duration_=void 0!==i.duration?i.duration:250,n.timeout_=void 0!==i.timeout?i.timeout:80,n.useAnchor_=void 0===i.useAnchor||i.useAnchor,n.constrainResolution_=void 0!==i.constrainResolution&&i.constrainResolution;var o=i.condition?i.condition:Er;return n.condition_=i.onFocusOnly?Cr(Ar,o):o,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return Vr(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==Jt)return!0;var e,n=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==Jt&&(e=i.deltaY,A&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=S),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?qr:"wheel");var r=n.getView();if(this.mode_===qr&&!r.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(r.getAnimating()&&r.cancelAnimations(),r.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),r.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-yt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),dr(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(gr);var Jr=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Qr=function(t){function e(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=_),(n=t.call(this,o)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==i.threshold?i.threshold:.3,n.duration_=void 0!==i.duration?i.duration:250,n}return Jr(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],o=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var r=o-this.lastAngle_;this.rotationDelta_+=r,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=r}this.lastAngle_=o;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Bi){var l=s.getViewport().getBoundingClientRect(),h=mr(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_),1))},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(xr);var $r=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const ts=function(t){function e(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=_),(n=t.call(this,o)||this).anchor_=null,n.duration_=void 0!==i.duration?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return $r(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],o=n.clientX-i.clientX,r=n.clientY-i.clientY,s=Math.sqrt(o*o+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var h=a.getViewport().getBoundingClientRect(),u=mr(this.targetPointers);u[0]-=h.left,u[1]-=h.top,this.anchor_=a.getCoordinateFromPixelInternal(u),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(xr);var es=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ns=function(t){function e(e){return(e=Gt({},e)).controls||(e.controls=function(t){var e={},n=new _n;return(void 0===e.zoom||e.zoom)&&n.push(new cr(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new hr(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new sr(e.attributionOptions)),n}()),e.interactions||(e.interactions=function(t){var e={onFocusOnly:!0}||{},n=new _n,i=new Ur(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new kr),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new yr({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new Fr({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new Qr),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new ts({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new Yr),n.push(new Kr({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new Hr({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new Nr({duration:e.zoomDuration})),n}()),t.call(this,e)||this}return es(e,t),e.prototype.createRenderer=function(){return new un(this)},e}(nr);const is=ns;var os=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rs=function(t){function e(e){var n=t.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;n.setGeometry(i)}else{var o=e;n.setProperties(o)}return n}return os(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(te(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=Qt(t,Zt,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){var e,n;this.style_=t,this.styleFunction_=t?"function"==typeof(e=t)?e:(Array.isArray(e)?n=e:(F("function"==typeof e.getZIndex,41),n=[e]),function(){return n}):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(se);const ss=rs;var as=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function ls(t){for(var e=[],n=0,i=t.length;n>1)],e))<0?s=i+1:(a=i,l=!o);return l?s:~s}(d,v);m<0?(l=(v-d[-m-2])/(d[-m-1]-d[-m-2]),a=e+(-m-2)*i):a=e+m*i}var x=s>1?s:2,C=r||new Array(x);for(g=0;g>1;o=e[0]||t[1]<=e[1]&&t[3]>=e[1]||et(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],i=t.slice();i[e]=i[0]+n;for(var o=1;oc&&(this.instructions.push([ra.CUSTOM,c,r,t,n,yo]),this.hitDetectionInstructions.push([ra.CUSTOM,c,r,t,i||n,yo]));break;case"Point":o=t.getFlatCoordinates(),this.coordinates.push(o[0],o[1]),r=this.coordinates.length,this.instructions.push([ra.CUSTOM,c,r,t,n]),this.hitDetectionInstructions.push([ra.CUSTOM,c,r,t,i||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[ra.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[ra.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,i,o=e.length,r=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[ra.SET_FILL_STYLE,e];return"string"!=typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[ra.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,i=t.lineCap,o=t.lineDash,r=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||o!=t.currentLineDash&&!d(t.currentLineDash,o)||t.currentLineDashOffset!=r||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=o,t.currentLineDashOffset=r,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[ra.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=W(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;z(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(sa);const ha=la;var ua=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const ca=function(t){function e(e,n,i,o){var r=t.call(this,e,n,i,o)||this;return r.hitDetectionImage_=null,r.image_=null,r.imagePixelRatio_=void 0,r.anchorX_=void 0,r.anchorY_=void 0,r.height_=void 0,r.opacity_=void 0,r.originX_=void 0,r.originY_=void 0,r.rotateWithView_=void 0,r.rotation_=void 0,r.scale_=void 0,r.width_=void 0,r.declutterMode_=void 0,r.declutterImageWithText_=void 0,r}return ua(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),o=this.coordinates.length,r=this.appendFlatPointCoordinates(n,i);this.instructions.push([ra.DRAW_IMAGE,o,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ra.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),o=this.coordinates.length,r=this.appendFlatPointCoordinates(n,i);this.instructions.push([ra.DRAW_IMAGE,o,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ra.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),i=t.getSize(),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e},e}(ha);var pa=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const fa=function(t){function e(e,n,i,o){return t.call(this,e,n,i,o)||this}return pa(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,i){var o=this.coordinates.length,r=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),s=[ra.MOVE_TO_LINE_TO,o,r];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,i=n.strokeStyle,o=n.lineWidth;if(void 0!==i&&void 0!==o){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([ra.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ke,0],ia);var r=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(r,0,r.length,s),this.hitDetectionInstructions.push(na),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,i=n.strokeStyle,o=n.lineWidth;if(void 0!==i&&void 0!==o){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([ra.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],ia);for(var r=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,u=r.length;ht&&(y>_&&(_=y,d=v,g=r),y=0,v=r-o)),s=a,u=p,c=f),l=m,h=x}return(y+=a)>_?[v,r]:[d,g]}var va=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ma={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},xa=function(t){function e(e,n,i,o){var r=t.call(this,e,n,i,o)||this;return r.labels_=null,r.text_="",r.textOffsetX_=0,r.textOffsetY_=0,r.textRotateWithView_=void 0,r.textRotation_=0,r.textFillState_=null,r.fillStates={},r.textStrokeState_=null,r.strokeStates={},r.textState_={},r.textStates={},r.textKey_="",r.fillKey_="",r.strokeKey_="",r.declutterImageWithText_=void 0,r}return va(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var n=this.textFillState_,i=this.textStrokeState_,o=this.textState_;if(""!==this.text_&&o&&(n||i)){var r=this.coordinates,s=r.length,a=t.getType(),l=null,h=t.getStride();if("line"!==o.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){var u=o.overflow?null:[];switch(a){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),h=2;break;case"Polygon":l=t.getFlatInteriorPoint(),o.overflow||u.push(l[2]/this.resolution),h=3;break;case"MultiPolygon":var c=t.getFlatInteriorPoints();for(l=[],w=0,A=c.length;wO[2]}else b=x>S;var P,R=Math.PI,I=[],F=w+i===e;if(_=0,y=A,p=t[e=w],f=t[e+1],F){v(),P=Math.atan2(f-g,p-d),b&&(P+=P>0?-R:R);var M=(S+x)/2,k=(T+C)/2;return I[0]=[M,k,(E-r)/2,P,o],I}for(var L=0,D=(o=o.replace(/\n/g," ")).length;L0?-R:R),void 0!==P){var B=j-P;if(B+=B>R?-2*R:B<-R?2*R:0,Math.abs(B)>s)return null}P=j;for(var G=L,z=0;L0&&t.push("\n",""),t.push(e,""),t}var za=function(){function t(t,e,n,i){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,i){var o=t+e+n+i;if(this.labels_[o])return this.labels_[o];var r=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],u=Array.isArray(t),c=a.justify?ma[a.justify]:Ba(Array.isArray(t)?t[0]:t,a.textAlign||qe),p=i&&r.lineWidth?r.lineWidth:0,f=u?t:t.split("\n").reduce(Ga,[]),d=function(t,e){for(var n=[],i=[],o=[],r=0,s=0,a=0,l=0,h=0,u=e.length;h<=u;h+=2){var c=e[h];if("\n"!==c&&h!==u){var p=e[h+1]||t.font,f=an(p,c);n.push(f),s+=f;var d=rn(p);i.push(d),l=Math.max(l,d)}else r=Math.max(r,s),o.push(s),s=0,a+=l}return{width:r,height:a,widths:n,heights:i,lineWidths:o}}(a,f),g=d.width,_=d.height,y=d.widths,v=d.heights,m=d.lineWidths,x=g+p,C=[],w=(x+2)*h[0],A=(_+p)*h[1],E={width:w<0?Math.floor(w):Math.ceil(w),height:A<0?Math.floor(A):Math.ceil(A),contextInstructions:C};1==h[0]&&1==h[1]||C.push("scale",h),i&&(C.push("strokeStyle",r.strokeStyle),C.push("lineWidth",p),C.push("lineCap",r.lineCap),C.push("lineJoin",r.lineJoin),C.push("miterLimit",r.miterLimit),(T?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(C.push("setLineDash",[r.lineDash]),C.push("lineDashOffset",r.lineDashOffset))),n&&C.push("fillStyle",s.fillStyle),C.push("textBaseline","middle"),C.push("textAlign","center");for(var b,S=.5-c,O=c*x+S*p,P=[],R=[],I=0,F=0,M=0,k=0,L=0,D=f.length;Lt?t-l:o,x=r+h>e?e-h:r,C=f[3]+m*c[0]+f[1],w=f[0]+x*c[1]+f[2],A=y-f[3],E=v-f[0];return(d||0!==u)&&(Fa[0]=A,La[0]=A,Fa[1]=E,Ma[1]=E,Ma[0]=A+C,ka[0]=Ma[0],ka[1]=E+w,La[1]=ka[1]),0!==u?(k(_=L([1,0,0,1,0,0],n,i,1,1,u,-n,-i),Fa),k(_,Ma),k(_,ka),k(_,La),U(Math.min(Fa[0],Ma[0],ka[0],La[0]),Math.min(Fa[1],Ma[1],ka[1],La[1]),Math.max(Fa[0],Ma[0],ka[0],La[0]),Math.max(Fa[1],Ma[1],ka[1],La[1]),Ia)):U(Math.min(A,A+C),Math.min(E,E+w),Math.max(A,A+C),Math.max(E,E+w),Ia),p&&(y=Math.round(y),v=Math.round(v)),{drawImageX:y,drawImageY:v,drawImageW:m,drawImageH:x,originX:l,originY:h,declutterBox:{minX:Ia[0],minY:Ia[1],maxX:Ia[2],maxY:Ia[3],value:g},canvasTransform:_,scale:c}},t.prototype.replayImageOrLabel_=function(t,e,n,i,o,r,s){var a=!(!r&&!s),l=i.declutterBox,h=t.canvas,u=s?s[2]*i.scale[0]/2:0;return l.minX-u<=h.width/e&&l.maxX+u>=0&&l.minY-u<=h.height/e&&l.maxY+u>=0&&(a&&this.replayTextBackground_(t,Fa,Ma,ka,La,r,s),function(t,e,n,i,o,r,s,a,l,h,u){t.save(),1!==n&&(t.globalAlpha*=n),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,h),t.scale(u[0],u[1]),function(t,e){for(var n=t.contextInstructions,i=0,o=n.length;iG&&(this.fill_(t),I=0),F>G&&(t.stroke(),F=0),I||F||(t.beginPath(),g=NaN,_=NaN),++O;break;case ra.CIRCLE:var W=l[R=z[1]],N=l[R+1],X=l[R+2]-W,Y=l[R+3]-N,Z=Math.sqrt(X*X+Y*Y);t.moveTo(W+Z,N),t.arc(W,N,Z,0,2*Math.PI,!0),++O;break;case ra.CLOSE_PATH:t.closePath(),++O;break;case ra.CUSTOM:R=z[1],c=z[2];var K=z[3],U=z[4],V=6==z.length?z[5]:void 0;B.geometry=K,B.feature=E,O in L||(L[O]=[]);var q=L[O];V?V(l,R,c,2,q):(q[0]=l[R],q[1]=l[R+1],q.length=2),U(q,B),++O;break;case ra.DRAW_IMAGE:R=z[1],c=z[2],m=z[3],p=z[4],f=z[5];var H=z[6],J=z[7],Q=z[8],$=z[9],tt=z[10],et=z[11],nt=z[12],it=z[13],ot=z[14],rt=z[15];if(!m&&z.length>=20){x=z[19],C=z[20],w=z[21],A=z[22];var st=this.drawLabelWithPointPlacement_(x,C,w,A);m=st.label,z[3]=m;var at=z[23];p=(st.anchorX-at)*this.pixelRatio,z[4]=p;var lt=z[24];f=(st.anchorY-lt)*this.pixelRatio,z[5]=f,H=m.height,z[6]=H,it=m.width,z[13]=it}var ht=void 0;z.length>25&&(ht=z[25]);var ut=void 0,ct=void 0,pt=void 0;z.length>17?(ut=z[16],ct=z[17],pt=z[18]):(ut=Je,ct=!1,pt=!1),tt&&j?et+=D:tt||j||(et-=D);for(var ft=0;Rn)break;var a=i[s];a||(a=[],i[s]=a),a.push(4*((t+o)*e+(t+r))+3),o>0&&a.push(4*((t-o)*e+(t+r))+3),r>0&&(a.push(4*((t+o)*e+(t-r))+3),o>0&&a.push(4*((t-o)*e+(t-r))+3))}for(var l=[],h=(o=0,i.length);o0){if(!r||"Image"!==p&&"Text"!==p||-1!==r.indexOf(t)){var h=(f[a]-3)/4,u=i-h%s,d=i-(h/s|0),g=o(t,e,u*u+d*d);if(g)return g}c.clearRect(0,0,s,s);break}}var g,_,y,v,m,x=Object.keys(this.executorsByZIndex_).map(Number);for(x.sort(u),g=x.length-1;g>=0;--g){var C=x[g].toString();for(y=this.executorsByZIndex_[C],_=Na.length-1;_>=0;--_)if(void 0!==(v=y[p=Na[_]])&&(m=v.executeHitDetection(c,a,n,d,h)))return m}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],i=e[1],o=e[2],r=e[3],s=[n,i,n,r,o,r,o,i];return Ui(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return Nt(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,i,o,r,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(u),this.maxExtent_&&(t.save(),this.clip(t,n));var l,h,c,p,f,d,g=r||Na;for(s&&a.reverse(),l=0,h=a.length;l0,6);var u=void 0!==i.src?0:2;return n.color_=void 0!==i.color?Ft(i.color):null,n.iconImage_=function(t,e,n,i,o,r){var s=Dt.get(e,i,r);return s||(s=new al(t,e,n,i,o,r),Dt.set(e,i,r,s)),s}(l,h,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,u,n.color_),n.offset_=void 0!==i.offset?i.offset:[0,0],n.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:$a,n.origin_=null,n.size_=void 0!==i.size?i.size:null,n}return ll(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==qa||this.anchorYUnits_==qa){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==qa&&(t[0]*=e[0]),this.anchorYUnits_==qa&&(t[1]*=e[1])}if(this.anchorOrigin_!=$a){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=tl&&this.anchorOrigin_!=Qa||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Ja&&this.anchorOrigin_!=Qa||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=$a){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=tl&&this.offsetOrigin_!=Qa||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=Ja&&this.offsetOrigin_!=Qa||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(Zt,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(Zt,t)},e}(Bs);var ul=.5,cl={Point:function(t,e,n,i,o){var r,s=n.getImage(),a=n.getText();if(s){if(2!=s.getImageState())return;var l=t;if(o){var h=s.getDeclutterMode();if("none"!==h)if(l=o,"obstacle"===h){var u=t.getBuilder(n.getZIndex(),"Image");u.setImageStyle(s,r),u.drawPoint(e,i)}else a&&a.getText()&&(r={})}var c=l.getBuilder(n.getZIndex(),"Image");c.setImageStyle(s,r),c.drawPoint(e,i)}if(a&&a.getText()){var p=t;o&&(p=o);var f=p.getBuilder(n.getZIndex(),"Text");f.setTextStyle(a,r),f.drawText(e,i)}},LineString:function(t,e,n,i,o){var r=n.getStroke();if(r){var s=t.getBuilder(n.getZIndex(),"LineString");s.setFillStrokeStyle(null,r),s.drawLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(o||t).getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i)}},Polygon:function(t,e,n,i,o){var r=n.getFill(),s=n.getStroke();if(r||s){var a=t.getBuilder(n.getZIndex(),"Polygon");a.setFillStrokeStyle(r,s),a.drawPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var h=(o||t).getBuilder(n.getZIndex(),"Text");h.setTextStyle(l),h.drawText(e,i)}},MultiPoint:function(t,e,n,i,o){var r,s=n.getImage(),a=n.getText();if(s){if(2!=s.getImageState())return;var l=t;if(o){var h=s.getDeclutterMode();if("none"!==h)if(l=o,"obstacle"===h){var u=t.getBuilder(n.getZIndex(),"Image");u.setImageStyle(s,r),u.drawMultiPoint(e,i)}else a&&a.getText()&&(r={})}var c=l.getBuilder(n.getZIndex(),"Image");c.setImageStyle(s,r),c.drawMultiPoint(e,i)}if(a&&a.getText()){var p=t;o&&(p=o);var f=p.getBuilder(n.getZIndex(),"Text");f.setTextStyle(a,r),f.drawText(e,i)}},MultiLineString:function(t,e,n,i,o){var r=n.getStroke();if(r){var s=t.getBuilder(n.getZIndex(),"LineString");s.setFillStrokeStyle(null,r),s.drawMultiLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(o||t).getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i)}},MultiPolygon:function(t,e,n,i,o){var r=n.getFill(),s=n.getStroke();if(s||r){var a=t.getBuilder(n.getZIndex(),"Polygon");a.setFillStrokeStyle(r,s),a.drawMultiPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var h=(o||t).getBuilder(n.getZIndex(),"Text");h.setTextStyle(l),h.drawText(e,i)}},GeometryCollection:function(t,e,n,i,o){var r,s,a=e.getGeometriesArray();for(r=0,s=a.length;rd[2];)v=_*++y,h.push(this.getRenderTransform(i,o,r,ul,c,p,v).slice()),g-=_}this.hitDetectionImageData_=function(t,e,n,i,o,r,s){var a=Ge(t[0]*ul,t[1]*ul);a.imageSmoothingEnabled=!1;for(var l=a.canvas,h=new Va(a,ul,o,null,s),c=n.length,p=Math.floor(16777215/c),f={},d=1;d<=c;++d){var g=n[d-1],_=g.getStyleFunction()||i;if(i){var y=_(g,r);if(y){Array.isArray(y)||(y=[y]);for(var v="#"+("000000"+(d*p).toString(16)).slice(-6),m=0,x=y.length;mx[0]&&A[2]>x[2]&&m.push([A[0]-C,A[1],A[2]-C,A[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==p&&this.renderedRenderOrder_==g&&Y(this.wrappedRenderedExtent_,y))return d(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var E,b=new wa(fl(u,c),y,u,c);this.getLayer().getDeclutter()&&(E=new wa(fl(u,c),y,u,c));var S,T=Ti();if(T){for(var O=0,P=m.length;O=200&&a.status<300){var i=e.getType(),l=void 0;"json"==i||"text"==i?l=a.responseText:"xml"==i?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):"arraybuffer"==i&&(l=a.response),l?r(e.readFeatures(l,{extent:n,featureProjection:o}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,i,o,(function(t,e){a.addFeatures(t),void 0!==r&&r(t)}),s||y)}}var Pl=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Rl=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.feature=n,o.features=i,o}return Pl(e,t),e}(jt);const Il=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===i.wrapX||i.wrapX})||this).on,n.once,n.un,n.loader_=y,n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&(F(n.format_,7),n.loader_=Ol(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:Tl;var o,r,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=s?new Cl:null,n.loadedExtentsRtree_=new Cl,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?r=i.features:i.features&&(r=(o=i.features).getArray()),s||void 0!==o||(o=new _n(r)),void 0!==r&&n.addFeaturesInternal(r),void 0!==o&&n.bindFeaturesCollection_(o),n}return Pl(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=x(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Rl(bl,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[Qt(e,Zt,this.handleFeatureChange_,this),Qt(e,Bt,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,i=e.getId();return void 0!==i&&(i.toString()in this.idIndex_?n=!1:this.idIndex_[i.toString()]=e),n&&(F(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],i=[],o=0,r=t.length;oi)return[[n[0],t[1],n[2],t[3]]];if(t[0]n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-i,t[3]]]}return[t]}(t,e);return[].concat.apply([],i.map((function(t){return n.featuresRtree_.getInExtent(t)})))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var n=t[0],i=t[1],o=null,r=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||g;return this.featuresRtree_.forEachInExtent(a,(function(t){if(l(t)){var e=t.getGeometry(),h=s;if((s=e.closestPointXY(n,i,r,s))0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if(H(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=x(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=x(t),n=this.featureChangeKeys_[e];if(n){n.forEach(te),delete this.featureChangeKeys_[e];var i=t.getId();return void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Rl(Sl,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){F(this.format_,7),this.url_=t,this.setLoader(Ol(t,this.format_))},e}(El);var Fl=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ml="Point",kl="LineString",Ll="Polygon",Dl="Circle",jl="drawstart",Bl=function(t){function e(e,n){var i=t.call(this,e)||this;return i.feature=n,i}return Fl(e,t),e}(jt),Gl=function(t){function e(e){var n=this,i=e;i.stopDown||(i.stopDown=_),(n=t.call(this,i)||this).on,n.once,n.un,n.shouldHandle_=!1,n.downPx_=null,n.downTimeout_,n.lastDragTime_,n.pointerType_,n.freehand_=!1,n.source_=e.source?e.source:null,n.features_=e.features?e.features:null,n.snapTolerance_=e.snapTolerance?e.snapTolerance:12,n.type_=e.type,n.mode_=function(t){switch(t){case"Point":case"MultiPoint":return Ml;case"LineString":case"MultiLineString":return kl;case"Polygon":case"MultiPolygon":return Ll;case"Circle":return Dl;default:throw new Error("Invalid type: "+t)}}(n.type_),n.stopClick_=!!e.stopClick,n.minPoints_=e.minPoints?e.minPoints:n.mode_===Ll?3:2,n.maxPoints_=n.mode_===Dl?2:e.maxPoints?e.maxPoints:1/0,n.finishCondition_=e.finishCondition?e.finishCondition:g,n.geometryLayout_=e.geometryLayout?e.geometryLayout:Yi;var o,r=e.geometryFunction;if(!r){var s,a=n.mode_;a===Dl?r=function(t,e,n){var i,o,r,s,a=e||new Ds([NaN,NaN]),l=Pi(t[0]),h=(i=l,o=Pi(t[t.length-1]),r=i[0]-o[0],s=i[1]-o[1],r*r+s*s);a.setCenterAndRadius(l,Math.sqrt(h),this.geometryLayout_);var u=Ti();return u&&a.transform(n,u),a}:(a===Ml?s=To:a===kl?s=xs:a===Ll&&(s=Xo),r=function(t,e,n){return e?a===Ll?t[0].length?e.setCoordinates([t[0].concat([t[0][0]])],this.geometryLayout_):e.setCoordinates([],this.geometryLayout_):e.setCoordinates(t,this.geometryLayout_):e=new s(t,this.geometryLayout_),e})}return n.geometryFunction_=r,n.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,n.finishCoordinate_=null,n.sketchFeature_=null,n.sketchPoint_=null,n.sketchCoords_=null,n.sketchLine_=null,n.sketchLineCoords_=null,n.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,n.overlay_=new xl({source:new Il({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(o=qs(),function(t,e){return o[t.getGeometry().getType()]}),updateWhileInteracting:!0}),n.geometryName_=e.geometryName,n.condition_=e.condition?e.condition:Sr,n.freehandCondition_,e.freehand?n.freehandCondition_=Er:n.freehandCondition_=e.freehandCondition?e.freehandCondition:Tr,n.addChangeListener(pr,n.updateState_),n}return Fl(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===Kt&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!==Ml&&this.freehandCondition_(e);var n=e.type===bn.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===bn.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===bn.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===bn.POINTERDOWN?i=!1:n&&this.getPointerCount()<2?(i=e.type===bn.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===bn.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===bn.DBLCLICK&&(i=!1),t.prototype.handleEvent.call(this,e)&&i},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new En(bn.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():this.freehand_||n&&this.mode_!==Ml||(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,n=t.pixel,i=e[0]-n[0],o=e[1]-n[1],r=i*i+o*o;if(this.shouldHandle_=this.freehand_?r>this.squaredClickTolerance_:r<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var n=!1,i=[this.finishCoordinate_],o=this.mode_;if(o===Ml)e=!0;else if(o===Dl)e=2===this.sketchCoords_.length;else if(o===kl)n=this.sketchCoords_.length>this.minPoints_;else if(o===Ll){var r=this.sketchCoords_;n=r[0].length>this.minPoints_,i=[r[0][0],r[0][r[0].length-2]]}if(n)for(var s=this.getMap(),a=0,l=i.length;a=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(t.slice()),this.geometryFunction_(n,i,o)):r===Ll&&((n=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(t.slice()),e&&(this.finishCoordinate_=n[0]),this.geometryFunction_(this.sketchCoords_,i,o)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),i=this.mode_;if(i===kl||i===Dl){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var o=this.finishCoordinate_.slice();t[t.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(t,e,n),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(i===Ll){(t=this.sketchCoords_[0]).splice(-2,1);var r=this.sketchLine_.getGeometry();t.length>=2&&(o=t[t.length-2].slice(),t[t.length-1]=o,this.createOrUpdateSketchPoint_(o)),r.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,n)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,n=t.getGeometry(),i=this.getMap().getView().getProjection();this.mode_===kl?(e.pop(),this.geometryFunction_(e,n,i)):this.mode_===Ll&&(e[0].pop(),this.geometryFunction_(e,n,i),e=n.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new Ss([e])):"MultiLineString"===this.type_?t.setGeometry(new As([e])):"MultiPolygon"===this.type_&&t.setGeometry(new Ps([e])),this.dispatchEvent(new Bl("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Bl("drawabort",t))},e.prototype.appendCoordinates=function(t){var e,n=this.mode_,i=!this.sketchFeature_;if(i&&this.startDrawing_(t[0]),n===kl||n===Dl)e=this.sketchCoords_;else{if(n!==Ll)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&e.shift(),e.pop();for(var o=0;ot)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){v()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var i=e-n+1e3/60;return i>=this.transition_?1:zi(i/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(Yt);var Ul=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Vl=function(t){function e(e,n,i,o,r,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=o,a.src_=i,a.key=i,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.tileLoadFunction_=r,a}return Ul(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=3,this.unlistenImage_(),this.image_=((t=Ge(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4,this.unlistenImage_(),this.changed()},e.prototype.load=function(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=ol(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Kl);const ql=function(){function t(t,e,n,i,o,r){this.sourceProj_=t,this.targetProj_=e;var s={},a=Ci(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=i,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&ft(i)==ft(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ft(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ft(this.targetProj_.getExtent()):null;var l=ct(n),h=pt(n),u=ot(n),c=it(n),p=this.transformInv_(l),f=this.transformInv_(h),d=this.transformInv_(u),g=this.transformInv_(c),_=10+(r?Math.max(0,Math.ceil(mt(nt(n)/(r*r*256*256)))):0);if(this.addQuad_(l,h,u,c,p,f,d,g,_),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach((function(t,e,n){y=Math.min(y,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-y>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-y>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-y>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-y>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n.5&&u<1,f=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(f=ft(G([t,e,n,i]))/this.targetWorldWidth_>.25||f),!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)),!(!f&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||dt(h,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(o[0])&&isFinite(o[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(d=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(l>0){if(!f){var g=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(g),y=void 0;y=p?(At(o[0],c)+At(s[0],c))/2-At(_[0],c):(o[0]+s[0])/2-_[0];var v=(o[1]+s[1])/2-_[1];f=y*y+v*v>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var m=[(e[0]+n[0])/2,(e[1]+n[1])/2],x=this.transformInv_(m),C=[(i[0]+t[0])/2,(i[1]+t[1])/2],w=this.transformInv_(C);this.addQuad_(t,e,m,C,o,r,x,w,l-1),this.addQuad_(C,m,n,i,w,x,s,a,l-1)}else{var A=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(A),b=[(n[0]+i[0])/2,(n[1]+i[1])/2],S=this.transformInv_(b);this.addQuad_(t,A,b,i,o,E,S,a,l-1),this.addQuad_(A,e,n,b,E,r,s,S,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,n,i,o,s,a),0==(14&d)&&this.addTriangle_(t,n,e,o,s,r),d&&(0==(13&d)&&this.addTriangle_(e,i,t,r,a,o),0==(7&d)&&this.addTriangle_(e,i,n,r,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,n,i){var o=e.source;Q(t,o[0]),Q(t,o[1]),Q(t,o[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();var Hl,Jl={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Ql={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},$l=[];function th(t,e,n,i,o){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,o),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,o)),t.restore()}function eh(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function nh(t,e,n,i){var o=wi(n,e,t),r=_i(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(r*=s);var a=t.getMetersPerUnit();void 0!==a&&(r/=a);var l=t.getExtent();if(!l||X(l,o)){var h=_i(t,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}var ih=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const oh=function(t){function e(e,n,i,o,r,s,a,l,h,u,c,p){var f=t.call(this,r,0,{interpolate:!!p})||this;f.renderEdges_=void 0!==c&&c,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=o,f.wrappedTileCoord_=s||r,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=o.getTileCoordExtent(f.wrappedTileCoord_),g=f.targetTileGrid_.getExtent(),_=f.sourceTileGrid_.getExtent(),y=g?ut(d,g):d;if(0===nt(y))return f.state=4,f;var v=e.getExtent();v&&(_=_?ut(_,v):v);var m=o.getResolution(f.wrappedTileCoord_[0]),x=function(t,e,n,i){var o=rt(n),r=nh(t,e,o,i);return(!isFinite(r)||r<=0)&&et(n,(function(n){return r=nh(t,e,n,i),isFinite(r)&&r>0})),r}(e,i,y,m);if(!isFinite(x)||x<=0)return f.state=4,f;var C=void 0!==u?u:.5;if(f.triangulation_=new ql(e,i,y,_,x*C,m),0===f.triangulation_.getTriangles().length)return f.state=4,f;f.sourceZ_=n.getZForResolution(x);var w=f.triangulation_.calculateSourceExtent();if(_&&(e.canWrapX()?(w[1]=yt(w[1],_[1],_[3]),w[3]=yt(w[3],_[1],_[3])):w=ut(w,_)),nt(w)){for(var A=n.getTileRangeForExtentAndZ(w,f.sourceZ_),E=A.minX;E<=A.maxX;E++)for(var b=A.minY;b<=A.maxY;b++){var S=h(f.sourceZ_,E,b,a);S&&f.sourceTiles_.push(S)}0===f.sourceTiles_.length&&(f.state=4)}else f.state=4;return f}return ih(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,i){e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=3;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),i="number"==typeof n?n:n[0],o="number"==typeof n?n:n[1],r=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,n,i,o,r,s,a,l,h,u,c){var p=Ge(Math.round(n*t),Math.round(n*e),$l);if(c||Gt(p,Jl),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,n){J(d,t.extent)}));var g=ft(d),_=ht(d),y=Ge(Math.round(n*g/i),Math.round(n*_/i));c||Gt(y,Jl);var v=n/i;l.forEach((function(t,e,n){var i=t.extent[0]-d[0],o=-(t.extent[3]-d[3]),r=ft(t.extent),s=ht(t.extent);t.image.width>0&&t.image.height>0&&y.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,i*v,o*v,r*v,s*v)}));var m=ct(s);return a.getTriangles().forEach((function(t,e,o){var s=t.source,a=t.target,l=s[0][0],h=s[0][1],u=s[1][0],g=s[1][1],_=s[2][0],v=s[2][1],x=f((a[0][0]-m[0])/r),C=f(-(a[0][1]-m[1])/r),w=f((a[1][0]-m[0])/r),A=f(-(a[1][1]-m[1])/r),E=f((a[2][0]-m[0])/r),b=f(-(a[2][1]-m[1])/r),S=l,T=h;l=0,h=0;var O=function(t){for(var e=t.length,n=0;no&&(o=s,i=r)}if(0===o)return null;var a=t[i];t[i]=t[n],t[n]=a;for(var l=n+1;l=0;p--){c[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*c[p]}return c}([[u-=S,g-=T,0,0,w-x],[_-=S,v-=T,0,0,E-x],[0,0,u,g,A-C],[0,0,_,v,b-C]]);if(O){if(p.save(),p.beginPath(),function(){if(void 0===Hl){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",th(t,4,5,4,0),th(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;Hl=eh(e,0)||eh(e,4)||eh(e,8)}return Hl}()||!c){p.moveTo(w,A);for(var P=x-w,R=C-A,I=0;I<4;I++)p.lineTo(w+f((I+1)*P/4),A+f(I*R/3)),3!=I&&p.lineTo(w+f((I+1)*P/4),A+f((I+1)*R/3));p.lineTo(E,b)}else p.moveTo(w,A),p.lineTo(x,C),p.lineTo(E,b);p.clip(),p.transform(O[0],O[2],O[1],O[3],x,C),p.translate(d[0]-S,d[3]-T),p.scale(i/n,-i/n),p.drawImage(y.canvas,0,0),p.restore()}})),u&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,n){var i=t.target,o=(i[0][0]-m[0])/r,s=-(i[0][1]-m[1])/r,a=(i[1][0]-m[0])/r,l=-(i[1][1]-m[1])/r,h=(i[2][0]-m[0])/r,u=-(i[2][1]-m[1])/r;p.beginPath(),p.moveTo(a,l),p.lineTo(o,s),p.lineTo(h,u),p.closePath(),p.stroke()})),p.restore()),p.canvas}(i,o,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),r,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,i){var o=e.getState();if(0==o||1==o){t++;var r=Qt(e,Zt,(function(n){var i=e.getState();2!=i&&3!=i&&4!=i||(te(r),0==--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(r)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){0==t.getState()&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(te),this.sourcesListenerKeys_=null},e.prototype.release=function(){this.canvas_&&(ze(this.canvas_.getContext("2d")),$l.push(this.canvas_),this.canvas_=null),t.prototype.release.call(this)},e}(Kl);var rh=function(){function t(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function sh(t,e,n,i,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=n,o.maxY=i,o):new rh(t,e,n,i)}const ah=rh;var lh=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),hh=function(t){function e(e){var n=t.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=[1/0,1/0,-1/0,-1/0],n.tmpTileRange_=new ah(0,0,0,0),n}return lh(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return 2==n||4==n||3==n&&!i},e.prototype.getTile=function(t,e,n,i){var o=i.pixelRatio,r=i.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,n,o,r);return 3==a.getState()&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(2)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=k(e.pixelToCoordinateTransform,t.slice()),o=n.getExtent();if(o&&!X(o,i))return null;for(var r=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=n.getRenderSource(),h=l.getTileGridForProjection(a.projection),u=l.getTilePixelRatio(e.pixelRatio),c=h.getZForResolution(a.resolution);c>=h.getMinZoom();--c){var p=h.getTileCoordForCoordAndZ(i,c),f=l.getTile(c,p[1],p[2],r,s);if(!(f instanceof Vl||f instanceof oh))return null;if(2===f.getState()){var d=h.getOrigin(c),g=Qo(h.getTileSize(c)),_=h.getResolution(c),y=Math.floor(u*((i[0]-d[0])/_-p[1]*g[0])),v=Math.floor(u*((d[1]-i[1])/_-p[2]*g[1])),m=Math.round(u*l.getGutterForProjection(a.projection));return this.getImageData(f.getImage(),y+m,v+m)}}return null},e.prototype.loadedTileCallback=function(e,n,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,n,i)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],i=t.viewState,o=i.projection,r=i.resolution,s=i.center,a=i.rotation,l=t.pixelRatio,h=this.getLayer(),c=h.getSource(),p=c.getRevision(),f=c.getTileGridForProjection(o),d=f.getZForResolution(r,c.zDirection),g=f.getResolution(d),_=t.extent,y=t.viewState.resolution,v=c.getTilePixelRatio(l),m=Math.round(ft(_)/y*l),C=Math.round(ht(_)/y*l),w=n.extent&&Ii(n.extent);w&&(_=ut(_,Ii(n.extent)));var A=g*m/2/v,E=g*C/2/v,b=[s[0]-A,s[1]-E,s[0]+A,s[1]+E],S=f.getTileRangeForExtentAndZ(_,d),T={};T[d]={};var O=this.createLoadedTileFinder(c,o,T),P=this.tmpExtent,R=this.tmpTileRange_;this.newTiles_=!1;for(var I=a?lt(i.center,y,a,t.size):void 0,F=S.minX;F<=S.maxX;++F)for(var M=S.minY;M<=S.maxY;++M)if(!a||f.tileCoordIntersectsViewport([d,F,M],I)){var B=this.getTile(d,F,M,t);if(this.isDrawableTile(B)){var G=x(this);if(2==B.getState()&&(T[d][B.tileCoord.toString()]=B,(gt=B.inTransition(G))&&1!==n.opacity&&(B.endTransition(G),gt=!1),this.newTiles_||!gt&&-1!==this.renderedTiles.indexOf(B)||(this.newTiles_=!0)),1===B.getAlpha(G,t.time))continue}var z=f.getTileCoordChildTileRange(B.tileCoord,R,P),W=!1;z&&(W=O(d+1,z)),W||f.forEachTileCoordParentTileRange(B.tileCoord,O,R,P)}var N=g/r*l/v;L(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,a,-m/2,-C/2);var X=j(this.pixelTransform);this.useContainer(e,X,this.getBackground(t));var Y=this.context,Z=Y.canvas;D(this.inversePixelTransform,this.pixelTransform),L(this.tempTransform,m/2,C/2,N,N,0,-m/2,-C/2),Z.width!=m||Z.height!=C?(Z.width=m,Z.height=C):this.containerReused||Y.clearRect(0,0,m,C),w&&this.clipUnrotated(Y,t,w),c.getInterpolate()||Gt(Y,Jl),this.preRender(Y,t),this.renderedTiles.length=0;var K,U,V,q=Object.keys(T).map(Number);q.sort(u),1!==n.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(K=[],U=[]):q=q.reverse();for(var J=q.length-1;J>=0;--J){var Q=q[J],$=c.getTilePixelSize(Q,l,o),tt=f.getResolution(Q)/g,et=$[0]*tt*N,nt=$[1]*tt*N,it=f.getTileCoordForCoordAndZ(ct(b),Q),ot=f.getTileCoordExtent(it),rt=k(this.tempTransform,[v*(ot[0]-b[0])/g,v*(b[3]-ot[3])/g]),st=v*c.getGutterForProjection(o),at=T[Q];for(var pt in at){var gt,_t=(B=at[pt]).tileCoord,yt=it[1]-_t[1],vt=Math.round(rt[0]-(yt-1)*et),mt=it[2]-_t[2],xt=Math.round(rt[1]-(mt-1)*nt),Ct=vt-(F=Math.round(rt[0]-yt*et)),wt=xt-(M=Math.round(rt[1]-mt*nt)),At=d===Q,Et=!1;if(!(gt=At&&1!==B.getAlpha(x(this),t.time)))if(K){V=[F,M,F+Ct,M,F+Ct,M+wt,F,M+wt];for(var bt=0,St=K.length;bt0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return F(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return F(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){F(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function dh(t,e,n,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function gh(t,e,n){return t+"/"+e+"/"+n}function _h(t){return gh(t[0],t[1],t[2])}var yh=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const vh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yh(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey().split("/").map(Number)[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(_h(e.tileCoord)),e.release())}.bind(this))}},e}(fh);var mh=[0,0,0];const xh=function(){function t(t){var e,n,i;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,F((e=this.resolutions_,!0,n=function(t,e){return e-t}||u,e.every((function(t,i){if(0===i)return!0;var o=n(e[i-1],t);return!(o>0||0===o)}))),17),!t.origins)for(var o=0,r=this.resolutions_.length-1;o=this.minZoom;){if(e(a,2===this.zoomFactor_?sh(o=Math.floor(o/2),o,r=Math.floor(r/2),r,n):this.getTileRangeForExtentAndZ(s,a,n)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]this.maxZoom||e0?i:Math.max(s/a[0],r/a[1]),h=o+1,u=new Array(h),c=0;cn||n>e.getMaxZoom())return!1;var r=e.getFullTileRange(n);return!r||r.containsXY(i,o)}(t,i)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,i){},e}(El),Sh=function(t){function e(e,n){var i=t.call(this,e)||this;return i.tile=n,i}return Eh(e,t),e}(jt);const Th=bh;function Oh(t,e){var n=/\{z\}/g,i=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(i,s[1].toString()).replace(o,s[2].toString()).replace(r,(function(){var t=s[0],n=e.getFullTileRange(t);return F(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}var Ph=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Rh=function(t){function e(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return i.generateTileUrlFunction_=i.tileUrlFunction===e.prototype.tileUrlFunction,i.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(i.tileUrlFunction=n.tileUrlFunction),i.urls=null,n.urls?i.setUrls(n.urls):n.url&&i.setUrl(n.url),i.tileLoadingKeys_={},i}return Ph(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,i=x(n),o=n.getState();1==o?(this.tileLoadingKeys_[i]=!0,e="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=3==o?"tileloaderror":2==o?"tileloadend":void 0),null!=e&&this.dispatchEvent(new Sh(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var i=n[1].charCodeAt(0),o=n[2].charCodeAt(0),r=void 0;for(r=i;r<=o;++r)e.push(t.replace(n[0],String.fromCharCode(r)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(n[2],10),a=parseInt(n[1],10);a<=s;a++)e.push(t.replace(n[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){for(var n=t.length,i=new Array(n),o=0;oOpenStreetMap contributors.'];var r=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",s=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:r,interpolate:o,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,opaque:void 0===i.opaque||i.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:s,wrapX:i.wrapX,zDirection:i.zDirection})||this}return jh(e,t),e}(Dh);function Gh(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e))?i:String(i))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const zh={dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"};var Wh=s(327);function Nh({value:t}){return(0,o.jsx)(Wh.WidgetPreviewContainer,null,t?t.toString():null)}Nh.propTypes={value:i().string};const Xh=Nh,Yh={properties:{decimals:{type:"integer"},type:{type:"string",enum:["Point","LineString","Polygon"]}}};function Zh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}const Kh=function({getFormat:t,getMap:n}={}){var r;return Gh(r=class extends e().Component{constructor(t){super(t),this.mapContainer=e().createRef(),this.resizeObserver=null}componentDidMount(){const{field:e,onChange:i,value:o}=this.props,r=t?t(e):new Ms(zh),s=o?[r.readFeature(o)]:[],a=new Il({features:s,wrapX:!1}),l=new xl({source:a}),h=this.mapContainer.current,u=n?n(h,l):function(t,e){return new is({target:t,layers:[new ph({source:new Bh}),e],view:new Ho({center:[0,0],zoom:2})})}(h,l);s.length>0&&u.getView().fit(a.getExtent(),{maxZoom:16,padding:[80,80,80,80]});const c=new zl({source:a,type:e.get("type","Point")});u.addInteraction(c);const p={decimals:e.get("decimals",7)};c.on("drawend",(({feature:t})=>{a.clear(),i(r.writeGeometry(t.getGeometry(),p))})),this.resizeObserver=new ResizeObserver((()=>{u.updateSize()})),this.resizeObserver.observe(h)}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}render(){const{height:t}=this.props;return(0,o.jsx)(o.ClassNames,null,(({cx:e,css:n})=>(0,o.jsx)("div",{className:e(this.props.classNameWrapper,n` ${l()}; padding: 0; overflow: hidden; height: ${t}; `),ref:this.mapContainer})))}},"propTypes",{onChange:i().func.isRequired,field:i().object.isRequired,height:i().string,value:i().node}),Gh(r,"defaultProps",{value:"",height:"400px"}),r}(),Uh={Widget:function(t={}){return function(t){for(var e=1;e