vendor: 6,421 bytes, line 1
1(()=>{var t={582:function(t){t.exports=function(){"use strict";function t(t,n,s,o,r){!function t(i,n,s,o,r){for(;o>s;){if(o-s>600){var a=o-s+1,l=n-s+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-l*c/a+u)),Math.min(o,Math.floor(n+(a-l)*c/a+u)),r)}var d=i[n],g=s,_=o;for(e(i,s,n),r(i[o],d)>0&&e(i,s,o);g<_;){for(e(i,g,_),g++,_--;r(i[g],d)<0;)g++;for(;r(i[_],d)>0;)_--}0===r(i[s],d)?e(i,s,_):e(i,++_,o),_<=n&&(s=_+1),n<=_&&(o=_-1)}}(t,n,s||0,o||t.length-1,r||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){r(t,0,t.children.length,e,t)}function r(t,e,i,n,s){s||(s=_(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var o=e;o<i;o++){var r=t.children[o];a(s,t.leaf?n(r):r)}return s}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,s,o){for(var r=[i,n];r.length;)if(!((n=r.pop())-(i=r.pop())<=s)){var a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,o),r.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var o=0;o<e.children.length;o++){var r=e.children[o],a=e.leaf?n(r):r;g(t,a)&&(e.leaf?i.push(r):d(t,a)?this._all(r,i):s.push(r))}e=s.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!g(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var s=e.children[n],o=e.leaf?this.toBBox(s):s;if(g(t,o)){if(e.leaf||d(t,o))return!0;i.push(s)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=_([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,o,r=this.data,a=this.toBBox(t),l=[],h=[];r||l.length;){if(r||(r=l.pop(),n=l[l.length-1],i=h.pop(),o=!0),r.leaf){var c=s(t,r.children,e);if(-1!==c)return r.children.splice(c,1),l.push(r),this._condense(l),this}o||r.leaf||!d(r,a)?n?(i++,r=n.children[i],o=!1):r=null:(l.push(r),h.push(i),i=0,n=r,r=r.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var s,r=i-e+1,a=this._maxEntries;if(r<=a)return o(s=_(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,n-1))),(s=_([])).leaf=!1,s.height=n;var l=Math.ceil(r/a),h=l*Math.ceil(Math.sqrt(a));f(t,e,i,h,this.compareMinX);for(var c=e;c<=i;c+=h){var u=Math.min(c+h-1,i);f(t,c,u,l,this.compareMinY);for(var d=c;d<=u;d+=l){var g=Math.min(d+l-1,u);s.children.push(this._build(t,d,g,n-1))}}return o(s,this.toBBox),s},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var s=1/0,o=1/0,r=void 0,a=0;a<e.children.length;a++){var l=e.children[a],h=c(l),u=(d=t,g=l,(Math.max(g.maxX,d.maxX)-Math.min(g.minX,d.minX))*(Math.max(g.maxY,d.maxY)-Math.min(g.minY,d.minY))-h);u<o?(o=u,s=h<s?h:s,r=l):u===o&&h<s&&(s=h,r=l)}e=r||e.children[0]}var d,g;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),s=[],o=this._chooseSubtree(n,this.data,e,s);for(o.children.push(t),a(o,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=_(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,o,a,l,h,u,d=1/0,g=1/0,_=e;_<=i-e;_++){var f=r(t,0,_,this.toBBox),m=r(t,_,i,this.toBBox),p=(s=f,o=m,void 0,void 0,void 0,void 0,a=Math.max(s.minX,o.minX),l=Math.max(s.minY,o.minY),h=Math.min(s.maxX,o.maxX),u=Math.min(s.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,u-l)),y=c(f)+c(m);p<d?(d=p,n=_,g=y<g?y:g):p===d&&y<g&&(g=y,n=_)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:l,s=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,o=r(t,0,e,s),l=r(t,i-e,i,s),h=u(o)+u(l),c=e;c<i-e;c++){var d=t.children[c];a(o,t.leaf?s(d):d),h+=u(o)}for(var g=i-e-1;g>=e;g--){var _=t.children[g];a(l,t.leaf?s(_):_),h+=u(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()},491:function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(){var t={808:function(t,e,
1i){var n,s,o;o=function(){function t(){for(var t=0,e={};t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function i(n){function s(){}function o(e,i,o){if("undefined"!=typeof document){"number"==typeof(o=t({path:"/"},s.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var r=JSON.stringify(i);/^[\{\[]/.test(r)&&(i=r)}catch(t){}i=n.write?n.write(i,e):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,!0!==o[l]&&(a+="="+o[l].split(";")[0]));return document.cookie=e+"="+i+a}}function r(t,i){if("undefined"!=typeof document){for(var s={},o=document.cookie?document.cookie.split("; "):[],r=0;r<o.length;r++){var a=o[r].split("="),l=a.slice(1).join("=");i||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var h=e(a[0]);if(l=(n.read||n)(l,h)||e(l),i)try{l=JSON.parse(l)}catch(t){}if(s[h]=l,t===h)break}catch(t){}}return t?s[t]:s}}return s.set=o,s.get=function(t){return r(t,!1)},s.getJSON=function(t){return r(t,!0)},s.remove=function(e,i){o(e,"",t(i,{expires:-1}))},s.defaults={},s.withConverter=i,s}((function(){}))},void 0===(s="function"==typeof(n=o)?n.call(e,i,e,t):n)||(t.exports=s),t.exports=o()},703:function(t,e,i){"use strict";var n=i(414);function s(){}function o(){}o.resetWarningCache=s,t.exports=function(){function t(t,e,i,s,o,r){if(r!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var i={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:s};return i.PropTypes=i,i}},697:function(t,e,i){t.exports=i(703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return function(){"use strict";n.r(s),n.d(s,{Cookies:function(){return l()},OPTIONS:function(){return v},SAME_SITE_OPTIONS:function(){return x},VISIBLE_OPTIONS:function(){return S},default:function(){return T},getCookieConsentValue:function(){return C},resetCookieConsentValue:function(){return w}});const t=i(363);var e=n.n(t),o=n(697),r=n.n(o),a=n(808),l=n.n(a);function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var c=["children"];function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},u.apply(this,arguments)}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function g(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?d(Object(i),!0).forEach((function(e){y(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEac
1h((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function _(t,e){return _=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_(t,e)}function f(t,e){if(e&&("object"===h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function y(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var v={TOP:"top",BOTTOM:"bottom",NONE:"none"},x={STRICT:"strict",LAX:"lax",NONE:"none"},S={HIDDEN:"hidden",SHOW:"show",BY_COOKIE_VALUE:"byCookieValue"},C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,e=l().get(t);return void 0===e?l().get(E(t)):e},w=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I;l().remove(t)},E=function(t){return"".concat(t,"-legacy")},I="CookieConsent",b=function(t){var e=t.condition,i=t.wrapper,n=t.children;return e?i(n):n},R=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(a,t);var i,n,s,o,r=(s=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=p(s);if(o){var i=p(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return f(this,t)});function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),y(m(e=r.call(this,t)),"handleScroll",(function(){var t=e.props.acceptOnScrollPercentage,i=document.documentElement,n=document.body,s="scrollTop",o="scrollHeight";(i[s]||n[s])/((i[o]||n[o])-i.clientHeight)*100>t&&e.accept(!0)})),y(m(e),"removeScrollListener",(function(){e.props.acceptOnScroll&&window.removeEventListener("scroll",e.handleScroll)})),e.state={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},e}return i=a,n=[{key:"componentDidMount",value:function(){var t=this.props.debug;(void 0===this.getCookieValue()||t)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&window.addEventListener("scroll",this.handleScroll,{passive:!0}))}},{key:"componentWillUnmount",value:function(){this.removeScrollListener()}},{key:"accept",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.props,i=e.cookieName,n=e.cookieValue,s=e.hideOnAccept,o=e.onAccept;this.setCookie(i,n),o(null!=t&&t),s&&(this.setState({visible:!1}),this.removeScrollListener())}},{key:"overlayClick",value:function(){var t=this.props,e=t.acceptOnOverlayClick,i=t.onOverlayClick;e&&this.accept(),i()}},{key:"decline",value:function(){var t=this.props,e=t.cookieName,i=t.declineCookieValue,n=t.hideOnDecline,s=t.onDecline;t.setDeclineCookie&&this.setCookie(e,i),s(),n&&this.setState({visible:!1})}},{key:"setCookie",value:function(t,e){var i=this.props,n=i.extraCookieOptions,s=i.expires,o=i.sameSite,r=this.props.cookieSecurity;void 0===r&&(r=!location||"https:"===location.protocol);var a=g(g({expires:s},n),{},{sameSite:o,secure:r});o===x.NONE&&l().set(E(t),e,a),l().set(t,e,a)}},{key:"getCookieValue",value:function(){var t=this.props.cookieName;return C(t)}},{key:"render",value:function(){var t=this;switch(this.props.visible){case S.HIDDEN:return null;case S.BY_COOKIE_VALUE:if(!this.state.visible)return null}var i=this.props,n=i.location,s=i.style,o=i.buttonStyle,r=i.declineButtonStyle,a=i.contentStyle,l=i.disableStyles,h=i.buttonText,c=i.declineButtonText,d=i.containerClasses,_=i.contentClasses,f=i.buttonClasse
1s,m=i.buttonWrapperClasses,p=i.declineButtonClasses,y=i.buttonId,x=i.declineButtonId,C=i.disableButtonStyles,w=i.enableDeclineButton,E=i.flipButtons,I=i.ButtonComponent,R=i.overlay,T=i.overlayClasses,M=i.overlayStyle,L=i.ariaAcceptLabel,O=i.ariaDeclineLabel,k=i.customContainerAttributes,P=i.customContentAttributes,A=i.customButtonProps,D=i.customDeclineButtonProps,F=i.customButtonWrapperAttributes,N={},W={},j={},B={},z={};switch(l?(N=u({},s),W=u({},o),j=u({},r),B=u({},a),z=u({},M)):(N=u({},g(g({},this.state.style),s)),B=u({},g(g({},this.state.contentStyle),a)),z=u({},g(g({},this.state.overlayStyle),M)),C?(W=u({},o),j=u({},r)):(W=u({},g(g({},this.state.buttonStyle),o)),j=u({},g(g({},this.state.declineButtonStyle),r)))),n){case v.TOP:N.top="0";break;case v.BOTTOM:N.bottom="0"}var G=[];return w&&G.push(e().createElement(I,u({key:"declineButton",style:j,className:p,id:x,"aria-label":O,onClick:function(){t.decline()}},D),c)),G.push(e().createElement(I,u({key:"acceptButton",style:W,className:f,id:y,"aria-label":L,onClick:function(){t.accept()}},A),h)),E&&G.reverse(),e().createElement(b,{condition:R,wrapper:function(i){return e().createElement("div",{style:z,className:T,onClick:function(){t.overlayClick()}},i)}},e().createElement("div",u({className:"".concat(d),style:N},k),e().createElement("div",u({style:B,className:_},P),this.props.children),e().createElement("div",u({className:"".concat(m)},F),G.map((function(t){return t})))))}}],n&&function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),a}(t.Component);R.propTypes={location:r().oneOf(Object.keys(v).map((function(t){return v[t]}))),visible:r().oneOf(Object.keys(S).map((function(t){return S[t]}))),sameSite:r().oneOf(Object.keys(x).map((function(t){return x[t]}))),style:r().object,buttonStyle:r().object,declineButtonStyle:r().object,contentStyle:r().object,children:r().any,disableStyles:r().bool,hideOnAccept:r().bool,hideOnDecline:r().bool,onAccept:r().func,onDecline:r().func,buttonText:r().oneOfType([r().string,r().func,r().element]),declineButtonText:r().oneOfType([r().string,r().func,r().element]),cookieName:r().string,cookieValue:r().oneOfType([r().string,r().bool,r().number]),declineCookieValue:r().oneOfType([r().string,r().bool,r().number]),setDeclineCookie:r().bool,debug:r().bool,expires:r().number,containerClasses:r().string,contentClasses:r().string,buttonClasses:r().string,buttonWrapperClasses:r().string,declineButtonClasses:r().string,buttonId:r().string,declineButtonId:r().string,extraCookieOptions:r().object,disableButtonStyles:r().bool,enableDeclineButton:r().bool,flipButtons:r().bool,ButtonComponent:r().elementType,cookieSecurity:r().bool,overlay:r().bool,overlayClasses:r().string,overlayStyle:r().object,onOverlayClick:r().func,acceptOnOverlayClick:r().bool,ariaAcceptLabel:r().string,ariaDeclineLabel:r().string,acceptOnScroll:r().bool,acceptOnScrollPercentage:r().number,customContentAttributes:r().object,customContainerAttributes:r().object,customButtonProps:r().object,customDeclineButtonProps:r().object,customButtonWrapperAttributes:r().object},R.defaultProps={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:v.BOTTOM,visible:S.BY_COOKIE_VALUE,onAccept:function(){},onDecline:function(){},cookieName:I,cookieValue:!0,declineCookieValue:!1,setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:x.LAX,ButtonComponent:function(t){var i=t.children,n=function(t,e){if(null==t)return{};var i,n,s=function(t,e){if(null==t)return{};var i,n,s={},o=Object.keys(t);for(n=0;n<o.length;n++)i=o[n],e.indexOf(i)>=0||(s[i]=t[i]);return s}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)i=o[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(s[i]=t[i])}return s}(t,c);return e().createElement("button",n,i)}
1,overlay:!1,overlayClasses:"",onOverlayClick:function(){},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{}};const T=R}(),s}()},856:function(t){var e;e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="./src/squishMenu.js")}({
1"./src/getItemsWidth.js":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){var e=t.container,i=t.itemClass,n=t.callback,s=0,o=e.querySelectorAll(".".concat(i));return o.length>0?o.forEach((function(t){s+=1.1*t.offsetWidth})):console.warn("No elements with itemClass found in the container"),"function"==typeof n&&n(),s}},
1"./src/squishMenu.js":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,s=(n=i("./src/getItemsWidth.js"))&&n.__esModule?n:{default:n};e.default=function(t){var e=t.itemClass?t.itemClass:"menu-item",i=document.getElementById(t.containerId);if(null==i)console.warn("containerId is undefined");else{var n=(0,s.default)({container:i,itemClass:e,callback:function(){i.classList.add("squish-ready")}}),o=function(){var e=i.offsetWidth;!0===t.debug&&console.log({container:i,itemsWidth:n,containerWidth:e}),t.threshold&&e<=t.threshold?(i.classList.add("below-threshold"),i.classList.add("too-small")):n<=e?(i.classList.remove("below-threshold"),i.classList.remove("too-small"),i.classList.remove("is-open")):n>e&&(i.classList.remove(["below-threshold"]),i.classList.add("too-small"))};o(),window.addEventListener("resize",o),document.getElementsByClassName(t.toggleClass).length>0?document.querySelectorAll(".".concat(t.toggleClass)).forEach((function(t){return t.addEventListener("click",(function(){i.classList.toggle("is-open")}))})):console.warn("No toggleClass found or toggleClass is undefined")}}}
1})},t.exports=e()},363:t=>{"use strict";t.exports=React}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=i(363),e=i(856),n=i.n(e);const s=e=>{let{items:i=[],nothingFoundText:n}=e;return 0===i.length?(0,t.createElement)("span",null,n):(0,t.createElement)("ul",{className:"livingAttractions-grid"},i.map((e=>(0,t.createElement)("li",{key:e.postId},(0,t.createElement)("article",{className:"livingAttractionTeaser"},e.featuredImage?(0,t.createElement)("img",{alt:"",className:"livingAttractionTeaser-image",decoding:"async",loading:"lazy",src:e.featuredImage}):null,(0,t.createElement)("div",{className:"livingAttractionTeaser-content"},(0,t.createElement)("h3",{className:"livingAttractionTeaser-title"},(0,t.createElement)("a",{href:e.permalink},e.title)),e.scientificName?(0,t.createElement)("p",{className:"livingAttractionTeaser-scientificName"},e.scientificName):null))))))},o=e=>{let{months:i,currentMonth:n,updateMonthFilter:s}=e;return(0,t.createElement)("nav",{className:"livingAttractions-nav"},(0,t.createElement)("ul",{className:"livingAttractions-months"},i.map((e=>{let i=`livingAttractions-month ${e.monthClassName}`;return n===e.monthClassName&&(i+=" current"),(0,t.createElement)("li",{key:e.id},(0,t.createElement)("button",{className:i,onClick:()=>{s(e.monthClassName)}},e.monthLabel))}))))},{useState:r}=wp.element,a=()=>{console.log("LA Loaded");const e=window.livingAttractionsData.months,i=window.livingAttractionsData.attractions,[n,a]=r(window.livingAttractionsData.months[0].monthClassName),l=i.filter((function(t){return t.attractors.some((function(t){var e,i;return"All"===n||null===t.month||(e=t.month,i=n,-1!==e.toLowerCase().indexOf(i.toLowerCase()))}))}));return(0,t.createElement)("div",{className:"livingAttractions-wrapper"},(0,t.createElement)(o,{months:e,currentMonth:n,updateMonthFilter:t=>{a(void 0!==t?t:n)}}),(0,t.createElement)(s,{items:l,readMoreText:window.livingAttractionsData.strings.readmore,nothingFoundText:window.livingAttractionsData.strings.nothingfound,month:n}))},{render:l}=wp.element,h=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},c="propertychange",u=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function d(t,e){return t>e?1:t<e?-1:0}function g(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s<n;++s){const n=t[s];if(n===e)return s;if(n<e)return i(e,t[s-1],n)>0?s-1:s}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function _(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function f(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let e=0;e<n;e++)t[t.length]=i[e]}function m(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function p(){return!0}function y(){return!1}function v(){}function x(t){for(const e in t)delete t[e]}function S(t){let e;for(e in t)return!1;return!e}const C=class extends u{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const s=e?new h(t):t;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),r=this.pendingRemovals_||(this.pendingRemovals_={});let a;i in o||(o[i]=0,r[i]=0),++o[i];for(let t=0,e=n.length;t<e;++t)if(a="handleEvent"in n[t]?n[t].handleEvent(s):n[t].call(this,s),!1===a||s.propagationStopped){a=!1;break}if(0==--o[i]){let t=r[i];for(delete r[i];t--;)this.removeEventListener(i,v);delete o[i]}return a}disposeInternal(){this.listeners_&&x(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=v,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}},w="change",E="contextmenu",I="click",b="keydown",R="keypress",T="touchmove",M="wheel";function L(t,e,i,n,s){if(n&&n!==t&&(i=i.bind(n)),s){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const o={target:t,type:e,listener:i};return t.addEventListener(e,i),o}function O(t,e,i,n){return L(t,e,i,n,!0)}function k(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),x(t))}class P extends C{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(w)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=L(this,t[s],e);return n}return L(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let s=0;s<n;++s)i[s]=O(this,t[s],e)}else i=O(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)k(t[e]);else k(t)}(i);else if(Array.isArray(t))for(let i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}P.prototype.on,P.prototype.once,P.prototype.un;const A=P;function D(){throw new Error("Unimplemented abstract method.")}let F=0;function N(t){return t.ol_uid||(t.ol_uid=String(++F))}class W extends h{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}const j=class extends A{constructor(t){super(),this.on,this.once,this.un,N(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new W(i,t,e)),i=c,this.hasListener(i)&&this.dispatchEvent(new W(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],S(this.values_)&&(this.values_=null),e||this.notify(t,i)}}},B="opacity",z="visible",G="extent",V="zIndex",Y="maxResolution",X="minResolution",K="maxZoom",U="minZ
1oom",Z="source",H={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class q extends Error{constructor(t){const e=H[t];super(e),this.code=t,this.name="AssertionError",this.message=e}}const J=q;function Q(t,e){if(!t)throw new J(e)}function $(t,e,i){return Math.min(Math.max(t,e),i)}function tt(t,e,i,n,s,o){const r=s-i,a=o-n;if(0!==r||0!==a){const l=((t-i)*r+(e-n)*a)/(r*r+a*a);l>1?(i=s,n=o):l>0&&(i+=r*l,n+=a*l)}return et(t,e,i,n)}function et(t,e,i,n){const s=i-t,o=n-e;return s*s+o*o}function it(t){return t*Math.PI/180}function nt(t,e){const i=t%e;return i*e<0?i+e:i}function st(t,e,i){return t+i*(e-t)}const ot=class extends j{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[B]=void 0!==t.opacity?t.opacity:1,Q("number"==typeof e[B],64),e[z]=void 0===t.visible||t.visible,e[V]=t.zIndex,e[Y]=void 0!==t.maxResolution?t.maxResolution:1/0,e[X]=void 0!==t.minResolution?t.minResolution:0,e[
vendor: 5,245 bytes, line 1
1U]=void 0!==t.minZoom?t.minZoom:-1/0,e[K]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=$(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return D()}getLayerStatesArray(t){return D()}getExtent(){return this.get(G)}getMaxResolution(){return this.get(Y)}getMinResolution(){return this.get(X)}getMinZoom(){return this.get(U)}getMaxZoom(){return this.get(K)}getOpacity(){return this.get(B)}getSourceState(){return D()}getVisible(){return this.get(z)}getZIndex(){return this.get(V)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(G,t)}setMaxResolution(t){this.set(Y,t)}setMinResolution(t){this.set(X,t)}setMaxZoom(t){this.set(K,t)}setMinZoom(t){this.set(U,t)}setOpacity(t){Q("number"==typeof t,64),this.set(B,t)}setVisible(t){this.set(z,t)}setZIndex(t){this.set(V,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},rt="precompose",at="rendercomplete",lt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},ht={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},ct=class{constructor(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}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||ht[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},ut=6378137,dt=Math.PI*ut,gt=[-dt,-dt,dt,dt],_t=[-180,-85,180,85],ft=ut*Math.log(Math.tan(Math.PI/2));class mt extends ct{constructor(t){super({code:t,units:"m",extent:gt,global:!0,worldExtent:_t,getPointResolution:function(t,e){return t/Math.cosh(e[1]/ut)}})}}const pt=[new mt("EPSG:3857"),new mt("EPSG:102100"),new mt("EPSG:102113"),new mt("EPSG:900913"),new mt("http://www.opengis.net/def/crs/EPSG/0/3857"),new mt("http://www.opengis.net/gml/srs/epsg.xml#3857")];const yt=[-180,-90,180,90],vt=6378137*Math.PI/180;class xt extends ct{constructor(t,e){super({code:t,units:"degrees",extent:yt,axisOrientation:e,global:!0,metersPerUnit:vt,worldExtent:yt})}}const St=[new xt("CRS:84"),new xt("EPSG:4326","neu"),new xt("urn:ogc:def:crs:OGC:1.3:CRS84"),new xt("urn:ogc:def:crs:OGC:2:84"),new xt("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new xt("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new xt("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Ct={},wt={};function Et(t,e,i){const n=t.getCode(),s=e.getCode();n in wt||(wt[n]={}),wt[n][s]=i}const It={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function bt(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;i<n;++i)Nt(e,t[i]);return e}function Rt(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Tt(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Mt(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function Lt(t,e){return kt(t,e[0],e[1])}function Ot(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function kt(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Pt(t,e){const i=t[0],n=t[1],s=t[2],o=t[3],r=e[0],a=e[1];let l=It.UNKNOWN;return r<i?l|=It.LEFT:r>s&&(l|=It.RIGHT),a<n?l|=It.BELOW:a>o&&(l|=It.ABOVE),l===It.UNKNOWN&&(l=It.INTERSECTING),l}function At(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function Dt(t){return At(1/0,1/0,-1/0,-1/0,t)}function Ft(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Nt(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function Wt(t,e,i,n,s){for(;i<n;i+=s)jt(t,e[i],e[i+1]);return t}function jt(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function Bt(t){return[t[0],t[1]]}function zt(t){return[t[2],t[1]]}function Gt(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}
1function Vt(t,e,i,n,s){const[o,r,a,l,h,c,u,d]=function(t,e,i,n){const s=e*n[0]/2,o=e*n[1]/2,r=Math.cos(i),a=Math.sin(i),l=s*r,h=s*a,c=o*r,u=o*a,d=t[0],g=t[1];return[d-l+u,g-h-c,d-l-u,g-h+c,d+l-u,g+h+c,d+l+u,g+h-c,d-l+u,g-h-c]}(t,e,i,n);return At(Math.min(o,a,h,u),Math.min(r,l,c,d),Math.max(o,a,h,u),Math.max(r,l,c,d),s)}function Yt(t){return t[3]-t[1]}function Xt(t,e,i){const n=i||[1/0,1/0,-1/0,-1/0];return Ht(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):Dt(n),n}function Kt(t){return[t[0],t[3]]}function Ut(t){return[t[2],t[3]]}function Zt(t){return t[2]-t[0]}function Ht(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function qt(t){return t[2]<t[0]||t[3]<t[1]}function Jt(t,e){const i=e.getExtent(),n=Gt(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=Zt(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function Qt(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function $t(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=s,t[1]=o,t}function te(t,e){if(e.canWrapX()){const i=Zt(e.getExtent()),n=function(t,e,i){const n=e.getExtent();let s=0;return e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])&&(i=i||Zt(n),s=Math.floor((t[0]-n[0])/i)),s}(t,e,i);n&&(t[0]-=n*i)}return t}const ee=6371008.8;function ie(t,e,i){i=i||ee;const n=it(t[1]),s=it(e[1]),o=(s-n)/2,r=it(e[0]-t[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(r)*Math.sin(r)*Math.cos(n)*Math.cos(s);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const ne={info:1,warn:2,error:3,none:4};let se=ne.info;function oe(...t){se>ne.warn||console.warn(...t)}let re=!0;function ae(t,e){if(void 0!==e)for(let i=0,n=t.length;i<n;++i)e[i]=t[i];else e=t.slice();return e}function le(t,e){if(void 0!==e&&t!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function he(t){!function(t,e){Ct[t]=e}(t.getCode(),t),Et(t,t,ae)}function ce(t){return"string"==typeof t?Ct[e=t]||Ct[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function ue(t,e,i,n){let s;const o=(t=ce(t)).getPointResolutionFunc();if(o){if(s=o(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(s=s*e/ht[n])}}else{const o=t.getUnits();if("degrees"==o&&!n||"degrees"==n)s=e;else{const r=fe(t,ce("EPSG:4326"));if(r===le&&"degrees"!==o)s=e*t.getMetersPerUnit();else{let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=r(t,t,2),s=(ie(t.slice(0,2),t.slice(2,4))+ie(t.slice(4,6),t.slice(6,8)))/2}const a=n?ht[n]:t.getMetersPerUnit();void 0!==a&&(s/=a)}}return s}function de(t){!function(t){t.forEach(he)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Et(e,t,ae)}))}))}function ge(t,e){return t?"string"==typeof t?ce(t):t:ce(e)}function _e(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||fe(t,e)===ae)&&i}function fe(t,e){let i=function(t,e){let i;return t in wt&&e in wt[t]&&(i=wt[t][e]),i}(t.getCode(),e.getCode());return i||(i=le),i}function me(t,e){return fe(ce(t),ce(e))}function pe(t,e,i){return me(e,i)(t,void 0,t.length)}let ye=null;function ve(){return ye}function xe(t,e){return t}function Se(t,e){return re&&!Qt(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(re=!1,oe("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function Ce(t,e){return t}function we(t,e){return t}function Ee(t,e){return t}var Ie,be,Re;function Te(t,e,i){return function(n,s,o,r,a){if(!n)return;if(!s&&!e)return n;const l=e?0:o[0]*s,h=e?0:o[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+l/2+c,g=t[2]-l/2+c,_=t[1]+h/2+u,f=t[3]-h/2+u;d>g&&(d=(g+d)/2,g=d),_>f&&(_=(f+_)/2,f=_);let m=$(n[0],d,g),p=$(n[1],_,f);if(r&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-g)/t),p+=-t*Math.log(1+Math.max(0,_-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-f)/t)}return[m,p]}}function Me(t){return t}function Le(t,e,i,n){const s=Zt(e)/i[0],o=Yt(e)/i[1];return n?Math.min(t,Math.max(s,o)):Math.min(t,Math.min(s,o))}function Oe(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),$(n,i/2,2*e)}function ke(t,e,i,n,s){return i=void 0===i||i,function(o,r,a,l){if(void 0!==o){const r=n?Le(t,n,a,s):t;return i&&l?Oe(o,r,e):$(o,e,r)}}}function Pe(t){if(void 0!==t)return 0}function Ae(t){if(void 0!==t)return t}function De(t){return 1-function(t){return Math.pow(t,3)}(1-t)}function Fe(t){return 3*t*t-2*t*t*t}function Ne(t){return t}
1de(pt),de(St),Ie=pt,be=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let s=0;s<n;s+=i){e[s]=dt*t[s]/180;let i=ut*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));i>ft?i=ft:i<-ft&&(i=-ft),e[s+1]=i}return e},Re=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let s=0;s<n;s+=i)e[s]=180*t[s]/dt,e[s+1]=360*Math.atan(Math.exp(t[s+1]/ut))/Math.PI-90;return e},St.forEach((function(t){Ie.forEach((function(e){Et(t,e,be),Et(e,t,Re)}))}));const We="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",je=We.includes("firefox"),Be=(We.includes("safari")&&!We.includes("chrom")&&(We.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(We)),We.includes("webkit")&&!We.includes("edge")),ze=We.includes("macintosh"),Ge="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Ve="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Ye="undefined"!=typeof Image&&Image.prototype.decode,Xe=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function Ke(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function Ue(t,e,i,n,s,o,r,a){const l=Math.sin(o),h=Math.cos(o);return t[0]=n*h,t[1]=s*l,t[2]=-n*l,t[3]=s*h,t[4]=r*n*h-a*n*l+e,t[5]=r*s*l+a*s*h+i,t}function Ze(t,e){const i=(n=e)[0]*n[3]-n[1]*n[2];var n;Q(0!==i,32);const s=e[0],o=e[1],r=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/i,t[1]=-o/i,t[2]=-r/i,t[3]=s/i,t[4]=(r*h-a*l)/i,t[5]=-(s*h-o*l)/i,t}let He;function qe(t){const e="matrix("+t.join(", ")+")";if(Ve)return e;const i=He||(He=document.createElement("div"));return i.style.transform=e,i.style.transform}function Je(t,e,i,n,s,o){o=o||[];let r=0;for(let a=e;a<i;a+=n){const e=t[a],i=t[a+1];o[r++]=s[0]*e+s[2]*i+s[4],o[r++]=s[1]*e+s[3]*i+s[5]}return o&&o.length!=r&&(o.length=r),o}function Qe(t,e,i,n,s,o,r){r=r||[];const a=Math.cos(s),l=Math.sin(s),h=o[0],c=o[1];let u=0;for(let s=e;s<i;s+=n){const e=t[s]-h,i=t[s+1]-c;r[u++]=h+e*a-i*l,r[u++]=c+e*l+i*a;for(let e=s+2;e<s+n;++e)r[u++]=t[e]}return r&&r.length!=u&&(r.length=u),r}new Array(6);const $e=[1,0,0,1,0,0],ti=class extends j{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=function(t){let e,i,n,s=!1;return function(){const o=Array.prototype.slice.call(arguments);return s&&this===n&&m(o,i)||(s=!0,n=this,i=o,e=t.apply(this,arguments)),e}}((function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return D()}closestPointXY(t,e,i,n){return D()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return D()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Dt(t),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)}rotate(t,e){D()}scale(t,e,i){D()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return D()}getType(){return D()}applyTransform(t){D()}intersectsExtent(t){return D()}translate(t,e){D()}transform(t,e){const i=ce(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const o=i.getExtent(),r=i.getWorldExtent(),a=Yt(r)/Yt(o);return Ue($e,r[0],r[3],a,-a,0,0,0),Je(t,0,t.length,s,$e,n),me(i,e)(t,n,s)}:me(i,e);return this.applyTransform(n),this}};function ei(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}const ii=class extends ti{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return e=this.flatCoordinates,i=this.flatCoordinates.length,n=this.stride,Wt(Dt(t),e,0,i,n);var e,i,n}getCoordinates(){return D()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=ei(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){D()}setLayout(t,e,i){let n;if(t)n=ei(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=function(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();Qe(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=Gt(this.getExtent()));const n=this.getFlatCoordinates();if(n){const s=this.getStride();
vendor: 2,489 bytes, line 1
1!function(t,e,i,n,s,o,r,a){a=a||[];const l=r[0],h=r[1];let c=0;for(let e=0;e<i;e+=n){const i=t[e]-l,r=t[e+1]-h;a[c++]=l+s*i,a[c++]=h+o*r;for(let i=e+2;i<e+n;++i)a[c++]=t[i]}a&&a.length!=c&&(a.length=c)}(n,0,n.length,s,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();!function(t,e,i,n,s,o,r){r=r||[];let a=0;for(let e=0;e<i;e+=n){r[a++]=t[e]+s,r[a++]=t[e+1]+o;for(let i=e+2;i<e+n;++i)r[a++]=t[i]}r&&r.length!=a&&(r.length=a)}(i,0,i.length,n,t,e,i),this.changed()}}};function ni(t,e,i,n,s,o,r){const a=t[e],l=t[e+1],h=t[i]-a,c=t[i+1]-l;let u;if(0===h&&0===c)u=e;else{const d=((s-a)*h+(o-l)*c)/(h*h+c*c);if(d>1)u=i;else{if(d>0){for(let s=0;s<n;++s)r[s]=st(t[e+s],t[i+s],d);return void(r.length=n)}u=e}}for(let e=0;e<n;++e)r[e]=t[u+e];r.length=n}function si(t,e,i,n,s){let o=t[e],r=t[e+1];for(e+=n;e<i;e+=n){const i=t[e],n=t[e+1],a=et(o,r,i,n);a>s&&(s=a),o=i,r=n}return s}function oi(t,e,i,n,s,o,r,a,l,h,c){if(e==i)return h;let u,d;if(0===s){if(d=et(r,a,t[e],t[e+1]),d<h){for(u=0;u<n;++u)l[u]=t[e+u];return l.length=n,d}return h}c=c||[NaN,NaN];let g=e+n;for(;g<i;)if(ni(t,g-n,g,n,r,a,c),d=et(r,a,c[0],c[1]),d<h){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n,g+=n}else g+=n*Math.max((Math.sqrt(d)-Math.sqrt(h))/s|0,1);if(o&&(ni(t,i-n,e,n,r,a,c),d=et(r,a,c[0],c[1]),d<h)){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n}return h}function ri(t,e,i,n){for(let s=0,o=i.length;s<o;++s){const o=i[s];for(let i=0;i<n;++i)t[e++]=o[i]}return e}function ai(t,e){return e*Math.round(t/e)}function li(t,e,i,n,s,o,r){if(e==i)return r;let a,l,h=ai(t[e],s),c=ai(t[e+1],s);e+=n,o[r++]=h,o[r++]=c;do{if(a=ai(t[e],s),l=ai(t[e+1],s),(e+=n)==i)return o[r++]=a,o[r++]=l,r}while(a==h&&l==c);for(;e<i;){const i=ai(t[e],s),u=ai(t[e+1],s);if(e+=n,i==a&&u==l)continue;const d=a-h,g=l-c,_=i-h,f=u-c;d*f==g*_&&(d<0&&_<d||d==_||d>0&&_>d)&&(g<0&&f<g||g==f||g>0&&f>g)?(a=i,l=u):(o[r++]=a,o[r++]=l,h=a,c=l,a=i,l=u)}return o[r++]=a,o[r++]=l,r}function hi(t,e,i,n,s){s=void 0!==s?s:[];let o=0;for(let r=e;r<i;r+=n)s[o++]=t.slice(r,r+n);return s.length=o,s}function ci(t,e,i,n,s){s=void 0!==s?s:[];let o=0;for(let r=0,a=i.length;r<a;++r){const a=i[r];s[o++]=hi(t,e,a,n,s[o]),e=a}return s.length=o,s}function ui(t,e,i,n,s){s=void 0!==s?s:[];let o=0;for(let r=0,a=i.length;r<a;++r){const a=i[r];s[o++]=1===a.length&&a[0]===e?[]:ci(t,e,a,n,s[o]),e=a[a.length-1]}return s.length=o,s}function di(t,e,i,n){let s=0,o=t[i-n],r=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=r*i-o*n,o=i,r=n}
1return s/2}class gi extends ii{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new gi(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<Mt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(si(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),oi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return hi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=function(t,e,i,n,s,o,r){const a=(i-e)/n;if(a<3){for(;e<i;e+=n)o[r++]=t[e],o[r++]=t[e+1];return r}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[e,i-n];let c=0;for(;h.length>0;){const i=h.pop(),o=h.pop();let r=0;const a=t[o],u=t[o+1],d=t[i],g=t[i+1];for(let e=o+n;e<i;e+=n){const i=tt(t[e],t[e+1],a,u,d,g);i>r&&(c=e,r=i)}r>s&&(l[(c-e)/n]=1,o+n<c&&h.push(o,c),c+n<i&&h.push(c,i))}for(let i=0;i<a;++i)l[i]&&(o[r++]=t[e+i*n],o[r++]=t[e+i*n+1]);return r}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new gi(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ri(this.flatCoordinates,0,t,this.stride),this.changed()}}const _i=gi;class fi extends ii{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new fi(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,o=et(t,e,s[0],s[1]);if(o<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=s[e];return i.length=t,o}return n}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return function(t,e){const i=t[0],n=t[1];return At(i,n,i,n,e)}(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return kt(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,i,n){for(let n=0,s=i.length;n<s;++n)t[e++]=i[n];return e}(this.flatCoordinates,0,t,this.stride),this.changed()}}const mi=fi;function pi(t,e,i,n,s){const o=function(t,e){let i;return i=e(Bt(t)),i||(i=e(zt(t)),i||(i=e(Ut(t)),i||(i=e(Kt(t)),i||!1)))}(s,(function(s){return!yi(t,e,i,n,s[0],s[1])}));return!o}function yi(t,e,i,n,s,o){let r=0,a=t[i-n],l=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];l<=o?n>o&&(i-a)*(o-l)-(s-a)*(n-l)>0&&r++:n<=o&&(i-a)*(o-l)-(s-a)*(n-l)<0&&r--,a=i,l=n}return 0!==r}function vi(t,e,i,n,s,o){if(0===i.length)return!1;if(!yi(t,e,i[0],n,s,o))return!1;for(let e=1,r=i.length;e<r;++e)if(yi(t,i[e-1],i[e],n,s,o))return!1;return!0}function xi(t,e,i,n,s){const o=Wt([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!Ht(s,o)&&(!!Ot(s,o)||o[0]>=s[0]&&o[2]<=s[2]||o[1]>=s[1]&&o[3]<=s[3]||function(t,e,i,n,o){let r;for(e+=n;e<i;e+=n)if(a=t.slice(e-n,e),l=t.slice(e,e+n),r=function(t,e,i){let n=!1;const s=Pt(t,e),o=Pt(t,i);if(s===It.INTERSECTING||o===It.INTERSECTING)n=!0;else{const r=t[0],a=t[1],l=t[2],h=t[3],c=e[0],u=e[1],d=i[0],g=i[1],_=(g-u)/(d-c);let f,m;o&It.ABOVE&&!(s&It.ABOVE)&&(f=d-(g-h)/_,n=f>=r&&f<=l),n||!(o&It.RIGHT)||s&It.RIGHT||(m=g-(d-l)*_,n=m>=a&&m<=h),n||!(o&It.BELOW)||s&It.BELOW||(f=d-(g-a)/_,n=f>=r&&f<=l),n||!(o&It.LEFT)||s&It.LEFT||(m=g-(d-r)*_,n=m>=a&&m<=h)}return n}(s,a,l),r)return r;var a,l;return!1}(t,e,i,n))}function Si(t,e,i,n){for(;e<i-n;){for(let s=0;s<n;++s){const o=t[e+s];t[e+s]=t[i-n+s],t[i-n+s]=o}e+=n,i-=n}}function Ci(t,e,i,n){let s=0,o=t[i-n],r=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=(i-o)*(n+r),o=i,r=n}
1return 0===s?void 0:s>0}function wi(t,e,i,n,s){s=void 0!==s&&s;for(let o=0,r=i.length;o<r;++o){const r=i[o],a=Ci(t,e,r,n);(0===o?s&&a||!s&&!a:s&&!a||!s&&a)&&Si(t,e,r,n),e=r}return e}class Ei extends ii{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?f(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Ei(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Mt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,s){for(let o=0,r=i.length;o<r;++o){const r=i[o];s=si(t,e,r,n,s),e=r}return s}(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,s,o,r,a,l,h,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];h=oi(t,e,d,n,s,o,r,a,l,h,c),e=d}return h}(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return vi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return function(t,e,i,n){let s=0;for(let o=0,r=i.length;o<r;++o){const r=i[o];s+=di(t,e,r,n),e=r}return s}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),wi(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,ci(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Gt(this.getExtent());this.flatInteriorPoint_=function(t,e,i,n,s,o,r){let a,l,h,c,u,g,_;const f=s[o+1],m=[];for(let s=0,o=i.length;s<o;++s){const o=i[s];for(c=t[o-n],g=t[o-n+1],a=e;a<o;a+=n)u=t[a],_=t[a+1],(f<=g&&_<=f||g<=f&&f<=_)&&(h=(f-g)/(_-g)*(u-c)+c,m.push(h)),c=u,g=_}let p=NaN,y=-1/0;for(m.sort(d),c=m[0],a=1,l=m.length;a<l;++a){u=m[a];const s=Math.abs(u-c);s>y&&(h=(c+u)/2,vi(t,e,i,n,h,f)&&(p=h,y=s)),c=u}return isNaN(p)&&(p=s[o]),r?(r.push(p,f,y),r):[p,f,y]}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new mi(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new _i(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let o=0,r=i.length;o<r;++o){const r=i[o],a=new _i(e.slice(s,r),t);n.push(a),s=r}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;!function(t,e,i,n,s){s=void 0!==s&&s;for(let o=0,r=i.length;o<r;++o){const r=i[o],a=Ci(t,e,r,n);if(0===o){if(s&&a||!s&&!a)return!1}else if(s&&!a||!s&&a)return!1;e=r}return!0}(t,0,this.ends_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=wi(this.orientedFlatCoordinates_,0,this.ends_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=function(t,e,i,n,s,o,r,a){for(let l=0,h=i.length;l<h;++l){const h=i[l];r=li(t,e,h,n,s,o,r),a.push(r),e=h}return r}(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new Ei(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return function(t,e,i,n,s){if(!function(t,e,i,n,s){return!!(xi(t,e,i,n,s)||yi(t,e,i,n,s[0],s[1])||yi(t,e,i,n,s[0],s[3])||yi(t,e,i,n,s[2],s[1])||yi(t,e,i,n,s[2],s[3]))}(t,e,i[0],n,s))return!1;if(1===i.length)return!0;for(let e=1,o=i.length;e<o;++e)if(pi(t,i[e-1],i[e],n,s)&&!xi(t,i[e-1],i[e],n,s))return!1;return!0}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);
1const i=function(t,e,i,n,s){s=s||[];let o=0;for(let r=0,a=i.length;r<a;++r){const a=ri(t,e,i[r],n);s[o++]=a,e=a}return s.length=o,s}(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}const Ii=Ei;function bi(t){const e=t[0],i=t[1],n=t[2],s=t[3],o=[e,i,e,s,n,s,n,i,e,i];return new Ei(o,"XY",[o.length])}function Ri(t,e){setTimeout((function(){t(e)}),0)}function Ti(t){return!(t.sourceCenter&&t.targetCenter&&!Qt(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function Mi(t,e,i,n,s){const o=Math.cos(-s);let r=Math.sin(-s),a=t[0]*o-t[1]*r,l=t[1]*o+t[0]*r;return a+=(e[0]/2-i[0])*n,l+=(i[1]-e[1]/2)*n,r=-r,[a*o-l*r,l*o+a*r]}const Li=class extends j{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=ge(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&function(t){re=!(void 0===t||t)}(),t.center&&(t.center=Se(t.center,this.projection_)),t.extent&&(t.extent=we(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in lt)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28;const r=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,h=void 0!==t.showFullExtent&&t.showFullExtent,c=ge(t.projection,"EPSG:3857"),u=c.getExtent();let d=t.constrainOnlyCenter,_=t.extent;if(a||_||!c.isGlobal()||(d=!1,_=u),void 0!==t.resolutions){const r=t.resolutions;i=r[s],n=void 0!==r[o]?r[o]:r[r.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,o,r,a){if(void 0!==s){const l=t[0],h=t[t.length-1],c=i?Le(l,i,r,n):l;if(a)return e?Oe(s,c,h):$(s,h,c);const u=Math.min(c,s),d=Math.floor(g(t,u,o));return t[d]>c&&d<t.length-1?t[d+1]:t[d]}}}(r,l,!d&&_,h):ke(i,n,l,!d&&_,h)}else{const a=(u?Math.max(Zt(u),Yt(u)):360*ht.degrees/c.getMetersPerUnit())/256/Math.pow(2,0),g=a/Math.pow(2,28);i=t.maxResolution,void 0!==i?s=0:i=a/Math.pow(r,s),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(r,o):a/Math.pow(r,o):g),o=s+Math.floor(Math.log(i/n)/Math.log(r)),n=i/Math.pow(r,o-s),e=t.constrainResolution?function(t,e,i,n,s,o){return n=void 0===n||n,i=void 0!==i?i:0,function(r,a,l,h){if(void 0!==r){const c=s?Le(e,s,l,o):e;if(h)return n?Oe(r,c,i):$(r,i,c);const u=1e-9,d=Math.ceil(Math.log(e/c)/Math.log(t)-u),g=-a*(.5-u)+.5,_=Math.min(c,r),f=Math.floor(Math.log(e/_)/Math.log(t)+g),m=Math.max(d,f);return $(e/Math.pow(t,m),i,c)}}}(r,i,n,l,!d&&_,h):ke(i,n,l,!d&&_,h)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:s,zoomFactor:r}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=function(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Te(t.extent,t.constrainOnlyCenter,e)}const e=ge(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,Te(t,!1,!1)}return Me}(t),s=i.constraint,o=function(t){if(void 0===t.enableRotation||t.enableRotation){const i=t.constrainRotation;return void 0===i||!0===i?(e=e||it(5),function(t,i){return i?t:void 0!==t?Math.abs(t)<=e?0:t:void 0}):!1===i?Ae:"number"==typeof i?function(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}(i):Ae}var e;return Pe}(t);this.constraints_={center:n,resolution:s,rotation:o},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),o=s/2*(n[3]-e[3]+e[1]-n[1]),r=s/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+o,i[1]-r])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let t=0;t<e.length;++t){let i=arguments[t];i.center&&(i=Object.assign({},i),i.center=Se(i.center,this.getProjection())),i.anchor&&(i=Object.assign({}
vendor: 12,080 bytes, line 1
1,i),i.anchor=Se(i.anchor,this.getProjection())),e[t]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&Ri(e,!0));let s=Date.now(),o=this.targetCenter_.slice(),r=this.targetResolution_,a=this.targetRotation_;const l=[];for(;n<i;++n){const t=arguments[n],i={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||Fe,callback:e};if(t.center&&(i.sourceCenter=o,i.targetCenter=t.center.slice(),o=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=r,i.targetResolution=this.getResolutionForZoom(t.zoom),r=i.targetResolution):t.resolution&&(i.sourceResolution=r,i.targetResolution=t.resolution,r=i.targetResolution),void 0!==t.rotation){i.sourceRotation=a;const e=nt(t.rotation-a+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=a+e,a=i.targetRotation}Ti(i)?i.complete=!0:s+=i.duration,l.push(i)}this.animations_.push(l),this.setHint(0,1),this.updateAnimations_()}getAnimating(){return this.hints_[0]>0}getInteracting(){return this.hints_[1]>0}cancelAnimations(){let t;this.setHint(0,-this.hints_[0]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&Ri(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,o=n.length;i<o;++i){const o=n[i];if(o.complete)continue;const r=t-o.start;let a=o.duration>0?r/o.duration:1;a>=1?(o.complete=!0,a=1):s=!1;const l=o.easing(a);if(o.sourceCenter){const t=o.sourceCenter[0],e=o.sourceCenter[1],i=o.targetCenter[0],n=o.targetCenter[1];this.nextCenter_=o.targetCenter;const s=t+l*(i-t),r=e+l*(n-e);this.targetCenter_=[s,r]}if(o.sourceResolution&&o.targetResolution){const t=1===l?o.targetResolution:o.sourceResolution+l*(o.targetResolution-o.sourceResolution);if(o.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,o.anchor)}this.nextResolution_=o.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==o.sourceRotation&&void 0!==o.targetRotation){const t=1===l?nt(o.targetRotation+Math.PI,2*Math.PI)-Math.PI:o.sourceRotation+l*(o.targetRotation-o.sourceRotation);if(o.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,o.anchor)}this.nextRotation_=o.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!o.complete)break}if(s){this.animations_[i]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&Ri(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();var s,o;return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],$t(i,t-this.getRotation()),o=e,(s=i)[0]+=+o[0],s[1]+=+o[1]),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?xe(t,this.getProjection()):t}getCenterInternal(){return this.get(lt.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){return Ce(this.calculateExtentInternal(t),this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();Q(e,1);const i=this.getResolution();Q(void 0!==i,2);const n=this.getRotation();return Q(void 0!==n,3),Vt(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(lt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(we(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Zt(t)/e[0],n=Yt(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(lt.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=Mi(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=g(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=$(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,$(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(Q(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))Q(!qt(t),25),i=bi(we(t,this.getProjection()));else if("Circle"===t.getType()){const e=we(t.getExtent(),this.getProjection());i=bi(e),i.rotate(this.getRotation(),Gt(e))}else{const e=ve();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),o=t.getStride();let r=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=s.length;t<e;t+=o){const e=s[t]*i-s[t+1]*n,o=s[t]*n+s[t+1]*i;r=Math.min(r,e),a=Math.min(a,o),l=Math.max(l,e),h=Math.max(h,o)}return[r,a,l,h]}fitInternal(t,e){let i=(e=e||{}).size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;let o;o=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const r=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(r,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?o:Math.max(a,o),a=this.getConstrainedResolution(a,s?0:1);const l=this.getRotation(),h=Math.sin(l),c=Math.cos(l),u=Gt(r);u[0]+=(n[1]-n[3])/2*a,u[1]+=(n[0]-n[2])/2*a;const d=u[0]*c-u[1]*h,g=u[1]*c+u[0]*h,_=this.getConstrainedCenter([d,g],a),f=e.callback?e.callback:v;void 0!==e.duration?this.animateInternal({resolution:a,center:_,duration:e.duration,easing:e.easing},f):(this.targetResolution_=a,this.targetCenter_=_,this.applyTargetState_(!1,!0),Ri(f,!0))}centerOn(t,e,i){this.centerOnInternal(Se(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(Mi(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let s;const o=this.padding_;if(o&&t){const r=this.getViewportSizeMinusPadding_(-i),a=Mi(t,n,[r[0]/2+o[3],r[1]/2+o[0]],e,i);s=[t[0]-a[0],t[1]-a[1]]}return s}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=xe(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Se(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Se(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?Se(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,s,i),r=this.constraints_.center(this.targetCenter_,o,s,i,this.calculateCenterShift(this.targetCenter_,o,n,s));this.get(lt.ROTATION)!==n&&this.set(lt.ROTATION,n),this.get(lt.RESOLUTION)!==o&&(this.set(lt.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),r&&this.get(lt.CENTER)&&Qt(this.get(lt.CENTER),r)||this.set(lt.CENTER,r),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),r=this.constraints_.resolution(this.targetResolution_,n,o),a=this.constraints_.center(this.targetCenter_,r,o,!1,this.calculateCenterShift(this.targetCenter_,r,s,o));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=r,this.targetRotation_=s,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===r&&this.getRotation()===s&&this.getCenterInternal()&&Qt(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:r,duration:t,easing:De,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(1,1)}
1endInteraction(t,e,i){i=i&&Se(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(1,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}};function Oi(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const ki=class extends ot{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(Z,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(Z)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(k(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=L(t,w,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof Li?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return Oi(n,e.viewState)&&(!s||Ht(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof Li?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set("map",t)}getMapInternal(){return this.get("map")}setMap(t){this.mapPrecomposeKey_&&(k(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(k(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=L(t,rt,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);Q(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=L(this,w,t.render,t),this.changed())}setSource(t){this.set(Z,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}},Pi=class extends ki{constructor(t){super(t=t||{})}},Ai=class extends A{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return D()}getData(t){return null}prepareFrame(t){return D()}renderFrame(t,e){return D()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,s)=>
1{const o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,s,o)}}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){2===t.target.getState()&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return 2!=e&&3!=e&&t.addEventListener(w,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}},Di=class extends h{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}},Fi=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Ni=/^([a-z]*)$|^hsla?\(.*\)$/i;function Wi(t){return"string"==typeof t?t:Gi(t)}const ji=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let i=0;for(const n in t)0==(3&i++)&&(delete t[n],--e)}n=function(t){let e,i,n,s,o;if(Ni.exec(t)&&(t=function(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}(t)),Fi.exec(t)){const r=t.length-1;let a;a=r<=4?1:2;const l=4===r||8===r;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),s=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(s=(s<<4)+s)),o=[e,i,n,s/255]}else t.startsWith("rgba(")?(o=t.slice(5,-1).split(",").map(Number),zi(o)):t.startsWith("rgb(")?(o=t.slice(4,-1).split(",").map(Number),o.push(1),zi(o)):Q(!1,14);return o}(i),t[i]=n,++e}return n}}();function Bi(t){return Array.isArray(t)?t:ji(t)}function zi(t){return t[0]=$(t[0]+.5|0,0,255),t[1]=$(t[1]+.5|0,0,255),t[2]=$(t[2]+.5|0,0,255),t[3]=$(t[3],0,1),t}function Gi(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Vi(t,e,i,n){let s;return s=i&&i.length?i.shift():Ve?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",n)}function Yi(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function Xi(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function Ki(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}const Ui=[];let Zi=null;const Hi=class extends Ai{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;Zi||(Zi=Vi(1,1,void 0,{willReadFrequently:!0})),Zi.clearRect(0,0,1,1);try{Zi.drawImage(t,e,i,1,1,0,0,1,1),n=Zi.getImageData(0,0,1,1).data}catch(t){return Zi=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,o;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&m(Bi(t.style.backgroundColor),Bi(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(o=e.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",o=Vi();const e=o.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=o}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=Kt(i),s=Ut(i),o=zt(i),r=Bt(i);Ke(e.coordinateToPixelTransform,n),Ke(e.coordinateToPixelTransform,s),Ke(e.coordinateToPixelTransform,o),Ke(e.coordinateToPixelTransform,r);const a=this.inversePixelTransform;Ke(a,n),Ke(a,s),Ke(a,o),Ke(a,r),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])
1),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new Di(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_("prerender",t,e)}postRender(t,e){this.dispatchRenderEvent_("postrender",t,e)}getRenderTransform(t,e,i,n,s,o,r){const a=s/2,l=o/2,h=n/e,c=-h,u=-t[0]+r,d=-t[1];return Ue(this.tempTransform,a,l,h,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}},qi=class extends Hi{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,s=n.resolution,o=this.getLayer().getSource(),r=t.viewHints;let a=t.extent;if(void 0!==e.extent&&(a=Xt(a,we(e.extent,n.projection))),!r[0]&&!r[1]&&!qt(a))if(o){const t=n.projection,e=o.getImage(a,s,i,t);e&&(this.loadImage(e)?this.image_=e:4===e.getState()&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=Ke(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!Lt(s,n))return null;const o=this.image_.getExtent(),r=this.getImage(),a=Zt(o),l=Math.floor(r.width*((n[0]-o[0])/a));if(l<0||l>=r.width)return null;const h=Yt(o),c=Math.floor(r.height*((o[3]-n[1])/h));return c<0||c>=r.height?null:this.getImageData(r,l,c)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),s=i.getResolution(),o=i.getPixelRatio(),r=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,h=l.center,c=a*s/(l.resolution*o),u=t.extent,d=l.resolution,g=l.rotation,_=Math.round(Zt(u)/d*a),f=Math.round(Yt(u)/d*a);Ue(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,g,-_/2,-f/2),Ze(this.inversePixelTransform,this.pixelTransform);const m=qe(this.pixelTransform);this.useContainer(e,m,this.getBackground(t));const p=this.context,y=p.canvas;y.width!=_||y.height!=f?(y.width=_,y.height=f):this.containerReused||p.clearRect(0,0,_,f);let v=!1,x=!0;if(r.extent){const e=we(r.extent,l.projection);x=Ht(e,t.extent),v=x&&!Ot(e,t.extent),v&&this.clipUnrotated(p,t,e)}const S=this.getImage(),C=Ue(this.tempTransform,_/2,f/2,c,c,0,o*(n[0]-h[0])/s,o*(h[1]-n[3])/s);this.renderedResolution=s*a/o;const w=S.width*C[0],E=S.height*C[3];if(this.getLayer().getSource().getInterpolate()||(p.imageSmoothingEnabled=!1),this.preRender(p,t),x&&w>=.5&&E>=.5){const t=C[4],e=C[5],i=r.opacity;let n;1!==i&&(n=p.globalAlpha,p.globalAlpha=i),p.drawImage(S,0,0,+S.width,+S.height,t,e,w,E),1!==i&&(p.globalAlpha=n)}return this.postRender(p,t),v&&p.restore(),p.imageSmoothingEnabled=!0,m!==y.style.transform&&(y.style.transform=m),this.container}},Ji=class extends Pi{constructor(t){super(t)}createRenderer(){return new qi(this)}getData(t){return super.getData(t)}},Qi="add",$i="remove",tn="length";class en extends h{constructor(t,e,i){super(t),this.element=e,this.index=i}}const nn=class extends j{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t<e;++t)this.assertUnique_(this.array_[t],t);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(tn)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new en(Qi,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new en($i,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new en($i,i,t)),this.dispatchEvent(new en(Qi,e,t))}updateLength_(){this.set(tn,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new J(58)}};
1function sn(t,e,i){return e+":"+t+":"+(i?Wi(i):"null")}const on=new class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=sn(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const s=sn(t,e,i);this.cache_[s]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}};function rn(t,e){on.expire()}const an=class extends u{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){D()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Ue(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Ze(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,o,r,a){let l;const h=e.viewState;function c(t,e,i,n){return s.call(o,e,t?i:null,n)}const u=h.projection,d=te(t.slice(),u),g=[[0,0]];if(u.canWrapX()&&n){const t=Zt(u.getExtent());g.push([-t,0],[t,0])}const _=e.layerStatesArray,f=_.length,m=[],p=[];for(let n=0;n<g.length;n++)for(let s=f-1;s>=0;--s){const o=_[s],u=o.layer;if(u.hasRenderer()&&Oi(o,h)&&r.call(a,u)){const s=u.getRenderer(),r=u.getSource();if(s&&r){const a=r.getWrapX()?d:t,h=c.bind(null,o.managed);p[0]=a[0]+g[n][0],p[1]=a[1]+g[n][1],l=s.forEachFeatureAtCoordinate(p,e,i,h,m)}if(l)return l}}if(0===m.length)return;const y=1/m.length;return m.forEach(((t,e)=>t.distanceSq+=e*y)),m.sort(((t,e)=>t.distanceSq-e.distanceSq)),m.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,s,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,p,this,s,o)}getMap(){return this.map_}renderFrame(t){D()}scheduleExpireIconCache(t){on.canExpireCache()&&t.postRenderFunctions.push(rn)}},ln="ol-hidden",hn="ol-unselectable",cn="ol-control",un="ol-collapsed",dn=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"),gn=["style","variant","weight","size","lineHeight","family"],fn=function(t){const e=t.match(dn);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=gn.length;t<n;++t){const n=e[t+1];void 0!==n&&(i[gn[t]]=n)}return i.families=i.family.split(/,\s?/),i},mn="10px sans-serif",pn="#000",yn="round",vn=[],xn="round",Sn="#000",Cn="center",wn="middle",En=[0,0,0,0],In=new j;let bn,Rn=null;const Tn={},Mn=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let s,o;function r(s,r,a){let l=!0;for(let h=0;h<i;++h){const i=e[h];if(o=kn(s+" "+r+" "+t+i,n),a!=i){const e=kn(s+" "+r+" "+t+a+","+i,n);l=l&&e!=o}}return!!l}function a(){let t=!0;const e=In.getKeys();for(let i=0,n=e.length;i<n;++i){const n=e[i];In.get(n)<100&&(r.apply(this,n.split("\n"))?(x(Tn),Rn=null,bn=void 0,In.set(n,100)):(In.set(n,In.get(n)+1,!0),t=!1))}t&&(clearInterval(s),s=void 0)}return function(t){const e=fn(t);if(!e)return;const i=e.families;for(let t=0,n=i.length;t<n;++t){const n=i[t],o=e.style+"\n"+e.weight+"\n"+n;void 0===In.get(o)&&(In.set(o,100,!0),r(e.style,e.weight,n)||(In.set(o,0,!0),void 0===s&&(s=setInterval(a,32))))}}}(),Ln=function(){let t;return function(e){let i=Tn[e];if(null==i){if(Ve){const t=fn(e),n=On(e,"Žg");i=(isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);Tn[e]=i}return i}}();function On(t,e){return Rn||(Rn=Vi(1,1)),t!=bn&&(Rn.font=t,bn=Rn.font),Rn.measureText(e)}function kn(t,e){return On(t,e).width}function Pn(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce(((e,i)=>Math.max(e,kn(t,i))),0);return i[e]=n,n}const An=class extends an{constructor(t){super(t),this.fontChangeListenerKey_=L(In,c,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=hn+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}
1dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new Di(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){k(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(rt,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;const n=[];let s=null;for(let o=0,r=e.length;o<r;++o){const r=e[o];t.layerIndex=o;const a=r.layer,l=a.getSourceState();if(!Oi(r,i)||"ready"!=l&&"undefined"!=l){a.unrender();continue}const h=a.render(t,s);h&&(h!==s&&(this.children_.push(h),s=h),"getDeclutter"in a&&n.push(a))}for(let e=n.length-1;e>=0;--e)n[e].renderDeclutter(t);!function(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],o=e[n];if(!s&&!o)break;s!==o&&(s?o?t.insertBefore(o,s):(t.removeChild(s),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}};class Dn extends h{constructor(t,e){super(t),this.layer=e}}const Fn="layers";class Nn extends ot{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Fn,this.handleLayersChanged_),i?Array.isArray(i)?i=new nn(i.slice(),{unique:!0}):Q("function"==typeof i.getArray,43):i=new nn(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(k),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(L(t,Qi,this.handleLayersAdd_,this),L(t,$i,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(k);x(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t<i;t++){const i=e[t];this.registerLayerListeners_(i),this.dispatchEvent(new Dn("addlayer",i))}this.changed()}registerLayerListeners_(t){const e=[L(t,c,this.handleLayerChange_,this),L(t,w,this.handleLayerChange_,this)];t instanceof Nn&&e.push(L(t,"addlayer",this.handleLayerGroupAdd_,this),L(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[N(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Dn("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Dn("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Dn("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=N(e);this.listenerKeys_[i].forEach(k),delete this.listenerKeys_[i],this.dispatchEvent(new Dn("removelayer",e)),this.changed()}getLayers(){return this.get(Fn)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new Dn("removelayer",t[e]))}this.set(Fn,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach((function(e){e.getLayersArray(t)})),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));const n=this.getLayerState();let s=n.zIndex;t||void 0!==n.zIndex||(s=0);for(let t=i,o=e.length;t<o;t++){const i=e[t];i.opacity*=n.opacity,i.visible=i.visible&&n.visible,i.maxResolution=Math.min(i.maxResolution,n.maxResolution),i.minResolution=Math.max(i.minResolution,n.minResolution),i.minZoom=Math.max(i.minZoom,n.minZoom),i.maxZoom=Math.min(i.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==i.extent?i.extent=Xt(i.extent,n.extent):i.extent=n.extent),void 0===i.zIndex&&(i.zIndex=s)}return e}getSourceState(){return"ready"}}const Wn=Nn,jn=class extends h{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}},Bn=class extends jn{constructor(t,e,i,n,s,o){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=o}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}
vendor: 4,897 bytes, line 1
1get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},zn={SINGLECLICK:"singleclick",CLICK:I,DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Gn="pointerdown",Vn=class extends C{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=L(i,Gn,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=L(i,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(T,this.boundHandleTouchMove_,!!Xe&&{passive:!1})}emulateClick_(t){let e=new Bn(zn.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Bn(zn.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const e=new Bn(zn.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==zn.POINTERUP||e.type==zn.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=zn.POINTERDOWN&&e.type!=zn.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Bn(zn.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(k),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new Bn(zn.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push(L(t,zn.POINTERMOVE,this.handlePointerMove_,this),L(t,zn.POINTERUP,this.handlePointerUp_,this),L(this.element_,zn.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push(L(this.element_.getRootNode(),zn.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Bn(zn.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Bn(zn.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(k(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(T,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(k(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(k),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Yn="postrender",Xn="loadstart",Kn="loadend",Un="layergroup",Zn="size",Hn="target",qn="view",Jn=1/0,Qn=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,x(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){Q(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);
1return e!=Jn&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],o=i[t],r=t;for(;t<n>>1;){const s=this.getLeftChildIndex_(t),o=this.getRightChildIndex_(t),r=o<n&&i[o]<i[s]?o:s;e[t]=e[r],i[t]=i[r],t=r}e[t]=s,i[t]=o,this.siftDown_(r,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,s=i[e],o=n[e];for(;e>t;){const t=this.getParentIndex_(e);if(!(n[t]>o))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=o}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let o,r,a;for(r=0;r<s;++r)o=e[r],a=t(o),a==Jn?delete this.queuedElements_[this.keyFunction_(o)]:(i[n]=a,e[n++]=o);e.length=n,i.length=n,this.heapify_()}},$n=class extends Qn{constructor(t,e){super((function(e){return t.apply(null,e)}),(function(t){return t[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(w,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(2===i||3===i||4===i){3!==i&&e.removeEventListener(w,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i,n,s,o=0;for(;this.tilesLoading_<t&&o<e&&this.getCount()>0;)n=this.dequeue()[0],s=n.getKey(),i=n.getState(),0!==i||s in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++o,n.load())}},ts=class extends j{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){Ki(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&Ki(this.element);for(let t=0,e=this.listenerKeys.length;t<e;++t)k(this.listenerKeys[t]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==v&&this.listenerKeys.push(L(t,Yn,this.render,this)),t.render())}render(t){}setTarget(t){this.target_="string"==typeof t?document.getElementById(t):t}},es=class extends ts{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",s=void 0!==t.collapseLabel?t.collapseLabel:"›",o=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=o):this.collapseLabel_=s;const r=void 0!==t.label?t.label:"i";"string"==typeof r?(this.label_=document.createElement("span"),this.label_.textContent=r,this.label_.className=n):this.label_=r;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(I,this.handleClick_.bind(this),!1);const l=e+" "+hn+" "+cn+(this.collapsed_&&this.collapsible_?" "+un:"")+(this.collapsible_?"":" ol-uncollapsible"),h=this.element;h.className=l,h.appendChild(this.toggleButton_),h.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!m(e,this.renderedAttributions_)){!function(t){for(;
vendor: 7,613 bytes, line 1
1t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(un),this.collapsed_?Xi(this.collapseLabel_,this.label_):Xi(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}},is=class extends ts{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const s=t.tipLabel?t.tipLabel:"Reset rotation",o=document.createElement("button");o.className=e+"-reset",o.setAttribute("type","button"),o.title=s,o.appendChild(this.label_),o.addEventListener(I,this.handleClick_.bind(this),!1);const r=e+" "+hn+" "+cn,a=this.element;a.className=r,a.appendChild(o),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(ln)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:De}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(ln);t||0!==i?t&&0!==i&&this.element.classList.remove(ln):this.element.classList.add(ln)}this.label_.style.transform=t}this.rotation_=i}},ns=class extends ts{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",s=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",o=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=n,h.setAttribute("type","button"),h.title=a,h.appendChild("string"==typeof o?document.createTextNode(o):o),h.addEventListener(I,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof r?document.createTextNode(r):r),c.addEventListener(I,this.handleClick_.bind(this,-i),!1);const u=e+" "+hn+" "+cn,d=this.element;d.className=u,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:De})):e.setZoom(n)}}},ss="active";function os(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const o=t.getConstrainedZoom(s+e),r=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:r,anchor:i,duration:void 0!==n?n:250,easing:De})}const rs=class extends j{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(ss)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(ss,t)}setMap(t){this.map_=t}},as=class extends rs{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==zn.DBLCLICK){const i=t.originalEvent,n=t.map,s=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_;os(n.getView(),o,s,this.duration_),i.preventDefault(),e=!0}return!e}};function ls(t){const e=t.length;let i=0,n=0;for(let s=0;s<e;s++)i+=t[s].clientX,n+=t[s].clientY;return{clientX:i/e,clientY:n/e}}const hs=class extends rs{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==zn.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==zn.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==zn.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==zn.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}};function cs(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n<s&&(i=i&&e[n](t),i);++n);return i}}const us=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ds=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){const e=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return e.contains(i)}(t)},gs=p,_s=function(t){const e=t.originalEvent;return 0==e.button&&!(Be&&ze&&e.ctrlKey)},fs=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ms=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ps=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},ys=function(t){const e=t.originalEvent;return Q(void 0!==e,56),"mouse"==e.pointerType},vs=function(t){const e=t.originalEvent;return Q(void 0!==e,56),e.isPrimary&&0===e.button},xs=class extends hs{constructor(t){super({stopDown:y}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:cs(fs,vs);this.condition_=t.onFocusOnly?cs(ds,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,n=e.getEventPixel(ls(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const e=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map.getView();
1s=e,o=i.getResolution(),s[0]*=o,s[1]*=o,$t(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();var s,o;this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),o=e.getPixelFromCoordinateInternal(s),r=e.getCoordinateFromPixelInternal([o[0]-t*Math.cos(n),o[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(r),duration:500,easing:De})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const 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}},Ss=class extends hs{constructor(t){t=t||{},super({stopDown:y}),this.condition_=t.condition?t.condition:us,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!ys(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===Pe)return;const n=e.getSize(),s=t.pixel,o=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=o}handleUpEvent(t){return!ys(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!ys(t)&&(!(!_s(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}},Cs=class extends u{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Ii([i])}getGeometry(){return this.geometry_}};class ws extends h{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}const Es=class extends hs{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new Cs(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:_s,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new ws("boxdrag",t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new ws(e?"boxend":"boxcancel",t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new ws("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}},Is=class extends Es{constructor(t){super({condition:(t=t||{}).condition?t.condition:ms,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:De})}},bs="ArrowLeft",Rs="ArrowRight",Ts="ArrowDown",Ms=class extends rs{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return fs(t)&&ps(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==b){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==Ts||n==bs||n==Rs||"ArrowUp"==n)){const s=t.map.getView(),o=s.getResolution()*this.pixelDelta_;let r=0,a=0;n==Ts?a=-o:n==bs?r=-o:n==Rs?r=o:a=o;const l=[r,a];
1$t(l,s.getRotation()),function(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:Ne,center:t.getConstrainedCenter(s)})}}(s,l,this.duration_),i.preventDefault(),e=!0}}return!e}},Ls=class extends rs{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:ps,this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==b||t.type==R){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const s=t.map,o="+"===n?this.delta_:-this.delta_;os(s.getView(),o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}},Os=class extends rs{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:gs;this.condition_=t.onFocusOnly?cs(ds,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==M)return!0;const e=t.map,i=t.originalEvent;let n;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==M&&(n=i.deltaY,je&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=Ge),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;const s=Date.now();void 0===this.startTime_&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?"trackpad":"wheel");const o=e.getView();if("trackpad"===this.mode_&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-n/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=n;const r=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),r),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-$(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),os(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}},ks=class extends hs{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=y),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],s=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=s;const o=t.map,r=o.getView();r.getConstraints().rotation!==Pe&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(ls(this.targetPointers))),this.rotating_&&(o.render(),r.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const 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}},Ps=class extends hs{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=y),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],s=i.clientX-n.clientX,o=i.clientY-n.clientY,r=Math.sqrt(s*s+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/r),this.lastDistance_=r;const a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(ls(this.targetPointers))),a.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}};function As(t){return t[0]>0&&t[1]>0}function Ds(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}function Fs(t){t instanceof ki?t.setMapInternal(null):t instanceof Wn&&t.getLayers().forEac
1h(Fs)}function Ns(t,e){if(t instanceof ki)t.setMapInternal(e);else if(t instanceof Wn){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)Ns(i[t],e)}}const Ws=class extends j{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=function(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Wn({layers:t.layers});let s,o,r;return i[Un]=n,i[Hn]=t.target,i[qn]=t.view instanceof Li?t.view:new Li,void 0!==t.controls&&(Array.isArray(t.controls)?s=new nn(t.controls.slice()):(Q("function"==typeof t.controls.getArray,47),s=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?o=new nn(t.interactions.slice()):(Q("function"==typeof t.interactions.getArray,48),o=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?r=new nn(t.overlays.slice()):(Q("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new nn,{controls:s,interactions:o,keyboardEventTarget:e,overlays:r,values:i}}(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:Ge,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new nn;return(void 0===t.zoom||t.zoom)&&e.push(new ns(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new is(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new es(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new nn,i=new class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;for(;i>0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new Ss),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new as({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new xs({onFocusOnly:t.onF
1ocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new ks),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new Ps({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new Ms),e.push(new Ls({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new Os({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new Is({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new $n(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Un,this.handleLayerGroupChanged_),this.addChangeListener(qn,this.handleViewChanged_),this.addChangeListener(Zn,this.handleSizeChanged_),this.addChangeListener(Hn,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof Li||t.view.then((function(t){i.setView(new Li(t))})),this.controls.addEventListener(Qi,(t=>{t.element.setMap(this)})),this.controls.addEventListener($i,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(Qi,(t=>{t.element.setMap(this)})),this.interactions.addEventListener($i,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(Qi,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener($i,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Ns(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:p,r=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,r,e,null,o,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof Wn?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:p,s=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,o,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-e.left)/n,(o.clientY-e.top)/s]}getTarget(){return this.get(Hn)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return xe(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Ke(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Un)}setLayers(t){const e=this.getLayerGroup();if(t instanceof nn)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}
1getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const s=i.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Se(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Ke(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Zn)}getView(){return this.get(qn)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return function(t,e,i,n,s){if(!t||!(i in t.wantedTiles))return Jn;if(!t.wantedTiles[i][e.getKey()])return Jn;const o=t.viewState.center,r=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(s)+Math.sqrt(r*r+a*a)/s}(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new Bn(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===Gn||i===M||i===b){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target;if(this.overlayContainerStopEvent_.contains(n)||!(i===t?t.documentElement:i).contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[0]||e[1]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(at)&&this.renderer_.dispatchRenderEvent(at,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new jn(Kn,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new jn(Xn,this,t))));const i=this.postRenderFunctions_;for(let e=0,n=i.length;e<n;++e)i[e](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)k(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(E,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(M,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Ki(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}const t=this.getTarget(),e="string"==typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new An(this)),this.mapBrowserEventHandler_=new Vn(this,this.moveTolerance_);for(const t in zn)this.mapBrowserEventHandler_.addEventListener(zn[t],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(E,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(M,this.boundHandleBrowserEvent_,!!Xe&&{passive:!1});const t=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[L(t,b,this.handleBrowserEvent,this),L(t,R,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(k(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(k(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=L(t,c,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=L(t,w,this.handleViewPropertyChanged_,this),t.resolve
1Constraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(k),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Dn("addlayer",t)),this.layerGroupPropertyListenerKeys_=[L(t,c,this.render,this),L(t,w,this.render,this),L(t,"addlayer",this.handleLayerAdd_,this),L(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){Fs(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let s=null;if(void 0!==e&&As(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),o=i.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Vt(o.center,o.resolution,o.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:o,viewHints:n,wantedTiles:{},mapId:N(this),renderTargets:{}},o.nextCenter&&o.nextResolution){const t=isNaN(o.nextRotation)?o.rotation:o.nextRotation;s.nextExtent=Vt(o.nextCenter,o.nextResolution,t,e)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),n&&(!this.previousExtent_||!qt(this.previousExtent_)&&!Ft(s.extent,this.previousExtent_))&&(this.dispatchEvent(new jn("movestart",this,n)),this.previousExtent_=Dt(this.previousExtent_)),this.previousExtent_&&!s.viewHints[0]&&!s.viewHints[1]&&!Ft(s.extent,this.previousExtent_)&&(this.dispatchEvent(new jn("moveend",this,s)),Tt(s.extent,this.previousExtent_))),this.dispatchEvent(new jn(Yn,this,s)),this.renderComplete_=this.hasListener(Xn)||this.hasListener(Kn)||this.hasListener(at)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Dn("removelayer",e)),this.set(Un,t)}setSize(t){this.set(Zn,t)}setTarget(t){this.set(Hn,t)}setView(t){if(!t||t instanceof Li)return void this.set(qn,t);this.set(qn,new Li);const e=this;t.then((function(t){e.setView(new Li(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(s)||(e=[n,s],!As(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&oe("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&m(e,i)||(this.setSize(e),this.updateViewportSize_())}updateViewportSize_(){const t=this.getView();if(t){let e;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}}},js=class extends C{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state=n}changed(){this.dispatchEvent(w)}getExtent(){return this.extent}getImage(){return D()}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){D()}};let Bs;const zs=[];function Gs(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore(
1)}function Vs(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}const Ys=class extends js{constructor(t,e,i,n,s,o,r){let a=t.getExtent();a&&t.canWrapX()&&(a=a.slice(),a[0]=-1/0,a[2]=1/0);let l=e.getExtent();l&&e.canWrapX()&&(l=l.slice(),l[0]=-1/0,l[2]=1/0);const h=l?Xt(i,l):i,c=function(t,e,i,n){const s=pe(i,e,t);let o=ue(e,n,i);const r=e.getMetersPerUnit();void 0!==r&&(o*=r);const a=t.getMetersPerUnit();void 0!==a&&(o/=a);const l=t.getExtent();if(!l||Lt(l,s)){const e=ue(t,o,s)/o;isFinite(e)&&e>0&&(o/=e)}return o}(t,e,Gt(h),n),u=new class{constructor(t,e,i,n,s,o){this.sourceProj_=t,this.targetProj_=e;let r={};const a=me(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return r[e]||(r[e]=a(t)),r[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Zt(n)>=Zt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Zt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Zt(this.targetProj_.getExtent()):null;const l=Kt(i),h=Ut(i),c=zt(i),u=Bt(i),d=this.transformInv_(l),g=this.transformInv_(h),_=this.transformInv_(c),f=this.transformInv_(u),m=10+(o?Math.max(0,Math.ceil(Math.log2(function(t){let e=0;return qt(t)||(e=Zt(t)*Yt(t)),e}(i)/(o*o*256*256)))):0);if(this.addQuad_(l,h,c,u,d,g,_,f,m),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n<this.sourceWorldWidth_/2&&(e.source=i)}}))}r={}}addTriangle_(t,e,i,n,s,o){this.triangles_.push({source:[n,s,o],target:[t,e,i]})}addQuad_(t,e,i,n,s,o,r,a,l){const h=bt([s,o,r,a]),c=this.sourceWorldWidth_?Zt(h)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&c>.5&&c<1;let g=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(g=Zt(bt([t,e,i,n]))/this.targetWorldWidth_>.25||g),!d&&this.sourceProj_.isGlobal()&&c&&(g=c>.25||g)),!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!Ht(h,this.maxSourceExtent_))return;let _=0;if(!(g||isFinite(s[0])&&isFinite(s[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)g=!0;else if(_=(isFinite(s[0])&&isFinite(s[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(r[0])&&isFinite(r[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=_&&2!=_&&4!=_&&8!=_)return;if(l>0){if(!g){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let o;o=d?(nt(s[0],u)+nt(r[0],u))/2-nt(n[0],u):(s[0]+r[0])/2-n[0];const a=(s[1]+r[1])/2-n[1];g=o*o+a*a>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const h=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(h),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,h,u,s,o,c,d,l-1),this.addQuad_(u,h,i,n,d,c,r,a,l-1)}else{const h=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(h),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,h,u,n,s,c,d,a,l-1),this.addQuad_(h,e,i,u,c,o,r,d,l-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&_)&&this.addTriangle_(t,i,n,s,r,a),0==(14&_)&&this.addTriangle_(t,i,e,s,r,o),_&&(0==(13&_)&&this.addTriangle_(e,n,t,o,a,s),0==(7&_)&&this.addTriangle_(e,n,i,o,a,r))}calculateSourceExtent(){const t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){const s=e.source;Nt(t,s[0]),Nt(t,s[1]),Nt(t,s[2])})),t}getTriangles(){return this.triangles_}}(t,e,h,a,.5*c,n),d=u.calculateSourceExtent(),g=qt(d)?null:o(d,c,s),_=g?0:4,f=g?g.getPixelRatio():1;super(i,n,f,_),this.targetProj_=e,this.maxSourceExtent_=a,this.triangulation_=u,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=g,this.sourcePixelRatio_=f,this.interpolate_=r,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){1==this.state&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(2==t){const t=Zt(this.targetExtent_)/this.targetResolution_,e=Yt(this.targetExtent_)/this.targetResolution_;
1this.canvas_=function(t,e,i,n,s,o,r,a,l,h,c,u){const d=Vi(Math.round(i*t),Math.round(i*e),zs);if(u||(d.imageSmoothingEnabled=!1),0===l.length)return d.canvas;function g(t){return Math.round(t*i)/i}d.scale(i,i),d.globalCompositeOperation="lighter";const _=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){var n,s;n=_,(s=t.extent)[0]<n[0]&&(n[0]=s[0]),s[2]>n[2]&&(n[2]=s[2]),s[1]<n[1]&&(n[1]=s[1]),s[3]>n[3]&&(n[3]=s[3])}));const f=Zt(_),m=Yt(_),p=Vi(Math.round(i*f/n),Math.round(i*m/n),zs);u||(p.imageSmoothingEnabled=!1);const y=i/n;l.forEach((function(t,e,i){const n=t.extent[0]-_[0],s=-(t.extent[3]-_[3]),o=Zt(t.extent),r=Yt(t.extent);t.image.width>0&&t.image.height>0&&p.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,n*y,s*y,o*y,r*y)}));const v=Kt(r);return a.getTriangles().forEach((function(t,e,s){const r=t.source,a=t.target;let l=r[0][0],h=r[0][1],c=r[1][0],f=r[1][1],m=r[2][0],y=r[2][1];const x=g((a[0][0]-v[0])/o),S=g(-(a[0][1]-v[1])/o),C=g((a[1][0]-v[0])/o),w=g(-(a[1][1]-v[1])/o),E=g((a[2][0]-v[0])/o),I=g(-(a[2][1]-v[1])/o),b=l,R=h;l=0,h=0,c-=b,f-=R,m-=b,y-=R;const T=function(t){const e=t.length;for(let i=0;i<e;i++){let n=i,s=Math.abs(t[i][i]);for(let o=i+1;o<e;o++){const e=Math.abs(t[o][i]);e>s&&(s=e,n=o)}if(0===s)return null;const o=t[n];t[n]=t[i],t[i]=o;for(let n=i+1;n<e;n++){const s=-t[n][i]/t[i][i];for(let o=i;o<e+1;o++)i==o?t[n][o]=0:t[n][o]+=s*t[i][o]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}([[c,f,0,0,C-x],[m,y,0,0,E-x],[0,0,c,f,w-S],[0,0,m,y,I-S]]);if(T){if(d.save(),d.beginPath(),function(){if(void 0===Bs){const t=Vi(6,6,zs);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Gs(t,4,5,4,0),Gs(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Bs=Vs(e,0)||Vs(e,4)||Vs(e,8),Yi(t),zs.push(t.canvas)}return Bs}()||!u){d.moveTo(C,w);const t=4,e=x-C,i=S-w;for(let n=0;n<t;n++)d.lineTo(C+g((n+1)*e/t),w+g(n*i/(t-1))),n!=t-1&&d.lineTo(C+g((n+1)*e/t),w+g((n+1)*i/(t-1)));d.lineTo(E,I)}else d.moveTo(C,w),d.lineTo(x,S),d.lineTo(E,I);d.clip(),d.transform(T[0],T[2],T[1],T[3],x,S),d.translate(_[0]-b,_[3]-R),d.scale(n/i,-n/i),d.drawImage(p.canvas,0,0),d.restore()}}
1)),Yi(p),zs.push(p.canvas),c&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach((function(t,e,i){const n=t.target,s=(n[0][0]-v[0])/o,r=-(n[0][1]-v[1])/o,a=(n[1][0]-v[0])/o,l=-(n[1][1]-v[1])/o,h=(n[2][0]-v[0])/o,c=-(n[2][1]-v[1])/o;d.beginPath(),d.moveTo(a,l),d.lineTo(s,r),d.lineTo(h,c),d.closePath(),d.stroke()})),d.restore()),d.canvas}(t,e,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()}load(){if(0==this.state){this.state=1,this.changed();const t=this.sourceImage_.getState();2==t||3==t?this.reproject_():(this.sourceListenerKey_=L(this.sourceImage_,w,(function(t){const e=this.sourceImage_.getState();2!=e&&3!=e||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){k(this.sourceListenerKey_),this.sourceListenerKey_=null}};function Xs(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const Ks=class extends j{constructor(t){super(),this.projection=ce(t.projection),this.attributions_=Xs(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Xs(t),this.changed()}setState(t){this.state_=t,this.changed()}};class Us extends h{constructor(t,e){super(t),this.image=e}}function Zs(t,e){t.getImage().src=e}const Hs=class extends Ks{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();return e&&(t=e[g(e,t,0)]),t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||_e(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&_e(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&Ft(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Ys(s,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,s)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){return D()}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case 1:this.loading=!0,i="imageloadstart";break;case 2:this.loading=!1,i="imageloadend";break;case 3:this.loading=!1,i="imageloaderror";break;default:return}this.hasListener(i)&&this.dispatchEvent(new Us(i,e))}};function qs(t,e,i){const n=t;let s=!0,o=!1,r=!1;const a=[O(n,"load",(function(){r=!0,o||e()}))];return n.src&&Ye?(o=!0,n.decode().then((function(){s&&e()})).catch((function(t){s&&(r?e():i())}))):a.push(O(n,"error",i)),function(){s=!1,a.forEach(k)}}const Js=class extends js{constructor(t,e,i,n,s,o,r){super(t,e,i,0),this.src_=n,this.image_=new Image,null!==s&&(this.image_.crossOrigin=s),this.context_=r,this.unlisten_=null,this.state=0,this.imageLoadFunction_=o}getImage(){if(2==this.state&&this.context_&&!(this.image_ instanceof HTMLCanvasElement)){const t=this.context_.canvas;t.width=this.image_.width,t.height=this.image_.height,this.context_.drawImage(this.image_,0,0
1),this.image_=this.context_.canvas}return this.image_}handleImageError_(){this.state=3,this.unlistenImage_(),this.changed()}handleImageLoad_(){void 0===this.resolution&&(this.resolution=Yt(this.extent)/this.image_.height),this.state=2,this.unlistenImage_(),this.changed()}load(){0!=this.state&&3!=this.state||(this.state=1,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=qs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}setImage(t){this.image_=t,this.resolution=Yt(this.extent)/this.image_.height}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}},Qs=class extends Hs{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:Zs;super({attributions:t.attributions,interpolate:t.interpolate,projection:ce(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image_=new Js(this.imageExtent_,void 0,1,this.url_,e,i,Vi(1,1)),this.imageSize_=t.imageSize?t.imageSize:null,this.image_.addEventListener(w,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return Ht(t,this.image_.getExtent())?this.image_:null}getUrl(){return this.url_}handleImageChange(t){if(2==this.image_.getState()){const t=this.image_.getExtent(),e=this.image_.getImage();let i,n;this.imageSize_?(i=this.imageSize_[0],n=this.imageSize_[1]):(i=e.width,n=e.height);const s=Zt(t),o=Yt(t),r=s/i,a=o/n;let l=i,h=n;if(r>a?l=Math.round(s/a):h=Math.round(o/r),l!==i||h!==n){const t=Vi(l,h);this.getInterpolate()||(t.imageSmoothingEnabled=!1);const s=t.canvas;t.drawImage(e,0,0,i,n,0,0,s.width,s.height),this.image_.setImage(s)}}super.handleImageChange(t)}};class $s extends j{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new $s(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(k(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=L(t,w,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:(Q("function"==typeof t.getZIndex,41),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const to=$s;var eo=i(582);const io=class{constructor(t){this.rbush_=new eo(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[N(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const s=t[n],o=e[n],r={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:o};i[n]=r,this.items_[N(o)]=r}this.rbush_.load(i)}remove(t){const e=N(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[N(e)];Ft([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map((function(t){return t.value}))}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,s=t.length;n<s;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return S(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return At(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}},no="addfeature",so="removefeature";function oo(t,e){return[[-1/0,-1/0,1/0,1/0]]}function ro(t,e){return function(i,n,s,o,r){const a=this;
1!function(t,e,i,n,s,o,r){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,s):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();let n;"json"==t||"text"==t?n=a.responseText:"xml"==t?(n=a.responseXML,n||(n=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==t&&(n=a.response),n?o(e.readFeatures(n,{extent:i,featureProjection:s}),e.readProjection(n)):r()}else r()},a.onerror=r,a.send()}(t,e,i,n,s,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),r||v)}}class ao extends h{constructor(t,e,i){super(t),this.feature=e,this.features=i}}const lo=class extends Ks{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=v,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&(Q(this.format_,7),this.loader_=ro(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:oo;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,n;this.featuresRtree_=e?new io:null,this.loadedExtentsRtree_=new io,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?n=t.features:t.features&&(i=t.features,n=i.getArray()),e||void 0!==i||(i=new nn(n)),void 0!==n&&this.addFeaturesInternal(n),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=N(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new ao(no,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[L(e,w,this.handleFeatureChange_,this),L(e,c,this.handleFeatureChange_,this)]}addToIndex_(t,e){let i=!0;const n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(Q(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],s=N(n);this.addToIndex_(s,n)&&i.push(n)}for(let t=0,s=i.length;t<s;t++){const s=i[t],o=N(s);this.setupChangeEvents_(o,s);const r=s.getGeometry();if(r){const t=r.getExtent();e.push(t),n.push(s)}else this.nullGeometryFeatures_[o]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(no))for(let t=0,e=i.length;t<e;t++)this.dispatchEvent(new ao(no,i[t]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(no,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(so,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(Qi,(t=>{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener($i,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(k);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new ao("clear");this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){if(i.getGeometry().intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),S(this.nullGeometryFeatures_)||f(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=function(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];Jt(t,e);const n=Zt(i);if(Zt(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]<i[0])return[[t[0]+n,t[1],i[2],t[3]],[i[0],t[1],t[2],t[3]]];if(t[2]>i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const o=[NaN,NaN];let r=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||p,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=r;if(r=e.closestPointXY(i,n,o,r),r<l){s=t;const e=Math.sqrt(r);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}})),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=N(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const s=e.getId();if(void 0!==s){const t=s.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}
1else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new ao("changefeature",e))}hasFeature(t){const e=t.getId();return void 0!==e?e in this.idIndex_:N(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&S(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,s=this.strategy_(t,e,i);for(let t=0,o=s.length;t<o;++t){const o=s[t];n.forEachInExtent(o,(function(t){return Ot(t.extent,o)}))||(++this.loadingExtentsCount_,this.dispatchEvent(new ao("featuresloadstart")),this.loader_.call(this,o,e,i,(t=>{--this.loadingExtentsCount_,this.dispatchEvent(new ao("featuresloadend",void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new ao("featuresloaderror"))})),n.insert(o,{extent:o.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if(Ft(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=N(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=N(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(k),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new ao(so,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){Q(this.format_,7),this.url_=t,this.setLoader(ro(t,this.format_))}};class ho{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ds(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new ho({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return D()}getImage(t){return D()}getHitDetectionImage(){return D()}getPixelRatio(t){return 1}getImageState(){return D()}getImageSize(){return D()}getOrigin(){return D()}getSize(){return D()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ds(t)}listenImageChange(t){D()}load(){D()}unlistenImageChange(t){D()}}const co=ho;function uo(t){return Array.isArray(t)?Gi(t):t}class go extends co{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new go({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,n=Vi(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return 2}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,s=void 0===this.radius2_?n:this.radius2_;if(n<s){const t=n;n=s,s=t}const o=void 0===this.radius2_?this.points_:2*this.points_,r=2*Math.PI/o,a=s*Math.sin(r),l=n-Math.sqrt(s*s-a*a),h=Math.sqrt(a*a+l*l),c=h/a;if("miter"===t&&c<=i)return c*e;const u=e/2/c,d=e/2*(l/h),g=Math.sqrt((n+u)*(n+u)+d*d)-n;
1if(void 0===this.radius2_||"bevel"===t)return 2*g;const _=n*Math.sin(r),f=s-Math.sqrt(n*n-_*_),m=Math.sqrt(_*_+f*f)/_;if(m<=i){const t=m*e/2-s-n;return 2*Math.max(g,t)}return 2*g}createRenderOptions(){let t,e=xn,i=0,n=null,s=0,o=0;this.stroke_&&(t=this.stroke_.getColor(),null===t&&(t=Sn),t=uo(t),o=this.stroke_.getWidth(),void 0===o&&(o=1),n=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),e=this.stroke_.getLineJoin(),void 0===e&&(e=xn),i=this.stroke_.getMiterLimit(),void 0===i&&(i=10));const r=this.calculateLineJoinSize_(e,o,i),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+r),lineDash:n,lineDashOffset:s,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=pn),e.fillStyle=uo(t),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=Bi(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){const e=Vi(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/e;for(let r=0;r<e;r++){const e=s+r*o,a=r%2==0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=pn,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const _o=go;class fo extends _o{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new fo({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const mo=fo;class po{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null}clone(){const t=this.getColor();return new po({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const yo=po;class vo{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new vo({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const xo=vo;class So{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Eo,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new So({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.get
1Stroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Eo,this.geometry_=t}setZIndex(t){this.zIndex_=t}}let Co=null;function wo(t,e){if(!Co){const t=new yo({color:"rgba(255,255,255,0.4)"}),e=new xo({color:"#3399CC",width:1.25});Co=[new So({image:new mo({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return Co}function Eo(t){return t.getGeometry()}const Io=So;let bo=null;class Ro extends C{constructor(t,e,i,n,s,o){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=s,this.size_=i,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&2===this.imageState_){bo||(bo=Vi(1,1,void 0,{willReadFrequently:!0})),bo.drawImage(this.image_,0,0);try{bo.getImageData(0,0,1,1),this.tainted_=!1}catch(t){bo=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(w)}handleImageError_(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=2,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=Vi(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(0===this.imageState_){this.image_||this.initializeImage_(),this.imageState_=1;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=qs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||2!==this.imageState_)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=Wi(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function To(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class Mo extends co{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const o=void 0!==t.img?t.img:null;this.imgSize_=t.imgSize;let r=t.src;Q(!(void 0!==r&&o),4),Q(!o||o&&this.imgSize_,5),void 0!==r&&0!==r.length||!o||(r=o.src||N(o)),Q(void 0!==r&&r.length>0,6),Q(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),69);const a=void 0!==t.src?0:2;if(this.color_=void 0!==t.color?Bi(t.color):null,this.iconImage_=function(t,e,
1i,n,s,o){let r=on.get(e,n,o);return r||(r=new Ro(t,e,i,n,s,o),on.set(e,n,o,r)),r}(o,r,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,a,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(!(n instanceof HTMLCanvasElement||n.src&&n.complete)){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(To(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}e=n.width,i=n.height}void 0!==e&&this.setScale(To(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Mo({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:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(w,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(w,t)}}const Lo=Mo;class Oo{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Ds(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new yo({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new Oo({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.get
1Stroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ds(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const ko=Oo;function Po(t){return new Io({fill:Ao(t,""),stroke:Do(t,""),text:Fo(t),image:No(t)})}function Ao(t,e){const i=t[e+"fill-color"];if(i)return new yo({color:i})}function Do(t,e){const i=t[e+"stroke-width"],n=t[e+"stroke-color"];if(i||n)return new xo({width:i,color:n,lineCap:t[e+"stroke-line-cap"],lineJoin:t[e+"stroke-line-join"],lineDash:t[e+"stroke-line-dash"],lineDashOffset:t[e+"stroke-line-dash-offset"],miterLimit:t[e+"stroke-miter-limit"]})}function Fo(t){const e=t["text-value"];if(e)return new ko({text:e,font:t["text-font"],maxAngle:t["text-max-angle"],offsetX:t["text-offset-x"],offsetY:t["text-offset-y"],overflow:t["text-overflow"],placement:t["text-placement"],repeat:t["text-repeat"],scale:t["text-scale"],rotateWithView:t["text-rotate-with-view"],rotation:t["text-rotation"],textAlign:t["text-align"],justify:t["text-justify"],textBaseline:t["text-baseline"],padding:t["text-padding"],fill:Ao(t,"text-"),backgroundFill:Ao(t,"text-background-"),stroke:Do(t,"text-"),backgroundStroke:Do(t,"text-background-")})}function No(t){const e=t["icon-src"],i=t["icon-img"];if(e||i)return new Lo({src:e,img:i,imgSize:t["icon-img-size"],anchor:t["icon-anchor"],anchorOrigin:t["icon-anchor-origin"],anchorXUnits:t["icon-anchor-x-units"],anchorYUnits:t["icon-anchor-y-units"],color:t["icon-color"],crossOrigin:t["icon-cross-origin"],offset:t["icon-offset"],displacement:t["icon-displacement"],opacity:t["icon-opacity"],scale:t["icon-scale"],width:t["icon-width"],height:t["icon-height"],rotation:t["icon-rotation"],rotateWithView:t["icon-rotate-with-view"],size:t["icon-size"],declutterMode:t["icon-declutter-mode"]});const n=t["shape-points"];if(n){const e="shape-";return new _o({points:n,fill:Ao(t,e),stroke:Do(t,e),radius:t["shape-radius"],radius1:t["shape-radius1"],radius2:t["shape-radius2"],angle:t["shape-angle"],displacement:t["shape-displacement"],rotation:t["shape-rotation"],rotateWithView:t["shape-rotate-with-view"],scale:t["shape-scale"],declutterMode:t["shape-declutter-mode"]})}const s=t["circle-radius"];if(s){const e="circle-";return new mo({radius:s,fill:Ao(t,e),stroke:Do(t,e),displacement:t["circle-displacement"],scale:t["circle-scale"],rotation:t["circle-rotation"],rotateWithView:t["circle-rotate-with-view"],declutterMode:t["circle-declutter-mode"]})}}const Wo="renderOrder",jo=class extends ki{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Wo)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new eo(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(Wo,t)}setStyle(t){let e;if(void 0===t)e=wo;else if(null===t)e=null;else if("function"==typeof t)e=t;else if(t instanceof Io)e=t;else if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let e=0;e<i;++e){const i=t[e];n[e]=i instanceof Io?i:Po(i)}e=n}else e=Po(t);this.style_=e,this.styleFunction_=null===t?void 0:function(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:(Q("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()}},Bo={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},zo=[Bo.FILL],Go=[Bo.STROKE],Vo=[Bo.BEGIN_PATH],Yo=[Bo.CLOSE_PATH],Xo=Bo,Ko=class{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}},Uo=class extends Ko{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let r=0,a=t.length;r<a;r+=e)n[0]=t[r],n[1]=t[r+1],Lt(i,n)&&(s[o++]=n[0],s[o++]=n[1]);return o}appendFlatLineCoordinates(t,e,i,n,s,o){const r=this.coordinates;let a=r.length;const l=this.getBufferedMaxExtent();o&&(e+=n);let h=t[e],c=t[e+1];const u=this.tmpCoordinate_;let d,g,_,f=!0;for(d=e+n;d<i;d+=n)u[0]=t[d],u[1]=t[d+1],_=Pt(l,u),_!==g?(f&&(r[a++]=h,r[a++]=c,f=!1),r[a++]=u[0],r[a++]=u[1]):_===It.INTERSECTING?(r[a++]=u[0],r[a++]=u[1],f=!1):f=!0,h=u[0],c=u[1],g=_;return(s&&f||d===e+n)&&(r[a++]=h,r[a++]=c),a}drawCustomCoordinates_(t,e,i,n,s){for(let o=0,r=i.length;o<r;++o){const r=i[o],a=this.appendFlatLineCoordinates(t,e,r,n,!1,!1);s.push(a),e=r}return e}drawCustom(t,e,i,n){this.beginGeometry(t,e);const s=t.getType(),o=t.getStride(),r=this.coordinates.length;let a,l,h,c,u;switch(s){case"MultiPolygon":a=t.getOrientedFlatCoordinates(),c=[];const e=t.getEndss();u=0;for(let t=0,i=e.length;t<i;++t){const i=[];u=this.drawCustomCoordinates_(a,u,e[t],o,i),c.push(i)}this.instructions.push([Xo.CUSTOM,r,c,t,i,ui]),this.hitDetectionInstructions.push([Xo.CUSTOM,r,c,t,n||i,ui]);break;case"Polygon":case"MultiLineString":h=[],a="Polygon"==s?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),u=this.drawCustomCoordinates_(a,0,t.getEnds(),o,h),this.instructions.push([Xo.CUSTOM,r,h,t,i,ci]),this.hitDetectionInstructions.push([Xo.CUSTOM,r,h,t,n||i,ci]);break;
1case"LineString":case"Circle":a=t.getFlatCoordinates(),l=this.appendFlatLineCoordinates(a,0,a.length,o,!1,!1),this.instructions.push([Xo.CUSTOM,r,l,t,i,hi]),this.hitDetectionInstructions.push([Xo.CUSTOM,r,l,t,n||i,hi]);break;case"MultiPoint":a=t.getFlatCoordinates(),l=this.appendFlatPointCoordinates(a,o),l>r&&(this.instructions.push([Xo.CUSTOM,r,l,t,i,hi]),this.hitDetectionInstructions.push([Xo.CUSTOM,r,l,t,n||i,hi]));break;case"Point":a=t.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),l=this.coordinates.length,this.instructions.push([Xo.CUSTOM,r,l,t,i]),this.hitDetectionInstructions.push([Xo.CUSTOM,r,l,t,n||i])}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Xo.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Xo.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,s,o=-1;for(e=0;e<i;++e)n=t[e],s=n[0],s==Xo.END_GEOMETRY?o=e:s==Xo.BEGIN_GEOMETRY&&(n[2]=e,_(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const e=t.getColor();i.fillStyle=uo(e||pn)}else i.fillStyle=void 0;if(e){const t=e.getColor();i.strokeStyle=uo(t||Sn);const n=e.getLineCap();i.lineCap=void 0!==n?n:yn;const s=e.getLineDash();i.lineDash=s?s.slice():vn;const o=e.getLineDashOffset();i.lineDashOffset=o||0;const r=e.getLineJoin();i.lineJoin=void 0!==r?r:xn;const a=e.getWidth();i.lineWidth=void 0!==a?a:1;const l=e.getMiterLimit();i.miterLimit=void 0!==l?l:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[Xo.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Xo.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,o=t.lineDashOffset,r=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!m(t.currentLineDash,s)||t.currentLineDashOffset!=o||t.currentLineJoin!=r||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=o,t.currentLineJoin=r,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Xo.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Tt(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Rt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},Zo=class extends Uo{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const s=this.state,o=void 0!==s.fillStyle,r=void 0!==s.strokeStyle,a=i.length;this.instructions.push(Vo),this.hitDetectionInstructions.push(Vo);for(let s=0;s<a;++s){const o=i[s],a=this.coordinates.length,l=this.appendFlatLineCoordinates(t,e,o,n,!0,!r),h=[Xo.MOVE_TO_LINE_TO,a,l];this.instructions.push(h),this.hitDetectionInstructions.push(h),r&&(this.instructions.push(Yo),this.hitDetectionInstructions.push(Yo)),e=o}return o&&(this.instructions.push(zo),this.hitDetectionInstructions.push(zo)),r&&(this.instructions.push(Go),this.hitDetectionInstructions.push(Go)),e}drawCircle(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Xo.SET_FILL_STYLE,pn]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Xo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getFlatCoordinates(),r=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,r,!1,!1);const l=[Xo.CIRCLE,a];this.instructions.push(Vo,l),this.hitDetectionInstructions.push(Vo,l),void 0!==i.fillStyle&&(this.instructions.push(zo),this.hitDetectionInstructions.push(zo)),void 0!==i.strokeStyle&&(this.instructions.push(Go),this.hitDetectionInstructions.push(Go)),this.endGeometry(e)}drawPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Xo.SET_FILL_STYLE,pn]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Xo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getEnds(),r=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(r,0,o,a),this.endGeometry(e)}drawMultiPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Xo.SET_FILL_STYLE,pn]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Xo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getEndss(),r=t.getOrientedFlatCoordinates(),a=t.getStride();let l=0;for(let t=0,e=o.length;t<e;++t)l=this.drawFlatCoordinatess_(r,l,o[t],a);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=ai(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}};function Ho(t,e,i,n,s){const o=[];let r=i,a=0,l=e.slice(i,2);for(;a<t&&r+s<n;){const[i,n]=l.slice(-2),h=e[r+s],c=e[r+s+1],u=Math.sqrt((h-i)*(h-i)+(c-n)*(c-n));if(a+=u,a>=t){const e=(t-a+u)/u,d=st(i,h,e),g=st(n,c,e);l.push(d,g),o.push(l),l=[d,g],a==t&&(r+=s),a=0}else if(a<t)l.push(e[r+s],e[r+s+1]),r+=s;else{const t=u-a,e=st(i,h,t/u),d=st(n,c,t/u);l.push(e,d),o.push(l),l=[e,d],a=0,r+=s}}return a>0&&o.push(l),o}function qo(t,e,i,n,s){let o,r,a,l,h,c,u,d,g,_,f=i,m=i,p=0,y=0,v=i;for(r=i;r<n;r+=s){const i=e[r],n=e[r+1];void 0!==h&&(g=i-h,_=n-c,l=Math.sqrt(g*g+_*_),void 0!==u&&(y+=a,o=Math.acos((u*g+d*_)/(a*l)),o>t&&(y>p&&(p=y,f=v,m=r),y=0,v=r-s)),a=l,u=g,d=_),h=i,c=n}return y+=l,y>p?[v,r]:[f,m]}const Jo={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Qo={Circle:Zo,Default:Uo,Image:class extends Uo{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([Xo.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.
1ceil(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([Xo.DRAW_IMAGE,s,o,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)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([Xo.DRAW_IMAGE,s,o,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([Xo.DRAW_IMAGE,s,o,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)}finish(){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,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}},LineString:class extends Uo{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),r=[Xo.MOVE_TO_LINE_TO,s,o];return this.instructions.push(r),this.hitDetectionInstructions.push(r),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Xo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,vn,0],Vo);const o=t.getFlatCoordinates(),r=t.getStride();this.drawFlatCoordinates_(o,0,o.length,r),this.hitDetectionInstructions.push(Go),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Xo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Vo);const o=t.getEnds(),r=t.getFlatCoordinates(),a=t.getStride();let l=0;for(let t=0,e=o.length;t<e;++t)l=this.drawFlatCoordinates_(r,l,o[t],a);this.hitDetectionInstructions.push(Go),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Go),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Go),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Vo)}},Polygon:Zo,Text:class extends Uo{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,s=this.textState_;if(""===this.text_||!s||!i&&!n)return;const o=this.coordinates;let r=o.length;const a=t.getType();let l=null,h=t.getStride();if("line"!==s.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){let i=s.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(),s.overflow||i.push(l[2]/this.resolution),h=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();l=[];for(let t=0,n=e.length;t<n;t+=3)s.overflow||i.push(e[t+2]/this.resolution),l.push(e[t],e[t+1]);if(0===l.length)return;h=2}const n=this.appendFlatPointCoordinates(l,h);if(n===r)return;if(i&&(n-r)/2!=l.length/h){let t=r/2;i=i.filter(((e,i)=>
1{const n=o[2*(t+i)]===l[i*h]&&o[2*(t+i)+1]===l[i*h+1];return n||--t,n}))}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let c=s.padding;if(c!=En&&(s.scale[0]<0||s.scale[1]<0)){let t=s.padding[0],e=s.padding[1],i=s.padding[2],n=s.padding[3];s.scale[0]<0&&(e=-e,n=-n),s.scale[1]<0&&(t=-t,i=-i),c=[t,e,i,n]}const u=this.pixelRatio;this.instructions.push([Xo.DRAW_IMAGE,r,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==En?En:c.map((function(t){return t*u})),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const d=1/u;this.hitDetectionInstructions.push([Xo.DRAW_IMAGE,r,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[d,d],NaN,void 0,this.declutterImageWithText_,c,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),this.endGeometry(e)}else{if(!Ht(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(l=t.getFlatCoordinates(),"LineString"==a)i=[l.length];else if("MultiLineString"==a)i=t.getEnds();else if("Polygon"==a)i=t.getEnds().slice(0,1);else if("MultiPolygon"==a){const e=t.getEndss();i=[];for(let t=0,n=e.length;t<n;++t)i.push(e[t][0])}this.beginGeometry(t,e);const n=s.repeat,c=n?void 0:s.textAlign;let u=0;for(let t=0,e=i.length;t<e;++t){let e;e=n?Ho(n*this.resolution,l,u,i[t],h):[l.slice(u,i[t])];for(let n=0,a=e.length;n<a;++n){const a=e[n];let l=0,d=a.length;if(null==c){const t=qo(s.maxAngle,a,0,a.length,2);l=t[0],d=t[1]}for(let t=l;t<d;t+=h)o.push(a[t],a[t+1]);const g=o.length;u=i[t],this.drawChars_(r,g),r=g}}this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||Cn,justify:e.justify,textBaseline:e.textBaseline||wn,scale:e.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,o=this.textKey_,r=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,l=Jo[n.textBaseline],h=this.textOffsetY_*a,c=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([Xo.DRAW_CHARS,t,e,l,n.overflow,r,n.maxAngle,a,h,s,u*a,c,o,1]),this.hitDetectionInstructions.push([Xo.DRAW_CHARS,t,e,l,n.overflow,r,n.maxAngle,1,h,s,u,c,o,1/a])}setTextStyle(t,e){let i,n,s;
1if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=uo(e.getColor()||pn)):(n=null,this.textFillState_=n);const o=t.getStroke();if(o){s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const t=o.getLineDash(),e=o.getLineDashOffset(),i=o.getWidth(),n=o.getMiterLimit();s.lineCap=o.getLineCap()||yn,s.lineDash=t?t.slice():vn,s.lineDashOffset=void 0===e?0:e,s.lineJoin=o.getLineJoin()||xn,s.lineWidth=void 0===i?1:i,s.miterLimit=void 0===n?10:n,s.strokeStyle=uo(o.getColor()||Sn)}else s=null,this.textStrokeState_=s;i=this.textState_;const r=t.getFont()||mn;Mn(r);const a=t.getScaleArray();i.overflow=t.getOverflow(),i.font=r,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||wn,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||En,i.scale=void 0===a?[1,1]:a;const l=t.getOffsetX(),h=t.getOffsetY(),c=t.getRotateWithView(),u=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===l?0:l,this.textOffsetY_=void 0===h?0:h,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0===u?0:u,this.strokeKey_=s?("string"==typeof s.strokeStyle?s.strokeStyle:N(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+N(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e}}},$o=class{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const s=i[n].finish();t[e][n]=s}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let s=n[e];return void 0===s&&(s=new(0,Qo[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=s),s}};function tr(t,e,i,n,s,o,r,a,l,h,c,u){let d=t[e],g=t[e+1],_=0,f=0,m=0,p=0;function y(){_=d,f=g,d=t[e+=n],g=t[e+1],p+=m,m=Math.sqrt((d-_)*(d-_)+(g-f)*(g-f))}do{y()}while(e<i-n&&p+m<o);let v=0===m?0:(o-p)/m;const x=st(_,d,v),S=st(f,g,v),C=e-n,w=p,E=o+a*l(h,s,c);for(;e<i-n&&p+m<E;)y();v=0===m?0:(E-p)/m;const I=st(_,d,v),b=st(f,g,v);let R;if(u){const t=[x,S,I,b];Qe(t,0,4,2,u,t,t),R=t[0]>t[2]}else R=x>I;const T=Math.PI,M=[],L=C+n===e;let O;if(m=0,p=w,d=t[e=C],g=t[e+1],L){y(),O=Math.atan2(g-f,d-_),R&&(O+=O>0?-T:T);const t=(I+x)/2,e=(b+S)/2;return M[0]=[t,e,(E-o)/2,O,s],M}for(let t=0,u=(s=s.replace(/\n/g," ")).length;t<u;){y();let x=Math.atan2(g-f,d-_);if(R&&(x+=x>0?-T:T),void 0!==O){let t=x-O;if(t+=t>T?-2*T:t<-T?2*T:0,Math.abs(t)>r)return null}O=x;const S=t;let C=0;for(;t<u;++t){const r=a*l(h,s[R?u-t-1:t],c);if(e+n<i&&p+m<o+C+r/2)break;C+=r}if(t===S)continue;const w=R?s.substring(u-S,u-t):s.substring(S,t);v=0===m?0:(o+C/2-p)/m;const E=st(_,d,v),I=st(f,g,v);M.push([E,I,C/2,x,w]),o+=C}return M}function er(t,e,i,n){let s=t[e],o=t[e+1],r=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];r+=Math.sqrt((e-s)*(e-s)+(i-o)*(i-o)),s=e,o=i}return r}const ir=[1/0,1/0,-1/0,-1/0],nr=[],sr=[],or=[],rr=[];function ar(t){return t[3].declutterBox}const lr=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function hr(t,e){return"start"!==e&&"end"!==e||lr.test(t)||(e="start"===e?"left":"right"),Jo[e]}function cr(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}const ur=class{constructor(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,n){const s=t+e+i+n;
1if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,r=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(t),u=a.justify?Jo[a.justify]:hr(Array.isArray(t)?t[0]:t,a.textAlign||Cn),d=n&&o.lineWidth?o.lineWidth:0,g=c?t:t.split("\n").reduce(cr,[]),{width:_,height:f,widths:m,heights:p,lineWidths:y}=function(t,e){const i=[],n=[],s=[];let o=0,r=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){o=Math.max(o,r),s.push(r),r=0,a+=l;continue}const d=e[h+1]||t.font,g=kn(d,u);i.push(g),r+=g;const _=Ln(d);n.push(_),l=Math.max(l,_)}return{width:o,height:a,widths:i,heights:n,lineWidths:s}}(a,g),v=_+d,x=[],S=(v+2)*h[0],C=(f+d)*h[1],w={width:S<0?Math.floor(S):Math.ceil(S),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:x};1==h[0]&&1==h[1]||x.push("scale",h),n&&(x.push("strokeStyle",o.strokeStyle),x.push("lineWidth",d),x.push("lineCap",o.lineCap),x.push("lineJoin",o.lineJoin),x.push("miterLimit",o.miterLimit),x.push("setLineDash",[o.lineDash]),x.push("lineDashOffset",o.lineDashOffset)),i&&x.push("fillStyle",r.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");const E=.5-u;let I=u*v+E*d;const b=[],R=[];let T,M=0,L=0,O=0,k=0;for(let t=0,e=g.length;t<e;t+=2){const e=g[t];if("\n"===e){L+=M,M=0,I=u*v+E*d,++k;continue}const s=g[t+1]||a.font;s!==T&&(n&&b.push("font",s),i&&R.push("font",s),T=s),M=Math.max(M,p[O]);const o=[e,I+E*m[O]+u*(m[O]-y[k]),.5*(d+M)+L];I+=m[O],n&&b.push("strokeText",o),i&&R.push("fillText",o),++O}return Array.prototype.push.apply(x,b),Array.prototype.push.apply(x,R),this.labels_[s]=w,w}replayTextBackground_(t,e,i,n,s,o,r){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,s),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),r&&(this.setStrokeStyle_(t,r),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,s,o,r,a,l,h,c,u,d,g,_,f){let m=i-(r*=u[0]),p=n-(a*=u[1]);const y=s+l>t?t-l:s,v=o+h>e?e-h:o,x=g[3]+y*u[0]+g[1],S=g[0]+v*u[1]+g[2],C=m-g[3],w=p-g[0];let E;return(_||0!==c)&&(nr[0]=C,rr[0]=C,nr[1]=w,sr[1]=w,sr[0]=C+x,or[0]=sr[0],or[1]=w+S,rr[1]=or[1]),0!==c?(E=Ue([1,0,0,1,0,0],i,n,1,1,c,-i,-n),Ke(E,nr),Ke(E,sr),Ke(E,or),Ke(E,rr),At(Math.min(nr[0],sr[0],or[0],rr[0]),Math.min(nr[1],sr[1],or[1],rr[1]),Math.max(nr[0],sr[0],or[0],rr[0]),Math.max(nr[1],sr[1],or[1],rr[1]),ir)):At(Math.min(C,C+x),Math.min(w,w+S),Math.max(C,C+x),Math.max(w,w+S),ir),d&&(m=Math.round(m),p=Math.round(p)),{drawImageX:m,drawImageY:p,drawImageW:y,drawImageH:v,originX:l,originY:h,declutterBox:{minX:ir[0],minY:ir[1],maxX:ir[2],maxY:ir[3],value:f},canvasTransform:E,scale:u}}replayImageOrLabel_(t,e,i,n,s,o,r){const a=!(!o&&!r),l=n.declutterBox,h=t.canvas,c=r?r[2]*n.scale[0]/2:0;return l.minX-c<=h.width/e&&l.maxX+c>=0&&l.minY-c<=h.height/e&&l.maxY+c>=0&&(a&&this.replayTextBackground_(t,nr,sr,or,rr,o,r),function(t,e,i,n,s,o,r,a,l,h,c){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t<n;t+=2)Array.isArray(i[t+1])?e[i[t]].apply(e,i[t+1]):e[i[t]]=i[t+1]}(n,t)):c[0]<0||c[1]<0?(t.translate(l,h),t.scale(c[0],c[1]),t.drawImage(n,s,o,r,a,0,0,r,a)):t.drawImage(n,s,o,r,a,l,h,r*c[0],a*c[1]),t.restore()}(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=Ke(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),r=this.strokeStates[i],a=this.pixelRatio,l=hr(Array.isArray(t)?t[0]:t,s.textAlign||Cn),h=Jo[s.textBaseline||wn],c=r&&r.lineWidth?r.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*s.scale[0])+2*(.5-l)*c,anchorY:h*o.height/a+2*(.5-h)*c}}execute_(t,e,i,n,s,o,r,a){let l;var h,c;this.pixelCoordinates_&&m(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Je(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),c=i,(h=this.renderedTransform_)[0]=c[0],h[1]=c[1],h[2]=c[2],h[3]=c[3],h[4]=c[4],h[5]=c[5]);let u=0;const d=n.length;
1let g,_,f,p,y,v,x,S,C,w,E,I,b=0,R=0,T=0,M=null,L=null;const O=this.coordinateCache_,k=this.viewRotation_,P=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,A={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:k},D=this.instructions!=n||this.overlaps?0:200;let F,N,W,j;for(;u<d;){const i=n[u];switch(i[0]){case Xo.BEGIN_GEOMETRY:F=i[1],j=i[3],F.getGeometry()?void 0===r||Ht(r,j.getExtent())?++u:u=i[2]+1:u=i[2];break;case Xo.BEGIN_PATH:R>D&&(this.fill_(t),R=0),T>D&&(t.stroke(),T=0),R||T||(t.beginPath(),p=NaN,y=NaN),++u;break;case Xo.CIRCLE:b=i[1];const n=l[b],h=l[b+1],c=l[b+2]-n,d=l[b+3]-h,m=Math.sqrt(c*c+d*d);t.moveTo(n+m,h),t.arc(n,h,m,0,2*Math.PI,!0),++u;break;case Xo.CLOSE_PATH:t.closePath(),++u;break;case Xo.CUSTOM:b=i[1],g=i[2];const B=i[3],z=i[4],G=6==i.length?i[5]:void 0;A.geometry=B,A.feature=F,u in O||(O[u]=[]);const V=O[u];G?G(l,b,g,2,V):(V[0]=l[b],V[1]=l[b+1],V.length=2),z(V,A),++u;break;case Xo.DRAW_IMAGE:b=i[1],g=i[2],S=i[3],_=i[4],f=i[5];let Y=i[6];const X=i[7],K=i[8],U=i[9],Z=i[10];let H=i[11];const q=i[12];let J=i[13];const Q=i[14],$=i[15];if(!S&&i.length>=20){C=i[19],w=i[20],E=i[21],I=i[22];const t=this.drawLabelWithPointPlacement_(C,w,E,I);S=t.label,i[3]=S;const e=i[23];_=(t.anchorX-e)*this.pixelRatio,i[4]=_;const n=i[24];f=(t.anchorY-n)*this.pixelRatio,i[5]=f,Y=S.height,i[6]=Y,J=S.width,i[13]=J}let tt,et,it,nt;i.length>25&&(tt=i[25]),i.length>17?(et=i[16],it=i[17],nt=i[18]):(et=En,it=!1,nt=!1),Z&&P?H+=k:Z||P||(H-=k);let st=0;for(;b<g;b+=2){if(tt&&tt[st++]<J/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(S.width,S.height,l[b],l[b+1],J,Y,_,f,K,U,H,q,s,et,it||nt,F),n=[t,e,S,i,X,it?M:null,nt?L:null];if(a){if("none"===Q)continue;if("obstacle"===Q){a.insert(i.declutterBox);continue}{let t,e;if($){const i=g-b;if(!$[i]){$[i]=n;continue}if(t=$[i],delete $[i],e=ar(t),a.collides(e))continue}if(a.collides(i.declutterBox))continue;t&&(a.insert(e),this.replayImageOrLabel_.apply(this,t)),a.insert(i.declutterBox)}}this.replayImageOrLabel_.apply(this,n)}++u;break;case Xo.DRAW_CHARS:const ot=i[1],rt=i[2],at=i[3],lt=i[4];I=i[5];const ht=i[6],ct=i[7],ut=i[8];E=i[9];const dt=i[10];C=i[11],w=i[12];const gt=[i[13],i[13]],_t=this.textStates[w],ft=_t.font,mt=[_t.scale[0]*ct,_t.scale[1]*ct];let pt;ft in this.widths_?pt=this.widths_[ft]:(pt={},this.widths_[ft]=pt);const yt=er(l,ot,rt,2),vt=Math.abs(mt[0])*Pn(ft,C,pt);if(lt||vt<=yt){const i=this.textStates[w].textAlign,n=tr(l,ot,rt,2,C,(yt-vt)*Jo[i],ht,Math.abs(mt[0]),Pn,ft,pt,P?0:this.viewRotation_);t:if(n){const i=[];let s,o,r,l,h;if(E)for(s=0,o=n.length;s<o;++s){h=n[s],r=h[4],l=this.createLabel(r,w,"",E),_=h[2]+(mt[0]<0?-dt:dt),f=at*l.height+2*(.5-at)*dt*mt[1]/mt[0]-ut;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,_,f,0,0,h[3],gt,!1,En,!1,F);if(a&&a.collides(o.declutterBox))break t;i.push([t,e,l,o,1,null,null])}if(I)for(s=0,o=n.length;s<o;++s){h=n[s],r=h[4],l=this.createLabel(r,w,I,""),_=h[2],f=at*l.height-ut;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,_,f,0,0,h[3],gt,!1,En,!1,F);if(a&&a.collides(o.declutterBox))break t;i.push([t,e,l,o,1,null,null])}a&&a.load(i.map(ar));for(let t=0,e=i.length;t<e;++t)this.replayImageOrLabel_.apply(this,i[t])}}++u;break;case Xo.END_GEOMETRY:if(void 0!==o){F=i[1];const t=o(F,j);if(t)return t}++u;break;case Xo.FILL:D?R++:this.fill_(t),++u;break;case Xo.MOVE_TO_LINE_TO:for(b=i[1],g=i[2],N=l[b],W=l[b+1],v=N+.5|0,x=W+.5|0,v===p&&x===y||(t.moveTo(N,W),p=v,y=x),b+=2;b<g;b+=2)N=l[b],W=l[b+1],v=N+.5|0,x=W+.5|0,b!=g-2&&v===p&&x===y||(t.lineTo(N,W),p=v,y=x);++u;break;case Xo.SET_FILL_STYLE:M=i,this.alignFill_=i[2],R&&(this.fill_(t),R=0,T&&(t.stroke(),T=0)),t.fillStyle=i[1],++u;break;case Xo.SET_STROKE_STYLE:L=i,T&&(t.stroke(),T=0),this.setStrokeStyle_(t,i),++u;break;case Xo.STROKE:D?T++:t.stroke(),++u;break;default:++u}}R&&this.fill_(t),T&&t.stroke()}execute(t,e,i,n,s,o){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,s,void 0,void 0,o)}executeHitDetection(t,e,i,n,s){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,s)}},dr=["Polygon","Circle","LineString","Image","Text","Default"],gr={},_r=class{constructor(t,e,i,n,s,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_
1={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(s)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t){for(const e in t){let i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);const n=t[e];for(const t in n){const e=n[t];i[t]=new ur(this.resolution_,this.pixelRatio_,this.overlaps_,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,s,o){const r=2*(n=Math.round(n))+1,a=Ue(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=Vi(r,r,void 0,{willReadFrequently:!0}));const h=this.hitDetectionContext_;let c;h.canvas.width!==r||h.canvas.height!==r?(h.canvas.width=r,h.canvas.height=r):l||h.clearRect(0,0,r,r),void 0!==this.renderBuffer_&&(c=[1/0,1/0,-1/0,-1/0],Nt(c,t),Rt(c,e*(this.renderBuffer_+n),c));const u=function(t){if(void 0!==gr[t])return gr[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let s=0;s<=t;++s)for(let o=0;o<=t;++o){const r=s*s+o*o;if(r>i)break;let a=n[r];a||(a=[],n[r]=a),a.push(4*((t+s)*e+(t+o))+3),s>0&&a.push(4*((t-s)*e+(t+o))+3),o>0&&(a.push(4*((t+s)*e+(t-o))+3),s>0&&a.push(4*((t-s)*e+(t-o))+3))}const s=[];for(let t=0,e=n.length;t<e;++t)n[t]&&s.push(...n[t]);return gr[t]=s,s}(n);let g;function _(t,e){const i=h.getImageData(0,0,r,r).data;for(let a=0,l=u.length;a<l;a++)if(i[u[a]]>0){if(!o||"Image"!==g&&"Text"!==g||o.includes(t)){const i=(u[a]-3)/4,o=n-i%r,l=n-(i/r|0),h=s(t,e,o*o+l*l);if(h)return h}h.clearRect(0,0,r,r);break}}const f=Object.keys(this.executorsByZIndex_).map(Number);let m,p,y,v,x;for(f.sort(d),m=f.length-1;m>=0;--m){const t=f[m].toString();for(y=this.executorsByZIndex_[t],p=dr.length-1;p>=0;--p)if(g=dr[p],v=y[g],void 0!==v&&(x=v.executeHitDetection(h,a,i,_,c),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],o=e[3],r=[i,n,i,o,s,o,s,n];return Je(r,0,8,2,t,r),r}isEmpty(){return S(this.executorsByZIndex_)}execute(t,e,i,n,s,o,r){const a=Object.keys(this.executorsByZIndex_).map(Number);let l,h,c,u,g,_;for(a.sort(d),this.maxExtent_&&(t.save(),this.clip(t,i)),o=o||dr,r&&a.reverse(),l=0,h=a.length;l<h;++l){const h=a[l].toString();for(g=this.executorsByZIndex_[h],c=0,u=o.length;c<u;++c)_=g[o[c]],void 0!==_&&_.execute(t,e,i,n,s,r)}this.maxExtent_&&t.restore()}},fr=class extends Ko{constructor(t,e,i,n,s,o,r){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?function(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=r,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(t,e,i,n){if(!this.image_)return;const s=Je(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,r=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);let l=this.imageRotation_;0===this.transformRotation_&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(let t=0,e=s.length;t<e;t+=2){const e=s[t]-this.imageAnchorX_,i=s[t+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const t=e+this.imageAnchorX_,n=i+this.imageAnchorY_;Ue(r,t,n,1,1,l,-t,-n),o.setTransform.apply(o,r),o.translate(t,n),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,e,i,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=Je(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_;let r=this.textRotation_;for(0===this.transformRotation_&&(r-=this.viewRotation_),this.textRotateWithView_&&(r+=this.viewRotation_);e<i;e+=n){const t=s[e]+this.textOffsetX_,i=s[e+1]+this.textOffsetY_;0!==r||1!=this.textScale_[0]||1!=this.textScale_[1]?(o.translate(t-this.textOffsetX_,i-this.textOffsetY_),o.rotate(r),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0
vendor: 6,560 bytes, line 1
1),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&o.strokeText(this.text_,t,i),this.textFillState_&&o.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,s){const o=this.context_,r=Je(t,e,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(r[0],r[1]);let a=r.length;s&&(a-=2);for(let t=2;t<a;t+=2)o.lineTo(r[t],r[t+1]);return s&&o.closePath(),i}drawRings_(t,e,i,n){for(let s=0,o=i.length;s<o;++s)e=this.moveToLineTo_(t,e,i[s],n,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ht(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=function(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const s=t.getStride();return Je(n,0,n.length,s,e,i)}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],s=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let t=0,i=e.length;t<i;++t)this.drawGeometry(e[t])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ht(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(Ht(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const s=t.getEnds(),o=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t)n=this.moveToLineTo_(i,n,s[t],o,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ht(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ht(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const s=t.getEndss(),o=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t){const e=s[t];n=this.drawRings_(i,n,e,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),m(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:Cn;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:uo(e||pn)}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),s=e.getLineDashOffset(),o=e.getLineJoin(),r=e.getWidth(),a=e.getMiterLimit(),l=n||vn;this.strokeState_={lineCap:void 0!==i?i:yn,lineDash:1===this.pixelRatio_?l:l.map((t=>
1t*this.pixelRatio_)),lineDashOffset:(s||0)*this.pixelRatio_,lineJoin:void 0!==o?o:xn,lineWidth:(void 0!==r?r:1)*this.pixelRatio_,miterLimit:void 0!==a?a:10,strokeStyle:uo(t||Sn)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:uo(t||pn)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),o=i.getLineJoin(),r=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:yn,lineDash:n||vn,lineDashOffset:s||0,lineJoin:void 0!==o?o:xn,lineWidth:void 0!==r?r:1,miterLimit:void 0!==a?a:10,strokeStyle:uo(t||Sn)}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),o=t.getOffsetY(),r=t.getRotateWithView(),a=t.getRotation(),l=t.getScaleArray(),h=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:mn,textAlign:void 0!==c?c:Cn,textBaseline:void 0!==u?u:wn},this.text_=void 0!==h?Array.isArray(h)?h.reduce(((t,e,i)=>t+(i%2?" ":e)),""):h:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==o?this.pixelRatio_*o:0,this.textRotateWithView_=void 0!==r&&r,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}},mr=.5,pr={Point:function(t,e,i,n,s){const o=i.getImage(),r=i.getText();let a;if(o){if(2!=o.getImageState())return;let l=t;if(s){const h=o.getDeclutterMode();if("none"!==h)if(l=s,"obstacle"===h){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(o,a),s.drawPoint(e,n)}else r&&r.getText()&&(a={})}const h=l.getBuilder(i.getZIndex(),"Image");h.setImageStyle(o,a),h.drawPoint(e,n)}if(r&&r.getText()){let o=t;s&&(o=s);const l=o.getBuilder(i.getZIndex(),"Text");l.setTextStyle(r,a),l.drawText(e,n)}},LineString:function(t,e,i,n,s){const o=i.getStroke();if(o){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawLineString(e,n)}const r=i.getText();if(r&&r.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(r),o.drawText(e,n)}},Polygon:function(t,e,i,n,s){const o=i.getFill(),r=i.getStroke();if(o||r){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(o,r),s.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n)}},MultiPoint:function(t,e,i,n,s){const o=i.getImage(),r=i.getText();let a;if(o){if(2!=o.getImageState())return;let l=t;if(s){const h=o.getDeclutterMode();if("none"!==h)if(l=s,"obstacle"===h){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(o,a),s.drawMultiPoint(e,n)}else r&&r.getText()&&(a={})}const h=l.getBuilder(i.getZIndex(),"Image");h.setImageStyle(o,a),h.drawMultiPoint(e,n)}if(r&&r.getText()){let o=t;s&&(o=s);const l=o.getBuilder(i.getZIndex(),"Text");l.setTextStyle(r,a),l.drawText(e,n)}},MultiLineString:function(t,e,i,n,s){const o=i.getStroke();if(o){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,n)}const r=i.getText();if(r&&r.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(r),o.drawText(e,n)}},MultiPolygon:function(t,e,i,n,s){const o=i.getFill(),r=i.getStroke();if(r||o){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(o,r),s.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n)}},GeometryCollection:function(t,e,i,n,s){const o=e.getGeometriesArray();let r,a;for(r=0,a=o.length;r<a;++r)(0,pr[o[r].getType()])(t,o[r],i,n,s)}
1,Circle:function(t,e,i,n,s){const o=i.getFill(),r=i.getStroke();if(o||r){const s=t.getBuilder(i.getZIndex(),"Circle");s.setFillStrokeStyle(o,r),s.drawCircle(e,n)}const a=i.getText();if(a&&a.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n)}}};function yr(t,e){return parseInt(N(t),10)-parseInt(N(e),10)}function vr(t,e){return.5*t/e}function xr(t,e,i,n,s,o,r){let a=!1;const l=i.getImage();if(l){const t=l.getImageState();2==t||3==t?l.unlistenImageChange(s):(0==t&&l.load(),l.listenImageChange(s),a=!0)}return function(t,e,i,n,s,o){const r=i.getGeometryFunction()(e);if(!r)return;const a=r.simplifyTransformed(n,s);i.getRenderer()?Sr(t,a,i,e):(0,pr[a.getType()])(t,a,i,e,o)}(t,e,i,n,o,r),a}function Sr(t,e,i,n){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer());else{const s=e.getGeometries();for(let e=0,o=s.length;e<o;++e)Sr(t,s[e],i,n)}}const Cr=class extends Hi{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,o=s.center,r=s.resolution,a=s.projection,l=s.rotation,h=a.getExtent(),c=this.getLayer().getSource(),u=e.pixelRatio,d=e.viewHints,g=!(d[0]||d[1]),_=this.compositionContext_,f=Math.round(e.size[0]*u),m=Math.round(e.size[1]*u),p=c.getWrapX()&&a.canWrapX(),y=p?Zt(h):null,v=p?Math.ceil((n[2]-h[2])/y)+1:1;let x=p?Math.floor((n[0]-h[0])/y):0;do{const e=this.getRenderTransform(o,r,l,u,f,m,x*y);t.execute(_,1,e,l,g,void 0,i)}while(++x<v)}setupCompositionContext_(){if(1!==this.opacity_){const t=Vi(this.context.canvas.width,this.context.canvas.height,Ui);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(1!==this.opacity_){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,Yi(this.compositionContext_),Ui.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,i){!function(t,e,i,n,s,o,r){t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=o,t[5]=r}(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),Ze(this.inversePixelTransform,this.pixelTransform);const s=qe(this.pixelTransform);this.useContainer(e,s,this.getBackground(t));const o=this.context,r=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;const h=Math.round(t.size[0]*i),c=Math.round(t.size[1]*i);r.width!=h||r.height!=c?(r.width=h,r.height=c,r.style.transform!==s&&(r.style.transform=s)):this.containerReused||o.clearRect(0,0,h,c),this.preRender(o,t);const u=t.viewState;u.projection;this.opacity_=n.opacity,this.setupCompositionContext_();let d=!1,g=!0;if(n.extent&&this.clipping){const e=we(n.extent);g=Ht(e,t.extent),d=g&&!Ot(e,t.extent),d&&this.clipUnrotated(this.compositionContext_,t,e)}return g&&this.renderWorlds(a,t),d&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,t),this.renderedRotation_!==u.rotation&&(this.renderedRotation_=u.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise((e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];Ke(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,o=this.wrappedRenderedExtent_,r=this.getLayer(),a=[],l=t[0]*mr,h=t[1]*mr;a.push(this.getRenderTransform(e,i,n,mr,l,h,0).slice());const c=r.getSource(),u=s.getExtent();
1if(c.getWrapX()&&s.canWrapX()&&!Ot(u,o)){let t=o[0];const s=Zt(u);let r,c=0;for(;t<u[0];)--c,r=s*c,a.push(this.getRenderTransform(e,i,n,mr,l,h,r).slice()),t+=s;for(c=0,t=o[2];t>u[2];)++c,r=s*c,a.push(this.getRenderTransform(e,i,n,mr,l,h,r).slice()),t-=s}this.hitDetectionImageData_=function(t,e,i,n,s,o,r){const a=Vi(t[0]*mr,t[1]*mr);a.imageSmoothingEnabled=!1;const l=a.canvas,h=new fr(a,mr,s,null,r),c=i.length,u=Math.floor(16777215/c),g={};for(let t=1;t<=c;++t){const e=i[t-1],r=e.getStyleFunction()||n;if(!n)continue;let a=r(e,o);if(!a)continue;Array.isArray(a)||(a=[a]);const l=(t*u).toString(16).padStart(7,"#00000");for(let t=0,i=a.length;t<i;++t){const i=a[t],n=i.getGeometryFunction()(e);if(!n||!Ht(s,n.getExtent()))continue;const o=i.clone(),r=o.getFill();r&&r.setColor(l);const h=o.getStroke();h&&(h.setColor(l),h.setLineDash(null)),o.setText(void 0);const c=i.getImage();if(c&&0!==c.getOpacity()){const t=c.getImageSize();if(!t)continue;const e=Vi(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=l,e.fillRect(0,0,i.width,i.height),o.setImage(new Lo({img:i,imgSize:t,anchor:c.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:c.getOrigin(),opacity:1,size:c.getSize(),scale:c.getScale(),rotation:c.getRotation(),rotateWithView:c.getRotateWithView()}))}const u=o.getZIndex()||0;let d=g[u];d||(d={},g[u]=d,d.Polygon=[],d.Circle=[],d.LineString=[],d.Point=[]);const _=n.getType();if("GeometryCollection"===_){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];d[i.getType().replace("Multi","")].push(i,o)}}else d[_.replace("Multi","")].push(n,o)}}const _=Object.keys(g).map(Number).sort(d);for(let t=0,i=_.length;t<i;++t){const i=g[_[t]];for(const t in i){const n=i[t];for(let t=0,i=n.length;t<i;t+=2){h.setStyle(n[t+1]);for(let i=0,s=e.length;i<s;++i)h.setTransform(e[i]),h.drawGeometry(n[t])}}}return a.getImageData(0,0,l.width,l.height)}(t,a,this.renderedFeatures_,r.getStyleFunction(),o,i,n)}e(function(t,e,i){const n=[];if(i){const s=Math.floor(Math.round(t[0])*mr),o=Math.floor(Math.round(t[1])*mr),r=4*($(s,0,i.width-1)+$(o,0,i.height-1)*i.width),a=i.data[r],l=i.data[r+1],h=i.data[r+2]+256*(l+256*a),c=Math.floor(16777215/e.length);h&&h%c==0&&n.push(e[h/c-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const o=e.viewState.resolution,r=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const o=N(t),r=l[o];if(r){if(!0!==r&&i<r.distanceSq){if(0===i)return l[o]=!0,s.splice(s.lastIndexOf(r),1),n(t,a,e);r.geometry=e,r.distanceSq=i}}else{if(0===i)return l[o]=!0,n(t,a,e);s.push(l[o]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}};let c;const u=[this.replayGroup_];return this.declutterExecutorGroup&&u.push(this.declutterExecutorGroup),u.some((n=>c=n.forEachFeatureAtCoordinate(t,o,r,i,h,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[0],s=t.viewHints[1],o=e.getUpdateWhileAnimating(),r=e.getUpdateWhileInteracting();if(this.ready&&!o&&n||!r&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,l=t.viewState,h=l.projection,c=l.resolution,u=t.pixelRatio,d=e.getRevision(),g=e.getRenderBuffer();let _=e.getRenderOrder();void 0===_&&(_=yr);const f=l.center.slice(),p=Rt(a,g*c),y=p.slice(),v=[p.slice()],x=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!Ot(x,t.extent)){const t=Zt(x),e=Math.max(Zt(p)/2,t);p[0]=x[0]-e,p[2]=x[2]+e,te(f,h);const i=Jt(v[0],h);i[0]<x[0]&&i[2]<x[2]?v.push([i[0]+t,i[1],i[2]+t,i[3]]):i[0]>x[0]&&i[2]>x[2]&&v.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==_&&Ot(this.wrappedRenderedExtent_,p))return m(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=f,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const S=new $o(vr(c,u),p,c,u);let C;this.getLayer().getDeclutter()&&(C=new $o(vr(c,u),p,c,u));const w=ve();let E;if(w){for(let t=0,e=v.length;t<e;++t){const e=Ce(v[t]);i.loadFeatures(e,Ee(c),w)}E=fe(w,h)}else for(let t=0,e=v.length;t<e;++t)i.loadFeatures(v[t],c,h);const I=function(t,e){const i=vr(t,e);return i*i}(c,u);let b=!0;const R=t=>{let i;const n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,c)),i){const e=this.renderFeature(t,I,i,S,E,C);b=b&&!e}},T=Ce(p),M=i.getFeaturesInExtent(T);_&&M.sort(_);for(let t=0,e=M.length;t<e;++t)R(M[t]);this.renderedFeatures_=M,this.ready=b;const L=S.finish(),O=new _r(p,c,u,i.getOverlaps(),L,e.getRenderBuffer());return C&&(this.declutterExecutorGroup=new _r(p,c,u,i.getOverlaps(),C.finish(),e.getRenderBuffer())),this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=_,this.renderedExtent_=y,this.wrappedRenderedExtent_=p,this.renderedCenter_=f,this.renderedProjection_=h,this.replayGroup_=O,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,s,o){if(!i)return!1;let r=!1;if(Array.isArray(i))for(let a=0,l=i.length;a<l;++a)r=xr(n,t,i[a],e,this.boundHandleStyleImageChange_,s,o)||r;else r=xr(n,t,i,e,this.boundHandleStyleImageChange_,s,o);return r}},wr=class extends jo{constructor(t){super(t)}createRenderer(){return new Cr(this)}},Er=e=>{let{gardenArea:i}=e;const n=i?.featuredImage?.node;return(0,t.createElement)("article",{className:"gardenMap-active"},n?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("img",{alt:n.altText,className:"gardenMap-active-image",srcSet:n.srcSet}),(0,t.createElement)("div",{className:"gardenMap-active-content"},(0,t.createElement)("h2",{className:"gardenAreaTeaser-title",dangerouslySetInnerHTML:{__html:i.title}}),(0,t.createElement)("div",{className:"gardenAreaTeaser-excerpt",dangerouslySetInnerHTML:{__html:i.excerpt}}),(0,t.createElement)("a",{href:i.link},"Read More"))):(0,t.createElement)("div",{style:{height:"20em"}},"Placeholder"))},{useEffect:Ir,useRef:br}=wp.element,Rr=e=>{let{gardenAreas:i,selectedGardenArea:n,setSelectedGardenArea:s}=e;const o=e=>{let{gardenArea:i}=e;const o=br(null);return Ir((()=>{n===i.id&&o?.current?.scrollIntoView({behavior:"smooth",block:"center"})}),[n,i]),(0,t.createElement)("li",{ref:o,key:i.id,className:n===i.id?"active":"inactive"},(0,t.createElement)("button",{className:"gardenAreaButton",onClick:()=>s(i.id),dangerouslySetInnerHTML:{__html:i.title}}))};return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("ul",{className:"gardenMap-list"},i?.map((e=>(0,t.createElement)(o,{key:e.id,gardenArea:e})))))},Tr=t=>{let{location:e,view:i,minZoom:n}=t;const s=i.getZoom();let o=2,r=!1;i.animate({zoom:Math.max(s-1,n),duration:500,center:e},{zoom:5,duration:1e3},(function(t){--o,r||0!==o&&t||(r=!0)}))},{useEffect:Mr,useRef:Lr,useState:Or,useLayoutEffect:kr}=wp.element,Pr=()=>{const[e,i]=Or(),[n,s]=Or([]),[o,r]=Or(),[a,l]=Or(!0),[h,c]=Or(1274),[u,d]=Or(),[g,_]=Or(),f=Lr(null);Mr((()=>{fetch("/graphql?query={gardenAreas}",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:"\n {\n\t\t\t\t\tgardenAreas(first: 100) {\n\t\t\t\t\t\tno
1des {\n\t\t\t\t\t\t\tid\n slug\n link\n\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\texcerpt\n\t\t\t\t\t\t\tfeaturedImage {\n\t\t\t\t\t\t\t\tnode {\n\t\t\t\t\t\t\t\t\tsrcSet\n\t\t\t\t\t\t\t\t\taltText\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n \t\t\tmapPosition {\n\t\t\t\t\t\t\t\tx\n\t\t\t\t\t\t\t\ty\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n "})}).then((t=>t.json())).then((t=>{const e=t.data?.gardenAreas?.nodes;console.log(e),s(e),c(1274),d(e.find((t=>"the-great-glasshouse"===t.slug))?e.find((t=>"the-great-glasshouse"===t.slug)):e.find((t=>"y-ty-gwydr-mawr"===t.slug)))})).then((()=>{l(!1)})).catch((t=>console.log(t)))}),[]),Mr((()=>{h&&n&&d(n.find((t=>h===t.id)))}),[n,h]),Mr((()=>{if(h&&o){const t=o.find((t=>t.values_.id===h));Tr({location:t.getGeometry().getCoordinates(),view:e.getView(),minZoom:3})}}),[h]);const m=new Io({image:new Lo({anchor:[28,75],anchorXUnits:"pixels",anchorYUnits:"pixels",scale:.7,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNzUiIHZpZXdCb3g9Ii0yIC0yIDYwIDc5IiBmaWxsPSJub25lIgoJeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMjgiIGN5PSIyOCIgcj0iMjgiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4yNSkiLz4KCSAgPHBhdGggCgkJZmlsbD0iI2ZmZDkxMCIKCQlzdHJva2U9IndoaXRlIiAKCQlzdHJva2VXaWR0aD0iNCIKCQlkPSJNMjQuNzgsLjE4QzExLjg0LDEuNjIsMS40NywxMi4xMSwuMTUsMjUuMDdjLTEuMDMsMTAuMTcsMy4zOCwxOS4zNywxMC42NywyNS4wNCwyLjksMi4yNiw1LjM1LDUuMDQsNy4yNCw4LjJsOS45NCwxNi42OSw5Ljk0LTE2LjY4YzEuOTQtMy4yNiw0LjU0LTYuMDUsNy41MS04LjQyLDYuNDMtNS4xMywxMC41NS0xMy4wMywxMC41NS0yMS45QzU2LDExLjQ4LDQxLjY5LTEuNywyNC43OCwuMThabTMuMjIsMzkuNjRjLTYuNTMsMC0xMS44Mi01LjI5LTExLjgyLTExLjgyczUuMjktMTEuODIsMTEuODItMTEuODIsMTEuODIsNS4yOSwxMS44MiwxMS44Mi01LjI5LDExLjgyLTExLjgyLDExLjgyWiIvPgo8L3N2Zz4KCgo="})}),p=new Io({image:new Lo({anchor:[28,75],anchorXUnits:"pixels",anchorYUnits:"pixels",scale:.7,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNzUiIHZpZXdCb3g9Ii0yIC0yIDYwIDc5IiBmaWxsPSJub25lIgoJeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxjaXJjbGUgY3g9IjI4IiBjeT0iMjgiIHI9IjI4IiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuMjUpIi8+Cgk8cGF0aCBmaWxsPSIjZDgyYTM1IiBzdHJva2U9IndoaXRlIiBzdHJva2VXaWR0aD0iNCIgZD0iTTI0Ljc4LC4xOEMxMS44NCwxLjYyLDEuNDcsMTIuMTEsLjE1LDI1LjA3Yy0xLjAzLDEwLjE3LDMuMzgsMTkuMzcsMTAuNjcsMjUuMDQsMi45LDIuMjYsNS4zNSw1LjA0LDcuMjQsOC4ybDkuOTQsMTYuNjksOS45NC0xNi42OGMxLjk0LTMuMjYsNC41NC02LjA1LDcuNTEtOC40Miw2LjQzLTUuMTMsMTAuNTUtMTMuMDMsMTAuNTUtMjEuOUM1NiwxMS40OCw0MS42OS0xLjcsMjQuNzgsLjE4Wm0zLjIyLDM5LjY0Yy02LjUzLDAtMTEuODItNS4yOS0xMS44Mi0xMS44MnM1LjI5LTExLjgyLDExLjgyLTExLjgyLDExLjgyLDUuMjksMTEuODIsMTEuODItNS4yOSwxMS44Mi0xMS44MiwxMS44MloiLz4KPC9zdmc+CgoK"})}),y=t=>{g.getSource().getFeatures().forEach((t=>{t.setStyle(m)})),e.getView().get,e.forEachFeatureAtPixel(t.pixel,(t=>{c(t.values_.id),t.setStyle(p)}))};return Mr((()=>{const{height:t,width:e,src:n}=window?.translateStrings?.map_image,s=[0,0,8e3,6631],o=new ct({units:"pixels",extent:s}),r=new Li({projection:o,center:[2477/1.5,6202.5],zoom:3,maxZoom:5,minZoom:3,extent:s,showFullExtent:!0}),a=new Ji({source:new Qs({url:n,projection:o,imageExtent:s})});let l=new Ws({layers:[a],view:r,controls:[]});return l.setTarget(f.current),i(l),()=>l.setTarget(void 0)}),[]),kr((()=>{if(!a&&(e.on("pointermove",(function(t){var e=this.forEachFeatureAtPixel(t.pixel,(function(t,e){return!0}));this.getTargetElement().style.cursor=e?"pointer":""})),n&&e)){const t=n.map((t=>{const e=new to({geometry:new mi([t.mapPosition?.x,t.mapPosition?.y]),id:t.id});return e.setStyle(m),e}));r(t);const e=new lo({features:t});_(new wr({source:e,updateWhileAnimating:!0,updateWhileInteracting:!0}))}}),[a]),Mr((()=>{g&&(g.setZIndex(100),e.addLayer(g),e.on("click",y),Tr({view:e.getView(),location:[2477,4135],minZoom:3}))}),[g]),(0,t.createElement)("div",{className:"gardenMap-wrapper"},(0,t.createElement)(Er,{gardenArea:u}),(0,t.createElement)(Rr,{gardenAreas:n,selectedGardenArea:h,setSelectedGardenArea:c}),(0,t.createElement)("div",{ref:f,className:"map-container"}))};var Ar=i(491),Dr=i.n(Ar);const{render:Fr}=wp.element;document.addEventListener("DOMContentLoaded",(()=>{(()=>{const e=document.querySelector("#living-attractions-root");e&&l((0,t.createElement)(a,null),e)})(),n()({containerId:"siteNav-wrapper",toggleClass:"siteNav-toggle"})}));const Nr=document?.getElementById("cookiesRoot"),Wr=window.cookieStrings;Nr&&Wr&&Fr((0,t.createElement)((e=>{let{location:i,disableStyles:n,buttonText:s,guts:o}=e;return(0,t.createElement)(Dr(),{location:i,disableStyles:n,buttonText:s,expires:150},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:o}}))}),{guts:Wr?.message,buttonText:Wr?.buttonText}),Nr),document.querySelectorAll("#gardenAreaApp").forEach((e=>{Fr((0,t.createElement)(Pr,null),e)}))})()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.