var n,p,Util;if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(void 0!==i.style[n])return{end:t[n]}}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t()})}(window.jQuery);+function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed.bs.alert").remove()}var u=n(this),r=u.attr("data-target"),i;r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));i=n(r);t&&t.preventDefault();i.length||(i=u.hasClass("alert")?u:u.parent());i.trigger(t=n.Event("close.bs.alert"));t.isDefaultPrevented()||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.one(n.support.transition.end,f).emulateTransitionEnd(150):f())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(window.jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r)},i;t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(n){var i="disabled",t=this.$element,r=t.is("input")?"val":"html",u=t.data();n+="Text";u.resetText||t.data("resetText",t[r]());t[r](u[n]||this.options[n]);setTimeout(function(){"loadingText"==n?t.addClass(i).attr(i,i):t.removeClass(i).removeAttr(i)},0)};t.prototype.toggle=function(){var n=this.$element.closest('[data-toggle="buttons"]'),t;n.length&&(t=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change"),"radio"===t.prop("type")&&n.find(".active").removeClass("active"));this.$element.toggleClass("active")};i=n.fn.button;n.fn.button=function(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})};n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn"));i.button("toggle");t.preventDefault()})}(window.jQuery);+function(n){"use strict";var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=this.sliding=this.interval=this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)};t.prototype.to=function(t){var r=this,i=this.getActiveIndex();if(!(t>this.$items.length-1)&&!(0>t))return this.sliding?this.$element.one("slid",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition.end&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(t,i){var u=this.$element.find(".item.active"),r=i||u[t](),s=this.interval,f="next"==t?"left":"right",h="next"==t?"first":"last",o=this,e;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[h]()}if(this.sliding=!0,s&&this.pause(),e=n.Event("slide.bs.carousel",{relatedTarget:r[0],direction:f}),!r.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=n(o.$indicators.children()[o.getActiveIndex()]);t&&t.addClass("active")})),n.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;r.addClass(t);r[0].offsetWidth;u.addClass(f);r.addClass(f);u.one(n.support.transition.end,function(){r.removeClass([t,f].join(" ")).addClass("active");u.removeClass(["active",f].join(" "));o.sliding=!1;setTimeout(function(){o.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;u.removeClass("active");r.addClass("active");this.sliding=!1;this.$element.trigger("slid")}return s&&this.cycle(),this}};i=n.fn.carousel;n.fn.carousel=function(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})};n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var f,i=n(this),r=n(i.attr("data-target")||(f=i.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),u=i.attr("data-slide-to");u&&(e.interval=!1);r.carousel(e);(u=i.attr("data-slide-to"))&&r.data("bs.carousel").to(u);t.preventDefault()});n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);t.carousel(t.data())})})}(window.jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.transitioning=null;this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},i;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var u,t,r,i,f,e;if(!this.transitioning&&!this.$element.hasClass("in")&&(u=n.Event("show.bs.collapse"),this.$element.trigger(u),!u.isDefaultPrevented())){if(t=this.$parent&&this.$parent.find("> .panel > .in"),t&&t.length){if(r=t.data("bs.collapse"),r&&r.transitioning)return;t.collapse("hide");r||t.data("bs.collapse",null)}if(i=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1,f=function(){this.$element.removeClass("collapsing").addClass("in")[i]("auto");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return f.call(this);e=n.camelCase(["scroll",i].join("-"));this.$element.one(n.support.transition.end,n.proxy(f,this)).emulateTransitionEnd(350)[i](this.$element[0][e])}};t.prototype.hide=function(){var i,t,r;if(!this.transitioning&&this.$element.hasClass("in")&&(i=n.Event("hide.bs.collapse"),this.$element.trigger(i),!i.isDefaultPrevented()))return t=this.dimension(),this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1,r=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")},n.support.transition?(this.$element[t](0).one(n.support.transition.end,n.proxy(r,this)).emulateTransitionEnd(350),void 0):r.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};i=n.fn.collapse;n.fn.collapse=function(i){return this.each(function(){var r=n(this),u=r.data("bs.collapse"),f=n.extend({},t.DEFAULTS,r.data(),"object"==typeof i&&i);u||r.data("bs.collapse",u=new t(this,f));"string"==typeof i&&u[i]()})};n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var e,i=n(this),s=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),r=n(s),u=r.data("bs.collapse"),h=u?"toggle":i.data(),f=i.attr("data-parent"),o=f&&n(f);u&&u.transitioning||(o&&o.find('[data-toggle=collapse][data-parent="'+f+'"]').not(i).addClass("collapsed"),i[r.hasClass("in")?"addClass":"removeClass"]("collapsed"));r.collapse(h)})}(window.jQuery);+function(n){"use strict";function r(){n(e).remove();n(i).each(function(t){var i=u(n(this));i.hasClass("open")&&(i.trigger(t=n.Event("hide.bs.dropdown")),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function u(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}var e=".dropdown-backdrop",i="[data-toggle=dropdown]",t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.prototype.toggle=function(t){var f=n(this),i,e;if(!f.is(".disabled, :disabled")){if(i=u(f),e=i.hasClass("open"),r(),!e){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click",r),i.trigger(t=n.Event("show.bs.dropdown")),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown");f.focus()}return!1}};t.prototype.keydown=function(t){var e,o,s,f,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&27==t.keyCode)return 27==t.which&&o.find(i).focus(),e.click();f=n("[role=menu] li:not(.divider):visible a",o);f.length&&(r=f.index(f.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&r<f.length-1&&r++,~r||(r=0),f.eq(r).focus())}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("dropdown");u||r.data("dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i+", [role=menu]",t.prototype.keydown)}(window.jQuery);+function(n){"use strict";var t=function(t,i){this.options=i;this.$element=n(t);this.$backdrop=this.isShown=null;this.options.remote&&this.$element.load(this.options.remote)},i;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this[this.isShown?"hide":"show"](n)};t.prototype.show=function(t){var i=this,r=n.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var u=n.support.transition&&i.$element.hasClass("fade"),r;i.$element.parent().length||i.$element.appendTo(document.body);i.$element.show();u&&i.$element[0].offsetWidth;i.$element.addClass("in").attr("aria-hidden",!1);i.enforceFocus();r=n.Event("shown.bs.modal",{relatedTarget:t});u?i.$element.find(".modal-dialog").one(n.support.transition.end,function(){i.$element.focus().trigger(r)}).emulateTransitionEnd(300):i.$element.focus().trigger(r)}))};t.prototype.hide=function(t){t&&t.preventDefault();t=n.Event("hide.bs.modal");this.$element.trigger(t);this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.focus()},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.removeBackdrop();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(t){var r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",n.proxy(function(n){n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};i=n.fn.modal;n.fn.modal=function(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})};n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());t.preventDefault();u.modal(f,this).one("hide",function(){i.is(":visible")&&i.focus()})});n(document).on("show.bs.modal",".modal",function(){n(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){n(document.body).removeClass("modal-open")})}(window.jQuery);+function(n){"use strict";var t=function(n,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",n,t)},i;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};t.prototype.init=function(t,i,r){var f,e,u,o,s;for(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focus",s="hover"==u?"mouseleave":"blur",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show),void 0):i.show()};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide),void 0):i.hide()};t.prototype.show=function(){var o=n.Event("show.bs."+this.type),i,l;if(this.hasContent()&&this.enabled){if(this.$element.trigger(o),o.isDefaultPrevented())return;i=this.tip();this.setContent();this.options.animation&&i.addClass("fade");var t="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,h=s.test(t);h&&(t=t.replace(s,"")||"top");i.detach().css({top:0,left:0,display:"block"}).addClass(t);this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),u=i[0].offsetWidth,f=i[0].offsetHeight;if(h){var e=this.$element.parent(),a=t,c=document.documentElement.scrollTop||document.body.scrollTop,v="body"==this.options.container?window.innerWidth:e.outerWidth(),y="body"==this.options.container?window.innerHeight:e.outerHeight(),p="body"==this.options.container?0:e.offset().left;t="bottom"==t&&r.top+r.height+f-c>y?"top":"top"==t&&r.top-c-f<0?"bottom":"right"==t&&r.right+u>v?"left":"left"==t&&r.left-u<p?"right":t;i.removeClass(a).addClass(t)}l=this.getCalculatedOffset(t,r,u,f);this.applyPlacement(l,t);this.$element.trigger("shown.bs."+this.type)}};t.prototype.applyPlacement=function(n,t){var h,i=this.tip(),c=i[0].offsetWidth,f=i[0].offsetHeight,e=parseInt(i.css("margin-top"),10),o=parseInt(i.css("margin-left"),10),u,r,s;isNaN(e)&&(e=0);isNaN(o)&&(o=0);n.top=n.top+e;n.left=n.left+o;i.offset(n).addClass("in");u=i[0].offsetWidth;r=i[0].offsetHeight;("top"==t&&r!=f&&(h=!0,n.top=n.top+f-r),/bottom|top/.test(t))?(s=0,n.left<0&&(s=-2*n.left,n.left=0,i.offset(n),u=i[0].offsetWidth,r=i[0].offsetHeight),this.replaceArrow(s-c+u,u,"left")):this.replaceArrow(r-f,r,"top");h&&i.offset(n)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(){function i(){"in"!=u.hoverState&&t.detach()}var u=this,t=this.tip(),r=n.Event("hide.bs."+this.type);return this.$element.trigger(r),r.isDefaultPrevented()?void 0:(t.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?t.one(n.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(){var t=this.$element[0];return n.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.tip=function(){return this.$tip=this.$tip||n(this.options.template)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=t?n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;r||u.data("bs.tooltip",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(window.jQuery);+function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle(),i=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](t);n.find(".popover-content")[this.options.html?"html":"text"](i);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};t.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;r||u.data("bs.popover",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(window.jQuery);+function(n){"use strict";function t(i,r){var u,f=n.proxy(this.process,this);this.$element=n(i).is("body")?n(window):n(i);this.$body=n("body");this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||(u=n(i).attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.offsets=n([]);this.targets=n([]);this.activeTarget=null;this.refresh();this.process()}t.DEFAULTS={offset:10};t.prototype.refresh=function(){var i=this.$element[0]==window?"offset":"position",t;this.offsets=n([]);this.targets=n([]);t=this;this.$body.find(this.selector).map(function(){var f=n(this),r=f.data("target")||f.attr("href"),u=/^#\w/.test(r)&&n(r);return u&&u.length&&[[u[i]().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;n(this.selector).parents(".active").removeClass("active");var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate")};var i=n.fn.scrollspy;n.fn.scrollspy=function(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(window.jQuery);+function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.attr("data-target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],u=n.Event("show.bs.tab",{relatedTarget:r}),(t.trigger(u),u.isDefaultPrevented())||(f=n(i),this.activate(t.parent("li"),e),this.activate(f,f.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})))};t.prototype.activate=function(t,i,r){function f(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");e?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),e=r&&n.support.transition&&u.hasClass("fade");e?u.one(n.support.transition.end,f).emulateTransitionEnd(150):f();u.removeClass("in")};i=n.fn.tab;n.fn.tab=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})};n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();n(this).tab("show")})}(window.jQuery);+function(n){"use strict";var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$window=n(window).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=this.unpin=null;this.checkPosition()},i;t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i;if(this.$element.is(":visible")){var s=n(document).height(),e=this.$window.scrollTop(),o=this.$element.offset(),r=this.options.offset,f=r.top,u=r.bottom;"object"!=typeof r&&(u=f=r);"function"==typeof f&&(f=r.top());"function"==typeof u&&(u=r.bottom());i=null!=this.unpin&&e+this.unpin<=o.top?!1:null!=u&&o.top+this.$element.height()>=s-u?"bottom":null!=f&&f>=e?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?o.top-e:null,this.$element.removeClass(t.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-u-this.$element.height()}))}};i=n.fn.affix;n.fn.affix=function(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix(t)})})}(window.jQuery);!function(n){"use strict";var i=function(n){var i=arguments,t=!0,r=1;return n=n.replace(/%s/g,function(){var n=i[r++];return"undefined"==typeof n?(t=!1,""):n}),t?n:""},f=function(t,i,r,u){var f="";return n.each(t,function(n,t){return t[i]===u?(f=t[r],!1):!0}),f},u=function(t,i){var r=-1;return n.each(t,function(n,t){return t.field===i?(r=n,!1):!0}),r},e=function(){var r,i,u=n("<p/>").addClass("fixed-table-scroll-inner"),t=n("<div/>").addClass("fixed-table-scroll-outer");return t.append(u),n("body").append(t),r=u[0].offsetWidth,t.css("overflow","scroll"),i=u[0].offsetWidth,r==i&&(i=t[0].clientWidth),t.remove(),r-i},r=function(t,i,r,u){if("string"==typeof i){var f=i.split(".");f.length>1?(i=window,n.each(f,function(n,t){i=i[t]})):i=window[i]}return"object"==typeof i?i:"function"==typeof i?i.apply(t,r):u},t=function(t,i){this.options=i;this.$el=n(t);this.$el_=this.$el.clone();this.timeoutId_=0;this.init()};t.DEFAULTS={classes:"table table-hover",height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",striped:!1,columns:[],data:[],method:"get",url:void 0,cache:!0,contentType:"application/json",queryParams:function(n){return n},queryParamsType:"limit",responseHandler:function(n){return n},pagination:!1,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],search:!1,selectItemName:"btSelectItem",showHeader:!0,showColumns:!1,showRefresh:!1,showToggle:!1,minimumCountColumns:1,idField:void 0,cardView:!1,clickToSelect:!1,singleSelect:!1,toolbar:void 0,checkboxHeader:!0,sortable:!0,maintainSelected:!1,rowStyle:function(){return{}},formatLoadingMessage:function(){return"Loading, please wait…"},formatRecordsPerPage:function(n){return i("%s records per page",n)},formatShowingRows:function(n,t,r){return i("Showing %s to %s of %s rows",n,t,r)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},onAll:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1}};t.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,"class":void 0,align:void 0,halign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,events:void 0,sorter:void 0,cellStyle:void 0};t.EVENTS={"all.bs.table":"onAll","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch"};t.prototype.init=function(){this.initContainer();this.initTable();this.initHeader();this.initData();this.initToolbar();this.initPagination();this.initBody();this.initServer()};t.prototype.initContainer=function(){this.$container=n(['<div class="bootstrap-table">','<div class="fixed-table-toolbar"><\/div>','<div class="fixed-table-container">','<div class="fixed-table-header"><table><\/table><\/div>','<div class="fixed-table-body">','<div class="fixed-table-loading">',this.options.formatLoadingMessage(),"<\/div>","<\/div>",'<div class="fixed-table-pagination"><\/div>',"<\/div>","<\/div>"].join(""));this.$container.insertAfter(this.$el);this.$container.find(".fixed-table-body").append(this.$el);this.$container.after('<div class="clearfix"><\/div>');this.$loading=this.$container.find(".fixed-table-loading");this.$el.addClass(this.options.classes);this.options.striped&&this.$el.addClass("table-striped")};t.prototype.initTable=function(){var i=this,r=[],u=[];this.$header=this.$el.find("thead");this.$header.length||(this.$header=n("<thead><\/thead>").appendTo(this.$el));this.$header.find("tr").length||this.$header.append("<tr><\/tr>");this.$header.find("th").each(function(){var t=n.extend({},{title:n(this).html(),"class":n(this).attr("class")},n(this).data());r.push(t)});this.options.columns=n.extend([],r,this.options.columns);n.each(this.options.columns,function(r,u){i.options.columns[r]=n.extend({},t.COLUMN_DEFAULTS,{field:r},u)});this.options.data.length||(this.$el.find("tbody tr").each(function(){var t={};n(this).find("td").each(function(r){t[i.options.columns[r].field]=n(this).html()});u.push(t)}),this.options.data=u)};t.prototype.initHeader=function(){var t=this,u=[],r=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],cellStyles:[],clickToSelects:[]};n.each(this.options.columns,function(n,f){var e="",o=i("text-align: %s; ",f.align)+i("vertical-align: %s; ",f.valign),s=i(' class="%s"',f["class"]);t.options.sortOrder||f.order;f.visible&&(u.push(f),t.header.fields.push(f.field),t.header.styles.push(o),t.header.classes.push(s),t.header.formatters.push(f.formatter),t.header.events.push(f.events),t.header.sorters.push(f.sorter),t.header.cellStyles.push(f.cellStyle),t.header.clickToSelects.push(f.clickToSelect),f.halign&&(o=i("text-align: %s; ",f.halign)+i("vertical-align: %s; ",f.valign)),o+=i("width: %spx; ",f.checkbox||f.radio?36:f.width),r.push("<th",f.checkbox||f.radio?i(' class="bs-checkbox %s"',f["class"]||""):s,i(' style="%s"',o),">"),r.push(i('<div class="th-inner %s">',t.options.sortable&&f.sortable?"sortable":"")),e=f.title,t.options.sortName===f.field&&t.options.sortable&&f.sortable&&(e+=t.getCaretHtml()),f.checkbox&&(!t.options.singleSelect&&t.options.checkboxHeader&&(e='<input name="btSelectAll" type="checkbox" />'),t.header.stateField=f.field),f.radio&&(e="",t.header.stateField=f.field,t.options.singleSelect=!0),r.push(e),r.push("<\/div>"),r.push('<div class="fht-cell"><\/div>'),r.push("<\/th>"))});this.$header.find("tr").html(r.join(""));this.$header.find("th").each(function(t){n(this).data(u[t])});this.$container.off("click","th").on("click","th",function(i){t.options.sortable&&n(this).data().sortable&&t.onSort(i)});!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$container.find(".fixed-table-header").hide(),this.$loading.css("top",0)):(this.$header.show(),this.$container.find(".fixed-table-header").show(),this.$loading.css("top","37px"));this.$selectAll=this.$header.find('[name="btSelectAll"]');this.$container.off("click",'[name="btSelectAll"]').on("click",'[name="btSelectAll"]',function(){var i=n(this).prop("checked");t[i?"checkAll":"uncheckAll"]()})};t.prototype.initData=function(n,t){this.data=t?this.data.concat(n):n||this.options.data;this.options.data=this.data;"server"!==this.options.sidePagination&&this.initSort()};t.prototype.initSort=function(){var u=this,t=this.options.sortName,i="desc"===this.options.sortOrder?-1:1,f=n.inArray(this.options.sortName,this.header.fields);-1!==f&&this.data.sort(function(n,e){var o=r(u.header,u.header.sorters[f],[n[t],e[t]]);return void 0!==o?i*o:n[t]===e[t]?0:n[t]<e[t]?-1*i:i})};t.prototype.onSort=function(t){var i=n(t.currentTarget),r=this.$header.find("th").eq(i.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===i.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=i.data("field"),this.options.sortOrder="asc"===i.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),i.add(r).data("order",this.options.sortOrder).find(".th-inner").append(this.getCaretHtml()),"server"===this.options.sidePagination?void this.initServer():(this.initSort(),void this.initBody())};t.prototype.initToolbar=function(){var u,f,r=this,t=[],e=0;this.$toolbar=this.$container.find(".fixed-table-toolbar").html("");"string"==typeof this.options.toolbar&&n('<div class="bars pull-left"><\/div>').appendTo(this.$toolbar).append(n(this.options.toolbar));t=['<div class="columns btn-group pull-right">'];this.options.showRefresh&&t.push('<button class="btn btn-default" type="button" name="refresh">','<i class="glyphicon glyphicon-refresh icon-refresh"><\/i>',"<\/button>");this.options.showToggle&&t.push('<button class="btn btn-default" type="button" name="toggle">','<i class="glyphicon glyphicon glyphicon-list-alt icon-list-alt"><\/i>',"<\/button>");this.options.showColumns&&(t.push(i('<div class="keep-open %s">',this.options.showRefresh||this.options.showToggle?"btn-group":""),'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">','<i class="glyphicon glyphicon-th icon-th"><\/i>',' <span class="caret"><\/span>',"<\/button>",'<ul class="dropdown-menu" role="menu">'),n.each(this.options.columns,function(n,r){if(!r.radio&&!r.checkbox){var u=r.visible?' checked="checked"':"";r.switchable&&t.push(i('<li><label><input type="checkbox" data-field="%s" value="%s"%s> %s<\/label><\/li>',r.field,n,u,r.title))}}),t.push("<\/ul>","<\/div>"));t.push("<\/div>");t.length>2&&this.$toolbar.append(t.join(""));this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",n.proxy(this.refresh,this));this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){r.options.cardView=!r.options.cardView;r.initHeader();r.initBody()});this.options.showColumns&&(u=this.$toolbar.find(".keep-open"),u.find("li").off("click").on("click",function(n){n.stopImmediatePropagation()}),u.find("input").off("click").on("click",function(){var t=n(this);r.toggleColumn(t.val(),t.prop("checked"),!1);r.trigger("column-switch",n(this).data("field"),t.prop("checked"))}));this.options.search&&(t=[],t.push('<div class="pull-right search">',i('<input class="form-control" type="text" placeholder="%s">',this.options.formatSearch()),"<\/div>"),this.$toolbar.append(t.join("")),f=this.$toolbar.find(".search input"),f.off("keyup").on("keyup",function(n){clearTimeout(e);e=setTimeout(function(){r.onSearch(n)},500)}))};t.prototype.onSearch=function(t){var i=n.trim(n(t.currentTarget).val());n(t.currentTarget).val(i);i!==this.searchText&&(this.searchText=i,this.options.pageNumber=1,this.initSearch(),this.updatePagination())};t.prototype.initSearch=function(){var t=this,i;"server"!==this.options.sidePagination&&(i=this.searchText&&this.searchText.toLowerCase(),this.data=i?n.grep(this.options.data,function(u,f){var e,o;e=n.isNumeric(e)?parseInt(e,10):e;for(e in u)if(o=u[e],o=r(t.header,t.header.formatters[n.inArray(e,t.header.fields)],[o,u,f],o),-1!==n.inArray(e,t.header.fields)&&("string"==typeof o||"number"==typeof o)&&-1!==(o+"").toLowerCase().indexOf(i))return!0;return!1}):this.options.data)};t.prototype.initPagination=function(){var e,o,y;if(this.$pagination=this.$container.find(".fixed-table-pagination"),this.options.pagination){var f,r,u,a,s,h,c,l,v,p=this,t=[],w=this.searchText?this.data:this.options.data;for("server"!==this.options.sidePagination&&(this.options.totalRows=w.length),this.totalPages=0,this.options.totalRows&&(this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1),this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),t.push('<div class="pull-left pagination-detail">','<span class="pagination-info">',this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),"<\/span>"),t.push('<span class="page-list">'),e=['<span class="btn-group dropup">','<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">','<span class="page-size">',this.options.pageSize,"<\/span>",' <span class="caret"><\/span>',"<\/button>",'<ul class="dropdown-menu" role="menu">'],o=this.options.pageList,"string"==typeof this.options.pageList&&(y=this.options.pageList.slice(1,-1).replace(/ /g,"").split(","),o=[],n.each(y,function(n,t){o.push(+t)})),n.each(o,function(n,t){var r=t===p.options.pageSize?' class="active"':"";e.push(i('<li%s><a href="javascript:void(0)">%s<\/a><\/li>',r,t))}),e.push("<\/ul><\/span>"),t.push(this.options.formatRecordsPerPage(e.join(""))),t.push("<\/span>"),t.push("<\/div>",'<div class="pull-right pagination">','<ul class="pagination">','<li class="page-first"><a href="javascript:void(0)">&lt;&lt;<\/a><\/li>','<li class="page-pre"><a href="javascript:void(0)">&lt;<\/a><\/li>'),this.totalPages<5?(r=1,u=this.totalPages):(r=this.options.pageNumber-2,u=r+4,1>r&&(r=1,u=5),u>this.totalPages&&(u=this.totalPages,r=u-4)),f=r;u>=f;f++)t.push('<li class="page-number'+(f===this.options.pageNumber?" active":"")+'">','<a href="javascript:void(0)">',f,"<\/a>","<\/li>");t.push('<li class="page-next"><a href="javascript:void(0)">&gt;<\/a><\/li>','<li class="page-last"><a href="javascript:void(0)">&gt;&gt;<\/a><\/li>',"<\/ul>","<\/div>");this.$pagination.html(t.join(""));a=this.$pagination.find(".page-list a");s=this.$pagination.find(".page-first");h=this.$pagination.find(".page-pre");c=this.$pagination.find(".page-next");l=this.$pagination.find(".page-last");v=this.$pagination.find(".page-number");this.options.pageNumber<=1&&(s.addClass("disabled"),h.addClass("disabled"));this.options.pageNumber>=this.totalPages&&(c.addClass("disabled"),l.addClass("disabled"));a.off("click").on("click",n.proxy(this.onPageListChange,this));s.off("click").on("click",n.proxy(this.onPageFirst,this));h.off("click").on("click",n.proxy(this.onPagePre,this));c.off("click").on("click",n.proxy(this.onPageNext,this));l.off("click").on("click",n.proxy(this.onPageLast,this));v.off("click").on("click",n.proxy(this.onPageNumber,this))}};t.prototype.updatePagination=function(){this.options.maintainSelected||this.resetRows();this.initPagination();"server"===this.options.sidePagination?this.initServer():this.initBody()};t.prototype.onPageListChange=function(t){var i=n(t.currentTarget);i.parent().addClass("active").siblings().removeClass("active");this.options.pageSize=+i.text();this.$toolbar.find(".page-size").text(this.options.pageSize);this.updatePagination()};t.prototype.onPageFirst=function(){this.options.pageNumber=1;this.updatePagination()};t.prototype.onPagePre=function(){this.options.pageNumber--;this.updatePagination()};t.prototype.onPageNext=function(){this.options.pageNumber++;this.updatePagination()};t.prototype.onPageLast=function(){this.options.pageNumber=this.totalPages;this.updatePagination()};t.prototype.onPageNumber=function(t){this.options.pageNumber!==+n(t.currentTarget).text()&&(this.options.pageNumber=+n(t.currentTarget).text(),this.updatePagination())};t.prototype.initBody=function(t){var u=this,s=[],l=this.getData(),o,a;for(this.$body=this.$el.find("tbody"),this.$body.length||(this.$body=n("<tbody><\/tbody>").appendTo(this.$el)),"server"===this.options.sidePagination&&(l=this.data),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=l.length),o=this.pageFrom-1;o<this.pageTo;o++){var h=l[o],e={},c=[];if(e=r(this.options,this.options.rowStyle,[h,o],e),e&&e.css)for(a in e.css)c.push(a+": "+e.css[a]);s.push("<tr",i(' class="%s"',e.classes),i(' data-index="%s"',o),">");this.options.cardView&&s.push(i('<td colspan="%s">',this.header.fields.length));n.each(this.header.fields,function(n,t){var y="",l=h[t],v="",a={},w=u.header.classes[n],p;if(e=i('style="%s"',c.concat(u.header.styles[n]).join("; ")),l=r(u.header,u.header.formatters[n],[l,h,o],l),a=r(u.header,u.header.cellStyles[n],[l,h,o],a),a.classes&&(w=i(' class="%s"',a.classes)),a.css){c=[];for(p in a.css)c.push(p+": "+a.css[p]);e=i('style="%s"',c.concat(u.header.styles[n]).join("; "))}if(u.options.columns[n].checkbox||u.options.columns[n].radio){if(u.options.cardView)return!0;v=u.options.columns[n].checkbox?"checkbox":v;v=u.options.columns[n].radio?"radio":v;y=['<td class="bs-checkbox">',"<input"+i(' data-index="%s"',o)+i(' name="%s"',u.options.selectItemName)+i(' type="%s"',v)+i(' value="%s"',h[u.options.idField])+i(' checked="%s"',1==+l||l&&l.checked?"checked":void 0)+i(' disabled="%s"',!u.options.columns[n].checkboxEnabled||l&&l.disabled?"disabled":void 0)+" />","<\/td>"].join("")}else l="undefined"==typeof l?u.options.undefinedText:l,y=u.options.cardView?['<div class="card-view">',u.options.showHeader?i('<span class="title" %s>%s<\/span>',e,f(u.options.columns,"field","title",t)):"",i('<span class="value">%s<\/span>',l),"<\/div>"].join(""):[i("<td%s %s>",w,e),l,"<\/td>"].join("");s.push(y)});this.options.cardView&&s.push("<\/td>");s.push("<\/tr>")}s.length||s.push('<tr class="no-records-found">',i('<td colspan="%s">%s<\/td>',this.header.fields.length,this.options.formatNoMatches()),"<\/tr>");this.$body.html(s.join(""));t||this.$container.find(".fixed-table-body").scrollTop(0);this.$body.find("> tr > td").off("click").on("click",function(){var t=n(this).parent();u.trigger("click-row",u.data[t.data("index")],t);u.options.clickToSelect&&u.header.clickToSelects[t.children().index(n(this))]&&t.find(i('[name="%s"]',u.options.selectItemName)).trigger("click")});this.$body.find("tr").off("dblclick").on("dblclick",function(){u.trigger("dbl-click-row",u.data[n(this).data("index")],n(this))});this.$selectItem=this.$body.find(i('[name="%s"]',this.options.selectItemName));this.$selectItem.off("click").on("click",function(t){t.stopImmediatePropagation();n(this).is(":radio")&&n(this).prop("checked",!0);var f=u.$selectItem.filter(":enabled").length===u.$selectItem.filter(":enabled").filter(":checked").length,i=n(this).prop("checked"),r=u.data[n(this).data("index")];u.$selectAll.add(u.$selectAll_).prop("checked",f);r[u.header.stateField]=i;u.trigger(i?"check":"uncheck",r);u.options.singleSelect&&(u.$selectItem.not(this).each(function(){u.data[n(this).data("index")][u.header.stateField]=!1}),u.$selectItem.filter(":checked").not(this).prop("checked",!1));u.updateSelected()});n.each(this.header.events,function(t,i){if(i){"string"==typeof i&&(i=r(null,i));for(var f in i)u.$body.find("tr").each(function(){var r=n(this),s=r.find("td").eq(t),e=f.indexOf(" "),o=f.substring(0,e),h=f.substring(e+1),c=i[f];s.find(h).off(o).on(o,function(n){var i=r.data("index"),f=u.data[i],e=f[u.header.fields[t]];c(n,e,f,i)})})}});this.updateSelected();this.resetView()};t.prototype.initServer=function(t){var i=this,f={},u={pageSize:this.options.pageSize,pageNumber:this.options.pageNumber,searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.url&&("limit"===this.options.queryParamsType&&(u={limit:u.pageSize,offset:u.pageSize*(u.pageNumber-1),search:u.searchText,sort:u.sortName,order:u.sortOrder}),f=r(this.options,this.options.queryParams,[u],f),f!==!1&&(t||this.$loading.show(),n.ajax({type:this.options.method,url:this.options.url,data:f,cache:this.options.cache,contentType:this.options.contentType,dataType:"json",success:function(n){n=r(i.options,i.options.responseHandler,[n],n);var t=n;"server"===i.options.sidePagination&&(i.options.totalRows=n.total,t=n.rows);i.load(t);i.trigger("load-success",t)},error:function(n){i.trigger("load-error",n.status)},complete:function(){t||i.$loading.hide()}})))};t.prototype.getCaretHtml=function(){return['<span class="order'+("desc"===this.options.sortOrder?"":" dropup")+'">','<span class="caret" style="margin: 10px 5px;"><\/span>',"<\/span>"].join("")};t.prototype.updateSelected=function(){this.$selectItem.each(function(){n(this).parents("tr")[n(this).prop("checked")?"addClass":"removeClass"]("selected")})};t.prototype.updateRows=function(t){var i=this;this.$selectItem.each(function(){i.data[n(this).data("index")][i.header.stateField]=t})};t.prototype.resetRows=function(){var t=this;n.each(this.data,function(n,i){t.$selectAll.prop("checked",!1);t.$selectItem.prop("checked",!1);i[t.header.stateField]=!1})};t.prototype.trigger=function(i){var r=Array.prototype.slice.call(arguments,1);i+=".bs.table";this.options[t.EVENTS[i]].apply(this.options,r);this.$el.trigger(n.Event(i),r);this.options.onAll(i,r);this.$el.trigger(n.Event("all.bs.table"),[i,r])};t.prototype.resetHeader=function(){var t=this,i=this.$container.find(".fixed-table-header"),r=this.$container.find(".fixed-table-body"),u=this.$el.width()>r.width()?e():0;return this.$el.is(":hidden")?(clearTimeout(this.timeoutId_),void(this.timeoutId_=setTimeout(n.proxy(this.resetHeader,this),100))):(this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),void setTimeout(function(){i.css({height:"37px","border-bottom":"1px solid #dddddd","margin-right":u}).find("table").css("width",t.$el.css("width")).html("").attr("class",t.$el.attr("class")).append(t.$header_);t.$header.find("th").each(function(i){t.$header_.find("th").eq(i).data(n(this).data())});t.$body.find("tr:first-child:not(.no-records-found) > *").each(function(i){t.$header_.find("div.fht-cell").eq(i).width(n(this).innerWidth())});t.$el.css("margin-top",-t.$header.height());r.off("scroll").on("scroll",function(){i.scrollLeft(n(this).scrollLeft())})}))};t.prototype.toggleColumn=function(n,t,r){if(-1!==n&&(this.options.columns[n].visible=t,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var u=this.$toolbar.find(".keep-open input").prop("disabled",!1);r&&u.filter(i('[value="%s"]',n)).prop("checked",t);u.filter(":checked").length<=this.options.minimumCountColumns&&u.filter(":checked").prop("disabled",!0)}};t.prototype.resetView=function(n){var t=this;if(this.header,n&&n.height&&(this.options.height=n.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var i=+this.$toolbar.children().outerHeight(!0),r=+this.$pagination.children().outerHeight(!0),u=this.options.height-i-r;this.$container.find(".fixed-table-container").css("height",u+"px")}return this.options.cardView?(t.$el.css("margin-top","0"),void t.$container.find(".fixed-table-container").css("padding-bottom","0")):(this.options.showHeader&&this.options.height&&this.resetHeader(),void(this.options.height&&this.options.showHeader&&this.$container.find(".fixed-table-container").css("padding-bottom","37px")))};t.prototype.getData=function(){return this.searchText?this.data:this.options.data};t.prototype.load=function(n){this.initData(n);this.initSearch();this.initPagination();this.initBody()};t.prototype.append=function(n){this.initData(n,!0);this.initSearch();this.initPagination();this.initBody(!0)};t.prototype.remove=function(t){var i,r,u=this.options.data.length;if(t.hasOwnProperty("field")&&t.hasOwnProperty("values")){for(i=u-1;i>=0;i--){if(r=this.options.data[i],!r.hasOwnProperty(t.field))return;-1!==n.inArray(r[t.field],t.values)&&this.options.data.splice(i,1)}u!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))}};t.prototype.updateRow=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("row")&&(n.extend(this.data[t.index],t.row),this.initBody())};t.prototype.mergeCells=function(t){var r,u,i=t.index,f=n.inArray(t.field,this.header.fields),e=t.rowspan||1,o=t.colspan||1,s=this.$body.find("tr"),h=s.eq(i).find("td").eq(f);if(!(0>i||0>f||i>=this.data.length)){for(r=i;i+e>r;r++)for(u=f;f+o>u;u++)s.eq(r).find("td").eq(u).hide();h.attr("rowspan",e).attr("colspan",o).show(10,n.proxy(this.resetView,this))}};t.prototype.getSelections=function(){var t=this;return n.grep(this.data,function(n){return n[t.header.stateField]})};t.prototype.checkAll=function(){this.$selectAll.add(this.$selectAll_).prop("checked",!0);this.$selectItem.filter(":enabled").prop("checked",!0);this.updateRows(!0);this.updateSelected();this.trigger("check-all")};t.prototype.uncheckAll=function(){this.$selectAll.add(this.$selectAll_).prop("checked",!1);this.$selectItem.filter(":enabled").prop("checked",!1);this.updateRows(!1);this.updateSelected();this.trigger("uncheck-all")};t.prototype.destroy=function(){this.$el.insertBefore(this.$container);n(this.options.toolbar).insertBefore(this.$el);this.$container.next().remove();this.$container.remove();this.$el.html(this.$el_.html()).attr("class",this.$el_.attr("class")||"")};t.prototype.showLoading=function(){this.$loading.show()};t.prototype.hideLoading=function(){this.$loading.hide()};t.prototype.refresh=function(n){n&&n.url&&(this.options.url=n.url);this.initServer(n&&n.silent)};t.prototype.showColumn=function(n){this.toggleColumn(u(this.options.columns,n),!0,!0)};t.prototype.hideColumn=function(n){this.toggleColumn(u(this.options.columns,n),!1,!0)};n.fn.bootstrapTable=function(i,r){var u,f=["getSelections","getData","load","append","remove","updateRow","mergeCells","checkAll","uncheckAll","refresh","resetView","destroy","showLoading","hideLoading","showColumn","hideColumn"];return this.each(function(){var e=n(this),o=e.data("bootstrap.table"),s=n.extend({},t.DEFAULTS,e.data(),"object"==typeof i&&i);if("string"==typeof i){if(n.inArray(i,f)<0)throw"Unknown method: "+i;if(!o)return;u=o[i](r);"destroy"===i&&e.removeData("bootstrap.table")}o||e.data("bootstrap.table",o=new t(this,s))}),"undefined"==typeof u?this:u};n.fn.bootstrapTable.Constructor=t;n.fn.bootstrapTable.defaults=t.DEFAULTS;n.fn.bootstrapTable.columnDefaults=t.COLUMN_DEFAULTS;n(function(){n('[data-toggle="table"]').bootstrapTable()})}(jQuery);n=String.fromCharCode;n:{try{document.createElement("$")}catch(q){p=q;break n}p=void 0}window.btoa||(window.btoa=function(n){for(var t,i,o,e,u,r,f=0,h=n.length,c=Math.max,s="";f<h;){if(t=n.charCodeAt(f++)||0,i=n.charCodeAt(f++)||0,r=n.charCodeAt(f++)||0,255<c(t,i,r))throw p;o=t>>2&63;t=(t&3)<<4|i>>4&15;e=(i&15)<<2|r>>6&3;u=r&63;i?r||(u=64):e=u=64;s+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(o)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(u)}return s});window.atob||(window.atob=function(t){t=t.replace(/=+$/,"");var f,i,r,o,u=0,s=t.length,e=[];if(1==s%4)throw p;for(;u<s;)f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(t.charAt(u++)),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(t.charAt(u++)),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(t.charAt(u++)),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(t.charAt(u++)),f=(f&63)<<2|i>>4&3,i=(i&15)<<4|r>>2&15,r=(r&3)<<6|o&63,e.push(n(f)),i&&e.push(n(i)),r&&e.push(n(r));return e.join("")});ExcellentExport=function(){function r(n,t){return n.replace(RegExp("{(\\w+)}","g"),function(n,i){return t[i]})}var t={excel:"data:application/vnd.ms-excel;base64,",csv:"data:application/csv;base64,"},u={excel:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}<\/x:Name><x:WorksheetOptions><x:DisplayGridlines/><\/x:WorksheetOptions><\/x:ExcelWorksheet><\/x:ExcelWorksheets><\/x:ExcelWorkbook><\/xml><![endif]--><\/head><body><table>{table}<\/table><\/body><\/html>'},n=",",i="\r\n";return{excel:function(n,i,f){i=i.nodeType?i:document.getElementById(i);var e=t.excel;return i=r(u.excel,{a:f||"Worksheet",table:i.innerHTML}),i=window.btoa(window.unescape(encodeURIComponent(i))),n.href=e+i,!0},csv:function(r,u,f,e){var c,o,h,s,l;for(void 0!==f&&f&&(n=f),void 0!==e&&e&&(i=e),u=u.nodeType?u:document.getElementById(u),h="",f=0;f<u.rows.length;f++){for(c=u.rows[f],e=0;e<c.cells.length;e++)o=c.cells[e],h=h+(e?n:""),s=o.textContent.trim(),o=s,l=-1!==s.indexOf(n)||-1!==s.indexOf("\r")||-1!==s.indexOf("\n"),(s=-1!==s.indexOf('"'))&&(o=o.replace(/"/g,'""')),(l||s)&&(o='"'+o+'"'),h+=o;h+=i}return u=t.csv+window.btoa(window.unescape(encodeURIComponent(h))),r.href=u,!0}}}(),function(n){n.fn.extend({tableExport:function(t){function o(n){return content_data=i.htmlContent=="true"?n.html().trim():n.text().trim(),i.escape=="true"&&(content_data=escape(content_data)),content_data}var i={separator:",",ignoreColumn:[],tableName:"yourTableName",type:"csv",pdfFontSize:14,pdfLeftMargin:20,escape:"true",htmlContent:"false",consoleLog:"false"},t=n.extend(i,t),e=this,r,v,y,a,s,h,c,u,f,l,p;if(i.type=="csv"||i.type=="txt")r="",n(e).find("thead").find("tr").each(function(){r+="\n";n(this).filter(":visible").find("th").each(function(t){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1&&(r+='"'+o(n(this))+'"'+i.separator)});r=n.trim(r);r=n.trim(r).substring(0,r.length-1)}),n(e).find("tbody").find("tr").each(function(){r+="\n";n(this).filter(":visible").find("td").each(function(t){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1&&(r+='"'+o(n(this))+'"'+i.separator)});r=n.trim(r).substring(0,r.length-1)}),i.consoleLog=="true"&&console.log(r),f="base64,"+n.base64.encode(r),window.open("data:application/"+i.type+";filename=exportData;"+f);else if(i.type=="sql")r="INSERT INTO `"+i.tableName+"` (",n(e).find("thead").find("tr").each(function(){n(this).filter(":visible").find("th").each(function(t){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1&&(r+="`"+o(n(this))+"`,")});r=n.trim(r);r=n.trim(r).substring(0,r.length-1)}),r+=") VALUES ",n(e).find("tbody").find("tr").each(function(){r+="(";n(this).filter(":visible").find("td").each(function(t){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1&&(r+='"'+o(n(this))+'",')});r=n.trim(r).substring(0,r.length-1)+"),"}),r=n.trim(r).substring(0,r.length-1),r+=";",i.consoleLog=="true"&&console.log(r),f="base64,"+n.base64.encode(r),window.open("data:application/sql;filename=exportData;"+f);else if(i.type=="json")v=[],n(e).find("thead").find("tr").each(function(){var t=[];n(this).filter(":visible").find("th").each(function(r){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(r)==-1&&t.push(o(n(this)))});v.push(t)}),y=[],n(e).find("tbody").find("tr").each(function(){var t=[];n(this).filter(":visible").find("td").each(function(r){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(r)==-1&&t.push(o(n(this)))});y.push(t)}),a=[],a.push({header:v,data:y}),i.consoleLog=="true"&&console.log(JSON.stringify(a)),f="base64,"+n.base64.encode(JSON.stringify(a)),window.open("data:application/json;filename=exportData;"+f);else if(i.type=="xml")s='<?xml version="1.0" encoding="utf-8"?>',s+="<tabledata><fields>",n(e).find("thead").find("tr").each(function(){n(this).filter(":visible").find("th").each(function(t){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1&&(s+="<field>"+o(n(this))+"<\/field>")})}),s+="<\/fields><data>",c=1,n(e).find("tbody").find("tr").each(function(){s+='<row id="'+c+'">';var t=0;n(this).filter(":visible").find("td").each(function(r){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(r)==-1&&(s+="<column-"+t+">"+o(n(this))+"<\/column-"+t+">");t++});c++;s+="<\/row>"}),s+="<\/data><\/tabledata>",i.consoleLog=="true"&&console.log(s),f="base64,"+n.base64.encode(s),window.open("data:application/xml;filename=exportData;"+f);else if(i.type=="excel"||i.type=="doc"||i.type=="powerpoint")h="<table>",n(e).find("thead").find("tr").each(function(){h+="<tr>";n(this).filter(":visible").find("th").each(function(t){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1&&(h+="<td>"+o(n(this))+"<\/td>")});h+="<\/tr>"}),c=1,n(e).find("tbody").find("tr").each(function(){h+="<tr>";var t=0;n(this).filter(":visible").find("td").each(function(r){n(this).css("display")!="none"&&i.ignoreColumn.indexOf(r)==-1&&(h+="<td>"+o(n(this))+"<\/td>");t++});c++;h+="<\/tr>"}),h+="<\/table>",i.consoleLog=="true"&&console.log(h),u="<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:"+i.type+"' xmlns='http://www.w3.org/TR/REC-html40'>",u+="<head>",u+="<!--[if gte mso 9]>",u+="<xml>",u+="<x:ExcelWorkbook>",u+="<x:ExcelWorksheets>",u+="<x:ExcelWorksheet>",u+="<x:Name>",u+="{worksheet}",u+="<\/x:Name>",u+="<x:WorksheetOptions>",u+="<x:DisplayGridlines/>",u+="<\/x:WorksheetOptions>",u+="<\/x:ExcelWorksheet>",u+="<\/x:ExcelWorksheets>",u+="<\/x:ExcelWorkbook>",u+="<\/xml>",u+="<![endif]-->",u+="<\/head>",u+="<body>",u+=h,u+="<\/body>",u+="<\/html>",f="base64,"+n.base64.encode(u),window.open("data:application/vnd.ms-"+i.type+";filename=exportData.doc;"+f);else if(i.type=="png")html2canvas(n(e),{onrendered:function(n){var t=n.toDataURL("image/png");window.open(t)}});else if(i.type=="pdf"){l=new jsPDF("p","pt","a4",!0);l.setFontSize(i.pdfFontSize);p=i.pdfLeftMargin;n(e).find("thead").find("tr").each(function(){n(this).filter(":visible").find("th").each(function(t){if(n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1){var r=p+t*50;l.text(r,20,o(n(this)))}})});var w=20,b=1,k=0;n(e).find("tbody").find("tr").each(function(t){rowCalc=t+1;rowCalc%26==0&&(l.addPage(),b++,w=w+10);k=w+rowCalc*10-(b-1)*280;n(this).filter(":visible").find("td").each(function(t){if(n(this).css("display")!="none"&&i.ignoreColumn.indexOf(t)==-1){var r=p+t*50;l.text(r,k,o(n(this)))}})});l.output("datauri")}}})}(jQuery);jQuery.base64=function(){function t(t,i){var r=n.indexOf(t.charAt(i));if(r===-1)throw"Cannot decode base64";return r}function u(n){var o=0,i,u,f=n.length,e=[];if(n=String(n),f===0)return n;if(f%4!=0)throw"Cannot decode base64";for(n.charAt(f-1)===r&&(o=1,n.charAt(f-2)===r&&(o=2),f-=4),i=0;i<f;i+=4)u=t(n,i)<<18|t(n,i+1)<<12|t(n,i+2)<<6|t(n,i+3),e.push(String.fromCharCode(u>>16,u>>8&255,u&255));switch(o){case 1:u=t(n,i)<<18|t(n,i+1)<<12|t(n,i+2)<<6;e.push(String.fromCharCode(u>>16,u>>8&255));break;case 2:u=t(n,i)<<18|t(n,i+1)<<12;e.push(String.fromCharCode(u>>16))}return e.join("")}function i(n,t){var i=n.charCodeAt(t);if(i>255)throw"INVALID_CHARACTER_ERR: DOM Exception 5";return i}function f(t){if(arguments.length!==1)throw"SyntaxError: exactly one argument required";t=String(t);var f,u,e=[],o=t.length-t.length%3;if(t.length===0)return t;for(f=0;f<o;f+=3)u=i(t,f)<<16|i(t,f+1)<<8|i(t,f+2),e.push(n.charAt(u>>18)),e.push(n.charAt(u>>12&63)),e.push(n.charAt(u>>6&63)),e.push(n.charAt(u&63));switch(t.length-o){case 1:u=i(t,f)<<16;e.push(n.charAt(u>>18)+n.charAt(u>>12&63)+r+r);break;case 2:u=i(t,f)<<16|i(t,f+1)<<8;e.push(n.charAt(u>>18)+n.charAt(u>>12&63)+n.charAt(u>>6&63)+r)}return e.join("")}var r="=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";return{decode:u,encode:f,VERSION:"1.0"}}(jQuery);!function(n){var t=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(n){return!n||/^\s*$/.test(n)},escapeRegExChars:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(n){return"string"==typeof n},isNumber:function(n){return"number"==typeof n},isArray:n.isArray,isFunction:n.isFunction,isObject:n.isPlainObject,isUndefined:function(n){return"undefined"==typeof n},toStr:function(n){return t.isUndefined(n)||null===n?"":n+""},bind:n.proxy,each:function(t,i){function r(n,t){return i(t,n)}n.each(t,r)},map:n.map,filter:n.grep,every:function(t,i){var r=!0;return t?(n.each(t,function(n,u){if(!(r=i.call(null,u,n,t)))return!1}),!!r):r},some:function(t,i){var r=!1;return t?(n.each(t,function(n,u){if((r=i.call(null,u,n,t)))return!1}),!!r):r},mixin:n.extend,getUniqueId:function(){var n=0;return function(){return n++}}(),templatify:function(t){function i(){return String(t)}return n.isFunction(t)?t:i},defer:function(n){setTimeout(n,0)},debounce:function(n,t,i){var r,u;return function(){var f,e,o=this,s=arguments;return f=function(){r=null;i||(u=n.apply(o,s))},e=i&&!r,clearTimeout(r),r=setTimeout(f,t),e&&(u=n.apply(o,s)),u}},throttle:function(n,t){var u,f,i,e,r,o;return r=0,o=function(){r=new Date;i=null;e=n.apply(u,f)},function(){var s=new Date,h=t-(s-r);return u=this,f=arguments,0>=h?(clearTimeout(i),i=null,r=s,e=n.apply(u,f)):i||(i=setTimeout(o,h)),e}},noop:function(){}}}(),l="0.10.5",a=function(){"use strict";function n(n){return n=t.toStr(n),n?n.split(/\s+/):[]}function i(n){return n=t.toStr(n),n?n.split(/\W+/):[]}function r(n){return function(){var i=[].slice.call(arguments,0);return function(r){var u=[];return t.each(i,function(i){u=u.concat(n(t.toStr(r[i])))}),u}}}return{nonword:i,whitespace:n,obj:{nonword:r(i),whitespace:r(n)}}}(),o=function(){"use strict";function i(i){this.maxSize=t.isNumber(i)?i:100;this.reset();this.maxSize<=0&&(this.set=this.get=n.noop)}function r(){this.head=this.tail=null}function u(n,t){this.key=n;this.val=t;this.prev=this.next=null}return t.mixin(i.prototype,{set:function(n,t){var i,r=this.list.tail;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key]);(i=this.hash[n])?(i.val=t,this.list.moveToFront(i)):(i=new u(n,t),this.list.add(i),this.hash[n]=i,this.size++)},get:function(n){var t=this.hash[n];if(t)return(this.list.moveToFront(t),t.val)},reset:function(){this.size=0;this.hash={};this.list=new r}}),t.mixin(r.prototype,{add:function(n){this.head&&(n.next=this.head,this.head.prev=n);this.head=n;this.tail=this.tail||n},remove:function(n){n.prev?n.prev.next=n.next:this.head=n.next;n.next?n.next.prev=n.prev:this.tail=n.prev},moveToFront:function(n){this.remove(n);this.add(n)}}),i}(),v=function(){"use strict";function i(n){this.prefix=["__",n,"__"].join("");this.ttlKey="__ttl__";this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function r(){return(new Date).getTime()}function u(n){return JSON.stringify(t.isUndefined(n)?null:n)}function f(n){return JSON.parse(n)}var n,e;try{n=window.localStorage;n.setItem("~~~","!");n.removeItem("~~~")}catch(o){n=null}return e=n&&window.JSON?{_prefix:function(n){return this.prefix+n},_ttlKey:function(n){return this._prefix(n)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),f(n.getItem(this._prefix(t)))},set:function(i,f,e){return t.isNumber(e)?n.setItem(this._ttlKey(i),u(r()+e)):n.removeItem(this._ttlKey(i)),n.setItem(this._prefix(i),u(f))},remove:function(t){return n.removeItem(this._ttlKey(t)),n.removeItem(this._prefix(t)),this},clear:function(){for(var r,i=[],u=n.length,t=0;u>t;t++)(r=n.key(t)).match(this.keyMatcher)&&i.push(r.replace(this.keyMatcher,""));for(t=i.length;t--;)this.remove(i[t]);return this},isExpired:function(i){var u=f(n.getItem(this._ttlKey(i)));return t.isNumber(u)&&r()>u?!0:!1}}:{get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(i.prototype,e),i}(),s=function(){"use strict";function i(t){t=t||{};this.cancelled=!1;this.lastUrl=null;this._send=t.transport?s(t.transport):n.ajax;this._get=t.rateLimiter?t.rateLimiter(this._get):this._get;this._cache=t.cache===!1?new o(0):e}function s(i){return function(r,u){function e(n){t.defer(function(){f.resolve(n)})}function o(n){t.defer(function(){f.reject(n)})}var f=n.Deferred();return i(r,u,e,o),f}}var r=0,u={},f=6,e=new o(10);return i.setMaxPendingRequests=function(n){f=n},i.resetCache=function(){e.reset()},t.mixin(i.prototype,{_get:function(n,t,i){function o(t){i&&i(null,t);e._cache.set(n,t)}function s(){i&&i(!0)}function c(){r--;delete u[n];e.onDeckRequestArgs&&(e._get.apply(e,e.onDeckRequestArgs),e.onDeckRequestArgs=null)}var h,e=this;this.cancelled||n!==this.lastUrl||((h=u[n])?h.done(o).fail(s):f>r?(r++,u[n]=this._send(n,t).done(o).fail(s).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(n,i,r){var u;return t.isFunction(i)&&(r=i,i={}),this.cancelled=!1,this.lastUrl=n,(u=this._cache.get(n))?t.defer(function(){r&&r(null,u)}):this._get(n,i,r),!!u},cancel:function(){this.cancelled=!0}}),i}(),y=function(){"use strict";function i(t){t=t||{};t.datumTokenizer&&t.queryTokenizer||n.error("datumTokenizer and queryTokenizer are both required");this.datumTokenizer=t.datumTokenizer;this.queryTokenizer=t.queryTokenizer;this.reset()}function r(n){return n=t.filter(n,function(n){return!!n}),n=t.map(n,function(n){return n.toLowerCase()})}function u(){return{ids:[],children:{}}}function f(n){for(var i={},r=[],t=0,u=n.length;u>t;t++)i[n[t]]||(i[n[t]]=!0,r.push(n[t]));return r}function e(n,t){function u(n,t){return n-t}var i=0,r=0,f=[],e,o;for(n=n.sort(u),t=t.sort(u),e=n.length,o=t.length;e>i&&o>r;)n[i]<t[r]?i++:n[i]>t[r]?r++:(f.push(n[i]),i++,r++);return f}return t.mixin(i.prototype,{bootstrap:function(n){this.datums=n.datums;this.trie=n.trie},add:function(n){var i=this;n=t.isArray(n)?n:[n];t.each(n,function(n){var f,e;f=i.datums.push(n)-1;e=r(i.datumTokenizer(n));t.each(e,function(n){for(var r,t=i.trie,e=n.split("");r=e.shift();)t=t.children[r]||(t.children[r]=u()),t.ids.push(f)})})},get:function(n){var u,i,o=this;return u=r(this.queryTokenizer(n)),t.each(u,function(n){var t,r,f,u;if(i&&0===i.length)return!1;for(t=o.trie,r=n.split("");t&&(f=r.shift());)t=t.children[f];return t&&0===r.length?(u=t.ids.slice(0),void(i=i?e(i,u):u)):(i=[],!1)}),i?t.map(f(i),function(n){return o.datums[n]}):[]},reset:function(){this.datums=[];this.trie=u()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),i}(),f=function(){"use strict";function i(n){return n.local||null}function r(i){var r,u;return u={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(r=i.prefetch||null)&&(r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.thumbprint=l+r.thumbprint,r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",!r.url&&n.error("prefetch requires url to be set")),r}function u(i){function f(n){return function(i){return t.debounce(i,n)}}function e(n){return function(i){return t.throttle(i,n)}}var r,u;return u={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(r=i.remote||null)&&(r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.rateLimiter=/^throttle$/i.test(r.rateLimitBy)?e(r.rateLimitWait):f(r.rateLimitWait),r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",delete r.rateLimitBy,delete r.rateLimitWait,!r.url&&n.error("remote requires url to be set")),r}return{local:i,prefetch:r,remote:u}}();!function(i){"use strict";function u(t){t&&(t.local||t.prefetch||t.remote)||n.error("one of local, prefetch, or remote is required");this.limit=t.limit||5;this.sorter=o(t.sorter);this.dupDetector=t.dupDetector||h;this.local=f.local(t);this.prefetch=f.prefetch(t);this.remote=f.remote(t);this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null;this.index=new y({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer});this.storage=this.cacheKey?new v(this.cacheKey):null}function o(n){function i(t){return t.sort(n)}function r(n){return n}return t.isFunction(n)?i:r}function h(){return!1}var e,r;return e=i.Bloodhound,r={data:"data",protocol:"protocol",thumbprint:"thumbprint"},i.Bloodhound=u,u.noConflict=function(){return i.Bloodhound=e,u},u.tokenizers=a,t.mixin(u.prototype,{_loadPrefetch:function(t){function f(n){i.clear();i.add(t.filter?t.filter(n):n);i._saveToStorage(i.index.serialize(),t.thumbprint,t.ttl)}var u,r,i=this;return(u=this._readFromStorage(t.thumbprint))?(this.index.bootstrap(u),r=n.Deferred().resolve()):r=n.ajax(t.url,t.ajax).done(f),r},_getFromRemote:function(n,t){function f(n,i){t(n?[]:u.remote.filter?u.remote.filter(i):i)}var i,r,u=this;if(this.transport)return n=n||"",r=encodeURIComponent(n),i=this.remote.replace?this.remote.replace(this.remote.url,n):this.remote.url.replace(this.remote.wildcard,r),this.transport.get(i,this.remote.ajax,f)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(n,t,i){this.storage&&(this.storage.set(r.data,n,i),this.storage.set(r.protocol,location.protocol,i),this.storage.set(r.thumbprint,t,i))},_readFromStorage:function(n){var i,t={};return this.storage&&(t.data=this.storage.get(r.data),t.protocol=this.storage.get(r.protocol),t.thumbprint=this.storage.get(r.thumbprint)),i=t.thumbprint!==n||t.protocol!==location.protocol,t.data&&!i?t.data:null},_initialize:function(){function u(){f.add(t.isFunction(i)?i():i)}var r,f=this,i=this.local;return r=this.prefetch?this._loadPrefetch(this.prefetch):n.Deferred().resolve(),i&&r.done(u),this.transport=this.remote?new s(this.remote):null,this.initPromise=r.promise()},initialize:function(n){return!this.initPromise||n?this._initialize():this.initPromise},add:function(n){this.index.add(n)},get:function(n,i){function e(n){var f=r.slice(0);t.each(n,function(n){var i;return i=t.some(f,function(t){return u.dupDetector(n,t)}),!i&&f.push(n),f.length<u.limit});i&&i(u.sorter(f))}var u=this,r=[],f=!1;r=this.index.get(n);r=this.sorter(r).slice(0,this.limit);r.length<this.limit?f=this._getFromRemote(n,e):this._cancelLastRemoteRequest();f||(r.length>0||!this.transport)&&i&&i(r)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&s.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}}),u}(this);var r=function(){return{wrapper:'<span class="twitter-typeahead"><\/span>',dropdown:'<span class="tt-dropdown-menu"><\/span>',dataset:'<div class="tt-dataset-%CLASS%"><\/div>',suggestions:'<span class="tt-suggestions"><\/span>',suggestion:'<div class="tt-suggestion"><\/div>'}}(),i=function(){"use strict";var n={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(n.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(n.input,{marginTop:"-1px"}),n}(),h=function(){"use strict";function i(t){t&&t.el||n.error("EventBus initialized without el");this.$el=n(t.el)}var r="typeahead:";return t.mixin(i.prototype,{trigger:function(n){var t=[].slice.call(arguments,1);this.$el.trigger(r+n,t)}}),i}(),e=function(){"use strict";function t(t,i,r,u){var f;if(!r)return this;for(i=i.split(n),r=u?s(r,u):r,this._callbacks=this._callbacks||{};f=i.shift();)this._callbacks[f]=this._callbacks[f]||{sync:[],async:[]},this._callbacks[f][t].push(r);return this}function r(n,i,r){return t.call(this,"async",n,i,r)}function u(n,i,r){return t.call(this,"sync",n,i,r)}function f(t){var i;if(!this._callbacks)return this;for(t=t.split(n);i=t.shift();)delete this._callbacks[i];return this}function e(t){var r,u,f,e,o;if(!this._callbacks)return this;for(t=t.split(n),f=[].slice.call(arguments,1);(r=t.shift())&&(u=this._callbacks[r]);)e=i(u.sync,this,[r].concat(f)),o=i(u.async,this,[r].concat(f)),e()&&h(o);return this}function i(n,t,i){function r(){for(var r,u=0,f=n.length;!r&&f>u;u+=1)r=n[u].apply(t,i)===!1;return!r}return r}function o(){return window.setImmediate?function(n){setImmediate(function(){n()})}:function(n){setTimeout(function(){n()},0)}}function s(n,t){return n.bind?n.bind(t):function(){n.apply(t,[].slice.call(arguments,0))}}var n=/\s+/,h=o();return{onSync:u,onAsync:r,off:f,trigger:e}}(),p=function(n){"use strict";function i(n,i,r){for(var u,f=[],e=0,o=n.length;o>e;e++)f.push(t.escapeRegExChars(n[e]));return u=r?"\\b("+f.join("|")+")\\b":"("+f.join("|")+")",i?new RegExp(u):new RegExp(u,"i")}var r={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(u){function o(t){var i,r,f;return(i=e.exec(t.data))&&(f=n.createElement(u.tagName),u.className&&(f.className=u.className),r=t.splitText(i.index),r.splitText(i[0].length),f.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(f,r)),!!i}function f(n,t){for(var i,r=0;r<n.childNodes.length;r++)i=n.childNodes[r],i.nodeType===3?r+=t(i)?1:0:f(i,t)}var e;u=t.mixin({},r,u);u.node&&u.pattern&&(u.pattern=t.isArray(u.pattern)?u.pattern:[u.pattern],e=i(u.pattern,u.caseSensitive,u.wordsOnly),f(u.node,o))}}(window.document),c=function(){"use strict";function i(i){var r,e,o,s,h=this;i=i||{};i.input||n.error("input is missing");r=t.bind(this._onBlur,this);e=t.bind(this._onFocus,this);o=t.bind(this._onKeydown,this);s=t.bind(this._onInput,this);this.$hint=n(i.hint);this.$input=n(i.input).on("blur.tt",r).on("focus.tt",e).on("keydown.tt",o);0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop);t.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(n){u[n.which||n.keyCode]||t.defer(t.bind(h._onInput,h,n))}):this.$input.on("input.tt",s);this.query=this.$input.val();this.$overflowHelper=f(this.$input)}function f(t){return n('<pre aria-hidden="true"><\/pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function o(n,t){return i.normalizeQuery(n)===i.normalizeQuery(t)}function r(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}var u;return u={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(n){return(n||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(i.prototype,e,{_onBlur:function(){this.resetInputValue();this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(n){var t=u[n.which||n.keyCode];this._managePreventDefault(t,n);t&&this._shouldTrigger(t,n)&&this.trigger(t+"Keyed",n)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(n,t){var i,u,f;switch(n){case"tab":u=this.getHint();f=this.getInputValue();i=u&&u!==f&&!r(t);break;case"up":case"down":i=!r(t);break;default:i=!1}i&&t.preventDefault()},_shouldTrigger:function(n,t){var i;switch(n){case"tab":i=!r(t);break;default:i=!0}return i},_checkInputValue:function(){var n,t,i;n=this.getInputValue();t=o(n,this.query);i=t?this.query.length!==n.length:!1;this.query=n;t?i&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(n){this.query=n},getInputValue:function(){return this.$input.val()},setInputValue:function(n,t){this.$input.val(n);t?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(n){this.$hint.val(n)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var n,t,i,r;n=this.getInputValue();t=this.getHint();i=n!==t&&0===t.indexOf(n);r=""!==n&&i&&!this.hasOverflow();!r&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var n=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=n},isCursorAtEnd:function(){var n,i,r;return n=this.$input.val().length,i=this.$input[0].selectionStart,t.isNumber(i)?i===n:document.selection?(r=document.selection.createRange(),r.moveStart("character",-n),n===r.text.length):!0},destroy:function(){this.$hint.off(".tt");this.$input.off(".tt");this.$hint=this.$input=this.$overflowHelper=null}}),i}(),u=function(){"use strict";function u(i){i=i||{};i.templates=i.templates||{};i.source||n.error("missing source");i.name&&!l(i.name)&&n.error("invalid dataset name: "+i.name);this.query=null;this.highlight=!!i.highlight;this.name=i.name||t.getUniqueId();this.source=i.source;this.displayFn=h(i.display||i.displayKey);this.templates=c(i.templates,this.displayFn);this.$el=n(r.dataset.replace("%CLASS%",this.name))}function h(n){function i(t){return t[n]}return n=n||"value",t.isFunction(n)?n:i}function c(n,i){function r(n){return"<p>"+i(n)+"<\/p>"}return{empty:n.empty&&t.templatify(n.empty),header:n.header&&t.templatify(n.header),footer:n.footer&&t.templatify(n.footer),suggestion:n.suggestion||r}}function l(n){return/^[_a-zA-Z0-9-]+$/.test(n)}var f="ttDataset",o="ttValue",s="ttDatum";return u.extractDatasetName=function(t){return n(t).data(f)},u.extractValue=function(t){return n(t).data(o)},u.extractDatum=function(t){return n(t).data(s)},t.mixin(u.prototype,e,{_render:function(u,e){function v(){return h.templates.empty({query:u,isEmpty:!0})}function y(){function a(t){var u;return u=n(r.suggestion).append(h.templates.suggestion(t)).data(f,h.name).data(o,h.displayFn(t)).data(s,t),u.children().each(function(){n(this).css(i.suggestionChild)}),u}var c,l;return c=n(r.suggestions).css(i.suggestions),l=t.map(e,a),c.append.apply(c,l),h.highlight&&p({className:"tt-highlight",node:c[0],pattern:u}),c}function l(){return h.templates.header({query:u,isEmpty:!c})}function a(){return h.templates.footer({query:u,isEmpty:!c})}if(this.$el){var c,h=this;this.$el.empty();c=e&&e.length;!c&&this.templates.empty?this.$el.html(v()).prepend(h.templates.header?l():null).append(h.templates.footer?a():null):c&&this.$el.html(y()).prepend(h.templates.header?l():null).append(h.templates.footer?a():null);this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(n){function i(i){t.canceled||n!==t.query||t._render(n,i)}var t=this;this.query=n;this.canceled=!1;this.source(n,i)},cancel:function(){this.canceled=!0},clear:function(){this.cancel();this.$el.empty();this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),u}(),w=function(){"use strict";function r(i){var u,e,o,r=this;i=i||{};i.menu||n.error("menu is required");this.isOpen=!1;this.isEmpty=!0;this.datasets=t.map(i.datasets,f);u=t.bind(this._onSuggestionClick,this);e=t.bind(this._onSuggestionMouseEnter,this);o=t.bind(this._onSuggestionMouseLeave,this);this.$menu=n(i.menu).on("click.tt",".tt-suggestion",u).on("mouseenter.tt",".tt-suggestion",e).on("mouseleave.tt",".tt-suggestion",o);t.each(this.datasets,function(n){r.$menu.append(n.getRoot());n.onSync("rendered",r._onRendered,r)})}function f(n){return new u(n)}return t.mixin(r.prototype,e,{_onSuggestionClick:function(t){this.trigger("suggestionClicked",n(t.currentTarget))},_onSuggestionMouseEnter:function(t){this._removeCursor();this._setCursor(n(t.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function n(n){return n.isEmpty()}this.isEmpty=t.every(this.datasets,n);this.isEmpty?this._hide():this.isOpen&&this._show();this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(n,t){n.first().addClass("tt-cursor");t||this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(n){var i,r,t,u;if(this.isOpen){if(r=this._getCursor(),i=this._getSuggestions(),this._removeCursor(),t=i.index(r)+n,t=(t+1)%(i.length+1)-1,-1===t)return void this.trigger("cursorRemoved");-1>t&&(t=i.length-1);this._setCursor(u=i.eq(t));this._ensureVisible(u)}},_ensureVisible:function(n){var t,i,r,u;t=n.position().top;i=t+n.outerHeight(!0);r=this.$menu.scrollTop();u=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10);0>t?this.$menu.scrollTop(r+t):i>u&&this.$menu.scrollTop(r+(i-u))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(n){this.$menu.css("ltr"===n?i.ltr:i.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(n){var t=null;return n.length&&(t={raw:u.extractDatum(n),value:u.extractValue(n),datasetName:u.extractDatasetName(n)}),t},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(n){function i(t){t.update(n)}t.each(this.datasets,i)},empty:function(){function n(n){n.clear()}t.each(this.datasets,n);this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function n(n){n.destroy()}this.$menu.off(".tt");this.$menu=null;t.each(this.datasets,n)}}),r}(),b=function(){"use strict";function f(i){var r,u,f;i=i||{};i.input||n.error("missing input");this.isActivated=!1;this.autoselect=!!i.autoselect;this.minLength=t.isNumber(i.minLength)?i.minLength:1;this.$node=e(i.input,i.withHint);r=this.$node.find(".tt-dropdown-menu");u=this.$node.find(".tt-input");f=this.$node.find(".tt-hint");u.on("blur.tt",function(n){var i,f,e;i=document.activeElement;f=r.is(i);e=r.has(i).length>0;t.isMsie()&&(f||e)&&(n.preventDefault(),n.stopImmediatePropagation(),t.defer(function(){u.focus()}))});r.on("mousedown.tt",function(n){n.preventDefault()});this.eventBus=i.eventBus||new h({el:u});this.dropdown=new w({menu:r,datasets:i.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this);this.input=new c({input:u,hint:f}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this);this._setLanguageDirection()}function e(t,f){var e,h,c,s;e=n(t);h=n(r.wrapper).css(i.wrapper);c=n(r.dropdown).css(i.dropdown);s=e.clone().css(i.hint).css(o(e));s.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1});e.data(u,{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")});e.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(f?i.input:i.inputWithNoHint);try{e.attr("dir")||e.attr("dir","auto")}catch(l){}return e.wrap(h).parent().prepend(f?s:null).append(c)}function o(n){return{backgroundAttachment:n.css("background-attachment"),backgroundClip:n.css("background-clip"),backgroundColor:n.css("background-color"),backgroundImage:n.css("background-image"),backgroundOrigin:n.css("background-origin"),backgroundPosition:n.css("background-position"),backgroundRepeat:n.css("background-repeat"),backgroundSize:n.css("background-size")}}function s(n){var i=n.find(".tt-input");t.each(i.data(u),function(n,r){t.isUndefined(n)?i.removeAttr(r):i.attr(r,n)});i.detach().removeData(u).removeClass("tt-input").insertAfter(n);n.remove()}var u="ttAttrs";return t.mixin(f.prototype,{_onSuggestionClicked:function(n,t){var i;(i=this.dropdown.getDatumForSuggestion(t))&&this._select(i)},_onCursorMoved:function(){var n=this.dropdown.getDatumForCursor();this.input.setInputValue(n.value,!0);this.eventBus.trigger("cursorchanged",n.raw,n.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue();this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint();this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint();this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0;this.dropdown.open()},_onBlurred:function(){this.isActivated=!1;this.dropdown.empty();this.dropdown.close()},_onEnterKeyed:function(n,t){var i,r;i=this.dropdown.getDatumForCursor();r=this.dropdown.getDatumForTopSuggestion();i?(this._select(i),t.preventDefault()):this.autoselect&&r&&(this._select(r),t.preventDefault())},_onTabKeyed:function(n,t){var i;(i=this.dropdown.getDatumForCursor())?(this._select(i),t.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close();this.input.resetInputValue()},_onUpKeyed:function(){var n=this.input.getQuery();this.dropdown.isEmpty&&n.length>=this.minLength?this.dropdown.update(n):this.dropdown.moveCursorUp();this.dropdown.open()},_onDownKeyed:function(){var n=this.input.getQuery();this.dropdown.isEmpty&&n.length>=this.minLength?this.dropdown.update(n):this.dropdown.moveCursorDown();this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(n,t){this.input.clearHintIfInvalid();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty();this.dropdown.open();this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint();this.dropdown.open()},_setLanguageDirection:function(){var n;this.dir!==(n=this.input.getLanguageDirection())&&(this.dir=n,this.$node.css("direction",n),this.dropdown.setLanguageDirection(n))},_updateHint:function(){var n,i,u,f,e,r;n=this.dropdown.getDatumForTopSuggestion();n&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(i=this.input.getInputValue(),u=c.normalizeQuery(i),f=t.escapeRegExChars(u),e=new RegExp("^(?:"+f+")(.+$)","i"),r=e.exec(n.value),r?this.input.setHint(i+r[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(n){var i,r,u,t;i=this.input.getHint();r=this.input.getQuery();u=n||this.input.isCursorAtEnd();i&&r!==i&&u&&(t=this.dropdown.getDatumForTopSuggestion(),t&&this.input.setInputValue(t.value),this.eventBus.trigger("autocompleted",t.raw,t.datasetName))},_select:function(n){this.input.setQuery(n.value);this.input.setInputValue(n.value,!0);this._setLanguageDirection();this.eventBus.trigger("selected",n.raw,n.datasetName);this.dropdown.close();t.defer(t.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(n){n=t.toStr(n);this.isActivated?this.input.setInputValue(n):(this.input.setQuery(n),this.input.setInputValue(n,!0));this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy();this.dropdown.destroy();s(this.$node);this.$node=null}}),f}();!function(){"use strict";var u,i,r;u=n.fn.typeahead;i="ttTypeahead";r={initialize:function(r,u){function f(){var o,e,f=n(this);t.each(u,function(n){n.highlight=!!r.highlight});e=new b({input:f,eventBus:o=new h({el:f}),withHint:t.isUndefined(r.hint)?!0:!!r.hint,minLength:r.minLength,autoselect:r.autoselect,datasets:u});f.data(i,e)}return u=t.isArray(u)?u:[].slice.call(arguments,1),r=r||{},this.each(f)},open:function(){function t(){var t,r=n(this);(t=r.data(i))&&t.open()}return this.each(t)},close:function(){function t(){var t,r=n(this);(t=r.data(i))&&t.close()}return this.each(t)},val:function(t){function r(){var r,u=n(this);(r=u.data(i))&&r.setVal(t)}function u(n){var t,r;return(t=n.data(i))&&(r=t.getVal()),r}return arguments.length?this.each(r):u(this.first())},destroy:function(){function t(){var t,r=n(this);(t=r.data(i))&&(t.destroy(),r.removeData(i))}return this.each(t)}};n.fn.typeahead=function(t){var u;return r[t]&&"initialize"!==t?(u=this.filter(function(){return!!n(this).data(i)}),r[t].apply(u,[].slice.call(arguments,1))):r.initialize.apply(this,arguments)};n.fn.typeahead.noConflict=function(){return n.fn.typeahead=u,this}}()}(window.jQuery);window.matchMedia=window.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.style.background="none",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=t.offsetWidth==42,i.removeChild(r),{matches:u,media:n}}}(document),function(n){function d(){a(!0)}if(n.respond={},respond.update=function(){},respond.mediaQueriesSupported=n.matchMedia&&n.matchMedia("only all").matches,!respond.mediaQueriesSupported){var t=n.document,i=t.documentElement,e=[],u=[],r=[],o={},v=30,f=t.getElementsByTagName("head")[0]||i,g=t.getElementsByTagName("base")[0],s=f.getElementsByTagName("link"),h=[],y=function(){for(var f=s,c=f.length,r=0,t,i,u,e;r<c;r++)t=f[r],i=t.href,u=t.media,e=t.rel&&t.rel.toLowerCase()==="stylesheet",!i||!e||o[i]||(t.styleSheet&&t.styleSheet.rawCssText?(w(t.styleSheet.rawCssText,i,u),o[i]=!0):(/^([a-zA-Z:]*\/\/)/.test(i)||g)&&i.replace(RegExp.$1,"").split("/")[0]!==n.location.host||h.push({href:i,media:u}));p()},p=function(){if(h.length){var n=h.shift();nt(n.href,function(t){w(t,n.href,n.media);o[n.href]=!0;p()})}},w=function(n,t,i){var o=n.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),s=o&&o.length||0,t=t.substring(0,t.lastIndexOf("/")),v=function(n){return n.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+t+"$2$3")},y=!s&&i,h=0,f,c,r,l,p;for(t.length&&(t+="/"),y&&(s=1);h<s;h++)for(f=0,y?(c=i,u.push(v(n))):(c=o[h].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,u.push(RegExp.$2&&v(RegExp.$2))),l=c.split(","),p=l.length;f<p;f++)r=l[f],e.push({media:r.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:u.length-1,hasquery:r.indexOf("(")>-1,minw:r.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")});a()},c,b,k=function(){var u,r=t.createElement("div"),n=t.body,f=!1;return r.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=f=t.createElement("body"),n.style.background="none"),n.appendChild(r),i.insertBefore(n,i.firstChild),u=r.offsetWidth,f?i.removeChild(n):n.removeChild(r),l=parseFloat(u)},l,a=function(n){var nt="clientWidth",tt=i[nt],it=t.compatMode==="CSS1Compat"&&tt||t.body[nt]||tt,d={},ot=s[s.length-1],rt=(new Date).getTime(),o,h,g;if(n&&c&&rt-c<v){clearTimeout(b);b=setTimeout(a,v);return}c=rt;for(o in e){var y=e[o],p=y.minw,w=y.maxw,ut=p===null,ft=w===null,et="em";!p||(p=parseFloat(p)*(p.indexOf(et)>-1?l||k():1));!w||(w=parseFloat(w)*(w.indexOf(et)>-1?l||k():1));y.hasquery&&(ut&&ft||!(ut||it>=p)||!(ft||it<=w))||(d[y.media]||(d[y.media]=[]),d[y.media].push(u[y.rules]))}for(o in r)r[o]&&r[o].parentNode===f&&f.removeChild(r[o]);for(o in d)h=t.createElement("style"),g=d[o].join("\n"),h.type="text/css",h.media=o,f.insertBefore(h,ot.nextSibling),h.styleSheet?h.styleSheet.cssText=g:h.appendChild(t.createTextNode(g)),r.push(h)},nt=function(n,t){var i=tt();i&&(i.open("GET",n,!0),i.onreadystatechange=function(){i.readyState==4&&(i.status==200||i.status==304)&&t(i.responseText)},i.readyState!=4)&&i.send(null)},tt=function(){var n=!1;try{n=new XMLHttpRequest}catch(t){n=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return n}}();y();respond.update=y;n.addEventListener?n.addEventListener("resize",d,!1):n.attachEvent&&n.attachEvent("onresize",d)}}(this);Util={};Util.BingKey="Ap7YNnmS19BE13GOhfutxmmO_45rbvFjL2lhLg7Ox6_z6ly2_VinEncO-Q-VZQ36";Util.WalesBounds=[-6,50,-2,54];Util.colours=["#163b7c","#5284c4","#71adfd","#b6d4fe","#e5f0ff"];Util.coloursWithTransparency=["rgba(22,59,124, 0.6)","rgba(82, 132, 196, 0.6)","rgba(113, 173, 253, 0.6)","rgba(182, 212, 254, 0.6)","rgba(229, 240, 255, 0.6)"];Util.modes={"default":"groups",groups:{usePercentage:!1,breaks:[[1,191],[192,382],[383,573],[574,955],[956,1909]],percentageBreaks:[[0,10],[10,20],[20,30],[30,50],[50,100]],colours:["#163b7c","#5284c4","#71adfd","#b6d4fe","#e5f0ff"],labels:{en:["10% most deprived","10-20% most deprived","20-30% most deprived","30-50% most deprived","50% least deprived"],cy:["10% mwyaf difreintiedig","10-20% mwyaf difreintiedig","20-30% mwyaf difreintiedig","30-50% mwyaf difreintiedig","50% lleiaf difreintiedig"]}},quartiles:{usePercentage:!0,calculate:!0},deciles:{usePercentage:!0,breaks:[[1,191],[192,382],[383,573],[574,764],[765,955],[956,1146],[1147,1337],[1338,1528],[1529,1719],[1720,1909]],percentageBreaks:[[0,10],[10,20],[20,30],[30,40],[40,50],[50,60],[60,70],[70,80],[80,90],[90,100]],colours:["#163B7C","#2D4F8A","#446399","#5B77A7","#728BB6","#899FC4","#A0B3D3","#B7C7E1","#CEDBF0","#E5F0FF"],labels:{en:["10% most deprived","10-20% most deprived","20-30% most deprived","30-40% most deprived","40-50% most deprived","40-50% least deprived","30-40% least deprived","20-30% least deprived","10-20% least deprived","10% least deprived"],cy:["10% mwyaf difreintiedig","10-20% mwyaf difreintiedig","20-30% mwyaf difreintiedig","30-40% mwyaf difreintiedig","40-50% mwyaf difreintiedig","40-50% llleiaf difreintiedig","30-40% lleiaf difreintiedig","20-30% lleiaf difreintiedig","10-20% lleiaf difreintiedig","10% lleiaf difreintiedig"]}}};Util.IE=function(){var u,t=-1,n=window.navigator.userAgent,i=n.indexOf("MSIE "),f=n.indexOf("Trident/"),r;return i>0?t=parseInt(n.substring(i+5,n.indexOf(".",i)),10):f>0&&(r=n.indexOf("rv:"),t=parseInt(n.substring(r+3,n.indexOf(".",r)),10)),t>-1?t:u}();$(document).ready(function(){Util.ltie9=$("html").hasClass("lt-ie9")?!0:!1;try{var n=window.parent.location,t=new String(n)}catch(i){window.location="https://gov.wales"}});Util.hexToRGB=function(n){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null};Util.getLuminence=function(n){return.2126*n.r+.7152*n.g+.0722*n.b};Util.switchLanguage=function(n){var t=this.updateURLParam("lang",n,window.location.href);window.location.href=t};Util.updateURLParam=function(n,t,i){var u,f,r;return i==null&&(i=window.location.href),i||(i=window.location.href),u=new RegExp("([?&])"+n+"=.*?(&|#|$)(.*)","gi"),u.test(i)?typeof t!="undefined"&&t!==null?i.replace(u,"$1"+n+"="+t+"$2$3"):(r=i.split("#"),i=r[0].replace(u,"$1$3").replace(/(&|\?)$/,""),typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):typeof t!="undefined"&&t!==null?(f=i.indexOf("?")!==-1?"&":"?",r=i.split("#"),i=r[0]+f+n+"="+t,typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):i};Util.showTooltip=function(n,t){if(n===!1)this.$tooltip!=null&&this.$tooltip.hide();else{if(this.$tooltip==null){this.$tooltip=$("#tooltip");var i=this;try{document.addEventListener("mousemove",function(n){var t=n.clientX,r=n.clientY;i.$tooltip.css("top",r+20+"px");i.$tooltip.css("left",t+20+"px")},!1)}catch(r){document.attachEvent("onmousemove",function(n){var t=n.clientX,r=n.clientY;i.$tooltip.css("top",r+20+"px");i.$tooltip.css("left",t+20+"px")})}finally{try{document.onmousemove=function(){}}catch(u){}}window.onmousemove=function(){}}this.$tooltip.html(n).show();typeof t=="undefined"&&(t=!0);t==!0?$(this.$tooltip.addClass("clickable")):$(this.$tooltip.removeClass("clickable"))}};Util.getBreakIndexForRank=function(n,t){var i=0,u=Util.modes[n].breaks.length,r;for(i;i<u;i++)if(r=Util.modes[n].breaks[i],t>=r[0]&&t<=r[1])return i};Util.getBarcodeGroupsHTML=function(){for(var t=Util.modes[Util.modes["default"]],o=$(".item-barcode-container").first().width(),n=0,f=t.breaks.length,u="",i=0,e=100/t.breaks[t.breaks.length-1][1],r,n=0;n<f;n++)r=Math.round(Math.round((t.breaks[n][1]-t.breaks[n][0])*e)/10)*10,u+='<div class="band" data-group="'+n+'" style="background-color:'+t.colours[n]+"; width:"+Math.round(r)+"%; left:"+Math.round(i-1)+'%"><\/div>',i=i+r;return u};Util.getBarcodeDecilesHTML=function(){for(var u=$(".item-barcode-container").first().width(),i="",r=10,t=0,n=0;n<10;n++)i+='<div class="band" data-decile="'+n+'" style="background-color:'+Util.modes.deciles.colours[n]+"; width:"+r+"%; left:"+(t-1)+'%"><\/div>',t=t+r;return i};Util.showModalPopup=function(n,t,i){$("#modalPopup").find("h4").text(n);i==!0?$("#modalPopup").find(".modal-body").find("p").html(t):$("#modalPopup").find(".modal-body").find("p").text(t);$("#modalPopup").modal()};Util.showDomainInfoPopup=function(n,t){$.getJSON("/api/v1/"+t+"/domain/"+n,function(t){var r=t.Description,i;Util.showModalPopup(t.Name,t.Description,!0);i=$("#exploreButton").clone();i.attr("href","/explore?lang="+LanguageCode+"#domain="+n);$("#modalPopup").find("#exploreButton").remove();$("#modalPopup").find(".modal-body").append(i);i.removeClass("hidden")})};Util.hash=new function(){var n={},t,u,i,r;for(this.set=function(t,i){n[t]=i;this.push()},this.remove=function(t){delete n[t];this.push()},this.removeMany=function(t){for(var i=0;i<t.length;i++)delete n[t[i]];this.push()},this.get=function(t){return n[t]},this.keyExists=function(t){return n.hasOwnProperty(t)},this.push=function(){var r=[],t,i;for(t in n)n.hasOwnProperty(t)&&(t=escape(t),i=escape(n[t]),r.push(t+(i!=="undefined"?"="+i:"")));window.location.hash=r.join("&")},n={},t=window.location.hash,t=t.substring(1,t.length),u=t.split("&"),r=0;r<u.length;r++)i=u[r].split("="),n[unescape(i[0])]=typeof i[1]!="undefined"?unescape(i[1]):i[1]};Util.getOLStyleForRank=function(n,t){var f=Util.getBandIndex(n),u=Util.coloursWithTransparency[f],i,r;return t<11?i=1:t<12?i=.65:t<13?i=.5:t<15&&(i=.4),r=u,t>7&&(r="#232323"),{weight:1.8,fillColour:u,stroke:r,opacity:1-i,fillOpacity:i}};Util.getBandIndex=function(n){var t=0,i=Util.modes.groups.breaks.length;for(t;t<i;t++)if(n>=Util.modes.groups.breaks[t][0]&&n<=Util.modes.groups.breaks[t][1])return t};Util.getMapImage=function(n,t){window.setTimeout(function(){t.once("postcompose",function(){var t=document.getElementById(n);$("html, body").scrollTop(0);$("#legend .checkbox").hide();$("#showLegendButton").hide();$("#lessLegendDetail").hide();$(".ol-zoom").hide();$(".ol-rotate").hide();$("#imageDownload").hide();$("#map-options").hide();html2canvas(t,{scrollX:0,scrollY:0,logging:!0,useCORS:!0,optimized:!1,allowTaint:!0}).then(function(n){navigator.msSaveBlob?navigator.msSaveBlob(n.msToBlob(),"map.png"):n.toBlob(function(n){saveAs(n,"map.png")})})});t.renderSync();window.setTimeout(function(){$("#legend .checkbox").show();$("#showLegendButton").show();$("#lessLegendDetail").show();$(".ol-zoom").show();$(".ol-rotate").show();$("#imageDownload").show();$("#map-options").show()},200)},200)};!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ol=t():n.ol=t()}(window,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,i){var r,u;if((1&i&&(n=t(n)),8&i)||4&i&&"object"==typeof n&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&i&&"string"!=typeof n)for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r},t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=9)}([function(n,t,i){"use strict";function f(n,t){if(!(this instanceof f))return new f(n,t);this._maxEntries=Math.max(4,n||9);this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries));t&&this._initFormat(t);this.clear()}function w(n,t,i){if(!i)return t.indexOf(n);for(var r=0;r<t.length;r++)if(i(n,t[r]))return r;return-1}function r(n,t){e(n,0,n.children.length,t,n)}function e(n,t,i,r,f){f||(f=u(null));f.minX=1/0;f.minY=1/0;f.maxX=-1/0;f.maxY=-1/0;for(var e,s=t;s<i;s++)e=n.children[s],o(f,n.leaf?r(e):e);return f}function o(n,t){return n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY),n}function a(n,t){return n.minX-t.minX}function v(n,t){return n.minY-t.minY}function c(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function s(n){return n.maxX-n.minX+(n.maxY-n.minY)}function b(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function k(n,t){var i=Math.max(n.minX,t.minX),r=Math.max(n.minY,t.minY),u=Math.min(n.maxX,t.maxX),f=Math.min(n.maxY,t.maxY);return Math.max(0,u-i)*Math.max(0,f-r)}function l(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function h(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function u(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(n,t,i,r,u){for(var f,e=[t,i];e.length;)(i=e.pop())-(t=e.pop())<=r||(f=t+Math.ceil((i-t)/r/2)*r,p(n,f,t,i,u),e.push(t,f,f,i))}n.exports=f;n.exports.default=f;var p=i(5);f.prototype={all:function(){return this._all(this.data,[])},search:function(n){var t=this.data,r=[],s=this.toBBox,u,e,i,o,f;if(!h(n,t))return r;for(f=[];t;){for(u=0,e=t.children.length;u<e;u++)i=t.children[u],h(n,o=t.leaf?s(i):i)&&(t.leaf?r.push(i):l(n,o)?this._all(i,r):f.push(i));t=f.pop()}return r},collides:function(n){var t=this.data,o=this.toBBox,i,f,r,e,u;if(!h(n,t))return!1;for(u=[];t;){for(i=0,f=t.children.length;i<f;i++)if(r=t.children[i],h(n,e=t.leaf?o(r):r)){if(t.leaf||l(n,e))return!0;u.push(r)}t=u.pop()}return!1},load:function(n){var i,r,t,u;if(!n||!n.length)return this;if(n.length<this._minEntries){for(i=0,r=n.length;i<r;i++)this.insert(n[i]);return this}return t=this._build(n.slice(),0,n.length-1,0),this.data.children.length?this.data.height===t.height?this._splitRoot(this.data,t):(this.data.height<t.height&&(u=this.data,this.data=t,t=u),this._insert(t,this.data.height-t.height-1,!0)):this.data=t,this},insert:function(n){return n&&this._insert(n,this.data.height-1),this},clear:function(){return this.data=u([]),this},remove:function(n,t){if(!n)return this;for(var u,f,o,e,i=this.data,h=this.toBBox(n),r=[],s=[];i||r.length;){if(i||(i=r.pop(),f=r[r.length-1],u=s.pop(),e=!0),i.leaf&&-1!==(o=w(n,i.children,t)))return i.children.splice(o,1),r.push(i),this._condense(r),this;e||i.leaf||!l(i,h)?f?(u++,i=f.children[u],e=!1):i=null:(r.push(i),s.push(u),u=0,f=i,i=i.children[0])}return this},toBBox:function(n){return n},compareMinX:a,compareMinY:v,toJSON:function(){return this.data},fromJSON:function(n){return this.data=n,this},_all:function(n,t){for(var i=[];n;)n.leaf?t.push.apply(t,n.children):i.push.apply(i,n.children),n=i.pop();return t},_build:function(n,t,i,f){var e,l=i-t+1,o=this._maxEntries,s,h,v,p,c,a;if(l<=o)return r(e=u(n.slice(t,i+1)),this.toBBox),e;for(f||(f=Math.ceil(Math.log(l)/Math.log(o)),o=Math.ceil(l/Math.pow(o,f-1))),(e=u([])).leaf=!1,e.height=f,c=Math.ceil(l/o),a=c*Math.ceil(Math.sqrt(o)),y(n,t,i,a,this.compareMinX),s=t;s<=i;s+=a)for(y(n,s,v=Math.min(s+a-1,i),c,this.compareMinY),h=s;h<=v;h+=c)p=Math.min(h+c-1,v),e.children.push(this._build(n,h,p,f-1));return r(e,this.toBBox),e},_chooseSubtree:function(n,t,i,r){for(var e,a,o,h,u,l,f,s;r.push(t),!t.leaf&&r.length-1!==i;){for(f=s=1/0,e=0,a=t.children.length;e<a;e++)u=c(o=t.children[e]),(l=b(n,o)-u)<s?(s=l,f=u<f?u:f,h=o):l===s&&u<f&&(f=u,h=o);t=h||t.children[0]}return t},_insert:function(n,t,i){var e=this.toBBox,u=i?n:e(n),r=[],f=this._chooseSubtree(u,this.data,t,r);for(f.children.push(n),o(f,u);t>=0&&r[t].children.length>this._maxEntries;)this._split(r,t),t--;this._adjustParentBBoxes(u,r,t)},_split:function(n,t){var i=n[t],o=i.children.length,s=this._minEntries,e,f;this._chooseSplitAxis(i,s,o);e=this._chooseSplitIndex(i,s,o);f=u(i.children.splice(e,i.children.length-e));f.height=i.height;f.leaf=i.leaf;r(i,this.toBBox);r(f,this.toBBox);t?n[t-1].children.push(f):this._splitRoot(i,f)},_splitRoot:function(n,t){this.data=u([n,t]);this.data.height=n.height+1;this.data.leaf=!1;r(this.data,this.toBBox)},_chooseSplitIndex:function(n,t,i){for(var l,a,o,f,u,h,s=u=1/0,r=t;r<=i-t;r++)o=k(l=e(n,0,r,this.toBBox),a=e(n,r,i,this.toBBox)),f=c(l)+c(a),o<s?(s=o,h=r,u=f<u?f:u):o===s&&f<u&&(u=f,h=r);return h},_chooseSplitAxis:function(n,t,i){var r=n.leaf?this.compareMinX:a,u=n.leaf?this.compareMinY:v;this._allDistMargin(n,t,i,r)<this._allDistMargin(n,t,i,u)&&n.children.sort(r)},_allDistMargin:function(n,t,i,r){n.children.sort(r);for(var f,h=this.toBBox,c=e(n,0,t,h),l=e(n,i-t,i,h),a=s(c)+s(l),u=t;u<i-t;u++)f=n.children[u],o(c,n.leaf?h(f):f),a+=s(c);for(u=i-t-1;u>=t;u--)f=n.children[u],o(l,n.leaf?h(f):f),a+=s(l);return a},_adjustParentBBoxes:function(n,t,i){for(var r=i;r>=0;r--)o(t[r],n)},_condense:function(n){for(var i,t=n.length-1;t>=0;t--)0===n[t].children.length?t>0?(i=n[t-1].children).splice(i.indexOf(n[t]),1):this.clear():r(n[t],this.toBBox)},_initFormat:function(n){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(n[0]));this.compareMinY=new Function("a","b",t.join(n[1]));this.toBBox=new Function("a","return {minX: a"+n[0]+", minY: a"+n[1]+", maxX: a"+n[2]+", maxY: a"+n[3]+"};")}}},function(n,t,i){"use strict";function r(n){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(n)?n:new Uint8Array(n||0);this.pos=0;this.type=0;this.length=this.buf.length}function u(n){return n.type===r.Bytes?n.readVarint()+n.pos:n.pos+1}function f(n,t,i){return i?4294967296*t+(n>>>0):4294967296*(t>>>0)+(n>>>0)}function h(n,t,i){var u=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2)),r;for(i.realloc(u),r=i.pos-1;r>=n;r--)i.buf[r+u]=i.buf[r]}function l(n,t){for(var i=0;i<n.length;i++)t.writeVarint(n[i])}function a(n,t){for(var i=0;i<n.length;i++)t.writeSVarint(n[i])}function v(n,t){for(var i=0;i<n.length;i++)t.writeFloat(n[i])}function y(n,t){for(var i=0;i<n.length;i++)t.writeDouble(n[i])}function p(n,t){for(var i=0;i<n.length;i++)t.writeBoolean(n[i])}function w(n,t){for(var i=0;i<n.length;i++)t.writeFixed32(n[i])}function b(n,t){for(var i=0;i<n.length;i++)t.writeSFixed32(n[i])}function k(n,t){for(var i=0;i<n.length;i++)t.writeFixed64(n[i])}function d(n,t){for(var i=0;i<n.length;i++)t.writeSFixed64(n[i])}function s(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16)+16777216*n[t+3]}function e(n,t,i){n[i]=t;n[i+1]=t>>>8;n[i+2]=t>>>16;n[i+3]=t>>>24}function c(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16)+(n[t+3]<<24)}n.exports=r;var o=i(6);r.Varint=0;r.Fixed64=1;r.Bytes=2;r.Fixed32=5;r.prototype={destroy:function(){this.buf=null},readFields:function(n,t,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),u=r>>3,f=this.pos;this.type=7&r;n(u,t,this);this.pos===f&&this.skip(r)}return t},readMessage:function(n,t){return this.readFields(n,t,this.readVarint()+this.pos)},readFixed32:function(){var n=s(this.buf,this.pos);return this.pos+=4,n},readSFixed32:function(){var n=c(this.buf,this.pos);return this.pos+=4,n},readFixed64:function(){var n=s(this.buf,this.pos)+4294967296*s(this.buf,this.pos+4);return this.pos+=8,n},readSFixed64:function(){var n=s(this.buf,this.pos)+4294967296*c(this.buf,this.pos+4);return this.pos+=8,n},readFloat:function(){var n=o.read(this.buf,this.pos,!0,23,4);return this.pos+=4,n},readDouble:function(){var n=o.read(this.buf,this.pos,!0,52,8);return this.pos+=8,n},readVarint:function(n){var t,i,r=this.buf;return t=127&(i=r[this.pos++]),i<128?t:(t|=(127&(i=r[this.pos++]))<<7,i<128?t:(t|=(127&(i=r[this.pos++]))<<14,i<128?t:(t|=(127&(i=r[this.pos++]))<<21,i<128?t:function(n,t,i){var u,r,e=i.buf;if((r=e[i.pos++],u=(112&r)>>4,r<128)||(r=e[i.pos++],u|=(127&r)<<3,r<128)||(r=e[i.pos++],u|=(127&r)<<10,r<128)||(r=e[i.pos++],u|=(127&r)<<17,r<128)||(r=e[i.pos++],u|=(127&r)<<24,r<128)||(r=e[i.pos++],u|=(1&r)<<31,r<128))return f(n,u,t);throw new Error("Expected varint not more than 10 bytes");}(t|=(15&(i=r[this.pos]))<<28,n,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var n=this.readVarint();return n%2==1?(n+1)/-2:n/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var n=this.readVarint()+this.pos,t=function(n,t,i){for(var h="",u=t;u<i;){var f,s,c,e=n[u],r=null,o=e>239?4:e>223?3:e>191?2:1;if(u+o>i)break;1===o?e<128&&(r=e):2===o?128==(192&(f=n[u+1]))&&(r=(31&e)<<6|63&f)<=127&&(r=null):3===o?(f=n[u+1],s=n[u+2],128==(192&f)&&128==(192&s)&&((r=(15&e)<<12|(63&f)<<6|63&s)<=2047||r>=55296&&r<=57343)&&(r=null)):4===o&&(f=n[u+1],s=n[u+2],c=n[u+3],128==(192&f)&&128==(192&s)&&128==(192&c)&&((r=(15&e)<<18|(63&f)<<12|(63&s)<<6|63&c)<=65535||r>=1114112)&&(r=null));null===r?(r=65533,o=1):r>65535&&(r-=65536,h+=String.fromCharCode(r>>>10&1023|55296),r=56320|1023&r);h+=String.fromCharCode(r);u+=o}return h}(this.buf,this.pos,n);return this.pos=n,t},readBytes:function(){var n=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,n);return this.pos=n,t},readPackedVarint:function(n,t){var i=u(this);for(n=n||[];this.pos<i;)n.push(this.readVarint(t));return n},readPackedSVarint:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readSVarint());return n},readPackedBoolean:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readBoolean());return n},readPackedFloat:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readFloat());return n},readPackedDouble:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readDouble());return n},readPackedFixed32:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readFixed32());return n},readPackedSFixed32:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readSFixed32());return n},readPackedFixed64:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readFixed64());return n},readPackedSFixed64:function(n){var t=u(this);for(n=n||[];this.pos<t;)n.push(this.readSFixed64());return n},skip:function(n){var t=7&n;if(t===r.Varint)for(;this.buf[this.pos++]>127;);else if(t===r.Bytes)this.pos=this.readVarint()+this.pos;else if(t===r.Fixed32)this.pos+=4;else{if(t!==r.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(n,t){this.writeVarint(n<<3|t)},realloc:function(n){for(var i,t=this.length||16;t<this.pos+n;)t*=2;t!==this.length&&(i=new Uint8Array(t),i.set(this.buf),this.buf=i,this.length=t)},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(n){this.realloc(4);e(this.buf,n,this.pos);this.pos+=4},writeSFixed32:function(n){this.realloc(4);e(this.buf,n,this.pos);this.pos+=4},writeFixed64:function(n){this.realloc(8);e(this.buf,-1&n,this.pos);e(this.buf,Math.floor(n*(1/4294967296)),this.pos+4);this.pos+=8},writeSFixed64:function(n){this.realloc(8);e(this.buf,-1&n,this.pos);e(this.buf,Math.floor(n*(1/4294967296)),this.pos+4);this.pos+=8},writeVarint:function(n){(n=+n||0)>268435455||n<0?function(n,t){var i,r;if(n>=0?(i=n%4294967296|0,r=n/4294967296|0):(r=~(-n/4294967296),4294967295^(i=~(-n%4294967296))?i=i+1|0:(i=0,r=r+1|0)),n>=0x10000000000000000||n<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(n,t,i){i.buf[i.pos++]=127&n|128;n>>>=7;i.buf[i.pos++]=127&n|128;n>>>=7;i.buf[i.pos++]=127&n|128;n>>>=7;i.buf[i.pos++]=127&n|128;n>>>=7;i.buf[i.pos]=127&n}(i,0,t),function(n,t){var i=(7&n)<<4;(t.buf[t.pos++]|=i|((n>>>=3)?128:0),n)&&(t.buf[t.pos++]=127&n|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=127&n|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=127&n|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=127&n|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=127&n)}(r,t)}(n,this):(this.realloc(4),this.buf[this.pos++]=127&n|(n>127?128:0),n<=127||(this.buf[this.pos++]=127&(n>>>=7)|(n>127?128:0),n<=127||(this.buf[this.pos++]=127&(n>>>=7)|(n>127?128:0),n<=127||(this.buf[this.pos++]=n>>>7&127))))},writeSVarint:function(n){this.writeVarint(n<0?2*-n-1:2*n)},writeBoolean:function(n){this.writeVarint(Boolean(n))},writeString:function(n){var i,t;n=String(n);this.realloc(4*n.length);this.pos++;i=this.pos;this.pos=function(n,t,i){for(var r,u,f=0;f<t.length;f++){if((r=t.charCodeAt(f))>55295&&r<57344){if(!u){r>56319||f+1===t.length?(n[i++]=239,n[i++]=191,n[i++]=189):u=r;continue}if(r<56320){n[i++]=239;n[i++]=191;n[i++]=189;u=r;continue}r=u-55296<<10|r-56320|65536;u=null}else u&&(n[i++]=239,n[i++]=191,n[i++]=189,u=null);r<128?n[i++]=r:(r<2048?n[i++]=r>>6|192:(r<65536?n[i++]=r>>12|224:(n[i++]=r>>18|240,n[i++]=r>>12&63|128),n[i++]=r>>6&63|128),n[i++]=63&r|128)}return i}(this.buf,n,this.pos);t=this.pos-i;t>=128&&h(i,t,this);this.pos=i-1;this.writeVarint(t);this.pos+=t},writeFloat:function(n){this.realloc(4);o.write(this.buf,n,this.pos,!0,23,4);this.pos+=4},writeDouble:function(n){this.realloc(8);o.write(this.buf,n,this.pos,!0,52,8);this.pos+=8},writeBytes:function(n){var i=n.length,t;for(this.writeVarint(i),this.realloc(i),t=0;t<i;t++)this.buf[this.pos++]=n[t]},writeRawMessage:function(n,t){var r,i;this.pos++;r=this.pos;n(t,this);i=this.pos-r;i>=128&&h(r,i,this);this.pos=r-1;this.writeVarint(i);this.pos+=i},writeMessage:function(n,t,i){this.writeTag(n,r.Bytes);this.writeRawMessage(t,i)},writePackedVarint:function(n,t){this.writeMessage(n,l,t)},writePackedSVarint:function(n,t){this.writeMessage(n,a,t)},writePackedBoolean:function(n,t){this.writeMessage(n,p,t)},writePackedFloat:function(n,t){this.writeMessage(n,v,t)},writePackedDouble:function(n,t){this.writeMessage(n,y,t)},writePackedFixed32:function(n,t){this.writeMessage(n,w,t)},writePackedSFixed32:function(n,t){this.writeMessage(n,b,t)},writePackedFixed64:function(n,t){this.writeMessage(n,k,t)},writePackedSFixed64:function(n,t){this.writeMessage(n,d,t)},writeBytesField:function(n,t){this.writeTag(n,r.Bytes);this.writeBytes(t)},writeFixed32Field:function(n,t){this.writeTag(n,r.Fixed32);this.writeFixed32(t)},writeSFixed32Field:function(n,t){this.writeTag(n,r.Fixed32);this.writeSFixed32(t)},writeFixed64Field:function(n,t){this.writeTag(n,r.Fixed64);this.writeFixed64(t)},writeSFixed64Field:function(n,t){this.writeTag(n,r.Fixed64);this.writeSFixed64(t)},writeVarintField:function(n,t){this.writeTag(n,r.Varint);this.writeVarint(t)},writeSVarintField:function(n,t){this.writeTag(n,r.Varint);this.writeSVarint(t)},writeStringField:function(n,t){this.writeTag(n,r.Bytes);this.writeString(t)},writeFloatField:function(n,t){this.writeTag(n,r.Fixed32);this.writeFloat(t)},writeDoubleField:function(n,t){this.writeTag(n,r.Fixed64);this.writeDouble(t)},writeBooleanField:function(n,t){this.writeVarintField(n,Boolean(t))}}},function(n,t,i){var r=i(7);t.Processor=r},,,function(n){n.exports=function(){"use strict";function n(n,t,i){var r=n[t];n[t]=n[i];n[i]=r}function t(n,t){return n<t?-1:n>t?1:0}return function(i,r,u,f,e){!function t(i,r,u,f,e){for(;f>u;){if(f-u>600){var s=f-u+1,a=r-u+1,v=Math.log(s),c=.5*Math.exp(2*v/3),y=.5*Math.sqrt(v*c*(s-c)/s)*(a-s/2<0?-1:1),p=Math.max(u,Math.floor(r-a*c/s+y)),w=Math.min(f,Math.floor(r+(s-a)*c/s+y));t(i,r,p,w,e)}var l=i[r],h=u,o=f;for(n(i,u,r),e(i[f],l)>0&&n(i,u,f);h<o;){for(n(i,h,o),h++,o--;e(i[h],l)<0;)h++;for(;e(i[o],l)>0;)o--}0===e(i[u],l)?n(i,u,o):n(i,++o,f);o<=r&&(u=o+1);r<=o&&(f=o-1)}}(i,r,u||0,f||i.length-1,e||t)}}()},function(n,t){t.read=function(n,t,i,r,u){var f,o,l=8*u-r-1,a=(1<<l)-1,v=a>>1,e=-7,s=i?u-1:0,c=i?-1:1,h=n[t+s];for(s+=c,f=h&(1<<-e)-1,h>>=-e,e+=l;e>0;f=256*f+n[t+s],s+=c,e-=8);for(o=f&(1<<-e)-1,f>>=-e,e+=r;e>0;o=256*o+n[t+s],s+=c,e-=8);if(0===f)f=1-v;else{if(f===a)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r);f-=v}return(h?-1:1)*o*Math.pow(2,f-r)};t.write=function(n,t,i,r,u,f){var e,o,s,l=8*f-u-1,a=(1<<l)-1,h=a>>1,y=23===u?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:f-1,v=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,e=a):(e=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-e))<1&&(e--,s*=2),(t+=e+h>=1?y/s:y*Math.pow(2,1-h))*s>=2&&(e++,s/=2),e+h>=a?(o=0,e=a):e+h>=1?(o=(t*s-1)*Math.pow(2,u),e+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,u),e=0));u>=8;n[i+c]=255&o,c+=v,o/=256,u-=8);for(e=e<<u|o,l+=u;l>0;n[i+c]=255&e,c+=v,e/=256,l-=8);n[i+c-v]|=128*p}},function(n,t,i){function u(n){function i(n,i,r){return t?new ImageData(n,i,r):{data:n,width:i,height:r}}var t=!0;try{new ImageData(10,10)}catch(n){t=!1}return function(t){var e,r,l=t.buffers,y=t.meta,w=t.imageOps,b=t.width,k=t.height,s=l.length,p=l[0].byteLength,a,v,o,u,f,h,c;if(w){for(a=new Array(s),r=0;r<s;++r)a[r]=i(new Uint8ClampedArray(l[r]),b,k);e=n(a,y).data}else{for(e=new Uint8ClampedArray(p),v=new Array(s),o=new Array(s),r=0;r<s;++r)v[r]=new Uint8ClampedArray(l[r]),o[r]=[0,0,0,0];for(u=0;u<p;u+=4){for(f=0;f<s;++f)h=v[f],o[f][0]=h[u],o[f][1]=h[u+1],o[f][2]=h[u+2],o[f][3]=h[u+3];c=n(o,y);e[u]=c[0];e[u+1]=c[1];e[u+2]=c[2];e[u+3]=c[3]}}return e.buffer}}function e(n,t){var r=Object.keys(n.lib||{}).map(function(t){return"var "+t+" = "+n.lib[t].toString()+";"}).concat(["var __minion__ = ("+u.toString()+")(",n.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),f=new Blob(r,{type:"text/javascript"}),e=URL.createObjectURL(f),i=new Worker(e);return i.addEventListener("message",t),i}function r(n){var r,i,t;if(this._imageOps=!!n.imageOps,i=[],r=0===n.threads?0:this._imageOps?1:n.threads||1)for(t=0;t<r;++t)i[t]=e(n,this._onWorkerMessage.bind(this,t));else i[0]=function(n,t){var i=u(n.operation);return{postMessage:function(n){setTimeout(function(){t({data:{buffer:i(n),meta:n.meta}})},0)}}}(n,this._onWorkerMessage.bind(this,0));this._workers=i;this._queue=[];this._maxQueueLength=n.queue||1/0;this._running=0;this._dataLookup={};this._job=null}var f=i(8).newImageData;r.prototype.process=function(n,t,i){this._enqueue({inputs:n,meta:t,callback:i});this._dispatch()};r.prototype.destroy=function(){for(var n in this)this[n]=null;this._destroyed=!0};r.prototype._enqueue=function(n){for(this._queue.push(n);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)};r.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){var n=this._job=this._queue.shift(),f=n.inputs[0].width,e=n.inputs[0].height,i=n.inputs.map(function(n){return n.data.buffer}),r=this._workers.length;if(this._running=r,1===r)this._workers[0].postMessage({buffers:i,meta:n.meta,imageOps:this._imageOps,width:f,height:e},i);else for(var c=n.inputs[0].data.length,o=4*Math.ceil(c/4/r),t=0;t<r;++t){for(var s=t*o,u=[],h=0,l=i.length;h<l;++h)u.push(i[t].slice(s,s+o));this._workers[t].postMessage({buffers:u,meta:n.meta,imageOps:this._imageOps,width:f,height:e},u)}}};r.prototype._onWorkerMessage=function(n,t){this._destroyed||(this._dataLookup[n]=t.data,--this._running,0===this._running&&this._resolveJob())};r.prototype._resolveJob=function(){var t,i,r=this._job,e=this._workers.length,u,o,n,s,h;if(1===e)t=new Uint8ClampedArray(this._dataLookup[0].buffer),i=this._dataLookup[0].meta;else for(u=r.inputs[0].data.length,t=new Uint8ClampedArray(u),i=new Array(u),o=4*Math.ceil(u/4/e),n=0;n<e;++n)s=this._dataLookup[n].buffer,h=n*o,t.set(new Uint8ClampedArray(s),h),i[n]=this._dataLookup[n].meta;this._job=null;this._dataLookup={};r.callback(null,f(t,r.inputs[0].width,r.inputs[0].height),i);this._dispatch()};n.exports=r},function(n,t){var i=!0,r;try{new ImageData(10,10)}catch(n){i=!1}r=document.createElement("canvas").getContext("2d");t.newImageData=function(n,t,u){if(i)return new ImageData(n,t,u);var f=r.createImageData(t,u);return f.data.set(n),f}},function(n,t,i){"use strict";function p(){return function(){throw new Error("Unimplemented abstract method.");}()}function y(n){return n.ol_uid||(n.ol_uid=String(++brt))}function pf(n){for(var t in n)delete n[t]}function wk(n){var t=[],i;for(i in n)t.push(n[i]);return t}function wu(n){var t;for(t in n)return!1;return!t}function drt(n,t,i,r){for(var u,f=0,e=n.length;f<e;++f)if((u=n[f]).listener===t&&u.bindTo===i)return r&&(u.deleteIndex=f),u}function bk(n,t){var i=by(n);if(i)return i[t]}function by(n,t){var i=n.ol_lm;return!i&&t&&(i=n.ol_lm={}),i}function grt(n,t){var i=bk(n,t),r,f,u;if(i){for(r=0,f=i.length;r<f;++r)n.removeEventListener(t,i[r].boundListener),pf(i[r]);i.length=0;u=by(n);u&&(delete u[t],0===Object.keys(u).length&&function(n){delete n.ol_lm}(n))}}function o(n,t,i,r,u){var o=by(n,!0),e=o[t],f;return e||(e=o[t]=[]),f=drt(e,i,r,!1),f?u||(f.callOnce=!1):(f={bindTo:r,callOnce:!!u,listener:i,target:n,type:t},n.addEventListener(t,function(n){var t=function(t){var i=n.listener,r=n.bindTo||n.target;return n.callOnce&&lt(n),i.call(r,t)};return n.boundListener=t,t}(f)),e.push(f)),f}function ee(n,t,i,r){return o(n,t,i,r,!0)}function ou(n,t,i,r){var f=bk(n,t),u;f&&(u=drt(f,i,r,!0),u&&lt(u))}function lt(n){var t,i;n&&n.target&&(n.target.removeEventListener(n.type,n.boundListener),t=bk(n.target,n.type),t&&(i="deleteIndex"in n?n.deleteIndex:t.indexOf(n),-1!==i&&t.splice(i,1),0===t.length&&grt(n.target,n.type)),pf(n))}function nut(n){var t=by(n),i;if(t)for(i in t)grt(n,i)}function bu(){return!0}function nh(){return!1}function wf(){}function tut(n){n.stopPropagation()}function ni(n){return dk.hasOwnProperty(n)?dk[n]:dk[n]="change:"+n}function g(n,t){if(!n)throw new krt(t);}function lo(n,t){return n>t?1:n<t?-1:0}function tr(n,t){return n.indexOf(t)>=0}function np(n,t,i){var r,u=n.length;if(n[0]<=t)return 0;if(t<=n[u-1])return u-1;if(i>0){for(r=1;r<u;++r)if(n[r]<t)return r-1}else if(i<0){for(r=1;r<u;++r)if(n[r]<=t)return r}else for(r=1;r<u;++r){if(n[r]==t)return r;if(n[r]<t)return n[r-1]-t<t-n[r]?r-1:r}return u-1}function fbt(n,t,i){for(;t<i;){var r=n[t];n[t]=n[i];n[i]=r;++t;--i}}function pt(n,t){for(var r=Array.isArray(t)?t:[t],u=r.length,i=0;i<u;i++)n[n.length]=r[i]}function ha(n,t){for(var r,u=n.length>>>0,i=0;i<u;i++)if(t(r=n[i],i,n))return r;return null}function uf(n,t){var r=n.length,i;if(r!==t.length)return!1;for(i=0;i<r;i++)if(n[i]!==t[i])return!1;return!0}function gk(n,t){for(var u=n.length,r=Array(n.length),i=0;i<u;i++)r[i]={index:i,value:n[i]};for(r.sort(function(n,i){return t(n.value,i.value)||n.index-i.index}),i=0;i<n.length;i++)n[i]=r[i].value}function uut(n,t){var i;return n.every(function(r,u){return i=u,!t(r,u,n)})?-1:i}function hi(n){for(var i=eut(),t=0,r=n.length;t<r;++t)se(i,n[t]);return i}function ff(n,t,i){return i?(i[0]=n[0]-t,i[1]=n[1]-t,i[2]=n[2]+t,i[3]=n[3]+t,i):[n[0]-t,n[1]-t,n[2]+t,n[3]+t]}function fut(n,t){return t?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t):n.slice()}function ih(n,t,i){var r,u;return(r=t<n[0]?n[0]-t:n[2]<t?t-n[2]:0)*r+(u=i<n[1]?n[1]-i:n[3]<i?i-n[3]:0)*u}function tp(n,t){return ip(n,t[0],t[1])}function lr(n,t){return n[0]<=t[0]&&t[2]<=n[2]&&n[1]<=t[1]&&t[3]<=n[3]}function ip(n,t,i){return n[0]<=t&&t<=n[2]&&n[1]<=i&&i<=n[3]}function nd(n,t){var f=n[0],e=n[1],o=n[2],s=n[3],r=t[0],u=t[1],i=ir.UNKNOWN;return r<f?i|=ir.LEFT:r>o&&(i|=ir.RIGHT),u<e?i|=ir.BELOW:u>s&&(i|=ir.ABOVE),i===ir.UNKNOWN&&(i=ir.INTERSECTING),i}function eut(){return[1/0,1/0,-1/0,-1/0]}function ef(n,t,i,r,u){return u?(u[0]=n,u[1]=t,u[2]=i,u[3]=r,u):[n,t,i,r]}function rh(n){return ef(1/0,1/0,-1/0,-1/0,n)}function uh(n,t){var i=n[0],r=n[1];return ef(i,r,i,r,t)}function td(n,t,i,r,u){return out(rh(u),n,t,i,r)}function oe(n,t){return n[0]==t[0]&&n[2]==t[2]&&n[1]==t[1]&&n[3]==t[3]}function rp(n,t){return t[0]<n[0]&&(n[0]=t[0]),t[2]>n[2]&&(n[2]=t[2]),t[1]<n[1]&&(n[1]=t[1]),t[3]>n[3]&&(n[3]=t[3]),n}function se(n,t){t[0]<n[0]&&(n[0]=t[0]);t[0]>n[2]&&(n[2]=t[0]);t[1]<n[1]&&(n[1]=t[1]);t[1]>n[3]&&(n[3]=t[1])}function ebt(n,t){for(var i=0,r=t.length;i<r;++i)se(n,t[i]);return n}function out(n,t,i,r,u){for(;i<r;i+=u)obt(n,t[i],t[i+1]);return n}function obt(n,t,i){n[0]=Math.min(n[0],t);n[1]=Math.min(n[1],i);n[2]=Math.max(n[2],t);n[3]=Math.max(n[3],i)}function sut(n,t,i){var r;return(r=t.call(i,de(n)))?r:(r=t.call(i,fh(n)))?r:(r=t.call(i,ao(n)))?r:(r=t.call(i,bf(n)))||!1}function up(n){var t=0;return eh(n)||(t=wt(n)*ti(n)),t}function de(n){return[n[0],n[1]]}function fh(n){return[n[2],n[1]]}function su(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function ca(n,t,i,r,u){var l=t*r[0]/2,a=t*r[1]/2,v=Math.cos(i),y=Math.sin(i),f=l*v,e=l*y,o=a*v,s=a*y,h=n[0],c=n[1],p=h-f+s,w=h-f-s,b=h+f-s,k=h+f+s,d=c-e-o,g=c-e+o,nt=c+e+o,tt=c+e-o;return ef(Math.min(p,w,b,k),Math.min(d,g,nt,tt),Math.max(p,w,b,k),Math.max(d,g,nt,tt),u)}function ti(n){return n[3]-n[1]}function of(n,t,i){var r=i||[1/0,1/0,-1/0,-1/0];return dt(n,t)?(r[0]=n[0]>t[0]?n[0]:t[0],r[1]=n[1]>t[1]?n[1]:t[1],r[2]=n[2]<t[2]?n[2]:t[2],r[3]=n[3]<t[3]?n[3]:t[3]):rh(r),r}function bf(n){return[n[0],n[3]]}function ao(n){return[n[2],n[3]]}function wt(n){return n[2]-n[0]}function dt(n,t){return n[0]<=t[2]&&n[2]>=t[0]&&n[1]<=t[3]&&n[3]>=t[1]}function eh(n){return n[2]<n[0]||n[3]<n[1]}function fp(n,t){var i=(n[2]-n[0])/2*(t-1),r=(n[3]-n[1])/2*(t-1);n[0]-=i;n[2]+=i;n[1]-=r;n[3]+=r}function la(n,t,i){var r=[n[0],n[1],n[0],n[3],n[2],n[1],n[2],n[3]];return t(r,r,2),function(n,t,i){return ef(Math.min.apply(null,n),Math.min.apply(null,t),Math.max.apply(null,n),Math.max.apply(null,t),i)}([r[0],r[2],r[4],r[6]],[r[1],r[3],r[5],r[7]],i)}function vo(n,t,i,r,u,f){for(var h,c,e=f||[],o=0,s=t;s<i;s+=r)h=n[s],c=n[s+1],e[o++]=u[0]*h+u[2]*c+u[4],e[o++]=u[1]*h+u[3]*c+u[5];return f&&e.length!=o&&(e.length=o),e}function yo(n,t,i,r,u,f,e){for(var c,o=e||[],h=0,s=t;s<i;s+=r)for(o[h++]=n[s]+u,o[h++]=n[s+1]+f,c=s+2;c<s+r;++c)o[h++]=n[c];return e&&o.length!=h&&(o.length=h),o}function vi(n,t,i){return Math.min(Math.max(n,t),i)}function cut(n,t,i,r,u,f){var e=u-i,o=f-r,s;return(0!==e||0!==o)&&(s=((n-i)*e+(t-r)*o)/(e*e+o*o),s>1?(i=u,r=f):s>0&&(i+=e*s,r+=o*s)),oh(n,t,i,r)}function oh(n,t,i,r){var u=i-n,f=r-t;return u*u+f*f}function lut(n){return 180*n/Math.PI}function kf(n){return n*Math.PI/180}function df(n,t){var i=n%t;return i*t<0?i+t:i}function yc(n,t,i){return n+i*(t-n)}function ep(n,t,i){var s=i||aa,r=kf(n[1]),u=kf(t[1]),f=(u-r)/2,e=kf(t[0]-n[0])/2,o=Math.sin(f)*Math.sin(f)+Math.sin(e)*Math.sin(e)*Math.cos(r)*Math.cos(u);return 2*s*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}function id(n,t){for(var r=0,i=0,u=n.length;i<u-1;++i)r+=ep(n[i],n[i+1],t);return r}function op(n,t){for(var u,f,e=0,r=n.length,o=n[r-1][0],s=n[r-1][1],i=0;i<r;i++)u=n[i][0],f=n[i][1],e+=kf(u-o)*(2+Math.sin(kf(s))+Math.sin(kf(f))),o=u,s=f;return e*t*t/2}function sbt(n,t,i,r){var o=r||aa,u=kf(n[1]),s=kf(n[0]),f=t/o,e=Math.asin(Math.sin(u)*Math.cos(f)+Math.cos(u)*Math.sin(f)*Math.cos(i));return[lut(s+Math.atan2(Math.sin(i)*Math.sin(f)*Math.cos(u),Math.cos(f)-Math.sin(u)*Math.sin(e))),lut(e)]}function lbt(n,t,i){var o=n.length,s=i>1?i:2,e=t,u,r,f;for(void 0===e&&(e=s>2?n.slice():new Array(o)),u=wc,r=0;r<o;r+=s)e[r]=u*n[r]/180,f=sp*Math.log(Math.tan(Math.PI*(n[r+1]+90)/360)),f>u?f=u:f<-u&&(f=-u),e[r+1]=f;return e}function abt(n,t,i){var f=n.length,e=i>1?i:2,u=t,r;for(void 0===u&&(u=e>2?n.slice():new Array(f)),r=0;r<f;r+=e)u[r]=180*n[r]/wc,u[r+1]=360*Math.atan(Math.exp(n[r+1]/sp))/Math.PI-90;return u}function kc(n,t,i){var r=n.getCode(),u=t.getCode();r in bc||(bc[r]={});bc[r][u]=i}function wut(n,t){var i;return n in bc&&t in bc[n]&&(i=bc[n][t]),i}function rd(n,t){var r,i,u;if(void 0!==t){for(i=0,u=n.length;i<u;++i)t[i]=n[i];r=t}else r=n.slice();return r}function ud(n,t){if(void 0!==t&&n!==t){for(var i=0,r=n.length;i<r;++i)t[i]=n[i];n=t}return n}function fd(n){!function(n,t){put[n]=t}(n.getCode(),n);kc(n,n,rd)}function w(n){return"string"==typeof n?function(n){return put[n]||null}(n):n||null}function hp(n,t,i,r){var f,o=(n=w(n)).getPointResolutionFunc(),s,u,e;return o?f=o(t,i):(n.getUnits()!=pr.DEGREES||r)&&r!=pr.DEGREES?(s=wo(n,w("EPSG:4326")),u=[i[0]-t/2,i[1],i[0]+t/2,i[1],i[0],i[1]-t/2,i[0],i[1]+t/2],f=(ep((u=s(u,u,2)).slice(0,2),u.slice(2,4))+ep(u.slice(4,6),u.slice(6,8)))/2,e=r?gf[r]:n.getMetersPerUnit(),void 0!==e&&(f/=e)):f=t,f}function cp(n){!function(n){n.forEach(fd)}(n);n.forEach(function(t){n.forEach(function(n){t!==n&&kc(t,n,rd)})})}function but(n,t){return n?"string"==typeof n?w(n):n:w(t)}function kut(n){return function(t,i,r){for(var o,f,s=t.length,h=void 0!==r?r:2,e=void 0!==i?i:new Array(s),u=0;u<s;u+=h)for(o=n([t[u],t[u+1]]),e[u]=o[0],e[u+1]=o[1],f=h-1;f>=2;--f)e[u+f]=t[u+f];return e}}function dut(n,t,i,r){var u=w(n),f=w(t);kc(u,f,kut(i));kc(f,u,kut(r))}function hu(n,t){if(n===t)return!0;var i=n.getUnits()===t.getUnits();return n.getCode()===t.getCode()?i:wo(n,t)===rd&&i}function wo(n,t){var i=wut(n.getCode(),t.getCode());return i||(i=ud),i}function he(n,t){return wo(w(n),w(t))}function dc(n,t,i){return he(t,i)(n,void 0,n.length)}function bo(n,t,i){return la(n,he(t,i))}function hh(n){return ap(n,1,0,0,1,0,0)}function ya(n,t){var i=n[0],r=n[1],u=n[2],f=n[3],a=n[4],v=n[5],e=t[0],o=t[1],s=t[2],h=t[3],c=t[4],l=t[5];return n[0]=i*e+u*o,n[1]=r*e+f*o,n[2]=i*s+u*h,n[3]=r*s+f*h,n[4]=i*c+u*l+a,n[5]=r*c+f*l+v,n}function ap(n,t,i,r,u,f,e){return n[0]=t,n[1]=i,n[2]=r,n[3]=u,n[4]=f,n[5]=e,n}function gut(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function wr(n,t){var i=t[0],r=t[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function vp(n,t){var i=Math.cos(t),r=Math.sin(t);return ya(n,ap(lp,i,r,-r,i,0,0))}function sf(n,t,i){return ya(n,ap(lp,t,0,0,i,0,0))}function ne(n,t,i){return ya(n,ap(lp,1,0,0,1,t,i))}function cu(n,t,i,r,u,f,e,o){var s=Math.sin(f),h=Math.cos(f);return n[0]=r*h,n[1]=u*s,n[2]=-r*s,n[3]=u*h,n[4]=e*r*h-o*r*s+t,n[5]=e*u*s+o*u*h+i,n}function nft(n){var t=function(n){return n[0]*n[3]-n[1]*n[2]}(n);g(0!==t,32);var i=n[0],r=n[1],u=n[2],f=n[3],e=n[4],o=n[5];return n[0]=f/t,n[1]=-r/t,n[2]=-u/t,n[3]=i/t,n[4]=(u*o-f*e)/t,n[5]=-(i*o-r*e)/t,n}function od(n){var t;return n==v.XY?t=2:n==v.XYZ||n==v.XYM?t=3:n==v.XYZM&&(t=4),t}function sd(n,t,i,r){for(var u,f,e=0,o=n[i-r],s=n[i-r+1];t<i;t+=r)u=n[t],f=n[t+1],e+=s*u-o*f,o=u,s=f;return e/2}function tft(n,t,i,r){for(var f,e=0,u=0,o=i.length;u<o;++u)f=i[u],e+=sd(n,t,f,r),t=f;return e}function ift(n,t,i,r,u,f,e){var h,v=n[t],y=n[t+1],c=n[i]-v,l=n[i+1]-y,a,o,s;if(0===c&&0===l)h=t;else if(a=((u-v)*c+(f-y)*l)/(c*c+l*l),a>1)h=i;else{if(a>0){for(o=0;o<r;++o)e[o]=yc(n[t+o],n[i+o],a);return void(e.length=r)}h=t}for(s=0;s<r;++s)e[s]=n[h+s];e.length=r}function hd(n,t,i,r,u){var f=n[t],e=n[t+1];for(t+=r;t<i;t+=r){var o=n[t],s=n[t+1],h=oh(f,e,o,s);h>u&&(u=h);f=o;e=s}return u}function cd(n,t,i,r,u){for(var e,f=0,o=i.length;f<o;++f)e=i[f],u=hd(n,t,e,r,u),t=e;return u}function ld(n,t,i,r,u,f,e,o,s,h,c){var l,v,a,y;if(t==i)return h;if(0===u){if((v=oh(e,o,n[t],n[t+1]))<h){for(l=0;l<r;++l)s[l]=n[t+l];return s.length=r,v}return h}for(a=c||[NaN,NaN],y=t+r;y<i;)if(ift(n,y-r,y,r,e,o,a),(v=oh(e,o,a[0],a[1]))<h){for(h=v,l=0;l<r;++l)s[l]=a[l];s.length=r;y+=r}else y+=r*Math.max((Math.sqrt(v)-Math.sqrt(h))/u|0,1);if(f&&(ift(n,i-r,t,r,e,o,a),(v=oh(e,o,a[0],a[1]))<h)){for(h=v,l=0;l<r;++l)s[l]=a[l];s.length=r}return h}function ad(n,t,i,r,u,f,e,o,s,h,c){for(var a,v=c||[NaN,NaN],l=0,y=i.length;l<y;++l)a=i[l],h=ld(n,t,a,r,u,f,e,o,s,h,v),t=a;return h}function rft(n,t,i){for(var r=0,u=i.length;r<u;++r)n[t++]=i[r];return t}function pa(n,t,i,r){for(var o,f,u=0,e=i.length;u<e;++u)for(o=i[u],f=0;f<r;++f)n[t++]=o[f];return t}function vd(n,t,i,r,u){for(var o,f=u||[],s=0,e=0,h=i.length;e<h;++e)o=pa(n,t,i[e],r),f[s++]=o,t=o;return f.length=s,f}function gc(n,t,i,r,u){for(var e=void 0!==u?u:[],o=0,f=t;f<i;f+=r)e[o++]=n.slice(f,f+r);return e.length=o,e}function pp(n,t,i,r,u){for(var s,f=void 0!==u?u:[],e=0,o=0,h=i.length;o<h;++o)s=i[o],f[e++]=gc(n,t,s,r,f[e]),t=s;return f.length=e,f}function uft(n,t,i,r,u){for(var e,f=void 0!==u?u:[],o=0,s=0,h=i.length;s<h;++s)e=i[s],f[o++]=pp(n,t,e,r,f[o]),t=e[e.length-1];return f.length=o,f}function yd(n,t,i,r,u,f,e){var y=(i-t)/r,c,s,o,w,h;if(y<3){for(;t<i;t+=r)f[e++]=n[t],f[e++]=n[t+1];return e}for(c=new Array(y),c[0]=1,c[y-1]=1,s=[t,i-r],o=0;s.length>0;){for(var l=s.pop(),a=s.pop(),p=0,b=n[a],k=n[a+1],d=n[l],g=n[l+1],v=a+r;v<l;v+=r)w=cut(n[v],n[v+1],b,k,d,g),w>p&&(o=v,p=w);p>u&&(c[(o-t)/r]=1,a+r<o&&s.push(a,o),o+r<l&&s.push(o,l))}for(h=0;h<y;++h)c[h]&&(f[e++]=n[t+h*r],f[e++]=n[t+h*r+1]);return e}function ybt(n,t,i,r,u,f,e,o){for(var h,s=0,c=i.length;s<c;++s)h=i[s],e=yd(n,t,h,r,u,f,e),o.push(e),t=h;return e}function ch(n,t){return t*Math.round(n/t)}function pbt(n,t,i,r,u,f,e){var o,s,h,c,v,y;if(t==i)return e;h=ch(n[t],u);c=ch(n[t+1],u);t+=r;f[e++]=h;f[e++]=c;do if(o=ch(n[t],u),s=ch(n[t+1],u),(t+=r)==i)return f[e++]=o,f[e++]=s,e;while(o==h&&s==c);for(;t<i;)if(v=ch(n[t],u),y=ch(n[t+1],u),t+=r,v!=o||y!=s){var l=o-h,a=s-c,p=v-h,w=y-c;l*w==a*p&&(l<0&&p<l||l==p||l>0&&p>l)&&(a<0&&w<a||a==w||a>0&&w>a)?(o=v,s=y):(f[e++]=o,f[e++]=s,h=o,c=s,o=v,s=y)}return f[e++]=o,f[e++]=s,e}function fft(n,t,i,r,u,f,e,o){for(var h,s=0,c=i.length;s<c;++s)h=i[s],e=pbt(n,t,h,r,u,f,e),o.push(e),t=h;return e}function wbt(n,t,i,r,u){return!sut(u,function(u){return!ko(n,t,i,r,u[0],u[1])})}function ko(n,t,i,r,u,f){for(var h,o,c=0,s=n[i-r],e=n[i-r+1];t<i;t+=r)h=n[t],o=n[t+1],e<=f?o>f&&(h-s)*(f-e)-(u-s)*(o-e)>0&&c++:o<=f&&(h-s)*(f-e)-(u-s)*(o-e)<0&&c--,s=h,e=o;return 0!==c}function pd(n,t,i,r,u,f){if(0===i.length||!ko(n,t,i[0],r,u,f))return!1;for(var e=1,o=i.length;e<o;++e)if(ko(n,i[e-1],i[e],r,u,f))return!1;return!0}function wd(n,t,i,r,u,f,e){for(var b,a,p,d,o,g,w,s,c,l,v,h=u[f+1],y=[],k=0,nt=i.length;k<nt;++k)for(b=i[k],s=n[b-r],l=n[b-r+1],o=t;o<b;o+=r)c=n[o],v=n[o+1],(h<=l&&v<=h||l<=h&&h<=v)&&(w=(h-l)/(v-l)*(c-s)+s,y.push(w)),s=c,l=v;for(a=NaN,p=-1/0,y.sort(lo),s=y[0],o=1,g=y.length;o<g;++o)c=y[o],d=Math.abs(c-s),d>p&&pd(n,t,i,r,w=(s+c)/2,h)&&(a=w,p=d),s=c;return isNaN(a)&&(a=u[f]),e?(e.push(a,h,p),e):[a,h,p]}function eft(n,t,i,r,u){for(var e,o=[],f=0,s=i.length;f<s;++f)e=i[f],o=wd(n,t,e,r,u,2*f,o),t=e[e.length-1];return o}function oft(n,t,i,r,u,f){for(var s,o=[n[t],n[t+1]],e=[];t+r<i;t+=r){if(e[0]=n[t+r],e[1]=n[t+r+1],s=u.call(f,o,e))return s;o[0]=e[0];o[1]=e[1]}return!1}function wp(n,t,i,r,u){var f=out([1/0,1/0,-1/0,-1/0],n,t,i,r);return!!dt(u,f)&&(!!lr(u,f)||f[0]>=u[0]&&f[2]<=u[2]||f[1]>=u[1]&&f[3]<=u[3]||oft(n,t,i,r,function(n,t){return function(n,t,i){var r=!1,u=nd(n,t),f=nd(n,i);if(u===ir.INTERSECTING||f===ir.INTERSECTING)r=!0;else{var s,h,l=n[0],a=n[1],v=n[2],y=n[3],p=t[0],w=t[1],e=i[0],o=i[1],c=(o-w)/(e-p);f&ir.ABOVE&&!(u&ir.ABOVE)&&(r=(s=e-(o-y)/c)>=l&&s<=v);r||!(f&ir.RIGHT)||u&ir.RIGHT||(r=(h=o-(e-v)*c)>=a&&h<=y);r||!(f&ir.BELOW)||u&ir.BELOW||(r=(s=e-(o-a)/c)>=l&&s<=v);r||!(f&ir.LEFT)||u&ir.LEFT||(r=(h=o-(e-l)*c)>=a&&h<=y)}return r}(u,n,t)}))}function sft(n,t,i,r,u){if(!function(n,t,i,r,u){return!!(wp(n,t,i,r,u)||ko(n,t,i,r,u[0],u[1])||ko(n,t,i,r,u[0],u[3])||ko(n,t,i,r,u[2],u[1])||ko(n,t,i,r,u[2],u[3]))}(n,t,i[0],r,u))return!1;if(1===i.length)return!0;for(var f=1,e=i.length;f<e;++f)if(wbt(n,i[f-1],i[f],r,u)&&!wp(n,i[f-1],i[f],r,u))return!1;return!0}function bbt(n,t,i,r){for(var u,f;t<i-r;){for(u=0;u<r;++u)f=n[t+u],n[t+u]=n[i-r+u],n[i-r+u]=f;t+=r;i-=r}}function go(n,t,i,r){for(var u,f,e=0,o=n[i-r],s=n[i-r+1];t<i;t+=r)u=n[t],f=n[t+1],e+=(u-o)*(f+s),o=u,s=f;return e>0}function hft(n,t,i,r,u){for(var s,f,e=void 0!==u&&u,o=0,h=i.length;o<h;++o){if(s=i[o],f=go(n,t,s,r),0===o){if(e&&f||!e&&!f)return!1}else if(e&&!f||!e&&f)return!1;t=s}return!0}function bd(n,t,i,r,u){for(var s,f,e=void 0!==u&&u,o=0,h=i.length;o<h;++o)s=i[o],f=go(n,t,s,r),(0===o?e&&f||!e&&!f:e&&!f||!e&&f)&&bbt(n,t,s,r),t=s;return t}function cft(n,t,i,r,u){for(var f=0,e=i.length;f<e;++f)t=bd(n,t,i[f],r,u);return t}function lft(n,t,i,r){for(var e=i||32,u=[],f=0;f<e;++f)pt(u,sbt(n,t,2*Math.PI*f/e,r));return u.push(u[0],u[1]),new wa(u,v.XY,[u.length])}function ba(n){var t=n[0],i=n[1],r=n[2],u=n[3],f=[t,i,t,u,r,u,r,i,t,i];return new wa(f,v.XY,[f.length])}function kd(n,t,i){for(var f,c,o,l=t||32,e=n.getStride(),a=n.getLayout(),s=n.getCenter(),h=e*(l+1),r=new Array(h),u=0;u<h;u+=e)for(r[u]=0,r[u+1]=0,f=2;f<e;f++)r[u+f]=s[f];return c=[r.length],o=new wa(r,a,c),aft(o,s,n.getRadius(),i),o}function aft(n,t,i,r){for(var o,s,f=n.getFlatCoordinates(),h=n.getStride(),e=f.length/h-1,c=r||0,u=0;u<=e;++u)o=u*h,s=c+2*df(u,e)*Math.PI/e,f[o]=t[0]+i*Math.cos(s),f[o+1]=t[1]+i*Math.sin(s);n.changed()}function ah(n,t,i){var r=void 0!==i?n.toFixed(i):""+n,u=r.indexOf(".");return(u=-1===u?r.length:u)>t?r:new Array(1+t-u).join("0")+r}function pft(n,t){for(var r,u,f=(""+n).split("."),e=(""+t).split("."),i=0;i<Math.max(f.length,e.length);i++){if(r=parseInt(f[i]||"0",10),u=parseInt(e[i]||"0",10),r>u)return 1;if(u>r)return-1}return 0}function ka(n,t){return n[0]+=t[0],n[1]+=t[1],n}function bp(n,t){var u,f,v=n[0],y=n[1],h=t[0],c=t[1],e=h[0],o=h[1],l=c[0],a=c[1],i=l-e,r=a-o,s=0===i&&0===r?0:(i*(v-e)+r*(y-o))/(i*i+r*r||0);return s<=0?(u=e,f=o):s>=1?(u=l,f=a):(u=e+s*i,f=o+s*r),[u,f]}function kp(n,t,i){var e=df(t+180,360)-180,o=Math.abs(3600*e),s=i||0,h=Math.pow(10,s),u=Math.floor(o/3600),r=Math.floor((o-3600*u)/60),f=o-3600*u-60*r;return(f=Math.ceil(f*h)/h)>=60&&(f=0,r+=1),r>=60&&(r=0,u+=1),u+"° "+ah(r,2)+"′ "+ah(f,2,s)+"″"+(0==e?"":" "+n.charAt(e<0?1:0))}function wft(n,t,i){return n?t.replace("{x}",n[0].toFixed(i)).replace("{y}",n[1].toFixed(i)):""}function ns(n,t){for(var r=!0,i=n.length-1;i>=0;--i)if(n[i]!=t[i]){r=!1;break}return r}function da(n,t){var i=Math.cos(t),r=Math.sin(t),u=n[0]*i-n[1]*r,f=n[1]*i+n[0]*r;return n[0]=u,n[1]=f,n}function gd(n,t){return n[0]*=t,n[1]*=t,n}function ku(n,t){var i=n[0]-t[0],r=n[1]-t[1];return i*i+r*r}function dp(n,t){return Math.sqrt(ku(n,t))}function ga(n,t){return ku(n,bp(n,t))}function bft(n,t){return wft(n,"{x}, {y}",t)}function gp(n,t,i,r,u,f){var o=NaN,s=NaN,y=(i-t)/r,a,v,k,e,d,c;if(1===y)o=n[t],s=n[t+1];else if(2==y)o=(1-u)*n[t]+u*n[t+r],s=(1-u)*n[t+1]+u*n[t+r+1];else if(0!==y){for(var p=n[t],w=n[t+1],b=0,h=[0],l=t+r;l<i;l+=r)a=n[l],v=n[l+1],b+=Math.sqrt((a-p)*(a-p)+(v-w)*(v-w)),h.push(b),p=a,w=v;k=u*b;e=function(n,t,i){for(var u,e,s=i||lo,r=0,f=n.length,o=!1;r<f;)(e=+s(n[u=r+(f-r>>1)],t))<0?r=u+1:(f=u,o=!e);return o?r:~r}(h,k);e<0?(d=(k-h[-e-2])/(h[-e-1]-h[-e-2]),c=t+(-e-2)*r,o=yc(n[c],n[c+r],d),s=yc(n[c+1],n[c+r+1],d)):(o=n[t+e*r],s=n[t+e*r+1])}return f?(f[0]=o,f[1]=s,f):[o,s]}function ng(n,t,i,r,u,f){var o,e,h,c,l,a,s;if(i==t)return null;if(u<n[t+r-1])return f?((o=n.slice(t,t+r))[r-1]=u,o):null;if(n[i-1]<u)return f?((o=n.slice(i-r,i))[r-1]=u,o):null;if(u==n[t+r-1])return n.slice(t,t+r);for(e=t/r,h=i/r;e<h;)c=e+h>>1,u<n[(c+1)*r-1]?h=c:e=c+1;if(l=n[e*r-1],u==l)return n.slice((e-1)*r,(e-1)*r+r);for(a=(u-l)/(n[(e+1)*r-1]-l),o=[],s=0;s<r-1;++s)o.push(yc(n[(e-1)*r+s],n[e*r+s],a));return o.push(u),o}function kft(n,t,i,r){for(var f,e,o=n[t],s=n[t+1],h=0,u=t+r;u<i;u+=r)f=n[u],e=n[u+1],h+=Math.sqrt((f-o)*(f-o)+(e-s)*(e-s)),o=f,s=e;return h}function dft(n,t,i){for(var l,f,e,o,a,v,y=[],s=n(0),h=n(1),r=t(s),u=t(h),p=[h,s],w=[u,r],c=[1,0],b={},k=1e5;--k>0&&c.length>0;)e=c.pop(),s=p.pop(),r=w.pop(),(v=e.toString())in b||(y.push(r[0],r[1]),b[v]=!0),o=c.pop(),h=p.pop(),u=w.pop(),cut((f=t(l=n(a=(e+o)/2)))[0],f[1],r[0],r[1],u[0],u[1])<i?(y.push(u[0],u[1]),b[v=o.toString()]=!0):(c.push(o,a,a,e),w.push(u,f,f,r),p.push(h,l,l,s));return y}function vh(n){return"string"==typeof n?n:tet(n)}function yh(n){return Array.isArray(n)?n:gft(n)}function net(n){return n[0]=vi(n[0]+.5|0,0,255),n[1]=vi(n[1]+.5|0,0,255),n[2]=vi(n[2]+.5|0,0,255),n[3]=vi(n[3],0,1),n}function tet(n){var r=n[0],t,i;return r!=(0|r)&&(r=r+.5|0),t=n[1],t!=(0|t)&&(t=t+.5|0),i=n[2],i!=(0|i)&&(i=i+.5|0),"rgba("+r+","+t+","+i+","+(void 0===n[3]?1:n[3])+")"}function ckt(n){if(!this.isEventSimulatedFromTouch_(n)){bh.toString()in this.pointerMap&&this.cancel(n);var t=kh(n,this.dispatcher);this.pointerMap[bh.toString()]=n;this.dispatcher.down(t,n)}}function lkt(n){if(!this.isEventSimulatedFromTouch_(n)){var t=kh(n,this.dispatcher);this.dispatcher.move(t,n)}}function akt(n){var t,i;this.isEventSimulatedFromTouch_(n)||(t=this.pointerMap[bh.toString()],t&&t.button===n.button&&(i=kh(n,this.dispatcher),this.dispatcher.up(i,n),this.cleanupMouse()))}function vkt(n){if(!this.isEventSimulatedFromTouch_(n)){var t=kh(n,this.dispatcher);this.dispatcher.enterOver(t,n)}}function ykt(n){if(!this.isEventSimulatedFromTouch_(n)){var t=kh(n,this.dispatcher);this.dispatcher.leaveOut(t,n)}}function kh(n,t){var i=t.cloneEvent(n,n),r=i.preventDefault;return i.preventDefault=function(){n.preventDefault();r()},i.pointerId=bh,i.isPrimary=!0,i.pointerType=fet,i}function pkt(n){this.pointerMap[n.pointerId.toString()]=n;var t=this.prepareEvent_(n);this.dispatcher.down(t,n)}function wkt(n){var t=this.prepareEvent_(n);this.dispatcher.move(t,n)}function bkt(n){var t=this.prepareEvent_(n);this.dispatcher.up(t,n);this.cleanup(n.pointerId)}function kkt(n){var t=this.prepareEvent_(n);this.dispatcher.leaveOut(t,n)}function dkt(n){var t=this.prepareEvent_(n);this.dispatcher.enterOver(t,n)}function gkt(n){var t=this.prepareEvent_(n);this.dispatcher.cancel(t,n);this.cleanup(n.pointerId)}function ndt(n){var t=this.dispatcher.makeEvent("lostpointercapture",n,n);this.dispatcher.dispatchEvent(t)}function tdt(n){var t=this.dispatcher.makeEvent("gotpointercapture",n,n);this.dispatcher.dispatchEvent(t)}function idt(n){this.dispatcher.fireNativeEvent(n)}function rdt(n){this.dispatcher.fireNativeEvent(n)}function udt(n){this.dispatcher.fireNativeEvent(n)}function fdt(n){this.dispatcher.fireNativeEvent(n)}function edt(n){this.dispatcher.fireNativeEvent(n)}function odt(n){this.dispatcher.fireNativeEvent(n)}function sdt(n){this.dispatcher.fireNativeEvent(n)}function hdt(n){this.dispatcher.fireNativeEvent(n)}function adt(n){this.vacuumTouches_(n);this.setPrimaryTouch_(n.changedTouches[0]);this.dedupSynthMouse_(n);this.clickCount_++;this.processTouches_(n,this.overDown_)}function vdt(n){this.processTouches_(n,this.moveOverOut_)}function ydt(n){this.dedupSynthMouse_(n);this.processTouches_(n,this.upOut_)}function pdt(n){this.processTouches_(n,this.cancelOut_)}function ngt(n){return n}function uw(n){if(void 0!==n)return 0}function yet(n,t){if(void 0!==n)return n+t}function ug(n){return Math.pow(n,3)}function cf(n){return 1-ug(1-n)}function fw(n){return 3*n*n-2*n*n*n}function pet(n){return n}function ow(n,t){setTimeout(function(){n(t)},0)}function tgt(n){return!(n.sourceCenter&&n.targetCenter&&!ns(n.sourceCenter,n.targetCenter))&&n.sourceResolution===n.targetResolution&&n.sourceRotation===n.targetRotation}function kt(n,t){var i=document.createElement("canvas");return n&&(i.width=n),t&&(i.height=t),i.getContext("2d")}function fl(n,t){var i=t.parentNode;i&&i.replaceChild(n,t)}function sw(n){return n&&n.parentNode?n.parentNode.removeChild(n):null}function wet(n){for(;n.lastChild;)n.removeChild(n.lastChild)}function ket(n,t,i){return void 0===i&&(i=[0,0]),i[0]=n[0]+2*t,i[1]=n[1]+2*t,i}function sg(n,t,i){return void 0===i&&(i=[0,0]),i[0]=n[0]*t+.5|0,i[1]=n[1]*t+.5|0,i}function ru(n,t){return Array.isArray(n)?n:(void 0===t?t=[n,n]:t[0]=t[1]=n,t)}function is(n,t){return n.visible&&t>=n.minResolution&&t<n.maxResolution}function det(n){this.updateElement_(n.frameState)}function get(n){var u=n.frameState,t,i,r;u&&(t=u.viewState.rotation,t!=this.rotation_&&(i="rotate("+t+"rad)",this.autoHide_&&(r=this.element.classList.contains(hw),r||0!==t?r&&0!==t&&this.element.classList.remove(hw):this.element.classList.add(hw)),this.label_.style.msTransform=i,this.label_.style.webkitTransform=i,this.label_.style.transform=i),this.rotation_=t)}function vg(n){var t=n||{},i=new er;return(void 0===t.zoom||t.zoom)&&i.push(new ag(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&i.push(new lg(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&i.push(new cg(t.attributionOptions)),i}function yg(n,t,i,r){aw(n,t=n.constrainRotation(t,0),i,r)}function aw(n,t,i,r){if(void 0!==t){var u=n.getRotation(),f=n.getCenter();void 0!==u&&f&&r>0?n.animate({rotation:t,anchor:i,duration:r,easing:cf}):n.rotate(t,i)}}function not(n,t,i,r,u){vw(n,t=n.constrainResolution(t,0,u),i,r)}function pg(n,t,i,r){var f=n.getResolution(),u=n.constrainResolution(f,t,0),o,s,e;void 0!==u&&(o=n.getResolutions(),u=vi(u,n.getMinResolution()||o[o.length-1],n.getMaxResolution()||o[0]));i&&void 0!==u&&u!==f&&(s=n.getCenter(),e=n.calculateCenterZoom(u,i),e=n.constrainCenter(e),i=[(u*s[0]-f*e[0])/(u-f),(u*s[1]-f*e[1])/(u-f)]);vw(n,u,i,r)}function vw(n,t,i,r){var u,f,e;t&&(u=n.getResolution(),f=n.getCenter(),void 0!==u&&f&&t!==u&&r?n.animate({resolution:t,anchor:i,duration:r,easing:cf}):(i&&(e=n.calculateCenterZoom(t,i),n.setCenter(e)),n.setResolution(t)))}function fgt(n){var t=!1;if(n.type==ht.DBLCLICK){var i=n.originalEvent,r=n.map,u=n.coordinate,f=i.shiftKey?-this.delta_:this.delta_;pg(r.getView(),f,u,this.duration_);n.preventDefault();t=!0}return!t}function gg(n){for(var i=n.length,r=0,u=0,t=0;t<i;t++)r+=n[t].clientX,u+=n[t].clientY;return[r/i,u/i]}function cgt(){var i=this.getMap(),n=i.getView(),u=i.getSize(),t=this.getGeometry().getExtent(),f,e,o,r;this.out_&&(f=n.calculateExtent(u),e=function(n,t){return ebt(rh(t),n)}([i.getPixelFromCoordinate(de(t)),i.getPixelFromCoordinate(ao(t))]),fp(f,1/n.getResolutionForExtent(e,u)),t=f);o=n.constrainResolution(n.getResolutionForExtent(t,u));r=su(t);r=n.constrainCenter(r);n.animate({resolution:o,center:r,duration:this.duration_,easing:cf})}function lgt(n){var o=!1,t,e;if(n.type==a.KEYDOWN&&(t=n.originalEvent.keyCode,this.condition_(n)&&(t==rs.DOWN||t==rs.LEFT||t==rs.RIGHT||t==rs.UP))){var r=n.map.getView(),i=r.getResolution()*this.pixelDelta_,u=0,f=0;t==rs.DOWN?f=-i:t==rs.LEFT?u=-i:t==rs.RIGHT?u=i:f=i;e=[u,f];da(e,r.getRotation()),function(n,t,i){var r=n.getCenter(),u;r&&(u=n.constrainCenter([r[0]+t[0],r[1]+t[1]]),i?n.animate({duration:i,easing:pet,center:u}):n.setCenter(u))}(r,e,this.duration_);n.preventDefault();o=!0}return!o}function agt(n){var i=!1,t,r,u;return(n.type==a.KEYDOWN||n.type==a.KEYPRESS)&&(t=n.originalEvent.charCode,this.condition_(n)&&(t=="+".charCodeAt(0)||t=="-".charCodeAt(0))&&(r=n.map,u=t=="+".charCodeAt(0)?this.delta_:-this.delta_,pg(r.getView(),u,void 0,this.duration_),n.preventDefault(),i=!0)),!i}function un(n){var t=n||{},i=new er,r=new ret(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&i.push(new sot),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&i.push(new tot({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&i.push(new oot({condition:t.onFocusOnly?wg:void 0,kinetic:r})),(void 0===t.pinchRotate||t.pinchRotate)&&i.push(new vot),(void 0===t.pinchZoom||t.pinchZoom)&&i.push(new yot({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(i.push(new rn),i.push(new cot({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&i.push(new aot({condition:t.onFocusOnly?wg:void 0,constrainResolution:t.constrainResolution,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&i.push(new tn({duration:t.zoomDuration})),i}function kot(){return bw||(bw=kt(1,1)),bw}function sn(n,t){var i=kot();return n!=i.font&&(i.font=n),i.measureText(t).width}function to(n,t,i,r){0!==t&&(n.translate(i,r),n.rotate(t),n.translate(-i,-r))}function got(n,t,i,r,u,f,e,o,s,h,c){var l;1!=i&&(l=n.globalAlpha,n.globalAlpha=l*i);t&&n.setTransform.apply(n,t);n.drawImage(r,u,f,e,o,s,h,e*c,o*c);l&&(n.globalAlpha=l);t&&n.setTransform.apply(n,hn)}function du(n){return Array.isArray(n)?tet(n):n}function nst(n,t,i){return t+":"+n+":"+(i?vh(i):"null")}function wgt(){ev.expire()}function tst(n,t){return n.zIndex-t.zIndex}function ln(n,t,i,r,u){return void 0!==u?(u.minX=n,u.maxX=t,u.minY=i,u.maxY=r,u):new af(n,t,i,r)}function kgt(n,t,i,r,u,f,e,o){for(var nt,h,ut,ot,c,b,s,ft,k,tt=[],v=n[t]>n[i-r],et=u.length,y=n[t],p=n[t+1],l=n[t+=r],a=n[t+1],it=0,d=Math.sqrt(Math.pow(l-y,2)+Math.pow(a-p,2)),w="",rt=0,g=0;g<et;++g){for(ft=v?et-g-1:g,nt=u.charAt(ft),h=f(w=v?nt+w:w+nt)-rt,rt+=h,ut=e+h/2;t<i-r&&it+d<ut;)y=l,p=a,l=n[t+=r],a=n[t+1],it+=d,d=Math.sqrt(Math.pow(l-y,2)+Math.pow(a-p,2));if(ot=ut-it,c=Math.atan2(a-p,l-y),(v&&(c+=c>0?-Math.PI:Math.PI),void 0!==k)&&(b=c-k,b+=b>Math.PI?-2*Math.PI:b<-Math.PI?2*Math.PI:0,Math.abs(b)>o))return null;var st=ot/d,ht=yc(y,l,st),ct=yc(p,a,st);k==c?(v&&(s[0]=ht,s[1]=ct,s[2]=h/2),s[4]=w):(rt=h,s=[ht,ct,h/2,c,w=nt],v?tt.unshift(s):tt.push(s),k=c);e+=h}return tt}function nnt(n,t,i,r,u){for(var c,h,l,b,a,k,e,o,d=i,g=i,v=0,s=0,y=i,p,w,f=i;f<r;f+=u)p=t[f],w=t[f+1],void 0!==l&&(e=p-l,o=w-b,h=Math.sqrt(e*e+o*o),void 0!==a&&(s+=c,Math.acos((a*e+k*o)/(c*h))>n&&(s>v&&(v=s,d=y,g=f),s=0,y=f-u)),c=h,a=e,k=o),l=p,b=w;return(s+=h)>v?[y,f]:[d,g]}function es(n,t,i){var r,u=Math.floor(n.length/2);if(t>=u)for(r=u;r<t;r++)n[r][i]=!0;else if(t<u)for(r=t+1;r<u;r++)n[r][i]=!0}function lst(n,t){return parseInt(y(n),10)-parseInt(y(t),10)}function av(n,t){var i=pn(n,t);return i*i}function pn(n,t){return rnt*n/t}function hl(n,t,i,r,u,e){var h=!1,o=i.getImage(),s;return o&&(s=o.getImageState(),s==ot.LOADED||s==ot.ERROR?o.unlistenImageChange(u,e):(s==ot.IDLE&&o.load(),s=o.getImageState(),o.listenImageChange(u,e),h=!0)),function(n,t,i,r){var e=i.getGeometryFunction()(t),u,o;e&&(u=e.getSimplifiedGeometry(r),i.getRenderer()?!function n(t,i,r,u){var s;if(i.getType()==f.GEOMETRY_COLLECTION){for(var o=i.getGeometries(),e=0,h=o.length;e<h;++e)n(t,o[e],r,u);return}s=t.getReplay(r.getZIndex(),ft.DEFAULT);s.drawCustom(i,u,r.getRenderer())}(n,u,i,t):(o=cst[u.getType()],o(n,u,i,t)))}(n,t,i,r),h}function dst(n,t){for(var r,u=kst.length,i=0;i<u;++i)try{if(r=n.getContext(kst[i],t),r)return r}catch(n){}return null}function wv(n,t){return n[0]=t[0],n[1]=t[1],n[4]=t[2],n[5]=t[3],n[12]=t[4],n[13]=t[5],n}function tht(n,t,i){var r=n.createTexture();return n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),void 0!==t&&n.texParameteri(vr,wst,t),void 0!==i&&n.texParameteri(vr,bst,i),r}function iht(n,t,i,r,u){var f=tht(n,r,u);return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,t,i,0,n.RGBA,n.UNSIGNED_BYTE,null),f}function rht(n,t,i,r){var u=tht(n,i,r);return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),u}function dn(n,t,i,r){var u=i-r;return n[t]===n[u]&&n[t+1]===n[u+1]&&(i-t)/r>3&&!!sd(n,t,i,r)}function bht(){var n=kt(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}function ntt(n,t,i,r){return void 0!==r?(r[0]=n,r[1]=t,r[2]=i,r):[n,t,i]}function ss(n,t,i){return n+"/"+t+"/"+i}function kht(n){return ss(n[0],n[1],n[2])}function ttt(n){return(n[1]<<n[0])+n[2]}function dht(n){return n?Array.isArray(n)?function(){return n}:"function"==typeof n?n:function(){return[n]}:null}function ght(n){var t=n.getDefaultTileGrid();return t||(t=tct(n),n.setDefaultTileGrid(t)),t}function cti(n,t,i,r){var u=void 0!==r?r:vc.TOP_LEFT,f=nct(n,t,i);return new yl({extent:n,origin:function(n,t){var i;return t===vc.BOTTOM_LEFT?i=de(n):t===vc.BOTTOM_RIGHT?i=fh(n):t===vc.TOP_LEFT?i=bf(n):t===vc.TOP_RIGHT?i=ao(n):g(!1,13),i}(n,u),resolutions:f,tileSize:i})}function pl(n){var t=n||{},i=t.extent||w("EPSG:3857").getExtent(),r={extent:i,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:nct(i,t.maxZoom,t.tileSize)};return new yl(r)}function nct(n,t,i){for(var o=void 0!==t?t:gdt,s=ti(n),h=wt(n),u=ru(void 0!==i?i:rw),c=Math.max(h/u[0],s/u[1]),f=o+1,e=new Array(f),r=0;r<f;++r)e[r]=c/Math.pow(2,r);return e}function tct(n,t,i,r){return cti(uc(n),t,i,r)}function uc(n){var i=(n=w(n)).getExtent(),t;return i||(t=180*gf[pr.DEGREES]/n.getMetersPerUnit(),i=ef(-t,-t,t,t)),i}function rct(n,t,i,r){return function(u,f,e){var o=new XMLHttpRequest;o.open("GET","function"==typeof n?n(u,f,e):n,!0);t.getType()==ro.ARRAY_BUFFER&&(o.responseType="arraybuffer");o.onload=function(){if(!o.status||o.status>=200&&o.status<300){var n,u=t.getType();u==ro.JSON||u==ro.TEXT?n=o.responseText:u==ro.XML?(n=o.responseXML)||(n=(new DOMParser).parseFromString(o.responseText,"application/xml")):u==ro.ARRAY_BUFFER&&(n=o.response);n?i.call(this,t.readFeatures(n,{featureProjection:e}),t.readProjection(n),t.getLastExtent()):r.call(this)}else r.call(this)}.bind(this);o.onerror=function(){r.call(this)}.bind(this);o.send()}}function uct(n,t){return rct(n,t,function(n){"function"==typeof this.addFeatures&&this.addFeatures(n)},wf)}function fct(){return[[-1/0,-1/0,1/0,1/0]]}function rt(n,t){return fc.createElementNS(n,t)}function fu(n,t){return function n(t,i,r){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)i?r.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):r.push(t.nodeValue);else for(var u=t.firstChild;u;u=u.nextSibling)n(u,i,r);return r}(n,t,[]).join("")}function ye(n){return"documentElement"in n}function ue(n){return(new DOMParser).parseFromString(n,"application/xml")}function ect(n,t){return function(i,r){var u=n.call(void 0!==t?t:this,i,r);void 0!==u&&pt(r[r.length-1],u)}}function b(n,t){return function(i,r){var u=n.call(void 0!==t?t:this,i,r);void 0!==u&&r[r.length-1].push(u)}}function tt(n,t){return function(i,r){var u=n.call(void 0!==t?t:this,i,r);void 0!==u&&(r[r.length-1]=u)}}function ii(n,t,i){return function(r,u){var o=n.call(void 0!==i?i:this,r,u),f,e;void 0!==o&&(f=u[u.length-1],e=void 0!==t?t:r.localName,(e in f?f[e]:f[e]=[]).push(o))}}function u(n,t,i){return function(r,u){var f=n.call(void 0!==i?i:this,r,u);void 0!==f&&(u[u.length-1][void 0!==t?t:r.localName]=f)}}function e(n,t){return function(i,r,u){n.call(void 0!==t?t:this,i,r,u);u[u.length-1].node.appendChild(i)}}function oct(n){var t,i;return function(r,u,f){if(void 0===t){t={};var e={};e[r.localName]=n;t[r.namespaceURI]=e;i=gt(r.localName)}sct(t,i,u,f)}}function gt(n,t){var i=n;return function(n,r,u){var e=r[r.length-1].node,f=i;return void 0===f&&(f=u),rt(void 0!==t?t:e.namespaceURI,f)}}function nf(n,t){for(var r=t.length,u=new Array(r),i=0;i<r;++i)u[i]=n[t[i]];return u}function s(n,t,i){for(var f=void 0!==i?i:{},r=0,u=n.length;r<u;++r)f[n[r]]=t;return f}function vu(n,t,i,r){for(var f,e,u=t.firstElementChild;u;u=u.nextElementSibling)f=n[u.namespaceURI],void 0!==f&&(e=f[u.localName],void 0!==e&&e.call(r,u,i))}function h(n,t,i,r,u){return r.push(n),vu(t,i,r,u),r.pop()}function sct(n,t,i,r,u,f){for(var s,e,h=(void 0!==u?u:i).length,o=0;o<h;++o)void 0!==(s=i[o])&&void 0!==(e=t.call(void 0!==f?f:this,s,r,void 0!==u?u[o]:void 0))&&n[e.namespaceURI][e.localName].call(f,e,s,r)}function it(n,t,i,r,u,f,e){return u.push(n),sct(t,i,r,u,f,e),u.pop()}function cct(n,t,i){var u=[],f=[],r=[],e=[],o=[],s=void 0!==i?i:[],h=n.SupportedCRS,c=w(h.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||w(h),l=c.getMetersPerUnit(),a="ne"==c.getAxisOrientation().substr(0,2);return n.TileMatrix.sort(function(n,t){return t.ScaleDenominator-n.ScaleDenominator}),n.TileMatrix.forEach(function(t){if(!(s.length>0)||ha(s,function(i){return t.Identifier==i.TileMatrix||-1===t.Identifier.indexOf(":")&&n.Identifier+":"+t.Identifier===i.TileMatrix})){f.push(t.Identifier);var c=.00028*t.ScaleDenominator/l,i=t.TileWidth,h=t.TileHeight;a?r.push([t.TopLeftCorner[1],t.TopLeftCorner[0]]):r.push(t.TopLeftCorner);u.push(c);e.push(i==h?i:[i,h]);o.push([t.MatrixWidth,-t.MatrixHeight])}}),new utt({extent:t,origins:r,resolutions:u,matrixIds:f,tileSizes:e,sizes:o})}function kti(){if(!yb){var n=new te({color:"rgba(255,255,255,0.4)"}),t=new hf({color:"#3399CC",width:1.25});yb=[new ai({image:new ett({fill:n,stroke:t,radius:5}),fill:n,stroke:t})]}return yb}function ty(){var n={},t=[255,255,255,1],i=[0,153,255,1];return n[f.POLYGON]=[new ai({fill:new te({color:[255,255,255,.5]})})],n[f.MULTI_POLYGON]=n[f.POLYGON],n[f.LINE_STRING]=[new ai({stroke:new hf({color:t,width:5})}),new ai({stroke:new hf({color:i,width:3})})],n[f.MULTI_LINE_STRING]=n[f.LINE_STRING],n[f.CIRCLE]=n[f.POLYGON].concat(n[f.LINE_STRING]),n[f.POINT]=[new ai({image:new ett({radius:6,fill:new te({color:i}),stroke:new hf({color:t,width:1.5})}),zIndex:1/0})],n[f.MULTI_POINT]=n[f.POINT],n[f.GEOMETRY_COLLECTION]=n[f.POLYGON].concat(n[f.LINE_STRING],n[f.POINT]),n}function act(n){return n.getGeometry()}function dti(n,t){var i=/\{z\}/g,r=/\{x\}/g,u=/\{y\}/g,f=/\{-y\}/g;return function(e){if(e)return n.replace(i,e[0].toString()).replace(r,e[1].toString()).replace(u,function(){return(-e[2]-1).toString()}).replace(f,function(){var i=e[0],n=t.getFullTileRange(i);return g(n,55),(n.getHeight()+e[2]).toString()})}}function ott(n,t){for(var r=n.length,u=new Array(r),i=0;i<r;++i)u[i]=dti(n[i],t);return iy(u)}function iy(n){return 1===n.length?n[0]:function(t,i,r){if(t){var u=df(ttt(t),n.length);return n[u](t,i,r)}}}function stt(){}function htt(n){var i=[],t=/\{([a-z])-([a-z])\}/.exec(n),r,f,e,o,u;if(t){for(f=t[1].charCodeAt(0),e=t[2].charCodeAt(0),r=f;r<=e;++r)i.push(n.replace(t[0],String.fromCharCode(r)));return i}if(t=t=/\{(\d+)-(\d+)\}/.exec(n)){for(o=parseInt(t[2],10),u=parseInt(t[1],10);u<=o;u++)i.push(n.replace(t[0],u.toString()));return i}return i.push(n),i}function pb(n,t,i,r){function e(){delete window[f];u.parentNode.removeChild(u)}var u=document.createElement("script"),f="olc_"+y(t),o;u.async=!0;u.src=n+(-1==n.indexOf("?")?"?":"&")+(r||"callback")+"="+f;o=setTimeout(function(){e();i&&i()},1e4);window[f]=function(n){clearTimeout(o);e();t(n)};document.getElementsByTagName("head")[0].appendChild(u)}function wb(n,t,i,r){var s=dc(i,t,n),u=hp(t,r,i),h=t.getMetersPerUnit(),e,o,f;return void 0!==h&&(u*=h),e=n.getMetersPerUnit(),void 0!==e&&(u/=e),o=n.getExtent(),(!o||tp(o,s))&&(f=hp(n,u,s)/u,isFinite(f)&&f>0&&(u/=f)),u}function ctt(n,t,i,r){var u=i-n,f=r-t,e=Math.sqrt(u*u+f*f);return[Math.round(i+u/e),Math.round(r+f/e)]}function vct(n,t,i,r,u,f,e,o,s,h,c){var l=kt(Math.round(i*n),Math.round(i*t)),v,a;if(0===s.length)return l.canvas;l.scale(i,i);v=[1/0,1/0,-1/0,-1/0];s.forEach(function(n){rp(v,n.extent)});var w=wt(v),b=ti(v),p=kt(Math.round(i*w/r),Math.round(i*b/r)),y=i/r;return s.forEach(function(n){var t=n.extent[0]-v[0],i=-(n.extent[3]-v[3]),r=wt(n.extent),u=ti(n.extent);p.drawImage(n.image,h,h,n.image.width-2*h,n.image.height-2*h,t*y,i*y,r*y,u*y)}),a=bf(e),o.getTriangles().forEach(function(n){var t=n.source,u=n.target,nt=t[0][0],tt=t[0][1],it=t[1][0],rt=t[1][1],ut=t[2][0],ft=t[2][1],o=(u[0][0]-a[0])/f,s=-(u[0][1]-a[1])/f,h=(u[1][0]-a[0])/f,c=-(u[1][1]-a[1])/f,y=(u[2][0]-a[0])/f,w=-(u[2][1]-a[1])/f,b=nt,k=tt,e;if(nt=0,tt=0,e=function(n){for(var l,a,f,v,u,s,i,e,r=n.length,t=0;t<r;t++){for(var h=t,c=Math.abs(n[t][t]),o=t+1;o<r;o++)l=Math.abs(n[o][t]),l>c&&(c=l,h=o);if(0===c)return null;for(a=n[h],n[h]=n[t],n[t]=a,f=t+1;f<r;f++)for(v=-n[f][t]/n[t][t],u=t;u<r+1;u++)t==u?n[f][u]=0:n[f][u]+=v*n[t][u]}for(s=new Array(r),i=r-1;i>=0;i--)for(s[i]=n[i][r]/n[i][i],e=i-1;e>=0;e--)n[e][r]-=n[e][i]*s[i];return s}([[it-=b,rt-=k,0,0,h-o],[ut-=b,ft-=k,0,0,y-o],[0,0,it,rt,c-s],[0,0,ut,ft,w-s]]),e){l.save();l.beginPath();var d=(o+h+y)/3,g=(s+c+w)/3,et=ctt(d,g,o,s),ot=ctt(d,g,h,c),st=ctt(d,g,y,w);l.moveTo(ot[0],ot[1]);l.lineTo(et[0],et[1]);l.lineTo(st[0],st[1]);l.clip();l.transform(e[0],e[2],e[1],e[3],o,s);l.translate(v[0]-b,v[3]-k);l.scale(r/i,-r/i);l.drawImage(p.canvas,0,0);l.restore()}}),c&&(l.save(),l.strokeStyle="black",l.lineWidth=1,o.getTriangles().forEach(function(n){var t=n.target,i=(t[0][0]-a[0])/f,r=-(t[0][1]-a[1])/f,u=(t[1][0]-a[0])/f,e=-(t[1][1]-a[1])/f,o=(t[2][0]-a[0])/f,s=-(t[2][1]-a[1])/f;l.beginPath();l.moveTo(u,e);l.lineTo(i,r);l.lineTo(o,s);l.closePath();l.stroke()}),l.restore()),l.canvas}function rii(n,t){n.getImage().src=t}function kb(n,t){n.getImage().src=t}function oc(n,t){var i=[],r;return Object.keys(t).forEach(function(n){null!==t[n]&&void 0!==t[n]&&i.push(n+"="+encodeURIComponent(t[n]))}),r=i.join("&"),(n=-1===(n=n.replace(/[?&]$/,"")).indexOf("?")?n+"?":n+"&")+r}function gii(n,t,i){var r,u,f;return n.prepareFrame(t,i)?(r=t.size[0],u=t.size[1],sc?(f=sc.canvas,f.width!==r||f.height!==u?sc=kt(r,u):sc.clearRect(0,0,r,u)):sc=kt(r,u),n.composeFrame(t,i,sc),sc.getImageData(0,0,r,u)):null}function nri(n){var r=n,u=n,t=n,i=null;return"function"==typeof r.getTile?i=function(n){var t=new rlt({source:n});return new sv(t)}(r):"function"==typeof u.getImage?i=function(n){var t=new tlt({source:n});return new ov(t)}(u):t.getType()===kr.TILE?i=new sv(t):t.getType()!=kr.IMAGE&&t.getType()!=kr.VECTOR||(i=new ov(t)),i}function eri(n,t,i){var r=this.getTileGrid(),e,u,f;if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=n[0]))return e=r.getTileCoordExtent(n,this.tmpExtent_),u=ru(r.getTileSize(n[0]),this.tmpSize),1!=t&&(u=sg(u,t,this.tmpSize)),f={F:"image",FORMAT:"PNG32",TRANSPARENT:!0},nt(f,this.params_),this.getRequestUrl_(n,u,e,t,i,f)}function lri(n,t,i){var r=this.getTileGrid(),o;if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=n[0])){1==t||this.hidpi_&&void 0!==this.serverType_||(t=1);var s=r.getResolution(n[0]),f=r.getTileCoordExtent(n,this.tmpExtent_),u=ru(r.getTileSize(n[0]),this.tmpSize),e=this.gutter_;return 0!==e&&(u=ket(u,e,this.tmpSize),f=ff(f,s*e,f)),1!=t&&(u=sg(u,t,this.tmpSize)),o={SERVICE:"WMS",VERSION:kl,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0},nt(o,this.params_),this.getRequestUrl_(n,u,f,t,i,o)}}function wri(n,t){var i=rct(t,n.getFormat(),n.onLoad.bind(n),n.onError.bind(n));n.setLoader(i)}function elt(n){var i=this.requestEncoding_,t={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_},r,u;return i==as.KVP&&nt(t,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),n=i==as.KVP?oc(n,t):n.replace(/\{(\w+?)\}/g,function(n,i){return i.toLowerCase()in t?t[i.toLowerCase()]:n}),r=this.tileGrid,u=this.dimensions_,function(t){var f,e;if(t)return f={TileMatrix:r.getMatrixId(t[0]),TileCol:t[1],TileRow:-t[2]-1},nt(f,u),e=n,i==as.KVP?oc(e,f):e.replace(/\{(\w+?)\}/g,function(n,t){return f[t]})}}function oui(n){for(var i,r,u=n.dataTransfer.files,t=0,f=u.length;t<f;++t)i=u.item(t),r=new FileReader,r.addEventListener(a.LOAD,this.handleResult_.bind(this,i)),r.readAsText(i)}function ytt(n){n.stopPropagation();n.preventDefault();n.dataTransfer.dropEffect="copy"}function llt(n,t,i,r){for(var f,o=[],u=[1/0,1/0,-1/0,-1/0],e=0,s=i.length;e<s;++e)f=i[e],u=td(n,t,f[0],r),o.push((u[0]+u[2])/2,(u[1]+u[3])/2),t=f[f.length-1];return o}function vlt(n){return function(t){return hi([n,t])}}function ylt(n,t){return n[0]==t[0]?function(i){return hi([n,[i[0],t[1]]])}:n[1]==t[1]?function(i){return hi([n,[t[0],i[1]]])}:null}function wui(n,t){return n.index-t.index}function wlt(n,t){var u=t.geometry,i,e,r;return u.getType()===f.CIRCLE&&(i=u,t.index===fy)?(e=ku(i.getCenter(),n),r=Math.sqrt(e)-i.getRadius(),r*r):ga(n,t.segment)}function blt(n,t){var i=t.geometry;return i.getType()===f.CIRCLE&&t.index===fy?i.getClosestPoint(n):bp(n,t.segment)}function gui(n){var u,f,s,e;if(!this.condition_(n))return!0;var h=this.addCondition_(n),c=this.removeCondition_(n),o=this.toggleCondition_(n),a=!h&&!c&&!o,l=n.map,i=this.getFeatures(),r=[],t=[];if(a){for(pf(this.featureLayerAssociation_),l.forEachFeatureAtPixel(n.pixel,function(n,i){if(this.filter_(n,i))return t.push(n),this.addFeatureLayerAssociation_(n,i),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_}),u=i.getLength()-1;u>=0;--u)f=i.item(u),s=t.indexOf(f),s>-1?t.splice(s,1):(i.remove(f),r.push(f));0!==t.length&&i.extend(t)}else{for(l.forEachFeatureAtPixel(n.pixel,function(n,u){if(this.filter_(n,u))return!h&&!o||tr(i.getArray(),n)?(c||o)&&tr(i.getArray(),n)&&(r.push(n),this.removeFeatureLayerAssociation_(n)):(t.push(n),this.addFeatureLayerAssociation_(n,u)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_}),e=r.length-1;e>=0;--e)i.remove(r[e]);i.extend(t)}return(t.length>0||r.length>0)&&this.dispatchEvent(new dui(kui.SELECT,t,r,n)),fot(n)}function dlt(n){return n.feature?n.feature:n.element?n.element:void 0}function glt(n){for(var i=[],t=0,r=n.length;t<r;++t)i.push(n[t].clone());return i}function si(n,t,i){var r,u=i?w(i.featureProjection):null,f=i?w(i.dataProjection):null,e;return(r=u&&f&&!hu(u,f)?Array.isArray(n)?bo(n,f,u):(t?n.clone():n).transform(t?u:f,t?f:u):n,t&&i&&void 0!==i.decimals&&!Array.isArray(r))&&(e=Math.pow(10,i.decimals),r===n&&(r=n.clone()),r.applyTransform(function(n){for(var t=0,i=n.length;t<i;++t)n[t]=Math.round(n[t]*e)/e;return n})),r}function nk(n){if("string"==typeof n){var t=JSON.parse(n);return t||null}return null!==n?n:null}function nat(n,t){var i;if(!n)return null;if("number"==typeof n.x&&"number"==typeof n.y)i=f.POINT;else if(n.points)i=f.MULTI_POINT;else if(n.paths)i=1===n.paths.length?f.LINE_STRING:f.MULTI_LINE_STRING;else if(n.rings){var u=n,e=gl(u),r=function(n,t){for(var u=[],r=[],e=[],h,f,o,c,l,i=0,s=n.length;i<s;++i)u.length=0,pa(u,0,n[i],t.length),h=go(u,0,u.length,t.length),h?r.push([n[i]]):e.push(n[i]);for(;e.length;){for(f=e.shift(),o=!1,i=r.length-1;i>=0;i--)if(c=r[i][0],l=lr(new lh(c).getExtent(),new lh(f).getExtent()),l){r[i].push(f);o=!0;break}o||r.push([f.reverse()])}return r}(u.rings,e);1===r.length?(i=f.POLYGON,n.rings=r[0]):(i=f.MULTI_POLYGON,n.rings=r)}return si(ps[i](n),!1,t)}function gl(n){var t=v.XY;return!0===n.hasZ&&!0===n.hasM?t=v.XYZM:!0===n.hasZ?t=v.XYZ:!0===n.hasM&&(t=v.XYM),t}function ey(n){var t=n.getLayout();return{hasZ:t===v.XYZ||t===v.XYZM,hasM:t===v.XYM||t===v.XYZM}}function tat(n,t){return ws[n.getType()](si(n,!0,t),t)}function bs(n){return hc(fu(n,!1))}function hc(n){var t=/^\s*(true|1)|(false|0)\s*$/.exec(n);if(t)return void 0!==t[1]||!1}function dtt(n){var i=fu(n,!1),t=Date.parse(i);if(!isNaN(t))return t/1e3}function yt(n){return fo(fu(n,!1))}function fo(n){var t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);if(t)return parseFloat(t[1])}function cr(n){return eo(fu(n,!1))}function eo(n){var t=/^\s*(\d+)\s*$/.exec(n);if(t)return parseInt(t[1],10)}function l(n){return fu(n,!1).trim()}function ik(n,t){ut(n,t?"1":"0")}function yu(n,t){var i=t.toPrecision();n.appendChild(fc.createTextNode(i))}function rk(n,t){var i=t.toString();n.appendChild(fc.createTextNode(i))}function ut(n,t){n.appendChild(fc.createTextNode(t))}function pei(n,t){var r=n.getGeometry(),i;if(r&&(i=yei[r.getType()],i))return rt(t[t.length-1].node.namespaceURI,i)}function gtt(n,t,i,r){return n.push(parseFloat(i.getAttribute("lon")),parseFloat(i.getAttribute("lat"))),"ele"in r?(n.push(r.ele),delete r.ele,t.hasZ=!0):n.push(0),"time"in r?(n.push(r.time),delete r.time,t.hasM=!0):n.push(0),n}function nit(n,t,i){var e=v.XY,u=2,r,o,f,s;if(n.hasZ&&n.hasM?(e=v.XYZM,u=4):n.hasZ?(e=v.XYZ,u=3):n.hasM&&(e=v.XYM,u=3),4!==u){for(r=0,o=t.length/4;r<o;r++)t[r*u]=t[4*r],t[r*u+1]=t[4*r+1],n.hasZ&&(t[r*u+2]=t[4*r+2]),n.hasM&&(t[r*u+2]=t[4*r+3]);if(t.length=t.length/4*u,i)for(f=0,s=i.length;f<s;f++)i[f]=i[f]/4*u}return e}function tit(n,t){var r=t[t.length-1],i=n.getAttribute("href");null!==i&&(r.link=i);vu(pfi,n,t)}function iit(n,t){t[t.length-1].extensionsNode_=n}function iat(n,t){var s=t[0],i=h({flatCoordinates:[],layoutOptions:{}},kfi,n,t),r,e,o,u,f;if(i)return r=i.flatCoordinates,delete i.flatCoordinates,e=i.layoutOptions,delete i.layoutOptions,o=nit(e,r),u=new yi(r,o),si(u,!1,s),f=new fi(u),f.setProperties(i),f}function rat(n,t){var c=t[0],i=h({flatCoordinates:[],ends:[],layoutOptions:{}},gfi,n,t),r,u,o,s,f,e;if(i)return r=i.flatCoordinates,delete i.flatCoordinates,u=i.ends,delete i.ends,o=i.layoutOptions,delete i.layoutOptions,s=nit(o,r,u),f=new yf(r,s,u),si(f,!1,c),e=new fi(f),e.setProperties(i),e}function uat(n,t){var o=t[0],i=h({},iei,n,t),r;if(i){var u={},f=gtt([],u,n,i),s=nit(u,f),e=new ei(f,s);return si(e,!1,o),r=new fi(e),r.setProperties(i),r}}function rit(n,t,i){n.setAttribute("href",t);var r=i[i.length-1].properties,u=[r.linkText,r.linkType];it({node:n},uei,hr,u,i,rei)}function uit(n,t,i){var u=i[i.length-1],e=u.node.namespaceURI,r=u.properties,f,o;switch(n.setAttributeNS(null,"lat",String(t[1])),n.setAttributeNS(null,"lon",String(t[0])),u.geometryLayout){case v.XYZM:0!==t[3]&&(r.time=t[3]);case v.XYZ:0!==t[2]&&(r.ele=t[2]);break;case v.XYM:0!==t[2]&&(r.time=t[2])}f="rtept"==n.nodeName?oei[e]:aei[e];o=nf(r,f);it({node:n,properties:r},vei,hr,o,i,f)}function fit(n,t){if(!n)return null;var i;switch(n.type){case f.POINT:i=function(n){return new ei(n.coordinates)}(n);break;case f.LINE_STRING:i=function(n){return new yi(n.coordinates)}(n);break;case f.POLYGON:i=function(n){return new or(n.coordinates)}(n);break;case f.MULTI_POINT:i=function(n){return new pe(n.coordinates)}(n);break;case f.MULTI_LINE_STRING:i=function(n){return new yf(n.coordinates)}(n);break;case f.MULTI_POLYGON:i=function(n){return new we(n.coordinates)}(n);break;case f.GEOMETRY_COLLECTION:i=function(n,t){var i=n.geometries.map(function(n){return fit(n,t)});return new ys(i)}(n);break;default:throw new Error("Unsupported GeoJSON type: "+n.type);}return si(i,!1,t)}function eit(n,t){var i,r=(n=si(n,!0,t)).getType();switch(r){case f.POINT:i=function(n){return{type:"Point",coordinates:n.getCoordinates()}}(n);break;case f.LINE_STRING:i=function(n){return{type:"LineString",coordinates:n.getCoordinates()}}(n);break;case f.POLYGON:i=function(n,t){var i;return t&&(i=t.rightHanded),{type:"Polygon",coordinates:n.getCoordinates(i)}}(n,t);break;case f.MULTI_POINT:i=function(n){return{type:"MultiPoint",coordinates:n.getCoordinates()}}(n);break;case f.MULTI_LINE_STRING:i=function(n){return{type:"MultiLineString",coordinates:n.getCoordinates()}}(n);break;case f.MULTI_POLYGON:i=function(n,t){var i;return t&&(i=t.rightHanded),{type:"MultiPolygon",coordinates:n.getCoordinates(i)}}(n,t);break;case f.GEOMETRY_COLLECTION:i=function(n,t){return{type:"GeometryCollection",geometries:n.getGeometriesArray().map(function(n){var i=nt({},t);return delete i.featureProjection,eit(n,i)})}}(n,t);break;case f.CIRCLE:i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+r);}return i}function fk(n){return"string"==typeof n?n:""}function bit(n,t){var i=null,f=[0,0],o="start",r,e,u;return n.getImage()&&(r=n.getImage().getImageSize(),(null===r&&(r=ek),2==r.length)&&(e=n.getImage().getScale(),f[0]=e*r[0]/2,f[1]=-e*r[1]/2,o="left")),null!==n.getText()?(u=n.getText(),(i=u.clone()).setFont(u.getFont()||cc.getFont()),i.setScale(u.getScale()||cc.getScale()),i.setFill(u.getFill()||cc.getFill()),i.setStroke(u.getStroke()||yit)):i=cc.clone(),i.setText(t),i.setOffsetX(f[0]),i.setOffsetY(f[1]),i.setTextAlign(o),new wl({text:i})}function kit(n){var r=fu(n,!1),i=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(r),t;if(i)return t=i[1],[parseInt(t.substr(6,2),16),parseInt(t.substr(4,2),16),parseInt(t.substr(2,2),16),parseInt(t.substr(0,2),16)/255]}function cat(n){for(var t,i=fu(n,!1),r=[];t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i.exec(i);){var u=parseFloat(t[1]),f=parseFloat(t[2]),e=t[3]?parseFloat(t[3]):0;r.push(u,f,e);i=i.substr(t[0].length)}if(""===i)return r}function sk(n){var i=fu(n,!1).trim(),t=n.baseURI;return t&&"about:blank"!=t||(t=window.location.href),t?new URL(i,t).href:i}function lat(n){return yt(n)}function vat(n,t){return h(void 0,aat,n,t)}function yat(n,t){return h(null,coi,n,t)}function bat(n,t){var r=h({flatCoordinates:[],whens:[]},wat,n,t);if(r){for(var u=r.flatCoordinates,f=r.whens,i=0,e=Math.min(u.length,f.length);i<e;++i)u[4*i+3]=f[i];return new yi(u,v.XYZM)}}function dit(n,t){return h(null,dat,n,t)}function gat(n,t){var u=h({},ly,n,t),r=dit(n,t),i;if(r)return i=new yi(r,v.XYZ),i.setProperties(u),i}function nvt(n,t){var u=h({},ly,n,t),i=dit(n,t),r;if(i)return r=new or(i,v.XYZ,[i.length]),r.setProperties(u),r}function ivt(n,t){var r,i=h([],tvt,n,t),c,e,v;if(!i)return null;if(0===i.length)return new ys(i);for(var l,o,a=!0,u=i[0].getType(),s=1,y=i.length;s<y;++s)if(i[s].getType()!=u){a=!1;break}if(a)if(u==f.POINT){for(c=i[0],l=c.getLayout(),o=c.getFlatCoordinates(),e=1,v=i.length;e<v;++e)pt(o,i[e].getFlatCoordinates());nrt(r=new pe(o,l),i)}else u==f.LINE_STRING?nrt(r=new yf(i),i):u==f.POLYGON?nrt(r=new we(i),i):u==f.GEOMETRY_COLLECTION?r=new ys(i):g(!1,37);else r=new ys(i);return r}function rvt(n,t){var u=h({},ly,n,t),r=dit(n,t),i;if(r)return i=new ei(r,v.XYZ),i.setProperties(u),i}function fvt(n,t){var o=h({},ly,n,t),i=h([null],uvt,n,t),f;if(i&&i[0]){for(var r=i[0],e=[r.length],u=1,s=i.length;u<s;++u)pt(r,i[u]),e.push(r.length);return f=new or(r,v.XYZ,e),f.setProperties(o),f}}function git(n,t){var i=h({},evt,n,t),r,u,f;if(!i)return null;u="fillStyle"in i?i.fillStyle:ok;f=i.fill;void 0===f||f||(u=null);"imageStyle"in i?i.imageStyle!=ait&&(r=i.imageStyle):r=vit;var s="textStyle"in i?i.textStyle:cc,e="strokeStyle"in i?i.strokeStyle:pit,o=i.outline;return void 0===o||o||(e=null),[new wl({fill:u,image:r,stroke:e,text:s,zIndex:void 0})]}function nrt(n,t){for(var u,f,c=t.length,o=new Array(t.length),s=new Array(t.length),h=new Array(t.length),e,r=u=f=!1,i=0;i<c;++i)e=t[i],o[i]=e.get("extrude"),s[i]=e.get("tessellate"),h[i]=e.get("altitudeMode"),r=r||void 0!==o[i],u=u||void 0!==s[i],f=f||h[i];r&&n.set("extrude",o);u&&n.set("tessellate",s);f&&n.set("altitudeMode",h)}function hvt(n,t){vu(svt,n,t)}function cvt(n,t){vu(sat,n,t)}function trt(n,t){for(var u,i=yh(t),f=[255*(4==i.length?i[3]:1),i[2],i[1],i[0]],r=0;r<4;++r)u=Math.floor(f[r]).toString(16),f[r]=1==u.length?"0"+u:u;ut(n,f.join(""))}function yvt(n,t,i){var r,u,o={node:n},e=t.getType();e==f.GEOMETRY_COLLECTION?(r=t.getGeometries(),u=vvt):e==f.MULTI_POINT?(r=t.getPoints(),u=osi):e==f.MULTI_LINE_STRING?(r=t.getLineStrings(),u=ssi):e==f.MULTI_POLYGON?(r=t.getPolygons(),u=csi):g(!1,39);it(o,lsi,u,r,i)}function wvt(n,t,i){it({node:n},pvt,hsi,[t],i)}function bvt(n,t,i){var o={node:n},r,s,e,a,h,u,c,l,y,f;t.getId()&&n.setAttribute("id",t.getId());r=t.getProperties();s={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};s[t.getGeometryName()]=1;e=Object.keys(r||{}).sort().filter(function(n){return!s[n]});e.length>0&&(a=nf(r,e),it(o,irt,vsi,[{names:e,values:a}],i));h=t.getStyleFunction();h&&(u=h(t,0),u&&(c=Array.isArray(u)?u[0]:u,this.writeStyles_&&(r.Style=c),l=c.getText(),l&&(r.name=l.getText())));var p=i[i.length-1].node,v=asi[p.namespaceURI],w=nf(r,v);it(o,irt,hr,w,i,v);y=i[0];f=t.getGeometry();f&&(f=si(f,!0,y));it(o,irt,vvt,[f],i)}function ta(n,t,i){var e=t.getFlatCoordinates(),r={node:n},u;r.layout=t.getLayout();r.stride=t.getStride();u=t.getProperties();u.coordinates=e;var o=i[i.length-1].node,f=kvt[o.namespaceURI],s=nf(u,f);it(r,dvt,hr,s,i,f)}function nyt(n,t,i){var r=t.getLinearRings(),f=r.shift(),u={node:n};it(u,gvt,ysi,r,i);it(u,gvt,psi,[f],i)}function ryt(n,t){yu(n,Math.round(1e6*t)/1e6)}function nhi(n,t,i){if(3===n){var r={keys:[],values:[],features:[]},u=i.readVarint()+i.pos;i.readFields(thi,r,u);r.length=r.features.length;r.length&&(t[r.name]=r)}}function thi(n,t,i){if(15===n)t.version=i.readVarint();else if(1===n)t.name=i.readString();else if(5===n)t.extent=i.readVarint();else if(2===n)t.features.push(i.pos);else if(3===n)t.keys.push(i.readString());else if(4===n){for(var r=null,u=i.readVarint()+i.pos;i.pos<u;)r=1==(n=i.readVarint()>>3)?i.readString():2===n?i.readFloat():3===n?i.readDouble():4===n?i.readVarint64():5===n?i.readVarint():6===n?i.readSVarint():7===n?i.readBoolean():null;t.values.push(r)}}function ihi(n,t,i){var r,u,f;if(1==n)t.id=i.readVarint();else if(2==n)for(r=i.readVarint()+i.pos;i.pos<r;)u=t.layer.keys[i.readVarint()],f=t.layer.values[i.readVarint()],t.properties[u]=f;else 3==n?t.type=i.readVarint():4==n&&(t.geometry=i.pos)}function rhi(n,t,i){n.pos=t.features[i];var u=n.readVarint()+n.pos,r={layer:t,type:0,properties:{}};return n.readFields(ihi,r,u),r}function fyt(n,t){t[t.length-1].tags[n.getAttribute("k")]=n.getAttribute("v")}function oyt(n,t,i,r,u,f){var e,o,s,c,h;for(void 0!==u?(e=u,o=void 0!==f?f:0):(e=[],o=0),s=t;s<i;)for(c=n[s++],e[o++]=n[s++],e[o++]=c,h=2;h<r;++h)e[o++]=n[s++];return e.length=o,e}function syt(n,t,i){for(var h=i||1e5,f=new Array(t),u,o,e,s,r=0;r<t;++r)f[r]=0;for(u=0,o=n.length;u<o;)for(r=0;r<t;++r,++u)e=n[u],s=e-f[r],f[r]=e,n[u]=s;return cyt(n,h)}function hyt(n,t,i){for(var o=i||1e5,e=new Array(t),r=0;r<t;++r)e[r]=0;for(var u=lyt(n,o),f=0,s=u.length;f<s;)for(r=0;r<t;++r,++f)e[r]+=u[f],u[f]=e[r];return u}function cyt(n,t){for(var r=t||1e5,i=0,u=n.length;i<u;++i)n[i]=Math.round(n[i]*r);return function(n){for(var i,t=0,r=n.length;t<r;++t)i=n[t],n[t]=i<0?~(i<<1):i<<1;return function(n){for(var i="",t=0,r=n.length;t<r;++t)i+=hhi(n[t]);return i}(n)}(n)}function lyt(n,t){for(var u=t||1e5,i=function(n){for(var r,t=function(n){for(var u,f=[],t=0,i=0,r=0,e=n.length;r<e;++r)u=n.charCodeAt(r)-63,t|=(31&u)<<i,u<32?(f.push(t),t=0,i=0):i+=5;return f}(n),i=0,u=t.length;i<u;++i)r=t[i],t[i]=1&r?~(r>>1):r>>1;return t}(n),r=0,f=i.length;r<f;++r)i[r]/=u;return i}function hhi(n){for(var t,i="";n>=32;)t=63+(32|31&n),i+=String.fromCharCode(t),n>>=5;return t=n+63,i+String.fromCharCode(t)}function ck(n,t){for(var r,o,u,e,i=[],f=0,s=n.length;f<s;++f)u=n[f],f>0&&i.pop(),e=u>=0?t[u]:t[~u].slice().reverse(),i.push.apply(i,e);for(r=0,o=i.length;r<o;++r)i[r]=i[r].slice();return i}function chi(n,t,i,r,u,f,e){for(var s=n.geometries,h=[],o=0,c=s.length;o<c;++o)h[o]=yyt(s[o],t,i,r,u,f,e);return h}function yyt(n,t,i,r,u,f,e){var c,h=n.type,l=vyt[h],s,o;return c="Point"===h||"MultiPoint"===h?l(n,i,r):l(n,t),s=new fi,s.setGeometry(si(c,!1,e)),void 0!==n.id&&s.setId(n.id),o=n.properties,u&&(o||(o={}),o[u]=f),o&&s.setProperties(o),s}function lhi(n,t,i){for(var r,f=0,e=0,u=0,o=n.length;u<o;++u)r=n[u],f+=r[0],e+=r[1],r[0]=f,r[1]=e,frt(r,t,i)}function frt(n,t,i){n[0]=n[0]*t[0]+i[0];n[1]=n[1]*t[1]+i[1]}function apt(){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(ahi,n))}function vpt(n,t,i){return new byt(n,t,i)}function bpt(n,t){var i=rt(lc,"Filter"),r=rt(lc,"FeatureId");i.appendChild(r);r.setAttribute("fid",t);n.appendChild(i)}function hrt(n,t){var i=(n=n||ypt)+":";return 0===t.indexOf(i)?t:i+t}function kpt(n,t,i){it({node:n},py,gt(t.getTagName()),[t],i)}function dpt(n,t,i){for(var u,e={node:n},f=t.conditions,r=0,o=f.length;r<o;++r)u=f[r],it(e,py,gt(u.getTagName()),[u],i)}function ra(n,t){void 0!==t.matchCase&&n.setAttribute("matchCase",t.matchCase.toString());ks(n,t.propertyName);ak(n,""+t.expression)}function gpt(n,t,i){var r=rt(lc,n);ut(r,i);t.appendChild(r)}function ks(n,t){gpt("PropertyName",n,t)}function ak(n,t){gpt("Literal",n,t)}function nwt(n,t){var r=rt(be,"TimeInstant"),i;n.appendChild(r);i=rt(be,"timePosition");r.appendChild(i);ut(i,t)}function ewt(n){var t=n.getCoordinates();return 0===t.length?"":t.join(" ")}function lrt(n){for(var i=n.getCoordinates(),r=[],t=0,u=i.length;t<u;++t)r.push(i[t].join(" "));return r.join(",")}function owt(n){for(var i=[],r=n.getLinearRings(),t=0,u=r.length;t<u;++t)i.push("("+lrt(r[t])+")");return i.join(",")}function hwt(n){var t=n.getType(),r=swt[t](n),i;return(t=t.toUpperCase(),"function"==typeof n.getFlatCoordinates)&&(i=function(n){var t=n.getLayout(),i="";return t!==v.XYZ&&t!==v.XYZM||(i+=rwt),t!==v.XYM&&t!==v.XYZM||(i+=uwt),i}(n),i.length>0&&(t+=" "+i)),0===r.length?t+" "+iwt:t+"("+r+")"}function fa(n){return n.getAttributeNS(lwt,"href")}function co(n,t){return h({},kci,n,t)}function vrt(n,t){return h({},yci,n,t)}function vwt(n,t){var i=co(n,t),r;if(i)return r=[eo(n.getAttribute("width")),eo(n.getAttribute("height"))],i.size=r,i}function ywt(n,t){return h([],dci,n,t)}function yrt(n){var t=l(n).split(/\s+/),i,r;if(t&&2==t.length&&(i=+t[0],r=+t[1],!isNaN(i)&&!isNaN(r)))return[i,r]}function bwt(){var n=document.body;return!!(n.webkitRequestFullscreen||n.mozRequestFullScreen&&document.mozFullScreenEnabled||n.msRequestFullscreen&&document.msFullscreenEnabled||n.requestFullscreen&&document.fullscreenEnabled)}function prt(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function kwt(n){n.requestFullscreen?n.requestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen&&n.webkitRequestFullscreen()}function gwt(n){var t=n.frameState;t?this.mapProjection_!=t.viewState.projection&&(this.mapProjection_=t.viewState.projection,this.transform_=null):this.mapProjection_=null}function tbt(){this.validateExtent_();this.updateBox_()}function ibt(n){var t=n.frameState;this.viewState_=t?t.viewState:null;this.updateElement_()}function ubt(n){if(n.frameState){this.sliderInitialized_||this.initSlider_();var t=n.frameState.viewState.resolution;t!==this.currentResolution_&&(this.currentResolution_=t,this.setThumbPosition_(t))}}var brt,ky,sa,dy,fi,vc,ir,v,f,hut,aa,pc,gf,pr,ar,lp,ed,yp,ce,lh,ei,wa,or,yi,gft,ph,te,rr,iet,wh,eet,oet,set,cet,ew,fg,lw,cg,lg,ag,tv,ge,tn,rs,rn,dot,hn,sr,ev,ov,af,gw,sl,vn,ft,vv,wn,gst,yv,pv,ob,uu,sb,rc,cb,itt,yl,rtt,ny,fc,hs,hr,utt,hct,ri,yb,wl,bl,ls,uy,klt,ys,tf,dl,tk,ps,ws,ct,et,uk,oy,bt,fat,eat,aat,pat,wat,kat,dat,ly,tvt,uvt,evt,ovt,svt,pvt,kvt,dvt,tyt,iyt,rrt,eyt,ayt,vyt,pyt,ert,py,crt,ho,bi,swt,cwt,lwt,wy,pwt,wwt,dwt,yk,nbt,rbt,oa;i.r(t);brt=0;var pk="5.3.0",krt=function(n){function t(t){var i="Assertion failed. See https://openlayers.org/en/"+("latest"===pk?pk:"v"+pk.split("-")[0])+"/doc/errors/#"+t+" for details.";n.call(this,i);this.code=t;this.name="AssertionError";this.message=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),ki={ADD:"add",REMOVE:"remove"},gs="propertychange",nt="function"==typeof Object.assign?Object.assign:function(n){var f=arguments,t,i;if(void 0===n||null===n)throw new TypeError("Cannot convert undefined or null to object");for(var u=Object(n),r=1,e=arguments.length;r<e;++r)if(t=f[r],void 0!==t&&null!==t)for(i in t)t.hasOwnProperty(i)&&(u[i]=t[i]);return u};ky=function(){this.disposed_=!1};ky.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())};ky.prototype.disposeInternal=function(){};sa=ky;dy=function(n){this.propagationStopped;this.type=n;this.target=null};dy.prototype.preventDefault=function(){this.propagationStopped=!0};dy.prototype.stopPropagation=function(){this.propagationStopped=!0};var fr=dy,th=function(n){function t(){n.call(this);this.pendingRemovals_={};this.dispatching_={};this.listeners_={}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.addEventListener=function(n,t){var i=this.listeners_[n];i||(i=this.listeners_[n]=[]);-1===i.indexOf(t)&&i.push(t)},t.prototype.dispatchEvent=function(n){var i="string"==typeof n?new fr(n):n,t=i.type,f,r,u,e,o;if(i.target=this,r=this.listeners_[t],r){for((t in this.dispatching_)||(this.dispatching_[t]=0,this.pendingRemovals_[t]=0),++this.dispatching_[t],u=0,e=r.length;u<e;++u)if(!1===r[u].call(this,i)||i.propagationStopped){f=!1;break}if(--this.dispatching_[t],0===this.dispatching_[t]){for(o=this.pendingRemovals_[t],delete this.pendingRemovals_[t];o--;)this.removeEventListener(t,wf);delete this.dispatching_[t]}return f}},t.prototype.disposeInternal=function(){nut(this)},t.prototype.getListeners=function(n){return this.listeners_[n]},t.prototype.hasListener=function(n){return n?n in this.listeners_:Object.keys(this.listeners_).length>0},t.prototype.removeEventListener=function(n,t){var i=this.listeners_[n],r;i&&(r=i.indexOf(t),n in this.pendingRemovals_?(i[r]=wf,++this.pendingRemovals_[n]):(i.splice(r,1),0===i.length&&delete this.listeners_[n]))},t}(sa),a={CHANGE:"change",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"},kk=function(n){function t(){n.call(this);this.revision_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.changed=function(){++this.revision_;this.dispatchEvent(a.CHANGE)},t.prototype.getRevision=function(){return this.revision_},t.prototype.on=function(n,t){if(Array.isArray(n)){for(var r=n.length,u=new Array(r),i=0;i<r;++i)u[i]=o(this,n[i],t);return u}return o(this,n,t)},t.prototype.once=function(n,t){if(Array.isArray(n)){for(var r=n.length,u=new Array(r),i=0;i<r;++i)u[i]=ee(this,n[i],t);return u}return ee(this,n,t)},t.prototype.un=function(n,t){if(Array.isArray(n))for(var i=0,r=n.length;i<r;++i)ou(this,n[i],t);else ou(this,n,t)},t}(th),iut=function(n){function t(t,i,r){n.call(this,t);this.key=i;this.oldValue=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),dk={};var rf=function(n){function t(t){n.call(this);y(this);this.values_={};void 0!==t&&this.setProperties(t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(n){var t;return this.values_.hasOwnProperty(n)&&(t=this.values_[n]),t},t.prototype.getKeys=function(){return Object.keys(this.values_)},t.prototype.getProperties=function(){return nt({},this.values_)},t.prototype.notify=function(n,t){var i;i=ni(n);this.dispatchEvent(new iut(i,n,t));i=gs;this.dispatchEvent(new iut(i,n,t))},t.prototype.set=function(n,t,i){if(i)this.values_[n]=t;else{var r=this.values_[n];this.values_[n]=t;r!==t&&this.notify(n,r)}},t.prototype.setProperties=function(n,t){for(var i in n)this.set(i,n[i],t)},t.prototype.unset=function(n,t){if(n in this.values_){var i=this.values_[n];delete this.values_[n];t||this.notify(n,i)}},t}(kk),rut="length",gy=function(n){function t(t,i){n.call(this,t);this.element=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),er=function(n){function t(t,i){var u,r,f;if(n.call(this),u=i||{},this.unique_=!!u.unique,this.array_=t||[],this.unique_)for(r=0,f=this.array_.length;r<f;++r)this.assertUnique_(this.array_[r],r);this.updateLength_()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},t.prototype.extend=function(n){for(var t=0,i=n.length;t<i;++t)this.push(n[t]);return this},t.prototype.forEach=function(n){for(var i=this.array_,t=0,r=i.length;t<r;++t)n(i[t],t,i)},t.prototype.getArray=function(){return this.array_},t.prototype.item=function(n){return this.array_[n]},t.prototype.getLength=function(){return this.get(rut)},t.prototype.insertAt=function(n,t){this.unique_&&this.assertUnique_(t);this.array_.splice(n,0,t);this.updateLength_();this.dispatchEvent(new gy(ki.ADD,t))},t.prototype.pop=function(){return this.removeAt(this.getLength()-1)},t.prototype.push=function(n){this.unique_&&this.assertUnique_(n);var t=this.getLength();return this.insertAt(t,n),this.getLength()},t.prototype.remove=function(n){for(var i=this.array_,t=0,r=i.length;t<r;++t)if(i[t]===n)return this.removeAt(t)},t.prototype.removeAt=function(n){var t=this.array_[n];return this.array_.splice(n,1),this.updateLength_(),this.dispatchEvent(new gy(ki.REMOVE,t)),t},t.prototype.setAt=function(n,t){var r=this.getLength(),u,i;if(n<r)this.unique_&&this.assertUnique_(t,n),u=this.array_[n],this.array_[n]=t,this.dispatchEvent(new gy(ki.REMOVE,u)),this.dispatchEvent(new gy(ki.ADD,t));else{for(i=r;i<n;++i)this.insertAt(i,void 0);this.insertAt(n,t)}},t.prototype.updateLength_=function(){this.set(rut,this.array_.length)},t.prototype.assertUnique_=function(n,t){for(var i=0,r=this.array_.length;i<r;++i)if(this.array_[i]===n&&i!==t)throw new krt(58);},t}(rf);fi=function(n){function t(t){var i,r;(n.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,o(this,ni(this.geometryName_),this.handleGeometryChanged_,this),t)&&("function"==typeof t.getSimplifiedGeometry?(i=t,this.setGeometry(i)):(r=t,this.setProperties(r)))}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){var n=new t(this.getProperties()),i,r;return n.setGeometryName(this.getGeometryName()),i=this.getGeometry(),i&&n.setGeometry(i.clone()),r=this.getStyle(),r&&n.setStyle(r),n},t.prototype.getGeometry=function(){return this.get(this.geometryName_)},t.prototype.getId=function(){return this.id_},t.prototype.getGeometryName=function(){return this.geometryName_},t.prototype.getStyle=function(){return this.style_},t.prototype.getStyleFunction=function(){return this.styleFunction_},t.prototype.handleGeometryChange_=function(){this.changed()},t.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(lt(this.geometryChangeKey_),this.geometryChangeKey_=null);var n=this.getGeometry();n&&(this.geometryChangeKey_=o(n,a.CHANGE,this.handleGeometryChange_,this));this.changed()},t.prototype.setGeometry=function(n){this.set(this.geometryName_,n)},t.prototype.setStyle=function(n){this.style_=n;this.styleFunction_=n?function(n){var t,i;return"function"==typeof n?n:(Array.isArray(n)?t=n:(g("function"==typeof n.getZIndex,41),i=n,t=[i]),function(){return t})}(n):void 0;this.changed()},t.prototype.setId=function(n){this.id_=n;this.changed()},t.prototype.setGeometryName=function(n){ou(this,ni(this.geometryName_),this.handleGeometryChanged_,this);this.geometryName_=n;o(this,ni(this.geometryName_),this.handleGeometryChanged_,this);this.handleGeometryChanged_()},t}(rf);vc={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};ir={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};v={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};f={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"};hut="cosh"in Math?Math.cosh:function(n){var t=Math.exp(n);return(t+1/t)/2};aa=6371008.8;pc={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};gf={};gf[pc.DEGREES]=12741994*Math.PI/360;gf[pc.FEET]=.3048;gf[pc.METERS]=1;gf[pc.USFEET]=1200/3937;pr=pc;ar=function(n){this.code_=n.code;this.units_=n.units;this.extent_=void 0!==n.extent?n.extent:null;this.worldExtent_=void 0!==n.worldExtent?n.worldExtent:null;this.axisOrientation_=void 0!==n.axisOrientation?n.axisOrientation:"enu";this.global_=void 0!==n.global&&n.global;this.canWrapX_=!(!this.global_||!this.extent_);this.getPointResolutionFunc_=n.getPointResolution;this.defaultTileGrid_=null;this.metersPerUnit_=n.metersPerUnit};ar.prototype.canWrapX=function(){return this.canWrapX_};ar.prototype.getCode=function(){return this.code_};ar.prototype.getExtent=function(){return this.extent_};ar.prototype.getUnits=function(){return this.units_};ar.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||gf[this.units_]};ar.prototype.getWorldExtent=function(){return this.worldExtent_};ar.prototype.getAxisOrientation=function(){return this.axisOrientation_};ar.prototype.isGlobal=function(){return this.global_};ar.prototype.setGlobal=function(n){this.global_=n;this.canWrapX_=!(!n||!this.extent_)};ar.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_};ar.prototype.setDefaultTileGrid=function(n){this.defaultTileGrid_=n};ar.prototype.setExtent=function(n){this.extent_=n;this.canWrapX_=!(!this.global_||!n)};ar.prototype.setWorldExtent=function(n){this.worldExtent_=n};ar.prototype.setGetPointResolution=function(n){this.getPointResolutionFunc_=n};ar.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var va=ar,sp=6378137,wc=Math.PI*sp,hbt=[-wc,-wc,wc,wc],cbt=[-180,-85,180,85],sh=function(n){function t(t){n.call(this,{code:t,units:pr.METERS,extent:hbt,global:!0,worldExtent:cbt,getPointResolution:function(n,t){return n/hut(t[1]/sp)}})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(va),aut=[new sh("EPSG:3857"),new sh("EPSG:102100"),new sh("EPSG:102113"),new sh("EPSG:900913"),new sh("urn:ogc:def:crs:EPSG:6.18:3:3857"),new sh("urn:ogc:def:crs:EPSG::3857"),new sh("http://www.opengis.net/gml/srs/epsg.xml#3857")];var vut=[-180,-90,180,90],vbt=6378137*Math.PI/180,po=function(n){function t(t,i){n.call(this,{code:t,units:pr.DEGREES,extent:vut,axisOrientation:i,global:!0,metersPerUnit:vbt,worldExtent:vut})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(va),yut=[new po("CRS:84"),new po("EPSG:4326","neu"),new po("urn:ogc:def:crs:EPSG::4326","neu"),new po("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new po("urn:ogc:def:crs:OGC:1.3:CRS84"),new po("urn:ogc:def:crs:OGC:2:84"),new po("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new po("urn:x-ogc:def:crs:EPSG:4326","neu")],put={},bc={};cp(aut);cp(yut),function(n,t,i,r){n.forEach(function(n){t.forEach(function(t){kc(n,t,i);kc(t,n,r)})})}(yut,aut,lbt,abt);lp=new Array(6);ed=[1,0,0,1,0,0];yp=function(n){function t(){n.call(this);this.extent_=[1/0,1/0,-1/0,-1/0];this.extentRevision_=-1;this.simplifiedGeometryCache={};this.simplifiedGeometryMaxMinSquaredTolerance=0;this.simplifiedGeometryRevision=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return p()},t.prototype.closestPointXY=function(){return p()},t.prototype.containsXY=function(){return!1},t.prototype.getClosestPoint=function(n,t){var i=t||[NaN,NaN];return this.closestPointXY(n[0],n[1],i,1/0),i},t.prototype.intersectsCoordinate=function(n){return this.containsXY(n[0],n[1])},t.prototype.computeExtent=function(){return p()},t.prototype.getExtent=function(n){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),function(n,t){return t?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t):n}(this.extent_,n)},t.prototype.rotate=function(){p()},t.prototype.scale=function(){p()},t.prototype.simplify=function(n){return this.getSimplifiedGeometry(n*n)},t.prototype.getSimplifiedGeometry=function(){return p()},t.prototype.getType=function(){return p()},t.prototype.applyTransform=function(){p()},t.prototype.intersectsExtent=function(){return p()},t.prototype.translate=function(){p()},t.prototype.transform=function(n,t){var i=w(n),r=i.getUnits()==pr.TILE_PIXELS?function(n,r,u){var o=i.getExtent(),f=i.getWorldExtent(),e=ti(f)/ti(o);return cu(ed,f[0],f[3],e,-e,0,0,0),vo(n,0,n.length,u,ed,r),he(i,t)(n,r,u)}:he(i,t);return this.applyTransform(r),this},t}(rf);ce=function(n){function t(){n.call(this);this.layout=v.XY;this.stride=2;this.flatCoordinates=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.computeExtent=function(n){return td(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,n)},t.prototype.getCoordinates=function(){return p()},t.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t.prototype.getLayout=function(){return this.layout},t.prototype.getSimplifiedGeometry=function(n){var t,i;return(this.simplifiedGeometryRevision!=this.getRevision()&&(pf(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),n<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&n<=this.simplifiedGeometryMaxMinSquaredTolerance)?this:(t=n.toString(),this.simplifiedGeometryCache.hasOwnProperty(t))?this.simplifiedGeometryCache[t]:(i=this.getSimplifiedGeometryInternal(n),i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[t]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=n,this))},t.prototype.getSimplifiedGeometryInternal=function(){return this},t.prototype.getStride=function(){return this.stride},t.prototype.setFlatCoordinates=function(n,t){this.stride=od(n);this.layout=n;this.flatCoordinates=t},t.prototype.setCoordinates=function(){p()},t.prototype.setLayout=function(n,t,i){var r,u;if(n)r=od(n);else{for(u=0;u<i;++u){if(0===t.length)return this.layout=v.XY,void(this.stride=2);t=t[0]}n=function(n){var t;return 2==n?t=v.XY:3==n?t=v.XYZ:4==n&&(t=v.XYZM),t}(r=t.length)}this.layout=n;this.stride=r},t.prototype.applyTransform=function(n){this.flatCoordinates&&(n(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},t.prototype.rotate=function(n,t){var i=this.getFlatCoordinates(),r;i&&(r=this.getStride(),!function(n,t,i,r,u,f,e){for(var l,a,c,s=e||[],v=Math.cos(u),y=Math.sin(u),p=f[0],w=f[1],h=0,o=t;o<i;o+=r)for(l=n[o]-p,a=n[o+1]-w,s[h++]=p+l*v-a*y,s[h++]=w+l*y+a*v,c=o+2;c<o+r;++c)s[h++]=n[c];e&&s.length!=h&&(s.length=h)}(i,0,i.length,r,n,t,i),this.changed())},t.prototype.scale=function(n,t,i){var f=t,u,r,e;void 0===f&&(f=n);u=i;u||(u=su(this.getExtent()));r=this.getFlatCoordinates();r&&(e=this.getStride(),!function(n,t,i,r,u,f,e,o){for(var y,p,l,h=o||[],a=e[0],v=e[1],c=0,s=t;s<i;s+=r)for(y=n[s]-a,p=n[s+1]-v,h[c++]=a+u*y,h[c++]=v+f*p,l=s+2;l<s+r;++l)h[c++]=n[l];o&&h.length!=c&&(h.length=c)}(r,0,r.length,e,n,f,u,r),this.changed())},t.prototype.translate=function(n,t){var i=this.getFlatCoordinates(),r;i&&(r=this.getStride(),yo(i,0,i.length,r,n,t,i),this.changed())},t}(yp);lh=function(n){function t(t,i){n.call(this);this.maxDelta_=-1;this.maxDeltaRevision_=-1;void 0===i||Array.isArray(t[0])?this.setCoordinates(t,i):this.setFlatCoordinates(i,t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(n,t,i,r){return r<ih(this.getExtent(),n,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(hd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ld(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,n,t,i,r))},t.prototype.getArea=function(){return sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getCoordinates=function(){return gc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getSimplifiedGeometryInternal=function(n){var i=[];return i.length=yd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,n,i,0),new t(i,v.XY)},t.prototype.getType=function(){return f.LINEAR_RING},t.prototype.intersectsExtent=function(){return!1},t.prototype.setCoordinates=function(n,t){this.setLayout(t,n,1);this.flatCoordinates||(this.flatCoordinates=[]);this.flatCoordinates.length=pa(this.flatCoordinates,0,n,this.stride);this.changed()},t}(ce);ei=function(n){function t(t,i){n.call(this);this.setCoordinates(t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(n,t,i,r){var f=this.flatCoordinates,o=oh(n,t,f[0],f[1]),e,u;if(o<r){for(e=this.stride,u=0;u<e;++u)i[u]=f[u];return i.length=e,o}return r},t.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},t.prototype.computeExtent=function(n){return uh(this.flatCoordinates,n)},t.prototype.getType=function(){return f.POINT},t.prototype.intersectsExtent=function(n){return ip(n,this.flatCoordinates[0],this.flatCoordinates[1])},t.prototype.setCoordinates=function(n,t){this.setLayout(t,n,0);this.flatCoordinates||(this.flatCoordinates=[]);this.flatCoordinates.length=rft(this.flatCoordinates,0,n,this.stride);this.changed()},t}(ce);wa=function(n){function t(t,i,r){n.call(this);this.ends_=[];this.flatInteriorPointRevision_=-1;this.flatInteriorPoint_=null;this.maxDelta_=-1;this.maxDeltaRevision_=-1;this.orientedRevision_=-1;this.orientedFlatCoordinates_=null;void 0!==i&&r?(this.setFlatCoordinates(i,t),this.ends_=r):this.setCoordinates(t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.appendLinearRing=function(n){this.flatCoordinates?pt(this.flatCoordinates,n.getFlatCoordinates()):this.flatCoordinates=n.getFlatCoordinates().slice();this.ends_.push(this.flatCoordinates.length);this.changed()},t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},t.prototype.closestPointXY=function(n,t,i,r){return r<ih(this.getExtent(),n,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(cd(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ad(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,n,t,i,r))},t.prototype.containsXY=function(n,t){return pd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,n,t)},t.prototype.getArea=function(){return tft(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},t.prototype.getCoordinates=function(n){var t;return void 0!==n?bd(t=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,n):t=this.flatCoordinates,pp(t,0,this.ends_,this.stride)},t.prototype.getEnds=function(){return this.ends_},t.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var n=su(this.getExtent());this.flatInteriorPoint_=wd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,n,0);this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},t.prototype.getInteriorPoint=function(){return new ei(this.getFlatInteriorPoint(),v.XYM)},t.prototype.getLinearRingCount=function(){return this.ends_.length},t.prototype.getLinearRing=function(n){return n<0||this.ends_.length<=n?null:new lh(this.flatCoordinates.slice(0===n?0:this.ends_[n-1],this.ends_[n]),this.layout)},t.prototype.getLinearRings=function(){for(var t,f,e=this.layout,o=this.flatCoordinates,i=this.ends_,r=[],u=0,n=0,s=i.length;n<s;++n)t=i[n],f=new lh(o.slice(u,t),e),r.push(f),u=t;return r},t.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var n=this.flatCoordinates;hft(n,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=n:(this.orientedFlatCoordinates_=n.slice(),this.orientedFlatCoordinates_.length=bd(this.orientedFlatCoordinates_,0,this.ends_,this.stride));this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t.prototype.getSimplifiedGeometryInternal=function(n){var i=[],r=[];return i.length=fft(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(n),i,0,r),new t(i,v.XY,r)},t.prototype.getType=function(){return f.POLYGON},t.prototype.intersectsExtent=function(n){return sft(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,n)},t.prototype.setCoordinates=function(n,t){this.setLayout(t,n,2);this.flatCoordinates||(this.flatCoordinates=[]);var i=vd(this.flatCoordinates,0,n,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1];this.changed()},t}(ce);or=wa;var nl="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",kbt=-1!==nl.indexOf("firefox"),dbt=-1!==nl.indexOf("safari")&&-1==nl.indexOf("chrom"),gbt=-1!==nl.indexOf("webkit")&&-1==nl.indexOf("edge"),vft=-1!==nl.indexOf("macintosh"),tl=window.devicePixelRatio||1,il=function(){var n=!1;try{n=!!document.createElement("canvas").getContext("2d").setLineDash}catch(n){}return n}(),yft="geolocation"in navigator,dd="ontouchstart"in window,nkt="PointerEvent"in window,tkt=!!navigator.msPointerEnabled,ci={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},ikt=function(n){function t(t){n.call(this,a.ERROR);this.code=t.code;this.message=t.message}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),rkt=function(n){function t(t){n.call(this);var i=t||{};this.position_=null;this.transform_=ud;this.watchId_=void 0;o(this,ni(ci.PROJECTION),this.handleProjectionChanged_,this);o(this,ni(ci.TRACKING),this.handleTrackingChanged_,this);void 0!==i.projection&&this.setProjection(i.projection);void 0!==i.trackingOptions&&this.setTrackingOptions(i.trackingOptions);this.setTracking(void 0!==i.tracking&&i.tracking)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.setTracking(!1);n.prototype.disposeInternal.call(this)},t.prototype.handleProjectionChanged_=function(){var n=this.getProjection();n&&(this.transform_=wo(w("EPSG:4326"),n),this.position_&&this.set(ci.POSITION,this.transform_(this.position_)))},t.prototype.handleTrackingChanged_=function(){if(yft){var n=this.getTracking();n&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):n||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},t.prototype.positionChange_=function(n){var t=n.coords,r,i;this.set(ci.ACCURACY,t.accuracy);this.set(ci.ALTITUDE,null===t.altitude?void 0:t.altitude);this.set(ci.ALTITUDE_ACCURACY,null===t.altitudeAccuracy?void 0:t.altitudeAccuracy);this.set(ci.HEADING,null===t.heading?void 0:kf(t.heading));this.position_?(this.position_[0]=t.longitude,this.position_[1]=t.latitude):this.position_=[t.longitude,t.latitude];r=this.transform_(this.position_);this.set(ci.POSITION,r);this.set(ci.SPEED,null===t.speed?void 0:t.speed);i=lft(this.position_,t.accuracy);i.applyTransform(this.transform_);this.set(ci.ACCURACY_GEOMETRY,i);this.changed()},t.prototype.positionError_=function(n){this.setTracking(!1);this.dispatchEvent(new ikt(n))},t.prototype.getAccuracy=function(){return this.get(ci.ACCURACY)},t.prototype.getAccuracyGeometry=function(){return this.get(ci.ACCURACY_GEOMETRY)||null},t.prototype.getAltitude=function(){return this.get(ci.ALTITUDE)},t.prototype.getAltitudeAccuracy=function(){return this.get(ci.ALTITUDE_ACCURACY)},t.prototype.getHeading=function(){return this.get(ci.HEADING)},t.prototype.getPosition=function(){return this.get(ci.POSITION)},t.prototype.getProjection=function(){return this.get(ci.PROJECTION)},t.prototype.getSpeed=function(){return this.get(ci.SPEED)},t.prototype.getTracking=function(){return this.get(ci.TRACKING)},t.prototype.getTrackingOptions=function(){return this.get(ci.TRACKING_OPTIONS)},t.prototype.setProjection=function(n){this.set(ci.PROJECTION,w(n))},t.prototype.setTracking=function(n){this.set(ci.TRACKING,n)},t.prototype.setTrackingOptions=function(n){this.set(ci.TRACKING_OPTIONS,n)},t}(rf);yi=function(n){function t(t,i){n.call(this);this.flatMidpoint_=null;this.flatMidpointRevision_=-1;this.maxDelta_=-1;this.maxDeltaRevision_=-1;void 0===i||Array.isArray(t[0])?this.setCoordinates(t,i):this.setFlatCoordinates(i,t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.appendCoordinate=function(n){this.flatCoordinates?pt(this.flatCoordinates,n):this.flatCoordinates=n.slice();this.changed()},t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(n,t,i,r){return r<ih(this.getExtent(),n,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(hd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ld(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,n,t,i,r))},t.prototype.forEachSegment=function(n){return oft(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,n)},t.prototype.getCoordinateAtM=function(n,t){if(this.layout!=v.XYM&&this.layout!=v.XYZM)return null;var i=void 0!==t&&t;return ng(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,n,i)},t.prototype.getCoordinates=function(){return gc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getCoordinateAt=function(n,t){return gp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,n,t)},t.prototype.getLength=function(){return kft(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},t.prototype.getSimplifiedGeometryInternal=function(n){var i=[];return i.length=yd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,n,i,0),new t(i,v.XY)},t.prototype.getType=function(){return f.LINE_STRING},t.prototype.intersectsExtent=function(n){return wp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,n)},t.prototype.setCoordinates=function(n,t){this.setLayout(t,n,1);this.flatCoordinates||(this.flatCoordinates=[]);this.flatCoordinates.length=pa(this.flatCoordinates,0,n,this.stride);this.changed()},t}(ce);var gr={POSTCOMPOSE:"postcompose",PRECOMPOSE:"precompose",RENDER:"render",RENDERCOMPLETE:"rendercomplete"},ukt=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,fkt=/^([a-z]*)$/i;gft=function(){var n={},t=0;return function(i){var r,u,f;if(n.hasOwnProperty(i))r=n[i];else{if(t>=1024){u=0;for(f in n)0==(3&u++)&&(delete n[f],--t)}r=function(n){var i,r,u,f,e,t,o,s;return fkt.exec(n)&&(n=function(n){var t=document.createElement("div"),i;return(t.style.color=n,""!==t.style.color)?(document.body.appendChild(t),i=getComputedStyle(t).color,document.body.removeChild(t),i):""}(n)),ukt.exec(n)?(o=n.length-1,t=o<=4?1:2,s=4===o||8===o,i=parseInt(n.substr(1+0*t,t),16),r=parseInt(n.substr(1+1*t,t),16),u=parseInt(n.substr(1+2*t,t),16),f=s?parseInt(n.substr(1+3*t,t),16):255,1==t&&(i=(i<<4)+i,r=(r<<4)+r,u=(u<<4)+u,s&&(f=(f<<4)+f)),e=[i,r,u,f/255]):0==n.indexOf("rgba(")?net(e=n.slice(5,-1).split(",").map(Number)):0==n.indexOf("rgb(")?((e=n.slice(4,-1).split(",").map(Number)).push(1),net(e)):g(!1,14),e}(i);n[i]=r;++t}return r}}();ph=function(n){var t=n||{};this.color_=void 0!==t.color?t.color:null;this.checksum_=void 0};ph.prototype.clone=function(){var n=this.getColor();return new ph({color:Array.isArray(n)?n.slice():n||void 0})};ph.prototype.getColor=function(){return this.color_};ph.prototype.setColor=function(n){this.color_=n;this.checksum_=void 0};ph.prototype.getChecksum=function(){if(void 0===this.checksum_){var n=this.color_;this.checksum_=n?Array.isArray(n)||"string"==typeof n?"f"+vh(n):y(this.color_):"f-"}return this.checksum_};te=ph;rr=function(n){var t=n||{};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;this.checksum_=void 0};rr.prototype.clone=function(){var n=this.getColor();return new rr({color:Array.isArray(n)?n.slice():n||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()})};rr.prototype.getColor=function(){return this.color_};rr.prototype.getLineCap=function(){return this.lineCap_};rr.prototype.getLineDash=function(){return this.lineDash_};rr.prototype.getLineDashOffset=function(){return this.lineDashOffset_};rr.prototype.getLineJoin=function(){return this.lineJoin_};rr.prototype.getMiterLimit=function(){return this.miterLimit_};rr.prototype.getWidth=function(){return this.width_};rr.prototype.setColor=function(n){this.color_=n;this.checksum_=void 0};rr.prototype.setLineCap=function(n){this.lineCap_=n;this.checksum_=void 0};rr.prototype.setLineDash=function(n){this.lineDash_=n;this.checksum_=void 0};rr.prototype.setLineDashOffset=function(n){this.lineDashOffset_=n;this.checksum_=void 0};rr.prototype.setLineJoin=function(n){this.lineJoin_=n;this.checksum_=void 0};rr.prototype.setMiterLimit=function(n){this.miterLimit_=n;this.checksum_=void 0};rr.prototype.setWidth=function(n){this.width_=n;this.checksum_=void 0};rr.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.checksum_+=this.color_?"string"==typeof this.color_?this.color_:y(this.color_):"-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_};var hf=rr,ekt="point",okt="line",at=function(n){var t=n||{};this.font_=t.font;this.rotation_=t.rotation;this.rotateWithView_=t.rotateWithView;this.scale_=t.scale;this.text_=t.text;this.textAlign_=t.textAlign;this.textBaseline_=t.textBaseline;this.fill_=void 0!==t.fill?t.fill:new te({color:"#333"});this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4;this.placement_=void 0!==t.placement?t.placement:ekt;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};at.prototype.clone=function(){return new at({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().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})};at.prototype.getOverflow=function(){return this.overflow_};at.prototype.getFont=function(){return this.font_};at.prototype.getMaxAngle=function(){return this.maxAngle_};at.prototype.getPlacement=function(){return this.placement_};at.prototype.getOffsetX=function(){return this.offsetX_};at.prototype.getOffsetY=function(){return this.offsetY_};at.prototype.getFill=function(){return this.fill_};at.prototype.getRotateWithView=function(){return this.rotateWithView_};at.prototype.getRotation=function(){return this.rotation_};at.prototype.getScale=function(){return this.scale_};at.prototype.getStroke=function(){return this.stroke_};at.prototype.getText=function(){return this.text_};at.prototype.getTextAlign=function(){return this.textAlign_};at.prototype.getTextBaseline=function(){return this.textBaseline_};at.prototype.getBackgroundFill=function(){return this.backgroundFill_};at.prototype.getBackgroundStroke=function(){return this.backgroundStroke_};at.prototype.getPadding=function(){return this.padding_};at.prototype.setOverflow=function(n){this.overflow_=n};at.prototype.setFont=function(n){this.font_=n};at.prototype.setMaxAngle=function(n){this.maxAngle_=n};at.prototype.setOffsetX=function(n){this.offsetX_=n};at.prototype.setOffsetY=function(n){this.offsetY_=n};at.prototype.setPlacement=function(n){this.placement_=n};at.prototype.setFill=function(n){this.fill_=n};at.prototype.setRotation=function(n){this.rotation_=n};at.prototype.setScale=function(n){this.scale_=n};at.prototype.setStroke=function(n){this.stroke_=n};at.prototype.setText=function(n){this.text_=n};at.prototype.setTextAlign=function(n){this.textAlign_=n};at.prototype.setTextBaseline=function(n){this.textBaseline_=n};at.prototype.setBackgroundFill=function(n){this.backgroundFill_=n};at.prototype.setBackgroundStroke=function(n){this.backgroundStroke_=n};at.prototype.setPadding=function(n){this.padding_=n};var nv=at,skt=new hf({color:"rgba(0,0,0,0.2)"}),hkt=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],nu=function(n){var t=n||{};this.map_=null;this.postcomposeListenerKey_=null;this.projection_=null;this.maxLat_=1/0;this.maxLon_=1/0;this.minLat_=-1/0;this.minLon_=-1/0;this.maxLatP_=1/0;this.maxLonP_=1/0;this.minLatP_=-1/0;this.minLonP_=-1/0;this.targetSize_=void 0!==t.targetSize?t.targetSize:100;this.maxLines_=void 0!==t.maxLines?t.maxLines:100;this.meridians_=[];this.parallels_=[];this.strokeStyle_=void 0!==t.strokeStyle?t.strokeStyle:skt;this.fromLonLatTransform_=void 0;this.toLonLatTransform_=void 0;this.projectionCenterLonLat_=null;this.meridiansLabels_=null;this.parallelsLabels_=null;1==t.showLabels&&(this.lonLabelFormatter_=void 0==t.lonLabelFormatter?kp.bind(this,"EW"):t.lonLabelFormatter,this.latLabelFormatter_=void 0==t.latLabelFormatter?kp.bind(this,"NS"):t.latLabelFormatter,this.lonLabelPosition_=void 0==t.lonLabelPosition?0:t.lonLabelPosition,this.latLabelPosition_=void 0==t.latLabelPosition?1:t.latLabelPosition,this.lonLabelStyle_=void 0!==t.lonLabelStyle?t.lonLabelStyle:new nv({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new te({color:"rgba(0,0,0,1)"}),stroke:new hf({color:"rgba(255,255,255,1)",width:3})}),this.latLabelStyle_=void 0!==t.latLabelStyle?t.latLabelStyle:new nv({font:"12px Calibri,sans-serif",textAlign:"end",fill:new te({color:"rgba(0,0,0,1)"}),stroke:new hf({color:"rgba(255,255,255,1)",width:3})}),this.meridiansLabels_=[],this.parallelsLabels_=[]);this.intervals_=void 0!==t.intervals?t.intervals:hkt;this.setMap(void 0!==t.map?t.map:null)};nu.prototype.addMeridian_=function(n,t,i,r,u,f){var e=this.getMeridian_(n,t,i,r,f),o;return dt(e.getExtent(),u)&&(this.meridiansLabels_&&(o=this.getMeridianPoint_(e,u,f),this.meridiansLabels_[f]={geom:o,text:this.lonLabelFormatter_(n)}),this.meridians_[f++]=e),f};nu.prototype.getMeridianPoint_=function(n,t,i){var u,r=n.getFlatCoordinates(),e=Math.max(t[1],r[1]),o=Math.min(t[3],r[r.length-1]),s=vi(t[1]+Math.abs(t[1]-t[3])*this.lonLabelPosition_,e,o),f=[r[0],s];return i in this.meridiansLabels_?(u=this.meridiansLabels_[i].geom).setCoordinates(f):u=new ei(f),u};nu.prototype.addParallel_=function(n,t,i,r,u,f){var e=this.getParallel_(n,t,i,r,f),o;return dt(e.getExtent(),u)&&(this.parallelsLabels_&&(o=this.getParallelPoint_(e,u,f),this.parallelsLabels_[f]={geom:o,text:this.latLabelFormatter_(n)}),this.parallels_[f++]=e),f};nu.prototype.getParallelPoint_=function(n,t,i){var u,r=n.getFlatCoordinates(),e=Math.max(t[0],r[0]),o=Math.min(t[2],r[r.length-2]),f=[vi(t[0]+Math.abs(t[0]-t[2])*this.latLabelPosition_,e,o),r[1]];return i in this.parallelsLabels_?(u=this.parallelsLabels_[i].geom).setCoordinates(f):u=new ei(f),u};nu.prototype.createGraticule_=function(n,t,i,r){var o=this.getInterval_(i);if(-1==o)return this.meridians_.length=this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var s,u,f,e,b=this.toLonLatTransform_(t),l=b[0],a=b[1],c=this.maxLines_,h=[Math.max(n[0],this.minLonP_),Math.max(n[1],this.minLatP_),Math.min(n[2],this.maxLonP_),Math.min(n[3],this.maxLatP_)],v=(h=bo(h,this.projection_,"EPSG:4326"))[3],y=h[2],p=h[1],w=h[0];for(e=vi(l=Math.floor(l/o)*o,this.minLon_,this.maxLon_),u=this.addMeridian_(e,p,v,r,n,0),s=0;e!=this.minLon_&&s++<c;)e=Math.max(e-o,this.minLon_),u=this.addMeridian_(e,p,v,r,n,u);for(e=vi(l,this.minLon_,this.maxLon_),s=0;e!=this.maxLon_&&s++<c;)e=Math.min(e+o,this.maxLon_),u=this.addMeridian_(e,p,v,r,n,u);for(this.meridians_.length=u,this.meridiansLabels_&&(this.meridiansLabels_.length=u),f=vi(a=Math.floor(a/o)*o,this.minLat_,this.maxLat_),u=this.addParallel_(f,w,y,r,n,0),s=0;f!=this.minLat_&&s++<c;)f=Math.max(f-o,this.minLat_),u=this.addParallel_(f,w,y,r,n,u);for(f=vi(a,this.minLat_,this.maxLat_),s=0;f!=this.maxLat_&&s++<c;)f=Math.min(f+o,this.maxLat_),u=this.addParallel_(f,w,y,r,n,u);this.parallels_.length=u;this.parallelsLabels_&&(this.parallelsLabels_.length=u)};nu.prototype.getInterval_=function(n){for(var r,f=this.projectionCenterLonLat_[0],e=this.projectionCenterLonLat_[1],o=-1,s=Math.pow(this.targetSize_*n,2),t=[],i=[],u=0,h=this.intervals_.length;u<h;++u){if(r=this.intervals_[u]/2,t[0]=f-r,t[1]=e-r,i[0]=f+r,i[1]=e+r,this.fromLonLatTransform_(t,t),this.fromLonLatTransform_(i,i),Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2)<=s)break;o=this.intervals_[u]}return o};nu.prototype.getMap=function(){return this.map_};nu.prototype.getMeridian_=function(n,t,i,r,u){var e=function(n,t,i,r,u){return dft(function(r){return[n,t+(i-t)*r]},he(w("EPSG:4326"),r),u)}(n,t,i,this.projection_,r),f=this.meridians_[u];return f?(f.setFlatCoordinates(v.XY,e),f.changed()):f=this.meridians_[u]=new yi(e,v.XY),f};nu.prototype.getMeridians=function(){return this.meridians_};nu.prototype.getParallel_=function(n,t,i,r,u){var e=function(n,t,i,r,u){return dft(function(r){return[t+(i-t)*r,n]},he(w("EPSG:4326"),r),u)}(n,t,i,this.projection_,r),f=this.parallels_[u];return f?(f.setFlatCoordinates(v.XY,e),f.changed()):f=new yi(e,v.XY),f};nu.prototype.getParallels=function(){return this.parallels_};nu.prototype.handlePostCompose_=function(n){var t,i,f,u,r=n.vectorContext,e=n.frameState,l=e.extent,o=e.viewState,a=o.center,h=o.projection,s=o.resolution,c=e.pixelRatio,v=s*s/(4*c*c);for((!this.projection_||!hu(this.projection_,h))&&this.updateProjectionInfo_(h),this.createGraticule_(l,a,s,v),r.setFillStrokeStyle(null,this.strokeStyle_),t=0,i=this.meridians_.length;t<i;++t)f=this.meridians_[t],r.drawGeometry(f);for(t=0,i=this.parallels_.length;t<i;++t)f=this.parallels_[t],r.drawGeometry(f);if(this.meridiansLabels_)for(t=0,i=this.meridiansLabels_.length;t<i;++t)u=this.meridiansLabels_[t],this.lonLabelStyle_.setText(u.text),r.setTextStyle(this.lonLabelStyle_),r.drawGeometry(u.geom);if(this.parallelsLabels_)for(t=0,i=this.parallelsLabels_.length;t<i;++t)u=this.parallelsLabels_[t],this.latLabelStyle_.setText(u.text),r.setTextStyle(this.latLabelStyle_),r.drawGeometry(u.geom)};nu.prototype.updateProjectionInfo_=function(n){var r=w("EPSG:4326"),t=n.getWorldExtent(),i=bo(t,r,n);this.maxLat_=t[3];this.maxLon_=t[2];this.minLat_=t[1];this.minLon_=t[0];this.maxLatP_=i[3];this.maxLonP_=i[2];this.minLatP_=i[1];this.minLonP_=i[0];this.fromLonLatTransform_=he(r,n);this.toLonLatTransform_=he(n,r);this.projectionCenterLonLat_=this.toLonLatTransform_(su(n.getExtent()));this.projection_=n};nu.prototype.setMap=function(n){this.map_&&(lt(this.postcomposeListenerKey_),this.postcomposeListenerKey_=null,this.map_.render());n&&(this.postcomposeListenerKey_=o(n,gr.POSTCOMPOSE,this.handlePostCompose_,this),n.render());this.map_=n};iet=nu;wh=function(n,t,i){this.decay_=n;this.minVelocity_=t;this.delay_=i;this.points_=[];this.angle_=0;this.initialVelocity_=0};wh.prototype.begin=function(){this.points_.length=0;this.angle_=0;this.initialVelocity_=0};wh.prototype.update=function(n,t){this.points_.push(n,t,Date.now())};wh.prototype.end=function(){var u,t,n,f,i,r;if(this.points_.length<6||(u=Date.now()-this.delay_,t=this.points_.length-3,this.points_[t+2]<u))return!1;for(n=t-3;n>0&&this.points_[n+2]>u;)n-=3;return(f=this.points_[t+2]-this.points_[n+2],f<1e3/60)?!1:(i=this.points_[t]-this.points_[n],r=this.points_[t+1]-this.points_[n+1],this.angle_=Math.atan2(r,i),this.initialVelocity_=Math.sqrt(i*i+r*r)/f,this.initialVelocity_>this.minVelocity_)};wh.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_};wh.prototype.getAngle=function(){return this.angle_};var ret=wh,nw=function(n){function t(t,i,r){n.call(this,t);this.map=i;this.frameState=void 0!==r?r:null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),uet=function(n){function t(t,i,r,u,f){n.call(this,t,i,f);this.originalEvent=r;this.pixel=i.getEventPixel(r);this.coordinate=i.getCoordinateFromPixel(this.pixel);this.dragging=void 0!==u&&u}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.preventDefault=function(){n.prototype.preventDefault.call(this);this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){n.prototype.stopPropagation.call(this);this.originalEvent.stopPropagation()},t}(nw),ht={SINGLECLICK:"singleclick",CLICK:a.CLICK,DBLCLICK:a.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},ts=function(n){function t(t,i,r,u,f){n.call(this,t,i,r.originalEvent,u,f);this.pointerEvent=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(uet),tu={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},tg=function(n,t){this.dispatcher=n;this.mapping_=t};tg.prototype.getEvents=function(){return Object.keys(this.mapping_)};tg.prototype.getHandlerForEvent=function(n){return this.mapping_[n]};var tw=tg,bh=1,fet="mouse";eet=function(n){function t(t){var i={mousedown:ckt,mousemove:lkt,mouseup:akt,mouseover:vkt,mouseout:ykt};n.call(this,t,i);this.pointerMap=t.pointerMap;this.lastTouches=[]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isEventSimulatedFromTouch_=function(n){for(var u,f,r=this.lastTouches,e=n.clientX,o=n.clientY,t=0,s=r.length,i=void 0;t<s&&(i=r[t]);t++)if(u=Math.abs(e-i[0]),f=Math.abs(o-i[1]),u<=25&&f<=25)return!0;return!1},t.prototype.cancel=function(n){var t=kh(n,this.dispatcher);this.dispatcher.cancel(t,n);this.cleanupMouse()},t.prototype.cleanupMouse=function(){delete this.pointerMap[bh.toString()]},t}(tw);oet=["","unavailable","touch","pen","mouse"];set=function(n){function t(t){var i={MSPointerDown:pkt,MSPointerMove:wkt,MSPointerUp:bkt,MSPointerOut:kkt,MSPointerOver:dkt,MSPointerCancel:gkt,MSGotPointerCapture:tdt,MSLostPointerCapture:ndt};n.call(this,t,i);this.pointerMap=t.pointerMap}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.prepareEvent_=function(n){var t=n;return"number"==typeof n.pointerType&&((t=this.dispatcher.cloneEvent(n,n)).pointerType=oet[n.pointerType]),t},t.prototype.cleanup=function(n){delete this.pointerMap[n.toString()]},t}(tw);var cdt=function(n){function t(t){var i={pointerdown:idt,pointermove:rdt,pointerup:udt,pointerout:fdt,pointerover:edt,pointercancel:odt,gotpointercapture:hdt,lostpointercapture:sdt};n.call(this,t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(tw),het=!1,ldt=function(n){function t(t,i,r){n.call(this,t);this.originalEvent=i;var u=r||{};this.buttons=function(n){var t;if(n.buttons||het)t=n.buttons;else switch(n.which){case 1:t=1;break;case 2:t=4;break;case 3:t=2;break;default:t=0}return t}(u);this.pressure=function(n,t){return n.pressure?n.pressure:t?.5:0}(u,this.buttons);this.bubbles="bubbles"in u&&u.bubbles;this.cancelable="cancelable"in u&&u.cancelable;this.view="view"in u?u.view:null;this.detail="detail"in u?u.detail:null;this.screenX="screenX"in u?u.screenX:0;this.screenY="screenY"in u?u.screenY:0;this.clientX="clientX"in u?u.clientX:0;this.clientY="clientY"in u?u.clientY:0;this.ctrlKey="ctrlKey"in u&&u.ctrlKey;this.altKey="altKey"in u&&u.altKey;this.shiftKey="shiftKey"in u&&u.shiftKey;this.metaKey="metaKey"in u&&u.metaKey;this.button="button"in u?u.button:0;this.relatedTarget="relatedTarget"in u?u.relatedTarget:null;this.pointerId="pointerId"in u?u.pointerId:0;this.width="width"in u?u.width:0;this.height="height"in u?u.height:0;this.tiltX="tiltX"in u?u.tiltX:0;this.tiltY="tiltY"in u?u.tiltY:0;this.pointerType="pointerType"in u?u.pointerType:"";this.hwTimestamp="hwTimestamp"in u?u.hwTimestamp:0;this.isPrimary="isPrimary"in u&&u.isPrimary;i.preventDefault&&(this.preventDefault=function(){i.preventDefault()})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr);!function(){try{var n=new MouseEvent("click",{buttons:1});het=1===n.buttons}catch(n){}}();cet=ldt;var wdt=function(n){function t(t,i){var r={touchstart:adt,touchmove:vdt,touchend:ydt,touchcancel:pdt};n.call(this,t,r);this.pointerMap=t.pointerMap;this.mouseSource=i;this.firstTouchId_=void 0;this.clickCount_=0;this.resetId_;this.dedupTimeout_=2500}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isPrimaryTouch_=function(n){return this.firstTouchId_===n.identifier},t.prototype.setPrimaryTouch_=function(n){var t=Object.keys(this.pointerMap).length;(0===t||1===t&&bh.toString()in this.pointerMap)&&(this.firstTouchId_=n.identifier,this.cancelResetClickCount_())},t.prototype.removePrimaryPointer_=function(n){n.isPrimary&&(this.firstTouchId_=void 0,this.resetClickCount_())},t.prototype.resetClickCount_=function(){this.resetId_=setTimeout(this.resetClickCountHandler_.bind(this),200)},t.prototype.resetClickCountHandler_=function(){this.clickCount_=0;this.resetId_=void 0},t.prototype.cancelResetClickCount_=function(){void 0!==this.resetId_&&clearTimeout(this.resetId_)},t.prototype.touchToPointer_=function(n,t){var i=this.dispatcher.cloneEvent(n,t);return i.pointerId=t.identifier+2,i.bubbles=!0,i.cancelable=!0,i.detail=this.clickCount_,i.button=0,i.buttons=1,i.width=t.radiusX||0,i.height=t.radiusY||0,i.pressure=t.force||.5,i.isPrimary=this.isPrimaryTouch_(t),i.pointerType="touch",i.clientX=t.clientX,i.clientY=t.clientY,i.screenX=t.screenX,i.screenY=t.screenY,i},t.prototype.processTouches_=function(n,t){function e(){n.preventDefault()}for(var u=Array.prototype.slice.call(n.changedTouches),f=u.length,r,i=0;i<f;++i)r=this.touchToPointer_(n,u[i]),r.preventDefault=e,t.call(this,n,r)},t.prototype.findTouch_=function(n,t){for(var r=n.length,i=0;i<r;i++)if(n[i].identifier===t)return!0;return!1},t.prototype.vacuumTouches_=function(n){var f=n.touches,e=Object.keys(this.pointerMap),o=e.length,t,i,r,s,u;if(o>=f.length){for(t=[],i=0;i<o;++i)r=Number(e[i]),s=this.pointerMap[r],r==bh||this.findTouch_(f,r-2)||t.push(s.out);for(u=0;u<t.length;++u)this.cancelOut_(n,t[u])}},t.prototype.overDown_=function(n,t){this.pointerMap[t.pointerId]={target:t.target,out:t,outTarget:t.target};this.dispatcher.over(t,n);this.dispatcher.enter(t,n);this.dispatcher.down(t,n)},t.prototype.moveOverOut_=function(n,t){var i=t,r=this.pointerMap[i.pointerId],u,f;r&&(u=r.out,f=r.outTarget,this.dispatcher.move(i,n),u&&f!==i.target&&(u.relatedTarget=i.target,i.relatedTarget=f,u.target=f,i.target?(this.dispatcher.leaveOut(u,n),this.dispatcher.enterOver(i,n)):(i.target=f,i.relatedTarget=null,this.cancelOut_(n,i))),r.out=i,r.outTarget=i.target)},t.prototype.upOut_=function(n,t){this.dispatcher.up(t,n);this.dispatcher.out(t,n);this.dispatcher.leave(t,n);this.cleanUpPointer_(t)},t.prototype.cancelOut_=function(n,t){this.dispatcher.cancel(t,n);this.dispatcher.out(t,n);this.dispatcher.leave(t,n);this.cleanUpPointer_(t)},t.prototype.cleanUpPointer_=function(n){delete this.pointerMap[n.pointerId];this.removePrimaryPointer_(n)},t.prototype.dedupSynthMouse_=function(n){var r=this.mouseSource.lastTouches,t=n.changedTouches[0],i;this.isPrimaryTouch_(t)&&(i=[t.clientX,t.clientY],r.push(i),setTimeout(function(){!function(n,t){var i=n.indexOf(t),r=i>-1;r&&n.splice(i,1)}(r,i)},this.dedupTimeout_))},t}(tw),ig=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]],rg=function(n){function t(t){n.call(this);this.element_=t;this.pointerMap={};this.eventMap_={};this.eventSourceList_=[];this.registerSources()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.registerSources=function(){if(nkt)this.registerSource("native",new cdt(this));else if(tkt)this.registerSource("ms",new set(this));else{var n=new eet(this);this.registerSource("mouse",n);dd&&this.registerSource("touch",new wdt(this,n))}this.register_()},t.prototype.registerSource=function(n,t){var i=t,r=i.getEvents();r&&(r.forEach(function(n){var t=i.getHandlerForEvent(n);t&&(this.eventMap_[n]=t.bind(i))}.bind(this)),this.eventSourceList_.push(i))},t.prototype.register_=function(){for(var i,t=this.eventSourceList_.length,n=0;n<t;n++)i=this.eventSourceList_[n],this.addEvents_(i.getEvents())},t.prototype.unregister_=function(){for(var i,t=this.eventSourceList_.length,n=0;n<t;n++)i=this.eventSourceList_[n],this.removeEvents_(i.getEvents())},t.prototype.eventHandler_=function(n){var i=n.type,t=this.eventMap_[i];t&&t(n)},t.prototype.addEvents_=function(n){n.forEach(function(n){o(this.element_,n,this.eventHandler_,this)}.bind(this))},t.prototype.removeEvents_=function(n){n.forEach(function(n){ou(this.element_,n,this.eventHandler_,this)}.bind(this))},t.prototype.cloneEvent=function(n,t){for(var r,u={},i=0,f=ig.length;i<f;i++)r=ig[i][0],u[r]=n[r]||t[r]||ig[i][1];return u},t.prototype.down=function(n,t){this.fireEvent(tu.POINTERDOWN,n,t)},t.prototype.move=function(n,t){this.fireEvent(tu.POINTERMOVE,n,t)},t.prototype.up=function(n,t){this.fireEvent(tu.POINTERUP,n,t)},t.prototype.enter=function(n,t){n.bubbles=!1;this.fireEvent(tu.POINTERENTER,n,t)},t.prototype.leave=function(n,t){n.bubbles=!1;this.fireEvent(tu.POINTERLEAVE,n,t)},t.prototype.over=function(n,t){n.bubbles=!0;this.fireEvent(tu.POINTEROVER,n,t)},t.prototype.out=function(n,t){n.bubbles=!0;this.fireEvent(tu.POINTEROUT,n,t)},t.prototype.cancel=function(n,t){this.fireEvent(tu.POINTERCANCEL,n,t)},t.prototype.leaveOut=function(n,t){this.out(n,t);this.contains_(n.target,n.relatedTarget)||this.leave(n,t)},t.prototype.enterOver=function(n,t){this.over(n,t);this.contains_(n.target,n.relatedTarget)||this.enter(n,t)},t.prototype.contains_=function(n,t){return!(!n||!t)&&n.contains(t)},t.prototype.makeEvent=function(n,t,i){return new cet(n,i,t)},t.prototype.fireEvent=function(n,t,i){var r=this.makeEvent(n,t,i);this.dispatchEvent(r)},t.prototype.fireNativeEvent=function(n){var t=this.makeEvent(n.type,n,n);this.dispatchEvent(t)},t.prototype.wrapMouseEvent=function(n,t){return this.makeEvent(n,kh(t,this),t)},t.prototype.disposeInternal=function(){this.unregister_();n.prototype.disposeInternal.call(this)},t}(th),bdt=function(n){function t(t,i){n.call(this);this.map_=t;this.clickTimeoutId_;this.dragging_=!1;this.dragListenerKeys_=[];this.moveTolerance_=i?i*tl:tl;this.down_=null;var r=this.map_.getViewport();this.activePointers_=0;this.trackedTouches_={};this.pointerEventHandler_=new rg(r);this.documentPointerEventHandler_=null;this.pointerdownListenerKey_=o(this.pointerEventHandler_,tu.POINTERDOWN,this.handlePointerDown_,this);this.relayedListenerKey_=o(this.pointerEventHandler_,tu.POINTERMOVE,this.relayEvent_,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.emulateClick_=function(n){var t=new ts(ht.CLICK,this.map_,n);this.dispatchEvent(t);void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new ts(ht.DBLCLICK,this.map_,n),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var t=new ts(ht.SINGLECLICK,this.map_,n);this.dispatchEvent(t)}.bind(this),250)},t.prototype.updateActivePointers_=function(n){var t=n;t.type==ht.POINTERUP||t.type==ht.POINTERCANCEL?delete this.trackedTouches_[t.pointerId]:t.type==ht.POINTERDOWN&&(this.trackedTouches_[t.pointerId]=!0);this.activePointers_=Object.keys(this.trackedTouches_).length},t.prototype.handlePointerUp_=function(n){this.updateActivePointers_(n);var t=new ts(ht.POINTERUP,this.map_,n);this.dispatchEvent(t);t.propagationStopped||this.dragging_||!this.isMouseActionButton_(n)||this.emulateClick_(this.down_);0===this.activePointers_&&(this.dragListenerKeys_.forEach(lt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null,this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null)},t.prototype.isMouseActionButton_=function(n){return 0===n.button},t.prototype.handlePointerDown_=function(n){this.updateActivePointers_(n);var t=new ts(ht.POINTERDOWN,this.map_,n);this.dispatchEvent(t);this.down_=n;0===this.dragListenerKeys_.length&&(this.documentPointerEventHandler_=new rg(document),this.dragListenerKeys_.push(o(this.documentPointerEventHandler_,ht.POINTERMOVE,this.handlePointerMove_,this),o(this.documentPointerEventHandler_,ht.POINTERUP,this.handlePointerUp_,this),o(this.pointerEventHandler_,ht.POINTERCANCEL,this.handlePointerUp_,this)))},t.prototype.handlePointerMove_=function(n){if(this.isMoving_(n)){this.dragging_=!0;var t=new ts(ht.POINTERDRAG,this.map_,n,this.dragging_);this.dispatchEvent(t)}n.preventDefault()},t.prototype.relayEvent_=function(n){var t=!(!this.down_||!this.isMoving_(n));this.dispatchEvent(new ts(n.type,this.map_,n,t))},t.prototype.isMoving_=function(n){return this.dragging_||Math.abs(n.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(n.clientY-this.down_.clientY)>this.moveTolerance_},t.prototype.disposeInternal=function(){this.relayedListenerKey_&&(lt(this.relayedListenerKey_),this.relayedListenerKey_=null);this.pointerdownListenerKey_&&(lt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null);this.dragListenerKeys_.forEach(lt);this.dragListenerKeys_.length=0;this.documentPointerEventHandler_&&(this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null);this.pointerEventHandler_&&(this.pointerEventHandler_.dispose(),this.pointerEventHandler_=null);n.prototype.disposeInternal.call(this)},t}(th),iw="postrender",kdt="movestart",ddt="moveend",br={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},c={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5},iu=function(n,t){this.priorityFunction_=n;this.keyFunction_=t;this.elements_=[];this.priorities_=[];this.queuedElements_={}};iu.prototype.clear=function(){this.elements_.length=0;this.priorities_.length=0;pf(this.queuedElements_)};iu.prototype.dequeue=function(){var n=this.elements_,t=this.priorities_,i=n[0],r;return 1==n.length?(n.length=0,t.length=0):(n[0]=n.pop(),t[0]=t.pop(),this.siftUp_(0)),r=this.keyFunction_(i),delete this.queuedElements_[r],i};iu.prototype.enqueue=function(n){g(!(this.keyFunction_(n)in this.queuedElements_),31);var t=this.priorityFunction_(n);return t!=1/0&&(this.elements_.push(n),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(n)]=!0,this.siftDown_(0,this.elements_.length-1),!0)};iu.prototype.getCount=function(){return this.elements_.length};iu.prototype.getLeftChildIndex_=function(n){return 2*n+1};iu.prototype.getRightChildIndex_=function(n){return 2*n+2};iu.prototype.getParentIndex_=function(n){return n-1>>1};iu.prototype.heapify_=function(){for(var n=(this.elements_.length>>1)-1;n>=0;n--)this.siftUp_(n)};iu.prototype.isEmpty=function(){return 0===this.elements_.length};iu.prototype.isKeyQueued=function(n){return n in this.queuedElements_};iu.prototype.isQueued=function(n){return this.isKeyQueued(this.keyFunction_(n))};iu.prototype.siftUp_=function(n){for(var i=this.elements_,t=this.priorities_,f=i.length,o=i[n],s=t[n],h=n;n<f>>1;){var e=this.getLeftChildIndex_(n),r=this.getRightChildIndex_(n),u=r<f&&t[r]<t[e]?r:e;i[n]=i[u];t[n]=t[u];n=u}i[n]=o;t[n]=s;this.siftDown_(h,n)};iu.prototype.siftDown_=function(n,t){for(var r,u=this.elements_,i=this.priorities_,e=u[t],f=i[t];t>n;){if(r=this.getParentIndex_(t),!(i[r]>f))break;u[t]=u[r];i[t]=i[r];t=r}u[t]=e;i[t]=f};iu.prototype.reprioritize=function(){for(var r,u,e=this.priorityFunction_,t=this.elements_,f=this.priorities_,i=0,o=t.length,n=0;n<o;++n)(u=e(r=t[n]))==1/0?delete this.queuedElements_[this.keyFunction_(r)]:(f[i]=u,t[i++]=r);t.length=i;f.length=i;this.heapify_()};var aet=iu,vet=function(n){function t(t,i){n.call(this,function(n){return t.apply(null,n)},function(n){return n[0].getKey()});this.tileChangeCallback_=i;this.tilesLoading_=0;this.tilesLoadingKeys_={}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.enqueue=function(t){var i=n.prototype.enqueue.call(this,t);return i&&o(t[0],a.CHANGE,this.handleTileChange,this),i},t.prototype.getTilesLoading=function(){return this.tilesLoading_},t.prototype.handleTileChange=function(n){var i=n.target,t=i.getState(),r;(t===c.LOADED||t===c.ERROR||t===c.EMPTY||t===c.ABORT)&&(ou(i,a.CHANGE,this.handleTileChange,this),r=i.getKey(),r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_())},t.prototype.loadMoreTiles=function(n,t){for(var f,i,r,u=0,e=!1;this.tilesLoading_<n&&u<t&&this.getCount()>0;)r=(i=this.dequeue()[0]).getKey(),(f=i.getState())===c.ABORT?e=!0:f!==c.IDLE||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++u,i.load());0===u&&e&&this.tileChangeCallback_()},t}(aet),gdt=42,rw=256;var lu=0,oi=1,rl="center",dh="resolution",ul="rotation";ew=0;fg=function(n){function t(t){n.call(this);var i=nt({},t);this.hints_=[0,0];this.animations_=[];this.updateAnimationKey_;this.updateAnimations_=this.updateAnimations_.bind(this);this.projection_=but(i.projection,"EPSG:3857");this.applyOptions_(i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.applyOptions_=function(n){var t={},i;t[rl]=void 0!==n.center?n.center:null;i=function(n){var o,t,e,i=void 0!==n.minZoom?n.minZoom:ew,r=void 0!==n.maxZoom?n.maxZoom:28,u=void 0!==n.zoomFactor?n.zoomFactor:2,f;if(void 0!==n.resolutions)f=n.resolutions,t=f[i],e=void 0!==f[r]?f[r]:f[f.length-1],o=function(n){return function(t,i,r){var f,u,e;if(void 0!==t)return(f=np(n,t,r),f=vi(f+i,0,n.length-1),u=Math.floor(f),f!=u&&u<n.length-1)?(e=n[u]/n[u+1],n[u]/Math.pow(e,f-u)):n[u]}}(f);else{var c=but(n.projection,"EPSG:3857"),s=c.getExtent(),l=s?Math.max(wt(s),ti(s)):360*gf[pr.DEGREES]/c.getMetersPerUnit(),h=l/rw/Math.pow(2,ew),a=h/Math.pow(2,28-ew);void 0!==(t=n.maxResolution)?i=0:t=h/Math.pow(u,i);void 0===(e=n.minResolution)&&(e=void 0!==n.maxZoom?void 0!==n.maxResolution?t/Math.pow(u,r):h/Math.pow(u,r):a);r=i+Math.floor(Math.log(t/e)/Math.log(u));e=t/Math.pow(u,r-i);o=function(n,t,i){return function(r,u,f){if(void 0!==r){var o=-f/2+.5,s=Math.floor(Math.log(t/r)/Math.log(n)+o),e=Math.max(s+u,0);return void 0!==i&&(e=Math.min(e,i)),t/Math.pow(n,e)}}}(u,t,r-i)}return{constraint:o,maxResolution:t,minResolution:e,minZoom:i,zoomFactor:u}}(n);this.maxResolution_=i.maxResolution;this.minResolution_=i.minResolution;this.zoomFactor_=i.zoomFactor;this.resolutions_=n.resolutions;this.minZoom_=i.minZoom;var r=function(n){return void 0!==n.extent?function(n){return function(t){if(t)return[vi(t[0],n[0],n[2]),vi(t[1],n[1],n[3])]}}(n.extent):ngt}(n),u=i.constraint,f=function(n){if(void 0===n.enableRotation||n.enableRotation){var t=n.constrainRotation;return void 0===t||!0===t?function(n){var t=n||kf(5);return function(n,i){if(void 0!==n)return Math.abs(n+i)<=t?0:n+i}}():!1===t?yet:"number"==typeof t?function(n){var t=2*Math.PI/n;return function(n,i){if(void 0!==n)return n=Math.floor((n+i)/t+.5)*t}}(t):yet}return uw}(n);this.constraints_={center:r,resolution:u,rotation:f};void 0!==n.resolution?t[dh]=n.resolution:void 0!==n.zoom&&(t[dh]=this.constrainResolution(this.maxResolution_,n.zoom-this.minZoom_),this.resolutions_&&(t[dh]=vi(Number(this.getResolution()||t[dh]),this.minResolution_,this.maxResolution_)));t[ul]=void 0!==n.rotation?n.rotation:0;this.setProperties(t);this.options_=n},t.prototype.getUpdatedOptions_=function(n){var t=nt({},this.options_);return void 0!==t.resolution?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenter(),t.rotation=this.getRotation(),nt({},t,n)},t.prototype.animate=function(){var u,a=arguments,r=arguments.length,i,t,n,l;if(r>1&&"function"==typeof arguments[r-1]&&(u=arguments[r-1],--r),!this.isDef())return i=arguments[r-1],i.center&&this.setCenter(i.center),void 0!==i.zoom&&this.setZoom(i.zoom),void 0!==i.rotation&&this.setRotation(i.rotation),void(u&&ow(u,!0));for(var s=Date.now(),h=this.getCenter().slice(),f=this.getResolution(),e=this.getRotation(),c=[],o=0;o<r;++o)t=a[o],n={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||fw},(t.center&&(n.sourceCenter=h,n.targetCenter=t.center,h=n.targetCenter),void 0!==t.zoom?(n.sourceResolution=f,n.targetResolution=this.constrainResolution(this.maxResolution_,t.zoom-this.minZoom_,0),f=n.targetResolution):t.resolution&&(n.sourceResolution=f,n.targetResolution=t.resolution,f=n.targetResolution),void 0!==t.rotation)&&(n.sourceRotation=e,l=df(t.rotation-e+Math.PI,2*Math.PI)-Math.PI,n.targetRotation=e+l,e=n.targetRotation),n.callback=u,tgt(n)?n.complete=!0:s+=n.duration,c.push(n);this.animations_.push(c);this.setHint(lu,1);this.updateAnimations_()},t.prototype.getAnimating=function(){return this.hints_[lu]>0},t.prototype.getInteracting=function(){return this.hints_[oi]>0},t.prototype.cancelAnimations=function(){var n,i,t;for(this.setHint(lu,-this.hints_[lu]),n=0,i=this.animations_.length;n<i;++n)t=this.animations_[n],t[0].callback&&ow(t[0].callback,!1);this.animations_.length=0},t.prototype.updateAnimations_=function(){var n,l,r,t,e,o,s;if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var y=Date.now(),h=!1,i=this.animations_.length-1;i>=0;--i){for(var u=this.animations_[i],c=!0,f=0,p=u.length;f<p;++f)if(n=u[f],!n.complete){if(l=y-n.start,r=n.duration>0?l/n.duration:1,r>=1?(n.complete=!0,r=1):c=!1,t=n.easing(r),n.sourceCenter){var a=n.sourceCenter[0],v=n.sourceCenter[1],w=a+t*(n.targetCenter[0]-a),b=v+t*(n.targetCenter[1]-v);this.set(rl,[w,b])}if(n.sourceResolution&&n.targetResolution&&(e=1===t?n.targetResolution:n.sourceResolution+t*(n.targetResolution-n.sourceResolution),n.anchor&&this.set(rl,this.calculateCenterZoom(e,n.anchor)),this.set(dh,e)),void 0!==n.sourceRotation&&void 0!==n.targetRotation&&(o=1===t?df(n.targetRotation+Math.PI,2*Math.PI)-Math.PI:n.sourceRotation+t*(n.targetRotation-n.sourceRotation),n.anchor&&this.set(rl,this.calculateCenterRotate(o,n.anchor)),this.set(ul,o)),h=!0,!n.complete)break}c&&(this.animations_[i]=null,this.setHint(lu,-1),s=u[0].callback,s&&ow(s,!0))}this.animations_=this.animations_.filter(Boolean);h&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_))}},t.prototype.calculateCenterRotate=function(n,t){var i,r=this.getCenter();return void 0!==r&&(da(i=[r[0]-t[0],r[1]-t[1]],n-this.getRotation()),ka(i,t)),i},t.prototype.calculateCenterZoom=function(n,t){var u,i=this.getCenter(),r=this.getResolution();return void 0!==i&&void 0!==r&&(u=[t[0]-n*(t[0]-i[0])/r,t[1]-n*(t[1]-i[1])/r]),u},t.prototype.getSizeFromViewport_=function(){var n=[100,100],r='.ol-viewport[data-view="'+y(this)+'"]',i=document.querySelector(r),t;return i&&(t=getComputedStyle(i),n[0]=parseInt(t.width,10),n[1]=parseInt(t.height,10)),n},t.prototype.constrainCenter=function(n){return this.constraints_.center(n)},t.prototype.constrainResolution=function(n,t,i){var r=t||0,u=i||0;return this.constraints_.resolution(n,r,u)},t.prototype.constrainRotation=function(n,t){var i=t||0;return this.constraints_.rotation(n,i)},t.prototype.getCenter=function(){return this.get(rl)},t.prototype.getConstraints=function(){return this.constraints_},t.prototype.getHints=function(n){return void 0!==n?(n[0]=this.hints_[0],n[1]=this.hints_[1],n):this.hints_.slice()},t.prototype.calculateExtent=function(n){var u=n||this.getSizeFromViewport_(),r=this.getCenter(),t,i;return g(r,1),t=this.getResolution(),g(void 0!==t,2),i=this.getRotation(),g(void 0!==i,3),ca(r,t,i,u)},t.prototype.getMaxResolution=function(){return this.maxResolution_},t.prototype.getMinResolution=function(){return this.minResolution_},t.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},t.prototype.setMaxZoom=function(n){this.applyOptions_(this.getUpdatedOptions_({maxZoom:n}))},t.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},t.prototype.setMinZoom=function(n){this.applyOptions_(this.getUpdatedOptions_({minZoom:n}))},t.prototype.getProjection=function(){return this.projection_},t.prototype.getResolution=function(){return this.get(dh)},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getResolutionForExtent=function(n,t){var i=t||this.getSizeFromViewport_(),r=wt(n)/i[0],u=ti(n)/i[1];return Math.max(r,u)},t.prototype.getResolutionForValueFunction=function(n){var t=n||2,i=this.maxResolution_,r=this.minResolution_,u=Math.log(i/r)/Math.log(t);return function(n){return i/Math.pow(t,n*u)}},t.prototype.getRotation=function(){return this.get(ul)},t.prototype.getValueForResolutionFunction=function(n){var t=n||2,i=this.maxResolution_,r=this.minResolution_,u=Math.log(i/r)/Math.log(t);return function(n){return Math.log(i/n)/Math.log(t)/u}},t.prototype.getState=function(n){var i=this.getCenter(),r=this.getProjection(),u=this.getResolution(),t=u/n,f=this.getRotation();return{center:[Math.round(i[0]/t)*t,Math.round(i[1]/t)*t],projection:void 0!==r?r:null,resolution:u,rotation:f,zoom:this.getZoom()}},t.prototype.getZoom=function(){var n,t=this.getResolution();return void 0!==t&&(n=this.getZoomForResolution(t)),n},t.prototype.getZoomForResolution=function(n){var i,r,u=this.minZoom_||0,t;return this.resolutions_?(t=np(this.resolutions_,n,1),u=t,i=this.resolutions_[t],r=t==this.resolutions_.length-1?2:i/this.resolutions_[t+1]):(i=this.maxResolution_,r=this.zoomFactor_),u+Math.log(i/n)/Math.log(r)},t.prototype.getResolutionForZoom=function(n){return this.constrainResolution(this.maxResolution_,n-this.minZoom_,0)},t.prototype.fit=function(n,t){var s,i=t||{},l=i.size,k,d,r,c;l||(l=this.getSizeFromViewport_());g(Array.isArray(n)||"function"==typeof n.getSimplifiedGeometry,24);Array.isArray(n)?(g(!eh(n),25),s=ba(n)):n.getType()===f.CIRCLE?(s=ba(n=n.getExtent())).rotate(this.getRotation(),su(n)):s=n;var b,u=void 0!==i.padding?i.padding:[0,0,0,0],ft=void 0===i.constrainResolution||i.constrainResolution,et=void 0!==i.nearest&&i.nearest;b=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.constrainResolution(this.maxResolution_,i.maxZoom-this.minZoom_,0):0;for(var h=s.getFlatCoordinates(),nt=this.getRotation(),a=Math.cos(-nt),e=Math.sin(-nt),v=1/0,y=1/0,p=-1/0,w=-1/0,ot=s.getStride(),o=0,st=h.length;o<st;o+=ot)k=h[o]*a-h[o+1]*e,d=h[o]*e+h[o+1]*a,v=Math.min(v,k),y=Math.min(y,d),p=Math.max(p,k),w=Math.max(w,d);r=this.getResolutionForExtent([v,y,p,w],[l[0]-u[1]-u[3],l[1]-u[0]-u[2]]);(r=isNaN(r)?b:Math.max(r,b),ft)&&(c=this.constrainResolution(r,0,0),!et&&c<r&&(c=this.constrainResolution(c,-1,0)),r=c);e=-e;var tt=(v+p)/2,it=(y+w)/2,rt=[(tt+=(u[1]-u[3])/2*r)*a-(it+=(u[0]-u[2])/2*r)*e,it*a+tt*e],ut=i.callback?i.callback:wf;void 0!==i.duration?this.animate({resolution:r,center:rt,duration:i.duration,easing:i.easing},ut):(this.setResolution(r),this.setCenter(rt),ow(ut,!0))},t.prototype.centerOn=function(n,t,i){var f=this.getRotation(),u=Math.cos(-f),r=Math.sin(-f),e=n[0]*u-n[1]*r,o=n[1]*u+n[0]*r,s=this.getResolution(),h=(e+=(t[0]/2-i[0])*s)*u-(o+=(i[1]-t[1]/2)*s)*(r=-r),c=o*u+e*r;this.setCenter([h,c])},t.prototype.isDef=function(){return!!this.getCenter()&&void 0!==this.getResolution()},t.prototype.rotate=function(n,t){if(void 0!==t){var i=this.calculateCenterRotate(n,t);this.setCenter(i)}this.setRotation(n)},t.prototype.setCenter=function(n){this.set(rl,n);this.getAnimating()&&this.cancelAnimations()},t.prototype.setHint=function(n,t){return this.hints_[n]+=t,this.changed(),this.hints_[n]},t.prototype.setResolution=function(n){this.set(dh,n);this.getAnimating()&&this.cancelAnimations()},t.prototype.setRotation=function(n){this.set(ul,n);this.getAnimating()&&this.cancelAnimations()},t.prototype.setZoom=function(n){this.setResolution(this.getResolutionForZoom(n))},t}(rf);var di={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"},eg=function(n){function t(t){n.call(this);var i=nt({},t);i[di.OPACITY]=void 0!==t.opacity?t.opacity:1;i[di.VISIBLE]=void 0===t.visible||t.visible;i[di.Z_INDEX]=t.zIndex;i[di.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0;i[di.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0;this.setProperties(i);this.state_=null;this.type}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getType=function(){return this.type},t.prototype.getLayerState=function(){var n=this.state_||{layer:this,managed:!0};return n.opacity=vi(this.getOpacity(),0,1),n.sourceState=this.getSourceState(),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=this.getZIndex()||0,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),this.state_=n,n},t.prototype.getLayersArray=function(){return p()},t.prototype.getLayerStatesArray=function(){return p()},t.prototype.getExtent=function(){return this.get(di.EXTENT)},t.prototype.getMaxResolution=function(){return this.get(di.MAX_RESOLUTION)},t.prototype.getMinResolution=function(){return this.get(di.MIN_RESOLUTION)},t.prototype.getOpacity=function(){return this.get(di.OPACITY)},t.prototype.getSourceState=function(){return p()},t.prototype.getVisible=function(){return this.get(di.VISIBLE)},t.prototype.getZIndex=function(){return this.get(di.Z_INDEX)},t.prototype.setExtent=function(n){this.set(di.EXTENT,n)},t.prototype.setMaxResolution=function(n){this.set(di.MAX_RESOLUTION,n)},t.prototype.setMinResolution=function(n){this.set(di.MIN_RESOLUTION,n)},t.prototype.setOpacity=function(n){this.set(di.OPACITY,n)},t.prototype.setVisible=function(n){this.set(di.VISIBLE,n)},t.prototype.setZIndex=function(n){this.set(di.Z_INDEX,n)},t}(rf),pi={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},og={LAYERS:"layers"},bet=function(n){function t(t){var r=t||{},u=nt({},r),i;delete u.layers;i=r.layers;n.call(this,u);this.layersListenerKeys_=[];this.listenerKeys_={};o(this,ni(og.LAYERS),this.handleLayersChanged_,this);i?Array.isArray(i)?i=new er(i.slice(),{unique:!0}):g("function"==typeof i.getArray,43):i=new er(void 0,{unique:!0});this.setLayers(i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleLayerChange_=function(){this.changed()},t.prototype.handleLayersChanged_=function(){var n,r,t;this.layersListenerKeys_.forEach(lt);this.layersListenerKeys_.length=0;n=this.getLayers();for(r in this.layersListenerKeys_.push(o(n,ki.ADD,this.handleLayersAdd_,this),o(n,ki.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[r].forEach(lt);pf(this.listenerKeys_);for(var u=n.getArray(),i=0,f=u.length;i<f;i++)t=u[i],this.listenerKeys_[y(t)]=[o(t,gs,this.handleLayerChange_,this),o(t,a.CHANGE,this.handleLayerChange_,this)];this.changed()},t.prototype.handleLayersAdd_=function(n){var t=n.element;this.listenerKeys_[y(t)]=[o(t,gs,this.handleLayerChange_,this),o(t,a.CHANGE,this.handleLayerChange_,this)];this.changed()},t.prototype.handleLayersRemove_=function(n){var t=y(n.element);this.listenerKeys_[t].forEach(lt);delete this.listenerKeys_[t];this.changed()},t.prototype.getLayers=function(){return this.get(og.LAYERS)},t.prototype.setLayers=function(n){this.set(og.LAYERS,n)},t.prototype.getLayersArray=function(n){var t=void 0!==n?n:[];return this.getLayers().forEach(function(n){n.getLayersArray(t)}),t},t.prototype.getLayerStatesArray=function(n){var r=void 0!==n?n:[],f=r.length,t;this.getLayers().forEach(function(n){n.getLayerStatesArray(r)});for(var i=this.getLayerState(),u=f,e=r.length;u<e;u++)t=r[u],t.opacity*=i.opacity,t.visible=t.visible&&i.visible,t.maxResolution=Math.min(t.maxResolution,i.maxResolution),t.minResolution=Math.max(t.minResolution,i.minResolution),void 0!==i.extent&&(t.extent=void 0!==t.extent?of(t.extent,i.extent):i.extent);return r},t.prototype.getSourceState=function(){return pi.READY},t}(eg);var hg=function(n){function t(t){var i,f;n.call(this);i=function(n){var f=null,r,u,i,t,e;return void 0!==n.keyboardEventTarget&&(f="string"==typeof n.keyboardEventTarget?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget),t={},e=n.layers&&"function"==typeof n.layers.getLayers?n.layers:new bet({layers:n.layers}),t[br.LAYERGROUP]=e,t[br.TARGET]=n.target,t[br.VIEW]=void 0!==n.view?n.view:new fg,void 0!==n.controls&&(Array.isArray(n.controls)?r=new er(n.controls.slice()):(g("function"==typeof n.controls.getArray,47),r=n.controls)),void 0!==n.interactions&&(Array.isArray(n.interactions)?u=new er(n.interactions.slice()):(g("function"==typeof n.interactions.getArray,48),u=n.interactions)),void 0!==n.overlays?Array.isArray(n.overlays)?i=new er(n.overlays.slice()):(g("function"==typeof n.overlays.getArray,49),i=n.overlays):i=new er,{controls:r,interactions:u,keyboardEventTarget:f,overlays:i,values:t}}(t);this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16;this.loadTilesWhileAnimating_=void 0!==t.loadTilesWhileAnimating&&t.loadTilesWhileAnimating;this.loadTilesWhileInteracting_=void 0!==t.loadTilesWhileInteracting&&t.loadTilesWhileInteracting;this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:tl;this.animationDelayKey_;this.animationDelay_=function(){this.animationDelayKey_=void 0;this.renderFrame_.call(this,Date.now())}.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"+(dd?" ol-touch":"");this.viewport_.style.position="relative";this.viewport_.style.overflow="hidden";this.viewport_.style.width="100%";this.viewport_.style.height="100%";this.viewport_.style.msTouchAction="none";this.viewport_.style.touchAction="none";this.overlayContainer_=document.createElement("div");this.overlayContainer_.className="ol-overlaycontainer";this.viewport_.appendChild(this.overlayContainer_);this.overlayContainerStopEvent_=document.createElement("div");this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent";for(var u=[a.CLICK,a.DBLCLICK,a.MOUSEDOWN,a.TOUCHSTART,a.MSPOINTERDOWN,ht.POINTERDOWN,a.MOUSEWHEEL,a.WHEEL],r=0,e=u.length;r<e;++r)o(this.overlayContainerStopEvent_,u[r],tut);for(f in this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=new bdt(this,t.moveTolerance),ht)o(this.mapBrowserEventHandler_,ht[f],this.handleMapBrowserEvent,this);this.keyboardEventTarget_=i.keyboardEventTarget;this.keyHandlerKeys_=null;o(this.viewport_,a.CONTEXTMENU,this.handleBrowserEvent,this);o(this.viewport_,a.WHEEL,this.handleBrowserEvent,this);o(this.viewport_,a.MOUSEWHEEL,this.handleBrowserEvent,this);this.controls=i.controls||new er;this.interactions=i.interactions||new er;this.overlays_=i.overlays;this.overlayIdIndex_={};this.renderer_=this.createRenderer();this.handleResize_;this.focus_=null;this.postRenderFunctions_=[];this.tileQueue_=new vet(this.getTilePriority.bind(this),this.handleTileChange_.bind(this));this.skippedFeatureUids_={};o(this,ni(br.LAYERGROUP),this.handleLayerGroupChanged_,this);o(this,ni(br.VIEW),this.handleViewChanged_,this);o(this,ni(br.SIZE),this.handleSizeChanged_,this);o(this,ni(br.TARGET),this.handleTargetChanged_,this);this.setProperties(i.values);this.controls.forEach(function(n){n.setMap(this)}.bind(this));o(this.controls,ki.ADD,function(n){n.element.setMap(this)},this);o(this.controls,ki.REMOVE,function(n){n.element.setMap(null)},this);this.interactions.forEach(function(n){n.setMap(this)}.bind(this));o(this.interactions,ki.ADD,function(n){n.element.setMap(this)},this);o(this.interactions,ki.REMOVE,function(n){n.element.setMap(null)},this);this.overlays_.forEach(this.addOverlayInternal_.bind(this));o(this.overlays_,ki.ADD,function(n){this.addOverlayInternal_(n.element)},this);o(this.overlays_,ki.REMOVE,function(n){var t=n.element.getId();void 0!==t&&delete this.overlayIdIndex_[t.toString()];n.element.setMap(null)},this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method");},t.prototype.addControl=function(n){this.getControls().push(n)},t.prototype.addInteraction=function(n){this.getInteractions().push(n)},t.prototype.addLayer=function(n){this.getLayerGroup().getLayers().push(n)},t.prototype.addOverlay=function(n){this.getOverlays().push(n)},t.prototype.addOverlayInternal_=function(n){var t=n.getId();void 0!==t&&(this.overlayIdIndex_[t.toString()]=n);n.setMap(this)},t.prototype.disposeInternal=function(){this.mapBrowserEventHandler_.dispose();ou(this.viewport_,a.CONTEXTMENU,this.handleBrowserEvent,this);ou(this.viewport_,a.WHEEL,this.handleBrowserEvent,this);ou(this.viewport_,a.MOUSEWHEEL,this.handleBrowserEvent,this);void 0!==this.handleResize_&&(removeEventListener(a.RESIZE,this.handleResize_,!1),this.handleResize_=void 0);this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.setTarget(null);n.prototype.disposeInternal.call(this)},t.prototype.forEachFeatureAtPixel=function(n,t,i){if(this.frameState_){var r=this.getCoordinateFromPixel(n),u=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,f=void 0!==i.layerFilter?i.layerFilter:bu;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,u,t,null,f,null)}},t.prototype.getFeaturesAtPixel=function(n,t){var i=null;return this.forEachFeatureAtPixel(n,function(n){i||(i=[]);i.push(n)},t),i},t.prototype.forEachLayerAtPixel=function(n,t,i){if(this.frameState_){var r=i||{},u=void 0!==r.hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,f=r.layerFilter||bu;return this.renderer_.forEachLayerAtPixel(n,this.frameState_,u,t,null,f,null)}},t.prototype.hasFeatureAtPixel=function(n,t){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixel(n),r=void 0!==(t=void 0!==t?t:{}).layerFilter?t.layerFilter:bu,u=void 0!==t.hitTolerance?t.hitTolerance*this.frameState_.pixelRatio:0;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,u,r,null)},t.prototype.getEventCoordinate=function(n){return this.getCoordinateFromPixel(this.getEventPixel(n))},t.prototype.getEventPixel=function(n){var t=this.viewport_.getBoundingClientRect(),i="changedTouches"in n?n.changedTouches[0]:n;return[i.clientX-t.left,i.clientY-t.top]},t.prototype.getTarget=function(){return this.get(br.TARGET)},t.prototype.getTargetElement=function(){var n=this.getTarget();return void 0!==n?"string"==typeof n?document.getElementById(n):n:null},t.prototype.getCoordinateFromPixel=function(n){var t=this.frameState_;return t?wr(t.pixelToCoordinateTransform,n.slice()):null},t.prototype.getControls=function(){return this.controls},t.prototype.getOverlays=function(){return this.overlays_},t.prototype.getOverlayById=function(n){var t=this.overlayIdIndex_[n.toString()];return void 0!==t?t:null},t.prototype.getInteractions=function(){return this.interactions},t.prototype.getLayerGroup=function(){return this.get(br.LAYERGROUP)},t.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},t.prototype.getPixelFromCoordinate=function(n){var t=this.frameState_;return t?wr(t.coordinateToPixelTransform,n.slice(0,2)):null},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.getSize=function(){return this.get(br.SIZE)},t.prototype.getView=function(){return this.get(br.VIEW)},t.prototype.getViewport=function(){return this.viewport_},t.prototype.getOverlayContainer=function(){return this.overlayContainer_},t.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},t.prototype.getTilePriority=function(n,t,i,r){var u=this.frameState_,f,e;return(u&&t in u.wantedTiles)?u.wantedTiles[t][n.getKey()]?(f=i[0]-u.focus[0],e=i[1]-u.focus[1],65536*Math.log(r)+Math.sqrt(f*f+e*e)/r):1/0:1/0},t.prototype.handleBrowserEvent=function(n,t){var i=t||n.type,r=new uet(i,this,n);this.handleMapBrowserEvent(r)},t.prototype.handleMapBrowserEvent=function(n){var i,t,r;if(this.frameState_&&(this.focus_=n.coordinate,n.frameState=this.frameState_,i=this.getInteractions().getArray(),!1!==this.dispatchEvent(n)))for(t=i.length-1;t>=0;t--)if(r=i[t],r.getActive()&&!r.handleEvent(n))break},t.prototype.handlePostRender=function(){var n=this.frameState_,i=this.tileQueue_,t,r,u;i.isEmpty()||(t=this.maxTilesLoading_,r=t,n&&(u=n.viewHints,u[lu]&&(t=this.loadTilesWhileAnimating_?8:0,r=2),u[oi]&&(t=this.loadTilesWhileInteracting_?8:0,r=2)),i.getTilesLoading()<t&&(i.reprioritize(),i.loadMoreTiles(t,r)));!n||!this.hasListener(gr.RENDERCOMPLETE)||n.animate||this.tileQueue_.getTilesLoading()||function n(t){for(var r,u,i=0,f=t.length;i<f;++i){if(r=t[i],"function"==typeof r.getLayers)return n(r.getLayers().getArray());if(u=r.getSource(),u&&u.loading)return!0}return!1}(this.getLayers().getArray())||this.renderer_.dispatchRenderEvent(gr.RENDERCOMPLETE,n);for(var f=this.postRenderFunctions_,e=0,o=f.length;e<o;++e)f[e](this,n);f.length=0},t.prototype.handleSizeChanged_=function(){this.render()},t.prototype.handleTargetChanged_=function(){var n,t,r,i;if(this.getTarget()&&(n=this.getTargetElement()),this.keyHandlerKeys_){for(t=0,r=this.keyHandlerKeys_.length;t<r;++t)lt(this.keyHandlerKeys_[t]);this.keyHandlerKeys_=null}n?(n.appendChild(this.viewport_),i=this.keyboardEventTarget_?this.keyboardEventTarget_:n,this.keyHandlerKeys_=[o(i,a.KEYDOWN,this.handleBrowserEvent,this),o(i,a.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),addEventListener(a.RESIZE,this.handleResize_,!1))):(this.renderer_.removeLayerRenderers(),sw(this.viewport_),void 0!==this.handleResize_&&(removeEventListener(a.RESIZE,this.handleResize_,!1),this.handleResize_=void 0));this.updateSize()},t.prototype.handleTileChange_=function(){this.render()},t.prototype.handleViewPropertyChanged_=function(){this.render()},t.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(lt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null);this.viewChangeListenerKey_&&(lt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var n=this.getView();n&&(this.viewport_.setAttribute("data-view",y(n)),this.viewPropertyListenerKey_=o(n,gs,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=o(n,a.CHANGE,this.handleViewPropertyChanged_,this));this.render()},t.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(lt),this.layerGroupPropertyListenerKeys_=null);var n=this.getLayerGroup();n&&(this.layerGroupPropertyListenerKeys_=[o(n,gs,this.render,this),o(n,a.CHANGE,this.render,this)]);this.render()},t.prototype.isRendered=function(){return!!this.frameState_},t.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_);this.animationDelay_()},t.prototype.render=function(){void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},t.prototype.removeControl=function(n){return this.getControls().remove(n)},t.prototype.removeInteraction=function(n){return this.getInteractions().remove(n)},t.prototype.removeLayer=function(n){return this.getLayerGroup().getLayers().remove(n)},t.prototype.removeOverlay=function(n){return this.getOverlays().remove(n)},t.prototype.renderFrame_=function(n){var i,e=this.getSize(),r=this.getView(),o=[1/0,1/0,-1/0,-1/0],s=this.frameState_,t=null;if(void 0!==e&&function(n){return n[0]>0&&n[1]>0}(e)&&r&&r.isDef()){for(var c=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),u=this.getLayerGroup().getLayerStatesArray(),h={},f=0,l=u.length;f<l;++f)h[y(u[f].layer)]=u[f];i=r.getState(this.pixelRatio_);t={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,extent:o,focus:this.focus_?this.focus_:i.center,index:this.frameIndex_++,layerStates:h,layerStatesArray:u,pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,skippedFeatureUids:this.skippedFeatureUids_,tileQueue:this.tileQueue_,time:n,usedTiles:{},viewState:i,viewHints:c,wantedTiles:{}}}(t&&(t.extent=ca(i.center,i.resolution,i.rotation,t.size,o)),this.frameState_=t,this.renderer_.renderFrame(t),t)&&((t.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,t.postRenderFunctions),s)&&(this.previousExtent_&&(eh(this.previousExtent_)||oe(t.extent,this.previousExtent_))||(this.dispatchEvent(new nw(kdt,this,s)),this.previousExtent_=rh(this.previousExtent_))),!this.previousExtent_||t.viewHints[lu]||t.viewHints[oi]||oe(t.extent,this.previousExtent_)||(this.dispatchEvent(new nw(ddt,this,t)),fut(t.extent,this.previousExtent_)));this.dispatchEvent(new nw(iw,this,t));setTimeout(this.handlePostRender.bind(this),0)},t.prototype.setLayerGroup=function(n){this.set(br.LAYERGROUP,n)},t.prototype.setSize=function(n){this.set(br.SIZE,n)},t.prototype.setTarget=function(n){this.set(br.TARGET,n)},t.prototype.setView=function(n){this.set(br.VIEW,n)},t.prototype.skipFeature=function(n){this.skippedFeatureUids_[y(n)]=!0;this.render()},t.prototype.updateSize=function(){var t=this.getTargetElement(),n;t?(n=getComputedStyle(t),this.setSize([t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth)])):this.setSize(void 0)},t.prototype.unskipFeature=function(n){delete this.skippedFeatureUids_[y(n)];this.render()},t}(rf),le=function(n){function t(t){n.call(this);this.element=t.element?t.element:null;this.target_=null;this.map_=null;this.listenerKeys=[];this.render=t.render?t.render:wf;t.target&&this.setTarget(t.target)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){sw(this.element);n.prototype.disposeInternal.call(this)},t.prototype.getMap=function(){return this.map_},t.prototype.setMap=function(n){this.map_&&sw(this.element);for(var t=0,i=this.listenerKeys.length;t<i;++t)lt(this.listenerKeys[t]);(this.listenerKeys.length=0,this.map_=n,this.map_)&&((this.target_?this.target_:n.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==wf&&this.listenerKeys.push(o(n,iw,this.render,this)),n.render())},t.prototype.setTarget=function(n){this.target_="string"==typeof n?document.getElementById(n):n},t}(rf),hw="ol-hidden",igt="ol-selectable",ie="ol-unselectable",rgt="ol-unsupported",gh="ol-control",cw="ol-collapsed",ugt=function(){var n,t={};return function(i){if(n||(n=document.createElement("div").style),!(i in t)){n.font=i;var r=n.fontFamily;if(n.font="",!r)return null;t[i]=r.split(/,\s?/)}return t[i]}}();lw=function(n){function t(t){var i=nt({},t),r;delete i.source;n.call(this,i);this.mapPrecomposeKey_=null;this.mapRenderKey_=null;this.sourceChangeKey_=null;t.map&&this.setMap(t.map);o(this,ni(di.SOURCE),this.handleSourcePropertyChange_,this);r=t.source?t.source:null;this.setSource(r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getLayersArray=function(n){var t=n||[];return t.push(this),t},t.prototype.getLayerStatesArray=function(n){var t=n||[];return t.push(this.getLayerState()),t},t.prototype.getSource=function(){return this.get(di.SOURCE)||null},t.prototype.getSourceState=function(){var n=this.getSource();return n?n.getState():pi.UNDEFINED},t.prototype.handleSourceChange_=function(){this.changed()},t.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(lt(this.sourceChangeKey_),this.sourceChangeKey_=null);var n=this.getSource();n&&(this.sourceChangeKey_=o(n,a.CHANGE,this.handleSourceChange_,this));this.changed()},t.prototype.setMap=function(n){this.mapPrecomposeKey_&&(lt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null);n||this.changed();this.mapRenderKey_&&(lt(this.mapRenderKey_),this.mapRenderKey_=null);n&&(this.mapPrecomposeKey_=o(n,gr.PRECOMPOSE,function(n){var i=n,t=this.getLayerState();t.managed=!1;void 0===this.getZIndex()&&(t.zIndex=1/0);i.frameState.layerStatesArray.push(t);i.frameState.layerStates[y(this)]=t},this),this.mapRenderKey_=o(this,a.CHANGE,n.render,n),this.changed())},t.prototype.setSource=function(n){this.set(di.SOURCE,n)},t}(eg);cg=function(n){function t(t){var i=t||{},u,s,r,h,f;n.call(this,{element:document.createElement("div"),render:i.render||det,target:i.target});this.ulElement_=document.createElement("ul");this.collapsed_=void 0===i.collapsed||i.collapsed;this.overrideCollapsible_=void 0!==i.collapsible;this.collapsible_=void 0===i.collapsible||i.collapsible;this.collapsible_||(this.collapsed_=!1);var c=void 0!==i.className?i.className:"ol-attribution",l=void 0!==i.tipLabel?i.tipLabel:"Attributions",e=void 0!==i.collapseLabel?i.collapseLabel:"»";"string"==typeof e?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=e):this.collapseLabel_=e;u=void 0!==i.label?i.label:"i";"string"==typeof u?(this.label_=document.createElement("span"),this.label_.textContent=u):this.label_=u;s=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;r=document.createElement("button");r.setAttribute("type","button");r.title=l;r.appendChild(s);o(r,a.CLICK,this.handleClick_,this);h=c+" "+ie+" "+gh+(this.collapsed_&&this.collapsible_?" "+cw:"")+(this.collapsible_?"":" ol-uncollapsible");f=this.element;f.className=h;f.appendChild(this.ulElement_);f.appendChild(r);this.renderedAttributions_=[];this.renderedVisible_=!0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.collectSourceAttributions_=function(n){for(var o,u,s,t,i,c,r={},f=[],h=n.layerStatesArray,l=n.viewState.resolution,e=0,a=h.length;e<a;++e)if(o=h[e],is(o,l)&&(u=o.layer.getSource(),u&&(s=u.getAttributions(),s&&(t=s(n),t))))if(this.overrideCollapsible_||!1!==u.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(t))for(i=0,c=t.length;i<c;++i)t[i]in r||(f.push(t[i]),r[t[i]]=!0);else t in r||(f.push(t),r[t]=!0);return f},t.prototype.updateElement_=function(n){var t,i,r,f,u;if(n){if(t=this.collectSourceAttributions_(n),i=t.length>0,this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!uf(t,this.renderedAttributions_)){for(wet(this.ulElement_),r=0,f=t.length;r<f;++r)u=document.createElement("li"),u.innerHTML=t[r],this.ulElement_.appendChild(u);this.renderedAttributions_=t}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},t.prototype.handleClick_=function(n){n.preventDefault();this.handleToggle_()},t.prototype.handleToggle_=function(){this.element.classList.toggle(cw);this.collapsed_?fl(this.collapseLabel_,this.label_):fl(this.label_,this.collapseLabel_);this.collapsed_=!this.collapsed_},t.prototype.getCollapsible=function(){return this.collapsible_},t.prototype.setCollapsible=function(n){this.collapsible_!==n&&(this.collapsible_=n,this.element.classList.toggle("ol-uncollapsible"),!n&&this.collapsed_&&this.handleToggle_())},t.prototype.setCollapsed=function(n){this.collapsible_&&this.collapsed_!==n&&this.handleToggle_()},t.prototype.getCollapsed=function(){return this.collapsed_},t}(le);lg=function(n){function t(t){var i=t||{},f,u,s,r,h,e;n.call(this,{element:document.createElement("div"),render:i.render||get,target:i.target});f=void 0!==i.className?i.className:"ol-rotate";u=void 0!==i.label?i.label:"⇧";this.label_=null;"string"==typeof u?(this.label_=document.createElement("span"),this.label_.className="ol-compass",this.label_.textContent=u):(this.label_=u,this.label_.classList.add("ol-compass"));s=i.tipLabel?i.tipLabel:"Reset rotation";r=document.createElement("button");r.className=f+"-reset";r.setAttribute("type","button");r.title=s;r.appendChild(this.label_);o(r,a.CLICK,this.handleClick_,this);h=f+" "+ie+" "+gh;e=this.element;e.className=h;e.appendChild(r);this.callResetNorth_=i.resetNorth?i.resetNorth:void 0;this.duration_=void 0!==i.duration?i.duration:250;this.autoHide_=void 0===i.autoHide||i.autoHide;this.rotation_=void 0;this.autoHide_&&this.element.classList.add(hw)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleClick_=function(n){n.preventDefault();void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},t.prototype.resetNorth_=function(){var n=this.getMap().getView();n&&void 0!==n.getRotation()&&(this.duration_>0?n.animate({rotation:0,duration:this.duration_,easing:cf}):n.setRotation(0))},t}(le);ag=function(n){function t(t){var i=t||{},r,l,f;n.call(this,{element:document.createElement("div"),target:i.target});var e=void 0!==i.className?i.className:"ol-zoom",c=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInLabel?i.zoomInLabel:"+",h=void 0!==i.zoomOutLabel?i.zoomOutLabel:"−",v=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",y=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=e+"-in";u.setAttribute("type","button");u.title=v;u.appendChild("string"==typeof s?document.createTextNode(s):s);o(u,a.CLICK,this.handleClick_.bind(this,c));r=document.createElement("button");r.className=e+"-out";r.setAttribute("type","button");r.title=y;r.appendChild("string"==typeof h?document.createTextNode(h):h);o(r,a.CLICK,this.handleClick_.bind(this,-c));l=e+" "+ie+" "+gh;f=this.element;f.className=l;f.appendChild(u);f.appendChild(r);this.duration_=void 0!==i.duration?i.duration:250}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleClick_=function(n,t){t.preventDefault();this.zoomByDelta_(n)},t.prototype.zoomByDelta_=function(n){var t=this.getMap().getView(),i,r;t&&(i=t.getResolution(),i&&(r=t.constrainResolution(i,n),this.duration_>0?(t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:r,duration:this.duration_,easing:cf})):t.setResolution(r)))},t}(le);tv={ACTIVE:"active"};ge=function(n){function t(t){n.call(this);t.handleEvent&&(this.handleEvent=t.handleEvent);this.map_=null;this.setActive(!0)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getActive=function(){return this.get(tv.ACTIVE)},t.prototype.getMap=function(){return this.map_},t.prototype.handleEvent=function(){return!0},t.prototype.setActive=function(n){this.set(tv.ACTIVE,n)},t.prototype.setMap=function(n){this.map_=n},t}(rf);var tot=function(n){function t(t){n.call(this,{handleEvent:fgt});var i=t||{};this.delta_=i.delta?i.delta:1;this.duration_=void 0!==i.duration?i.duration:250}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ge),iot=function(n){var t=n.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},rot=function(n){var t=n.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},wg=function(n){return n.target.getTargetElement()===document.activeElement},iv=bu,uot=function(n){var t=n.originalEvent;return 0==t.button&&!(gbt&&vft&&t.ctrlKey)},bg=nh,fot=function(n){return"pointermove"==n.type},kg=function(n){return n.type==ht.SINGLECLICK},yw=function(n){var t=n.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},rv=function(n){var t=n.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},dg=function(n){var t=n.originalEvent.target.tagName;return"INPUT"!==t&&"SELECT"!==t&&"TEXTAREA"!==t},ae=function(n){var t=n.pointerEvent;return g(void 0!==t,56),"mouse"==t.pointerType},eot=function(n){var t=n.pointerEvent;return g(void 0!==t,56),t.isPrimary&&0===t.button};var lf=function(n){function t(t){var i=t||{};n.call(this,i);i.handleDownEvent&&(this.handleDownEvent=i.handleDownEvent);i.handleDragEvent&&(this.handleDragEvent=i.handleDragEvent);i.handleMoveEvent&&(this.handleMoveEvent=i.handleMoveEvent);i.handleUpEvent&&(this.handleUpEvent=i.handleUpEvent);i.stopDown&&(this.stopDown=i.stopDown);this.handlingDownUpSequence=!1;this.trackedPointers_={};this.targetPointers=[]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleDownEvent=function(){return!1},t.prototype.handleDragEvent=function(){},t.prototype.handleEvent=function(n){var i,r,t;return n.pointerEvent?(i=!1,(this.updateTrackedPointers_(n),this.handlingDownUpSequence)?n.type==ht.POINTERDRAG?this.handleDragEvent(n):n.type==ht.POINTERUP&&(r=this.handleUpEvent(n),this.handlingDownUpSequence=r&&this.targetPointers.length>0):n.type==ht.POINTERDOWN?(t=this.handleDownEvent(n),t&&n.preventDefault(),this.handlingDownUpSequence=t,i=this.stopDown(t)):n.type==ht.POINTERMOVE&&this.handleMoveEvent(n),!i):!0},t.prototype.handleMoveEvent=function(){},t.prototype.handleUpEvent=function(){return!1},t.prototype.stopDown=function(n){return n},t.prototype.updateTrackedPointers_=function(n){if(function(n){var t=n.type;return t===ht.POINTERDOWN||t===ht.POINTERDRAG||t===ht.POINTERUP}(n)){var i=n.pointerEvent,t=i.pointerId.toString();n.type==ht.POINTERUP?delete this.trackedPointers_[t]:n.type==ht.POINTERDOWN?this.trackedPointers_[t]=i:t in this.trackedPointers_&&(this.trackedPointers_[t]=i);this.targetPointers=wk(this.trackedPointers_)}},t}(ge),oot=function(n){function t(t){n.call(this,{stopDown:nh});var i=t||{};this.kinetic_=i.kinetic;this.lastCentroid=null;this.lastPointersCount_;this.panning_=!1;this.condition_=i.condition?i.condition:yw;this.noKinetic_=!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleDragEvent=function(n){var u,t;if(this.panning_||(this.panning_=!0,this.getMap().getView().setHint(oi,1)),u=this.targetPointers,t=gg(u),u.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(t[0],t[1]),this.lastCentroid){var f=this.lastCentroid[0]-t[0],e=t[1]-this.lastCentroid[1],r=n.map.getView(),i=[f,e];gd(i,r.getResolution());da(i,r.getRotation());ka(i,r.getCenter());i=r.constrainCenter(i);r.setCenter(i)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=t;this.lastPointersCount_=u.length},t.prototype.handleUpEvent=function(n){var i=n.map,t=i.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),u=this.kinetic_.getAngle(),e=t.getCenter(),f=i.getPixelFromCoordinate(e),o=i.getCoordinateFromPixel([f[0]-r*Math.cos(u),f[1]-r*Math.sin(u)]);t.animate({center:t.constrainCenter(o),duration:500,easing:cf})}return this.panning_&&(this.panning_=!1,t.setHint(oi,-1)),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},t.prototype.handleDownEvent=function(n){if(this.targetPointers.length>0&&this.condition_(n)){var t=n.map.getView();return this.lastCentroid=null,t.getAnimating()&&t.setCenter(n.frameState.viewState.center),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},t}(lf),sot=function(n){function t(t){var i=t||{};n.call(this,{stopDown:nh});this.condition_=i.condition?i.condition:rot;this.lastAngle_=void 0;this.duration_=void 0!==i.duration?i.duration:250}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleDragEvent=function(n){var i,t,e;if(ae(n)&&(i=n.map,t=i.getView(),t.getConstraints().rotation!==uw)){var r=i.getSize(),u=n.pixel,f=Math.atan2(r[1]/2-u[1],u[0]-r[0]/2);void 0!==this.lastAngle_&&(e=f-this.lastAngle_,aw(t,t.getRotation()-e));this.lastAngle_=f}},t.prototype.handleUpEvent=function(n){if(!ae(n))return!0;var t=n.map.getView();return t.setHint(oi,-1),yg(t,t.getRotation(),void 0,this.duration_),!1},t.prototype.handleDownEvent=function(n){return!!ae(n)&&!(!uot(n)||!this.condition_(n))&&(n.map.getView().setHint(oi,1),this.lastAngle_=void 0,!0)},t}(lf),egt=function(n){function t(t){n.call(this);this.geometry_=null;this.element_=document.createElement("div");this.element_.style.position="absolute";this.element_.className="ol-box "+t;this.map_=null;this.startPixel_=null;this.endPixel_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.setMap(null)},t.prototype.render_=function(){var n=this.startPixel_,t=this.endPixel_,i=this.element_.style;i.left=Math.min(n[0],t[0])+"px";i.top=Math.min(n[1],t[1])+"px";i.width=Math.abs(t[0]-n[0])+"px";i.height=Math.abs(t[1]-n[1])+"px"},t.prototype.setMap=function(n){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var t=this.element_.style;t.left=t.top=t.width=t.height="inherit"}this.map_=n;this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},t.prototype.setPixels=function(n,t){this.startPixel_=n;this.endPixel_=t;this.createOrUpdateGeometry();this.render_()},t.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,i=this.endPixel_,n=[t,[t[0],i[1]],i,[i[0],t[1]]].map(this.map_.getCoordinateFromPixel,this.map_);n[4]=n[0].slice();this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new or([n])},t.prototype.getGeometry=function(){return this.geometry_},t}(sa),ogt="boxstart",sgt="boxdrag",hgt="boxend",nn=function(n){function t(t,i,r){n.call(this,t);this.coordinate=i;this.mapBrowserEvent=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),hot=function(n){function t(t){n.call(this);var i=t||{};this.box_=new egt(i.className||"ol-dragbox");this.minArea_=void 0!==i.minArea?i.minArea:64;this.onBoxEnd_=i.onBoxEnd?i.onBoxEnd:wf;this.startPixel_=null;this.condition_=i.condition?i.condition:iv;this.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:this.defaultBoxEndCondition}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.defaultBoxEndCondition=function(n,t,i){var r=i[0]-t[0],u=i[1]-t[1];return r*r+u*u>=this.minArea_},t.prototype.getGeometry=function(){return this.box_.getGeometry()},t.prototype.handleDragEvent=function(n){ae(n)&&(this.box_.setPixels(this.startPixel_,n.pixel),this.dispatchEvent(new nn(sgt,n.coordinate,n)))},t.prototype.handleUpEvent=function(n){return!ae(n)||(this.box_.setMap(null),this.boxEndCondition_(n,this.startPixel_,n.pixel)&&(this.onBoxEnd_(n),this.dispatchEvent(new nn(hgt,n.coordinate,n))),!1)},t.prototype.handleDownEvent=function(n){return!!ae(n)&&!(!uot(n)||!this.condition_(n))&&(this.startPixel_=n.pixel,this.box_.setMap(n.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new nn(ogt,n.coordinate,n)),!0)},t}(lf);tn=function(n){function t(t){var i=t||{},r=i.condition?i.condition:rv;n.call(this,{condition:r,className:i.className||"ol-dragzoom",onBoxEnd:cgt});this.duration_=void 0!==i.duration?i.duration:200;this.out_=void 0!==i.out&&i.out}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(hot);rs={LEFT:37,UP:38,RIGHT:39,DOWN:40};rn=function(n){function t(t){n.call(this,{handleEvent:lgt});var i=t||{};this.defaultCondition_=function(n){return yw(n)&&dg(n)};this.condition_=void 0!==i.condition?i.condition:this.defaultCondition_;this.duration_=void 0!==i.duration?i.duration:100;this.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ge);var cot=function(n){function t(t){n.call(this,{handleEvent:agt});var i=t||{};this.condition_=i.condition?i.condition:dg;this.delta_=i.delta?i.delta:1;this.duration_=void 0!==i.duration?i.duration:100}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ge),lot="trackpad",vgt="wheel",aot=function(n){function t(t){var i=t||{};n.call(this,i);this.delta_=0;this.duration_=void 0!==i.duration?i.duration:250;this.timeout_=void 0!==i.timeout?i.timeout:80;this.useAnchor_=void 0===i.useAnchor||i.useAnchor;this.constrainResolution_=i.constrainResolution||!1;this.condition_=i.condition?i.condition:iv;this.lastAnchor_=null;this.startTime_=void 0;this.timeoutId_;this.mode_=void 0;this.trackpadEventGap_=400;this.trackpadTimeoutId_;this.trackpadDeltaPerZoom_=300;this.trackpadZoomBuffer_=1.5}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=void 0;this.getMap().getView().setHint(oi,-1)},t.prototype.handleEvent=function(n){var o,i,s,u,f,t,l,v;if(!this.condition_(n)||(o=n.type,o!==a.WHEEL&&o!==a.MOUSEWHEEL))return!0;if(n.preventDefault(),s=n.map,u=n.originalEvent,this.useAnchor_&&(this.lastAnchor_=n.coordinate),n.type==a.WHEEL?(i=u.deltaY,kbt&&u.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=tl),u.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)):n.type==a.MOUSEWHEEL&&(i=-u.wheelDeltaY,dbt&&(i/=3)),0===i)return!1;if(f=Date.now(),void 0===this.startTime_&&(this.startTime_=f),(!this.mode_||f-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(i)<4?lot:vgt),this.mode_===lot){t=s.getView();this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):t.setHint(oi,1);this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var r=t.getResolution()*Math.pow(2,i/this.trackpadDeltaPerZoom_),h=t.getMinResolution(),c=t.getMaxResolution(),e=0;return(r<h?(r=Math.max(r,h/this.trackpadZoomBuffer_),e=1):r>c&&(r=Math.min(r,c*this.trackpadZoomBuffer_),e=-1),this.lastAnchor_)&&(l=t.calculateCenterZoom(r,this.lastAnchor_),t.setCenter(t.constrainCenter(l))),t.setResolution(r),0===e&&this.constrainResolution_&&t.animate({resolution:t.constrainResolution(r,i>0?-1:1),easing:cf,anchor:this.lastAnchor_,duration:this.duration_}),e>0?t.animate({resolution:h,easing:cf,anchor:this.lastAnchor_,duration:500}):e<0&&t.animate({resolution:c,easing:cf,anchor:this.lastAnchor_,duration:500}),this.startTime_=f,!1}return this.delta_+=i,v=Math.max(this.timeout_-(f-this.startTime_),0),clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,s),v),!1},t.prototype.handleWheelZoom_=function(n){var t=n.getView();t.getAnimating()&&t.cancelAnimations();pg(t,-vi(this.delta_,-1,1),this.lastAnchor_,this.duration_);this.mode_=void 0;this.delta_=0;this.lastAnchor_=null;this.startTime_=void 0;this.timeoutId_=void 0},t.prototype.setMouseAnchor=function(n){this.useAnchor_=n;n||(this.lastAnchor_=null)},t}(ge),vot=function(n){function t(t){var i=t||{},r=i;r.stopDown||(r.stopDown=nh);n.call(this,r);this.anchor_=null;this.lastAngle_=void 0;this.rotating_=!1;this.rotationDelta_=0;this.threshold_=void 0!==i.threshold?i.threshold:.3;this.duration_=void 0!==i.duration?i.duration:250}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleDragEvent=function(n){var e=0,o=this.targetPointers[0],s=this.targetPointers[1],h=Math.atan2(s.clientY-o.clientY,s.clientX-o.clientX),u,t,i,f,r,c;void 0!==this.lastAngle_&&(u=h-this.lastAngle_,this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u);this.lastAngle_=h;t=n.map;i=t.getView();i.getConstraints().rotation!==uw&&(f=t.getViewport().getBoundingClientRect(),r=gg(this.targetPointers),(r[0]-=f.left,r[1]-=f.top,this.anchor_=t.getCoordinateFromPixel(r),this.rotating_)&&(c=i.getRotation(),t.render(),aw(i,c+e,this.anchor_)))},t.prototype.handleUpEvent=function(n){if(this.targetPointers.length<2){var t=n.map.getView();return(t.setHint(oi,-1),this.rotating_)&&yg(t,t.getRotation(),this.anchor_,this.duration_),!1}return!0},t.prototype.handleDownEvent=function(n){if(this.targetPointers.length>=2){var t=n.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().setHint(oi,1),!0}return!1},t}(lf),yot=function(n){function t(t){var i=t||{},r=i;r.stopDown||(r.stopDown=nh);n.call(this,r);this.constrainResolution_=i.constrainResolution||!1;this.anchor_=null;this.duration_=void 0!==i.duration?i.duration:400;this.lastDistance_=void 0;this.lastScaleDelta_=1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleDragEvent=function(n){var t=1,c=this.targetPointers[0],l=this.targetPointers[1],a=c.clientX-l.clientX,v=c.clientY-l.clientY,y=Math.sqrt(a*a+v*v),h,f;void 0!==this.lastDistance_&&(t=this.lastDistance_/y);this.lastDistance_=y;var r=n.map,u=r.getView(),e=u.getResolution(),o=u.getMaxResolution(),s=u.getMinResolution(),i=e*t;i>o?(t=o/e,i=o):i<s&&(t=s/e,i=s);1!=t&&(this.lastScaleDelta_=t);h=r.getViewport().getBoundingClientRect();f=gg(this.targetPointers);f[0]-=h.left;f[1]-=h.top;this.anchor_=r.getCoordinateFromPixel(f);r.render();vw(u,i,this.anchor_)},t.prototype.handleUpEvent=function(n){var t,i,r;return this.targetPointers.length<2?(t=n.map.getView(),t.setHint(oi,-1),i=t.getResolution(),(this.constrainResolution_||i<t.getMinResolution()||i>t.getMaxResolution())&&(r=this.lastScaleDelta_-1,not(t,i,this.anchor_,this.duration_,r)),!1):!0},t.prototype.handleDownEvent=function(n){if(this.targetPointers.length>=2){var t=n.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().setHint(oi,1),!0}return!1},t}(lf);var pot=.5,fn=function(n){function t(t,i,r,u){n.call(this);this.extent=t;this.pixelRatio_=r;this.resolution=i;this.state=u}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.changed=function(){this.dispatchEvent(a.CHANGE)},t.prototype.getExtent=function(){return this.extent},t.prototype.getImage=function(){return p()},t.prototype.getPixelRatio=function(){return this.pixelRatio_},t.prototype.getResolution=function(){return this.resolution},t.prototype.getState=function(){return this.state},t.prototype.load=function(){p()},t}(th),ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3},en=function(n){function t(t,i,r,u,f){var e=void 0!==f?ot.IDLE:ot.LOADED;n.call(this,t,i,r,e);this.loader_=void 0!==f?f:null;this.canvas_=u;this.error_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getError=function(){return this.error_},t.prototype.handleLoad_=function(n){n?(this.error_=n,this.state=ot.ERROR):this.state=ot.LOADED;this.changed()},t.prototype.load=function(){this.state==ot.IDLE&&(this.state=ot.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},t.prototype.getImage=function(){return this.canvas_},t}(fn),kr={IMAGE:"IMAGE",TILE:"TILE",VECTOR_TILE:"VECTOR_TILE",VECTOR:"VECTOR"},wot={IMAGE:"image",VECTOR:"vector"},pw=function(n){function t(t,i,r,u,f){n.call(this,t);this.vectorContext=i;this.frameState=r;this.context=u;this.glContext=f}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),on=function(n){function t(t){n.call(this);this.highWaterMark=void 0!==t?t:2048;this.count_=0;this.entries_={};this.oldest_=null;this.newest_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0;this.entries_={};this.oldest_=null;this.newest_=null;this.dispatchEvent(a.CLEAR)},t.prototype.containsKey=function(n){return this.entries_.hasOwnProperty(n)},t.prototype.forEach=function(n,t){for(var i=this.oldest_;i;)n.call(t,i.value_,i.key_,this),i=i.newer},t.prototype.get=function(n){var t=this.entries_[n];return g(void 0!==t,15),t===this.newest_?t.value_:(t===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(t.newer.older=t.older,t.older.newer=t.newer),t.newer=null,t.older=this.newest_,this.newest_.newer=t,this.newest_=t,t.value_)},t.prototype.remove=function(n){var t=this.entries_[n];return g(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[n],--this.count_,t.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){for(var t=new Array(this.count_),i=0,n=this.newest_;n;n=n.older)t[i++]=n.key_;return t},t.prototype.getValues=function(){for(var t=new Array(this.count_),i=0,n=this.newest_;n;n=n.older)t[i++]=n.value_;return t},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var n=this.oldest_;return delete this.entries_[n.key_],n.newer&&(n.newer.older=null),this.oldest_=n.newer,this.oldest_||(this.newest_=null),--this.count_,n.value_},t.prototype.replace=function(n,t){this.get(n);this.entries_[n].value_=t},t.prototype.set=function(n,t){g(!(n in this.entries_),16);var i={key_:n,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i;this.newest_=i;this.entries_[n]=i;++this.count_},t.prototype.setSize=function(n){this.highWaterMark=n},t.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},t}(th),no=[0,0,0,1],ww=[],uv=[0,0,0,1],el=[0,0,0,0],ve=new on,ygt={},bw=null,bot={},pgt=function(){function o(n){for(var o,a,t=kot(),i=100;i<=700;i+=300){for(var l=i+" ",h=!0,c=0;c<s;++c)o=f[c],(t.font=l+u+o,r=t.measureText(e).width,n!=o)&&(t.font=l+u+n+","+o,a=t.measureText(e).width,h=h&&a!=r);if(h)return!0}return!1}function h(){var u=!0,r;for(r in n)n[r]<i&&(o(r)?(n[r]=i,pf(bot),bw=null,ve.clear()):(++n[r],u=!1));u&&(clearInterval(t),t=void 0)}var t,r,i=60,n=ygt,u="32px ",f=["monospace","serif"],s=f.length,e="wmytzilWMYTZIL@#/&?$%10";return function(r){var e=ugt(r),f,s,u;if(e)for(f=0,s=e.length;f<s;++f)u=e[f],u in n||(n[u]=i,o(u)||(n[u]=0,void 0===t&&(t=setInterval(h,32))))}}();dot=function(){var n,t=bot;return function(i){var r=t[i];return void 0==r&&(n||((n=document.createElement("span")).textContent="M",n.style.margin=n.style.padding="0 !important",n.style.position="absolute !important",n.style.left="-99999px !important"),n.style.font=i,document.body.appendChild(n),r=t[i]=n.offsetHeight,document.body.removeChild(n)),r}}();hn=[1,0,0,1,0,0];sr=function(){};sr.prototype.drawCustom=function(){};sr.prototype.drawGeometry=function(){};sr.prototype.setStyle=function(){};sr.prototype.drawCircle=function(){};sr.prototype.drawFeature=function(){};sr.prototype.drawGeometryCollection=function(){};sr.prototype.drawLineString=function(){};sr.prototype.drawMultiLineString=function(){};sr.prototype.drawMultiPoint=function(){};sr.prototype.drawMultiPolygon=function(){};sr.prototype.drawPoint=function(){};sr.prototype.drawPolygon=function(){};sr.prototype.drawText=function(){};sr.prototype.setFillStrokeStyle=function(){};sr.prototype.setImageStyle=function(){};sr.prototype.setTextStyle=function(){};var fv=sr,cn=function(n){function t(t,i,r,u,f){n.call(this);this.context_=t;this.pixelRatio_=i;this.extent_=r;this.transform_=u;this.viewRotation_=f;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;this.imageWidth_=0;this.text_="";this.textOffsetX_=0;this.textOffsetY_=0;this.textRotateWithView_=!1;this.textRotation_=0;this.textScale_=0;this.textFillState_=null;this.textStrokeState_=null;this.textState_=null;this.pixelCoordinates_=[];this.tmpLocalTransform_=[1,0,0,1,0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawImages_=function(n,t,i){var u,f,v,o,s,h,c;if(this.image_){var e=vo(n,t,i,2,this.transform_,this.pixelCoordinates_),r=this.context_,l=this.tmpLocalTransform_,a=r.globalAlpha;for(1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_),u=this.imageRotation_,this.imageRotateWithView_&&(u+=this.viewRotation_),f=0,v=e.length;f<v;f+=2)o=e[f]-this.imageAnchorX_,s=e[f+1]-this.imageAnchorY_,(0!==u||1!=this.imageScale_)&&(h=o+this.imageAnchorX_,c=s+this.imageAnchorY_,cu(l,h,c,this.imageScale_,this.imageScale_,u,-h,-c),r.setTransform.apply(r,l)),r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,o,s,this.imageWidth_,this.imageHeight_);0===u&&1==this.imageScale_||r.setTransform(1,0,0,1,0,0);1!=this.imageOpacity_&&(r.globalAlpha=a)}},t.prototype.drawText_=function(n,t,i,r){var f,e,h;if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_);this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_);this.setContextTextState_(this.textState_);var s=vo(n,t,i,r,this.transform_,this.pixelCoordinates_),u=this.context_,o=this.textRotation_;for(this.textRotateWithView_&&(o+=this.viewRotation_);t<i;t+=r)f=s[t]+this.textOffsetX_,e=s[t+1]+this.textOffsetY_,(0!==o||1!=this.textScale_)&&(h=cu(this.tmpLocalTransform_,f,e,this.textScale_,this.textScale_,o,-f,-e),u.setTransform.apply(u,h)),this.textStrokeState_&&u.strokeText(this.text_,f,e),this.textFillState_&&u.fillText(this.text_,f,e);0===o&&1==this.textScale_||u.setTransform(1,0,0,1,0,0)}},t.prototype.moveToLineTo_=function(n,t,i,r,u){var o=this.context_,f=vo(n,t,i,r,this.transform_,this.pixelCoordinates_),s,e;for(o.moveTo(f[0],f[1]),s=f.length,u&&(s-=2),e=2;e<s;e+=2)o.lineTo(f[e],f[e+1]);return u&&o.closePath(),i},t.prototype.drawRings_=function(n,t,i,r){for(var u=0,f=i.length;u<f;++u)t=this.moveToLineTo_(n,t,i[u],r,!0);return t},t.prototype.drawCircle=function(n){if(dt(this.extent_,n.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_);this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var t=function(n,t,i){var r=n.getFlatCoordinates(),u;return r?(u=n.getStride(),vo(r,0,r.length,u,t,i)):null}(n,this.transform_,this.pixelCoordinates_),r=t[2]-t[0],u=t[3]-t[1],f=Math.sqrt(r*r+u*u),i=this.context_;i.beginPath();i.arc(t[0],t[1],f,0,2*Math.PI);this.fillState_&&i.fill();this.strokeState_&&i.stroke()}""!==this.text_&&this.drawText_(n.getCenter(),0,2,2)}},t.prototype.setStyle=function(n){this.setFillStrokeStyle(n.getFill(),n.getStroke());this.setImageStyle(n.getImage());this.setTextStyle(n.getText())},t.prototype.drawGeometry=function(n){switch(n.getType()){case f.POINT:this.drawPoint(n);break;case f.LINE_STRING:this.drawLineString(n);break;case f.POLYGON:this.drawPolygon(n);break;case f.MULTI_POINT:this.drawMultiPoint(n);break;case f.MULTI_LINE_STRING:this.drawMultiLineString(n);break;case f.MULTI_POLYGON:this.drawMultiPolygon(n);break;case f.GEOMETRY_COLLECTION:this.drawGeometryCollection(n);break;case f.CIRCLE:this.drawCircle(n)}},t.prototype.drawFeature=function(n,t){var i=t.getGeometryFunction()(n);i&&dt(this.extent_,i.getExtent())&&(this.setStyle(t),this.drawGeometry(i))},t.prototype.drawGeometryCollection=function(n){for(var i=n.getGeometriesArray(),t=0,r=i.length;t<r;++t)this.drawGeometry(i[t])},t.prototype.drawPoint=function(n){var t=n.getFlatCoordinates(),i=n.getStride();this.image_&&this.drawImages_(t,0,t.length,i);""!==this.text_&&this.drawText_(t,0,t.length,i)},t.prototype.drawMultiPoint=function(n){var t=n.getFlatCoordinates(),i=n.getStride();this.image_&&this.drawImages_(t,0,t.length,i);""!==this.text_&&this.drawText_(t,0,t.length,i)},t.prototype.drawLineString=function(n){var t,i,r;dt(this.extent_,n.getExtent())&&(this.strokeState_&&(this.setContextStrokeState_(this.strokeState_),t=this.context_,i=n.getFlatCoordinates(),t.beginPath(),this.moveToLineTo_(i,0,i.length,n.getStride(),!1),t.stroke()),""!==this.text_&&(r=n.getFlatMidpoint(),this.drawText_(r,0,2,2)))},t.prototype.drawMultiLineString=function(n){var o=n.getExtent(),t,e,i;if(dt(this.extent_,o)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var r=this.context_,s=n.getFlatCoordinates(),u=0,f=n.getEnds(),h=n.getStride();for(r.beginPath(),t=0,e=f.length;t<e;++t)u=this.moveToLineTo_(s,u,f[t],h,!1);r.stroke()}""!==this.text_&&(i=n.getFlatMidpoints(),this.drawText_(i,0,i.length,2))}},t.prototype.drawPolygon=function(n){var t,i;dt(this.extent_,n.getExtent())&&((this.strokeState_||this.fillState_)&&(this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_),t=this.context_,t.beginPath(),this.drawRings_(n.getOrientedFlatCoordinates(),0,n.getEnds(),n.getStride()),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()),""!==this.text_&&(i=n.getFlatInteriorPoint(),this.drawText_(i,0,2,2)))},t.prototype.drawMultiPolygon=function(n){var t,e,o,r;if(dt(this.extent_,n.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_);this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var i=this.context_,s=n.getOrientedFlatCoordinates(),u=0,f=n.getEndss(),h=n.getStride();for(i.beginPath(),t=0,e=f.length;t<e;++t)o=f[t],u=this.drawRings_(s,u,o,h);this.fillState_&&i.fill();this.strokeState_&&i.stroke()}""!==this.text_&&(r=n.getFlatInteriorPoints(),this.drawText_(r,0,r.length,2))}},t.prototype.setContextFillState_=function(n){var i=this.context_,t=this.contextFillState_;t?t.fillStyle!=n.fillStyle&&(t.fillStyle=i.fillStyle=n.fillStyle):(i.fillStyle=n.fillStyle,this.contextFillState_={fillStyle:n.fillStyle})},t.prototype.setContextStrokeState_=function(n){var i=this.context_,t=this.contextStrokeState_;t?(t.lineCap!=n.lineCap&&(t.lineCap=i.lineCap=n.lineCap),il&&(uf(t.lineDash,n.lineDash)||i.setLineDash(t.lineDash=n.lineDash),t.lineDashOffset!=n.lineDashOffset&&(t.lineDashOffset=i.lineDashOffset=n.lineDashOffset)),t.lineJoin!=n.lineJoin&&(t.lineJoin=i.lineJoin=n.lineJoin),t.lineWidth!=n.lineWidth&&(t.lineWidth=i.lineWidth=n.lineWidth),t.miterLimit!=n.miterLimit&&(t.miterLimit=i.miterLimit=n.miterLimit),t.strokeStyle!=n.strokeStyle&&(t.strokeStyle=i.strokeStyle=n.strokeStyle)):(i.lineCap=n.lineCap,il&&(i.setLineDash(n.lineDash),i.lineDashOffset=n.lineDashOffset),i.lineJoin=n.lineJoin,i.lineWidth=n.lineWidth,i.miterLimit=n.miterLimit,i.strokeStyle=n.strokeStyle,this.contextStrokeState_={lineCap:n.lineCap,lineDash:n.lineDash,lineDashOffset:n.lineDashOffset,lineJoin:n.lineJoin,lineWidth:n.lineWidth,miterLimit:n.miterLimit,strokeStyle:n.strokeStyle})},t.prototype.setContextTextState_=function(n){var i=this.context_,t=this.contextTextState_,r=n.textAlign?n.textAlign:"center";t?(t.font!=n.font&&(t.font=i.font=n.font),t.textAlign!=r&&(t.textAlign=i.textAlign=r),t.textBaseline!=n.textBaseline&&(t.textBaseline=i.textBaseline=n.textBaseline)):(i.font=n.font,i.textAlign=r,i.textBaseline=n.textBaseline,this.contextTextState_={font:n.font,textAlign:r,textBaseline:n.textBaseline})},t.prototype.setFillStrokeStyle=function(n,t){var i;if(n?(i=n.getColor(),this.fillState_={fillStyle:du(i||no)}):this.fillState_=null,t){var o=t.getColor(),r=t.getLineCap(),s=t.getLineDash(),h=t.getLineDashOffset(),u=t.getLineJoin(),f=t.getWidth(),e=t.getMiterLimit();this.strokeState_={lineCap:void 0!==r?r:"round",lineDash:s||ww,lineDashOffset:h||0,lineJoin:void 0!==u?u:"round",lineWidth:this.pixelRatio_*(void 0!==f?f:1),miterLimit:void 0!==e?e:10,strokeStyle:du(o||uv)}}else this.strokeState_=null},t.prototype.setImageStyle=function(n){if(n){var t=n.getAnchor(),u=n.getImage(1),i=n.getOrigin(),r=n.getSize();this.imageAnchorX_=t[0];this.imageAnchorY_=t[1];this.imageHeight_=r[1];this.image_=u;this.imageOpacity_=n.getOpacity();this.imageOriginX_=i[0];this.imageOriginY_=i[1];this.imageRotateWithView_=n.getRotateWithView();this.imageRotation_=n.getRotation();this.imageScale_=n.getScale()*this.pixelRatio_;this.imageWidth_=r[0]}else this.image_=null},t.prototype.setTextStyle=function(n){var i,r,t;if(n){if(i=n.getFill(),i?(r=i.getColor(),this.textFillState_={fillStyle:du(r||no)}):this.textFillState_=null,t=n.getStroke(),t){var b=t.getColor(),u=t.getLineCap(),k=t.getLineDash(),d=t.getLineDashOffset(),f=t.getLineJoin(),e=t.getWidth(),o=t.getMiterLimit();this.textStrokeState_={lineCap:void 0!==u?u:"round",lineDash:k||ww,lineDashOffset:d||0,lineJoin:void 0!==f?f:"round",lineWidth:void 0!==e?e:1,miterLimit:void 0!==o?o:10,strokeStyle:du(b||uv)}}else this.textStrokeState_=null;var s=n.getFont(),h=n.getOffsetX(),c=n.getOffsetY(),l=n.getRotateWithView(),a=n.getRotation(),v=n.getScale(),y=n.getText(),p=n.getTextAlign(),w=n.getTextBaseline();this.textState_={font:void 0!==s?s:"10px sans-serif",textAlign:void 0!==p?p:"center",textBaseline:void 0!==w?w:"middle"};this.text_=void 0!==y?y:"";this.textOffsetX_=void 0!==h?this.pixelRatio_*h:0;this.textOffsetY_=void 0!==c?this.pixelRatio_*c:0;this.textRotateWithView_=void 0!==l&&l;this.textRotation_=void 0!==a?a:0;this.textScale_=this.pixelRatio_*(void 0!==v?v:1)}else this.text_=""},t}(fv),ol=function(){this.cache_={};this.cacheSize_=0;this.maxCacheSize_=32};ol.prototype.clear=function(){this.cache_={};this.cacheSize_=0};ol.prototype.expire=function(){var t,n,i;if(this.cacheSize_>this.maxCacheSize_){t=0;for(n in this.cache_)i=this.cache_[n],0!=(3&t++)||i.hasListener()||(delete this.cache_[n],--this.cacheSize_)}};ol.prototype.get=function(n,t,i){var r=nst(n,t,i);return r in this.cache_?this.cache_[r]:null};ol.prototype.set=function(n,t,i,r){var u=nst(n,t,i);this.cache_[u]=r;++this.cacheSize_};ol.prototype.setSize=function(n){this.maxCacheSize_=n;this.expire()};ev=new ol;var ist=function(n){function t(t){n.call(this);this.map_=t;this.layerRenderers_={};this.layerRendererListeners_={};this.layerRendererConstructors_=[]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.dispatchRenderEvent=function(){p()},t.prototype.registerLayerRenderers=function(n){this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_,n)},t.prototype.calculateMatrices2D=function(n){var t=n.viewState,i=n.coordinateToPixelTransform,r=n.pixelToCoordinateTransform;cu(i,n.size[0]/2,n.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]);nft(gut(r,i))},t.prototype.removeLayerRenderers=function(){for(var n in this.layerRenderers_)this.removeLayerRendererByKey_(n).dispose()},t.prototype.forEachFeatureAtCoordinate=function(n,t,i,r,u,f,e){function tt(n,i){var f=t.layerStates[y(i)].managed;if(!(y(n)in t.skippedFeatureUids)||f)return r.call(u,n,f?i:null)}var l,w=t.viewState,nt=w.resolution,b=w.projection,k=n,h,a,v,c,g,p;if(b.canWrapX()){var o=b.getExtent(),d=wt(o),s=n[0];(s<o[0]||s>o[2])&&(k=[s+d*Math.ceil((o[0]-s)/d),n[1]])}for(a=t.layerStatesArray,h=a.length-1;h>=0;--h)if(v=a[h],c=v.layer,is(v,nt)&&f.call(e,c)&&(g=this.getLayerRenderer(c),p=c.getSource(),p&&(l=g.forEachFeatureAtCoordinate(p.getWrapX()?k:n,t,i,tt)),l))return l},t.prototype.forEachLayerAtPixel=function(){return p()},t.prototype.hasFeatureAtCoordinate=function(n,t,i,r,u){return void 0!==this.forEachFeatureAtCoordinate(n,t,i,bu,this,r,u)},t.prototype.getLayerRenderer=function(n){var i=y(n),t,r,f,u;if(i in this.layerRenderers_)return this.layerRenderers_[i];for(r=0,f=this.layerRendererConstructors_.length;r<f;++r)if(u=this.layerRendererConstructors_[r],u.handles(n)){t=u.create(this,n);break}if(!t)throw new Error("Unable to create renderer for layer: "+n.getType());return this.layerRenderers_[i]=t,this.layerRendererListeners_[i]=o(t,a.CHANGE,this.handleLayerRendererChange_,this),t},t.prototype.getLayerRendererByKey=function(n){return this.layerRenderers_[n]},t.prototype.getLayerRenderers=function(){return this.layerRenderers_},t.prototype.getMap=function(){return this.map_},t.prototype.handleLayerRendererChange_=function(){this.map_.render()},t.prototype.removeLayerRendererByKey_=function(n){var t=this.layerRenderers_[n];return delete this.layerRenderers_[n],lt(this.layerRendererListeners_[n]),delete this.layerRendererListeners_[n],t},t.prototype.removeUnusedLayerRenderers_=function(n,t){for(var i in this.layerRenderers_)t&&i in t.layerStates||this.removeLayerRendererByKey_(i).dispose()},t.prototype.renderFrame=function(){p()},t.prototype.scheduleExpireIconCache=function(n){n.postRenderFunctions.push(wgt)},t.prototype.scheduleRemoveUnusedLayerRenderers=function(n){for(var t in this.layerRenderers_)if(!(t in n.layerStates))return void n.postRenderFunctions.push(this.removeUnusedLayerRenderers_.bind(this))},t}(sa),kw=[],rst=function(n){function t(t){n.call(this,t);var i=t.getViewport();this.context_=kt();this.canvas_=this.context_.canvas;this.canvas_.style.width="100%";this.canvas_.style.height="100%";this.canvas_.style.display="block";this.canvas_.className=ie;i.insertBefore(this.canvas_,i.childNodes[0]||null);this.renderedVisible_=!0;this.transform_=[1,0,0,1,0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.dispatchRenderEvent=function(n,t){var i=this.getMap(),r=this.context_;if(i.hasListener(n)){var u=t.extent,f=t.pixelRatio,e=t.viewState.rotation,o=this.getTransform(t),s=new cn(r,f,u,o,e),h=new pw(n,s,t,r,null);i.dispatchEvent(h)}},t.prototype.getTransform=function(n){var t=n.viewState,r=this.canvas_.width/2,u=this.canvas_.height/2,i=n.pixelRatio/t.resolution,f=-i,e=-t.rotation,o=-t.center[0],s=-t.center[1];return cu(this.transform_,r,u,i,f,e,o,s)},t.prototype.renderFrame=function(n){var f,e,o,h,c;if(n){var t=this.context_,s=n.pixelRatio,r=Math.round(n.size[0]*s),u=Math.round(n.size[1]*s);for(this.canvas_.width!=r||this.canvas_.height!=u?(this.canvas_.width=r,this.canvas_.height=u):t.clearRect(0,0,r,u),f=n.viewState.rotation,this.calculateMatrices2D(n),this.dispatchRenderEvent(gr.PRECOMPOSE,n),e=n.layerStatesArray,gk(e,tst),f&&(t.save(),to(t,f,r/2,u/2)),c=n.viewState.resolution,o=0,h=e.length;o<h;++o){var i=e[o],a=i.layer,l=this.getLayerRenderer(a);is(i,c)&&i.sourceState==pi.READY&&l.prepareFrame(n,i)&&l.composeFrame(n,i,t)}f&&t.restore();this.dispatchRenderEvent(gr.POSTCOMPOSE,n);this.renderedVisible_||(this.canvas_.style.display="",this.renderedVisible_=!0);this.scheduleRemoveUnusedLayerRenderers(n);this.scheduleExpireIconCache(n)}else this.renderedVisible_&&(this.canvas_.style.display="none",this.renderedVisible_=!1)},t.prototype.forEachLayerAtPixel=function(n,t,i,r,u,f,e){for(var c,a=t.viewState.resolution,l=t.layerStatesArray,v=l.length,y=wr(t.pixelToCoordinateTransform,n.slice()),s,h,o=v-1;o>=0;--o)if(s=l[o],h=s.layer,is(s,a)&&f.call(e,h)&&(c=this.getLayerRenderer(h).forEachLayerAtCoordinate(y,t,i,r,u)))return c},t.prototype.registerLayerRenderers=function(t){var i,u,r;for(n.prototype.registerLayerRenderers.call(this,t),i=0,u=t.length;i<u;++i)r=t[i],tr(kw,r)||kw.push(r)},t}(ist),ust=function(n){function t(t){n.call(this);this.layer_=t}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createLoadedTileFinder=function(n,t,i){return function(r,u){return n.forEachLoadedTile(t,r,u,function(n){i[r]||(i[r]={});i[r][n.tileCoord.toString()]=n})}},t.prototype.forEachFeatureAtCoordinate=function(){},t.prototype.getLayer=function(){return this.layer_},t.prototype.handleImageChange_=function(n){n.target.getState()===ot.LOADED&&this.renderIfReadyAndVisible()},t.prototype.hasFeatureAtCoordinate=function(){return!1},t.prototype.loadImage=function(n){var t=n.getState();return t!=ot.LOADED&&t!=ot.ERROR&&o(n,a.CHANGE,this.handleImageChange_,this),t==ot.IDLE&&(n.load(),t=n.getState()),t==ot.LOADED},t.prototype.renderIfReadyAndVisible=function(){var n=this.getLayer();n.getVisible()&&n.getSourceState()==pi.READY&&this.changed()},t.prototype.scheduleExpireCache=function(n,t){if(t.canExpireCache()){var i=function(n,t,i){var r=y(n);r in i.usedTiles&&n.expireCache(i.viewState.projection,i.usedTiles[r])}.bind(null,t);n.postRenderFunctions.push(i)}},t.prototype.updateUsedTiles=function(n,t,i,r){var u=y(t),f=i.toString();u in n?f in n[u]?n[u][f].extend(r):n[u][f]=r:(n[u]={},n[u][f]=r)},t.prototype.manageTilePyramid=function(n,t,i,r,u,f,e,o,s,h){var b=y(t),a,v,d,p,w,l,g,k;for((b in n.wantedTiles)||(n.wantedTiles[b]={}),g=n.wantedTiles[b],k=n.tileQueue,l=i.getMinZoom();l<=e;++l)for(v=i.getTileRangeForExtentAndZ(f,l,v),d=i.getResolution(l),p=v.minX;p<=v.maxX;++p)for(w=v.minY;w<=v.maxY;++w)e-l<=o?((a=t.getTile(l,p,w,r,u)).getState()==c.IDLE&&(g[a.getKey()]=!0,k.isKeyQueued(a.getKey())||k.enqueue([a,b,i.getTileCoordCenter(a.tileCoord),d])),void 0!==s&&s.call(h,a)):t.useTile(l,p,w,u)},t}(kk),fst=function(n){function t(t){n.call(this,t);this.renderedResolution;this.transform_=[1,0,0,1,0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clip=function(n,t,i){var r=t.pixelRatio,s=t.size[0]*r,h=t.size[1]*r,c=t.viewState.rotation,u=bf(i),f=ao(i),e=fh(i),o=de(i);wr(t.coordinateToPixelTransform,u);wr(t.coordinateToPixelTransform,f);wr(t.coordinateToPixelTransform,e);wr(t.coordinateToPixelTransform,o);n.save();to(n,-c,s/2,h/2);n.beginPath();n.moveTo(u[0]*r,u[1]*r);n.lineTo(f[0]*r,f[1]*r);n.lineTo(e[0]*r,e[1]*r);n.lineTo(o[0]*r,o[1]*r);n.clip();to(n,c,s/2,h/2)},t.prototype.dispatchComposeEvent_=function(n,t,i,r){var u=this.getLayer();if(u.hasListener(n)){var f=i.size[0]*i.pixelRatio,e=i.size[1]*i.pixelRatio,o=i.viewState.rotation;to(t,-o,f/2,e/2);var s=void 0!==r?r:this.getTransform(i,0),h=new cn(t,i.pixelRatio,i.extent,s,i.viewState.rotation),c=new pw(n,h,i,t,null);u.dispatchEvent(c);to(t,o,f/2,e/2)}},t.prototype.forEachLayerAtCoordinate=function(n,t,i,r,u){if(this.forEachFeatureAtCoordinate(n,t,i,bu))return r.call(u,this.getLayer(),null)},t.prototype.postCompose=function(n,t,i,r){this.dispatchComposeEvent_(gr.POSTCOMPOSE,n,t,r)},t.prototype.preCompose=function(n,t,i){this.dispatchComposeEvent_(gr.PRECOMPOSE,n,t,i)},t.prototype.dispatchRenderEvent=function(n,t,i){this.dispatchComposeEvent_(gr.RENDER,n,t,i)},t.prototype.getTransform=function(n,t){var i=n.viewState,r=n.pixelRatio,f=r*n.size[0]/2,e=r*n.size[1]/2,u=r/i.resolution,o=-u,s=-i.rotation,h=-i.center[0]+t,c=-i.center[1];return cu(this.transform_,f,e,u,o,s,h,c)},t.prototype.composeFrame=function(){p()},t.prototype.prepareFrame=function(){return p()},t}(ust),est=function(n){function t(t){n.call(this,t);this.coordinateToCanvasPixelTransform=[1,0,0,1,0,0];this.hitCanvasContext_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.composeFrame=function(n,t,i){var r,u,e,f,o;if(this.preCompose(i,n),r=this.getImage(),r){u=t.extent;e=void 0!==u&&!lr(u,n.extent)&&dt(u,n.extent);e&&this.clip(i,n,u);f=this.getImageTransform();o=i.globalAlpha;i.globalAlpha=t.opacity;var c=f[4],l=f[5],s=r.width*f[0],h=r.height*f[3];s>=.5&&h>=.5&&i.drawImage(r,0,0,+r.width,+r.height,Math.round(c),Math.round(l),Math.round(s),Math.round(h));i.globalAlpha=o;e&&i.restore()}this.postCompose(i,n,t)},t.prototype.getImage=function(){return p()},t.prototype.getImageTransform=function(){return p()},t.prototype.forEachLayerAtCoordinate=function(n,t,i,r,u){var f,e;if(this.getImage())return f=wr(this.coordinateToCanvasPixelTransform,n.slice()),gd(f,t.viewState.resolution/this.renderedResolution),this.hitCanvasContext_||(this.hitCanvasContext_=kt(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.getImage(),f[0],f[1],1,1,0,0,1,1),e=this.hitCanvasContext_.getImageData(0,0,1,1).data,e[3]>0?r.call(u,this.getLayer(),e):void 0},t}(fst),dw=function(n){function t(i){var r,f,u;if(n.call(this,i),this.image_=null,this.imageTransform_=[1,0,0,1,0,0],this.skippedFeatures_=[],this.vectorRenderer_=null,i.getType()===kr.VECTOR)for(r=0,f=kw.length;r<f;++r)if(u=kw[r],u!==t&&u.handles(i)){this.vectorRenderer_=new u(i);break}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.vectorRenderer_&&this.vectorRenderer_.dispose();n.prototype.disposeInternal.call(this)},t.prototype.getImage=function(){return this.image_?this.image_.getImage():null},t.prototype.getImageTransform=function(){return this.imageTransform_},t.prototype.prepareFrame=function(n,t){var r,i=n.pixelRatio,s=n.size,y=n.viewState,h=y.center,u=y.resolution,tt=this.getLayer().getSource(),p=n.viewHints,e=this.vectorRenderer_,f=n.extent,w,c;if(e||void 0===t.extent||(f=of(f,t.extent)),!p[lu]&&!p[oi]&&!eh(f)){if(w=y.projection,c=this.skippedFeatures_,e){var l=e.context,o=nt({},n,{size:[wt(f)/u,ti(f)/u],viewState:nt({},n.viewState,{rotation:0})}),b=Object.keys(o.skippedFeatureUids).sort();r=new en(f,u,i,l.canvas,function(n){e.prepareFrame(o,t)&&(e.replayGroupChanged||!uf(c,b))&&(l.canvas.width=o.size[0]*i,l.canvas.height=o.size[1]*i,e.compose(l,o,t),c=b,n())})}else r=tt.getImage(f,u,i,w);r&&this.loadImage(r)&&(this.image_=r,this.skippedFeatures_=c)}if(this.image_){var k=(r=this.image_).getExtent(),a=r.getResolution(),v=r.getPixelRatio(),d=i*a/(u*v),g=cu(this.imageTransform_,i*s[0]/2,i*s[1]/2,d,d,0,v*(k[0]-h[0])/a,v*(h[1]-k[3])/a);cu(this.coordinateToCanvasPixelTransform,i*s[0]/2-g[4],i*s[1]/2-g[5],i/u,-i/u,0,-h[0],-h[1]);this.renderedResolution=a*i/v}return!!this.image_},t.prototype.forEachFeatureAtCoordinate=function(t,i,r,u){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,i,r,u):n.prototype.forEachFeatureAtCoordinate.call(this,t,i,r,u)},t}(est);dw.handles=function(n){return n.getType()===kr.IMAGE||n.getType()===kr.VECTOR&&n.getRenderMode()===wot.IMAGE};dw.create=function(n,t){return new dw(t)};ov=dw;af=function(n,t,i,r){this.minX=n;this.maxX=t;this.minY=i;this.maxY=r};af.prototype.contains=function(n){return this.containsXY(n[1],n[2])};af.prototype.containsTileRange=function(n){return this.minX<=n.minX&&n.maxX<=this.maxX&&this.minY<=n.minY&&n.maxY<=this.maxY};af.prototype.containsXY=function(n,t){return this.minX<=n&&n<=this.maxX&&this.minY<=t&&t<=this.maxY};af.prototype.equals=function(n){return this.minX==n.minX&&this.minY==n.minY&&this.maxX==n.maxX&&this.maxY==n.maxY};af.prototype.extend=function(n){n.minX<this.minX&&(this.minX=n.minX);n.maxX>this.maxX&&(this.maxX=n.maxX);n.minY<this.minY&&(this.minY=n.minY);n.maxY>this.maxY&&(this.maxY=n.maxY)};af.prototype.getHeight=function(){return this.maxY-this.minY+1};af.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]};af.prototype.getWidth=function(){return this.maxX-this.minX+1};af.prototype.intersects=function(n){return this.minX<=n.maxX&&this.maxX>=n.minX&&this.minY<=n.maxY&&this.maxY>=n.minY};gw=af;sl=function(n){function t(t,i){n.call(this,t);this.context=i?null:kt();this.oversampling_;this.renderedExtent_=null;this.renderedRevision;this.renderedTiles=[];this.newTiles_=!1;this.tmpExtent=[1/0,1/0,-1/0,-1/0];this.tmpTileRange_=new gw(0,0,0,0);this.imageTransform_=[1,0,0,1,0,0];this.zDirection=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isDrawableTile_=function(n){var i=this.getLayer(),t=n.getState(),r=i.getUseInterimTilesOnError();return t==c.LOADED||t==c.EMPTY||t==c.ERROR&&!r},t.prototype.getTile=function(n,t,i,r,u){var e=this.getLayer(),f=e.getSource().getTile(n,t,i,r,u);return f.getState()==c.ERROR&&(e.getUseInterimTilesOnError()?e.getPreload()>0&&(this.newTiles_=!0):f.setState(c.LOADED)),this.isDrawableTile_(f)||(f=f.getInterimTile()),f},t.prototype.prepareFrame=function(n,t){var i=n.pixelRatio,g=n.size,et=n.viewState,h=et.projection,w=et.resolution,nt=et.center,kt=this.getLayer(),e=kt.getSource(),dt=e.getRevision(),o=e.getTileGridForProjection(h),u=o.getZForResolution(w,this.zDirection),l=o.getResolution(u),f=Math.round(w/l)||1,a=n.extent,ht,ii,ct,lt,ri,it,yt,pt,d,ut,fi,ei,si,hi,ci,li,ft,ai,wt,bt;if(void 0!==t.extent&&(a=of(a,t.extent)),eh(a))return!1;var s=o.getTileRangeForExtentAndZ(a,u),tt=o.getTileRangeExtent(u,s),b=e.getTilePixelRatio(i),k={};k[u]={};var r,v,p,gt=this.createLoadedTileFinder(e,h,k),ni=n.viewHints,ot=ni[lu]||ni[oi],st=this.tmpExtent,ti=this.tmpTileRange_;for(this.newTiles_=!1,v=s.minX;v<=s.maxX;++v)for(p=s.minY;p<=s.maxY;++p)if(!(Date.now()-n.time>16&&ot)){if((r=this.getTile(u,v,p,i,h),this.isDrawableTile_(r))&&(ht=y(this),r.getState()==c.LOADED&&(k[u][r.tileCoord.toString()]=r,ii=r.inTransition(ht),this.newTiles_||!ii&&-1!==this.renderedTiles.indexOf(r)||(this.newTiles_=!0)),1===r.getAlpha(ht,n.time)))continue;ct=o.getTileCoordChildTileRange(r.tileCoord,ti,st);lt=!1;ct&&(lt=gt(u+1,ct));lt||o.forEachTileCoordParentTileRange(r.tileCoord,gt,null,ti,st)}if(ri=l*i/b*f,!(this.renderedResolution&&Date.now()-n.time>16&&ot)&&(this.newTiles_||!this.renderedExtent_||!lr(this.renderedExtent_,a)||this.renderedRevision!=dt||f!=this.oversampling_||!ot&&ri!=this.renderedResolution)){if(it=this.context,it){var ui=e.getTilePixelSize(u,i,h),at=Math.round(s.getWidth()*ui[0]/f),vt=Math.round(s.getHeight()*ui[1]/f),rt=it.canvas;rt.width!=at||rt.height!=vt?(this.oversampling_=f,rt.width=at,rt.height=vt):(this.renderedExtent_&&!oe(tt,this.renderedExtent_)&&it.clearRect(0,0,at,vt),f=this.oversampling_)}for(this.renderedTiles.length=0,ft=Object.keys(k).map(Number),ft.sort(function(n,t){return n===u?1:t===u?-1:n>t?1:n<t?-1:0}),ut=0,fi=ft.length;ut<fi;++ut)for(ai in d=ft[ut],pt=e.getTilePixelSize(d,i,h),yt=o.getResolution(d)/l,si=b*e.getGutterForProjection(h),hi=k[d])r=hi[ai],v=((ei=o.getTileCoordExtent(r.getTileCoord(),st))[0]-tt[0])/l*b/f,p=(tt[3]-ei[3])/l*b/f,ci=pt[0]*yt/f,li=pt[1]*yt/f,this.drawTileImage(r,n,t,v,p,ci,li,si,u===d),this.renderedTiles.push(r);this.renderedRevision=dt;this.renderedResolution=l*i/b*f;this.renderedExtent_=tt}return wt=this.renderedResolution/w,bt=cu(this.imageTransform_,i*g[0]/2,i*g[1]/2,wt,wt,0,(this.renderedExtent_[0]-nt[0])/this.renderedResolution*i,(nt[1]-this.renderedExtent_[3])/this.renderedResolution*i),cu(this.coordinateToCanvasPixelTransform,i*g[0]/2-bt[4],i*g[1]/2-bt[5],i/w,-i/w,0,-nt[0],-nt[1]),this.updateUsedTiles(n.usedTiles,e,u,s),this.manageTilePyramid(n,e,o,i,h,a,u,kt.getPreload()),this.scheduleExpireCache(n,e),this.renderedTiles.length>0},t.prototype.drawTileImage=function(n,t,i,r,u,f,e,o,s){var h=this.getTileImage(n),l;if(h){var a=y(this),c=s?n.getAlpha(a,t.time):1,v=this.getLayer().getSource();1!==c||v.getOpaque(t.viewState.projection)||this.context.clearRect(r,u,f,e);l=c!==this.context.globalAlpha;l&&(this.context.save(),this.context.globalAlpha=c);this.context.drawImage(h,o,o,h.width-2*o,h.height-2*o,r,u,f,e);l&&this.context.restore();1!==c?t.animate=!0:s&&n.endTransition(a)}},t.prototype.getImage=function(){var n=this.context;return n?n.canvas:null},t.prototype.getImageTransform=function(){return this.imageTransform_},t.prototype.getTileImage=function(n){return n.getImage()},t}(est);sl.handles=function(n){return n.getType()===kr.TILE};sl.create=function(n,t){return new sl(t)};sl.prototype.getLayer;var sv=sl,bgt=i(0),an=i.n(bgt),nb=function(){};nb.prototype.getReplay=function(){return p()};nb.prototype.isEmpty=function(){return p()};nb.prototype.addDeclutter=function(){return p()};vn=nb;ft={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};var hv={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},tb=[hv.FILL],us=[hv.STROKE],nc=[hv.BEGIN_PATH],ost=[hv.CLOSE_PATH],st=hv,fs=[ft.POLYGON,ft.CIRCLE,ft.LINE_STRING,ft.IMAGE,ft.TEXT,ft.DEFAULT],tc={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},re=[1/0,1/0,-1/0,-1/0],cv=[1,0,0,1,0,0],lv=function(n){function t(t,i,r,u,f,e){n.call(this);this.declutterTree=e;this.tolerance=t;this.maxExtent=i;this.overlaps=f;this.pixelRatio=u;this.maxLineWidth=0;this.resolution=r;this.alignFill_;this.beginGeometryInstruction1_=null;this.beginGeometryInstruction2_=null;this.bufferedMaxExtent_=null;this.instructions=[];this.coordinates=[];this.coordinateCache_={};this.renderedTransform_=[1,0,0,1,0,0];this.hitDetectionInstructions=[];this.pixelCoordinates_=null;this.state={};this.viewRotation_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.replayTextBackground_=function(n,t,i,r,u,f,e){n.beginPath();n.moveTo.apply(n,t);n.lineTo.apply(n,i);n.lineTo.apply(n,r);n.lineTo.apply(n,u);n.lineTo.apply(n,t);f&&(this.alignFill_=f[2],this.fill_(n));e&&(this.setStrokeStyle_(n,e),n.stroke())},t.prototype.replayImage_=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){var et=w||b,g,lt,at,ft;t-=u*=a;i-=f*=a;var nt,tt,it,rt,ot=y+h>r.width?r.width-h:y,st=o+c>r.height?r.height-c:o,ht=p[3]+ot*a+p[1],ct=p[0]+st*a+p[2],k=t-p[3],d=i-p[0];(et||0!==l)&&(nt=[k,d],tt=[k+ht,d],it=[k+ht,d+ct],rt=[k,d+ct]);g=null;0!==l?(lt=t+u,at=i+f,g=cu(cv,lt,at,1,1,l,-lt,-at),rh(re),se(re,wr(cv,nt)),se(re,wr(cv,tt)),se(re,wr(cv,it)),se(re,wr(cv,rt))):ef(k,d,k+ht,d+ct,re);var yt=n.canvas,ut=b?b[2]*a/2:0,vt=re[0]-ut<=yt.width&&re[2]+ut>=0&&re[1]-ut<=yt.height&&re[3]+ut>=0;if(v&&(t=Math.round(t),i=Math.round(i)),e){if(!vt&&1==e[4])return;rp(e,re);ft=vt?[n,g?g.slice(0):null,s,r,h,c,ot,st,t,i,a]:null;ft&&et&&ft.push(w,b,nt,tt,it,rt);e.push(ft)}else vt&&(et&&this.replayTextBackground_(n,nt,tt,it,rt,w,b),got(n,g,s,r,h,c,ot,st,t,i,a))},t.prototype.applyPixelRatio=function(n){var t=this.pixelRatio;return 1==t?n:n.map(function(n){return n*t})},t.prototype.appendFlatCoordinates=function(n,t,i,r,u,f){var e=this.coordinates.length,v=this.getBufferedMaxExtent();f&&(t+=r);for(var a,l,h=[n[t],n[t+1]],o=[NaN,NaN],c=!0,s=t+r;s<i;s+=r)o[0]=n[s],o[1]=n[s+1],(l=nd(v,o))!==a?(c&&(this.coordinates[e++]=h[0],this.coordinates[e++]=h[1]),this.coordinates[e++]=o[0],this.coordinates[e++]=o[1],c=!1):l===ir.INTERSECTING?(this.coordinates[e++]=o[0],this.coordinates[e++]=o[1],c=!1):c=!0,h[0]=o[0],h[1]=o[1],a=l;return(u&&c||s===t+r)&&(this.coordinates[e++]=h[0],this.coordinates[e++]=h[1]),e},t.prototype.drawCustomCoordinates_=function(n,t,i,r,u){for(var e,s,f=0,o=i.length;f<o;++f)e=i[f],s=this.appendFlatCoordinates(n,t,e,r,!1,!1),u.push(s),t=e;return t},t.prototype.drawCustom=function(n,t,i){var v,h,p,y;this.beginGeometry(n,t);var r,e,c,l,o,u=n.getType(),a=n.getStride(),s=this.coordinates.length;if(u==f.MULTI_POLYGON){for(r=(n=n).getOrientedFlatCoordinates(),l=[],v=n.getEndss(),o=0,h=0,p=v.length;h<p;++h)y=[],o=this.drawCustomCoordinates_(r,o,v[h],a,y),l.push(y);this.instructions.push([st.CUSTOM,s,l,n,i,uft])}else u==f.POLYGON||u==f.MULTI_LINE_STRING?(c=[],r=u==f.POLYGON?n.getOrientedFlatCoordinates():n.getFlatCoordinates(),o=this.drawCustomCoordinates_(r,0,n.getEnds(),a,c),this.instructions.push([st.CUSTOM,s,c,n,i,pp])):u==f.LINE_STRING||u==f.MULTI_POINT?(r=n.getFlatCoordinates(),e=this.appendFlatCoordinates(r,0,r.length,a,!1,!1),this.instructions.push([st.CUSTOM,s,e,n,i,gc])):u==f.POINT&&(r=n.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),e=this.coordinates.length,this.instructions.push([st.CUSTOM,s,e,n,i]));this.endGeometry(n,t)},t.prototype.beginGeometry=function(n,t){this.beginGeometryInstruction1_=[st.BEGIN_GEOMETRY,t,0];this.instructions.push(this.beginGeometryInstruction1_);this.beginGeometryInstruction2_=[st.BEGIN_GEOMETRY,t,0];this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},t.prototype.finish=function(){},t.prototype.fill_=function(n){if(this.alignFill_){var t=wr(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;n.translate(t[0]%i,t[1]%i);n.rotate(this.viewRotation_)}n.fill();this.alignFill_&&n.setTransform.apply(n,hn)},t.prototype.setStrokeStyle_=function(n,t){n.strokeStyle=t[1];n.lineWidth=t[2];n.lineCap=t[3];n.lineJoin=t[4];n.miterLimit=t[5];il&&(n.lineDashOffset=t[7],n.setLineDash(t[6]))},t.prototype.renderDeclutter_=function(n,t){var u,f,r,e,i;if(n&&n.length>5&&(u=n[4],1==u||u==n.length-5)){if(f={minX:n[0],minY:n[1],maxX:n[2],maxY:n[3],value:t},!this.declutterTree.collides(f))for(this.declutterTree.insert(f),r=5,e=n.length;r<e;++r)i=n[r],i&&(i.length>11&&this.replayTextBackground_(i[0],i[13],i[14],i[15],i[16],i[11],i[12]),got.apply(void 0,i));n.length=5;rh(n)}},t.prototype.replay_=function(n,t,i,r,u,f,e){var c,o,it,ri;this.pixelCoordinates_&&uf(t,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=vo(this.coordinates,0,this.coordinates.length,2,t,this.pixelCoordinates_),gut(this.renderedTransform_,t));for(var b,g,nt,rt,ut,ft,tt,k,ui,p,et,ht,rr=!wu(i),h=0,ur=r.length,s=0,d=0,v=0,fi=null,ei=null,vt=this.coordinateCache_,oi=this.viewRotation_,yt={context:n,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:oi},ct=this.instructions!=r||this.overlaps?0:200;h<ur;){o=r[h];switch(o[0]){case st.BEGIN_GEOMETRY:p=o[1];rr&&i[y(p)]||!p.getGeometry()?h=o[2]:void 0===e||dt(e,p.getGeometry().getExtent())?++h:h=o[2]+1;break;case st.BEGIN_PATH:d>ct&&(this.fill_(n),d=0);v>ct&&(n.stroke(),v=0);d||v||(n.beginPath(),rt=ut=NaN);++h;break;case st.CIRCLE:var pt=c[s=o[1]],wt=c[s+1],si=c[s+2]-pt,hi=c[s+3]-wt,ci=Math.sqrt(si*si+hi*hi);n.moveTo(pt+ci,wt);n.arc(pt,wt,ci,0,2*Math.PI,!0);++h;break;case st.CLOSE_PATH:n.closePath();++h;break;case st.CUSTOM:s=o[1];b=o[2];var fr=o[3],er=o[4],li=6==o.length?o[5]:void 0;yt.geometry=fr;yt.feature=p;h in vt||(vt[h]=[]);it=vt[h];li?li(c,s,b,2,it):(it[0]=c[s],it[1]=c[s+1],it.length=2);er(it,yt);++h;break;case st.DRAW_IMAGE:s=o[1];b=o[2];ui=o[3];g=o[4];nt=o[5];k=f?null:o[6];var or=o[7],sr=o[8],hr=o[9],cr=o[10],lr=o[11],ai=o[12],ar=o[13],vr=o[14],bt=void 0,kt=void 0,gt=void 0;for(o.length>16?(bt=o[15],kt=o[16],gt=o[17]):(bt=el,kt=gt=!1),lr&&(ai+=oi);s<b;s+=2)this.replayImage_(n,c[s],c[s+1],ui,g,nt,k,or,sr,hr,cr,ai,ar,u,vr,bt,kt?fi:null,gt?ei:null);this.renderDeclutter_(k,p);++h;break;case st.DRAW_CHARS:var vi=o[1],yi=o[2],ni=o[3];k=f?null:o[4];var yr=o[5],pi=o[6],pr=o[7],wi=o[8],bi=o[9],ki=o[10],di=o[11],gi=o[12],ti=o[13],nr=o[14],tr=kft(c,vi,yi,2),ir=wi(gi);if(yr||ir<=tr){var ii=this,wr=ii.textStates[ti].textAlign,ot=kgt(c,vi,yi,2,gi,wi,(tr-ir)*tc[wr],pr);if(ot){var w=void 0,lt=void 0,at=void 0,l=void 0,a=void 0;if(ki)for(w=0,lt=ot.length;w<lt;++w)at=(a=ot[w])[4],l=ii.getImage(at,ti,"",ki),g=a[2]+di,nt=ni*l.height+2*(.5-ni)*di-bi,this.replayImage_(n,a[0],a[1],l,g,nt,k,l.height,1,0,0,a[3],nr,!1,l.width,el,null,null);if(pi)for(w=0,lt=ot.length;w<lt;++w)at=(a=ot[w])[4],l=ii.getImage(at,ti,pi,""),g=a[2],nt=ni*l.height-bi,this.replayImage_(n,a[0],a[1],l,g,nt,k,l.height,1,0,0,a[3],nr,!1,l.width,el,null,null)}}this.renderDeclutter_(k,p);++h;break;case st.END_GEOMETRY:if(void 0!==f&&(ri=f(p=o[1]),ri))return ri;++h;break;case st.FILL:ct?d++:this.fill_(n);++h;break;case st.MOVE_TO_LINE_TO:for(s=o[1],b=o[2],et=c[s],tt=(ht=c[s+1])+.5|0,(ft=et+.5|0)===rt&&tt===ut||(n.moveTo(et,ht),rt=ft,ut=tt),s+=2;s<b;s+=2)ft=(et=c[s])+.5|0,tt=(ht=c[s+1])+.5|0,s!=b-2&&ft===rt&&tt===ut||(n.lineTo(et,ht),rt=ft,ut=tt);++h;break;case st.SET_FILL_STYLE:fi=o;this.alignFill_=o[2];d&&(this.fill_(n),d=0,v&&(n.stroke(),v=0));n.fillStyle=o[1];++h;break;case st.SET_STROKE_STYLE:ei=o;v&&(n.stroke(),v=0);this.setStrokeStyle_(n,o);++h;break;case st.STROKE:ct?v++:n.stroke();++h;break;default:++h}}d&&this.fill_(n);v&&n.stroke()},t.prototype.replay=function(n,t,i,r,u){this.viewRotation_=i;this.replay_(n,t,r,this.instructions,u,void 0,void 0)},t.prototype.replayHitDetection=function(n,t,i,r,u,f){return this.viewRotation_=i,this.replay_(n,t,r,this.hitDetectionInstructions,!0,u,f)},t.prototype.reverseHitDetectionInstructions=function(){var n,i=this.hitDetectionInstructions,r,u,f,t;for(i.reverse(),f=i.length,t=-1,n=0;n<f;++n)(u=(r=i[n])[0])==st.END_GEOMETRY?t=n:u==st.BEGIN_GEOMETRY&&(r[2]=n,fbt(this.hitDetectionInstructions,t,n),t=-1)},t.prototype.setFillStrokeStyle=function(n,t){var i=this.state,s,h,r,u,c,f,e,o;n?(s=n.getColor(),i.fillStyle=du(s||no)):i.fillStyle=void 0;t?(h=t.getColor(),i.strokeStyle=du(h||uv),r=t.getLineCap(),i.lineCap=void 0!==r?r:"round",u=t.getLineDash(),i.lineDash=u?u.slice():ww,c=t.getLineDashOffset(),i.lineDashOffset=c||0,f=t.getLineJoin(),i.lineJoin=void 0!==f?f:"round",e=t.getWidth(),i.lineWidth=void 0!==e?e:1,o=t.getMiterLimit(),i.miterLimit=void 0!==o?o:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)):(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)},t.prototype.createFill=function(n){var t=n.fillStyle,i=[st.SET_FILL_STYLE,t];return"string"!=typeof t&&i.push(!0),i},t.prototype.applyStroke=function(n){this.instructions.push(this.createStroke(n))},t.prototype.createStroke=function(n){return[st.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth*this.pixelRatio,n.lineCap,n.lineJoin,n.miterLimit,this.applyPixelRatio(n.lineDash),n.lineDashOffset*this.pixelRatio]},t.prototype.updateFillStyle=function(n,t,i){var r=n.fillStyle;"string"==typeof r&&n.currentFillStyle==r||(void 0!==r&&this.instructions.push(t.call(this,n,i)),n.currentFillStyle=r)},t.prototype.updateStrokeStyle=function(n,t){var i=n.strokeStyle,u=n.lineCap,r=n.lineDash,f=n.lineDashOffset,e=n.lineJoin,o=n.lineWidth,s=n.miterLimit;n.currentStrokeStyle==i&&n.currentLineCap==u&&(r==n.currentLineDash||uf(n.currentLineDash,r))&&n.currentLineDashOffset==f&&n.currentLineJoin==e&&n.currentLineWidth==o&&n.currentMiterLimit==s||(void 0!==i&&t.call(this,n),n.currentStrokeStyle=i,n.currentLineCap=u,n.currentLineDash=r,n.currentLineDashOffset=f,n.currentLineJoin=e,n.currentLineWidth=o,n.currentMiterLimit=s)},t.prototype.endGeometry=function(n,t){this.beginGeometryInstruction1_[2]=this.instructions.length;this.beginGeometryInstruction1_=null;this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length;this.beginGeometryInstruction2_=null;var i=[st.END_GEOMETRY,t];this.instructions.push(i);this.hitDetectionInstructions.push(i)},t.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=fut(this.maxExtent),this.maxLineWidth>0)){var n=this.resolution*(this.maxLineWidth+1)/2;ff(this.bufferedMaxExtent_,n,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},t}(fv),dgt=function(n){function t(t,i,r,u,f,e){n.call(this,t,i,r,u,f,e);this.declutterGroup_=null;this.hitDetectionImage_=null;this.image_=null;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}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawCoordinates_=function(n,t,i,r){return this.appendFlatCoordinates(n,t,i,r,!1,!1)},t.prototype.drawPoint=function(n,t){if(this.image_){this.beginGeometry(n,t);var i=n.getFlatCoordinates(),f=n.getStride(),r=this.coordinates.length,u=this.drawCoordinates_(i,0,i.length,f);this.instructions.push([st.DRAW_IMAGE,r,u,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]);this.hitDetectionInstructions.push([st.DRAW_IMAGE,r,u,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]);this.endGeometry(n,t)}},t.prototype.drawMultiPoint=function(n,t){if(this.image_){this.beginGeometry(n,t);var i=n.getFlatCoordinates(),f=n.getStride(),r=this.coordinates.length,u=this.drawCoordinates_(i,0,i.length,f);this.instructions.push([st.DRAW_IMAGE,r,u,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]);this.hitDetectionInstructions.push([st.DRAW_IMAGE,r,u,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]);this.endGeometry(n,t)}},t.prototype.finish=function(){this.reverseHitDetectionInstructions();this.anchorX_=void 0;this.anchorY_=void 0;this.hitDetectionImage_=null;this.image_=null;this.height_=void 0;this.scale_=void 0;this.opacity_=void 0;this.originX_=void 0;this.originY_=void 0;this.rotateWithView_=void 0;this.rotation_=void 0;this.width_=void 0},t.prototype.setImageStyle=function(n,t){var i=n.getAnchor(),r=n.getSize(),f=n.getHitDetectionImage(1),e=n.getImage(1),u=n.getOrigin();this.anchorX_=i[0];this.anchorY_=i[1];this.declutterGroup_=t;this.hitDetectionImage_=f;this.image_=e;this.height_=r[1];this.opacity_=n.getOpacity();this.originX_=u[0];this.originY_=u[1];this.rotateWithView_=n.getRotateWithView();this.rotation_=n.getRotation();this.scale_=n.getScale();this.width_=r[0]},t}(lv),ggt=function(n){function t(t,i,r,u,f,e){n.call(this,t,i,r,u,f,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawFlatCoordinates_=function(n,t,i,r){var f=this.coordinates.length,e=this.appendFlatCoordinates(n,t,i,r,!1,!1),u=[st.MOVE_TO_LINE_TO,f,e];return this.instructions.push(u),this.hitDetectionInstructions.push(u),i},t.prototype.drawLineString=function(n,t){var i=this.state,f=i.strokeStyle,e=i.lineWidth,r,u;void 0!==f&&void 0!==e&&(this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(n,t),this.hitDetectionInstructions.push([st.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],nc),r=n.getFlatCoordinates(),u=n.getStride(),this.drawFlatCoordinates_(r,0,r.length,u),this.hitDetectionInstructions.push(us),this.endGeometry(n,t))},t.prototype.drawMultiLineString=function(n,t){var i=this.state,e=i.strokeStyle,o=i.lineWidth;if(void 0!==e&&void 0!==o){this.updateStrokeStyle(i,this.applyStroke);this.beginGeometry(n,t);this.hitDetectionInstructions.push([st.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],nc);for(var u=n.getEnds(),s=n.getFlatCoordinates(),h=n.getStride(),f=0,r=0,c=u.length;r<c;++r)f=this.drawFlatCoordinates_(s,f,u[r],h);this.hitDetectionInstructions.push(us);this.endGeometry(n,t)}},t.prototype.finish=function(){var n=this.state;void 0!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&this.instructions.push(us);this.reverseHitDetectionInstructions();this.state=null},t.prototype.applyStroke=function(t){void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(us),t.lastStroke=this.coordinates.length);t.lastStroke=0;n.prototype.applyStroke.call(this,t);this.instructions.push(nc)},t}(lv),sst=function(n){function t(t,i,r,u,f,e){n.call(this,t,i,r,u,f,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawFlatCoordinatess_=function(n,t,i,r){var e=this.state,h=void 0!==e.fillStyle,f=void 0!=e.strokeStyle,c=i.length,u;for(this.instructions.push(nc),this.hitDetectionInstructions.push(nc),u=0;u<c;++u){var o=i[u],l=this.coordinates.length,a=this.appendFlatCoordinates(n,t,o,r,!0,!f),s=[st.MOVE_TO_LINE_TO,l,a];this.instructions.push(s);this.hitDetectionInstructions.push(s);f&&(this.instructions.push(ost),this.hitDetectionInstructions.push(ost));t=o}return h&&(this.instructions.push(tb),this.hitDetectionInstructions.push(tb)),f&&(this.instructions.push(us),this.hitDetectionInstructions.push(us)),t},t.prototype.drawCircle=function(n,t){var i=this.state,f=i.fillStyle,e=i.strokeStyle,r;if(void 0!==f||void 0!==e){this.setFillStrokeStyles_(n);this.beginGeometry(n,t);void 0!==i.fillStyle&&this.hitDetectionInstructions.push([st.SET_FILL_STYLE,vh(no)]);void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([st.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var u=n.getFlatCoordinates(),o=n.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(u,0,u.length,o,!1,!1);r=[st.CIRCLE,s];this.instructions.push(nc,r);this.hitDetectionInstructions.push(nc,r);this.hitDetectionInstructions.push(tb);void 0!==i.fillStyle&&this.instructions.push(tb);void 0!==i.strokeStyle&&(this.instructions.push(us),this.hitDetectionInstructions.push(us));this.endGeometry(n,t)}},t.prototype.drawPolygon=function(n,t){var i=this.state,r=i.fillStyle,u=i.strokeStyle;if(void 0!==r||void 0!==u){this.setFillStrokeStyles_(n);this.beginGeometry(n,t);void 0!==i.fillStyle&&this.hitDetectionInstructions.push([st.SET_FILL_STYLE,vh(no)]);void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([st.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var f=n.getEnds(),e=n.getOrientedFlatCoordinates(),o=n.getStride();this.drawFlatCoordinatess_(e,0,f,o);this.endGeometry(n,t)}},t.prototype.drawMultiPolygon=function(n,t){var i=this.state,e=i.fillStyle,o=i.strokeStyle;if(void 0!==e||void 0!==o){this.setFillStrokeStyles_(n);this.beginGeometry(n,t);void 0!==i.fillStyle&&this.hitDetectionInstructions.push([st.SET_FILL_STYLE,vh(no)]);void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([st.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var u=n.getEndss(),s=n.getOrientedFlatCoordinates(),h=n.getStride(),f=0,r=0,c=u.length;r<c;++r)f=this.drawFlatCoordinatess_(s,f,u[r],h);this.endGeometry(n,t)}},t.prototype.finish=function(){var t;if(this.reverseHitDetectionInstructions(),this.state=null,t=this.tolerance,0!==t)for(var i=this.coordinates,n=0,r=i.length;n<r;++n)i[n]=ch(i[n],t)},t.prototype.setFillStrokeStyles_=function(n){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill,n);void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},t}(lv);var tnt={Circle:sst,Default:lv,Image:dgt,LineString:ggt,Polygon:sst,Text:function(n){function t(t,i,r,u,f,e){n.call(this,t,i,r,u,f,e);this.declutterGroup_;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.widths_={};ve.prune()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawText=function(n,t){var g=this.textFillState_,nt=this.textStrokeState_,u=this.textState_,o,p,b,k,d,l;if(""!==this.text_&&u&&(g||nt)){var i,a,y=this.coordinates.length,s=n.getType(),r=null,e=2,h=2;if(u.placement===okt){if(!dt(this.getBufferedMaxExtent(),n.getExtent()))return;if(r=n.getFlatCoordinates(),h=n.getStride(),s==f.LINE_STRING)o=[r.length];else if(s==f.MULTI_LINE_STRING)o=n.getEnds();else if(s==f.POLYGON)o=n.getEnds().slice(0,1);else if(s==f.MULTI_POLYGON)for(p=n.getEndss(),o=[],i=0,a=p.length;i<a;++i)o.push(p[i][0]);this.beginGeometry(n,t);for(var w,tt=u.textAlign,v=0,c=0,it=o.length;c<it;++c){for(void 0==tt?(b=nnt(u.maxAngle,r,v,o[c],h),v=b[0],w=b[1]):w=o[c],i=v;i<w;i+=h)this.coordinates.push(r[i],r[i+1]);e=this.coordinates.length;v=o[c];this.drawChars_(y,e,this.declutterGroup_);y=e}this.endGeometry(n,t)}else{k=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_);d=k.width/this.pixelRatio;switch(s){case f.POINT:case f.MULTI_POINT:e=(r=n.getFlatCoordinates()).length;break;case f.LINE_STRING:r=n.getFlatMidpoint();break;case f.CIRCLE:r=n.getCenter();break;case f.MULTI_LINE_STRING:e=(r=n.getFlatMidpoints()).length;break;case f.POLYGON:if(r=n.getFlatInteriorPoint(),!u.overflow&&r[2]/this.resolution<d)return;h=3;break;case f.MULTI_POLYGON:for(l=n.getFlatInteriorPoints(),r=[],i=0,a=l.length;i<a;i+=3)(u.overflow||l[i+2]/this.resolution>=d)&&r.push(l[i],l[i+1]);if(0==(e=r.length))return}e=this.appendFlatCoordinates(r,0,e,h,!1,!1);(u.backgroundFill||u.backgroundStroke)&&(this.setFillStrokeStyle(u.backgroundFill,u.backgroundStroke),u.backgroundFill&&(this.updateFillStyle(this.state,this.createFill,n),this.hitDetectionInstructions.push(this.createFill(this.state,n))),u.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state))));this.beginGeometry(n,t);this.drawTextImage_(k,y,e);this.endGeometry(n,t)}}},t.prototype.getImage=function(n,t,i,r){var v,y=r+t+n+i+this.pixelRatio,f,a,b;if(!ve.containsKey(y)){var e=r?this.strokeStates[r]||this.textStrokeState_:null,d=i?this.fillStates[i]||this.textFillState_:null,h=this.textStates[t]||this.textState_,g=this.pixelRatio,o=h.scale*g,k=tc[h.textAlign||"center"],s=r&&e.lineWidth?e.lineWidth:0,l=n.split("\n"),p=l.length,w=[],nt=function(n,t,i){for(var f,e=t.length,r=0,u=0;u<e;++u)f=sn(n,t[u]),r=Math.max(r,f),i.push(f);return r}(h.font,l,w),c=dot(h.font),tt=c*p,it=nt+s,u=kt(Math.ceil(it*o),Math.ceil((tt+s)*o));if(v=u.canvas,ve.set(y,v),1!=o&&u.scale(o,o),u.font=h.font,r&&(u.strokeStyle=e.strokeStyle,u.lineWidth=s,u.lineCap=e.lineCap,u.lineJoin=e.lineJoin,u.miterLimit=e.miterLimit,il&&e.lineDash.length&&(u.setLineDash(e.lineDash),u.lineDashOffset=e.lineDashOffset)),i&&(u.fillStyle=d.fillStyle),u.textBaseline="middle",u.textAlign="center",a=.5-k,b=k*v.width/o+a*s,r)for(f=0;f<p;++f)u.strokeText(l[f],b+a*w[f],.5*(s+c)+f*c);if(i)for(f=0;f<p;++f)u.fillText(l[f],b+a*w[f],.5*(s+c)+f*c)}return ve.get(y)},t.prototype.drawTextImage_=function(n,t,i){var r=this.textState_,f=this.textStrokeState_,u=this.pixelRatio,e=tc[r.textAlign||"center"],o=tc[r.textBaseline],s=f&&f.lineWidth?f.lineWidth:0,h=e*n.width/u+2*(.5-e)*s,c=o*n.height/u+2*(.5-o)*s;this.instructions.push([st.DRAW_IMAGE,t,i,n,(h-this.textOffsetX_)*u,(c-this.textOffsetY_)*u,this.declutterGroup_,n.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,n.width,r.padding==el?el:r.padding.map(function(n){return n*u}),!!r.backgroundFill,!!r.backgroundStroke]);this.hitDetectionInstructions.push([st.DRAW_IMAGE,t,i,n,(h-this.textOffsetX_)*u,(c-this.textOffsetY_)*u,this.declutterGroup_,n.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/u,n.width,r.padding,!!r.backgroundFill,!!r.backgroundStroke])},t.prototype.drawChars_=function(n,t,i){var r=this.textStrokeState_,u=this.textState_,a=this.textFillState_,o=this.strokeKey_,c,e;r&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:r.strokeStyle,lineCap:r.lineCap,lineDashOffset:r.lineDashOffset,lineWidth:r.lineWidth,lineJoin:r.lineJoin,miterLimit:r.miterLimit,lineDash:r.lineDash}));c=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:u.font,textAlign:u.textAlign||"center",scale:u.scale});e=this.fillKey_;a&&(e in this.fillStates||(this.fillStates[e]={fillStyle:a.fillStyle}));var s=this.pixelRatio,v=tc[u.textBaseline],y=this.textOffsetY_*s,p=this.text_,h=u.font,l=u.scale,w=r?r.lineWidth*l/2:0,f=this.widths_[h];f||(this.widths_[h]=f={});this.instructions.push([st.DRAW_CHARS,n,t,v,i,u.overflow,e,u.maxAngle,function(n){var t=f[n];return t||(t=f[n]=sn(h,n)),t*l*s},y,o,w*s,p,c,1]);this.hitDetectionInstructions.push([st.DRAW_CHARS,n,t,v,i,u.overflow,e,u.maxAngle,function(n){var t=f[n];return t||(t=f[n]=sn(h,n)),t*l},y,o,w,p,c,1/s])},t.prototype.setTextStyle=function(n,t){var r,f,i,e,u,o,s;if(n){if(this.declutterGroup_=t,e=n.getFill(),e?((f=this.textFillState_)||(f=this.textFillState_={}),f.fillStyle=du(e.getColor()||no)):f=this.textFillState_=null,u=n.getStroke(),u){(i=this.textStrokeState_)||(i=this.textStrokeState_={});var h=u.getLineDash(),c=u.getLineDashOffset(),l=u.getWidth(),a=u.getMiterLimit();i.lineCap=u.getLineCap()||"round";i.lineDash=h?h.slice():ww;i.lineDashOffset=void 0===c?0:c;i.lineJoin=u.getLineJoin()||"round";i.lineWidth=void 0===l?1:l;i.miterLimit=void 0===a?10:a;i.strokeStyle=du(u.getColor()||uv)}else i=this.textStrokeState_=null;r=this.textState_;o=n.getFont()||"10px sans-serif";pgt(o);s=n.getScale();r.overflow=n.getOverflow();r.font=o;r.maxAngle=n.getMaxAngle();r.placement=n.getPlacement();r.textAlign=n.getTextAlign();r.textBaseline=n.getTextBaseline()||"middle";r.backgroundFill=n.getBackgroundFill();r.backgroundStroke=n.getBackgroundStroke();r.padding=n.getPadding()||el;r.scale=void 0===s?1:s;var v=n.getOffsetX(),p=n.getOffsetY(),w=n.getRotateWithView(),b=n.getRotation();this.text_=n.getText()||"";this.textOffsetX_=void 0===v?0:v;this.textOffsetY_=void 0===p?0:p;this.textRotateWithView_=void 0!==w&&w;this.textRotation_=void 0===b?0:b;this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:y(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"";this.textKey_=r.font+r.scale+(r.textAlign||"?");this.fillKey_=f?"string"==typeof f.fillStyle?f.fillStyle:"|"+y(f.fillStyle):""}else this.text_=""},t}(lv)},int=function(n){function t(t,i,r,u,f,e,o){n.call(this);this.declutterTree_=e;this.declutterGroup_=null;this.tolerance_=t;this.maxExtent_=i;this.overlaps_=f;this.pixelRatio_=u;this.resolution_=r;this.renderBuffer_=o;this.replaysByZIndex_={};this.hitDetectionContext_=kt(1,1);this.hitDetectionTransform_=[1,0,0,1,0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.addDeclutter=function(n){var t=null;return this.declutterTree_&&(n?(t=this.declutterGroup_)[4]++:(t=this.declutterGroup_=[1/0,1/0,-1/0,-1/0]).push(1)),t},t.prototype.clip=function(n,t){var i=this.getClipCoords(t);n.beginPath();n.moveTo(i[0],i[1]);n.lineTo(i[2],i[3]);n.lineTo(i[4],i[5]);n.lineTo(i[6],i[7]);n.clip()},t.prototype.hasReplays=function(n){var i;for(i in this.replaysByZIndex_)for(var r=this.replaysByZIndex_[i],t=0,u=n.length;t<u;++t)if(n[t]in r)return!0;return!1},t.prototype.finish=function(){var t,n,i;for(t in this.replaysByZIndex_){n=this.replaysByZIndex_[t];for(i in n)n[i].finish()}},t.prototype.forEachFeatureAtCoordinate=function(n,t,i,r,u,f,e){function tt(n){for(var i,r,u=s.getImageData(0,0,o,o).data,t=0;t<o;t++)for(i=0;i<o;i++)if(d[t][i]&&u[4*(i*o+t)+3]>0)return r=void 0,(!b||h!=ft.IMAGE&&h!=ft.TEXT||-1!==b.indexOf(n))&&(r=f(n)),r||void s.clearRect(0,0,o,o)}var c,o=2*(r=Math.round(r))+1,w=cu(this.hitDetectionTransform_,r+.5,r+.5,1/t,-1/t,-i,-n[0],-n[1]),s=this.hitDetectionContext_,b,h,d,l,a,g,v,nt,y,p,k;for(s.canvas.width!==o||s.canvas.height!==o?(s.canvas.width=o,s.canvas.height=o):s.clearRect(0,0,o,o),void 0!==this.renderBuffer_&&(se(c=[1/0,1/0,-1/0,-1/0],n),ff(c,t*(this.renderBuffer_+r),c)),d=function(n){if(void 0!==yn[n])return yn[n];for(var u=2*n+1,t=new Array(u),f=0;f<u;f++)t[f]=new Array(u);for(var i=n,r=0,e=0;i>=r;)es(t,n+i,n+r),es(t,n+r,n+i),es(t,n-r,n+i),es(t,n-i,n+r),es(t,n-i,n-r),es(t,n-r,n-i),es(t,n+r,n-i),es(t,n+i,n-r),2*((e+=1+2*++r)-i)+1>0&&(e+=1-2*(i-=1));return yn[n]=t,t}(r),this.declutterTree_&&(b=this.declutterTree_.all().map(function(n){return n.value})),y=Object.keys(this.replaysByZIndex_).map(Number),y.sort(lo),l=y.length-1;l>=0;--l)for(p=y[l].toString(),g=this.replaysByZIndex_[p],a=fs.length-1;a>=0;--a)if(void 0!==(v=g[h=fs[a]]))if(e&&(h==ft.IMAGE||h==ft.TEXT))k=e[p],k?k.push(v,w.slice(0)):e[p]=[v,w.slice(0)];else if(nt=v.replayHitDetection(s,w,i,u,tt,c))return nt},t.prototype.getClipCoords=function(n){var t=this.maxExtent_,r=t[0],u=t[1],f=t[2],e=t[3],i=[r,u,r,e,f,e,f,u];return vo(i,0,8,2,n,i),i},t.prototype.getReplay=function(n,t){var u=void 0!==n?n.toString():"0",i=this.replaysByZIndex_[u],r;return void 0===i&&(i={},this.replaysByZIndex_[u]=i),r=i[t],void 0===r&&(r=new tnt[t](this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),i[t]=r),r},t.prototype.getReplays=function(){return this.replaysByZIndex_},t.prototype.isEmpty=function(){return wu(this.replaysByZIndex_)},t.prototype.replay=function(n,t,i,r,u,f,e){var a=Object.keys(this.replaysByZIndex_).map(Number),s,p,h,w,b,o,v,c,l,y;for(a.sort(lo),n.save(),this.clip(n,t),v=f||fs,s=0,p=a.length;s<p;++s)for(c=a[s].toString(),b=this.replaysByZIndex_[c],h=0,w=v.length;h<w;++h)l=v[h],(o=b[l],void 0!==o)&&(e&&(l==ft.IMAGE||l==ft.TEXT)?(y=e[c],y?y.push(o,t.slice(0)):e[c]=[o,t.slice(0)]):o.replay(n,t,i,r,u));n.restore()},t}(vn),yn={0:[[!0]]};var hst=int,rnt=.5,cst={Point:function(n,t,i,r){var u=i.getImage(),f,e,o;if(u){if(u.getImageState()!=ot.LOADED)return;f=n.getReplay(i.getZIndex(),ft.IMAGE);f.setImageStyle(u,n.addDeclutter(!1));f.drawPoint(t,r)}e=i.getText();e&&(o=n.getReplay(i.getZIndex(),ft.TEXT),o.setTextStyle(e,n.addDeclutter(!!u)),o.drawText(t,r))},LineString:function(n,t,i,r){var o=i.getStroke(),u,f,e;o&&(u=n.getReplay(i.getZIndex(),ft.LINE_STRING),u.setFillStrokeStyle(null,o),u.drawLineString(t,r));f=i.getText();f&&(e=n.getReplay(i.getZIndex(),ft.TEXT),e.setTextStyle(f,n.addDeclutter(!1)),e.drawText(t,r))},Polygon:function(n,t,i,r){var o=i.getFill(),s=i.getStroke(),u,f,e;(o||s)&&(u=n.getReplay(i.getZIndex(),ft.POLYGON),u.setFillStrokeStyle(o,s),u.drawPolygon(t,r));f=i.getText();f&&(e=n.getReplay(i.getZIndex(),ft.TEXT),e.setTextStyle(f,n.addDeclutter(!1)),e.drawText(t,r))},MultiPoint:function(n,t,i,r){var u=i.getImage(),f,e,o;if(u){if(u.getImageState()!=ot.LOADED)return;f=n.getReplay(i.getZIndex(),ft.IMAGE);f.setImageStyle(u,n.addDeclutter(!1));f.drawMultiPoint(t,r)}e=i.getText();e&&(o=n.getReplay(i.getZIndex(),ft.TEXT),o.setTextStyle(e,n.addDeclutter(!!u)),o.drawText(t,r))},MultiLineString:function(n,t,i,r){var o=i.getStroke(),u,f,e;o&&(u=n.getReplay(i.getZIndex(),ft.LINE_STRING),u.setFillStrokeStyle(null,o),u.drawMultiLineString(t,r));f=i.getText();f&&(e=n.getReplay(i.getZIndex(),ft.TEXT),e.setTextStyle(f,n.addDeclutter(!1)),e.drawText(t,r))},MultiPolygon:function(n,t,i,r){var o=i.getFill(),s=i.getStroke(),u,f,e;(s||o)&&(u=n.getReplay(i.getZIndex(),ft.POLYGON),u.setFillStrokeStyle(o,s),u.drawMultiPolygon(t,r));f=i.getText();f&&(e=n.getReplay(i.getZIndex(),ft.TEXT),e.setTextStyle(f,n.addDeclutter(!1)),e.drawText(t,r))},GeometryCollection:function(n,t,i,r){for(var f=t.getGeometriesArray(),o,u=0,e=f.length;u<e;++u)o=cst[f[u].getType()],o(n,f[u],i,r)},Circle:function(n,t,i,r){var o=i.getFill(),s=i.getStroke(),u,f,e;(o||s)&&(u=n.getReplay(i.getZIndex(),ft.CIRCLE),u.setFillStrokeStyle(o,s),u.drawCircle(t,r));f=i.getText();f&&(e=n.getReplay(i.getZIndex(),ft.TEXT),e.setTextStyle(f,n.addDeclutter(!1)),e.drawText(t,r))}};vv=function(n){function t(t){n.call(this,t);this.declutterTree_=t.getDeclutter()?an()(9,void 0):null;this.dirty_=!1;this.renderedRevision_=-1;this.renderedResolution_=NaN;this.renderedExtent_=[1/0,1/0,-1/0,-1/0];this.renderedRenderOrder_=null;this.replayGroup_=null;this.replayGroupChanged=!0;this.context=kt();o(ve,a.CLEAR,this.handleFontsChanged_,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){ou(ve,a.CLEAR,this.handleFontsChanged_,this);n.prototype.disposeInternal.call(this)},t.prototype.compose=function(n,t,i){var b=t.extent,nt=t.pixelRatio,k=i.managed?t.skippedFeatureUids:{},tt=t.viewState,it=tt.projection,u=tt.rotation,a=it.getExtent(),lt=this.getLayer().getSource(),f=this.getTransform(t,0),rt=i.extent,ut=void 0!==rt,e,o,s,y,et,ct;if(ut&&this.clip(n,t,rt),e=this.replayGroup_,e&&!e.isEmpty()){this.declutterTree_&&this.declutterTree_.clear();var r,at=this.getLayer(),h=0,c=0,v=1!==i.opacity,ft=at.hasListener(gr.RENDER);v||ft?(o=n.canvas.width,s=n.canvas.height,u&&(y=Math.round(Math.sqrt(o*o+s*s)),h=(y-o)/2,c=(y-s)/2,o=s=y),this.context.canvas.width=o,this.context.canvas.height=s,r=this.context):r=n;et=r.globalAlpha;v||(r.globalAlpha=i.opacity);r!=n&&r.translate(h,c);var ot=t.viewHints,d=!(ot[lu]||ot[oi]),st=t.size[0]*nt,ht=t.size[1]*nt;if(to(r,-u,st/2,ht/2),e.replay(r,f,u,k,d),lt.getWrapX()&&it.canWrapX()&&!lr(a,b)){for(var p,l=b[0],w=wt(a),g=0;l<a[0];)p=w*--g,f=this.getTransform(t,p),e.replay(r,f,u,k,d),l+=w;for(g=0,l=b[2];l>a[2];)p=w*++g,f=this.getTransform(t,p),e.replay(r,f,u,k,d),l-=w}(to(r,u,st/2,ht/2),ft&&this.dispatchRenderEvent(r,t,f),r!=n)&&(v?(ct=n.globalAlpha,n.globalAlpha=i.opacity,n.drawImage(r.canvas,-h,-c),n.globalAlpha=ct):n.drawImage(r.canvas,-h,-c),r.translate(-h,-c));v||(r.globalAlpha=et)}ut&&n.restore()},t.prototype.composeFrame=function(n,t,i){var r=this.getTransform(n,0);this.preCompose(i,n,r);this.compose(i,n,t);this.postCompose(i,n,t,r)},t.prototype.forEachFeatureAtCoordinate=function(n,t,i,r,u){if(this.replayGroup_){var e=t.viewState.resolution,o=t.viewState.rotation,s=this.getLayer(),f={};return this.replayGroup_.forEachFeatureAtCoordinate(n,e,o,i,{},function(n){var t=y(n);if(!(t in f))return f[t]=!0,r.call(u,n,s)},null)}},t.prototype.handleFontsChanged_=function(){var n=this.getLayer();n.getVisible()&&this.replayGroup_&&n.changed()},t.prototype.handleStyleImageChange_=function(){this.renderIfReadyAndVisible()},t.prototype.prepareFrame=function(n){var i=this.getLayer(),f=i.getSource(),b=n.viewHints[lu],k=n.viewHints[oi],d=i.getUpdateWhileAnimating(),g=i.getUpdateWhileInteracting(),t,e,p,a,h,v,o,c,w;if(!this.dirty_&&!d&&b||!g&&k)return!0;var nt=n.extent,s=n.viewState,tt=s.projection,r=s.resolution,l=n.pixelRatio,y=i.getRevision(),it=i.getRenderBuffer(),u=i.getRenderOrder();if(void 0===u&&(u=lst),t=ff(nt,it*r),e=s.projection.getExtent(),f.getWrapX()&&s.projection.canWrapX()&&!lr(e,n.extent)&&(p=wt(e),a=Math.max(wt(t)/2,p),t[0]=e[0]-a,t[2]=e[2]+a),!this.dirty_&&this.renderedResolution_==r&&this.renderedRevision_==y&&this.renderedRenderOrder_==u&&lr(this.renderedExtent_,t))return this.replayGroupChanged=!1,!0;if(this.replayGroup_=null,this.dirty_=!1,h=new hst(pn(r,l),t,r,l,f.getOverlaps(),this.declutterTree_,i.getRenderBuffer()),f.loadFeatures(t,r,tt),v=function(n){var t,u=n.getStyleFunction()||i.getStyleFunction(),f;(u&&(t=u(n,r)),t)&&(f=this.renderFeature(n,r,l,t,h),this.dirty_=this.dirty_||f)}.bind(this),u)for(o=[],f.forEachFeatureInExtent(t,function(n){o.push(n)}),o.sort(u),c=0,w=o.length;c<w;++c)v(o[c]);else f.forEachFeatureInExtent(t,v);return h.finish(),this.renderedResolution_=r,this.renderedRevision_=y,this.renderedRenderOrder_=u,this.renderedExtent_=t,this.replayGroup_=h,this.replayGroupChanged=!0,!0},t.prototype.renderFeature=function(n,t,i,r,u){var f,e,o;if(!r)return!1;if(f=!1,Array.isArray(r))for(e=0,o=r.length;e<o;++e)f=hl(u,n,r[e],av(t,i),this.handleStyleImageChange_,this)||f;else f=hl(u,n,r,av(t,i),this.handleStyleImageChange_,this);return f},t}(fst);vv.handles=function(n){return n.getType()===kr.VECTOR};vv.create=function(n,t){return new vv(t)};var ast=vv,io={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},unt={image:[ft.POLYGON,ft.CIRCLE,ft.LINE_STRING,ft.IMAGE,ft.TEXT],hybrid:[ft.POLYGON,ft.LINE_STRING]},fnt={image:[ft.DEFAULT],hybrid:[ft.IMAGE,ft.TEXT,ft.DEFAULT],vector:fs},ib=function(n){function t(t){n.call(this,t,!0);this.declutterTree_=t.getDeclutter()?an()(9,void 0):null;this.dirty_=!1;this.renderedLayerRevision_;this.tmpTransform_=[1,0,0,1,0,0];var i=t.getRenderMode();this.zDirection=i===io.VECTOR?1:0;i!==io.VECTOR&&(this.context=kt());o(ve,a.CLEAR,this.handleFontsChanged_,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){ou(ve,a.CLEAR,this.handleFontsChanged_,this);n.prototype.disposeInternal.call(this)},t.prototype.getTile=function(t,i,r,u,f){var e=n.prototype.getTile.call(this,t,i,r,u,f);return e.getState()===c.LOADED&&(this.createReplayGroup_(e,u,f),this.context&&this.renderTileImage_(e,u,f)),e},t.prototype.getTileImage=function(n){var t=this.getLayer();return n.getImage(t)},t.prototype.prepareFrame=function(t,i){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!=r&&(this.renderedTiles.length=0),this.renderedLayerRevision_=r,n.prototype.prepareFrame.call(this,t,i)},t.prototype.createReplayGroup_=function(n,t,i){var o=this,u=this.getLayer(),l=u.getRevision(),f=u.getRenderOrder()||null,r=n.getReplayState(u);if(r.dirty||r.renderedRevision!=l||r.renderedRenderOrder!=f){for(var s=u.getSource(),a=s.getTileGrid(),e=s.getTileGridForProjection(i).getResolution(n.tileCoord[0]),v=n.extent,y=function(h){var l=n.getTile(n.tileKeys[h]),p,it,w;if(l.getState()==c.LOADED){var rt=l.tileCoord,b=a.getTileCoordExtent(rt),k=of(v,b),nt=oe(b,k)?null:ff(k,u.getRenderBuffer()*e,o.tmpExtent),y=l.getProjection(),tt=!1;hu(i,y)||(tt=!0,l.setProjection(i));r.dirty=!1;var d=new hst(0,k,e,t,s.getOverlaps(),o.declutterTree_,u.getRenderBuffer()),ut=av(e,t),ft=function(n){var t,f=n.getStyleFunction()||u.getStyleFunction(),i;(f&&(t=f(n,e)),t)&&(i=this.renderFeature(n,ut,t,d),this.dirty_=this.dirty_||i,r.dirty=r.dirty||i)},g=l.getFeatures();for(f&&f!==r.renderedRenderOrder&&g.sort(f),p=0,it=g.length;p<it;++p)w=g[p],tt&&(y.getUnits()==pr.TILE_PIXELS&&(y.setWorldExtent(b),y.setExtent(l.getExtent())),w.getGeometry().transform(y,i)),nt&&!dt(nt,w.getGeometry().getExtent())||ft.call(o,w);d.finish();l.setReplayGroup(u,n.tileCoord.toString(),d)}},h=0,p=n.tileKeys.length;h<p;++h)y(h);r.renderedRevision=l;r.renderedRenderOrder=f}},t.prototype.forEachFeatureAtCoordinate=function(n,t,i,r,u){var l=t.viewState.resolution,g=t.viewState.rotation,f,o,k,h,d;i=void 0==i?0:i;for(var a,s,p=this.getLayer(),w={},b=this.renderedTiles,e=0,v=b.length;e<v;++e)if(f=b[e],tp(a=ff(f.extent,i*l,a),n))for(o=0,k=f.tileKeys.length;o<k;++o)h=f.getTile(f.tileKeys[o]),h.getState()==c.LOADED&&(d=h.getReplayGroup(p,f.tileCoord.toString()),s=s||d.forEachFeatureAtCoordinate(n,l,g,i,{},function(n){var t=y(n);if(!(t in w))return w[t]=!0,r.call(u,n,p)},null));return s},t.prototype.getReplayTransform_=function(n,t){var f=this.getLayer().getSource().getTileGrid(),e=n.tileCoord,i=f.getResolution(e[0]),r=t.viewState,u=t.pixelRatio,o=r.resolution/u,l=f.getTileCoordExtent(e,this.tmpExtent),s=r.center,h=bf(l),c=t.size,a=Math.round(u*c[0]/2),v=Math.round(u*c[1]/2);return cu(this.tmpTransform_,a,v,i/o,i/o,r.rotation,(h[0]-s[0])/i,(s[1]-h[1])/i)},t.prototype.handleFontsChanged_=function(){var n=this.getLayer();n.getVisible()&&void 0!==this.renderedLayerRevision_&&n.changed()},t.prototype.handleStyleImageChange_=function(){this.renderIfReadyAndVisible()},t.prototype.postCompose=function(t,i,r){var l=this.getLayer(),d=l.getRenderMode(),e,y,s,k,u,h,ht,f;if(d!=io.IMAGE){var g,nt,a=l.getDeclutter()?{}:null,ct=l.getSource(),tt=fnt[d],it=i.pixelRatio,o=i.viewState.rotation,rt=i.size;o&&to(t,-o,g=Math.round(it*rt[0]/2),nt=Math.round(it*rt[1]/2));a&&this.declutterTree_.clear();for(var ut=i.viewHints,ft=!(ut[lu]||ut[oi]),et=this.renderedTiles,lt=ct.getTileGridForProjection(i.viewState.projection),p=[],ot=[],w=et.length-1;w>=0;--w)if(e=et[w],e.getState()!=c.ABORT)for(var st=e.tileCoord,at=lt.getTileCoordExtent(st,this.tmpExtent)[0]-e.extent[0],v=void 0,b=0,vt=e.tileKeys.length;b<vt;++b)if(y=e.getTile(e.tileKeys[b]),y.getState()==c.LOADED&&(s=y.getReplayGroup(l,st.toString()),s&&s.hasReplays(tt))){for(v||(v=this.getTransform(i,at)),k=y.tileCoord[0],u=s.getClipCoords(v),t.save(),t.globalAlpha=r.opacity,h=0,ht=p.length;h<ht;++h)f=p[h],k<ot[h]&&(t.beginPath(),t.moveTo(u[0],u[1]),t.lineTo(u[2],u[3]),t.lineTo(u[4],u[5]),t.lineTo(u[6],u[7]),t.moveTo(f[6],f[7]),t.lineTo(f[4],f[5]),t.lineTo(f[2],f[3]),t.lineTo(f[0],f[1]),t.clip());s.replay(t,v,o,{},ft,tt,a);t.restore();p.push(u);ot.push(k)}a&&function(n,t,i,r){for(var s,h,o=Object.keys(n).map(Number).sort(lo),c={},u=0,l=o.length;u<l;++u)for(var f=n[o[u].toString()],e=0,a=f.length;e<a;)s=f[e++],h=f[e++],s.replay(t,h,i,c,r)}(a,t,o,ft);o&&to(t,o,g,nt)}n.prototype.postCompose.call(this,t,i,r)},t.prototype.renderFeature=function(n,t,i,r){var u,f,e;if(!i)return!1;if(u=!1,Array.isArray(i))for(f=0,e=i.length;f<e;++f)u=hl(r,n,i[f],t,this.handleStyleImageChange_,this)||u;else u=hl(r,n,i,t,this.handleStyleImageChange_,this);return u},t.prototype.renderTileImage_=function(n,t,i){var r=this.getLayer(),h=n.getReplayState(r),l=r.getRevision(),a=unt[r.getRenderMode()],o,s,u;if(a&&h.renderedTileRevision!==l){h.renderedTileRevision=l;var v=n.wrappedTileCoord,y=v[0],p=r.getSource(),w=p.getTileGridForProjection(i),d=w.getResolution(y),f=n.getContext(r),b=p.getTilePixelSize(y,t,i);f.canvas.width=b[0];f.canvas.height=b[1];for(var k=w.getTileCoordExtent(v,this.tmpExtent),e=0,g=n.tileKeys.length;e<g;++e)o=n.getTile(n.tileKeys[e]),o.getState()==c.LOADED&&(s=t/d,u=hh(this.tmpTransform_),sf(u,s,-s),ne(u,-k[0],-k[3]),o.getReplayGroup(r,n.tileCoord.toString()).replay(f,u,0,{},!0,a))}},t}(sv);ib.handles=function(n){return n.getType()===kr.VECTOR_TILE};ib.create=function(n,t){return new ib(t)};var vst=ib,yst=function(n){function t(t){(t=nt({},t)).controls||(t.controls=vg());t.interactions||(t.interactions=un());n.call(this,t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createRenderer=function(){var n=new rst(this);return n.registerLayerRenderers([ov,sv,ast,vst]),n},t}(hg),au={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"},dr={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},pst=function(n){function t(t){n.call(this);this.options=t;this.id=t.id;this.insertFirst=void 0===t.insertFirst||t.insertFirst;this.stopEvent=void 0===t.stopEvent||t.stopEvent;this.element=document.createElement("div");this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+igt;this.element.style.position="absolute";this.autoPan=void 0!==t.autoPan&&t.autoPan;this.autoPanAnimation=t.autoPanAnimation||{};this.autoPanMargin=void 0!==t.autoPanMargin?t.autoPanMargin:20;this.rendered={bottom_:"",left_:"",right_:"",top_:"",visible:!0};this.mapPostrenderListenerKey=null;o(this,ni(dr.ELEMENT),this.handleElementChanged,this);o(this,ni(dr.MAP),this.handleMapChanged,this);o(this,ni(dr.OFFSET),this.handleOffsetChanged,this);o(this,ni(dr.POSITION),this.handlePositionChanged,this);o(this,ni(dr.POSITIONING),this.handlePositioningChanged,this);void 0!==t.element&&this.setElement(t.element);this.setOffset(void 0!==t.offset?t.offset:[0,0]);this.setPositioning(void 0!==t.positioning?t.positioning:au.TOP_LEFT);void 0!==t.position&&this.setPosition(t.position)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getElement=function(){return this.get(dr.ELEMENT)},t.prototype.getId=function(){return this.id},t.prototype.getMap=function(){return this.get(dr.MAP)},t.prototype.getOffset=function(){return this.get(dr.OFFSET)},t.prototype.getPosition=function(){return this.get(dr.POSITION)},t.prototype.getPositioning=function(){return this.get(dr.POSITIONING)},t.prototype.handleElementChanged=function(){wet(this.element);var n=this.getElement();n&&this.element.appendChild(n)},t.prototype.handleMapChanged=function(){var n,t;this.mapPostrenderListenerKey&&(sw(this.element),lt(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);n=this.getMap();n&&(this.mapPostrenderListenerKey=o(n,iw,this.render,this),this.updatePixelPosition(),t=this.stopEvent?n.getOverlayContainerStopEvent():n.getOverlayContainer(),this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element))},t.prototype.render=function(){this.updatePixelPosition()},t.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},t.prototype.handlePositionChanged=function(){this.updatePixelPosition();this.get(dr.POSITION)&&this.autoPan&&this.panIntoView()},t.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},t.prototype.setElement=function(n){this.set(dr.ELEMENT,n)},t.prototype.setMap=function(n){this.set(dr.MAP,n)},t.prototype.setOffset=function(n){this.set(dr.OFFSET,n)},t.prototype.setPosition=function(n){this.set(dr.POSITION,n)},t.prototype.panIntoView=function(){var n=this.getMap();if(n&&n.getTargetElement()){var i=this.getRect(n.getTargetElement(),n.getSize()),f=this.getElement(),r=this.getRect(f,[function(n){var i=n.offsetWidth,t=getComputedStyle(n);return i+(parseInt(t.marginLeft,10)+parseInt(t.marginRight,10))}(f),function(n){var i=n.offsetHeight,t=getComputedStyle(n);return i+(parseInt(t.marginTop,10)+parseInt(t.marginBottom,10))}(f)]),u=this.autoPanMargin;if(!lr(i,r)){var e=r[0]-i[0],o=i[2]-r[2],s=r[1]-i[1],h=i[3]-r[3],t=[0,0];if(e<0?t[0]=e-u:o<0&&(t[0]=Math.abs(o)+u),s<0?t[1]=s-u:h<0&&(t[1]=Math.abs(h)+u),0!==t[0]||0!==t[1]){var l=n.getView().getCenter(),c=n.getPixelFromCoordinate(l),a=[c[0]+t[0],c[1]+t[1]];n.getView().animate({center:n.getCoordinateFromPixel(a),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing})}}}},t.prototype.getRect=function(n,t){var i=n.getBoundingClientRect(),r=i.left+window.pageXOffset,u=i.top+window.pageYOffset;return[r,u,r+t[0],u+t[1]]},t.prototype.setPositioning=function(n){this.set(dr.POSITIONING,n)},t.prototype.setVisible=function(n){this.rendered.visible!==n&&(this.element.style.display=n?"":"none",this.rendered.visible=n)},t.prototype.updatePixelPosition=function(){var n=this.getMap(),t=this.getPosition(),i,r;n&&n.isRendered()&&t?(i=n.getPixelFromCoordinate(t),r=n.getSize(),this.updateRenderedPosition(i,r)):this.setVisible(!1)},t.prototype.updateRenderedPosition=function(n,t){var r=this.element.style,c=this.getOffset(),i=this.getPositioning(),u,f,e,o,s,h;this.setVisible(!0);u=c[0];f=c[1];i==au.BOTTOM_RIGHT||i==au.CENTER_RIGHT||i==au.TOP_RIGHT?(""!==this.rendered.left_&&(this.rendered.left_=r.left=""),e=Math.round(t[0]-n[0]-u)+"px",this.rendered.right_!=e&&(this.rendered.right_=r.right=e)):(""!==this.rendered.right_&&(this.rendered.right_=r.right=""),i!=au.BOTTOM_CENTER&&i!=au.CENTER_CENTER&&i!=au.TOP_CENTER||(u-=this.element.offsetWidth/2),o=Math.round(n[0]+u)+"px",this.rendered.left_!=o&&(this.rendered.left_=r.left=o));i==au.BOTTOM_LEFT||i==au.BOTTOM_CENTER||i==au.BOTTOM_RIGHT?(""!==this.rendered.top_&&(this.rendered.top_=r.top=""),s=Math.round(t[1]-n[1]-f)+"px",this.rendered.bottom_!=s&&(this.rendered.bottom_=r.bottom=s)):(""!==this.rendered.bottom_&&(this.rendered.bottom_=r.bottom=""),i!=au.CENTER_LEFT&&i!=au.CENTER_CENTER&&i!=au.CENTER_RIGHT||(f-=this.element.offsetHeight/2),h=Math.round(n[1]+f)+"px",this.rendered.top_!=h&&(this.rendered.top_=r.top=h))},t.prototype.getOptions=function(){return this.options},t}(rf),rb=9729,wst=10242,bst=10243,vr=3553,kst=["experimental-webgl","webgl","webkit-3d","moz-webgl"];if("undefined"!=typeof window&&"WebGLRenderingContext"in window)try{yv=dst(document.createElement("canvas"),{failIfMajorPerformanceCaveat:!0});yv&&(wn=yv.getParameter(yv.MAX_TEXTURE_SIZE),gst=yv.getSupportedExtensions())}catch(n){}pv=function(n){this.source_=n};pv.prototype.isAnimated=function(){return!1};pv.prototype.getType=function(){return p()};pv.prototype.getSource=function(){return this.source_};var nht=pv,cl=function(n){function t(t){n.call(this,t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getType=function(){return 35632},t}(nht),ll=function(n){function t(t){n.call(this,t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getType=function(){return 35633},t}(nht),ent=new cl("precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n  vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  float radius = length(windowCenter - windowOffset);\n  float dist = length(windowCenter - gl_FragCoord.xy);\n  if (dist > radius + v_halfWidth) {\n    if (u_strokeColor.a == 0.0) {\n      gl_FragColor = u_fillColor;\n    } else {\n      gl_FragColor = u_strokeColor;\n    }\n    gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n  } else if (u_fillColor.a == 0.0) {\n    // Hooray, no fill, just stroke. We can use real antialiasing.\n    gl_FragColor = u_strokeColor;\n    if (dist < radius - v_halfWidth) {\n      gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n    }\n  } else {\n    gl_FragColor = u_fillColor;\n    float strokeDist = radius - v_halfWidth;\n    float antialias = 2.0 * v_pixelRatio;\n    if (dist > strokeDist) {\n      gl_FragColor = u_strokeColor;\n    } else if (dist >= strokeDist - antialias) {\n      float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n      gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n    }\n  }\n  gl_FragColor.a = gl_FragColor.a * u_opacity;\n  if (gl_FragColor.a <= 0.0) {\n    discard;\n  }\n}\n"),ont=new ll("varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n  v_pixelRatio = u_pixelRatio;\n  float lineWidth = u_lineWidth * u_pixelRatio;\n  v_halfWidth = lineWidth / 2.0;\n  if (lineWidth == 0.0) {\n    lineWidth = 2.0 * u_pixelRatio;\n  }\n  vec2 offset;\n  // Radius with anitaliasing (roughly).\n  float radius = a_radius + 3.0 * u_pixelRatio;\n  // Until we get gl_VertexID in WebGL, we store an instruction.\n  if (a_instruction == 0.0) {\n    // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n    // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n    offset = vec2(-1.0, 1.0);\n  } else if (a_instruction == 1.0) {\n    offset = vec2(-1.0, -1.0);\n  } else if (a_instruction == 2.0) {\n    offset = vec2(1.0, -1.0);\n  } else {\n    offset = vec2(1.0, 1.0);\n  }\n\n  gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n      offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n  v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n      0.0, 1.0)).xy;\n\n  if (distance(v_center, v_offset) > 20000.0) {\n    gl_Position = vec4(v_center, 0.0, 1.0);\n  }\n}\n\n\n"),snt=function(n,t){this.u_projectionMatrix=n.getUniformLocation(t,"u_projectionMatrix");this.u_offsetScaleMatrix=n.getUniformLocation(t,"u_offsetScaleMatrix");this.u_offsetRotateMatrix=n.getUniformLocation(t,"u_offsetRotateMatrix");this.u_lineWidth=n.getUniformLocation(t,"u_lineWidth");this.u_pixelRatio=n.getUniformLocation(t,"u_pixelRatio");this.u_opacity=n.getUniformLocation(t,"u_opacity");this.u_fillColor=n.getUniformLocation(t,"u_fillColor");this.u_strokeColor=n.getUniformLocation(t,"u_strokeColor");this.u_size=n.getUniformLocation(t,"u_size");this.a_position=n.getAttribLocation(t,"a_position");this.a_instruction=n.getAttribLocation(t,"a_instruction");this.a_radius=n.getAttribLocation(t,"a_radius")};var ub=function(n){function t(t,i){n.call(this);this.tolerance=t;this.maxExtent=i;this.origin=su(i);this.projectionMatrix_=[1,0,0,1,0,0];this.offsetRotateMatrix_=[1,0,0,1,0,0];this.offsetScaleMatrix_=[1,0,0,1,0,0];this.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];this.indices=[];this.indicesBuffer=null;this.startIndices=[];this.startIndicesFeature=[];this.vertices=[];this.verticesBuffer=null;this.lineStringReplay=void 0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDeleteResourcesFunction=function(){return p()},t.prototype.finish=function(){p()},t.prototype.setUpProgram=function(){return p()},t.prototype.shutDownProgram=function(){p()},t.prototype.drawReplay=function(){p()},t.prototype.drawHitDetectionReplayOneByOne=function(){return p()},t.prototype.drawHitDetectionReplay=function(n,t,i,r,u,f){return u?this.drawHitDetectionReplayOneByOne(n,t,i,r,f):this.drawHitDetectionReplayAll(n,t,i,r)},t.prototype.drawHitDetectionReplayAll=function(n,t,i,r){n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);this.drawReplay(n,t,i,!0);var u=r(null);return u||void 0},t.prototype.replay=function(n,t,i,r,u,f,e,o,s,h,c){var w,b,k,d,g,nt,tt,it,l=n.getGL(),a,v,y,rt,p;return this.lineStringReplay&&(w=l.isEnabled(l.STENCIL_TEST),b=l.getParameter(l.STENCIL_FUNC),k=l.getParameter(l.STENCIL_VALUE_MASK),d=l.getParameter(l.STENCIL_REF),g=l.getParameter(l.STENCIL_WRITEMASK),nt=l.getParameter(l.STENCIL_FAIL),tt=l.getParameter(l.STENCIL_PASS_DEPTH_PASS),it=l.getParameter(l.STENCIL_PASS_DEPTH_FAIL),l.enable(l.STENCIL_TEST),l.clear(l.STENCIL_BUFFER_BIT),l.stencilMask(255),l.stencilFunc(l.ALWAYS,1,255),l.stencilOp(l.KEEP,l.KEEP,l.REPLACE),this.lineStringReplay.replay(n,t,i,r,u,f,e,o,s,h,c),l.stencilMask(0),l.stencilFunc(l.NOTEQUAL,1,255)),n.bindBuffer(34962,this.verticesBuffer),n.bindBuffer(34963,this.indicesBuffer),a=this.setUpProgram(l,n,u,f),v=hh(this.projectionMatrix_),sf(v,2/(i*u[0]),2/(i*u[1])),vp(v,-r),ne(v,-(t[0]-this.origin[0]),-(t[1]-this.origin[1])),y=hh(this.offsetScaleMatrix_),sf(y,2/u[0],2/u[1]),p=hh(this.offsetRotateMatrix_),0!==r&&vp(p,-r),l.uniformMatrix4fv(a.u_projectionMatrix,!1,wv(this.tmpMat4_,v)),l.uniformMatrix4fv(a.u_offsetScaleMatrix,!1,wv(this.tmpMat4_,y)),l.uniformMatrix4fv(a.u_offsetRotateMatrix,!1,wv(this.tmpMat4_,p)),l.uniform1f(a.u_opacity,e),void 0===s?this.drawReplay(l,n,o,!1):rt=this.drawHitDetectionReplay(l,n,o,s,h,c),this.shutDownProgram(l,a),this.lineStringReplay&&(w||l.disable(l.STENCIL_TEST),l.clear(l.STENCIL_BUFFER_BIT),l.stencilFunc(b,d,k),l.stencilMask(g),l.stencilOp(nt,it,tt)),rt},t.prototype.drawElements=function(n,t,i,r){var u=t.hasOESElementIndexUint?5125:5123,f=r-i,e=i*(t.hasOESElementIndexUint?4:2);n.drawElements(4,f,u,e)},t}(fv),bv=[0,0,0,1],bn=[],kv=[0,0,0,1],al=Number.EPSILON||22204460492503131e-32,fb=function(n,t,i,r,u,f){var e=(i-n)*(f-t)-(u-n)*(r-t);if(!(e<=al)||!(e>=-al))return e>0},hnt=35044,kn=function(n,t){this.arr_=void 0!==n?n:[];this.usage_=void 0!==t?t:hnt};kn.prototype.getArray=function(){return this.arr_};kn.prototype.getUsage=function(){return this.usage_};var vf=kn,cnt=function(n){function t(t,i){n.call(this,t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.radius_=0;this.state_={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,changed:!1}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawCoordinates_=function(n,t,i,r){for(var u=this.vertices.length,o=this.indices.length,e=u/4,f=t,s=i;f<s;f+=r)this.vertices[u++]=n[f],this.vertices[u++]=n[f+1],this.vertices[u++]=0,this.vertices[u++]=this.radius_,this.vertices[u++]=n[f],this.vertices[u++]=n[f+1],this.vertices[u++]=1,this.vertices[u++]=this.radius_,this.vertices[u++]=n[f],this.vertices[u++]=n[f+1],this.vertices[u++]=2,this.vertices[u++]=this.radius_,this.vertices[u++]=n[f],this.vertices[u++]=n[f+1],this.vertices[u++]=3,this.vertices[u++]=this.radius_,this.indices[o++]=e,this.indices[o++]=e+1,this.indices[o++]=e+2,this.indices[o++]=e+2,this.indices[o++]=e+3,this.indices[o++]=e,e+=4},t.prototype.drawCircle=function(n,t){var u=n.getRadius(),f=n.getStride(),i,r;u?(this.startIndices.push(this.indices.length),this.startIndicesFeature.push(t),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.radius_=u,i=n.getFlatCoordinates(),i=yo(i,0,2,f,-this.origin[0],-this.origin[1]),this.drawCoordinates_(i,0,2,f)):this.state_.changed&&(this.styles_.pop(),this.styles_.length)&&(r=this.styles_[this.styles_.length-1],this.state_.fillColor=r[0],this.state_.strokeColor=r[1],this.state_.lineWidth=r[2],this.state_.changed=!1)},t.prototype.finish=function(){this.verticesBuffer=new vf(this.vertices);this.indicesBuffer=new vf(this.indices);this.startIndices.push(this.indices.length);0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]);this.vertices=null;this.indices=null},t.prototype.getDeleteResourcesFunction=function(n){var t=this.verticesBuffer,i=this.indicesBuffer;return function(){n.deleteBuffer(t);n.deleteBuffer(i)}},t.prototype.setUpProgram=function(n,t,i,r){var u,f=t.getProgram(ent,ont);return this.defaultLocations_?u=this.defaultLocations_:(u=new snt(n,f),this.defaultLocations_=u),t.useProgram(f),n.enableVertexAttribArray(u.a_position),n.vertexAttribPointer(u.a_position,2,5126,!1,16,0),n.enableVertexAttribArray(u.a_instruction),n.vertexAttribPointer(u.a_instruction,1,5126,!1,16,8),n.enableVertexAttribArray(u.a_radius),n.vertexAttribPointer(u.a_radius,1,5126,!1,16,12),n.uniform2fv(u.u_size,i),n.uniform1f(u.u_pixelRatio,r),u},t.prototype.shutDownProgram=function(n,t){n.disableVertexAttribArray(t.a_position);n.disableVertexAttribArray(t.a_instruction);n.disableVertexAttribArray(t.a_radius)},t.prototype.drawReplay=function(n,t,i){var r,f,e,u;if(wu(i))for(e=this.startIndices[this.startIndices.length-1],r=this.styleIndices_.length-1;r>=0;--r)f=this.styleIndices_[r],u=this.styles_[r],this.setFillStyle_(n,u[0]),this.setStrokeStyle_(n,u[1],u[2]),this.drawElements(n,t,f,e),e=f;else this.drawReplaySkipping_(n,t,i)},t.prototype.drawHitDetectionReplayOneByOne=function(n,t,i,r,u){var e,h,c,o,a,s,f,l;for(f=this.startIndices.length-2,c=this.startIndices[f+1],e=this.styleIndices_.length-1;e>=0;--e)for(o=this.styles_[e],this.setFillStyle_(n,o[0]),this.setStrokeStyle_(n,o[1],o[2]),a=this.styleIndices_[e];f>=0&&this.startIndices[f]>=a;){if((h=this.startIndices[f],void 0===i[y(s=this.startIndicesFeature[f])]&&s.getGeometry()&&(void 0===u||dt(u,s.getGeometry().getExtent())))&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),this.drawElements(n,t,h,c),l=r(s),l))return l;f--;c=h}},t.prototype.drawReplaySkipping_=function(n,t,i){var e,r,u,o,s,f,h;for(f=this.startIndices.length-2,u=r=this.startIndices[f+1],e=this.styleIndices_.length-1;e>=0;--e){for(o=this.styles_[e],this.setFillStyle_(n,o[0]),this.setStrokeStyle_(n,o[1],o[2]),s=this.styleIndices_[e];f>=0&&this.startIndices[f]>=s;)h=this.startIndices[f],i[y(this.startIndicesFeature[f])]&&(r!==u&&this.drawElements(n,t,r,u),u=h),f--,r=h;r!==u&&this.drawElements(n,t,r,u);r=u=s}},t.prototype.setFillStyle_=function(n,t){n.uniform4fv(this.defaultLocations_.u_fillColor,t)},t.prototype.setStrokeStyle_=function(n,t,i){n.uniform4fv(this.defaultLocations_.u_strokeColor,t);n.uniform1f(this.defaultLocations_.u_lineWidth,i)},t.prototype.setFillStrokeStyle=function(n,t){var i,u,f,e,r;t?(f=t.getLineDash(),this.state_.lineDash=f||bn,e=t.getLineDashOffset(),this.state_.lineDashOffset=e||0,i=(i=t.getColor())instanceof CanvasGradient||i instanceof CanvasPattern?kv:yh(i).map(function(n,t){return 3!=t?n/255:n})||kv,u=void 0!==(u=t.getWidth())?u:1):(i=[0,0,0,0],u=0);r=n?n.getColor():[0,0,0,0];r=r instanceof CanvasGradient||r instanceof CanvasPattern?bv:yh(r).map(function(n,t){return 3!=t?n/255:n})||bv;this.state_.strokeColor&&uf(this.state_.strokeColor,i)&&this.state_.fillColor&&uf(this.state_.fillColor,r)&&this.state_.lineWidth===u||(this.state_.changed=!0,this.state_.fillColor=r,this.state_.strokeColor=i,this.state_.lineWidth=u,this.styles_.push([r,i,u]))},t}(ub),lnt=new cl("precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_image, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  float alpha = texColor.a * v_opacity * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"),ant=new ll("varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix;\n  if (a_rotateWithView == 1.0) {\n    offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  }\n  vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  v_texCoord = a_texCoord;\n  v_opacity = a_opacity;\n}\n\n\n"),vnt=function(n,t){this.u_projectionMatrix=n.getUniformLocation(t,"u_projectionMatrix");this.u_offsetScaleMatrix=n.getUniformLocation(t,"u_offsetScaleMatrix");this.u_offsetRotateMatrix=n.getUniformLocation(t,"u_offsetRotateMatrix");this.u_opacity=n.getUniformLocation(t,"u_opacity");this.u_image=n.getUniformLocation(t,"u_image");this.a_position=n.getAttribLocation(t,"a_position");this.a_texCoord=n.getAttribLocation(t,"a_texCoord");this.a_offsets=n.getAttribLocation(t,"a_offsets");this.a_opacity=n.getAttribLocation(t,"a_opacity");this.a_rotateWithView=n.getAttribLocation(t,"a_rotateWithView")},eb={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};var ynt=function(n){function t(t,i){n.call(this);this.canvas_=t;this.gl_=i;this.bufferCache_={};this.shaderCache_={};this.programCache_={};this.currentProgram_=null;this.hitDetectionFramebuffer_=null;this.hitDetectionTexture_=null;this.hitDetectionRenderbuffer_=null;this.hasOESElementIndexUint=tr(gst,"OES_element_index_uint");this.hasOESElementIndexUint&&i.getExtension("OES_element_index_uint");o(this.canvas_,eb.LOST,this.handleWebGLContextLost,this);o(this.canvas_,eb.RESTORED,this.handleWebGLContextRestored,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.bindBuffer=function(n,t){var i=this.getGL(),r=t.getArray(),u=y(t),o,f,e;u in this.bufferCache_?(o=this.bufferCache_[u],i.bindBuffer(n,o.buffer)):(e=i.createBuffer(),i.bindBuffer(n,e),34962==n?f=new Float32Array(r):34963==n&&(f=this.hasOESElementIndexUint?new Uint32Array(r):new Uint16Array(r)),i.bufferData(n,f,t.getUsage()),this.bufferCache_[u]={buf:t,buffer:e})},t.prototype.deleteBuffer=function(n){var t=this.getGL(),i=y(n),r=this.bufferCache_[i];t.isContextLost()||t.deleteBuffer(r.buffer);delete this.bufferCache_[i]},t.prototype.disposeInternal=function(){var n,t,i,r;if(nut(this.canvas_),n=this.getGL(),!n.isContextLost()){for(t in this.bufferCache_)n.deleteBuffer(this.bufferCache_[t].buffer);for(i in this.programCache_)n.deleteProgram(this.programCache_[i]);for(r in this.shaderCache_)n.deleteShader(this.shaderCache_[r]);n.deleteFramebuffer(this.hitDetectionFramebuffer_);n.deleteRenderbuffer(this.hitDetectionRenderbuffer_);n.deleteTexture(this.hitDetectionTexture_)}},t.prototype.getCanvas=function(){return this.canvas_},t.prototype.getGL=function(){return this.gl_},t.prototype.getHitDetectionFramebuffer=function(){return this.hitDetectionFramebuffer_||this.initHitDetectionFramebuffer_(),this.hitDetectionFramebuffer_},t.prototype.getShader=function(n){var r=y(n),i,t;return r in this.shaderCache_?this.shaderCache_[r]:(i=this.getGL(),t=i.createShader(n.getType()),i.shaderSource(t,n.getSource()),i.compileShader(t),this.shaderCache_[r]=t,t)},t.prototype.getProgram=function(n,t){var u=y(n)+"/"+y(t),r,i;return u in this.programCache_?this.programCache_[u]:(r=this.getGL(),i=r.createProgram(),r.attachShader(i,this.getShader(n)),r.attachShader(i,this.getShader(t)),r.linkProgram(i),this.programCache_[u]=i,i)},t.prototype.handleWebGLContextLost=function(){pf(this.bufferCache_);pf(this.shaderCache_);pf(this.programCache_);this.currentProgram_=null;this.hitDetectionFramebuffer_=null;this.hitDetectionTexture_=null;this.hitDetectionRenderbuffer_=null},t.prototype.handleWebGLContextRestored=function(){},t.prototype.initHitDetectionFramebuffer_=function(){var n=this.gl_,r=n.createFramebuffer(),i,t;n.bindFramebuffer(n.FRAMEBUFFER,r);i=iht(n,1,1);t=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,t);n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,1,1);n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,i,0);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t);n.bindTexture(n.TEXTURE_2D,null);n.bindRenderbuffer(n.RENDERBUFFER,null);n.bindFramebuffer(n.FRAMEBUFFER,null);this.hitDetectionFramebuffer_=r;this.hitDetectionTexture_=i;this.hitDetectionRenderbuffer_=t},t.prototype.useProgram=function(n){return n!=this.currentProgram_&&(this.getGL().useProgram(n),this.currentProgram_=n,!0)},t}(sa),uht=function(n){function t(t,i){n.call(this,t,i);this.anchorX=void 0;this.anchorY=void 0;this.groupIndices=[];this.hitDetectionGroupIndices=[];this.height=void 0;this.imageHeight=void 0;this.imageWidth=void 0;this.defaultLocations=null;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}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDeleteResourcesFunction=function(n){var r=this.verticesBuffer,u=this.indicesBuffer,t=this.getTextures(!0),i=n.getGL();return function(){var f,e;if(!i.isContextLost())for(f=0,e=t.length;f<e;++f)i.deleteTexture(t[f]);n.deleteBuffer(r);n.deleteBuffer(u)}},t.prototype.drawCoordinates=function(n,t,i,r){for(var c,f,e,v,y,p=this.anchorX,w=this.anchorY,b=this.height,k=this.imageHeight,d=this.imageWidth,g=this.opacity,nt=this.originX,tt=this.originY,it=this.rotateWithView?1:0,ut=-this.rotation,o=this.scale,rt=this.width,s=Math.cos(ut),h=Math.sin(ut),l=this.indices.length,u=this.vertices.length,a=t;a<i;a+=r)v=n[a]-this.origin[0],y=n[a+1]-this.origin[1],c=u/8,f=-o*p,e=-o*(b-w),this.vertices[u++]=v,this.vertices[u++]=y,this.vertices[u++]=f*s-e*h,this.vertices[u++]=f*h+e*s,this.vertices[u++]=nt/d,this.vertices[u++]=(tt+b)/k,this.vertices[u++]=g,this.vertices[u++]=it,f=o*(rt-p),e=-o*(b-w),this.vertices[u++]=v,this.vertices[u++]=y,this.vertices[u++]=f*s-e*h,this.vertices[u++]=f*h+e*s,this.vertices[u++]=(nt+rt)/d,this.vertices[u++]=(tt+b)/k,this.vertices[u++]=g,this.vertices[u++]=it,f=o*(rt-p),e=o*w,this.vertices[u++]=v,this.vertices[u++]=y,this.vertices[u++]=f*s-e*h,this.vertices[u++]=f*h+e*s,this.vertices[u++]=(nt+rt)/d,this.vertices[u++]=tt/k,this.vertices[u++]=g,this.vertices[u++]=it,f=-o*p,e=o*w,this.vertices[u++]=v,this.vertices[u++]=y,this.vertices[u++]=f*s-e*h,this.vertices[u++]=f*h+e*s,this.vertices[u++]=nt/d,this.vertices[u++]=tt/k,this.vertices[u++]=g,this.vertices[u++]=it,this.indices[l++]=c,this.indices[l++]=c+1,this.indices[l++]=c+2,this.indices[l++]=c,this.indices[l++]=c+2,this.indices[l++]=c+3;return u},t.prototype.createTextures=function(n,t,i,r){for(var f,o,e,s=t.length,u=0;u<s;++u)(e=y(o=t[u]))in i?f=i[e]:(f=rht(r,o,33071,33071),i[e]=f),n[u]=f},t.prototype.setUpProgram=function(n,t){var i,r=t.getProgram(lnt,ant);return this.defaultLocations?i=this.defaultLocations:(i=new vnt(n,r),this.defaultLocations=i),t.useProgram(r),n.enableVertexAttribArray(i.a_position),n.vertexAttribPointer(i.a_position,2,5126,!1,32,0),n.enableVertexAttribArray(i.a_offsets),n.vertexAttribPointer(i.a_offsets,2,5126,!1,32,8),n.enableVertexAttribArray(i.a_texCoord),n.vertexAttribPointer(i.a_texCoord,2,5126,!1,32,16),n.enableVertexAttribArray(i.a_opacity),n.vertexAttribPointer(i.a_opacity,1,5126,!1,32,24),n.enableVertexAttribArray(i.a_rotateWithView),n.vertexAttribPointer(i.a_rotateWithView,1,5126,!1,32,28),i},t.prototype.shutDownProgram=function(n,t){n.disableVertexAttribArray(t.a_position);n.disableVertexAttribArray(t.a_offsets);n.disableVertexAttribArray(t.a_texCoord);n.disableVertexAttribArray(t.a_opacity);n.disableVertexAttribArray(t.a_rotateWithView)},t.prototype.drawReplay=function(n,t,i,r){var u,s,f,e=r?this.getHitDetectionTextures():this.getTextures(),h=r?this.hitDetectionGroupIndices:this.groupIndices,o;if(wu(i))for(u=0,s=e.length,f=0;u<s;++u)n.bindTexture(vr,e[u]),o=h[u],this.drawElements(n,t,f,o),f=o;else this.drawReplaySkipping(n,t,i,e,h)},t.prototype.drawReplaySkipping=function(n,t,i,r,u){for(var f=0,e=0,c=r.length;e<c;++e){n.bindTexture(vr,r[e]);for(var l=e>0?u[e-1]:0,h=u[e],s=l,o=l;f<this.startIndices.length&&this.startIndices[f]<=h;)void 0!==i[y(this.startIndicesFeature[f])]?(s!==o&&this.drawElements(n,t,s,o),o=s=f===this.startIndices.length-1?h:this.startIndices[f+1]):o=f===this.startIndices.length-1?h:this.startIndices[f+1],f++;s!==o&&this.drawElements(n,t,s,o)}},t.prototype.drawHitDetectionReplayOneByOne=function(n,t,i,r,u){for(var l,s,h,o,e=this.startIndices.length-1,a=this.getHitDetectionTextures(),c,f=a.length-1;f>=0;--f)for(n.bindTexture(vr,a[f]),l=f>0?this.hitDetectionGroupIndices[f-1]:0,h=this.hitDetectionGroupIndices[f];e>=0&&this.startIndices[e]>=l;){if((s=this.startIndices[e],void 0===i[y(o=this.startIndicesFeature[e])]&&o.getGeometry()&&(void 0===u||dt(u,o.getGeometry().getExtent())))&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),this.drawElements(n,t,s,h),c=r(o),c))return c;h=s;e--}},t.prototype.finish=function(){this.anchorX=void 0;this.anchorY=void 0;this.height=void 0;this.imageHeight=void 0;this.imageWidth=void 0;this.indices=null;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.vertices=null;this.width=void 0},t.prototype.getTextures=function(){return p()},t.prototype.getHitDetectionTextures=function(){return p()},t}(ub),pnt=function(n){function t(t,i){n.call(this,t,i);this.images_=[];this.hitDetectionImages_=[];this.textures_=[];this.hitDetectionTextures_=[]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawMultiPoint=function(n,t){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(t);var i=n.getFlatCoordinates(),r=n.getStride();this.drawCoordinates(i,0,i.length,r)},t.prototype.drawPoint=function(n,t){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(t);var i=n.getFlatCoordinates(),r=n.getStride();this.drawCoordinates(i,0,i.length,r)},t.prototype.finish=function(t){var r=t.getGL(),u,i;this.groupIndices.push(this.indices.length);this.hitDetectionGroupIndices.push(this.indices.length);this.verticesBuffer=new vf(this.vertices);u=this.indices;this.indicesBuffer=new vf(u);i={};this.createTextures(this.textures_,this.images_,i,r);this.createTextures(this.hitDetectionTextures_,this.hitDetectionImages_,i,r);this.images_=null;this.hitDetectionImages_=null;n.prototype.finish.call(this,t)},t.prototype.setImageStyle=function(n){var r=n.getAnchor(),t=n.getImage(1),u=n.getImageSize(),i=n.getHitDetectionImage(1),o=n.getOpacity(),f=n.getOrigin(),s=n.getRotateWithView(),h=n.getRotation(),e=n.getSize(),c=n.getScale();0===this.images_.length?this.images_.push(t):y(this.images_[this.images_.length-1])!=y(t)&&(this.groupIndices.push(this.indices.length),this.images_.push(t));0===this.hitDetectionImages_.length?this.hitDetectionImages_.push(i):y(this.hitDetectionImages_[this.hitDetectionImages_.length-1])!=y(i)&&(this.hitDetectionGroupIndices.push(this.indices.length),this.hitDetectionImages_.push(i));this.anchorX=r[0];this.anchorY=r[1];this.height=e[1];this.imageHeight=u[1];this.imageWidth=u[0];this.opacity=o;this.originX=f[0];this.originY=f[1];this.rotation=h;this.rotateWithView=s;this.scale=c;this.width=e[0]},t.prototype.getTextures=function(n){return n?this.textures_.concat(this.hitDetectionTextures_):this.textures_},t.prototype.getHitDetectionTextures=function(){return this.hitDetectionTextures_},t}(uht);var wnt=new cl("precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  if (v_round > 0.0) {\n    vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n        (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n    if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n      discard;\n    }\n  }\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"),bnt=new ll("varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n  float epsilon = 0.000000000001;\n  return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n  vec2 dirVect = nextP - a_position;\n  vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n  offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n  float halfWidth = u_lineWidth / 2.0;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_nextPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n  offset = normal * direction * miterLength;\n  round = 0.0;\n  if (isRound) {\n    round = 1.0;\n  } else if (miterLength > u_miterLimit + u_lineWidth) {\n    offset = halfWidth * tmpNormal * direction;\n  }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n  bool degenerate = false;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_lastPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  vec2 longOffset, shortOffset, longVertex;\n  vec4 shortProjVertex;\n  float halfWidth = u_lineWidth / 2.0;\n  if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n    longOffset = tmpNormal * direction * halfWidth;\n    shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_nextPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n  } else {\n    shortOffset = tmpNormal * direction * halfWidth;\n    longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_lastPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n  }\n  //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n  vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n  vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n  float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n  float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n  float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n  float epsilon = 0.000000000001;\n  if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n    shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n    shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n    offset = shortProjVertex.xy;\n    degenerate = true;\n  } else {\n    float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n    offset = normal * direction * miterLength;\n  }\n  return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n    in float turnDir, in float direction) {\n  round = 0.0;\n  vec2 dirVect = a_position - nextP;\n  vec2 firstNormal = normalize(dirVect);\n  vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n  vec2 hypotenuse = normalize(firstNormal - secondNormal);\n  vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n  float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n  offset = normal * length;\n  if (isRound) {\n    round = 1.0;\n  }\n}\n\nvoid main(void) {\n  bool degenerate = false;\n  float direction = float(sign(a_direction));\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  vec2 offset;\n  vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n  bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n  v_round = 0.0;\n  v_halfWidth = u_lineWidth / 2.0;\n  v_roundVertex = projPos.xy;\n\n  if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n    alongNormal(offset, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n    alongNormal(offset, a_lastPos, -1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n    miterUp(offset, v_round, round, direction);\n  } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n    degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n  } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n    squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n    squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n  }\n  if (!degenerate) {\n    vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n    gl_Position = projPos + offsets;\n  } else {\n    gl_Position = vec4(offset, 0.0, 1.0);\n  }\n}\n\n\n"),knt=function(n,t){this.u_projectionMatrix=n.getUniformLocation(t,"u_projectionMatrix");this.u_offsetScaleMatrix=n.getUniformLocation(t,"u_offsetScaleMatrix");this.u_offsetRotateMatrix=n.getUniformLocation(t,"u_offsetRotateMatrix");this.u_lineWidth=n.getUniformLocation(t,"u_lineWidth");this.u_miterLimit=n.getUniformLocation(t,"u_miterLimit");this.u_opacity=n.getUniformLocation(t,"u_opacity");this.u_color=n.getUniformLocation(t,"u_color");this.u_size=n.getUniformLocation(t,"u_size");this.u_pixelRatio=n.getUniformLocation(t,"u_pixelRatio");this.a_lastPos=n.getAttribLocation(t,"a_lastPos");this.a_position=n.getAttribLocation(t,"a_position");this.a_nextPos=n.getAttribLocation(t,"a_nextPos");this.a_direction=n.getAttribLocation(t,"a_direction")},fht=3,eht=5,oht=7,sht=11,hht=13,dnt=17,cht=19,gnt=23,lht=function(n){function t(t,i){n.call(this,t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,changed:!1}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawCoordinates_=function(n,t,i,r){for(var k,a,f,h,o,s,e=this.vertices.length,u=this.indices.length,p="bevel"===this.state_.lineJoin?0:"miter"===this.state_.lineJoin?1:2,y="butt"===this.state_.lineCap?0:"square"===this.state_.lineCap?1:2,w=dn(n,t,i,r),c=u,v=1,l=t,b=i;l<b;l+=r){if(f=e/7,h=o,o=s||[n[l],n[l+1]],l===t){if(s=[n[l+r],n[l+r+1]],i-t==2*r&&uf(o,s))break;if(!w){y&&(e=this.addVertices_([0,0],o,s,v*oht*y,e),e=this.addVertices_([0,0],o,s,-v*oht*y,e),this.indices[u++]=f+2,this.indices[u++]=f,this.indices[u++]=f+1,this.indices[u++]=f+1,this.indices[u++]=f+3,this.indices[u++]=f+2);e=this.addVertices_([0,0],o,s,v*fht*(y||1),e);c=(e=this.addVertices_([0,0],o,s,-v*fht*(y||1),e))/7-1;continue}h=[n[i-2*r],n[i-2*r+1]];k=s}else{if(l===i-r){if(w){s=k;break}h=h||[0,0];e=this.addVertices_(h,o,[0,0],v*eht*(y||1),e);e=this.addVertices_(h,o,[0,0],-v*eht*(y||1),e);this.indices[u++]=f;this.indices[u++]=c-1;this.indices[u++]=c;this.indices[u++]=c;this.indices[u++]=f+1;this.indices[u++]=f;y&&(e=this.addVertices_(h,o,[0,0],v*sht*y,e),e=this.addVertices_(h,o,[0,0],-v*sht*y,e),this.indices[u++]=f+2,this.indices[u++]=f,this.indices[u++]=f+1,this.indices[u++]=f+1,this.indices[u++]=f+3,this.indices[u++]=f+2);break}s=[n[l+r],n[l+r+1]]}a=fb(h[0],h[1],o[0],o[1],s[0],s[1])?-1:1;e=this.addVertices_(h,o,s,a*hht*(p||1),e);e=this.addVertices_(h,o,s,a*dnt*(p||1),e);e=this.addVertices_(h,o,s,-a*cht*(p||1),e);l>t&&(this.indices[u++]=f,this.indices[u++]=c-1,this.indices[u++]=c,this.indices[u++]=f+2,this.indices[u++]=f,this.indices[u++]=v*a>0?c:c-1);this.indices[u++]=f;this.indices[u++]=f+2;this.indices[u++]=f+1;c=f+2;v=a;p&&(e=this.addVertices_(h,o,s,a*gnt*p,e),this.indices[u++]=f+1,this.indices[u++]=f+3,this.indices[u++]=f)}w&&(f=f||e/7,a=go([h[0],h[1],o[0],o[1],s[0],s[1]],0,6,2)?1:-1,e=this.addVertices_(h,o,s,a*hht*(p||1),e),e=this.addVertices_(h,o,s,-a*cht*(p||1),e),this.indices[u++]=f,this.indices[u++]=c-1,this.indices[u++]=c,this.indices[u++]=f+1,this.indices[u++]=f,this.indices[u++]=v*a>0?c:c-1)},t.prototype.addVertices_=function(n,t,i,r,u){return this.vertices[u++]=n[0],this.vertices[u++]=n[1],this.vertices[u++]=t[0],this.vertices[u++]=t[1],this.vertices[u++]=i[0],this.vertices[u++]=i[1],this.vertices[u++]=r,u},t.prototype.isValid_=function(n,t,i,r){var u=i-t;return!(u<2*r)&&(u!==2*r||!uf([n[t],n[t+1]],[n[t+r],n[t+r+1]]))},t.prototype.drawLineString=function(n,t){var i=n.getFlatCoordinates(),r=n.getStride();this.isValid_(i,0,i.length,r)&&(i=yo(i,0,i.length,r,-this.origin[0],-this.origin[1]),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.startIndices.push(this.indices.length),this.startIndicesFeature.push(t),this.drawCoordinates_(i,0,i.length,r))},t.prototype.drawMultiLineString=function(n,t){var f=this.indices.length,i=n.getEnds(),r,s,e,u,o;if(i.unshift(0),e=n.getFlatCoordinates(),u=n.getStride(),i.length>1)for(r=1,s=i.length;r<s;++r)this.isValid_(e,i[r-1],i[r],u)&&(o=yo(e,i[r-1],i[r],u,-this.origin[0],-this.origin[1]),this.drawCoordinates_(o,0,o.length,u));this.indices.length>f&&(this.startIndices.push(f),this.startIndicesFeature.push(t),this.state_.changed&&(this.styleIndices_.push(f),this.state_.changed=!1))},t.prototype.drawPolygonCoordinates=function(n,t,i){var r,u;if(dn(n,0,n.length,i)||(n.push(n[0]),n.push(n[1])),this.drawCoordinates_(n,0,n.length,i),t.length)for(r=0,u=t.length;r<u;++r)dn(t[r],0,t[r].length,i)||(t[r].push(t[r][0]),t[r].push(t[r][1])),this.drawCoordinates_(t[r],0,t[r].length,i)},t.prototype.setPolygonStyle=function(n,t){var i=void 0===t?this.indices.length:t;this.startIndices.push(i);this.startIndicesFeature.push(n);this.state_.changed&&(this.styleIndices_.push(i),this.state_.changed=!1)},t.prototype.getCurrentIndex=function(){return this.indices.length},t.prototype.finish=function(){this.verticesBuffer=new vf(this.vertices);this.indicesBuffer=new vf(this.indices);this.startIndices.push(this.indices.length);0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]);this.vertices=null;this.indices=null},t.prototype.getDeleteResourcesFunction=function(n){var t=this.verticesBuffer,i=this.indicesBuffer;return function(){n.deleteBuffer(t);n.deleteBuffer(i)}},t.prototype.setUpProgram=function(n,t,i,r){var u,f=t.getProgram(wnt,bnt);return this.defaultLocations_?u=this.defaultLocations_:(u=new knt(n,f),this.defaultLocations_=u),t.useProgram(f),n.enableVertexAttribArray(u.a_lastPos),n.vertexAttribPointer(u.a_lastPos,2,5126,!1,28,0),n.enableVertexAttribArray(u.a_position),n.vertexAttribPointer(u.a_position,2,5126,!1,28,8),n.enableVertexAttribArray(u.a_nextPos),n.vertexAttribPointer(u.a_nextPos,2,5126,!1,28,16),n.enableVertexAttribArray(u.a_direction),n.vertexAttribPointer(u.a_direction,1,5126,!1,28,24),n.uniform2fv(u.u_size,i),n.uniform1f(u.u_pixelRatio,r),u},t.prototype.shutDownProgram=function(n,t){n.disableVertexAttribArray(t.a_lastPos);n.disableVertexAttribArray(t.a_position);n.disableVertexAttribArray(t.a_nextPos);n.disableVertexAttribArray(t.a_direction)},t.prototype.drawReplay=function(n,t,i,r){var u,e,o,f,s=n.getParameter(n.DEPTH_FUNC),h=n.getParameter(n.DEPTH_WRITEMASK);if(r||(n.enable(n.DEPTH_TEST),n.depthMask(!0),n.depthFunc(n.NOTEQUAL)),wu(i))for(o=this.startIndices[this.startIndices.length-1],u=this.styleIndices_.length-1;u>=0;--u)e=this.styleIndices_[u],f=this.styles_[u],this.setStrokeStyle_(n,f[0],f[1],f[2]),this.drawElements(n,t,e,o),n.clear(n.DEPTH_BUFFER_BIT),o=e;else this.drawReplaySkipping_(n,t,i);r||(n.disable(n.DEPTH_TEST),n.clear(n.DEPTH_BUFFER_BIT),n.depthMask(h),n.depthFunc(s))},t.prototype.drawReplaySkipping_=function(n,t,i){var e,r,u,o,s,f,h;for(f=this.startIndices.length-2,u=r=this.startIndices[f+1],e=this.styleIndices_.length-1;e>=0;--e){for(o=this.styles_[e],this.setStrokeStyle_(n,o[0],o[1],o[2]),s=this.styleIndices_[e];f>=0&&this.startIndices[f]>=s;)h=this.startIndices[f],i[y(this.startIndicesFeature[f])]&&(r!==u&&(this.drawElements(n,t,r,u),n.clear(n.DEPTH_BUFFER_BIT)),u=h),f--,r=h;r!==u&&(this.drawElements(n,t,r,u),n.clear(n.DEPTH_BUFFER_BIT));r=u=s}},t.prototype.drawHitDetectionReplayOneByOne=function(n,t,i,r,u){var e,h,c,o,a,s,f,l;for(f=this.startIndices.length-2,c=this.startIndices[f+1],e=this.styleIndices_.length-1;e>=0;--e)for(o=this.styles_[e],this.setStrokeStyle_(n,o[0],o[1],o[2]),a=this.styleIndices_[e];f>=0&&this.startIndices[f]>=a;){if((h=this.startIndices[f],void 0===i[y(s=this.startIndicesFeature[f])]&&s.getGeometry()&&(void 0===u||dt(u,s.getGeometry().getExtent())))&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),this.drawElements(n,t,h,c),l=r(s),l))return l;f--;c=h}},t.prototype.setStrokeStyle_=function(n,t,i,r){n.uniform4fv(this.defaultLocations_.u_color,t);n.uniform1f(this.defaultLocations_.u_lineWidth,i);n.uniform1f(this.defaultLocations_.u_miterLimit,r)},t.prototype.setFillStrokeStyle=function(n,t){var e=t.getLineCap(),o,s,f,i,r,u;this.state_.lineCap=void 0!==e?e:"round";o=t.getLineDash();this.state_.lineDash=o||bn;s=t.getLineDashOffset();this.state_.lineDashOffset=s||0;f=t.getLineJoin();this.state_.lineJoin=void 0!==f?f:"round";i=t.getColor();i=i instanceof CanvasGradient||i instanceof CanvasPattern?kv:yh(i).map(function(n,t){return 3!=t?n/255:n})||kv;r=t.getWidth();r=void 0!==r?r:1;u=t.getMiterLimit();u=void 0!==u?u:10;this.state_.strokeColor&&uf(this.state_.strokeColor,i)&&this.state_.lineWidth===r&&this.state_.miterLimit===u||(this.state_.changed=!0,this.state_.strokeColor=i,this.state_.lineWidth=r,this.state_.miterLimit=u,this.styles_.push([i,r,u]))},t}(ub),nti=new cl("precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"),tti=new ll("\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n"),iti=function(n,t){this.u_projectionMatrix=n.getUniformLocation(t,"u_projectionMatrix");this.u_offsetScaleMatrix=n.getUniformLocation(t,"u_offsetScaleMatrix");this.u_offsetRotateMatrix=n.getUniformLocation(t,"u_offsetRotateMatrix");this.u_color=n.getUniformLocation(t,"u_color");this.u_opacity=n.getUniformLocation(t,"u_opacity");this.a_position=n.getAttribLocation(t,"a_position")},gu=function(n){this.first_;this.last_;this.head_;this.circular_=void 0===n||n;this.length_=0};gu.prototype.insertItem=function(n){var t={prev:void 0,next:void 0,data:n},i=this.head_,r;i?(r=i.next,t.prev=i,t.next=r,i.next=t,r&&(r.prev=t),i===this.last_&&(this.last_=t)):(this.first_=t,this.last_=t,this.circular_&&(t.next=t,t.prev=t));this.head_=t;this.length_++};gu.prototype.removeItem=function(){var t=this.head_,i,n;t&&(i=t.next,n=t.prev,i&&(i.prev=n),n&&(n.next=i),this.head_=i||n,this.first_===this.last_?(this.head_=void 0,this.first_=void 0,this.last_=void 0):this.first_===t?this.first_=this.head_:this.last_===t&&(this.last_=n?this.head_.prev:this.head_),this.length_--)};gu.prototype.firstItem=function(){if(this.head_=this.first_,this.head_)return this.head_.data};gu.prototype.lastItem=function(){if(this.head_=this.last_,this.head_)return this.head_.data};gu.prototype.nextItem=function(){if(this.head_&&this.head_.next)return this.head_=this.head_.next,this.head_.data};gu.prototype.getNextItem=function(){if(this.head_&&this.head_.next)return this.head_.next.data};gu.prototype.prevItem=function(){if(this.head_&&this.head_.prev)return this.head_=this.head_.prev,this.head_.data};gu.prototype.getPrevItem=function(){if(this.head_&&this.head_.prev)return this.head_.prev.data};gu.prototype.getCurrItem=function(){if(this.head_)return this.head_.data};gu.prototype.setFirstItem=function(){this.circular_&&this.head_&&(this.first_=this.head_,this.last_=this.head_.prev)};gu.prototype.concat=function(n){if(n.head_){if(this.head_){var t=this.head_.next;this.head_.next=n.first_;n.first_.prev=this.head_;t.prev=n.last_;n.last_.next=t;this.length_+=n.length_}else this.head_=n.head_,this.first_=n.first_,this.last_=n.last_,this.length_=n.length_;n.head_=void 0;n.first_=void 0;n.last_=void 0;n.length_=0}};gu.prototype.getLength=function(){return this.length_};ob=gu;uu=function(n){this.rbush_=an()(n,void 0);this.items_={}};uu.prototype.insert=function(n,t){var i={minX:n[0],minY:n[1],maxX:n[2],maxY:n[3],value:t};this.rbush_.insert(i);this.items_[y(t)]=i};uu.prototype.load=function(n,t){for(var u=new Array(t.length),i=0,o=t.length;i<o;i++){var r=n[i],f=t[i],e={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:f};u[i]=e;this.items_[y(f)]=e}this.rbush_.load(u)};uu.prototype.remove=function(n){var t=y(n),i=this.items_[t];return delete this.items_[t],null!==this.rbush_.remove(i)};uu.prototype.update=function(n,t){var i=this.items_[y(t)];oe([i.minX,i.minY,i.maxX,i.maxY],n)||(this.remove(t),this.insert(n,t))};uu.prototype.getAll=function(){return this.rbush_.all().map(function(n){return n.value})};uu.prototype.getInExtent=function(n){var t={minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]};return this.rbush_.search(t).map(function(n){return n.value})};uu.prototype.forEach=function(n,t){return this.forEach_(this.getAll(),n,t)};uu.prototype.forEachInExtent=function(n,t,i){return this.forEach_(this.getInExtent(n),t,i)};uu.prototype.forEach_=function(n,t,i){for(var r,u=0,f=n.length;u<f;u++)if(r=t.call(i,n[u]))return r;return r};uu.prototype.isEmpty=function(){return wu(this.items_)};uu.prototype.clear=function(){this.rbush_.clear();this.items_={}};uu.prototype.getExtent=function(n){var t=this.rbush_.toJSON();return ef(t.minX,t.minY,t.maxX,t.maxY,n)};uu.prototype.concat=function(n){for(var t in this.rbush_.load(n.rbush_.all()),n.items_)this.items_[t]=n.items_[t]};var ic=uu,rti=function(n){function t(t,i){n.call(this,t,i);this.lineStringReplay=new lht(t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.state_={fillColor:null,changed:!1}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawCoordinates_=function(n,t,i){var o=new ob,f=new ic,c,r,l,e,u;if(this.processFlatCoordinates_(n,i,o,f,!0),c=this.getMaxCoords_(o),t.length){for(e=[],r=0,l=t.length;r<l;++r)u={list:new ob,maxCoords:void 0,rtree:new ic},e.push(u),this.processFlatCoordinates_(t[r],i,u.list,u.rtree,!1),this.classifyPoints_(u.list,u.rtree,!0),u.maxCoords=this.getMaxCoords_(u.list);for(e.sort(function(n,t){return t.maxCoords[0]===n.maxCoords[0]?n.maxCoords[1]-t.maxCoords[1]:t.maxCoords[0]-n.maxCoords[0]}),r=0;r<e.length;++r){var s=e[r].list,a=s.firstItem(),h=a,v=void 0;do{if(this.getIntersections_(h,f).length){v=!0;break}h=s.nextItem()}while(a!==h);v||this.bridgeHole_(s,e[r].maxCoords[0],o,c[0],f)&&(f.concat(e[r].rtree),this.classifyPoints_(o,f,!1))}}else this.classifyPoints_(o,f,!1);this.triangulate_(o,f)},t.prototype.processFlatCoordinates_=function(n,t,i,r,u){var o,c,l,e,f,y=go(n,0,n.length,t),a=this.vertices.length/2,s=[],h=[],v;if(u===y){for(e=l=this.createPoint_(n[0],n[1],a++),o=t,c=n.length;o<c;o+=t)f=this.createPoint_(n[o],n[o+1],a++),h.push(this.insertItem_(e,f,i)),s.push([Math.min(e.x,f.x),Math.min(e.y,f.y),Math.max(e.x,f.x),Math.max(e.y,f.y)]),e=f;h.push(this.insertItem_(f,l,i));s.push([Math.min(e.x,f.x),Math.min(e.y,f.y),Math.max(e.x,f.x),Math.max(e.y,f.y)])}else{for(v=n.length-t,e=l=this.createPoint_(n[v],n[v+1],a++),o=v-t,c=0;o>=c;o-=t)f=this.createPoint_(n[o],n[o+1],a++),h.push(this.insertItem_(e,f,i)),s.push([Math.min(e.x,f.x),Math.min(e.y,f.y),Math.max(e.x,f.x),Math.max(e.y,f.y)]),e=f;h.push(this.insertItem_(f,l,i));s.push([Math.min(e.x,f.x),Math.min(e.y,f.y),Math.max(e.x,f.x),Math.max(e.y,f.y)])}r.load(s,h)},t.prototype.getMaxCoords_=function(n){var r=n.firstItem(),t=r,i=[t.p0.x,t.p0.y];do(t=n.nextItem()).p0.x>i[0]&&(i=[t.p0.x,t.p0.y]);while(t!==r);return i},t.prototype.classifyPoints_=function(n,t,i){var f=n.firstItem(),r=f,u=n.nextItem(),o=!1,e;do e=i?fb(u.p1.x,u.p1.y,r.p1.x,r.p1.y,r.p0.x,r.p0.y):fb(r.p0.x,r.p0.y,r.p1.x,r.p1.y,u.p1.x,u.p1.y),void 0===e?(this.removeItem_(r,u,n,t),o=!0,u===f&&(f=n.getNextItem()),u=r,n.prevItem()):r.p1.reflex!==e&&(r.p1.reflex=e,o=!0),r=u,u=n.nextItem();while(r!==f);return o},t.prototype.bridgeHole_=function(n,t,i,r,u){for(var v,y,c,p,k,d,f=n.firstItem();f.p1.x!==t;)f=n.nextItem();for(var h,g,e=f.p1,w={x:r,y:e.y,i:-1},a=1/0,nt=this.getIntersections_({p0:e,p1:w},u,!0),o=0,l=nt.length;o<l;++o){var s=nt[o],b=this.calculateIntersection_(e,w,s.p0,s.p1,!0),tt=Math.abs(e.x-b[0]);tt<a&&void 0!==fb(e.x,e.y,s.p0.x,s.p0.y,s.p1.x,s.p1.y)&&(a=tt,g={x:b[0],y:b[1],i:-1},f=s)}if(a===1/0)return!1;if((h=f.p1,a>0)&&(v=this.getPointsInTriangle_(e,g,f.p1,u),v.length))for(y=1/0,o=0,l=v.length;o<l;++o)c=v[o],p=Math.atan2(e.y-c.y,w.x-c.x),(p<y||p===y&&c.x<h.x)&&(y=p,h=c);for(f=i.firstItem();f.p1.x!==h.x||f.p1.y!==h.y;)f=i.nextItem();return k={x:e.x,y:e.y,i:e.i,reflex:void 0},d={x:f.p1.x,y:f.p1.y,i:f.p1.i,reflex:void 0},n.getNextItem().p0=k,this.insertItem_(e,f.p1,n,u),this.insertItem_(d,k,n,u),f.p1=d,n.setFirstItem(),i.concat(n),!0},t.prototype.triangulate_=function(n,t){for(var u,i=!1,r=this.isSimple_(n,t);n.getLength()>3;)if(r){if(!this.clipEars_(n,t,r,i)&&!this.classifyPoints_(n,t,i)&&!this.resolveSelfIntersections_(n,t,!0))break}else if(!this.clipEars_(n,t,r,i)&&!this.classifyPoints_(n,t,i)&&!this.resolveSelfIntersections_(n,t)){if(!(r=this.isSimple_(n,t))){this.splitPolygon_(n,t);break}i=!this.isClockwise_(n);this.classifyPoints_(n,t,i)}3===n.getLength()&&(u=this.indices.length,this.indices[u++]=n.getPrevItem().p0.i,this.indices[u++]=n.getCurrItem().p0.i,this.indices[u++]=n.getNextItem().p0.i)},t.prototype.clipEars_=function(n,t,i,r){var u,e,f,a=this.indices.length,c=n.firstItem(),s=n.getPrevItem(),h=c,l=n.nextItem(),o=n.getNextItem(),y=!1,v;do(u=h.p0,e=h.p1,f=l.p1,!1===e.reflex)&&(v=void 0,v=i?0===this.getPointsInTriangle_(u,e,f,t,!0).length:r?this.diagonalIsInside_(o.p1,f,e,u,s.p0):this.diagonalIsInside_(s.p0,u,e,f,o.p1),(i||0===this.getIntersections_({p0:u,p1:f},t).length)&&v&&(i||!1===u.reflex||!1===f.reflex||go([s.p0.x,s.p0.y,u.x,u.y,e.x,e.y,f.x,f.y,o.p1.x,o.p1.y],0,10,2)===!r)&&(this.indices[a++]=u.i,this.indices[a++]=e.i,this.indices[a++]=f.i,this.removeItem_(h,l,n,t),l===c&&(c=o),y=!0)),s=n.getPrevItem(),h=n.getCurrItem(),l=n.nextItem(),o=n.getNextItem();while(h!==c&&n.getLength()>3);return y},t.prototype.resolveSelfIntersections_=function(n,t,i){var s=n.firstItem(),e,f;n.nextItem();var r=s,u=n.nextItem(),l=!1;do{if(e=this.calculateIntersection_(r.p0,r.p1,u.p0,u.p1,i),e){var o=!1,a=this.vertices.length,c=this.indices.length,v=a/2,h=n.prevItem();if(n.removeItem(),t.remove(h),o=h===s,f=void 0,i?(e[0]===r.p0.x&&e[1]===r.p0.y?(n.prevItem(),f=r.p0,u.p0=f,t.remove(r),o=o||r===s):(f=u.p1,r.p1=f,t.remove(u),o=o||u===s),n.removeItem()):(f=this.createPoint_(e[0],e[1],v),r.p1=f,u.p0=f,t.update([Math.min(r.p0.x,r.p1.x),Math.min(r.p0.y,r.p1.y),Math.max(r.p0.x,r.p1.x),Math.max(r.p0.y,r.p1.y)],r),t.update([Math.min(u.p0.x,u.p1.x),Math.min(u.p0.y,u.p1.y),Math.max(u.p0.x,u.p1.x),Math.max(u.p0.y,u.p1.y)],u)),this.indices[c++]=h.p0.i,this.indices[c++]=h.p1.i,this.indices[c++]=f.i,l=!0,o)break}r=n.getPrevItem();u=n.nextItem()}while(r!==s);return l},t.prototype.isSimple_=function(n,t){var r=n.firstItem(),i=r;do{if(this.getIntersections_(i,t).length)return!1;i=n.nextItem()}while(i!==r);return!0},t.prototype.isClockwise_=function(n){var r=2*n.getLength(),i=new Array(r),u=n.firstItem(),t=u,f=0;do i[f++]=t.p0.x,i[f++]=t.p0.y,t=n.nextItem();while(t!==u);return go(i,0,r,2)},t.prototype.splitPolygon_=function(n,t){var h=n.firstItem(),i=h,s,f;do{if(s=this.getIntersections_(i,t),s.length){var u=s[0],l=this.vertices.length/2,c=this.calculateIntersection_(i.p0,i.p1,u.p0,u.p1),r=this.createPoint_(c[0],c[1],l),e=new ob,o=new ic;for(this.insertItem_(r,i.p1,e,o),i.p1=r,t.update([Math.min(i.p0.x,r.x),Math.min(i.p0.y,r.y),Math.max(i.p0.x,r.x),Math.max(i.p0.y,r.y)],i),f=n.nextItem();f!==u;)this.insertItem_(f.p0,f.p1,e,o),t.remove(f),n.removeItem(),f=n.getCurrItem();this.insertItem_(u.p0,r,e,o);u.p0=r;t.update([Math.min(u.p1.x,r.x),Math.min(u.p1.y,r.y),Math.max(u.p1.x,r.x),Math.max(u.p1.y,r.y)],u);this.classifyPoints_(n,t,!1);this.triangulate_(n,t);this.classifyPoints_(e,o,!1);this.triangulate_(e,o);break}i=n.nextItem()}while(i!==h)},t.prototype.createPoint_=function(n,t,i){var r=this.vertices.length;return this.vertices[r++]=n,this.vertices[r++]=t,{x:n,y:t,i:i,reflex:void 0}},t.prototype.insertItem_=function(n,t,i,r){var u={p0:n,p1:t};return i.insertItem(u),r&&r.insert([Math.min(n.x,t.x),Math.min(n.y,t.y),Math.max(n.x,t.x),Math.max(n.y,t.y)],u),u},t.prototype.removeItem_=function(n,t,i,r){i.getCurrItem()===t&&(i.removeItem(),n.p1=t.p1,r.remove(t),r.update([Math.min(n.p0.x,n.p1.x),Math.min(n.p0.y,n.p1.y),Math.max(n.p0.x,n.p1.x),Math.max(n.p0.y,n.p1.y)],n))},t.prototype.getPointsInTriangle_=function(n,t,i,r,u){for(var h,f,o=[],s=r.getInExtent([Math.min(n.x,t.x,i.x),Math.min(n.y,t.y,i.y),Math.max(n.x,t.x,i.x),Math.max(n.y,t.y,i.y)]),e=0,c=s.length;e<c;++e)for(h in s[e])f=s[e][h],"object"==typeof f&&(!u||f.reflex)&&(f.x!==n.x||f.y!==n.y)&&(f.x!==t.x||f.y!==t.y)&&(f.x!==i.x||f.y!==i.y)&&-1===o.indexOf(f)&&ko([n.x,n.y,t.x,t.y,i.x,i.y],0,6,2,f.x,f.y)&&o.push(f);return o},t.prototype.getIntersections_=function(n,t,i){for(var r,u=n.p0,f=n.p1,o=t.getInExtent([Math.min(u.x,f.x),Math.min(u.y,f.y),Math.max(u.x,f.x),Math.max(u.y,f.y)]),s=[],e=0,h=o.length;e<h;++e)r=o[e],n!==r&&(i||r.p0!==f||r.p1!==u)&&this.calculateIntersection_(u,f,r.p0,r.p1,i)&&s.push(r);return s},t.prototype.calculateIntersection_=function(n,t,i,r,u){var o=(r.y-i.y)*(t.x-n.x)-(r.x-i.x)*(t.y-n.y),f,e;if(0!==o&&(f=((r.x-i.x)*(n.y-i.y)-(r.y-i.y)*(n.x-i.x))/o,e=((t.x-n.x)*(n.y-i.y)-(t.y-n.y)*(n.x-i.x))/o,!u&&f>al&&f<1-al&&e>al&&e<1-al||u&&f>=0&&f<=1&&e>=0&&e<=1))return[n.x+f*(t.x-n.x),n.y+f*(t.y-n.y)]},t.prototype.diagonalIsInside_=function(n,t,i,r,u){if(void 0===t.reflex||void 0===r.reflex)return!1;var f=(i.x-r.x)*(t.y-r.y)>(i.y-r.y)*(t.x-r.x),e=(u.x-r.x)*(t.y-r.y)<(u.y-r.y)*(t.x-r.x),o=(n.x-t.x)*(r.y-t.y)>(n.y-t.y)*(r.x-t.x),s=(i.x-t.x)*(r.y-t.y)<(i.y-t.y)*(r.x-t.x),h=r.reflex?e||f:e&&f,c=t.reflex?s||o:s&&o;return h&&c},t.prototype.drawMultiPolygon=function(n,t){for(var r,l,a=n.getEndss(),f=n.getStride(),s=this.indices.length,v=this.lineStringReplay.getCurrentIndex(),y=n.getFlatCoordinates(),p=0,i,e,o,h,u=0,c=a.length;u<c;++u){if(i=a[u],i.length>0&&(e=yo(y,p,i[0],f,-this.origin[0],-this.origin[1]),e.length)){for(o=[],h=void 0,r=1,l=i.length;r<l;++r)i[r]!==i[r-1]&&(h=yo(y,i[r-1],i[r],f,-this.origin[0],-this.origin[1]),o.push(h));this.lineStringReplay.drawPolygonCoordinates(e,o,f);this.drawCoordinates_(e,o,f)}p=i[i.length-1]}this.indices.length>s&&(this.startIndices.push(s),this.startIndicesFeature.push(t),this.state_.changed&&(this.styleIndices_.push(s),this.state_.changed=!1));this.lineStringReplay.getCurrentIndex()>v&&this.lineStringReplay.setPolygonStyle(t,v)},t.prototype.drawPolygon=function(n,t){var i=n.getEnds(),u=n.getStride(),o,f,r,s,h,e;if(i.length>0&&(o=n.getFlatCoordinates().map(Number),f=yo(o,0,i[0],u,-this.origin[0],-this.origin[1]),f.length)){for(e=[],r=1,s=i.length;r<s;++r)i[r]!==i[r-1]&&(h=yo(o,i[r-1],i[r],u,-this.origin[0],-this.origin[1]),e.push(h));this.startIndices.push(this.indices.length);this.startIndicesFeature.push(t);this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1);this.lineStringReplay.setPolygonStyle(t);this.lineStringReplay.drawPolygonCoordinates(f,e,u);this.drawCoordinates_(f,e,u)}},t.prototype.finish=function(n){this.verticesBuffer=new vf(this.vertices);this.indicesBuffer=new vf(this.indices);this.startIndices.push(this.indices.length);this.lineStringReplay.finish(n);0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]);this.vertices=null;this.indices=null},t.prototype.getDeleteResourcesFunction=function(n){var t=this.verticesBuffer,i=this.indicesBuffer,r=this.lineStringReplay.getDeleteResourcesFunction(n);return function(){n.deleteBuffer(t);n.deleteBuffer(i);r()}},t.prototype.setUpProgram=function(n,t){var i,r=t.getProgram(nti,tti);return this.defaultLocations_?i=this.defaultLocations_:(i=new iti(n,r),this.defaultLocations_=i),t.useProgram(r),n.enableVertexAttribArray(i.a_position),n.vertexAttribPointer(i.a_position,2,5126,!1,8,0),i},t.prototype.shutDownProgram=function(n,t){n.disableVertexAttribArray(t.a_position)},t.prototype.drawReplay=function(n,t,i,r){var u,f,e,o,s=n.getParameter(n.DEPTH_FUNC),h=n.getParameter(n.DEPTH_WRITEMASK);if(r||(n.enable(n.DEPTH_TEST),n.depthMask(!0),n.depthFunc(n.NOTEQUAL)),wu(i))for(e=this.startIndices[this.startIndices.length-1],u=this.styleIndices_.length-1;u>=0;--u)f=this.styleIndices_[u],o=this.styles_[u],this.setFillStyle_(n,o),this.drawElements(n,t,f,e),e=f;else this.drawReplaySkipping_(n,t,i);r||(n.disable(n.DEPTH_TEST),n.clear(n.DEPTH_BUFFER_BIT),n.depthMask(h),n.depthFunc(s))},t.prototype.drawHitDetectionReplayOneByOne=function(n,t,i,r,u){var e,s,h,l,a,o,f,c;for(f=this.startIndices.length-2,h=this.startIndices[f+1],e=this.styleIndices_.length-1;e>=0;--e)for(l=this.styles_[e],this.setFillStyle_(n,l),a=this.styleIndices_[e];f>=0&&this.startIndices[f]>=a;){if((s=this.startIndices[f],void 0===i[y(o=this.startIndicesFeature[f])]&&o.getGeometry()&&(void 0===u||dt(u,o.getGeometry().getExtent())))&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),this.drawElements(n,t,s,h),c=r(o),c))return c;f--;h=s}},t.prototype.drawReplaySkipping_=function(n,t,i){var e,r,u,h,o,f,s;for(f=this.startIndices.length-2,u=r=this.startIndices[f+1],e=this.styleIndices_.length-1;e>=0;--e){for(h=this.styles_[e],this.setFillStyle_(n,h),o=this.styleIndices_[e];f>=0&&this.startIndices[f]>=o;)s=this.startIndices[f],i[y(this.startIndicesFeature[f])]&&(r!==u&&(this.drawElements(n,t,r,u),n.clear(n.DEPTH_BUFFER_BIT)),u=s),f--,r=s;r!==u&&(this.drawElements(n,t,r,u),n.clear(n.DEPTH_BUFFER_BIT));r=u=o}},t.prototype.setFillStyle_=function(n,t){n.uniform4fv(this.defaultLocations_.u_color,t)},t.prototype.setFillStrokeStyle=function(n,t){var i=n?n.getColor():[0,0,0,0],r;(i=i instanceof CanvasGradient||i instanceof CanvasPattern?bv:yh(i).map(function(n,t){return 3!=t?n/255:n})||bv,this.state_.fillColor&&uf(i,this.state_.fillColor)||(this.state_.fillColor=i,this.state_.changed=!0,this.styles_.push(i)),t)?this.lineStringReplay.setFillStrokeStyle(null,t):(r=new hf({color:[0,0,0,0],width:0}),this.lineStringReplay.setFillStrokeStyle(null,r))},t}(ub),dv=function(n,t){this.space_=t;this.emptyBlocks_=[{x:0,y:0,width:n,height:n}];this.entries_={};this.context_=kt(n,n);this.canvas_=this.context_.canvas};dv.prototype.get=function(n){return this.entries_[n]||null};dv.prototype.add=function(n,t,i,r,u){for(var f,o,e=0,s=this.emptyBlocks_.length;e<s;++e)if(f=this.emptyBlocks_[e],f.width>=t+this.space_&&f.height>=i+this.space_)return o={offsetX:f.x+this.space_,offsetY:f.y+this.space_,image:this.canvas_},this.entries_[n]=o,r.call(u,this.context_,f.x+this.space_,f.y+this.space_),this.split_(e,f,t+this.space_,i+this.space_),o;return null};dv.prototype.split_=function(n,t,i,r){var u,f;t.width-i>t.height-r?(u={x:t.x+i,y:t.y,width:t.width-i,height:t.height},f={x:t.x,y:t.y+r,width:i,height:t.height-r},this.updateBlocks_(n,u,f)):(u={x:t.x+i,y:t.y,width:t.width-i,height:r},f={x:t.x,y:t.y+r,width:t.width,height:t.height-r},this.updateBlocks_(n,u,f))};dv.prototype.updateBlocks_=function(n,t,i){var r=[n,1];t.width>0&&t.height>0&&r.push(t);i.width>0&&i.height>0&&r.push(i);this.emptyBlocks_.splice.apply(this.emptyBlocks_,r)};sb=dv;rc=function(n){var t=n||{};this.currentSize_=void 0!==t.initialSize?t.initialSize:256;this.maxSize_=void 0!==t.maxSize?t.maxSize:void 0!==wn?wn:2048;this.space_=void 0!==t.space?t.space:1;this.atlases_=[new sb(this.currentSize_,this.space_)];this.currentHitSize_=this.currentSize_;this.hitAtlases_=[new sb(this.currentHitSize_,this.space_)]};rc.prototype.getInfo=function(n){var t=this.getInfo_(this.atlases_,n),i;return t?(i=this.getInfo_(this.hitAtlases_,n),this.mergeInfos_(t,i)):null};rc.prototype.getInfo_=function(n,t){for(var r,i=0,u=n.length;i<u;++i)if(r=n[i].get(t),r)return r;return null};rc.prototype.mergeInfos_=function(n,t){return{offsetX:n.offsetX,offsetY:n.offsetY,image:n.image,hitImage:t.image}};rc.prototype.add=function(n,t,i,r,u,f){var e,o,s;return t+this.space_>this.maxSize_||i+this.space_>this.maxSize_?null:(e=this.add_(!1,n,t,i,r,f),!e)?null:(o=void 0!==u?u:wf,s=this.add_(!0,n,t,i,o,f),this.mergeInfos_(e,s))};rc.prototype.add_=function(n,t,i,r,u,f){for(var h,c,l=n?this.hitAtlases_:this.atlases_,e,o=0,s=l.length;o<s;++o){if(c=(h=l[o]).add(t,i,r,u,f))return c;c||o!==s-1||(e=void 0,n?(e=Math.min(2*this.currentHitSize_,this.maxSize_),this.currentHitSize_=e):(e=Math.min(2*this.currentSize_,this.maxSize_),this.currentSize_=e),h=new sb(e,this.space_),l.push(h),++s)}return null};var aht=rc,uti=function(n){function t(t,i){n.call(this,t,i);this.images_=[];this.textures_=[];this.measureCanvas_=kt(0,0).canvas;this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0};this.text_="";this.textAlign_=void 0;this.textBaseline_=void 0;this.offsetX_=void 0;this.offsetY_=void 0;this.atlases_={};this.currAtlas_=void 0;this.scale=1;this.opacity=1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawText=function(n,t){var u;if(this.text_){var r=null,c=2,v=2;switch(n.getType()){case f.POINT:case f.MULTI_POINT:c=(r=n.getFlatCoordinates()).length;v=n.getStride();break;case f.CIRCLE:r=n.getCenter();break;case f.LINE_STRING:r=n.getFlatMidpoint();break;case f.MULTI_LINE_STRING:c=(r=n.getFlatMidpoints()).length;break;case f.POLYGON:r=n.getFlatInteriorPoint();break;case f.MULTI_POLYGON:c=(r=n.getFlatInteriorPoints()).length}this.startIndices.push(this.indices.length);this.startIndicesFeature.push(t);for(var i,w,l,b,o,s,h=this.currAtlas_,a=this.text_.split("\n"),k=this.getTextSize_(a),g=Math.round(k[0]*this.textAlign_-this.offsetX_),nt=Math.round(k[1]*this.textBaseline_-this.offsetY_),d=this.state_.lineWidth/2*this.state_.scale,e=0,p=a.length;e<p;++e)for(l=0,b=h.height*e,i=0,w=(o=a[e].split("")).length;i<w;++i)(s=h.atlas.getInfo(o[i]))&&(u=s.image,(this.anchorX=g-l,this.anchorY=nt-b,this.originX=0===i?s.offsetX-d:s.offsetX,this.originY=s.offsetY,this.height=h.height,this.width=0===i||i===o.length-1?h.width[o[i]]+d:h.width[o[i]],this.imageHeight=u.height,this.imageWidth=u.width,0===this.images_.length)?this.images_.push(u):y(this.images_[this.images_.length-1])!=y(u)&&(this.groupIndices.push(this.indices.length),this.images_.push(u)),this.drawText_(r,0,c,v)),l+=this.width}},t.prototype.getTextSize_=function(n){var i=this,t=this.currAtlas_,r=n.length*t.height;return[n.map(function(n){for(var r,f=0,u=0,e=n.length;u<e;++u)r=n[u],t.width[r]||i.addCharToAtlas_(r),f+=t.width[r]?t.width[r]:0;return f}).reduce(function(n,t){return Math.max(n,t)}),r]},t.prototype.drawText_=function(n,t,i,r){for(var u=t,f=i;u<f;u+=r)this.drawCoordinates(n,t,i,r)},t.prototype.addCharToAtlas_=function(n){var r;if(1===n.length){var i=this.currAtlas_,t=this.state_,u=this.measureCanvas_.getContext("2d");u.font=t.font;r=Math.ceil(u.measureText(n).width*t.scale);i.atlas.add(n,r,i.height,function(i,r,u){i.font=t.font;i.fillStyle=t.fillColor;i.strokeStyle=t.strokeColor;i.lineWidth=t.lineWidth;i.lineCap=t.lineCap;i.lineJoin=t.lineJoin;i.miterLimit=t.miterLimit;i.textAlign="left";i.textBaseline="top";il&&t.lineDash&&(i.setLineDash(t.lineDash),i.lineDashOffset=t.lineDashOffset);1!==t.scale&&i.setTransform(t.scale,0,0,t.scale,0,0);t.strokeColor&&i.strokeText(n,r,u);t.fillColor&&i.fillText(n,r,u)})&&(i.width[n]=r)}},t.prototype.finish=function(t){var i=t.getGL();this.groupIndices.push(this.indices.length);this.hitDetectionGroupIndices=this.groupIndices;this.verticesBuffer=new vf(this.vertices);this.indicesBuffer=new vf(this.indices);this.createTextures(this.textures_,this.images_,{},i);this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0};this.text_="";this.textAlign_=void 0;this.textBaseline_=void 0;this.offsetX_=void 0;this.offsetY_=void 0;this.images_=null;this.atlases_={};this.currAtlas_=void 0;n.prototype.finish.call(this,t)},t.prototype.setTextStyle=function(n){var t=this.state_,r=n.getFill(),i=n.getStroke(),o,s,u,f,e;n&&n.getText()&&(r||i)?(r?(o=r.getColor(),t.fillColor=du(o||bv)):t.fillColor=null,i?(s=i.getColor(),t.strokeColor=du(s||kv),t.lineWidth=i.getWidth()||1,t.lineCap=i.getLineCap()||"round",t.lineDashOffset=i.getLineDashOffset()||0,t.lineJoin=i.getLineJoin()||"round",t.miterLimit=i.getMiterLimit()||10,u=i.getLineDash(),t.lineDash=u?u.slice():bn):(t.strokeColor=null,t.lineWidth=0),t.font=n.getFont()||"10px sans-serif",t.scale=n.getScale()||1,this.text_=n.getText(),f=tc[n.getTextAlign()],e=tc[n.getTextBaseline()],this.textAlign_=void 0===f?.5:f,this.textBaseline_=void 0===e?.5:e,this.offsetX_=n.getOffsetX()||0,this.offsetY_=n.getOffsetY()||0,this.rotateWithView=!!n.getRotateWithView(),this.rotation=n.getRotation()||0,this.currAtlas_=this.getAtlas_(t)):this.text_=""},t.prototype.getAtlas_=function(n){var i=[],t,r,u,f;for(t in n)(n[t]||0===n[t])&&(Array.isArray(n[t])?i=i.concat(n[t]):i.push(n[t]));return r=this.calculateHash_(i),this.atlases_[r]||(u=this.measureCanvas_.getContext("2d"),u.font=n.font,f=Math.ceil((1.5*u.measureText("M").width+n.lineWidth/2)*n.scale),this.atlases_[r]={atlas:new aht({space:n.lineWidth+1}),width:{},height:f}),this.atlases_[r]},t.prototype.calculateHash_=function(n){for(var i="",t=0,r=n.length;t<r;++t)i+=n[t];return i},t.prototype.getTextures=function(){return this.textures_},t.prototype.getHitDetectionTextures=function(){return this.textures_},t}(uht),vht=[1,1],fti={Circle:cnt,Image:pnt,LineString:lht,Polygon:rti,Text:uti},os=function(n){function t(t,i,r){n.call(this);this.maxExtent_=i;this.tolerance_=t;this.renderBuffer_=r;this.replaysByZIndex_={}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.addDeclutter=function(){return[]},t.prototype.getDeleteResourcesFunction=function(n){var r,t=[],i,u;for(r in this.replaysByZIndex_){i=this.replaysByZIndex_[r];for(u in i)t.push(i[u].getDeleteResourcesFunction(n))}return function(){for(var i,r=arguments,u=t.length,n=0;n<u;n++)i=t[n].apply(this,r);return i}},t.prototype.finish=function(n){var i,t,r;for(i in this.replaysByZIndex_){t=this.replaysByZIndex_[i];for(r in t)t[r].finish(n)}},t.prototype.getReplay=function(n,t){var u=void 0!==n?n.toString():"0",i=this.replaysByZIndex_[u],r;return void 0===i&&(i={},this.replaysByZIndex_[u]=i),r=i[t],void 0===r&&(r=new fti[t](this.tolerance_,this.maxExtent_),i[t]=r),r},t.prototype.isEmpty=function(){return wu(this.replaysByZIndex_)},t.prototype.replay=function(n,t,i,r,u,f,e,o){var s,a,h,v,y,c,l=Object.keys(this.replaysByZIndex_).map(Number);for(l.sort(lo),s=0,a=l.length;s<a;++s)for(y=this.replaysByZIndex_[l[s].toString()],h=0,v=fs.length;h<v;++h)c=y[fs[h]],void 0!==c&&c.replay(n,t,i,r,u,f,e,o,void 0,!1)},t.prototype.replayHitDetection_=function(n,t,i,r,u,f,e,o,s,h,c){var l,y,a,p,w,b,v=Object.keys(this.replaysByZIndex_).map(Number);for(v.sort(function(n,t){return t-n}),l=0,y=v.length;l<y;++l)for(p=this.replaysByZIndex_[v[l].toString()],a=fs.length-1;a>=0;--a)if(void 0!==(w=p[fs[a]])&&(b=w.replay(n,t,i,r,u,f,e,o,s,h,c)))return b},t.prototype.forEachFeatureAtCoordinate=function(n,t,i,r,u,f,e,o,s,h){var l,c=t.getGL();return c.bindFramebuffer(c.FRAMEBUFFER,t.getHitDetectionFramebuffer()),void 0!==this.renderBuffer_&&(l=ff(uh(n),r*this.renderBuffer_)),this.replayHitDetection_(t,n,r,u,vht,e,o,s,function(n){var i=new Uint8Array(4),t;if((c.readPixels(0,0,1,1,c.RGBA,c.UNSIGNED_BYTE,i),i[3]>0)&&(t=h(n),t))return t},!0,l)},t.prototype.hasFeatureAtCoordinate=function(n,t,i,r,u,f,e,o,s){var h=t.getGL();return h.bindFramebuffer(h.FRAMEBUFFER,t.getHitDetectionFramebuffer()),void 0!==this.replayHitDetection_(t,n,r,u,vht,e,o,s,function(){var n=new Uint8Array(4);return h.readPixels(0,0,1,1,h.RGBA,h.UNSIGNED_BYTE,n),n[3]>0},!1)},t}(vn),yht=function(n){function t(t,i,r,u,f,e,o){n.call(this);this.context_=t;this.center_=i;this.extent_=e;this.pixelRatio_=o;this.size_=f;this.rotation_=u;this.resolution_=r;this.imageStyle_=null;this.fillStyle_=null;this.strokeStyle_=null;this.textStyle_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.drawText_=function(n,t){var r=this.context_,i=n.getReplay(0,ft.TEXT);i.setTextStyle(this.textStyle_);i.drawText(t,null);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)()},t.prototype.setStyle=function(n){this.setFillStrokeStyle(n.getFill(),n.getStroke());this.setImageStyle(n.getImage());this.setTextStyle(n.getText())},t.prototype.drawGeometry=function(n){switch(n.getType()){case f.POINT:this.drawPoint(n,null);break;case f.LINE_STRING:this.drawLineString(n,null);break;case f.POLYGON:this.drawPolygon(n,null);break;case f.MULTI_POINT:this.drawMultiPoint(n,null);break;case f.MULTI_LINE_STRING:this.drawMultiLineString(n,null);break;case f.MULTI_POLYGON:this.drawMultiPolygon(n,null);break;case f.GEOMETRY_COLLECTION:this.drawGeometryCollection(n,null);break;case f.CIRCLE:this.drawCircle(n,null)}},t.prototype.drawFeature=function(n,t){var i=t.getGeometryFunction()(n);i&&dt(this.extent_,i.getExtent())&&(this.setStyle(t),this.drawGeometry(i))},t.prototype.drawGeometryCollection=function(n){for(var r=n.getGeometriesArray(),t=0,i=r.length;t<i;++t)this.drawGeometry(r[t])},t.prototype.drawPoint=function(n,t){var r=this.context_,u=new os(1,this.extent_),i=u.getReplay(0,ft.IMAGE);i.setImageStyle(this.imageStyle_);i.drawPoint(n,t);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)();this.textStyle_&&this.drawText_(u,n)},t.prototype.drawMultiPoint=function(n,t){var r=this.context_,u=new os(1,this.extent_),i=u.getReplay(0,ft.IMAGE);i.setImageStyle(this.imageStyle_);i.drawMultiPoint(n,t);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)();this.textStyle_&&this.drawText_(u,n)},t.prototype.drawLineString=function(n,t){var r=this.context_,u=new os(1,this.extent_),i=u.getReplay(0,ft.LINE_STRING);i.setFillStrokeStyle(null,this.strokeStyle_);i.drawLineString(n,t);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)();this.textStyle_&&this.drawText_(u,n)},t.prototype.drawMultiLineString=function(n,t){var r=this.context_,u=new os(1,this.extent_),i=u.getReplay(0,ft.LINE_STRING);i.setFillStrokeStyle(null,this.strokeStyle_);i.drawMultiLineString(n,t);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)();this.textStyle_&&this.drawText_(u,n)},t.prototype.drawPolygon=function(n,t){var r=this.context_,u=new os(1,this.extent_),i=u.getReplay(0,ft.POLYGON);i.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);i.drawPolygon(n,t);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)();this.textStyle_&&this.drawText_(u,n)},t.prototype.drawMultiPolygon=function(n,t){var r=this.context_,u=new os(1,this.extent_),i=u.getReplay(0,ft.POLYGON);i.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);i.drawMultiPolygon(n,t);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)();this.textStyle_&&this.drawText_(u,n)},t.prototype.drawCircle=function(n,t){var r=this.context_,u=new os(1,this.extent_),i=u.getReplay(0,ft.CIRCLE);i.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);i.drawCircle(n,t);i.finish(r);i.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1);i.getDeleteResourcesFunction(r)();this.textStyle_&&this.drawText_(u,n)},t.prototype.setImageStyle=function(n){this.imageStyle_=n},t.prototype.setFillStrokeStyle=function(n,t){this.fillStyle_=n;this.strokeStyle_=t},t.prototype.setTextStyle=function(n){this.textStyle_=n},t}(fv),eti=new cl("precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_texture, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  gl_FragColor.a = texColor.a * u_opacity;\n}\n"),oti=new ll("varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n  v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n"),sti=function(n,t){this.u_texCoordMatrix=n.getUniformLocation(t,"u_texCoordMatrix");this.u_projectionMatrix=n.getUniformLocation(t,"u_projectionMatrix");this.u_opacity=n.getUniformLocation(t,"u_opacity");this.u_texture=n.getUniformLocation(t,"u_texture");this.a_position=n.getAttribLocation(t,"a_position");this.a_texCoord=n.getAttribLocation(t,"a_texCoord")},gn=function(n){function t(t,i){n.call(this,i);this.mapRenderer=t;this.arrayBuffer_=new vf([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.texture=null;this.framebuffer=null;this.framebufferDimension=void 0;this.texCoordMatrix=[1,0,0,1,0,0];this.projectionMatrix=[1,0,0,1,0,0];this.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];this.defaultLocations_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.bindFramebuffer=function(n,t){var i=this.mapRenderer.getGL(),f,r,u;void 0===this.framebufferDimension||this.framebufferDimension!=t?(f=function(n,t,i){n.isContextLost()||(n.deleteFramebuffer(t),n.deleteTexture(i))}.bind(null,i,this.framebuffer,this.texture),n.postRenderFunctions.push(f),r=iht(i,t,t),u=i.createFramebuffer(),i.bindFramebuffer(36160,u),i.framebufferTexture2D(36160,36064,vr,r,0),this.texture=r,this.framebuffer=u,this.framebufferDimension=t):i.bindFramebuffer(36160,this.framebuffer)},t.prototype.composeFrame=function(n,t,i){this.dispatchComposeEvent_(gr.PRECOMPOSE,i,n);i.bindBuffer(34962,this.arrayBuffer_);var r,u=i.getGL(),f=i.getProgram(eti,oti);this.defaultLocations_?r=this.defaultLocations_:(r=new sti(u,f),this.defaultLocations_=r);i.useProgram(f)&&(u.enableVertexAttribArray(r.a_position),u.vertexAttribPointer(r.a_position,2,5126,!1,16,0),u.enableVertexAttribArray(r.a_texCoord),u.vertexAttribPointer(r.a_texCoord,2,5126,!1,16,8),u.uniform1i(r.u_texture,0));u.uniformMatrix4fv(r.u_texCoordMatrix,!1,wv(this.tmpMat4_,this.getTexCoordMatrix()));u.uniformMatrix4fv(r.u_projectionMatrix,!1,wv(this.tmpMat4_,this.getProjectionMatrix()));u.uniform1f(r.u_opacity,t.opacity);u.bindTexture(vr,this.getTexture());u.drawArrays(5,0,4);this.dispatchComposeEvent_(gr.POSTCOMPOSE,i,n)},t.prototype.dispatchComposeEvent_=function(n,t,i){var u=this.getLayer();if(u.hasListener(n)){var r=i.viewState,f=r.resolution,e=i.pixelRatio,o=i.extent,s=r.center,h=r.rotation,c=i.size,l=new yht(t,s,f,h,c,o,e),a=new pw(n,l,i,null,t);u.dispatchEvent(a)}},t.prototype.getTexCoordMatrix=function(){return this.texCoordMatrix},t.prototype.getTexture=function(){return this.texture},t.prototype.getProjectionMatrix=function(){return this.projectionMatrix},t.prototype.handleWebGLContextLost=function(){this.texture=null;this.framebuffer=null;this.framebufferDimension=void 0},t.prototype.prepareFrame=function(){return p()},t.prototype.forEachLayerAtPixel=function(){return p()},t}(ust),hb=function(n){function t(t,i){n.call(this,t,i);this.image_=null;this.hitCanvasContext_=null;this.hitTransformationMatrix_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createTexture_=function(n){var t=n.getImage();return rht(this.mapRenderer.getGL(),t,33071,33071)},t.prototype.prepareFrame=function(n,t){var y=this.mapRenderer.getGL(),s=n.pixelRatio,u=n.viewState,p=u.center,h=u.resolution,w=u.rotation,i=this.image_,c=this.texture,b=this.getLayer().getSource(),l=n.viewHints,f=n.extent,a,r,v,o,e;return(void 0!==t.extent&&(f=of(f,t.extent)),l[lu]||l[oi]||eh(f))||(a=u.projection,r=b.getImage(f,h,s,a),r&&this.loadImage(r)&&(i=r,c=this.createTexture_(r),this.texture)&&(v=function(n,t){n.isContextLost()||n.deleteTexture(t)}.bind(null,y,this.texture),n.postRenderFunctions.push(v))),i&&(o=this.mapRenderer.getContext().getCanvas(),this.updateProjectionMatrix_(o.width,o.height,s,p,h,w,i.getExtent()),this.hitTransformationMatrix_=null,e=this.texCoordMatrix,hh(e),sf(e,1,-1),ne(e,0,-1),this.image_=i,this.texture=c),!!i},t.prototype.updateProjectionMatrix_=function(n,t,i,r,u,f,e){var s=n*u,h=t*u,o=this.projectionMatrix;hh(o);sf(o,2*i/s,2*i/h);vp(o,-f);ne(o,e[0]-r[0],e[1]-r[1]);sf(o,(e[2]-e[0])/2,(e[3]-e[1])/2);ne(o,1,1)},t.prototype.forEachLayerAtPixel=function(n,t,i,r){var f,u,e;if(this.image_&&this.image_.getImage()&&(f=[this.image_.getImage().width,this.image_.getImage().height],this.hitTransformationMatrix_||(this.hitTransformationMatrix_=this.getHitTransformationMatrix_(t.size,f)),u=wr(this.hitTransformationMatrix_,n.slice()),!(u[0]<0||u[0]>f[0]||u[1]<0||u[1]>f[1])))return this.hitCanvasContext_||(this.hitCanvasContext_=kt(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.image_.getImage(),u[0],u[1],1,1,0,0,1,1),e=this.hitCanvasContext_.getImageData(0,0,1,1).data,e[3]>0?i.call(r,this.getLayer(),e):void 0},t.prototype.getHitTransformationMatrix_=function(n,t){var r=[1,0,0,1,0,0],u,i;return ne(r,-1,-1),sf(r,2/n[0],2/n[1]),ne(r,0,n[1]),sf(r,1,-1),u=nft(this.projectionMatrix.slice()),i=[1,0,0,1,0,0],ne(i,0,t[1]),sf(i,1,-1),sf(i,t[0]/2,t[1]/2),ne(i,1,1),ya(i,u),ya(i,r),i},t}(gn);hb.handles=function(n){return n.getType()===kr.IMAGE};hb.create=function(n,t){return new hb(n,t)};var pht=hb,wht=function(n){function t(t){n.call(this,t);var i=t.getViewport();this.canvas_=document.createElement("canvas");this.canvas_.style.width="100%";this.canvas_.style.height="100%";this.canvas_.style.display="block";this.canvas_.className=ie;i.insertBefore(this.canvas_,i.childNodes[0]||null);this.clipTileCanvasWidth_=0;this.clipTileCanvasHeight_=0;this.clipTileContext_=kt();this.renderedVisible_=!0;this.gl_=dst(this.canvas_,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0});this.context_=new ynt(this.canvas_,this.gl_);o(this.canvas_,eb.LOST,this.handleWebGLContextLost,this);o(this.canvas_,eb.RESTORED,this.handleWebGLContextRestored,this);this.textureCache_=new on;this.focus_=null;this.tileTextureQueue_=new aet(function(n){var t=n[1],i=n[2],r=t[0]-this.focus_[0],u=t[1]-this.focus_[1];return 65536*Math.log(i)+Math.sqrt(r*r+u*u)/i}.bind(this),function(n){return n[0].getKey()});this.loadNextTileTexture_=function(){if(!this.tileTextureQueue_.isEmpty()){this.tileTextureQueue_.reprioritize();var n=this.tileTextureQueue_.dequeue(),t=n[0],i=n[3],r=n[4];this.bindTileTexture(t,i,r,rb,rb)}return!1}.bind(this);this.textureCacheFrameMarkerCount_=0;this.initializeGL_()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.bindTileTexture=function(n,t,i,r,u){var f=this.getGL(),s=n.getKey(),e,h,c,o,l;this.textureCache_.containsKey(s)?(e=this.textureCache_.get(s),f.bindTexture(vr,e.texture),e.magFilter!=r&&(f.texParameteri(vr,10240,r),e.magFilter=r),e.minFilter!=u&&(f.texParameteri(vr,10241,u),e.minFilter=u)):(h=f.createTexture(),c=n,(f.bindTexture(vr,h),i>0)?(o=this.clipTileContext_.canvas,l=this.clipTileContext_,this.clipTileCanvasWidth_!==t[0]||this.clipTileCanvasHeight_!==t[1]?(o.width=t[0],o.height=t[1],this.clipTileCanvasWidth_=t[0],this.clipTileCanvasHeight_=t[1]):l.clearRect(0,0,t[0],t[1]),l.drawImage(c.getImage(),i,i,t[0],t[1],0,0,t[0],t[1]),f.texImage2D(vr,0,6408,6408,5121,o)):f.texImage2D(vr,0,6408,6408,5121,c.getImage()),f.texParameteri(vr,10240,r),f.texParameteri(vr,10241,u),f.texParameteri(vr,wst,33071),f.texParameteri(vr,bst,33071),this.textureCache_.set(s,{texture:h,magFilter:r,minFilter:u}))},t.prototype.dispatchRenderEvent=function(n,t){var r=this.getMap();if(r.hasListener(n)){var u=this.context_,f=t.extent,e=t.size,i=t.viewState,o=t.pixelRatio,s=i.resolution,h=i.center,c=i.rotation,l=new yht(u,h,s,c,e,f,o),a=new pw(n,l,t,null,u);r.dispatchEvent(a)}},t.prototype.disposeInternal=function(){var t=this.getGL();t.isContextLost()||this.textureCache_.forEach(function(n){n&&t.deleteTexture(n.texture)});this.context_.dispose();n.prototype.disposeInternal.call(this)},t.prototype.expireCache_=function(n,t){for(var i,r=this.getGL();this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>1024;){if(i=this.textureCache_.peekLast())r.deleteTexture(i.texture);else{if(+this.textureCache_.peekLastKey()==t.index)break;--this.textureCacheFrameMarkerCount_}this.textureCache_.pop()}},t.prototype.getContext=function(){return this.context_},t.prototype.getGL=function(){return this.gl_},t.prototype.getTileTextureQueue=function(){return this.tileTextureQueue_},t.prototype.handleWebGLContextLost=function(n){var t,i;n.preventDefault();this.textureCache_.clear();this.textureCacheFrameMarkerCount_=0;t=this.getLayerRenderers();for(i in t)t[i].handleWebGLContextLost()},t.prototype.handleWebGLContextRestored=function(){this.initializeGL_();this.getMap().render()},t.prototype.initializeGL_=function(){var n=this.gl_;n.activeTexture(33984);n.blendFuncSeparate(770,771,1,771);n.disable(2884);n.disable(2929);n.disable(3089);n.disable(2960)},t.prototype.isTileTextureLoaded=function(n){return this.textureCache_.containsKey(n.getKey())},t.prototype.renderFrame=function(n){var c=this.getContext(),i=this.getGL(),u,f,t,e,l,r,o,s,h;if(i.isContextLost())return!1;if(!n)return this.renderedVisible_&&(this.canvas_.style.display="none",this.renderedVisible_=!1),!1;for(this.focus_=n.focus,this.textureCache_.set((-n.index).toString(),null),++this.textureCacheFrameMarkerCount_,this.dispatchRenderEvent(gr.PRECOMPOSE,n),u=[],f=n.layerStatesArray,gk(f,tst),l=n.viewState.resolution,t=0,e=f.length;t<e;++t)r=f[t],is(r,l)&&r.sourceState==pi.READY&&this.getLayerRenderer(r.layer).prepareFrame(n,r,c)&&u.push(r);for(o=n.size[0]*n.pixelRatio,s=n.size[1]*n.pixelRatio,this.canvas_.width==o&&this.canvas_.height==s||(this.canvas_.width=o,this.canvas_.height=s),i.bindFramebuffer(36160,null),i.clearColor(0,0,0,0),i.clear(16384),i.enable(3042),i.viewport(0,0,this.canvas_.width,this.canvas_.height),t=0,e=u.length;t<e;++t)h=u[t],this.getLayerRenderer(h.layer).composeFrame(n,h,c);this.renderedVisible_||(this.canvas_.style.display="",this.renderedVisible_=!0);this.calculateMatrices2D(n);this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>1024&&n.postRenderFunctions.push(this.expireCache_.bind(this));this.tileTextureQueue_.isEmpty()||(n.postRenderFunctions.push(this.loadNextTileTexture_),n.animate=!0);this.dispatchRenderEvent(gr.POSTCOMPOSE,n);this.scheduleRemoveUnusedLayerRenderers(n);this.scheduleExpireIconCache(n)},t.prototype.forEachFeatureAtCoordinate=function(n,t,i,r,u,f,e){var l,o,a,s,h,c;if(this.getGL().isContextLost())return!1;for(a=t.viewState,s=t.layerStatesArray,o=s.length-1;o>=0;--o)if(h=s[o],c=h.layer,is(h,a.resolution)&&f.call(e,c)&&(l=this.getLayerRenderer(c).forEachFeatureAtCoordinate(n,t,i,r)))return l},t.prototype.hasFeatureAtCoordinate=function(n,t,i,r,u){var h=!1,f,c,e,o,s;if(this.getGL().isContextLost())return!1;for(c=t.viewState,e=t.layerStatesArray,f=e.length-1;f>=0;--f)if(o=e[f],s=o.layer,is(o,c.resolution)&&r.call(u,s)&&(h=this.getLayerRenderer(s).hasFeatureAtCoordinate(n,t)))return!0;return h},t.prototype.forEachLayerAtPixel=function(n,t,i,r,u,f){var c,e,l,o,s,h;if(this.getGL().isContextLost())return!1;for(l=t.viewState,o=t.layerStatesArray,e=o.length-1;e>=0;--e)if(s=o[e],h=s.layer,is(s,l.resolution)&&f.call(u,h)&&(c=this.getLayerRenderer(h).forEachLayerAtPixel(n,t,r,u)))return c},t}(ist),vl=function(n){function t(t,i,r){n.call(this);var u=r||{};this.tileCoord=t;this.state=i;this.interimTile=null;this.key="";this.transition_=void 0===u.transition?250:u.transition;this.transitionStarts_={}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.changed=function(){this.dispatchEvent(a.CHANGE)},t.prototype.getKey=function(){return this.key+"/"+this.tileCoord},t.prototype.getInterimTile=function(){if(!this.interimTile)return this;var n=this.interimTile;do{if(n.getState()==c.LOADED)return n;n=n.interimTile}while(n);return this},t.prototype.refreshInterimChain=function(){if(this.interimTile){var n=this.interimTile,t=this;do{if(n.getState()==c.LOADED){n.interimTile=null;break}n.getState()==c.LOADING?t=n:n.getState()==c.IDLE?t.interimTile=n.interimTile:t=n;n=t.interimTile}while(n)}},t.prototype.getTileCoord=function(){return this.tileCoord},t.prototype.getState=function(){return this.state},t.prototype.setState=function(n){this.state=n;this.changed()},t.prototype.load=function(){},t.prototype.getAlpha=function(n,t){var i,r;if(!this.transition_)return 1;if(i=this.transitionStarts_[n],i){if(-1===i)return 1}else i=t,this.transitionStarts_[n]=i;return r=t-i+1e3/60,r>=this.transition_?1:ug(r/this.transition_)},t.prototype.inTransition=function(n){return!!this.transition_&&-1!==this.transitionStarts_[n]},t.prototype.endTransition=function(n){this.transition_&&(this.transitionStarts_[n]=-1)},t}(th);cb=function(n){function t(t,i,r,u,f,e){n.call(this,t,i,e);this.crossOrigin_=u;this.src_=r;this.image_=new Image;null!==u&&(this.image_.crossOrigin=u);this.imageListenerKeys_=null;this.tileLoadFunction_=f}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.state==c.LOADING&&(this.unlistenImage_(),this.image_=bht());this.interimTile&&this.interimTile.dispose();this.state=c.ABORT;this.changed();n.prototype.disposeInternal.call(this)},t.prototype.getImage=function(){return this.image_},t.prototype.getKey=function(){return this.src_},t.prototype.handleImageError_=function(){this.state=c.ERROR;this.unlistenImage_();this.image_=bht();this.changed()},t.prototype.handleImageLoad_=function(){var n=this.image_;this.state=n.naturalWidth&&n.naturalHeight?c.LOADED:c.EMPTY;this.unlistenImage_();this.changed()},t.prototype.load=function(){this.state==c.ERROR&&(this.state=c.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_));this.state==c.IDLE&&(this.state=c.LOADING,this.changed(),this.imageListenerKeys_=[ee(this.image_,a.ERROR,this.handleImageError_,this),ee(this.image_,a.LOAD,this.handleImageLoad_,this)],this.tileLoadFunction_(this,this.src_))},t.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(lt);this.imageListenerKeys_=null},t}(vl);itt=function(n){function t(t){n.call(this,t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.expireCache=function(n){for(;this.canExpireCache();){var t=this.peekLast(),i=t.tileCoord[0].toString();if(i in n&&n[i].contains(t.tileCoord))break;this.pop().dispose()}},t.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var n=function(n){return n.split("/").map(Number)}(this.peekFirstKey())[0];this.forEach(function(t){t.tileCoord[0]!==n&&(this.remove(kht(t.tileCoord)),t.dispose())},this)}},t}(on);var lb=function(n){function t(t){n.call(this);this.projection_=w(t.projection);this.attributions_=dht(t.attributions);this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible;this.loading=!1;this.state_=void 0!==t.state?t.state:pi.READY;this.wrapX_=void 0!==t.wrapX&&t.wrapX}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getAttributions=function(){return this.attributions_},t.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},t.prototype.getProjection=function(){return this.projection_},t.prototype.getResolutions=function(){return p()},t.prototype.getState=function(){return this.state_},t.prototype.getWrapX=function(){return this.wrapX_},t.prototype.refresh=function(){this.changed()},t.prototype.setAttributions=function(n){this.attributions_=dht(n);this.changed()},t.prototype.setState=function(n){this.state_=n;this.changed()},t}(rf),hti=[0,0,0],li=function(n){var r,t,u,i;if(this.minZoom=void 0!==n.minZoom?n.minZoom:0,this.resolutions_=n.resolutions,g(function(n,t,i){var r=t||lo;return n.every(function(t,u){if(0===u)return!0;var f=r(n[u-1],t);return!(f>0||i&&0===f)})}(this.resolutions_,function(n,t){return t-n},!0),17),!n.origins)for(t=0,u=this.resolutions_.length-1;t<u;++t)if(r){if(this.resolutions_[t]/this.resolutions_[t+1]!==r){r=void 0;break}}else r=this.resolutions_[t]/this.resolutions_[t+1];this.zoomFactor_=r;this.maxZoom=this.resolutions_.length-1;this.origin_=void 0!==n.origin?n.origin:null;this.origins_=null;void 0!==n.origins&&(this.origins_=n.origins,g(this.origins_.length==this.resolutions_.length,20));i=n.extent;void 0===i||this.origin_||this.origins_||(this.origin_=bf(i));g(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18);this.tileSizes_=null;void 0!==n.tileSizes&&(this.tileSizes_=n.tileSizes,g(this.tileSizes_.length==this.resolutions_.length,19));this.tileSize_=void 0!==n.tileSize?n.tileSize:this.tileSizes_?null:rw;g(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22);this.extent_=void 0!==i?i:null;this.fullTileRanges_=null;this.tmpSize_=[0,0];void 0!==n.sizes?this.fullTileRanges_=n.sizes.map(function(n){return new gw(Math.min(0,n[0]),Math.max(n[0]-1,-1),Math.min(0,n[1]),Math.max(n[1]-1,-1))},this):i&&this.calculateTileRanges_(i)};li.prototype.forEachTileCoord=function(n,t,i){for(var u,e,r=this.getTileRangeForExtentAndZ(n,t),f=r.minX,o=r.maxX;f<=o;++f)for(u=r.minY,e=r.maxY;u<=e;++u)i([t,f,u])};li.prototype.forEachTileCoordParentTileRange=function(n,t,i,r,u){var s,f,e,h=null,o=n[0]-1;for(2===this.zoomFactor_?(f=n[1],e=n[2]):h=this.getTileCoordExtent(n,u);o>=this.minZoom;){if(s=2===this.zoomFactor_?ln(f=Math.floor(f/2),f,e=Math.floor(e/2),e,r):this.getTileRangeForExtentAndZ(h,o,r),t.call(i,o,s))return!0;--o}return!1};li.prototype.getExtent=function(){return this.extent_};li.prototype.getMaxZoom=function(){return this.maxZoom};li.prototype.getMinZoom=function(){return this.minZoom};li.prototype.getOrigin=function(n){return this.origin_?this.origin_:this.origins_[n]};li.prototype.getResolution=function(n){return this.resolutions_[n]};li.prototype.getResolutions=function(){return this.resolutions_};li.prototype.getTileCoordChildTileRange=function(n,t,i){var r,u,f;return n[0]<this.maxZoom?2===this.zoomFactor_?(r=2*n[1],u=2*n[2],ln(r,r+1,u,u+1,t)):(f=this.getTileCoordExtent(n,i),this.getTileRangeForExtentAndZ(f,n[0]+1,t)):null};li.prototype.getTileRangeExtent=function(n,t,i){var r=this.getOrigin(n),u=this.getResolution(n),f=ru(this.getTileSize(n),this.tmpSize_),e=r[0]+t.minX*f[0]*u,o=r[0]+(t.maxX+1)*f[0]*u;return ef(e,r[1]+t.minY*f[1]*u,o,r[1]+(t.maxY+1)*f[1]*u,i)};li.prototype.getTileRangeForExtentAndZ=function(n,t,i){var r=hti,u,f;return this.getTileCoordForXYAndZ_(n[0],n[1],t,!1,r),u=r[1],f=r[2],this.getTileCoordForXYAndZ_(n[2],n[3],t,!0,r),ln(u,r[1],f,r[2],i)};li.prototype.getTileCoordCenter=function(n){var t=this.getOrigin(n[0]),i=this.getResolution(n[0]),r=ru(this.getTileSize(n[0]),this.tmpSize_);return[t[0]+(n[1]+.5)*r[0]*i,t[1]+(n[2]+.5)*r[1]*i]};li.prototype.getTileCoordExtent=function(n,t){var u=this.getOrigin(n[0]),i=this.getResolution(n[0]),r=ru(this.getTileSize(n[0]),this.tmpSize_),f=u[0]+n[1]*r[0]*i,e=u[1]+n[2]*r[1]*i;return ef(f,e,f+r[0]*i,e+r[1]*i,t)};li.prototype.getTileCoordForCoordAndResolution=function(n,t,i){return this.getTileCoordForXYAndResolution_(n[0],n[1],t,!1,i)};li.prototype.getTileCoordForXYAndResolution_=function(n,t,i,r,u){var o=this.getZForResolution(i),s=i/this.getResolution(o),h=this.getOrigin(o),c=ru(this.getTileSize(o),this.tmpSize_),l=r?.5:0,a=r?0:.5,v=Math.floor((n-h[0])/i+l),y=Math.floor((t-h[1])/i+a),f=s*v/c[0],e=s*y/c[1];return r?(f=Math.ceil(f)-1,e=Math.ceil(e)-1):(f=Math.floor(f),e=Math.floor(e)),ntt(o,f,e,u)};li.prototype.getTileCoordForXYAndZ_=function(n,t,i,r,u){var o=this.getOrigin(i),s=this.getResolution(i),h=ru(this.getTileSize(i),this.tmpSize_),c=r?.5:0,l=r?0:.5,a=Math.floor((n-o[0])/s+c),v=Math.floor((t-o[1])/s+l),f=a/h[0],e=v/h[1];return r?(f=Math.ceil(f)-1,e=Math.ceil(e)-1):(f=Math.floor(f),e=Math.floor(e)),ntt(i,f,e,u)};li.prototype.getTileCoordForCoordAndZ=function(n,t,i){return this.getTileCoordForXYAndZ_(n[0],n[1],t,!1,i)};li.prototype.getTileCoordResolution=function(n){return this.resolutions_[n[0]]};li.prototype.getTileSize=function(n){return this.tileSize_?this.tileSize_:this.tileSizes_[n]};li.prototype.getFullTileRange=function(n){return this.fullTileRanges_?this.fullTileRanges_[n]:null};li.prototype.getZForResolution=function(n,t){return vi(np(this.resolutions_,n,t||0),this.minZoom,this.maxZoom)};li.prototype.calculateTileRanges_=function(n){for(var i=this.resolutions_.length,r=new Array(i),t=this.minZoom;t<i;++t)r[t]=this.getTileRangeForExtentAndZ(n,t);this.fullTileRanges_=r};yl=li;var lti=function(n){function t(t){n.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX});this.opaque_=void 0!==t.opaque&&t.opaque;this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1;this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileCache=new itt(t.cacheSize);this.tmpSize=[0,0];this.key_=t.key||"";this.tileOptions={transition:t.transition}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},t.prototype.expireCache=function(n,t){var i=this.getTileCacheForProjection(n);i&&i.expireCache(t)},t.prototype.forEachLoadedTile=function(n,t,i,r){var o=this.getTileCacheForProjection(n),l,s,u,h,f,e;if(!o)return!1;for(h=!0,f=i.minX;f<=i.maxX;++f)for(e=i.minY;e<=i.maxY;++e)s=ss(t,f,e),u=!1,o.containsKey(s)&&(u=(l=o.get(s)).getState()===c.LOADED)&&(u=!1!==r(l)),u||(h=!1);return h},t.prototype.getGutterForProjection=function(){return 0},t.prototype.getKey=function(){return this.key_},t.prototype.setKey=function(n){this.key_!==n&&(this.key_=n,this.changed())},t.prototype.getOpaque=function(){return this.opaque_},t.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},t.prototype.getTile=function(){return p()},t.prototype.getTileGrid=function(){return this.tileGrid},t.prototype.getTileGridForProjection=function(n){return this.tileGrid?this.tileGrid:ght(n)},t.prototype.getTileCacheForProjection=function(n){var t=this.getProjection();return t&&!hu(t,n)?null:this.tileCache},t.prototype.getTilePixelRatio=function(){return this.tilePixelRatio_},t.prototype.getTilePixelSize=function(n,t,i){var f=this.getTileGridForProjection(i),r=this.getTilePixelRatio(t),u=ru(f.getTileSize(n),this.tmpSize);return 1==r?u:sg(u,r,this.tmpSize)},t.prototype.getTileCoordForTileUrlFunction=function(n,t){var i=void 0!==t?t:this.getProjection(),r=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(n=function(n,t,i){var o=t[0],r=n.getTileCoordCenter(t),u=uc(i),f,e;return tp(u,r)?t:(f=wt(u),e=Math.ceil((u[0]-r[0])/f),r[0]+=f*e,n.getTileCoordForCoordAndZ(r,o))}(r,n,i)),function(n,t){var i=n[0],f=n[1],e=n[2],u,r;return t.getMinZoom()>i||i>t.getMaxZoom()?!1:(r=t.getExtent(),!(u=r?t.getTileRangeForExtentAndZ(r,i):t.getFullTileRange(i))||u.containsXY(f,e))}(n,r)?n:null},t.prototype.refresh=function(){this.tileCache.clear();this.changed()},t.prototype.useTile=function(){},t}(lb),ati=function(n){function t(t,i){n.call(this,t);this.tile=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),gv=lti,vti=new cl("precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n"),yti=new ll("varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n  gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n  v_texCoord = a_texCoord;\n}\n\n\n"),pti=function(n,t){this.u_tileOffset=n.getUniformLocation(t,"u_tileOffset");this.u_texture=n.getUniformLocation(t,"u_texture");this.a_position=n.getAttribLocation(t,"a_position");this.a_texCoord=n.getAttribLocation(t,"a_texCoord")},ab=function(n){function t(t,i){n.call(this,t,i);this.fragmentShader_=vti;this.vertexShader_=yti;this.locations_=null;this.renderArrayBuffer_=new vf([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.renderedTileRange_=null;this.renderedFramebufferExtent_=null;this.renderedRevision_=-1;this.tmpSize_=[0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.mapRenderer.getContext().deleteBuffer(this.renderArrayBuffer_);n.prototype.disposeInternal.call(this)},t.prototype.createLoadedTileFinder=function(n,t,i){var r=this.mapRenderer;return function(u,f){return n.forEachLoadedTile(t,u,f,function(n){var t=r.isTileTextureLoaded(n);return t&&(i[u]||(i[u]={}),i[u][n.tileCoord.toString()]=n),t})}},t.prototype.handleWebGLContextLost=function(){n.prototype.handleWebGLContextLost.call(this);this.locations_=null},t.prototype.prepareFrame=function(n,t,i){var it=this.mapRenderer,f=i.getGL(),a=n.viewState,y=a.projection,st=this.getLayer(),e=st.getSource(),ct,b,ot,at,ei,vt,d;if(!(e instanceof gv))return!0;var r,o=e.getTileGridForProjection(y),s=o.getZForResolution(a.resolution),nt=o.getResolution(s),v=e.getTilePixelSize(s,n.pixelRatio,y),p=v[0]/ru(o.getTileSize(s),this.tmpSize_)[0],ht=nt/p,yt=e.getTilePixelRatio(p)*e.getGutterForProjection(y),pt=a.center,wt=n.extent,h=o.getTileRangeForExtentAndZ(wt,s);if(this.renderedTileRange_&&this.renderedTileRange_.equals(h)&&this.renderedRevision_==e.getRevision())r=this.renderedFramebufferExtent_;else{var bt=h.getSize(),rt=function(n){return g(0<n,29),Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}(Math.max(bt[0]*v[0],bt[1]*v[1])),w=ht*rt,kt=o.getOrigin(s),gt=kt[0]+h.minX*v[0]*ht,ni=kt[1]+h.minY*v[1]*ht;r=[gt,ni,gt+w,ni+w];this.bindFramebuffer(n,rt);f.viewport(0,0,rt,rt);f.clearColor(0,0,0,0);f.clear(16384);f.disable(3042);ct=i.getProgram(this.fragmentShader_,this.vertexShader_);i.useProgram(ct);this.locations_||(this.locations_=new pti(f,ct));i.bindBuffer(34962,this.renderArrayBuffer_);f.enableVertexAttribArray(this.locations_.a_position);f.vertexAttribPointer(this.locations_.a_position,2,5126,!1,16,0);f.enableVertexAttribArray(this.locations_.a_texCoord);f.vertexAttribPointer(this.locations_.a_texCoord,2,5126,!1,16,8);f.uniform1i(this.locations_.u_texture,0);b={};b[s]={};for(var ti,u,k,ft,l,ii=this.createLoadedTileFinder(e,y,b),ri=st.getUseInterimTilesOnError(),ui=!0,et=[1/0,1/0,-1/0,-1/0],fi=new gw(0,0,0,0),ut=h.minX;ut<=h.maxX;++ut)for(ft=h.minY;ft<=h.maxY;++ft)if(u=e.getTile(s,ut,ft,p,y),void 0===t.extent||dt(l=o.getTileCoordExtent(u.tileCoord,et),t.extent)){if((k=u.getState())==c.LOADED||k==c.EMPTY||k==c.ERROR&&!ri||(u=u.getInterimTile()),(k=u.getState())==c.LOADED){if(it.isTileTextureLoaded(u)){b[s][u.tileCoord.toString()]=u;continue}}else if(k==c.EMPTY||k==c.ERROR&&!ri)continue;ui=!1;o.forEachTileCoordParentTileRange(u.tileCoord,ii,null,fi,et)||(ti=o.getTileCoordChildTileRange(u.tileCoord,fi,et))&&ii(s+1,ti)}ot=Object.keys(b).map(Number);ot.sort(lo);for(var tt=new Float32Array(4),lt=0,oi=ot.length;lt<oi;++lt){at=b[ot[lt]];for(ei in at)(u=at[ei])instanceof cb&&(l=o.getTileCoordExtent(u.tileCoord,et),tt[0]=2*(l[2]-l[0])/w,tt[1]=2*(l[3]-l[1])/w,tt[2]=2*(l[0]-r[0])/w-1,tt[3]=2*(l[1]-r[1])/w-1,f.uniform4fv(this.locations_.u_tileOffset,tt),it.bindTileTexture(u,v,yt*p,rb,rb),f.drawArrays(5,0,4))}ui?(this.renderedTileRange_=h,this.renderedFramebufferExtent_=r,this.renderedRevision_=e.getRevision()):(this.renderedTileRange_=null,this.renderedFramebufferExtent_=null,this.renderedRevision_=-1,n.animate=!0)}return this.updateUsedTiles(n.usedTiles,e,s,h),vt=it.getTileTextureQueue(),this.manageTilePyramid(n,e,o,p,y,wt,s,st.getPreload(),function(n){n.getState()!=c.LOADED||it.isTileTextureLoaded(n)||vt.isKeyQueued(n.getKey())||vt.enqueue([n,o.getTileCoordCenter(n.tileCoord),o.getResolution(n.tileCoord[0]),v,yt*p])},this),this.scheduleExpireCache(n,e),d=this.texCoordMatrix,hh(d),ne(d,(Math.round(pt[0]/nt)*nt-r[0])/(r[2]-r[0]),(Math.round(pt[1]/nt)*nt-r[1])/(r[3]-r[1])),0!==a.rotation&&vp(d,a.rotation),sf(d,n.size[0]*a.resolution/(r[2]-r[0]),n.size[1]*a.resolution/(r[3]-r[1])),ne(d,-.5,-.5),!0},t.prototype.forEachLayerAtPixel=function(n,t,i,r){var f;if(this.framebuffer){var s=[n[0]/t.size[0],(t.size[1]-n[1])/t.size[1]],e=wr(this.texCoordMatrix,s.slice()),o=[e[0]*this.framebufferDimension,e[1]*this.framebufferDimension],u=this.mapRenderer.getContext().getGL();return u.bindFramebuffer(u.FRAMEBUFFER,this.framebuffer),f=new Uint8Array(4),u.readPixels(o[0],o[1],1,1,u.RGBA,u.UNSIGNED_BYTE,f),f[3]>0?i.call(r,this.getLayer(),f):void 0}},t}(gn);ab.handles=function(n){return n.getType()===kr.TILE};ab.create=function(n,t){return new ab(n,t)};rtt=ab;ny=function(n){function t(t,i){n.call(this,t,i);this.dirty_=!1;this.renderedRevision_=-1;this.renderedResolution_=NaN;this.renderedExtent_=[1/0,1/0,-1/0,-1/0];this.renderedRenderOrder_=null;this.replayGroup_=null;this.layerState_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.composeFrame=function(n,t,i){this.layerState_=t;var u=n.viewState,f=this.replayGroup_,e=n.size,o=n.pixelRatio,r=this.mapRenderer.getGL();f&&!f.isEmpty()&&(r.enable(r.SCISSOR_TEST),r.scissor(0,0,e[0]*o,e[1]*o),f.replay(i,u.center,u.resolution,u.rotation,e,o,t.opacity,t.managed?n.skippedFeatureUids:{}),r.disable(r.SCISSOR_TEST))},t.prototype.disposeInternal=function(){var t=this.replayGroup_,i;t&&(i=this.mapRenderer.getContext(),t.getDeleteResourcesFunction(i)(),this.replayGroup_=null);n.prototype.disposeInternal.call(this)},t.prototype.forEachFeatureAtCoordinate=function(n,t,i,r,u){if(this.replayGroup_&&this.layerState_){var o=this.mapRenderer.getContext(),f=t.viewState,s=this.getLayer(),h=this.layerState_,e={};return this.replayGroup_.forEachFeatureAtCoordinate(n,o,f.center,f.resolution,f.rotation,t.size,t.pixelRatio,h.opacity,{},function(n){var t=y(n);if(!(t in e))return e[t]=!0,r.call(u,n,s)})}},t.prototype.hasFeatureAtCoordinate=function(n,t){if(this.replayGroup_&&this.layerState_){var r=this.mapRenderer.getContext(),i=t.viewState,u=this.layerState_;return this.replayGroup_.hasFeatureAtCoordinate(n,r,i.center,i.resolution,i.rotation,t.size,t.pixelRatio,u.opacity,t.skippedFeatureUids)}return!1},t.prototype.forEachLayerAtPixel=function(n,t,i,r){var u=wr(t.pixelToCoordinateTransform,n.slice());if(this.hasFeatureAtCoordinate(u,t))return i.call(r,this.getLayer(),null)},t.prototype.handleStyleImageChange_=function(){this.renderIfReadyAndVisible()},t.prototype.prepareFrame=function(n,t,i){var r=this.getLayer(),h=r.getSource(),y=n.viewHints[lu],p=n.viewHints[oi],w=r.getUpdateWhileAnimating(),b=r.getUpdateWhileInteracting(),f,o,c,s;if(!this.dirty_&&!w&&y||!b&&p)return!0;var k=n.extent,l=n.viewState,d=l.projection,u=l.resolution,a=n.pixelRatio,v=r.getRevision(),g=r.getRenderBuffer(),e=r.getRenderOrder();return(void 0===e&&(e=lst),f=ff(k,g*u),!this.dirty_&&this.renderedResolution_==u&&this.renderedRevision_==v&&this.renderedRenderOrder_==e&&lr(this.renderedExtent_,f))?!0:(this.replayGroup_&&n.postRenderFunctions.push(this.replayGroup_.getDeleteResourcesFunction(i)),this.dirty_=!1,o=new os(pn(u,a),f,r.getRenderBuffer()),h.loadFeatures(f,u,d),c=function(n){var t,i=n.getStyleFunction()||r.getStyleFunction(),f;(i&&(t=i(n,u)),t)&&(f=this.renderFeature(n,u,a,t,o),this.dirty_=this.dirty_||f)}.bind(this),e?(s=[],h.forEachFeatureInExtent(f,function(n){s.push(n)}),s.sort(e),s.forEach(c.bind(this))):h.forEachFeatureInExtent(f,c),o.finish(i),this.renderedResolution_=u,this.renderedRevision_=v,this.renderedRenderOrder_=e,this.renderedExtent_=f,this.replayGroup_=o,!0)},t.prototype.renderFeature=function(n,t,i,r,u){var f,e;if(!r)return!1;if(f=!1,Array.isArray(r))for(e=r.length-1;e>=0;--e)f=hl(u,n,r[e],av(t,i),this.handleStyleImageChange_,this)||f;else f=hl(u,n,r,av(t,i),this.handleStyleImageChange_,this)||f;return f},t}(gn);ny.handles=function(n){return n.getType()===kr.VECTOR};ny.create=function(n,t){return new ny(n,t)};var ict=ny,wti=function(n){function t(t){(t=nt({},t)).controls||(t.controls=vg());t.interactions||(t.interactions=un());n.call(this,t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createRenderer=function(){var n=new wht(this);return n.registerLayerRenderers([pht,rtt,ict]),n},t}(hg),ro={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"};fc=document.implementation.createDocument("","",null);hs="http://www.w3.org/2001/XMLSchema-instance";hr=gt();utt=function(n){function t(t){n.call(this,{extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes});this.matrixIds_=t.matrixIds}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getMatrixId=function(n){return this.matrixIds_[n]},t.prototype.getMatrixIds=function(){return this.matrixIds_},t}(yl);hct=utt;ri=function(n){this.opacity_=n.opacity;this.rotateWithView_=n.rotateWithView;this.rotation_=n.rotation;this.scale_=n.scale};ri.prototype.clone=function(){return new ri({opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})};ri.prototype.getOpacity=function(){return this.opacity_};ri.prototype.getRotateWithView=function(){return this.rotateWithView_};ri.prototype.getRotation=function(){return this.rotation_};ri.prototype.getScale=function(){return this.scale_};ri.prototype.getSnapToPixel=function(){return!1};ri.prototype.getAnchor=function(){return p()};ri.prototype.getImage=function(){return p()};ri.prototype.getHitDetectionImage=function(){return p()};ri.prototype.getImageState=function(){return p()};ri.prototype.getImageSize=function(){return p()};ri.prototype.getHitDetectionImageSize=function(){return p()};ri.prototype.getOrigin=function(){return p()};ri.prototype.getSize=function(){return p()};ri.prototype.setOpacity=function(n){this.opacity_=n};ri.prototype.setRotateWithView=function(n){this.rotateWithView_=n};ri.prototype.setRotation=function(n){this.rotation_=n};ri.prototype.setScale=function(n){this.scale_=n};ri.prototype.setSnapToPixel=function(){};ri.prototype.listenImageChange=function(){return p()};ri.prototype.load=function(){p()};ri.prototype.unlistenImageChange=function(){p()};var ftt=ri,lct=function(n){function t(t){var i=void 0!==t.rotateWithView&&t.rotateWithView;n.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==t.rotation?t.rotation:0,scale:1});this.checksums_=null;this.canvas_=null;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.anchor_=null;this.size_=null;this.imageSize_=null;this.hitDetectionImageSize_=null;this.atlasManager_=t.atlasManager;this.render_(this.atlasManager_)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){var n=new t({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(),atlasManager:this.atlasManager_});return n.setOpacity(this.getOpacity()),n.setScale(this.getScale()),n},t.prototype.getAnchor=function(){return this.anchor_},t.prototype.getAngle=function(){return this.angle_},t.prototype.getFill=function(){return this.fill_},t.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_},t.prototype.getImage=function(){return this.canvas_},t.prototype.getImageSize=function(){return this.imageSize_},t.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},t.prototype.getImageState=function(){return ot.LOADED},t.prototype.getOrigin=function(){return this.origin_},t.prototype.getPoints=function(){return this.points_},t.prototype.getRadius=function(){return this.radius_},t.prototype.getRadius2=function(){return this.radius2_},t.prototype.getSize=function(){return this.size_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.listenImageChange=function(){},t.prototype.load=function(){},t.prototype.unlistenImageChange=function(){},t.prototype.render_=function(n){var r,u,o="",s="",h=0,c=null,l=0,e=0,t,f,a,y,v,p,i;this.stroke_&&(null===(u=this.stroke_.getColor())&&(u=uv),u=du(u),void 0===(e=this.stroke_.getWidth())&&(e=1),c=this.stroke_.getLineDash(),l=this.stroke_.getLineDashOffset(),il||(c=null,l=0),void 0===(s=this.stroke_.getLineJoin())&&(s="round"),void 0===(o=this.stroke_.getLineCap())&&(o="round"),void 0===(h=this.stroke_.getMiterLimit())&&(h=10));t=2*(this.radius_+e)+1;f={strokeStyle:u,strokeWidth:e,size:t,lineCap:o,lineDash:c,lineDashOffset:l,lineJoin:s,miterLimit:h};void 0===n?(a=kt(t,t),this.canvas_=a.canvas,r=t=this.canvas_.width,this.draw_(f,a,0,0),this.createHitDetectionCanvas_(f)):(t=Math.round(t),v=!this.fill_,v&&(y=this.drawHitDetectionCanvas_.bind(this,f)),p=this.getChecksum(),i=n.add(p,t,t,this.draw_.bind(this,f),y),this.canvas_=i.image,this.origin_=[i.offsetX,i.offsetY],r=i.image.width,v?(this.hitDetectionCanvas_=i.hitImage,this.hitDetectionImageSize_=[i.hitImage.width,i.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[r,r]));this.anchor_=[t/2,t/2];this.size_=[t,t];this.imageSize_=[r,r]},t.prototype.draw_=function(n,t,i,r){var u,o,s,f,h,e;if(t.setTransform(1,0,0,1,0,0),t.translate(i,r),t.beginPath(),f=this.points_,f===1/0)t.arc(n.size/2,n.size/2,this.radius_,0,2*Math.PI,!0);else for(h=void 0!==this.radius2_?this.radius2_:this.radius_,h!==this.radius_&&(f*=2),u=0;u<=f;u++)o=2*u*Math.PI/f-Math.PI/2+this.angle_,s=u%2==0?this.radius_:h,t.lineTo(n.size/2+s*Math.cos(o),n.size/2+s*Math.sin(o));this.fill_&&(e=this.fill_.getColor(),null===e&&(e=no),t.fillStyle=du(e),t.fill());this.stroke_&&(t.strokeStyle=n.strokeStyle,t.lineWidth=n.strokeWidth,n.lineDash&&(t.setLineDash(n.lineDash),t.lineDashOffset=n.lineDashOffset),t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.miterLimit=n.miterLimit,t.stroke());t.closePath()},t.prototype.createHitDetectionCanvas_=function(n){if(this.hitDetectionImageSize_=[n.size,n.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var t=kt(n.size,n.size);this.hitDetectionCanvas_=t.canvas;this.drawHitDetectionCanvas_(n,t,0,0)}},t.prototype.drawHitDetectionCanvas_=function(n,t,i,r){var u,f,e,o,s;if(t.setTransform(1,0,0,1,0,0),t.translate(i,r),t.beginPath(),u=this.points_,u===1/0)t.arc(n.size/2,n.size/2,this.radius_,0,2*Math.PI,!0);else for(s=void 0!==this.radius2_?this.radius2_:this.radius_,s!==this.radius_&&(u*=2),f=0;f<=u;f++)o=2*f*Math.PI/u-Math.PI/2+this.angle_,e=f%2==0?this.radius_:s,t.lineTo(n.size/2+e*Math.cos(o),n.size/2+e*Math.sin(o));t.fillStyle=vh(no);t.fill();this.stroke_&&(t.strokeStyle=n.strokeStyle,t.lineWidth=n.strokeWidth,n.lineDash&&(t.setLineDash(n.lineDash),t.lineDashOffset=n.lineDashOffset),t.stroke());t.closePath()},t.prototype.getChecksum=function(){var n=this.stroke_?this.stroke_.getChecksum():"-",t=this.fill_?this.fill_.getChecksum():"-",i;return this.checksums_&&n==this.checksums_[1]&&t==this.checksums_[2]&&this.radius_==this.checksums_[3]&&this.radius2_==this.checksums_[4]&&this.angle_==this.checksums_[5]&&this.points_==this.checksums_[6]||(i="r"+n+t+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-"),this.checksums_=[i,n,t,this.radius_,this.radius2_,this.angle_,this.points_]),this.checksums_[0]},t}(ftt),ett=function(n){function t(t){var i=t||{};n.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,atlasManager:i.atlasManager})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){var n=new t({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),atlasManager:this.atlasManager_});return n.setOpacity(this.getOpacity()),n.setScale(this.getScale()),n},t.prototype.setRadius=function(n){this.radius_=n;this.render_(this.atlasManager_)},t}(lct),eu={FRACTION:"fraction",PIXELS:"pixels"},bti=function(n){function t(t,i,r,u,f,e){n.call(this);this.hitDetectionImage_=null;this.image_=t||new Image;null!==u&&(this.image_.crossOrigin=u);this.canvas_=e?document.createElement("canvas"):null;this.color_=e;this.imageListenerKeys_=null;this.imageState_=f;this.size_=r;this.src_=i;this.tainted_}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===ot.LOADED){this.tainted_=!1;var n=kt(1,1);try{n.drawImage(this.image_,0,0);n.getImageData(0,0,1,1)}catch(n){this.tainted_=!0}}return!0===this.tainted_},t.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(a.CHANGE)},t.prototype.handleImageError_=function(){this.imageState_=ot.ERROR;this.unlistenImage_();this.dispatchChangeEvent_()},t.prototype.handleImageLoad_=function(){this.imageState_=ot.LOADED;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.replaceColor_();this.dispatchChangeEvent_()},t.prototype.getImage=function(){return this.canvas_?this.canvas_:this.image_},t.prototype.getImageState=function(){return this.imageState_},t.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var n=this.size_[0],t=this.size_[1],i=kt(n,t);i.fillRect(0,0,n,t);this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},t.prototype.getSize=function(){return this.size_},t.prototype.getSrc=function(){return this.src_},t.prototype.load=function(){if(this.imageState_==ot.IDLE){this.imageState_=ot.LOADING;this.imageListenerKeys_=[ee(this.image_,a.ERROR,this.handleImageError_,this),ee(this.image_,a.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch(n){this.handleImageError_()}}},t.prototype.replaceColor_=function(){var t;if(this.color_&&!this.isTainted_()){this.canvas_.width=this.image_.width;this.canvas_.height=this.image_.height;t=this.canvas_.getContext("2d");t.drawImage(this.image_,0,0);for(var r=t.getImageData(0,0,this.image_.width,this.image_.height),i=r.data,u=this.color_[0]/255,f=this.color_[1]/255,e=this.color_[2]/255,n=0,o=i.length;n<o;n+=4)i[n]*=u,i[n+1]*=f,i[n+2]*=e;t.putImageData(r,0,0)}},t.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(lt);this.imageListenerKeys_=null},t}(th),ur={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},vb=function(n){function t(t){var i=t||{},o=void 0!==i.opacity?i.opacity:1,s=void 0!==i.rotation?i.rotation:0,h=void 0!==i.scale?i.scale:1,c=void 0!==i.rotateWithView&&i.rotateWithView,e;n.call(this,{opacity:o,rotation:s,scale:h,rotateWithView:c});this.anchor_=void 0!==i.anchor?i.anchor:[.5,.5];this.normalizedAnchor_=null;this.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:ur.TOP_LEFT;this.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:eu.FRACTION;this.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:eu.FRACTION;this.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var r=void 0!==i.img?i.img:null,f=void 0!==i.imgSize?i.imgSize:null,u=i.src;g(!(void 0!==u&&r),4);g(!r||r&&f,5);void 0!==u&&0!==u.length||!r||(u=r.src||y(r));g(void 0!==u&&u.length>0,6);e=void 0!==i.src?ot.IDLE:ot.LOADED;this.color_=void 0!==i.color?yh(i.color):null;this.iconImage_=function(n,t,i,r,u,f){var e=ev.get(t,r,f);return e||(e=new bti(n,t,i,r,u,f),ev.set(t,r,f,e)),e}(r,u,f,this.crossOrigin_,e,this.color_);this.offset_=void 0!==i.offset?i.offset:[0,0];this.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:ur.TOP_LEFT;this.origin_=null;this.size_=void 0!==i.size?i.size:null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},t.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var n=this.anchor_,t=this.getSize();if(this.anchorXUnits_==eu.FRACTION||this.anchorYUnits_==eu.FRACTION){if(!t)return null;n=this.anchor_.slice();this.anchorXUnits_==eu.FRACTION&&(n[0]*=t[0]);this.anchorYUnits_==eu.FRACTION&&(n[1]*=t[1])}if(this.anchorOrigin_!=ur.TOP_LEFT){if(!t)return null;n===this.anchor_&&(n=this.anchor_.slice());this.anchorOrigin_!=ur.TOP_RIGHT&&this.anchorOrigin_!=ur.BOTTOM_RIGHT||(n[0]=-n[0]+t[0]);this.anchorOrigin_!=ur.BOTTOM_LEFT&&this.anchorOrigin_!=ur.BOTTOM_RIGHT||(n[1]=-n[1]+t[1])}return this.normalizedAnchor_=n,this.normalizedAnchor_},t.prototype.setAnchor=function(n){this.anchor_=n;this.normalizedAnchor_=null},t.prototype.getColor=function(){return this.color_},t.prototype.getImage=function(n){return this.iconImage_.getImage(n)},t.prototype.getImageSize=function(){return this.iconImage_.getSize()},t.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},t.prototype.getImageState=function(){return this.iconImage_.getImageState()},t.prototype.getHitDetectionImage=function(n){return this.iconImage_.getHitDetectionImage(n)},t.prototype.getOrigin=function(){var n,t,i;if(this.origin_)return this.origin_;if(n=this.offset_,this.offsetOrigin_!=ur.TOP_LEFT){if(t=this.getSize(),i=this.iconImage_.getSize(),!t||!i)return null;n=n.slice();this.offsetOrigin_!=ur.TOP_RIGHT&&this.offsetOrigin_!=ur.BOTTOM_RIGHT||(n[0]=i[0]-t[0]-n[0]);this.offsetOrigin_!=ur.BOTTOM_LEFT&&this.offsetOrigin_!=ur.BOTTOM_RIGHT||(n[1]=i[1]-t[1]-n[1])}return this.origin_=n,this.origin_},t.prototype.getSrc=function(){return this.iconImage_.getSrc()},t.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},t.prototype.listenImageChange=function(n,t){return o(this.iconImage_,a.CHANGE,n,t)},t.prototype.load=function(){this.iconImage_.load()},t.prototype.unlistenImageChange=function(n,t){ou(this.iconImage_,a.CHANGE,n,t)},t}(ftt),ai=function(n){var t=n||{};this.geometry_=null;this.geometryFunction_=act;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.stroke_=void 0!==t.stroke?t.stroke:null;this.text_=void 0!==t.text?t.text:null;this.zIndex_=t.zIndex};ai.prototype.clone=function(){var n=this.getGeometry();return n&&"object"==typeof n&&(n=n.clone()),new ai({geometry:n,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})};ai.prototype.getRenderer=function(){return this.renderer_};ai.prototype.setRenderer=function(n){this.renderer_=n};ai.prototype.getGeometry=function(){return this.geometry_};ai.prototype.getGeometryFunction=function(){return this.geometryFunction_};ai.prototype.getFill=function(){return this.fill_};ai.prototype.setFill=function(n){this.fill_=n};ai.prototype.getImage=function(){return this.image_};ai.prototype.setImage=function(n){this.image_=n};ai.prototype.getStroke=function(){return this.stroke_};ai.prototype.setStroke=function(n){this.stroke_=n};ai.prototype.getText=function(){return this.text_};ai.prototype.setText=function(n){this.text_=n};ai.prototype.getZIndex=function(){return this.zIndex_};ai.prototype.setGeometry=function(n){"function"==typeof n?this.geometryFunction_=n:"string"==typeof n?this.geometryFunction_=function(t){return t.get(n)}:n?void 0!==n&&(this.geometryFunction_=function(){return n}):this.geometryFunction_=act;this.geometry_=n};ai.prototype.setZIndex=function(n){this.zIndex_=n};yb=null;wl=ai;bl=function(n,t,i,r,u){var e,o,f;this.sourceProj_=n;this.targetProj_=t;e={};o=he(this.targetProj_,this.sourceProj_);this.transformInv_=function(n){var t=n[0]+"/"+n[1];return e[t]||(e[t]=o(n)),e[t]};this.maxSourceExtent_=r;this.errorThresholdSquared_=u*u;this.triangles_=[];this.wrapsXInSource_=!1;this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&wt(r)==wt(this.sourceProj_.getExtent());this.sourceWorldWidth_=this.sourceProj_.getExtent()?wt(this.sourceProj_.getExtent()):null;this.targetWorldWidth_=this.targetProj_.getExtent()?wt(this.targetProj_.getExtent()):null;var s=bf(i),h=ao(i),c=fh(i),l=de(i),a=this.transformInv_(s),v=this.transformInv_(h),y=this.transformInv_(c),p=this.transformInv_(l);(this.addQuad_(s,h,c,l,a,v,y,p,10),this.wrapsXInSource_)&&(f=1/0,this.triangles_.forEach(function(n){f=Math.min(f,n.source[0][0],n.source[1][0],n.source[2][0])}),this.triangles_.forEach(function(n){var t,i;Math.max(n.source[0][0],n.source[1][0],n.source[2][0])-f>this.sourceWorldWidth_/2&&(t=[[n.source[0][0],n.source[0][1]],[n.source[1][0],n.source[1][1]],[n.source[2][0],n.source[2][1]]],t[0][0]-f>this.sourceWorldWidth_/2&&(t[0][0]-=this.sourceWorldWidth_),t[1][0]-f>this.sourceWorldWidth_/2&&(t[1][0]-=this.sourceWorldWidth_),t[2][0]-f>this.sourceWorldWidth_/2&&(t[2][0]-=this.sourceWorldWidth_),i=Math.min(t[0][0],t[1][0],t[2][0]),Math.max(t[0][0],t[1][0],t[2][0])-i<this.sourceWorldWidth_/2&&(n.source=t))}.bind(this)));e={}};bl.prototype.addTriangle_=function(n,t,i,r,u,f){this.triangles_.push({source:[r,u,f],target:[n,t,i]})};bl.prototype.addQuad_=function(n,t,i,r,u,f,e,o,s){var g=hi([u,f,e,o]),c=this.sourceWorldWidth_?wt(g)/this.sourceWorldWidth_:null,a=this.sourceWorldWidth_,v=this.sourceProj_.canWrapX()&&c>.5&&c<1,h=!1,y,nt,l,p;if(s>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(h=wt(hi([n,t,i,r]))/this.targetWorldWidth_>.25||h),!v&&this.sourceProj_.isGlobal()&&c&&(h=c>.25||h)),h||!this.maxSourceExtent_||dt(g,this.maxSourceExtent_)){if(!(h||isFinite(u[0])&&isFinite(u[1])&&isFinite(f[0])&&isFinite(f[1])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(o[0])&&isFinite(o[1]))){if(!(s>0))return;h=!0}if(s>0&&(h||(nt=[(n[0]+i[0])/2,(n[1]+i[1])/2],l=this.transformInv_(nt),y=v?(df(u[0],a)+df(e[0],a))/2-df(l[0],a):(u[0]+e[0])/2-l[0],p=(u[1]+e[1])/2-l[1],h=y*y+p*p>this.errorThresholdSquared_),h)){if(Math.abs(n[0]-i[0])<=Math.abs(n[1]-i[1])){var w=[(t[0]+i[0])/2,(t[1]+i[1])/2],tt=this.transformInv_(w),b=[(r[0]+n[0])/2,(r[1]+n[1])/2],it=this.transformInv_(b);this.addQuad_(n,t,w,b,u,f,tt,it,s-1);this.addQuad_(b,w,i,r,it,tt,e,o,s-1)}else{var k=[(n[0]+t[0])/2,(n[1]+t[1])/2],rt=this.transformInv_(k),d=[(i[0]+r[0])/2,(i[1]+r[1])/2],ut=this.transformInv_(d);this.addQuad_(n,k,d,r,u,rt,ut,o,s-1);this.addQuad_(k,t,i,d,rt,f,e,ut,s-1)}return}if(v){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(n,i,r,u,e,o);this.addTriangle_(n,t,i,u,f,e)}};bl.prototype.calculateSourceExtent=function(){var n=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(t){var i=t.source;se(n,i[0]);se(n,i[1]);se(n,i[2])}),n};bl.prototype.getTriangles=function(){return this.triangles_};var yct=bl,gti=function(n){function t(t,i,r,u,f,e,o,s,h,l,a){var b,rt,p,ut,y,w,k,d,nt;n.call(this,f,c.IDLE);this.renderEdges_=void 0!==a&&a;this.pixelRatio_=o;this.gutter_=s;this.canvas_=null;this.sourceTileGrid_=i;this.targetTileGrid_=u;this.wrappedTileCoord_=e||f;this.sourceTiles_=[];this.sourcesListenerKeys_=null;this.sourceZ_=0;var tt=u.getTileCoordExtent(this.wrappedTileCoord_),it=this.targetTileGrid_.getExtent(),v=this.sourceTileGrid_.getExtent(),g=it?of(tt,it):tt;if(0!==up(g))if(b=t.getExtent(),b&&(v=v?of(v,b):b),rt=u.getResolution(this.wrappedTileCoord_[0]),p=wb(t,r,su(g),rt),!isFinite(p)||p<=0)this.state=c.EMPTY;else if(ut=void 0!==l?l:pot,this.triangulation_=new yct(t,r,g,v,p*ut),0!==this.triangulation_.getTriangles().length)if(this.sourceZ_=i.getZForResolution(p),y=this.triangulation_.calculateSourceExtent(),v&&(t.canWrapX()?(y[1]=vi(y[1],v[1],v[3]),y[3]=vi(y[3],v[1],v[3])):y=of(y,v)),up(y)){for(w=i.getTileRangeForExtentAndZ(y,this.sourceZ_),k=w.minX;k<=w.maxX;k++)for(d=w.minY;d<=w.maxY;d++)nt=h(this.sourceZ_,k,d,o),nt&&this.sourceTiles_.push(nt);0===this.sourceTiles_.length&&(this.state=c.EMPTY)}else this.state=c.EMPTY;else this.state=c.EMPTY;else this.state=c.EMPTY}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.state==c.LOADING&&this.unlistenSources_();n.prototype.disposeInternal.call(this)},t.prototype.getImage=function(){return this.canvas_},t.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(n){n&&n.getState()==c.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(n.tileCoord),image:n.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=c.ERROR;else{var i=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(i),r="number"==typeof n?n:n[0],u="number"==typeof n?n:n[1],f=this.targetTileGrid_.getResolution(i),e=this.sourceTileGrid_.getResolution(this.sourceZ_),o=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=vct(r,u,this.pixelRatio_,e,this.sourceTileGrid_.getExtent(),f,o,this.triangulation_,t,this.gutter_,this.renderEdges_);this.state=c.LOADED}this.changed()},t.prototype.load=function(){if(this.state==c.IDLE){this.state=c.LOADING;this.changed();var n=0;this.sourcesListenerKeys_=[];this.sourceTiles_.forEach(function(t){var r=t.getState(),i;(r==c.IDLE||r==c.LOADING)&&(n++,i=o(t,a.CHANGE,function(){var r=t.getState();r!=c.LOADED&&r!=c.ERROR&&r!=c.EMPTY||(lt(i),0==--n&&(this.unlistenSources_(),this.reproject_()))},this),this.sourcesListenerKeys_.push(i))}.bind(this));this.sourceTiles_.forEach(function(n){n.getState()==c.IDLE&&n.load()});0===n&&setTimeout(this.reproject_.bind(this),0)}},t.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(lt);this.sourcesListenerKeys_=null},t}(vl),nii="tileloadstart",tii="tileloadend",iii="tileloaderror",pct=function(n){function t(t){n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,key:t.key,attributionsCollapsible:t.attributionsCollapsible});this.generateTileUrlFunction_=!t.tileUrlFunction;this.tileLoadFunction=t.tileLoadFunction;this.tileUrlFunction=t.tileUrlFunction?t.tileUrlFunction.bind(this):stt;this.urls=null;t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url);t.tileUrlFunction&&this.setTileUrlFunction(t.tileUrlFunction,this.key_);this.tileLoadingKeys_={}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},t.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},t.prototype.getUrls=function(){return this.urls},t.prototype.handleTileChange=function(n){var t,r=n.target,u=y(r),i=r.getState();i==c.LOADING?(this.tileLoadingKeys_[u]=!0,t=nii):u in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[u],t=i==c.ERROR?iii:i==c.LOADED||i==c.ABORT?tii:void 0);void 0!=t&&this.dispatchEvent(new ati(t,r))},t.prototype.setTileLoadFunction=function(n){this.tileCache.clear();this.tileLoadFunction=n;this.changed()},t.prototype.setTileUrlFunction=function(n,t){this.tileUrlFunction=n;this.tileCache.pruneExceptNewestZ();void 0!==t?this.setKey(t):this.changed()},t.prototype.setUrl=function(n){var t=this.urls=htt(n);this.setUrls(t)},t.prototype.setUrls=function(n){this.urls=n;var t=n.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(ott(n,this.tileGrid),t):this.setKey(t)},t.prototype.useTile=function(n,t,i){var r=ss(n,t,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},t}(gv);var cs=function(n){function t(t){n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:rii,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,key:t.key,attributionsCollapsible:t.attributionsCollapsible});this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null;this.tileClass=void 0!==t.tileClass?t.tileClass:cb;this.tileCacheForProjection={};this.tileGridForProjection={};this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold;this.renderReprojectionEdges_=!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var n in this.tileCacheForProjection)if(this.tileCacheForProjection[n].canExpireCache())return!0;return!1},t.prototype.expireCache=function(n,t){var r=this.getTileCacheForProjection(n),u,i;for(u in this.tileCache.expireCache(this.tileCache==r?t:{}),this.tileCacheForProjection)i=this.tileCacheForProjection[u],i.expireCache(i==r?t:{})},t.prototype.getGutterForProjection=function(n){return this.getProjection()&&n&&!hu(this.getProjection(),n)?0:this.getGutter()},t.prototype.getGutter=function(){return 0},t.prototype.getOpaque=function(t){return!(this.getProjection()&&t&&!hu(this.getProjection(),t))&&n.prototype.getOpaque.call(this,t)},t.prototype.getTileGridForProjection=function(n){var i=this.getProjection(),t;return!this.tileGrid||i&&!hu(i,n)?(t=y(n),t in this.tileGridForProjection||(this.tileGridForProjection[t]=ght(n)),this.tileGridForProjection[t]):this.tileGrid},t.prototype.getTileCacheForProjection=function(n){var i=this.getProjection(),t;return!i||hu(i,n)?this.tileCache:(t=y(n),t in this.tileCacheForProjection||(this.tileCacheForProjection[t]=new itt(this.tileCache.highWaterMark)),this.tileCacheForProjection[t])},t.prototype.createTile_=function(n,t,i,r,u,f){var h=[n,t,i],l=this.getTileCoordForTileUrlFunction(h,u),e=l?this.tileUrlFunction(l,r,u):void 0,s=new this.tileClass(h,void 0!==e?c.IDLE:c.EMPTY,void 0!==e?e:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return s.key=f,o(s,a.CHANGE,this.handleTileChange,this),s},t.prototype.getTile=function(n,t,i,r,u){var f=this.getProjection(),l;if(f&&u&&!hu(f,u)){var e,s=this.getTileCacheForProjection(u),c=[n,t,i],h=kht(c);if(s.containsKey(h)&&(e=s.get(h)),l=this.getKey(),e&&e.key==l)return e;var a=this.getTileGridForProjection(f),v=this.getTileGridForProjection(u),y=this.getTileCoordForTileUrlFunction(c,u),o=new gti(f,a,u,v,c,y,this.getTilePixelRatio(r),this.getGutter(),function(n,t,i,r){return this.getTileInternal(n,t,i,r,f)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return o.key=l,e?(o.interimTile=e,o.refreshInterimChain(),s.replace(h,o)):s.set(h,o),o}return this.getTileInternal(n,t,i,r,f||u)},t.prototype.getTileInternal=function(n,t,i,r,u){var f=null,e=ss(n,t,i),s=this.getKey(),o;return this.tileCache.containsKey(e)?(f=this.tileCache.get(e)).key!=s&&(o=f,f=this.createTile_(n,t,i,r,u,s),f.interimTile=o.getState()==c.IDLE?o.interimTile:o,f.refreshInterimChain(),this.tileCache.replace(e,f)):(f=this.createTile_(n,t,i,r,u,s),this.tileCache.set(e,f)),f},t.prototype.setRenderReprojectionEdges=function(n){if(this.renderReprojectionEdges_!=n){for(var t in this.renderReprojectionEdges_=n,this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}},t.prototype.setTileGridForProjection=function(n,t){var r=w(n),i;r&&(i=y(r),i in this.tileGridForProjection||(this.tileGridForProjection[i]=t))},t}(pct),uii=function(n){function t(t){var i=void 0!==t.hidpi&&t.hidpi;n.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:w("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:pi.LOADING,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:i?2:1,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition});this.hidpi_=i;this.culture_=void 0!==t.culture?t.culture:"en-us";this.maxZoom_=void 0!==t.maxZoom?t.maxZoom:-1;this.apiKey_=t.key;this.imagerySet_=t.imagerySet;pb("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_,this.handleImageryMetadataResponse.bind(this),void 0,"jsonp")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getApiKey=function(){return this.apiKey_},t.prototype.getImagerySet=function(){return this.imagerySet_},t.prototype.handleImageryMetadataResponse=function(n){var r,u,f;if(200==n.statusCode&&"OK"==n.statusDescription&&"ValidCredentials"==n.authenticationResultCode&&1==n.resourceSets.length&&1==n.resourceSets[0].resources.length){var t=n.resourceSets[0].resources[0],e=-1==this.maxZoom_?t.zoomMax:this.maxZoom_,o=uc(this.getProjection()),i=this.hidpi_?2:1,s=t.imageWidth==t.imageHeight?t.imageWidth/i:[t.imageWidth/i,t.imageHeight/i],h=pl({extent:o,minZoom:t.zoomMin,maxZoom:e,tileSize:s});this.tileGrid=h;r=this.culture_;u=this.hidpi_;(this.tileUrlFunction=iy(t.imageUrlSubdomains.map(function(n){var i=[0,0,0],f=t.imageUrl.replace("{subdomain}",n).replace("{culture}",r);return function(n){if(n){ntt(n[0],n[1],-n[2]-1,i);var t=f;return u&&(t+="&dpi=d1&device=mobile"),t.replace("{quadkey}",function(n){for(var i,r=n[0],f=new Array(r),u=1<<r-1,t=0;t<r;++t)i=48,n[1]&u&&(i+=1),n[2]&u&&(i+=2),f[t]=String.fromCharCode(i),u>>=1;return f.join("")}(i))}}})),t.imageryProviders)&&(f=wo(w("EPSG:4326"),this.getProjection()),this.setAttributions(function(n){var i=[],r=n.viewState,u=this.getTileGrid().getTileCoordForCoordAndResolution(r.center,r.resolution)[0];return t.imageryProviders.map(function(t){for(var e,r,s=!1,h=t.coverageAreas,o=0,c=h.length;o<c;++o)if(e=h[o],u>=e.zoomMin&&u<=e.zoomMax&&(r=e.bbox,dt(la([r[1],r[0],r[3],r[2]],f),n.extent))){s=!0;break}s&&i.push(t.attribution)}),i.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html">Terms of Use<\/a>'),i}.bind(this)));this.setState(pi.READY)}else this.setState(pi.ERROR)},t}(cs),bb=function(n){function t(t){var i=t||{},r=void 0!==i.projection?i.projection:"EPSG:3857",u=void 0!==i.tileGrid?i.tileGrid:pl({extent:uc(r),maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});n.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:i.opaque,projection:r,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:u,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(cs),fii=function(n){function t(t){n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,wrapX:t.wrapX});this.account_=t.account;this.mapId_=t.map||"";this.config_=t.config||{};this.templateCache_={};this.initializeMap_()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getConfig=function(){return this.config_},t.prototype.updateConfig=function(n){nt(this.config_,n);this.initializeMap_()},t.prototype.setConfig=function(n){this.config_=n||{};this.initializeMap_()},t.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_),i,n;this.templateCache_[t]?this.applyTemplate_(this.templateCache_[t]):(i="https://"+this.account_+".carto.com/api/v1/map",this.mapId_&&(i+="/named/"+this.mapId_),n=new XMLHttpRequest,n.addEventListener("load",this.handleInitResponse_.bind(this,t)),n.addEventListener("error",this.handleInitError_.bind(this)),n.open("POST",i),n.setRequestHeader("Content-type","application/json"),n.send(JSON.stringify(this.config_)))},t.prototype.handleInitResponse_=function(n,t){var i=t.target,r;if(!i.status||i.status>=200&&i.status<300){try{r=JSON.parse(i.responseText)}catch(n){return void this.setState(pi.ERROR)}this.applyTemplate_(r);this.templateCache_[n]=r;this.setState(pi.READY)}else this.setState(pi.ERROR)},t.prototype.handleInitError_=function(){this.setState(pi.ERROR)},t.prototype.applyTemplate_=function(n){var t="https://"+n.cdn_url.https+"/"+this.account_+"/api/v1/map/"+n.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(t)},t}(bb),fe={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature"},ry=function(n){function t(t,i){n.call(this,t);this.feature=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),ec=function(n){function t(t){var i=t||{},r,u,f;n.call(this,{attributions:i.attributions,projection:void 0,state:pi.READY,wrapX:void 0===i.wrapX||i.wrapX});this.loader_=wf;this.format_=i.format;this.overlaps_=void 0==i.overlaps||i.overlaps;this.url_=i.url;void 0!==i.loader?this.loader_=i.loader:void 0!==this.url_&&(g(this.format_,7),this.loader_=uct(this.url_,this.format_));this.strategy_=void 0!==i.strategy?i.strategy:fct;f=void 0===i.useSpatialIndex||i.useSpatialIndex;this.featuresRtree_=f?new ic:null;this.loadedExtentsRtree_=new ic;this.nullGeometryFeatures_={};this.idIndex_={};this.undefIdIndex_={};this.featureChangeKeys_={};this.featuresCollection_=null;Array.isArray(i.features)?u=i.features:i.features&&(u=(r=i.features).getArray());f||void 0!==r||(r=new er(u));void 0!==u&&this.addFeaturesInternal(u);void 0!==r&&this.bindFeaturesCollection_(r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.addFeature=function(n){this.addFeatureInternal(n);this.changed()},t.prototype.addFeatureInternal=function(n){var t=y(n),i,r;this.addToIndex_(t,n)&&(this.setupChangeEvents_(t,n),i=n.getGeometry(),i?(r=i.getExtent(),this.featuresRtree_&&this.featuresRtree_.insert(r,n)):this.nullGeometryFeatures_[t]=n,this.dispatchEvent(new ry(fe.ADDFEATURE,n)))},t.prototype.setupChangeEvents_=function(n,t){this.featureChangeKeys_[n]=[o(t,a.CHANGE,this.handleFeatureChange_,this),o(t,gs,this.handleFeatureChange_,this)]},t.prototype.addToIndex_=function(n,t){var r=!0,i=t.getId();return void 0!==i?i.toString()in this.idIndex_?r=!1:this.idIndex_[i.toString()]=t:(g(!(n in this.undefIdIndex_),30),this.undefIdIndex_[n]=t),r},t.prototype.addFeatures=function(n){this.addFeaturesInternal(n);this.changed()},t.prototype.addFeaturesInternal=function(n){for(var r,l,u,a,t,o,s,v,f,p,h=[],i=[],c=[],e=0,w=n.length;e<w;e++)r=n[e],l=y(r),this.addToIndex_(l,r)&&i.push(r);for(u=0,a=i.length;u<a;u++)t=i[u],o=y(t),this.setupChangeEvents_(o,t),s=t.getGeometry(),s?(v=s.getExtent(),h.push(v),c.push(t)):this.nullGeometryFeatures_[o]=t;for(this.featuresRtree_&&this.featuresRtree_.load(h,c),f=0,p=i.length;f<p;f++)this.dispatchEvent(new ry(fe.ADDFEATURE,i[f]))},t.prototype.bindFeaturesCollection_=function(n){var t=!1;o(this,fe.ADDFEATURE,function(i){t||(t=!0,n.push(i.feature),t=!1)});o(this,fe.REMOVEFEATURE,function(i){t||(t=!0,n.remove(i.feature),t=!1)});o(n,ki.ADD,function(n){t||(t=!0,this.addFeature(n.element),t=!1)},this);o(n,ki.REMOVE,function(n){t||(t=!0,this.removeFeature(n.element),t=!1)},this);this.featuresCollection_=n},t.prototype.clear=function(n){var t,i,r;if(n){for(t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(lt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.undefIdIndex_={})}else if(this.featuresRtree_)for(i in this.featuresRtree_.forEach(this.removeFeatureInternal,this),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear();this.featuresRtree_&&this.featuresRtree_.clear();this.loadedExtentsRtree_.clear();this.nullGeometryFeatures_={};r=new ry(fe.CLEAR);this.dispatchEvent(r);this.changed()},t.prototype.forEachFeature=function(n){if(this.featuresRtree_)return this.featuresRtree_.forEach(n);this.featuresCollection_&&this.featuresCollection_.forEach(n)},t.prototype.forEachFeatureAtCoordinateDirect=function(n,t){var i=[n[0],n[1],n[0],n[1]];return this.forEachFeatureInExtent(i,function(i){if(i.getGeometry().intersectsCoordinate(n))return t(i)})},t.prototype.forEachFeatureInExtent=function(n,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(n,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},t.prototype.forEachFeatureIntersectingExtent=function(n,t){return this.forEachFeatureInExtent(n,function(i){if(i.getGeometry().intersectsExtent(n)){var r=t(i);if(r)return r}})},t.prototype.getFeaturesCollection=function(){return this.featuresCollection_},t.prototype.getFeatures=function(){var n;return this.featuresCollection_?n=this.featuresCollection_.getArray():this.featuresRtree_&&(n=this.featuresRtree_.getAll(),wu(this.nullGeometryFeatures_)||pt(n,wk(this.nullGeometryFeatures_))),n},t.prototype.getFeaturesAtCoordinate=function(n){var t=[];return this.forEachFeatureAtCoordinateDirect(n,function(n){t.push(n)}),t},t.prototype.getFeaturesInExtent=function(n){return this.featuresRtree_.getInExtent(n)},t.prototype.getClosestFeatureToCoordinate=function(n,t){var u=n[0],f=n[1],e=null,o=[NaN,NaN],r=1/0,i=[-1/0,-1/0,1/0,1/0],s=t||bu;return this.featuresRtree_.forEachInExtent(i,function(n){var h,c,t;s(n)&&(h=n.getGeometry(),c=r,(r=h.closestPointXY(u,f,o,r))<c&&(e=n,t=Math.sqrt(r),i[0]=u-t,i[1]=f-t,i[2]=u+t,i[3]=f+t))}),e},t.prototype.getExtent=function(n){return this.featuresRtree_.getExtent(n)},t.prototype.getFeatureById=function(n){var t=this.idIndex_[n.toString()];return void 0!==t?t:null},t.prototype.getFormat=function(){return this.format_},t.prototype.getOverlaps=function(){return this.overlaps_},t.prototype.getUrl=function(){return this.url_},t.prototype.handleFeatureChange_=function(n){var t=n.target,i=y(t),e=t.getGeometry(),u,f,r;e?(u=e.getExtent(),i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(u,t)):this.featuresRtree_&&this.featuresRtree_.update(u,t)):i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[i]=t);f=t.getId();void 0!==f?(r=f.toString(),i in this.undefIdIndex_?(delete this.undefIdIndex_[i],this.idIndex_[r]=t):this.idIndex_[r]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[r]=t)):i in this.undefIdIndex_||(this.removeFromIdIndex_(t),this.undefIdIndex_[i]=t);this.changed();this.dispatchEvent(new ry(fe.CHANGEFEATURE,t))},t.prototype.hasFeature=function(n){var t=n.getId();return void 0!==t?t in this.idIndex_:y(n)in this.undefIdIndex_},t.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&wu(this.nullGeometryFeatures_)},t.prototype.loadFeatures=function(n,t,i){var r=this,f=this.loadedExtentsRtree_,e=this.strategy_(n,t);this.loading=!1;for(var o=function(n){var u=e[n];f.forEachInExtent(u,function(n){return lr(n.extent,u)})||(r.loader_.call(r,u,t,i),f.insert(u,{extent:u.slice()}),r.loading=r.loader_!==wf)},u=0,s=e.length;u<s;++u)o(u)},t.prototype.removeLoadedExtent=function(n){var t,i=this.loadedExtentsRtree_;i.forEachInExtent(n,function(i){if(oe(i.extent,n))return t=i,!0});t&&i.remove(t)},t.prototype.removeFeature=function(n){var t=y(n);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(n);this.removeFeatureInternal(n);this.changed()},t.prototype.removeFeatureInternal=function(n){var t=y(n),i;this.featureChangeKeys_[t].forEach(lt);delete this.featureChangeKeys_[t];i=n.getId();void 0!==i?delete this.idIndex_[i.toString()]:delete this.undefIdIndex_[t];this.dispatchEvent(new ry(fe.REMOVEFEATURE,n))},t.prototype.removeFromIdIndex_=function(n){var i=!1,t;for(t in this.idIndex_)if(this.idIndex_[t]===n){delete this.idIndex_[t];i=!0;break}return i},t.prototype.setLoader=function(n){this.loader_=n},t}(lb),eii=function(n){function t(t){n.call(this,{attributions:t.attributions,wrapX:t.wrapX});this.resolution=void 0;this.distance=void 0!==t.distance?t.distance:20;this.features=[];this.geometryFunction=t.geometryFunction||function(n){var t=n.getGeometry();return g(t.getType()==f.POINT,10),t};this.source=t.source;o(this.source,a.CHANGE,this.refresh,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDistance=function(){return this.distance},t.prototype.getSource=function(){return this.source},t.prototype.loadFeatures=function(n,t,i){this.source.loadFeatures(n,t,i);t!==this.resolution&&(this.clear(),this.resolution=t,this.cluster(),this.addFeatures(this.features))},t.prototype.setDistance=function(n){this.distance=n;this.refresh()},t.prototype.refresh=function(){this.clear();this.cluster();this.addFeatures(this.features);n.prototype.refresh.call(this)},t.prototype.cluster=function(){var u,f,t;if(void 0!==this.resolution){this.features.length=0;for(var n=[1/0,1/0,-1/0,-1/0],o=this.distance*this.resolution,e=this.source.getFeatures(),i={},r=0,s=e.length;r<s;r++)u=e[r],y(u)in i||(f=this.geometryFunction(u),f&&(uh(f.getCoordinates(),n),ff(n,o,n),t=this.source.getFeaturesInExtent(n),t=t.filter(function(n){var t=y(n);return!(t in i)&&(i[t]=!0,!0)}),this.features.push(this.createCluster(t))))}},t.prototype.createCluster=function(n){for(var r,u,i=[0,0],t=n.length-1;t>=0;--t)r=this.geometryFunction(n[t]),r?ka(i,r.getCoordinates()):n.splice(t,1);return gd(i,1/n.length),u=new fi(new ei(i)),u.set("features",n),u},t}(ec),oii=function(n){function t(t,i,r,u,f,e){var h=t.getExtent(),c=i.getExtent(),l=c?of(r,c):r,a=wb(t,i,su(l),u),v=new yct(t,i,l,h,a*pot),o=e(v.calculateSourceExtent(),a,f),y=ot.LOADED,s;o&&(y=ot.IDLE);s=o?o.getPixelRatio():1;n.call(this,r,u,s,y);this.targetProj_=i;this.maxSourceExtent_=h;this.triangulation_=v;this.targetResolution_=u;this.targetExtent_=r;this.sourceImage_=o;this.sourcePixelRatio_=s;this.canvas_=null;this.sourceListenerKey_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.state==ot.LOADING&&this.unlistenSource_();n.prototype.disposeInternal.call(this)},t.prototype.getImage=function(){return this.canvas_},t.prototype.getProjection=function(){return this.targetProj_},t.prototype.reproject_=function(){var n=this.sourceImage_.getState(),t,i;n==ot.LOADED&&(t=wt(this.targetExtent_)/this.targetResolution_,i=ti(this.targetExtent_)/this.targetResolution_,this.canvas_=vct(t,i,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0));this.state=n;this.changed()},t.prototype.load=function(){if(this.state==ot.IDLE){this.state=ot.LOADING;this.changed();var n=this.sourceImage_.getState();n==ot.LOADED||n==ot.ERROR?this.reproject_():(this.sourceListenerKey_=o(this.sourceImage_,a.CHANGE,function(){var n=this.sourceImage_.getState();n!=ot.LOADED&&n!=ot.ERROR||(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},t.prototype.unlistenSource_=function(){lt(this.sourceListenerKey_);this.sourceListenerKey_=null},t}(fn),sii="imageloadstart",hii="imageloadend",cii="imageloaderror",ltt=function(n){function t(t,i){n.call(this,t);this.image=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr);ls=function(n){function t(t){n.call(this,{attributions:t.attributions,projection:t.projection,state:t.state});this.resolutions_=void 0!==t.resolutions?t.resolutions:null;this.reprojectedImage_=null;this.reprojectedRevision_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.findNearestResolution=function(n){if(this.resolutions_){var t=np(this.resolutions_,n,0);n=this.resolutions_[t]}return n},t.prototype.getImage=function(n,t,i,r){var u=this.getProjection();if(u&&r&&!hu(u,r)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&hu(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==t&&oe(this.reprojectedImage_.getExtent(),n))return this.reprojectedImage_;this.reprojectedImage_.dispose();this.reprojectedImage_=null}return this.reprojectedImage_=new oii(u,r,n,t,i,function(n,t,i){return this.getImageInternal(n,t,i,u)}.bind(this)),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return u&&(r=u),this.getImageInternal(n,t,i,r)},t.prototype.getImageInternal=function(){return p()},t.prototype.handleImageChange=function(n){var t=n.target;switch(t.getState()){case ot.LOADING:this.loading=!0;this.dispatchEvent(new ltt(sii,t));break;case ot.LOADED:this.loading=!1;this.dispatchEvent(new ltt(hii,t));break;case ot.ERROR:this.loading=!1;this.dispatchEvent(new ltt(cii,t))}},t}(lb);uy=function(n){function t(t,i,r,u,f,e){n.call(this,t,i,r,ot.IDLE);this.src_=u;this.image_=new Image;null!==f&&(this.image_.crossOrigin=f);this.imageListenerKeys_=null;this.state=ot.IDLE;this.imageLoadFunction_=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getImage=function(){return this.image_},t.prototype.handleImageError_=function(){this.state=ot.ERROR;this.unlistenImage_();this.changed()},t.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=ti(this.extent)/this.image_.height);this.state=ot.LOADED;this.unlistenImage_();this.changed()},t.prototype.load=function(){this.state!=ot.IDLE&&this.state!=ot.ERROR||(this.state=ot.LOADING,this.changed(),this.imageListenerKeys_=[ee(this.image_,a.ERROR,this.handleImageError_,this),ee(this.image_,a.LOAD,this.handleImageLoad_,this)],this.imageLoadFunction_(this,this.src_))},t.prototype.setImage=function(n){this.image_=n},t.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(lt);this.imageListenerKeys_=null},t}(fn);var lii=function(n){function t(t){var i=t||{};n.call(this,{attributions:i.attributions,projection:i.projection,resolutions:i.resolutions});this.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;this.hidpi_=void 0===i.hidpi||i.hidpi;this.url_=i.url;this.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:kb;this.params_=i.params||{};this.image_=null;this.imageSize_=[0,0];this.renderedRevision_=0;this.ratio_=void 0!==i.ratio?i.ratio:1.5}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getParams=function(){return this.params_},t.prototype.getImageInternal=function(n,t,i,r){var u,h,e,s,c,l,p;if(void 0===this.url_)return null;if(t=this.findNearestResolution(t),i=this.hidpi_?i:1,u=this.image_,u&&this.renderedRevision_==this.getRevision()&&u.getResolution()==t&&u.getPixelRatio()==i&&lr(u.getExtent(),n))return u;h={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};nt(h,this.params_);e=((n=n.slice())[0]+n[2])/2;s=(n[1]+n[3])/2;1!=this.ratio_&&(c=this.ratio_*wt(n)/2,l=this.ratio_*ti(n)/2,n[0]=e-c,n[1]=s-l,n[2]=e+c,n[3]=s+l);var f=t/i,v=Math.ceil(wt(n)/f),y=Math.ceil(ti(n)/f);return n[0]=e-f*v/2,n[2]=e+f*v/2,n[1]=s-f*y/2,n[3]=s+f*y/2,this.imageSize_[0]=v,this.imageSize_[1]=y,p=this.getRequestUrl_(n,this.imageSize_,i,r,h),this.image_=new uy(n,t,i,p,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),o(this.image_,a.CHANGE,this.handleImageChange,this),this.image_},t.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},t.prototype.getRequestUrl_=function(n,t,i,r,u){var o=r.getCode().split(":").pop(),f,e;return u.SIZE=t[0]+","+t[1],u.BBOX=n.join(","),u.BBOXSR=o,u.IMAGESR=o,u.DPI=Math.round(90*i),f=this.url_,e=f.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),e==f&&g(!1,50),oc(e,u)},t.prototype.getUrl=function(){return this.url_},t.prototype.setImageLoadFunction=function(n){this.image_=null;this.imageLoadFunction_=n;this.changed()},t.prototype.setUrl=function(n){n!=this.url_&&(this.url_=n,this.image_=null,this.changed())},t.prototype.updateParams=function(n){nt(this.params_,n);this.image_=null;this.changed()},t}(ls),aii=function(n){function t(t){var i=t||{};n.call(this,{attributions:i.attributions,projection:i.projection,resolutions:i.resolutions,state:i.state});this.canvasFunction_=i.canvasFunction;this.canvas_=null;this.renderedRevision_=0;this.ratio_=void 0!==i.ratio?i.ratio:1.5}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getImageInternal=function(n,t,i,r){var u,e,f;return(t=this.findNearestResolution(t),u=this.canvas_,u&&this.renderedRevision_==this.getRevision()&&u.getResolution()==t&&u.getPixelRatio()==i&&lr(u.getExtent(),n))?u:(fp(n=n.slice(),this.ratio_),e=[wt(n)/t*i,ti(n)/t*i],f=this.canvasFunction_.call(this,n,t,i,e,r),f&&(u=new en(n,t,i,f)),this.canvas_=u,this.renderedRevision_=this.getRevision(),u)},t}(ls),vii=function(n){function t(t){n.call(this,{projection:t.projection,resolutions:t.resolutions});this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;this.displayDpi_=void 0!==t.displayDpi?t.displayDpi:96;this.params_=t.params||{};this.url_=t.url;this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:kb;this.hidpi_=void 0===t.hidpi||t.hidpi;this.metersPerUnit_=void 0!==t.metersPerUnit?t.metersPerUnit:1;this.ratio_=void 0!==t.ratio?t.ratio:1;this.useOverlay_=void 0!==t.useOverlay&&t.useOverlay;this.image_=null;this.renderedRevision_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getParams=function(){return this.params_},t.prototype.getImageInternal=function(n,t,i,r){var u,f,e;return(t=this.findNearestResolution(t),i=this.hidpi_?i:1,u=this.image_,u&&this.renderedRevision_==this.getRevision()&&u.getResolution()==t&&u.getPixelRatio()==i&&lr(u.getExtent(),n))?u:(1!=this.ratio_&&fp(n=n.slice(),this.ratio_),f=[wt(n)/t*i,ti(n)/t*i],void 0!==this.url_?(e=this.getUrl(this.url_,this.params_,n,f,r),o(u=new uy(n,t,i,e,this.crossOrigin_,this.imageLoadFunction_),a.CHANGE,this.handleImageChange,this)):u=null,this.image_=u,this.renderedRevision_=this.getRevision(),u)},t.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},t.prototype.updateParams=function(n){nt(this.params_,n);this.changed()},t.prototype.getUrl=function(n,t,i,r){var e=function(n,t,i,r){var u=wt(n),f=ti(n),e=t[0],o=t[1],s=.0254/r;return o*u>e*f?u*i/(e*s):f*i/(o*s)}(i,r,this.metersPerUnit_,this.displayDpi_),u=su(i),f={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:e,SETVIEWCENTERX:u[0],SETVIEWCENTERY:u[1]};return nt(f,t),oc(n,f)},t.prototype.setImageLoadFunction=function(n){this.image_=null;this.imageLoadFunction_=n;this.changed()},t}(ls),yii=function(n){function t(t){var i=void 0!==t.crossOrigin?t.crossOrigin:null,r=void 0!==t.imageLoadFunction?t.imageLoadFunction:kb;n.call(this,{attributions:t.attributions,projection:w(t.projection)});this.url_=t.url;this.imageExtent_=t.imageExtent;this.image_=new uy(this.imageExtent_,void 0,1,this.url_,i,r);this.imageSize_=t.imageSize?t.imageSize:null;o(this.image_,a.CHANGE,this.handleImageChange,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getImageExtent=function(){return this.imageExtent_},t.prototype.getImageInternal=function(n){return dt(n,this.image_.getExtent())?this.image_:null},t.prototype.getUrl=function(){return this.url_},t.prototype.handleImageChange=function(t){var r,i,e,u,h,o,s,f;this.image_.getState()==ot.LOADED&&(e=this.image_.getExtent(),u=this.image_.getImage(),this.imageSize_?(r=this.imageSize_[0],i=this.imageSize_[1]):(r=u.width,i=u.height),h=ti(e)/i,o=Math.ceil(wt(e)/h),o!=r&&(s=kt(o,i),f=s.canvas,s.drawImage(u,0,0,r,i,0,0,f.width,f.height),this.image_.setImage(f)));n.prototype.handleImageChange.call(this,t)},t}(ls),kl="1.3.0",wct="carmentaserver",bct="geoserver",kct="mapserver",dct="qgis",gct=[101,101],pii=function(n){function t(t){var i=t||{};n.call(this,{attributions:i.attributions,projection:i.projection,resolutions:i.resolutions});this.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;this.url_=i.url;this.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:kb;this.params_=i.params||{};this.v13_=!0;this.updateV13_();this.serverType_=i.serverType;this.hidpi_=void 0===i.hidpi||i.hidpi;this.image_=null;this.imageSize_=[0,0];this.renderedRevision_=0;this.ratio_=void 0!==i.ratio?i.ratio:1.5}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getGetFeatureInfoUrl=function(n,t,i,r){var f,u,o,e,s,h;if(void 0!==this.url_)return f=w(i),u=this.getProjection(),u&&u!==f&&(t=wb(u,f,n,t),n=dc(n,f,u)),o=ca(n,t,0,gct),e={SERVICE:"WMS",VERSION:kl,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS},nt(e,this.params_,r),s=Math.floor((n[0]-o[0])/t),h=Math.floor((o[3]-n[1])/t),e[this.v13_?"I":"X"]=s,e[this.v13_?"J":"Y"]=h,this.getRequestUrl_(o,gct,1,u||f,e)},t.prototype.getParams=function(){return this.params_},t.prototype.getImageInternal=function(n,t,i,r){var s,c;if(void 0===this.url_)return null;t=this.findNearestResolution(t);1==i||this.hidpi_&&void 0!==this.serverType_||(i=1);var u=t/i,h=su(n),l=ca(h,u,0,[Math.ceil(wt(n)/u),Math.ceil(ti(n)/u)]),e=ca(h,u,0,[Math.ceil(this.ratio_*wt(n)/u),Math.ceil(this.ratio_*ti(n)/u)]),f=this.image_;return f&&this.renderedRevision_==this.getRevision()&&f.getResolution()==t&&f.getPixelRatio()==i&&lr(f.getExtent(),l)?f:(s={SERVICE:"WMS",VERSION:kl,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0},nt(s,this.params_),this.imageSize_[0]=Math.round(wt(e)/u),this.imageSize_[1]=Math.round(ti(e)/u),c=this.getRequestUrl_(e,this.imageSize_,i,r,s),this.image_=new uy(e,t,i,c,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),o(this.image_,a.CHANGE,this.handleImageChange,this),this.image_)},t.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},t.prototype.getRequestUrl_=function(n,t,i,r,u){var f,e,o;if(g(void 0!==this.url_,9),u[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(u.STYLES=""),1!=i)switch(this.serverType_){case bct:f=90*i+.5|0;"FORMAT_OPTIONS"in u?u.FORMAT_OPTIONS+=";dpi:"+f:u.FORMAT_OPTIONS="dpi:"+f;break;case kct:u.MAP_RESOLUTION=90*i;break;case wct:case dct:u.DPI=90*i;break;default:g(!1,8)}return u.WIDTH=t[0],u.HEIGHT=t[1],o=r.getAxisOrientation(),e=this.v13_&&"ne"==o.substr(0,2)?[n[1],n[0],n[3],n[2]]:n,u.BBOX=e.join(","),oc(this.url_,u)},t.prototype.getUrl=function(){return this.url_},t.prototype.setImageLoadFunction=function(n){this.image_=null;this.imageLoadFunction_=n;this.changed()},t.prototype.setUrl=function(n){n!=this.url_&&(this.url_=n,this.image_=null,this.changed())},t.prototype.updateParams=function(n){nt(this.params_,n);this.updateV13_();this.image_=null;this.changed()},t.prototype.updateV13_=function(){var n=this.params_.VERSION||kl;this.v13_=pft(n,"1.3")>=0},t}(ls),att='&#169; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap<\/a> contributors.',wii=function(n){function t(t){var r,i=t||{},u,f;r=void 0!==i.attributions?i.attributions:[att];u=void 0!==i.crossOrigin?i.crossOrigin:"anonymous";f=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";n.call(this,{attributions:r,cacheSize:i.cacheSize,crossOrigin:u,opaque:void 0===i.opaque||i.opaque,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,url:f,wrapX:i.wrapX,attributionsCollapsible:!1})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(bb),bii=i(2),nlt=function(n){function t(t){var i=t||{};n.call(this,i);this.type=kr.IMAGE}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(lw);nlt.prototype.getSource;var tlt=nlt,db="preload",gb="useInterimTilesOnError",ilt=function(n){function t(t){var i=t||{},r=nt({},i);delete r.preload;delete r.useInterimTilesOnError;n.call(this,r);this.setPreload(void 0!==i.preload?i.preload:0);this.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError);this.type=kr.TILE}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getPreload=function(){return this.get(db)},t.prototype.setPreload=function(n){this.set(db,n)},t.prototype.getUseInterimTilesOnError=function(){return this.get(gb)},t.prototype.setUseInterimTilesOnError=function(n){this.set(gb,n)},t}(lw);ilt.prototype.getSource;var rlt=ilt,kii="beforeoperations",dii="afteroperations",ult={PIXEL:"pixel",IMAGE:"image"},flt=function(n){function t(t,i,r){n.call(this,t);this.extent=i.extent;this.resolution=i.viewState.resolution/i.pixelRatio;this.data=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),sc=null;var tri=function(n){function t(t){var i,f;for(n.call(this,{projection:null}),this.worker_=null,this.operationType_=void 0!==t.operationType?t.operationType:ult.PIXEL,this.threads_=void 0!==t.threads?t.threads:1,this.renderers_=function(n){for(var i=n.length,r=new Array(i),t=0;t<i;++t)r[t]=nri(n[t]);return r}(t.sources),i=0,f=this.renderers_.length;i<f;++i)o(this.renderers_[i],a.CHANGE,this.changed,this);this.tileQueue_=new vet(function(){return 1},this.changed.bind(this));for(var r=function(n){return n.map(function(n){return n.getLayer().getLayerState()})}(this.renderers_),e={},u=0,s=r.length;u<s;++u)e[y(r[u].layer)]=r[u];this.requestedFrameState_;this.renderedImageCanvas_=null;this.renderedRevision_;this.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],extent:null,focus:null,index:0,layerStates:e,layerStatesArray:r,pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],skippedFeatureUids:{},tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}};void 0!==t.operation&&this.setOperation(t.operation,t.lib)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setOperation=function(n,t){this.worker_=new bii.Processor({operation:n,imageOps:this.operationType_===ult.IMAGE,queue:1,lib:t,threads:this.threads_});this.changed()},t.prototype.updateFrameState_=function(n,t,i){var r=nt({},this.frameState_),f,u;return r.viewState=nt({},r.viewState),f=su(n),r.extent=n.slice(),r.focus=f,r.size[0]=Math.round(wt(n)/t),r.size[1]=Math.round(ti(n)/t),r.time=Date.now(),r.animate=!1,u=r.viewState,u.center=f,u.projection=i,u.resolution=t,r},t.prototype.allSourcesReady_=function(){for(var t=!0,n=0,i=this.renderers_.length;n<i;++n)if(this.renderers_[n].getLayer().getSource().getState()!==pi.READY){t=!1;break}return t},t.prototype.getImage=function(n,t,i,r){var u,f,e;return this.allSourcesReady_()?(u=this.updateFrameState_(n,t,r),(this.requestedFrameState_=u,this.renderedImageCanvas_)&&(f=this.renderedImageCanvas_.getResolution(),e=this.renderedImageCanvas_.getExtent(),t===f&&oe(n,e)||(this.renderedImageCanvas_=null)),this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),u.tileQueue.loadMoreTiles(16,16),u.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_):null},t.prototype.processSources_=function(){for(var i,r,t=this.requestedFrameState_,u=this.renderers_.length,f=new Array(u),n=0;n<u;++n){if(i=gii(this.renderers_[n],t,t.layerStatesArray[n]),!i)return;f[n]=i}r={};this.dispatchEvent(new flt(kii,t,r));this.worker_.process(f,r,this.onWorkerComplete_.bind(this,t))},t.prototype.onWorkerComplete_=function(n,t,i,r){var u,f,e;!t&&i&&(u=n.extent,f=n.viewState.resolution,f===this.requestedFrameState_.viewState.resolution&&oe(u,this.requestedFrameState_.extent)&&(this.renderedImageCanvas_?e=this.renderedImageCanvas_.getImage().getContext("2d"):(e=kt(Math.round(wt(u)/f),Math.round(ti(u)/f)),this.renderedImageCanvas_=new en(u,f,1,e.canvas)),e.putImageData(i,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new flt(dii,n,r))))},t.prototype.getImageInternal=function(){return null},t}(ls),iri=['Map tiles by <a href="https://stamen.com/">Stamen Design<\/a>, under <a href="https://creativecommons.org/licenses/by/3.0/">CC BY 3.0<\/a>.',att],rri={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},uri={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}},fri=function(n){function t(t){var i=t.layer.indexOf("-"),f=-1==i?t.layer:t.layer.slice(0,i),r=uri[f],u=rri[t.layer],e=void 0!==t.url?t.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+t.layer+"/{z}/{x}/{y}."+u.extension;n.call(this,{attributions:iri,cacheSize:t.cacheSize,crossOrigin:"anonymous",maxZoom:void 0!=t.maxZoom?t.maxZoom:r.maxZoom,minZoom:void 0!=t.minZoom?t.minZoom:r.minZoom,opaque:u.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,url:e,wrapX:t.wrapX})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(bb);var ori=function(n){function t(t){var i=t||{};n.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,tileUrlFunction:eri,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition});this.params_=i.params||{};this.tmpExtent_=[1/0,1/0,-1/0,-1/0];this.setKey(this.getKeyForParams_())}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getKeyForParams_=function(){var i=0,t=[],n;for(n in this.params_)t[i++]=n+"-"+this.params_[n];return t.join("/")},t.prototype.getParams=function(){return this.params_},t.prototype.getRequestUrl_=function(n,t,i,r,u,f){var e=this.urls,s,o;if(e)return o=u.getCode().split(":").pop(),s=(f.SIZE=t[0]+","+t[1],f.BBOX=i.join(","),f.BBOXSR=o,f.IMAGESR=o,f.DPI=Math.round(f.DPI?f.DPI*r:90*r),1==e.length)?e[0]:e[df(ttt(n),e.length)],oc(s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),f)},t.prototype.getTilePixelRatio=function(n){return n},t.prototype.updateParams=function(n){nt(this.params_,n);this.setKey(this.getKeyForParams_())},t}(cs),sri=function(n){function t(t,i,r){n.call(this,t,c.LOADED);this.tileSize_=i;this.text_=r;this.canvas_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getImage=function(){if(this.canvas_)return this.canvas_;var t=this.tileSize_,n=kt(t[0],t[1]);return n.strokeStyle="black",n.strokeRect(.5,.5,t[0]+.5,t[1]+.5),n.fillStyle="black",n.textAlign="center",n.textBaseline="middle",n.font="24px sans-serif",n.fillText(this.text_,t[0]/2,t[1]/2),this.canvas_=n.canvas,n.canvas},t.prototype.load=function(){},t}(vl),hri=function(n){function t(t){n.call(this,{opaque:!1,projection:t.projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getTile=function(n,t,i){var r=ss(n,t,i);if(this.tileCache.containsKey(r))return this.tileCache.get(r);var o=ru(this.tileGrid.getTileSize(n)),u=[n,t,i],f=this.getTileCoordForTileUrlFunction(u),s=f?this.getTileCoordForTileUrlFunction(f).toString():"",e=new sri(u,o,s);return this.tileCache.set(r,e),e},t}(gv),cri=function(n){function t(t){if(n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:w("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:pi.LOADING,tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition}),this.tileJSON_=null,t.url)if(t.jsonp)pb(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{var i=new XMLHttpRequest;i.addEventListener("load",this.onXHRLoad_.bind(this));i.addEventListener("error",this.onXHRError_.bind(this));i.open("GET",t.url);i.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):g(!1,51)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.onXHRLoad_=function(n){var t=n.target,i;if(!t.status||t.status>=200&&t.status<300){try{i=JSON.parse(t.responseText)}catch(n){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},t.prototype.onXHRError_=function(){this.handleTileJSONError()},t.prototype.getTileJSON=function(){return this.tileJSON_},t.prototype.handleTileJSONResponse=function(n){var t,i=w("EPSG:4326"),r=this.getProjection(),u,e;void 0!==n.bounds&&(u=wo(i,r),t=la(n.bounds,u));var o=n.minzoom||0,s=n.maxzoom||22,f=pl({extent:uc(r),maxZoom:s,minZoom:o});(this.tileGrid=f,this.tileUrlFunction=ott(n.tiles,f),void 0===n.attribution||this.getAttributions())||(e=void 0!==t?t:i.getExtent(),this.setAttributions(function(t){return dt(e,t.extent)?[n.attribution]:null}));this.tileJSON_=n;this.setState(pi.READY)},t.prototype.handleTileJSONError=function(){this.setState(pi.ERROR)},t}(cs);var ari=function(n){function t(t){var i=t||{},r=i.params||{},u=!("TRANSPARENT"in r)||r.TRANSPARENT;n.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:!u,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,tileUrlFunction:lri,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition});this.gutter_=void 0!==i.gutter?i.gutter:0;this.params_=r;this.v13_=!0;this.serverType_=i.serverType;this.hidpi_=void 0===i.hidpi||i.hidpi;this.tmpExtent_=[1/0,1/0,-1/0,-1/0];this.updateV13_();this.setKey(this.getKeyForParams_())}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getGetFeatureInfoUrl=function(n,t,i,r){var e=w(i),o=this.getProjection(),f=this.getTileGrid(),s,c,v,y;if(f||(f=this.getTileGridForProjection(e)),s=f.getTileCoordForCoordAndResolution(n,t),!(f.getResolutions().length<=s[0])){var h=f.getResolution(s[0]),u=f.getTileCoordExtent(s,this.tmpExtent_),l=ru(f.getTileSize(s[0]),this.tmpSize),a=this.gutter_;return 0!==a&&(l=ket(l,a,this.tmpSize),u=ff(u,h*a,u)),o&&o!==e&&(h=wb(o,e,n,h),u=bo(u,e,o),n=dc(n,e,o)),c={SERVICE:"WMS",VERSION:kl,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS},nt(c,this.params_,r),v=Math.floor((n[0]-u[0])/h),y=Math.floor((u[3]-n[1])/h),c[this.v13_?"I":"X"]=v,c[this.v13_?"J":"Y"]=y,this.getRequestUrl_(s,l,u,1,o||e,c)}},t.prototype.getGutter=function(){return this.gutter_},t.prototype.getParams=function(){return this.params_},t.prototype.getRequestUrl_=function(n,t,i,r,u,f){var o=this.urls,h,s,c,l,e;if(o){if(f.WIDTH=t[0],f.HEIGHT=t[1],f[this.v13_?"CRS":"SRS"]=u.getCode(),"STYLES"in this.params_||(f.STYLES=""),1!=r)switch(this.serverType_){case bct:h=90*r+.5|0;"FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+=";dpi:"+h:f.FORMAT_OPTIONS="dpi:"+h;break;case kct:f.MAP_RESOLUTION=90*r;break;case wct:case dct:f.DPI=90*r;break;default:g(!1,52)}return l=u.getAxisOrientation(),e=i,this.v13_&&"ne"==l.substr(0,2)&&(s=i[0],e[0]=i[1],e[1]=s,s=i[2],e[2]=i[3],e[3]=s),c=(f.BBOX=e.join(","),1==o.length)?o[0]:o[df(ttt(n),o.length)],oc(c,f)}},t.prototype.getTilePixelRatio=function(n){return this.hidpi_&&void 0!==this.serverType_?n:1},t.prototype.getKeyForParams_=function(){var i=0,t=[],n;for(n in this.params_)t[i++]=n+"-"+this.params_[n];return t.join("/")},t.prototype.updateParams=function(n){nt(this.params_,n);this.updateV13_();this.setKey(this.getKeyForParams_())},t.prototype.updateV13_=function(){var n=this.params_.VERSION||kl;this.v13_=pft(n,"1.3")>=0},t}(cs),vri=function(n){function t(t,i,r,u,f,e){n.call(this,t,i);this.src_=r;this.extent_=u;this.preemptive_=f;this.grid_=null;this.keys_=null;this.data_=null;this.jsonp_=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getImage=function(){return null},t.prototype.getData=function(n){var t,u,i;if(!this.grid_||!this.keys_)return null;var f=(n[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),e=(n[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),r=this.grid_[Math.floor((1-e)*this.grid_.length)];return"string"!=typeof r?null:(t=r.charCodeAt(Math.floor(f*r.length)),t>=93&&t--,t>=35&&t--,u=null,(t-=32)in this.keys_&&(i=this.keys_[t],u=this.data_&&i in this.data_?this.data_[i]:i),u)},t.prototype.forDataAtCoordinate=function(n,t,i,r){this.state==c.IDLE&&!0===r?(ee(this,a.CHANGE,function(){t.call(i,this.getData(n))},this),this.loadInternal_()):!0===r?setTimeout(function(){t.call(i,this.getData(n))}.bind(this),0):t.call(i,this.getData(n))},t.prototype.getKey=function(){return this.src_},t.prototype.handleError_=function(){this.state=c.ERROR;this.changed()},t.prototype.handleLoad_=function(n){this.grid_=n.grid;this.keys_=n.keys;this.data_=n.data;this.state=c.EMPTY;this.changed()},t.prototype.loadInternal_=function(){if(this.state==c.IDLE)if(this.state=c.LOADING,this.jsonp_)pb(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var n=new XMLHttpRequest;n.addEventListener("load",this.onXHRLoad_.bind(this));n.addEventListener("error",this.onXHRError_.bind(this));n.open("GET",this.src_);n.send()}},t.prototype.onXHRLoad_=function(n){var t=n.target,i;if(!t.status||t.status>=200&&t.status<300){try{i=JSON.parse(t.responseText)}catch(n){return void this.handleError_()}this.handleLoad_(i)}else this.handleError_()},t.prototype.onXHRError_=function(){this.handleError_()},t.prototype.load=function(){this.preemptive_&&this.loadInternal_()},t}(vl),yri=function(n){function t(t){if(n.call(this,{projection:w("EPSG:3857"),state:pi.LOADING}),this.preemptive_=void 0===t.preemptive||t.preemptive,this.tileUrlFunction_=stt,this.template_=void 0,this.jsonp_=t.jsonp||!1,t.url)if(this.jsonp_)pb(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{var i=new XMLHttpRequest;i.addEventListener("load",this.onXHRLoad_.bind(this));i.addEventListener("error",this.onXHRError_.bind(this));i.open("GET",t.url);i.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):g(!1,51)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.onXHRLoad_=function(n){var t=n.target,i;if(!t.status||t.status>=200&&t.status<300){try{i=JSON.parse(t.responseText)}catch(n){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},t.prototype.onXHRError_=function(){this.handleTileJSONError()},t.prototype.getTemplate=function(){return this.template_},t.prototype.forDataAtCoordinateAndResolution=function(n,t,i,r){if(this.tileGrid){var u=this.tileGrid.getTileCoordForCoordAndResolution(n,t);this.getTile(u[0],u[1],u[2],1,this.getProjection()).forDataAtCoordinate(n,i,null,r)}else!0===r?setTimeout(function(){i(null)},0):i(null)},t.prototype.handleTileJSONError=function(){this.setState(pi.ERROR)},t.prototype.handleTileJSONResponse=function(n){var t,r=w("EPSG:4326"),u=this.getProjection(),f,i,o;void 0!==n.bounds&&(f=wo(r,u),t=la(n.bounds,f));var s=n.minzoom||0,h=n.maxzoom||22,e=pl({extent:uc(u),maxZoom:h,minZoom:s});this.tileGrid=e;this.template_=n.template;i=n.grids;i?((this.tileUrlFunction_=ott(i,e),void 0!==n.attribution)&&(o=void 0!==t?t:r.getExtent(),this.setAttributions(function(t){return dt(o,t.extent)?[n.attribution]:null})),this.setState(pi.READY)):this.setState(pi.ERROR)},t.prototype.getTile=function(n,t,i,r,u){var f=ss(n,t,i);if(this.tileCache.containsKey(f))return this.tileCache.get(f);var e=[n,t,i],h=this.getTileCoordForTileUrlFunction(e,u),o=this.tileUrlFunction_(h,r,u),s=new vri(e,void 0!==o?c.IDLE:c.EMPTY,void 0!==o?o:"",this.tileGrid.getTileCoordExtent(e),this.preemptive_,this.jsonp_);return this.tileCache.set(f,s),s},t.prototype.useTile=function(n,t,i){var r=ss(n,t,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},t}(gv),pri=function(n){function t(i,r,u,f,e,s,h,l,v,y,p,w,b,k,d){var tt;if(n.call(this,i,r,{transition:0}),this.context_={},this.loader_,this.replayState_={},this.sourceTiles_=y,this.tileKeys=[],this.extent=null,this.sourceRevision_=u,this.wrappedTileCoord=s,this.loadListenerKeys_=[],this.sourceTileListenerKeys_=[],s){var it=this.extent=v.getTileCoordExtent(s),g=v.getResolution(d),ut=l.getZForResolution(g),nt=d!=i[0],rt=0;if(l.forEachTileCoord(it,ut,function(n){var i=of(it,l.getTileCoordExtent(n)),s=l.getExtent(),r,t,u;(s&&(i=of(i,s,i)),wt(i)/g>=.5&&ti(i)/g>=.5)&&(++rt,r=n.toString(),t=y[r],t||nt||(u=h(n,p,w),t=y[r]=new b(n,void 0==u?c.EMPTY:c.IDLE,void 0==u?"":u,f,e),this.sourceTileListenerKeys_.push(o(t,a.CHANGE,k))),!t||nt&&t.getState()!=c.LOADED||(t.consumers++,this.tileKeys.push(r)))}.bind(this)),nt&&rt==this.tileKeys.length&&this.finishLoading_(),d<=i[0]&&this.state!=c.LOADED)for(;d>v.getMinZoom();)if(tt=new t(i,r,u,f,e,s,h,l,v,y,p,w,b,wf,--d),tt.state==c.LOADED){this.interimTile=tt;break}}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){var t,u,r,i;for(this.state=c.ABORT,this.changed(),this.interimTile&&this.interimTile.dispose(),t=0,u=this.tileKeys.length;t<u;++t)r=this.tileKeys[t],i=this.getTile(r),i.consumers--,0==i.consumers&&(delete this.sourceTiles_[r],i.dispose());this.tileKeys.length=0;this.sourceTiles_=null;this.loadListenerKeys_.forEach(lt);this.loadListenerKeys_.length=0;this.sourceTileListenerKeys_.forEach(lt);this.sourceTileListenerKeys_.length=0;n.prototype.disposeInternal.call(this)},t.prototype.getContext=function(n){var t=y(n);return t in this.context_||(this.context_[t]=kt()),this.context_[t]},t.prototype.getImage=function(n){return-1==this.getReplayState(n).renderedTileRevision?null:this.getContext(n).canvas},t.prototype.getReplayState=function(n){var t=y(n);return t in this.replayState_||(this.replayState_[t]={dirty:!1,renderedRenderOrder:null,renderedRevision:-1,renderedTileRevision:-1}),this.replayState_[t]},t.prototype.getKey=function(){return this.tileKeys.join("/")+"-"+this.sourceRevision_},t.prototype.getTile=function(n){return this.sourceTiles_[n]},t.prototype.load=function(){var n=0,t={};this.state==c.IDLE&&this.setState(c.LOADING);this.state==c.LOADING&&this.tileKeys.forEach(function(i){var r=this.getTile(i),u;(r.state==c.IDLE&&(r.setLoader(this.loader_),r.load()),r.state==c.LOADING)&&(u=o(r,a.CHANGE,function(){var i=r.getState(),u;(i==c.LOADED||i==c.ERROR)&&(u=y(r),i==c.ERROR?t[u]=!0:(--n,delete t[u]),n-Object.keys(t).length==0&&this.finishLoading_())}.bind(this)),this.loadListenerKeys_.push(u),++n)}.bind(this));n-Object.keys(t).length==0&&setTimeout(this.finishLoading_.bind(this),0)},t.prototype.finishLoading_=function(){for(var i,n=this.tileKeys.length,r=0,t=n-1;t>=0;--t)i=this.getTile(this.tileKeys[t]).getState(),i!=c.LOADED&&--n,i==c.EMPTY&&++r;n==this.tileKeys.length?(this.loadListenerKeys_.forEach(lt),this.loadListenerKeys_.length=0,this.setState(c.LOADED)):this.setState(r==this.tileKeys.length?c.EMPTY:c.ERROR)},t}(vl);var bri=[0,0,4096,4096],kri=function(n){function t(t,i,r,u,f,e){n.call(this,t,i,e);this.consumers=0;this.extent_=null;this.format_=u;this.features_=null;this.loader_;this.projection_=null;this.replayGroups_={};this.tileLoadFunction_=f;this.url_=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.features_=null;this.replayGroups_={};this.state=c.ABORT;this.changed();n.prototype.disposeInternal.call(this)},t.prototype.getExtent=function(){return this.extent_||bri},t.prototype.getFormat=function(){return this.format_},t.prototype.getFeatures=function(){return this.features_},t.prototype.getKey=function(){return this.url_},t.prototype.getProjection=function(){return this.projection_},t.prototype.getReplayGroup=function(n,t){return this.replayGroups_[y(n)+","+t]},t.prototype.load=function(){this.state==c.IDLE&&(this.setState(c.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_(null,NaN,null))},t.prototype.onLoad=function(n,t,i){this.setProjection(t);this.setFeatures(n);this.setExtent(i)},t.prototype.onError=function(){this.setState(c.ERROR)},t.prototype.setExtent=function(n){this.extent_=n},t.prototype.setFeatures=function(n){this.features_=n;this.setState(c.LOADED)},t.prototype.setProjection=function(n){this.projection_=n},t.prototype.setReplayGroup=function(n,t,i){this.replayGroups_[y(n)+","+t]=i},t.prototype.setLoader=function(n){this.loader_=n},t}(vl),dri=function(n){function t(t){var i=t.projection||"EPSG:3857",r=t.extent||uc(i),u=t.tileGrid||pl({extent:r,maxZoom:t.maxZoom||22,minZoom:t.minZoom,tileSize:t.tileSize||512});n.call(this,{attributions:t.attributions,cacheSize:void 0!==t.cacheSize?t.cacheSize:128,opaque:!1,projection:i,state:t.state,tileGrid:u,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:wri,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition});this.format_=t.format?t.format:null;this.sourceTiles_={};this.overlaps_=void 0==t.overlaps||t.overlaps;this.tileClass=t.tileClass?t.tileClass:kri;this.tileGrids_={}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getOverlaps=function(){return this.overlaps_},t.prototype.clear=function(){this.tileCache.clear();this.sourceTiles_={}},t.prototype.getTile=function(n,t,i,r,u){var f=ss(n,t,i);if(this.tileCache.containsKey(f))return this.tileCache.get(f);var e=[n,t,i],o=this.getTileCoordForTileUrlFunction(e,u),s=new pri(e,null!==o?c.IDLE:c.EMPTY,this.getRevision(),this.format_,this.tileLoadFunction,o,this.tileUrlFunction,this.tileGrid,this.getTileGridForProjection(u),this.sourceTiles_,r,u,this.tileClass,this.handleTileChange.bind(this),e[0]);return this.tileCache.set(f,s),s},t.prototype.getTileGridForProjection=function(n){var r=n.getCode(),i=this.tileGrids_[r],t;return i||(t=this.tileGrid,i=this.tileGrids_[r]=tct(n,void 0,t?t.getTileSize(t.getMinZoom()):void 0)),i},t.prototype.getTilePixelRatio=function(n){return n},t.prototype.getTilePixelSize=function(n,t,i){var r=ru(this.getTileGridForProjection(i).getTileSize(n),this.tmpSize);return[Math.round(r[0]*t),Math.round(r[1]*t)]},t}(pct),as={KVP:"KVP",REST:"REST"},gri=function(n){function t(t){var r=void 0!==t.requestEncoding?t.requestEncoding:as.KVP,u=t.tileGrid,i=t.urls;void 0===i&&void 0!==t.url&&(i=htt(t.url));n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:u,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:stt,urls:i,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition});this.version_=void 0!==t.version?t.version:"1.0.0";this.format_=void 0!==t.format?t.format:"image/jpeg";this.dimensions_=void 0!==t.dimensions?t.dimensions:{};this.layer_=t.layer;this.matrixSet_=t.matrixSet;this.style_=t.style;this.requestEncoding_=r;this.setKey(this.getKeyForDimensions_());i&&i.length>0&&(this.tileUrlFunction=iy(i.map(elt.bind(this))))}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setUrls=function(n){this.urls=n;var t=n.join("\n");this.setTileUrlFunction(iy(n.map(elt.bind(this))),t)},t.prototype.getDimensions=function(){return this.dimensions_},t.prototype.getFormat=function(){return this.format_},t.prototype.getLayer=function(){return this.layer_},t.prototype.getMatrixSet=function(){return this.matrixSet_},t.prototype.getRequestEncoding=function(){return this.requestEncoding_},t.prototype.getStyle=function(){return this.style_},t.prototype.getVersion=function(){return this.version_},t.prototype.getKeyForDimensions_=function(){var i=0,t=[],n;for(n in this.dimensions_)t[i++]=n+"-"+this.dimensions_[n];return t.join("/")},t.prototype.updateDimensions=function(n){nt(this.dimensions_,n);this.setKey(this.getKeyForDimensions_())},t}(cs);var vtt={DEFAULT:"default",TRUNCATED:"truncated"},nui=function(n){function t(t,i,r,u,f,e,o){n.call(this,i,r,u,f,e,o);this.zoomifyImage_=null;this.tileSize_=ru(t.getTileSize(i[0]))}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getImage=function(){var t,i,r;return this.zoomifyImage_?this.zoomifyImage_:(t=n.prototype.getImage.call(this),this.state==c.LOADED)?(i=this.tileSize_,t.width==i[0]&&t.height==i[1])?(this.zoomifyImage_=t,t):(r=kt(i[0],i[1]),r.drawImage(t,0,0),this.zoomifyImage_=r.canvas,r.canvas):t},t}(cb),tui=function(n){function t(t){var i=t||{},o=i.size,d=void 0!==i.tierSizeCalculation?i.tierSizeCalculation:vtt.DEFAULT,l=o[0],a=o[1],p=i.extent||[0,-o[1],o[0],0],u=[],w=i.tileSize||rw,r=w,s,h,c,e,b,k;switch(d){case vtt.DEFAULT:for(;l>r||a>r;)u.push([Math.ceil(l/r),Math.ceil(a/r)]),r+=r;break;case vtt.TRUNCATED:for(s=l,h=a;s>r||h>r;)u.push([Math.ceil(s/r),Math.ceil(h/r)]),s>>=1,h>>=1;break;default:g(!1,53)}u.push([1,1]);u.reverse();for(var v=[1],y=[0],f=1,nt=u.length;f<nt;f++)v.push(1<<f),y.push(u[f-1][0]*u[f-1][1]+y[f-1]);v.reverse();c=new yl({tileSize:w,extent:p,origin:bf(p),resolutions:v});e=i.url;e&&-1==e.indexOf("{TileGroup}")&&-1==e.indexOf("{tileIndex}")&&(e+="{TileGroup}/{z}-{x}-{y}.jpg");b=iy(htt(e).map(function(n){return function(t){if(t){var i=t[0],f=t[1],e=-t[2]-1,o=f+e*u[i][0],r=c.getTileSize(i),s=Array.isArray(r)?r[0]:r,h={z:i,x:f,y:e,tileIndex:o,TileGroup:"TileGroup"+((o+y[i])/s|0)};return n.replace(/\{(\w+?)\}/g,function(n,t){return h[t]})}}}));k=nui.bind(null,c);n.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:k,tileGrid:c,tileUrlFunction:b,transition:i.transition})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(cs),olt="renderOrder",slt=function(n){function t(t){var i=t||{},r=nt({},i);delete r.style;delete r.renderBuffer;delete r.updateWhileAnimating;delete r.updateWhileInteracting;n.call(this,r);this.declutter_=void 0!==i.declutter&&i.declutter;this.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100;this.style_=null;this.styleFunction_=void 0;this.setStyle(i.style);this.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating;this.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting;this.renderMode_=i.renderMode||wot.VECTOR;this.type=kr.VECTOR}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDeclutter=function(){return this.declutter_},t.prototype.setDeclutter=function(n){this.declutter_=n},t.prototype.getRenderBuffer=function(){return this.renderBuffer_},t.prototype.getRenderOrder=function(){return this.get(olt)},t.prototype.getStyle=function(){return this.style_},t.prototype.getStyleFunction=function(){return this.styleFunction_},t.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},t.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},t.prototype.setRenderOrder=function(n){this.set(olt,n)},t.prototype.setStyle=function(n){this.style_=void 0!==n?n:kti;this.styleFunction_=null===n?void 0:function(n){var t,i;return"function"==typeof n?t=n:(Array.isArray(n)?i=n:(g("function"==typeof n.getZIndex,41),i=[n]),t=function(){return i}),t}(this.style_);this.changed()},t.prototype.getRenderMode=function(){return this.renderMode_},t}(lw);slt.prototype.getSource;var vs=slt,uo={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},iui=["#00f","#0ff","#0f0","#ff0","#f00"],rui=function(n){function t(t){var i=t||{},r=nt({},i),f,u;delete r.gradient;delete r.radius;delete r.blur;delete r.shadow;delete r.weight;n.call(this,r);this.gradient_=null;this.shadow_=void 0!==i.shadow?i.shadow:250;this.circleImage_=void 0;this.styleCache_=null;o(this,ni(uo.GRADIENT),this.handleGradientChanged_,this);this.setGradient(i.gradient?i.gradient:iui);this.setBlur(void 0!==i.blur?i.blur:15);this.setRadius(void 0!==i.radius?i.radius:8);o(this,ni(uo.BLUR),this.handleStyleChanged_,this);o(this,ni(uo.RADIUS),this.handleStyleChanged_,this);this.handleStyleChanged_();u=i.weight?i.weight:"weight";f="string"==typeof u?function(n){return n.get(u)}:u;this.setStyle(function(n){var i=f(n),r=void 0!==i?vi(i,0,1):1,u=255*r|0,t=this.styleCache_[u];return t||(t=[new wl({image:new vb({opacity:r,src:this.circleImage_})})],this.styleCache_[u]=t),t}.bind(this));this.setRenderOrder(null);o(this,gr.RENDER,this.handleRender_,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createCircle_=function(){var i=this.getRadius(),r=this.getBlur(),u=i+r+1,f=2*u,n=kt(f,f),t;return n.shadowOffsetX=n.shadowOffsetY=this.shadow_,n.shadowBlur=r,n.shadowColor="#000",n.beginPath(),t=u-this.shadow_,n.arc(t,t,i,0,2*Math.PI,!0),n.fill(),n.canvas.toDataURL()},t.prototype.getBlur=function(){return this.get(uo.BLUR)},t.prototype.getGradient=function(){return this.get(uo.GRADIENT)},t.prototype.getRadius=function(){return this.get(uo.RADIUS)},t.prototype.handleGradientChanged_=function(){this.gradient_=function(n){for(var t=kt(1,256),r=t.createLinearGradient(0,0,1,256),u=1/(n.length-1),i=0,f=n.length;i<f;++i)r.addColorStop(i*u,n[i]);return t.fillStyle=r,t.fillRect(0,0,1,256),t.getImageData(0,0,1,256).data}(this.getGradient())},t.prototype.handleStyleChanged_=function(){this.circleImage_=this.createCircle_();this.styleCache_=new Array(256);this.changed()},t.prototype.handleRender_=function(n){for(var r,u=n.context,f=u.canvas,e=u.getImageData(0,0,f.width,f.height),i=e.data,t=0,o=i.length;t<o;t+=4)r=4*i[t+3],r&&(i[t]=this.gradient_[r],i[t+1]=this.gradient_[r+1],i[t+2]=this.gradient_[r+2]);u.putImageData(e,0,0)},t.prototype.setBlur=function(n){this.set(uo.BLUR,n)},t.prototype.setGradient=function(n){this.set(uo.GRADIENT,n)},t.prototype.setRadius=function(n){this.set(uo.RADIUS,n)},t}(vs),hlt=function(n){function t(t){var i=t||{},r=i.renderMode||io.HYBRID,u;g(void 0==r||r==io.IMAGE||r==io.HYBRID||r==io.VECTOR,28);i.declutter&&r==io.IMAGE&&(r=io.HYBRID);i.renderMode=r;u=nt({},i);delete u.preload;delete u.useInterimTilesOnError;n.call(this,u);this.setPreload(i.preload?i.preload:0);this.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError);this.type=kr.VECTOR_TILE}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getPreload=function(){return this.get(db)},t.prototype.getUseInterimTilesOnError=function(){return this.get(gb)},t.prototype.setPreload=function(n){this.set(db,n)},t.prototype.setUseInterimTilesOnError=function(n){this.set(gb,n)},t}(vs);hlt.prototype.getSource;var uui=hlt,fui="addfeatures",eui=function(n){function t(t,i,r,u){n.call(this,t);this.features=r;this.file=i;this.projection=u}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr);var sui=function(n){function t(t){var i=t||{};n.call(this,{handleEvent:bu});this.formatConstructors_=i.formatConstructors?i.formatConstructors:[];this.projection_=i.projection?w(i.projection):null;this.dropListenKeys_=null;this.source_=i.source||null;this.target=i.target?i.target:null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleResult_=function(n,t){var o=t.target.result,s=this.getMap(),i=this.projection_,e;i||(i=s.getView().getProjection());for(var f=this.formatConstructors_,r=[],u=0,h=f.length;u<h;++u)if(e=new f[u],(r=this.tryReadFeatures_(e,o,{featureProjection:i}))&&r.length>0)break;this.source_&&(this.source_.clear(),this.source_.addFeatures(r));this.dispatchEvent(new eui(fui,n,r,i))},t.prototype.registerListeners_=function(){var t=this.getMap(),n;t&&(n=this.target?this.target:t.getViewport(),this.dropListenKeys_=[o(n,a.DROP,oui,this),o(n,a.DRAGENTER,ytt,this),o(n,a.DRAGOVER,ytt,this),o(n,a.DROP,ytt,this)])},t.prototype.setActive=function(t){n.prototype.setActive.call(this,t);t?this.registerListeners_():this.unregisterListeners_()},t.prototype.setMap=function(t){this.unregisterListeners_();n.prototype.setMap.call(this,t);this.getActive()&&this.registerListeners_()},t.prototype.tryReadFeatures_=function(n,t,i){try{return n.readFeatures(t,i)}catch(n){return null}},t.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(lt),this.dropListenKeys_=null)},t}(ge),hui=function(n){function t(t){var i=t||{};n.call(this,i);this.condition_=i.condition?i.condition:rv;this.lastAngle_=void 0;this.lastMagnitude_=void 0;this.lastScaleDelta_=0;this.duration_=void 0!==i.duration?i.duration:400}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleDragEvent=function(n){var h;if(ae(n)){var f=n.map,e=f.getSize(),o=n.pixel,i=o[0]-e[0]/2,r=e[1]/2-o[1],s=Math.atan2(r,i),u=Math.sqrt(i*i+r*r),t=f.getView();t.getConstraints().rotation!==uw&&void 0!==this.lastAngle_&&(h=s-this.lastAngle_,aw(t,t.getRotation()-h));(this.lastAngle_=s,void 0!==this.lastMagnitude_)&&vw(t,this.lastMagnitude_*(t.getResolution()/u));void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/u);this.lastMagnitude_=u}},t.prototype.handleUpEvent=function(n){var t,i;return ae(n)?(t=n.map.getView(),t.setHint(oi,-1),i=this.lastScaleDelta_-1,yg(t,t.getRotation()),not(t,t.getResolution(),void 0,this.duration_,i),this.lastScaleDelta_=0,!1):!0},t.prototype.handleDownEvent=function(n){return!!ae(n)&&!!this.condition_(n)&&(n.map.getView().setHint(oi,1),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0)},t}(lf),clt=function(n){function t(t,i,r){if(n.call(this),void 0!==r&&void 0===i)this.setFlatCoordinates(r,t);else{var u=i||0;this.setCenterAndRadius(t,u,r)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),void 0,this.layout)},t.prototype.closestPointXY=function(n,t,i,r){var u=this.flatCoordinates,s=n-u[0],h=t-u[1],o=s*s+h*h,f,c,e;if(o<r){if(0===o)for(f=0;f<this.stride;++f)i[f]=u[f];else for(c=this.getRadius()/Math.sqrt(o),i[0]=u[0]+c*s,i[1]=u[1]+c*h,e=2;e<this.stride;++e)i[e]=u[e];return i.length=this.stride,o}return r},t.prototype.containsXY=function(n,t){var i=this.flatCoordinates,r=n-i[0],u=t-i[1];return r*r+u*u<=this.getRadiusSquared_()},t.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},t.prototype.computeExtent=function(n){var t=this.flatCoordinates,i=t[this.stride]-t[0];return ef(t[0]-i,t[1]-i,t[0]+i,t[1]+i,n)},t.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},t.prototype.getRadiusSquared_=function(){var n=this.flatCoordinates[this.stride]-this.flatCoordinates[0],t=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return n*n+t*t},t.prototype.getType=function(){return f.CIRCLE},t.prototype.intersectsExtent=function(n){if(dt(n,this.getExtent())){var t=this.getCenter();return n[0]<=t[0]&&n[2]>=t[0]||n[1]<=t[1]&&n[3]>=t[1]||sut(n,this.intersectsCoordinate,this)}return!1},t.prototype.setCenter=function(n){var i=this.stride,u=this.flatCoordinates[i]-this.flatCoordinates[0],r=n.slice(),t;for(r[i]=r[0]+u,t=1;t<i;++t)r[i+t]=n[t];this.setFlatCoordinates(this.layout,r);this.changed()},t.prototype.setCenterAndRadius=function(n,t,i){var r,u,f,e;for(this.setLayout(i,n,0),this.flatCoordinates||(this.flatCoordinates=[]),r=this.flatCoordinates,u=rft(r,0,n,this.stride),r[u++]=r[0]+t,f=1,e=this.stride;f<e;++f)r[u++]=r[f];r.length=u;this.changed()},t.prototype.getCoordinates=function(){return null},t.prototype.setCoordinates=function(){},t.prototype.setRadius=function(n){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+n;this.changed()},t}(ce);clt.prototype.transform;var ptt=clt,yf=function(n){function t(t,i,r){var e;if(n.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,i);else if(void 0!==i&&r)this.setFlatCoordinates(i,t),this.ends_=r;else{for(var o=this.getLayout(),s=t,f=[],h=[],u=0,c=s.length;u<c;++u)e=s[u],0===u&&(o=e.getLayout()),pt(f,e.getFlatCoordinates()),h.push(f.length);this.setFlatCoordinates(o,f);this.ends_=h}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.appendLineString=function(n){this.flatCoordinates?pt(this.flatCoordinates,n.getFlatCoordinates().slice()):this.flatCoordinates=n.getFlatCoordinates().slice();this.ends_.push(this.flatCoordinates.length);this.changed()},t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},t.prototype.closestPointXY=function(n,t,i,r){return r<ih(this.getExtent(),n,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(cd(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ad(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,n,t,i,r))},t.prototype.getCoordinateAtM=function(n,t,i){if(this.layout!=v.XYM&&this.layout!=v.XYZM||0===this.flatCoordinates.length)return null;var r=void 0!==t&&t,u=void 0!==i&&i;return function(n,t,i,r,u,f,e){var s,h,c,o;if(e)return ng(n,t,i[i.length-1],r,u,f);if(u<n[r-1])return f?((s=n.slice(0,r))[r-1]=u,s):null;if(n[n.length-1]<u)return f?((s=n.slice(n.length-r))[r-1]=u,s):null;for(h=0,c=i.length;h<c;++h)if(o=i[h],t!=o){if(u<n[t+r-1])return null;if(u<=n[o-1])return ng(n,t,o,r,u,!1);t=o}return null}(this.flatCoordinates,0,this.ends_,this.stride,n,r,u)},t.prototype.getCoordinates=function(){return pp(this.flatCoordinates,0,this.ends_,this.stride)},t.prototype.getEnds=function(){return this.ends_},t.prototype.getLineString=function(n){return n<0||this.ends_.length<=n?null:new yi(this.flatCoordinates.slice(0===n?0:this.ends_[n-1],this.ends_[n]),this.layout)},t.prototype.getLineStrings=function(){for(var t,f,e=this.flatCoordinates,i=this.ends_,o=this.layout,r=[],u=0,n=0,s=i.length;n<s;++n)t=i[n],f=new yi(e.slice(u,t),o),r.push(f),u=t;return r},t.prototype.getFlatMidpoints=function(){for(var t,i=[],f=this.flatCoordinates,r=0,u=this.ends_,e=this.stride,n=0,o=u.length;n<o;++n)t=u[n],pt(i,gp(f,r,t,e,.5)),r=t;return i},t.prototype.getSimplifiedGeometryInternal=function(n){var i=[],r=[];return i.length=ybt(this.flatCoordinates,0,this.ends_,this.stride,n,i,0,r),new t(i,v.XY,r)},t.prototype.getType=function(){return f.MULTI_LINE_STRING},t.prototype.intersectsExtent=function(n){return function(n,t,i,r,u){for(var f=0,e=i.length;f<e;++f){if(wp(n,t,i[f],r,u))return!0;t=i[f]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,n)},t.prototype.setCoordinates=function(n,t){this.setLayout(t,n,2);this.flatCoordinates||(this.flatCoordinates=[]);var i=vd(this.flatCoordinates,0,n,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1];this.changed()},t}(ce),pe=function(n){function t(t,i){n.call(this);i&&!Array.isArray(t[0])?this.setFlatCoordinates(i,t):this.setCoordinates(t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.appendPoint=function(n){this.flatCoordinates?pt(this.flatCoordinates,n.getFlatCoordinates()):this.flatCoordinates=n.getFlatCoordinates().slice();this.changed()},t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(n,t,i,r){var s,f;if(r<ih(this.getExtent(),n,t))return r;for(var e=this.flatCoordinates,o=this.stride,u=0,h=e.length;u<h;u+=o)if(s=oh(n,t,e[u],e[u+1]),s<r){for(r=s,f=0;f<o;++f)i[f]=e[u+f];i.length=o}return r},t.prototype.getCoordinates=function(){return gc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getPoint=function(n){var t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return n<0||t<=n?null:new ei(this.flatCoordinates.slice(n*this.stride,(n+1)*this.stride),this.layout)},t.prototype.getPoints=function(){for(var u,t=this.flatCoordinates,f=this.layout,i=this.stride,r=[],n=0,e=t.length;n<e;n+=i)u=new ei(t.slice(n,n+i),f),r.push(u);return r},t.prototype.getType=function(){return f.MULTI_POINT},t.prototype.intersectsExtent=function(n){for(var i=this.flatCoordinates,r=this.stride,t=0,u=i.length;t<u;t+=r)if(ip(n,i[t],i[t+1]))return!0;return!1},t.prototype.setCoordinates=function(n,t){this.setLayout(t,n,1);this.flatCoordinates||(this.flatCoordinates=[]);this.flatCoordinates.length=pa(this.flatCoordinates,0,n,this.stride);this.changed()},t}(ce);var we=function(n){function t(t,i,r){var f;if(n.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!r&&!Array.isArray(t[0])){for(var h=this.getLayout(),c=t,e=[],l=[],u=0,a=c.length;u<a;++u){f=c[u];0===u&&(h=f.getLayout());for(var v=e.length,o=f.getEnds(),s=0,y=o.length;s<y;++s)o[s]+=v;pt(e,f.getFlatCoordinates());l.push(o)}i=h;t=e;r=l}void 0!==i&&r?(this.setFlatCoordinates(i,t),this.endss_=r):this.setCoordinates(t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.appendPolygon=function(n){var t,r,i,u;if(this.flatCoordinates)for(r=this.flatCoordinates.length,pt(this.flatCoordinates,n.getFlatCoordinates()),i=0,u=(t=n.getEnds().slice()).length;i<u;++i)t[i]+=r;else this.flatCoordinates=n.getFlatCoordinates().slice(),t=n.getEnds().slice(),this.endss_.push();this.endss_.push(t);this.changed()},t.prototype.clone=function(){for(var i=this.endss_.length,r=new Array(i),n=0;n<i;++n)r[n]=this.endss_[n].slice();return new t(this.flatCoordinates.slice(),this.layout,r)},t.prototype.closestPointXY=function(n,t,i,r){return r<ih(this.getExtent(),n,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(n,t,i,r,u){for(var e,f=0,o=i.length;f<o;++f)e=i[f],u=cd(n,t,e,r,u),t=e[e.length-1];return u}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(n,t,i,r,u,f,e,o,s,h,c){for(var l,v=c||[NaN,NaN],a=0,y=i.length;a<y;++a)l=i[a],h=ad(n,t,l,r,u,f,e,o,s,h,v),t=l[l.length-1];return h}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,n,t,i,r))},t.prototype.containsXY=function(n,t){return function(n,t,i,r,u,f){var e,s,o;if(0===i.length)return!1;for(e=0,s=i.length;e<s;++e){if(o=i[e],pd(n,t,o,r,u,f))return!0;t=o[o.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,n,t)},t.prototype.getArea=function(){return function(n,t,i,r){for(var u,e=0,f=0,o=i.length;f<o;++f)u=i[f],e+=tft(n,t,u,r),t=u[u.length-1];return e}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},t.prototype.getCoordinates=function(n){var t;return void 0!==n?cft(t=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,n):t=this.flatCoordinates,uft(t,0,this.endss_,this.stride)},t.prototype.getEndss=function(){return this.endss_},t.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var n=llt(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=eft(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,n);this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},t.prototype.getInteriorPoints=function(){return new pe(this.getFlatInteriorPoints().slice(),v.XYM)},t.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var n=this.flatCoordinates;(function(n,t,i,r,u){for(var f=0,e=i.length;f<e;++f)if(!hft(n,t,i[f],r,u))return!1;return!0})(n,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=n:(this.orientedFlatCoordinates_=n.slice(),this.orientedFlatCoordinates_.length=cft(this.orientedFlatCoordinates_,0,this.endss_,this.stride));this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t.prototype.getSimplifiedGeometryInternal=function(n){var i=[],r=[];return i.length=function(n,t,i,r,u,f,e,o){for(var h,c,s=0,l=i.length;s<l;++s)h=i[s],c=[],e=fft(n,t,h,r,u,f,e,c),o.push(c),t=h[h.length-1];return e}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(n),i,0,r),new t(i,v.XY,r)},t.prototype.getPolygon=function(n){var i,u,t,f,r,e;if(n<0||this.endss_.length<=n)return null;if(0===n?i=0:(u=this.endss_[n-1],i=u[u.length-1]),t=this.endss_[n].slice(),f=t[t.length-1],0!==i)for(r=0,e=t.length;r<e;++r)t[r]-=i;return new or(this.flatCoordinates.slice(i,f),this.layout,t)},t.prototype.getPolygons=function(){for(var n,u,i,o,s,h=this.layout,c=this.flatCoordinates,f=this.endss_,e=[],t=0,r=0,l=f.length;r<l;++r){if(n=f[r].slice(),u=n[n.length-1],0!==t)for(i=0,o=n.length;i<o;++i)n[i]-=t;s=new or(c.slice(t,u),h,n);e.push(s);t=u}return e},t.prototype.getType=function(){return f.MULTI_POLYGON},t.prototype.intersectsExtent=function(n){return function(n,t,i,r,u){for(var e,f=0,o=i.length;f<o;++f){if(e=i[f],sft(n,t,e,r,u))return!0;t=e[e.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,n)},t.prototype.setCoordinates=function(n,t){var i,r;this.setLayout(t,n,3);this.flatCoordinates||(this.flatCoordinates=[]);i=function(n,t,i,r,u){for(var e,f=u||[],o=0,s=0,h=i.length;s<h;++s)e=vd(n,t,i[s],r,f[o]),f[o++]=e,t=e[e.length-1];return f.length=o,f}(this.flatCoordinates,0,n,this.stride,this.endss_);0===i.length?this.flatCoordinates.length=0:(r=i[i.length-1],this.flatCoordinates.length=0===r.length?0:r[r.length-1]);this.changed()},t}(ce),ui={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},alt="drawstart",cui="drawend",wtt=function(n){function t(t,i){n.call(this,t);this.feature=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),lui=function(n){function t(t){var e=t,i,u,r;e.stopDown||(e.stopDown=nh);n.call(this,e);this.shouldHandle_=!1;this.downPx_=null;this.downTimeout_;this.lastDragTime_;this.freehand_=!1;this.source_=t.source?t.source:null;this.features_=t.features?t.features:null;this.snapTolerance_=t.snapTolerance?t.snapTolerance:12;this.type_=t.type;this.mode_=function(n){var t;return n===f.POINT||n===f.MULTI_POINT?t=ui.POINT:n===f.LINE_STRING||n===f.MULTI_LINE_STRING?t=ui.LINE_STRING:n===f.POLYGON||n===f.MULTI_POLYGON?t=ui.POLYGON:n===f.CIRCLE&&(t=ui.CIRCLE),t}(this.type_);this.stopClick_=!!t.stopClick;this.minPoints_=t.minPoints?t.minPoints:this.mode_===ui.POLYGON?3:2;this.maxPoints_=t.maxPoints?t.maxPoints:1/0;this.finishCondition_=t.finishCondition?t.finishCondition:bu;i=t.geometryFunction;i||(this.type_===f.CIRCLE?i=function(n,t){var i=t||new ptt([NaN,NaN]),r=ku(n[0],n[1]);return i.setCenterAndRadius(n[0],Math.sqrt(r)),i}:(r=this.mode_,r===ui.POINT?u=ei:r===ui.LINE_STRING?u=yi:r===ui.POLYGON&&(u=or),i=function(n,t){var i=t;return i?r===ui.POLYGON?n[0].length?i.setCoordinates([n[0].concat([n[0][0]])]):i.setCoordinates([]):i.setCoordinates(n):i=new u(n),i}));this.geometryFunction_=i;this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500;this.finishCoordinate_=null;this.sketchFeature_=null;this.sketchPoint_=null;this.sketchCoords_=null;this.sketchLine_=null;this.sketchLineCoords_=null;this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36;this.overlay_=new vs({source:new ec({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:function(){var n=ty();return function(t){return n[t.getGeometry().getType()]}}(),updateWhileInteracting:!0});this.geometryName_=t.geometryName;this.condition_=t.condition?t.condition:yw;this.freehandCondition_;this.freehandCondition_=t.freehand?iv:t.freehandCondition?t.freehandCondition:rv;o(this,ni(tv.ACTIVE),this.updateState_,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setMap=function(t){n.prototype.setMap.call(this,t);this.updateState_()},t.prototype.getOverlay=function(){return this.overlay_},t.prototype.handleEvent=function(t){t.originalEvent.type===a.CONTEXTMENU&&t.preventDefault();this.freehand_=this.mode_!==ui.POINT&&this.freehandCondition_(t);var r=t.type===ht.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&t.type===ht.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,r=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===ht.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t),i=!1):this.freehand_&&t.type===ht.POINTERDOWN?i=!1:r?(i=t.type===ht.POINTERMOVE)&&this.freehand_?i=this.handlePointerMove_(t):(t.pointerEvent.pointerType==fet||t.type===ht.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t):t.type===ht.DBLCLICK&&(i=!1),n.prototype.handleEvent.call(this,t)&&i},t.prototype.handleDownEvent=function(n){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=n.pixel,this.finishCoordinate_||this.startDrawing_(n),!0):!!this.condition_(n)&&(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new ts(ht.POINTERMOVE,n.map,n.pointerEvent,!1,n.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=n.pixel,!0)},t.prototype.handleUpEvent=function(n){var t=!0,i;return this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(n),i=this.mode_===ui.CIRCLE,this.shouldHandle_?(this.finishCoordinate_?this.freehand_||i?this.finishDrawing():this.atFinish_(n)?this.finishCondition_(n)&&this.finishDrawing():this.addToDrawing_(n):(this.startDrawing_(n),this.mode_===ui.POINT&&this.finishDrawing()),t=!1):this.freehand_&&(this.finishCoordinate_=null,this.abortDrawing_()),!t&&this.stopClick_&&n.stopPropagation(),t},t.prototype.handlePointerMove_=function(n){if(this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var t=this.downPx_,i=n.pixel,r=t[0]-i[0],u=t[1]-i[1],f=r*r+u*u;if(this.shouldHandle_=this.freehand_?f>this.squaredClickTolerance_:f<=this.squaredClickTolerance_,!this.shouldHandle_)return!0}return this.finishCoordinate_?this.modifyDrawing_(n):this.createOrUpdateSketchPoint_(n),!0},t.prototype.atFinish_=function(n){var f=!1,i,r,t;if(this.sketchFeature_&&(i=!1,r=[this.finishCoordinate_],this.mode_===ui.LINE_STRING?i=this.sketchCoords_.length>this.minPoints_:this.mode_===ui.POLYGON&&(t=this.sketchCoords_,i=t[0].length>this.minPoints_,r=[t[0][0],t[0][t[0].length-2]]),i))for(var l=n.map,u=0,a=r.length;u<a;u++){var e=r[u],o=l.getPixelFromCoordinate(e),s=n.pixel,h=s[0]-o[0],c=s[1]-o[1],v=this.freehand_?1:this.snapTolerance_;if(f=Math.sqrt(h*h+c*c)<=v){this.finishCoordinate_=e;break}}return f},t.prototype.createOrUpdateSketchPoint_=function(n){var t=n.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new fi(new ei(t)),this.updateSketchFeatures_())},t.prototype.startDrawing_=function(n){var t=n.coordinate,i;this.finishCoordinate_=t;this.mode_===ui.POINT?this.sketchCoords_=t.slice():this.mode_===ui.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()];this.sketchLineCoords_&&(this.sketchLine_=new fi(new yi(this.sketchLineCoords_)));i=this.geometryFunction_(this.sketchCoords_);this.sketchFeature_=new fi;this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_);this.sketchFeature_.setGeometry(i);this.updateSketchFeatures_();this.dispatchEvent(new wtt(alt,this.sketchFeature_))},t.prototype.modifyDrawing_=function(n){var u,i,t,e=n.coordinate,o=this.sketchFeature_.getGeometry(),r;(this.mode_===ui.POINT?i=this.sketchCoords_:this.mode_===ui.POLYGON?(i=(u=this.sketchCoords_[0])[u.length-1],this.atFinish_(n)&&(e=this.finishCoordinate_.slice())):i=(u=this.sketchCoords_)[u.length-1],i[0]=e[0],i[1]=e[1],this.geometryFunction_(this.sketchCoords_,o),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(e);o.getType()==f.POLYGON&&this.mode_!==ui.POLYGON?(this.sketchLine_||(this.sketchLine_=new fi),r=o.getLinearRing(0),(t=this.sketchLine_.getGeometry())?(t.setFlatCoordinates(r.getLayout(),r.getFlatCoordinates()),t.changed()):(t=new yi(r.getFlatCoordinates(),r.getLayout()),this.sketchLine_.setGeometry(t))):this.sketchLineCoords_&&(t=this.sketchLine_.getGeometry()).setCoordinates(this.sketchLineCoords_);this.updateSketchFeatures_()},t.prototype.addToDrawing_=function(n){var i,t,r=n.coordinate,u=this.sketchFeature_.getGeometry();this.mode_===ui.LINE_STRING?(this.finishCoordinate_=r.slice(),(t=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?t.pop():i=!0),t.push(r.slice()),this.geometryFunction_(t,u)):this.mode_===ui.POLYGON&&((t=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?t.pop():i=!0),t.push(r.slice()),i&&(this.finishCoordinate_=t[0]),this.geometryFunction_(this.sketchCoords_,u));this.updateSketchFeatures_();i&&this.finishDrawing()},t.prototype.removeLastPoint=function(){if(this.sketchFeature_){var n,t=this.sketchFeature_.getGeometry();this.mode_===ui.LINE_STRING?((n=this.sketchCoords_).splice(-2,1),this.geometryFunction_(n,t),n.length>=2&&(this.finishCoordinate_=n[n.length-2].slice())):this.mode_===ui.POLYGON&&((n=this.sketchCoords_[0]).splice(-2,1),this.sketchLine_.getGeometry().setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t));0===n.length&&(this.finishCoordinate_=null);this.updateSketchFeatures_()}},t.prototype.finishDrawing=function(){var t=this.abortDrawing_(),n,i;t&&(n=this.sketchCoords_,i=t.getGeometry(),this.mode_===ui.LINE_STRING?(n.pop(),this.geometryFunction_(n,i)):this.mode_===ui.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i),n=i.getCoordinates()),this.type_===f.MULTI_POINT?t.setGeometry(new pe([n])):this.type_===f.MULTI_LINE_STRING?t.setGeometry(new yf([n])):this.type_===f.MULTI_POLYGON&&t.setGeometry(new we([n])),this.dispatchEvent(new wtt(cui,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t))},t.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var n=this.sketchFeature_;return n&&(this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0)),n},t.prototype.extend=function(n){var i=n.getGeometry(),t;this.sketchFeature_=n;this.sketchCoords_=i.getCoordinates();t=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=t.slice();this.sketchCoords_.push(t.slice());this.updateSketchFeatures_();this.dispatchEvent(new wtt(alt,this.sketchFeature_))},t.prototype.updateSketchFeatures_=function(){var n=[],t;this.sketchFeature_&&n.push(this.sketchFeature_);this.sketchLine_&&n.push(this.sketchLine_);this.sketchPoint_&&n.push(this.sketchPoint_);t=this.overlay_.getSource();t.clear(!0);t.addFeatures(n)},t.prototype.updateState_=function(){var n=this.getMap(),t=this.getActive();n&&t||this.abortDrawing_();this.overlay_.setMap(t?n:null)},t}(lf),aui={EXTENTCHANGED:"extentchanged"},vui=function(n){function t(t){n.call(this,aui.EXTENTCHANGED);this.extent=t}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr);var yui=function(n){function t(t){var i=t||{};n.call(this,i);this.extent_=null;this.pointerHandler_=null;this.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10;this.snappedToVertex_=!1;this.extentFeature_=null;this.vertexFeature_=null;t||(t={});this.extentOverlay_=new vs({source:new ec({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.boxStyle?t.boxStyle:function(){var n=ty();return function(){return n[f.POLYGON]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.vertexOverlay_=new vs({source:new ec({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.pointerStyle?t.pointerStyle:function(){var n=ty();return function(){return n[f.POINT]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0});t.extent&&this.setExtent(t.extent)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.snapToVertex_=function(n,t){var r=t.getCoordinateFromPixel(n),o=this.getExtent(),u;if(o){u=function(n){return[[[n[0],n[1]],[n[0],n[3]]],[[n[0],n[3]],[n[2],n[3]]],[[n[2],n[3]],[n[2],n[1]]],[[n[2],n[1]],[n[0],n[1]]]]}(o);u.sort(function(n,t){return ga(r,n)-ga(r,t)});var i=u[0],f=bp(r,i),e=t.getPixelFromCoordinate(f);if(dp(n,e)<=this.pixelTolerance_){var c=t.getPixelFromCoordinate(i[0]),l=t.getPixelFromCoordinate(i[1]),s=ku(e,c),h=ku(e,l),a=Math.sqrt(Math.min(s,h));return this.snappedToVertex_=a<=this.pixelTolerance_,this.snappedToVertex_&&(f=s>h?i[1]:i[0]),f}}return null},t.prototype.handlePointerMove_=function(n){var i=n.pixel,r=n.map,t=this.snapToVertex_(i,r);t||(t=r.getCoordinateFromPixel(i));this.createOrUpdatePointerFeature_(t)},t.prototype.createOrUpdateExtentFeature_=function(n){var t=this.extentFeature_;return t?n?t.setGeometry(ba(n)):t.setGeometry(void 0):(t=new fi(n?ba(n):{}),this.extentFeature_=t,this.extentOverlay_.getSource().addFeature(t)),t},t.prototype.createOrUpdatePointerFeature_=function(n){var t=this.vertexFeature_;return t?t.getGeometry().setCoordinates(n):(t=new fi(new ei(n)),this.vertexFeature_=t,this.vertexOverlay_.getSource().addFeature(t)),t},t.prototype.handleEvent=function(t){return!t.pointerEvent||(t.type!=ht.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),n.prototype.handleEvent.call(this,t),!1)},t.prototype.handleDownEvent=function(n){var e=n.pixel,o=n.map,t=this.getExtent(),i=this.snapToVertex_(e,o),r=function(n){var i=null,r=null;return n[0]==t[0]?i=t[2]:n[0]==t[2]&&(i=t[0]),n[1]==t[1]?r=t[3]:n[1]==t[3]&&(r=t[1]),null!==i&&null!==r?[i,r]:null},u,f;return i&&t?(u=i[0]==t[0]||i[0]==t[2]?i[0]:null,f=i[1]==t[1]||i[1]==t[3]?i[1]:null,null!==u&&null!==f?this.pointerHandler_=vlt(r(i)):null!==u?this.pointerHandler_=ylt(r([u,t[1]]),r([u,t[3]])):null!==f&&(this.pointerHandler_=ylt(r([t[0],f]),r([t[2],f])))):(i=o.getCoordinateFromPixel(e),this.setExtent([i[0],i[1],i[0],i[1]]),this.pointerHandler_=vlt(i)),!0},t.prototype.handleDragEvent=function(n){if(this.pointerHandler_){var t=n.coordinate;this.setExtent(this.pointerHandler_(t));this.createOrUpdatePointerFeature_(t)}return!0},t.prototype.handleUpEvent=function(){this.pointerHandler_=null;var n=this.getExtent();return n&&0!==up(n)||this.setExtent(null),!1},t.prototype.setMap=function(t){this.extentOverlay_.setMap(t);this.vertexOverlay_.setMap(t);n.prototype.setMap.call(this,t)},t.prototype.getExtent=function(){return this.extent_},t.prototype.setExtent=function(n){this.extent_=n||null;this.createOrUpdateExtentFeature_(n);this.dispatchEvent(new vui(this.extent_))},t}(lf),fy=1,pui="modifystart",plt="modifyend",btt=function(n){function t(t,i,r){n.call(this,t);this.features=i;this.mapBrowserEvent=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr);var bui=function(n){function t(t){var i;if(n.call(this,t),this.condition_=t.condition?t.condition:eot,this.defaultDeleteCondition_=function(n){return iot(n)&&kg(n)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:iv,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.modified_=!1,this.rBush_=new ic,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new vs({source:new ec({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:function(){var n=ty();return function(){return n[f.POINT]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_,LineString:this.writeLineStringGeometry_,LinearRing:this.writeLineStringGeometry_,Polygon:this.writePolygonGeometry_,MultiPoint:this.writeMultiPointGeometry_,MultiLineString:this.writeMultiLineStringGeometry_,MultiPolygon:this.writeMultiPolygonGeometry_,Circle:this.writeCircleGeometry_,GeometryCollection:this.writeGeometryCollectionGeometry_},this.source_=null,t.source?(this.source_=t.source,i=new er(this.source_.getFeatures()),o(this.source_,fe.ADDFEATURE,this.handleSourceAdd_,this),o(this.source_,fe.REMOVEFEATURE,this.handleSourceRemove_,this)):i=t.features,!i)throw new Error("The modify interaction requires features or a source");this.features_=i;this.features_.forEach(this.addFeature_.bind(this));o(this.features_,ki.ADD,this.handleFeatureAdd_,this);o(this.features_,ki.REMOVE,this.handleFeatureRemove_,this);this.lastPointerEvent_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.addFeature_=function(n){var t=n.getGeometry(),i;t&&t.getType()in this.SEGMENT_WRITERS_&&this.SEGMENT_WRITERS_[t.getType()].call(this,n,t);i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i);o(n,a.CHANGE,this.handleFeatureChange_,this)},t.prototype.willModifyFeatures_=function(n){this.modified_||(this.modified_=!0,this.dispatchEvent(new btt(pui,this.features_,n)))},t.prototype.removeFeature_=function(n){this.removeFeatureSegmentData_(n);this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null);ou(n,a.CHANGE,this.handleFeatureChange_,this)},t.prototype.removeFeatureSegmentData_=function(n){var r=this.rBush_,i=[],t;for(r.forEach(function(t){n===t.feature&&i.push(t)}),t=i.length-1;t>=0;--t)r.remove(i[t])},t.prototype.setActive=function(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null);n.prototype.setActive.call(this,t)},t.prototype.setMap=function(t){this.overlay_.setMap(t);n.prototype.setMap.call(this,t)},t.prototype.getOverlay=function(){return this.overlay_},t.prototype.handleSourceAdd_=function(n){n.feature&&this.features_.push(n.feature)},t.prototype.handleSourceRemove_=function(n){n.feature&&this.features_.remove(n.feature)},t.prototype.handleFeatureAdd_=function(n){this.addFeature_(n.element)},t.prototype.handleFeatureChange_=function(n){if(!this.changingFeature_){var t=n.target;this.removeFeature_(t);this.addFeature_(t)}},t.prototype.handleFeatureRemove_=function(n){var t=n.element;this.removeFeature_(t)},t.prototype.writePointGeometry_=function(n,t){var i=t.getCoordinates(),r={feature:n,geometry:t,segment:[i,i]};this.rBush_.insert(t.getExtent(),r)},t.prototype.writeMultiPointGeometry_=function(n,t){for(var r,f,u=t.getCoordinates(),i=0,e=u.length;i<e;++i)r=u[i],f={feature:n,geometry:t,depth:[i],index:i,segment:[r,r]},this.rBush_.insert(t.getExtent(),f)},t.prototype.writeLineStringGeometry_=function(n,t){for(var r,f,u=t.getCoordinates(),i=0,e=u.length-1;i<e;++i)r=u.slice(i,i+2),f={feature:n,geometry:t,index:i,segment:r},this.rBush_.insert(hi(r),f)},t.prototype.writeMultiLineStringGeometry_=function(n,t){for(var u,o,f=t.getCoordinates(),r=0,s=f.length;r<s;++r)for(var e=f[r],i=0,h=e.length-1;i<h;++i)u=e.slice(i,i+2),o={feature:n,geometry:t,depth:[r],index:i,segment:u},this.rBush_.insert(hi(u),o)},t.prototype.writePolygonGeometry_=function(n,t){for(var u,o,f=t.getCoordinates(),r=0,s=f.length;r<s;++r)for(var e=f[r],i=0,h=e.length-1;i<h;++i)u=e.slice(i,i+2),o={feature:n,geometry:t,depth:[r],index:i,segment:u},this.rBush_.insert(hi(u),o)},t.prototype.writeMultiPolygonGeometry_=function(n,t){for(var f,h,e=t.getCoordinates(),r=0,c=e.length;r<c;++r)for(var o=e[r],u=0,l=o.length;u<l;++u)for(var s=o[u],i=0,a=s.length-1;i<a;++i)f=s.slice(i,i+2),h={feature:n,geometry:t,depth:[u,r],index:i,segment:f},this.rBush_.insert(hi(f),h)},t.prototype.writeCircleGeometry_=function(n,t){var i=t.getCenter(),r={feature:n,geometry:t,index:0,segment:[i,i]},u={feature:n,geometry:t,index:fy,segment:[i,i]},f=[r,u];r.featureSegments=u.featureSegments=f;this.rBush_.insert(uh(i),r);this.rBush_.insert(t.getExtent(),u)},t.prototype.writeGeometryCollectionGeometry_=function(n,t){for(var r=t.getGeometriesArray(),i=0;i<r.length;++i)this.SEGMENT_WRITERS_[r[i].getType()].call(this,n,r[i])},t.prototype.createOrUpdateVertexFeature_=function(n){var t=this.vertexFeature_;return t?t.getGeometry().setCoordinates(n):(t=new fi(new ei(n)),this.vertexFeature_=t,this.overlay_.getSource().addFeature(t)),t},t.prototype.handleEvent=function(t){return!t.pointerEvent||(this.lastPointerEvent_=t,t.map.getView().getInteracting()||t.type!=ht.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(i=!(t.type!=ht.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),t.type==ht.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),n.prototype.handleEvent.call(this,t)&&!i);var i},t.prototype.handleDragEvent=function(n){this.ignoreNextSingleClick_=!1;this.willModifyFeatures_(n);for(var t=n.coordinate,s=0,l=this.dragSegments_.length;s<l;++s){for(var c=this.dragSegments_[s],u=c[0],h=u.depth,i=u.geometry,e=void 0,r=u.segment,o=c[1];t.length<i.getStride();)t.push(r[o][t.length]);switch(i.getType()){case f.POINT:e=t;r[0]=r[1]=t;break;case f.MULTI_POINT:(e=i.getCoordinates())[u.index]=t;r[0]=r[1]=t;break;case f.LINE_STRING:(e=i.getCoordinates())[u.index+o]=t;r[o]=t;break;case f.MULTI_LINE_STRING:case f.POLYGON:(e=i.getCoordinates())[h[0]][u.index+o]=t;r[o]=t;break;case f.MULTI_POLYGON:(e=i.getCoordinates())[h[1]][h[0]][u.index+o]=t;r[o]=t;break;case f.CIRCLE:r[0]=r[1]=t;0===u.index?(this.changingFeature_=!0,i.setCenter(t),this.changingFeature_=!1):(this.changingFeature_=!0,i.setRadius(dp(i.getCenter(),t)),this.changingFeature_=!1)}e&&this.setGeometryCoordinates_(i,e)}this.createOrUpdateVertexFeature_(t)},t.prototype.handleDownEvent=function(n){var a,h,o,v,s;if(!this.condition_(n))return!1;if(this.handlePointerAtPixel_(n.pixel,n.map),a=n.map.getCoordinateFromPixel(n.pixel),this.dragSegments_.length=0,this.modified_=!1,h=this.vertexFeature_,h){var e=[],u=h.getGeometry().getCoordinates(),w=hi([u]),c=this.rBush_.getInExtent(w),r={};for(c.sort(wui),o=0,v=c.length;o<v;++o){var t=c[o],l=t.segment,i=y(t.feature),p=t.depth;if(p&&(i+="-"+p.join("-")),r[i]||(r[i]=new Array(2)),t.geometry.getType()===f.CIRCLE&&t.index===fy)ns(blt(a,t),u)&&!r[i][0]&&(this.dragSegments_.push([t,0]),r[i][0]=t);else if(ns(l[0],u)&&!r[i][0])this.dragSegments_.push([t,0]),r[i][0]=t;else if(ns(l[1],u)&&!r[i][1]){if((t.geometry.getType()===f.LINE_STRING||t.geometry.getType()===f.MULTI_LINE_STRING)&&r[i][0]&&0===r[i][0].index)continue;this.dragSegments_.push([t,1]);r[i][1]=t}else this.insertVertexCondition_(n)&&y(l)in this.vertexSegments_&&!r[i][0]&&!r[i][1]&&e.push([t,u])}for(e.length&&this.willModifyFeatures_(n),s=e.length-1;s>=0;--s)this.insertVertex_.apply(this,e[s])}return!!this.vertexFeature_},t.prototype.handleUpEvent=function(n){for(var t,r,i=this.dragSegments_.length-1;i>=0;--i)if(t=this.dragSegments_[i][0],r=t.geometry,r.getType()===f.CIRCLE){var u=r.getCenter(),e=t.featureSegments[0],o=t.featureSegments[1];e.segment[0]=e.segment[1]=u;o.segment[0]=o.segment[1]=u;this.rBush_.update(uh(u),e);this.rBush_.update(r.getExtent(),o)}else this.rBush_.update(hi(t.segment),t);return this.modified_&&(this.dispatchEvent(new btt(plt,this.features_,n)),this.modified_=!1),!1},t.prototype.handlePointerMove_=function(n){this.lastPixel_=n.pixel;this.handlePointerAtPixel_(n.pixel,n.map)},t.prototype.handlePointerAtPixel_=function(n,t){var e=t.getCoordinateFromPixel(n),b=ff(uh(e),t.getView().getResolution()*this.pixelTolerance_),u=this.rBush_.getInExtent(b),h,c,w,r;if(u.length>0){u.sort(function(n,t){return wlt(e,n)-wlt(e,t)});var o=u[0],i=o.segment,s=blt(e,o),l=t.getPixelFromCoordinate(s),a=dp(n,l);if(a<=this.pixelTolerance_){if(h={},o.geometry.getType()===f.CIRCLE&&o.index===fy)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(s);else{var k=t.getPixelFromCoordinate(i[0]),d=t.getPixelFromCoordinate(i[1]),v=ku(l,k),p=ku(l,d);for(a=Math.sqrt(Math.min(v,p)),this.snappedToVertex_=a<=this.pixelTolerance_,this.snappedToVertex_&&(s=v>p?i[1]:i[0]),this.createOrUpdateVertexFeature_(s),c=1,w=u.length;c<w;++c){if(r=u[c].segment,!(ns(i[0],r[0])&&ns(i[1],r[1])||ns(i[0],r[1])&&ns(i[1],r[0])))break;h[y(r)]=!0}}return h[y(i)]=!0,void(this.vertexSegments_=h)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},t.prototype.insertVertex_=function(n,t){for(var o,s,h,e,c=n.segment,l=n.feature,i=n.geometry,r=n.depth,u=n.index;t.length<i.getStride();)t.push(0);switch(i.getType()){case f.MULTI_LINE_STRING:case f.POLYGON:(e=i.getCoordinates())[r[0]].splice(u+1,0,t);break;case f.MULTI_POLYGON:(e=i.getCoordinates())[r[1]][r[0]].splice(u+1,0,t);break;case f.LINE_STRING:(e=i.getCoordinates()).splice(u+1,0,t);break;default:return}this.setGeometryCoordinates_(i,e);o=this.rBush_;o.remove(n);this.updateSegmentIndices_(i,u,r,1);s={segment:[c[0],t],feature:l,geometry:i,depth:r,index:u};o.insert(hi(s.segment),s);this.dragSegments_.push([s,1]);h={segment:[t,c[1]],feature:l,geometry:i,depth:r,index:u+1};o.insert(hi(h.segment),h);this.dragSegments_.push([h,0]);this.ignoreNextSingleClick_=!0},t.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=ht.POINTERDRAG){var n=this.lastPointerEvent_;return this.willModifyFeatures_(n),this.removeVertex_(),this.dispatchEvent(new btt(plt,this.features_,n)),this.modified_=!1,!0}return!1},t.prototype.removeVertex_=function(){for(var i,o,p,l,u,e,c,s,n,t,w=this.dragSegments_,r={},h=!1,v,b,a=w.length-1;a>=0;--a)t=y((n=(p=w[a])[0]).feature),n.depth&&(t+="-"+n.depth.join("-")),t in r||(r[t]={}),0===p[1]?(r[t].right=n,r[t].index=n.index):1==p[1]&&(r[t].left=n,r[t].index=n.index+1);for(t in r){switch(s=r[t].right,e=r[t].left,c=(u=r[t].index)-1,n=void 0!==e?e:s,c<0&&(c=0),i=o=(l=n.geometry).getCoordinates(),h=!1,l.getType()){case f.MULTI_LINE_STRING:o[n.depth[0]].length>2&&(o[n.depth[0]].splice(u,1),h=!0);break;case f.LINE_STRING:o.length>2&&(o.splice(u,1),h=!0);break;case f.MULTI_POLYGON:i=i[n.depth[1]];case f.POLYGON:(i=i[n.depth[0]]).length>4&&(u==i.length-1&&(u=0),i.splice(u,1),h=!0,0===u&&(i.pop(),i.push(i[0]),c=i.length-1))}h&&(this.setGeometryCoordinates_(l,o),v=[],(void 0!==e&&(this.rBush_.remove(e),v.push(e.segment[0])),void 0!==s&&(this.rBush_.remove(s),v.push(s.segment[1])),void 0!==e&&void 0!==s)&&(b={depth:n.depth,feature:n.feature,geometry:n.geometry,index:c,segment:v},this.rBush_.insert(hi(b.segment),b)),this.updateSegmentIndices_(l,u,n.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),w.length=0)}return h},t.prototype.setGeometryCoordinates_=function(n,t){this.changingFeature_=!0;n.setCoordinates(t);this.changingFeature_=!1},t.prototype.updateSegmentIndices_=function(n,t,i,r){this.rBush_.forEachInExtent(n.getExtent(),function(u){u.geometry===n&&(void 0===i||void 0===u.depth||uf(u.depth,i))&&u.index>t&&(u.index+=r)})},t}(lf),kui={SELECT:"select"},dui=function(n){function t(t,i,r,u){n.call(this,t);this.selected=i;this.deselected=r;this.mapBrowserEvent=u}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr);klt=function(n){function t(t){var i,r,e,s,u;n.call(this,{handleEvent:gui});i=t||{};this.condition_=i.condition?i.condition:kg;this.addCondition_=i.addCondition?i.addCondition:bg;this.removeCondition_=i.removeCondition?i.removeCondition:bg;this.toggleCondition_=i.toggleCondition?i.toggleCondition:rv;this.multi_=!!i.multi&&i.multi;this.filter_=i.filter?i.filter:bu;this.hitTolerance_=i.hitTolerance?i.hitTolerance:0;e=new vs({source:new ec({useSpatialIndex:!1,features:i.features,wrapX:i.wrapX}),style:i.style?i.style:function(){var n=ty();return pt(n[f.POLYGON],n[f.LINE_STRING]),pt(n[f.GEOMETRY_COLLECTION],n[f.LINE_STRING]),function(t){return t.getGeometry()?n[t.getGeometry().getType()]:null}}(),updateWhileAnimating:!0,updateWhileInteracting:!0});(this.featureOverlay_=e,i.layers)?"function"==typeof i.layers?r=i.layers:(s=i.layers,r=function(n){return tr(s,n)}):r=bu;this.layerFilter_=r;this.featureLayerAssociation_={};u=this.getFeatures();o(u,ki.ADD,this.addFeature_,this);o(u,ki.REMOVE,this.removeFeature_,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.addFeatureLayerAssociation_=function(n,t){this.featureLayerAssociation_[y(n)]=t},t.prototype.getFeatures=function(){return this.featureOverlay_.getSource().getFeaturesCollection()},t.prototype.getHitTolerance=function(){return this.hitTolerance_},t.prototype.getLayer=function(n){return this.featureLayerAssociation_[y(n)]},t.prototype.getOverlay=function(){return this.featureOverlay_},t.prototype.setHitTolerance=function(n){this.hitTolerance_=n},t.prototype.setMap=function(t){var i=this.getMap(),r=this.getFeatures();i&&r.forEach(i.unskipFeature.bind(i));n.prototype.setMap.call(this,t);this.featureOverlay_.setMap(t);t&&r.forEach(t.skipFeature.bind(t))},t.prototype.addFeature_=function(n){var t=this.getMap();t&&t.skipFeature(n.element)},t.prototype.removeFeature_=function(n){var t=this.getMap();t&&t.unskipFeature(n.element)},t.prototype.removeFeatureLayerAssociation_=function(n){delete this.featureLayerAssociation_[y(n)]},t}(ge);var nfi=function(n){function t(t){var i=t||{},r=i;r.handleDownEvent||(r.handleDownEvent=bu);r.stopDown||(r.stopDown=nh);n.call(this,r);this.source_=i.source?i.source:null;this.vertex_=void 0===i.vertex||i.vertex;this.edge_=void 0===i.edge||i.edge;this.features_=i.features?i.features:null;this.featuresListenerKeys_=[];this.featureChangeListenerKeys_={};this.indexedFeaturesExtents_={};this.pendingFeatures_={};this.pixelCoordinate_=null;this.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10;this.sortByDistance_=function(n,t){var i=ga(this.pixelCoordinate_,n.segment),r=ga(this.pixelCoordinate_,t.segment);return i-r}.bind(this);this.rBush_=new ic;this.SEGMENT_WRITERS_={Point:this.writePointGeometry_,LineString:this.writeLineStringGeometry_,LinearRing:this.writeLineStringGeometry_,Polygon:this.writePolygonGeometry_,MultiPoint:this.writeMultiPointGeometry_,MultiLineString:this.writeMultiLineStringGeometry_,MultiPolygon:this.writeMultiPolygonGeometry_,GeometryCollection:this.writeGeometryCollectionGeometry_,Circle:this.writeCircleGeometry_}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.addFeature=function(n,t){var f=void 0===t||t,u=y(n),i=n.getGeometry(),r;i&&(r=this.SEGMENT_WRITERS_[i.getType()],r&&(this.indexedFeaturesExtents_[u]=i.getExtent([1/0,1/0,-1/0,-1/0]),r.call(this,n,i)));f&&(this.featureChangeListenerKeys_[u]=o(n,a.CHANGE,this.handleFeatureChange_,this))},t.prototype.forEachFeatureAdd_=function(n){this.addFeature(n)},t.prototype.forEachFeatureRemove_=function(n){this.removeFeature(n)},t.prototype.getFeatures_=function(){var n;return this.features_?n=this.features_:this.source_&&(n=this.source_.getFeatures()),n},t.prototype.handleEvent=function(t){var i=this.snapTo(t.pixel,t.coordinate,t.map);return i.snapped&&(t.coordinate=i.vertex.slice(0,2),t.pixel=i.vertexPixel),n.prototype.handleEvent.call(this,t)},t.prototype.handleFeatureAdd_=function(n){var t=dlt(n);this.addFeature(t)},t.prototype.handleFeatureRemove_=function(n){var t=dlt(n);this.removeFeature(t)},t.prototype.handleFeatureChange_=function(n){var t=n.target,i;this.handlingDownUpSequence?(i=y(t),i in this.pendingFeatures_||(this.pendingFeatures_[i]=t)):this.updateFeature_(t)},t.prototype.handleUpEvent=function(){var n=wk(this.pendingFeatures_);return n.length&&(n.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},t.prototype.removeFeature=function(n,t){var o=void 0===t||t,u=y(n),e=this.indexedFeaturesExtents_[u],f,i,r;if(e)for(f=this.rBush_,i=[],f.forEachInExtent(e,function(t){n===t.feature&&i.push(t)}),r=i.length-1;r>=0;--r)f.remove(i[r]);o&&(lt(this.featureChangeListenerKeys_[u]),delete this.featureChangeListenerKeys_[u])},t.prototype.setMap=function(t){var u=this.getMap(),i=this.featuresListenerKeys_,r=this.getFeatures_();u&&(i.forEach(lt),i.length=0,r.forEach(this.forEachFeatureRemove_.bind(this)));n.prototype.setMap.call(this,t);t&&(this.features_?i.push(o(this.features_,ki.ADD,this.handleFeatureAdd_,this),o(this.features_,ki.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(o(this.source_,fe.ADDFEATURE,this.handleFeatureAdd_,this),o(this.source_,fe.REMOVEFEATURE,this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))},t.prototype.snapTo=function(n,t,i){var y=hi([i.getCoordinateFromPixel([n[0]-this.pixelTolerance_,n[1]+this.pixelTolerance_]),i.getCoordinateFromPixel([n[0]+this.pixelTolerance_,n[1]-this.pixelTolerance_])]),e=this.rBush_.getInExtent(y),r,v;this.vertex_&&!this.edge_&&(e=e.filter(function(n){return n.feature.getGeometry().getType()!==f.CIRCLE}));var c,l,s,h,a=!1,o=null,u=null;return e.length>0&&(this.pixelCoordinate_=t,e.sort(this.sortByDistance_),r=e[0].segment,v=e[0].feature.getGeometry().getType()===f.CIRCLE,this.vertex_&&!this.edge_?(c=i.getPixelFromCoordinate(r[0]),l=i.getPixelFromCoordinate(r[1]),s=ku(n,c),h=ku(n,l),Math.sqrt(Math.min(s,h))<=this.pixelTolerance_&&(a=!0,o=s>h?r[1]:r[0],u=i.getPixelFromCoordinate(o))):this.edge_&&(o=v?function(n,t){var f=t.getRadius(),e=t.getCenter(),o=e[0],s=e[1],i=n[0]-o,r=n[1]-s,u;return 0===i&&0===r&&(i=1),u=Math.sqrt(i*i+r*r),[o+f*i/u,s+f*r/u]}(t,e[0].feature.getGeometry()):bp(t,r),dp(n,u=i.getPixelFromCoordinate(o))<=this.pixelTolerance_&&(a=!0,this.vertex_&&!v&&(c=i.getPixelFromCoordinate(r[0]),l=i.getPixelFromCoordinate(r[1]),s=ku(u,c),h=ku(u,l),Math.sqrt(Math.min(s,h))<=this.pixelTolerance_&&(o=s>h?r[1]:r[0],u=i.getPixelFromCoordinate(o))))),a&&(u=[Math.round(u[0]),Math.round(u[1])])),{snapped:a,vertex:o,vertexPixel:u}},t.prototype.updateFeature_=function(n){this.removeFeature(n,!1);this.addFeature(n,!1)},t.prototype.writeCircleGeometry_=function(n,t){for(var r,f,u=kd(t).getCoordinates()[0],i=0,e=u.length-1;i<e;++i)r=u.slice(i,i+2),f={feature:n,segment:r},this.rBush_.insert(hi(r),f)},t.prototype.writeGeometryCollectionGeometry_=function(n,t){for(var u,r=t.getGeometriesArray(),i=0;i<r.length;++i)u=this.SEGMENT_WRITERS_[r[i].getType()],u&&u.call(this,n,r[i])},t.prototype.writeLineStringGeometry_=function(n,t){for(var r,f,u=t.getCoordinates(),i=0,e=u.length-1;i<e;++i)r=u.slice(i,i+2),f={feature:n,segment:r},this.rBush_.insert(hi(r),f)},t.prototype.writeMultiLineStringGeometry_=function(n,t){for(var u,o,f=t.getCoordinates(),r=0,s=f.length;r<s;++r)for(var e=f[r],i=0,h=e.length-1;i<h;++i)u=e.slice(i,i+2),o={feature:n,segment:u},this.rBush_.insert(hi(u),o)},t.prototype.writeMultiPointGeometry_=function(n,t){for(var r,f,u=t.getCoordinates(),i=0,e=u.length;i<e;++i)r=u[i],f={feature:n,segment:[r,r]},this.rBush_.insert(t.getExtent(),f)},t.prototype.writeMultiPolygonGeometry_=function(n,t){for(var f,h,e=t.getCoordinates(),r=0,c=e.length;r<c;++r)for(var o=e[r],u=0,l=o.length;u<l;++u)for(var s=o[u],i=0,a=s.length-1;i<a;++i)f=s.slice(i,i+2),h={feature:n,segment:f},this.rBush_.insert(hi(f),h)},t.prototype.writePointGeometry_=function(n,t){var i=t.getCoordinates(),r={feature:n,segment:[i,i]};this.rBush_.insert(t.getExtent(),r)},t.prototype.writePolygonGeometry_=function(n,t){for(var u,o,f=t.getCoordinates(),r=0,s=f.length;r<s;++r)for(var e=f[r],i=0,h=e.length-1;i<h;++i)u=e.slice(i,i+2),o={feature:n,segment:u},this.rBush_.insert(hi(u),o)},t}(lf),tfi="translatestart",ifi="translating",rfi="translateend",ktt=function(n){function t(t,i,r){n.call(this,t);this.features=i;this.coordinate=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(fr),ufi=function(n){function t(t){var r,i=t||{},u;(n.call(this,i),this.lastCoordinate_=null,this.features_=void 0!==i.features?i.features:null,i.layers)?"function"==typeof i.layers?r=i.layers:(u=i.layers,r=function(n){return tr(u,n)}):r=bu;this.layerFilter_=r;this.hitTolerance_=i.hitTolerance?i.hitTolerance:0;this.lastFeature_=null;o(this,ni(tv.ACTIVE),this.handleActiveChanged_,this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleDownEvent=function(n){if(this.lastFeature_=this.featuresAtPixel_(n.pixel,n.map),!this.lastCoordinate_&&this.lastFeature_){this.lastCoordinate_=n.coordinate;this.handleMoveEvent(n);var t=this.features_||new er([this.lastFeature_]);return this.dispatchEvent(new ktt(tfi,t,n.coordinate)),!0}return!1},t.prototype.handleUpEvent=function(n){if(this.lastCoordinate_){this.lastCoordinate_=null;this.handleMoveEvent(n);var t=this.features_||new er([this.lastFeature_]);return this.dispatchEvent(new ktt(rfi,t,n.coordinate)),!0}return!1},t.prototype.handleDragEvent=function(n){if(this.lastCoordinate_){var t=n.coordinate,r=t[0]-this.lastCoordinate_[0],u=t[1]-this.lastCoordinate_[1],i=this.features_||new er([this.lastFeature_]);i.forEach(function(n){var t=n.getGeometry();t.translate(r,u);n.setGeometry(t)});this.lastCoordinate_=t;this.dispatchEvent(new ktt(ifi,i,t))}},t.prototype.handleMoveEvent=function(n){var t=n.map.getViewport();this.featuresAtPixel_(n.pixel,n.map)?(t.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),t.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):t.classList.remove("ol-grab","ol-grabbing")},t.prototype.featuresAtPixel_=function(n,t){return t.forEachFeatureAtPixel(n,function(n){if(!this.features_||tr(this.features_.getArray(),n))return n}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},t.prototype.getHitTolerance=function(){return this.hitTolerance_},t.prototype.setHitTolerance=function(n){this.hitTolerance_=n},t.prototype.setMap=function(t){var i=this.getMap();n.prototype.setMap.call(this,t);this.updateState_(i)},t.prototype.handleActiveChanged_=function(){this.updateState_(null)},t.prototype.updateState_=function(n){var t=this.getMap(),i=this.getActive();t&&i||(t=t||n)&&t.getViewport().classList.remove("ol-grab","ol-grabbing")},t}(lf);ys=function(n){function t(t){n.call(this);this.geometries_=t||null;this.listenGeometriesChange_()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.unlistenGeometriesChange_=function(){if(this.geometries_)for(var n=0,t=this.geometries_.length;n<t;++n)ou(this.geometries_[n],a.CHANGE,this.changed,this)},t.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var n=0,t=this.geometries_.length;n<t;++n)o(this.geometries_[n],a.CHANGE,this.changed,this)},t.prototype.clone=function(){var n=new t(null);return n.setGeometries(this.geometries_),n},t.prototype.closestPointXY=function(n,t,i,r){if(r<ih(this.getExtent(),n,t))return r;for(var f=this.geometries_,u=0,e=f.length;u<e;++u)r=f[u].closestPointXY(n,t,i,r);return r},t.prototype.containsXY=function(n,t){for(var r=this.geometries_,i=0,u=r.length;i<u;++i)if(r[i].containsXY(n,t))return!0;return!1},t.prototype.computeExtent=function(n){rh(n);for(var i=this.geometries_,t=0,r=i.length;t<r;++t)rp(n,i[t].getExtent());return n},t.prototype.getGeometries=function(){return glt(this.geometries_)},t.prototype.getGeometriesArray=function(){return this.geometries_},t.prototype.getSimplifiedGeometry=function(n){var i,f,e,r;if(this.simplifiedGeometryRevision!=this.getRevision()&&(pf(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),n<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&n<this.simplifiedGeometryMaxMinSquaredTolerance)return this;if(i=n.toString(),this.simplifiedGeometryCache.hasOwnProperty(i))return this.simplifiedGeometryCache[i];for(var o=[],s=this.geometries_,h=!1,u=0,c=s.length;u<c;++u)f=s[u],e=f.getSimplifiedGeometry(n),o.push(e),e!==f&&(h=!0);return h?(r=new t(null),r.setGeometriesArray(o),this.simplifiedGeometryCache[i]=r,r):(this.simplifiedGeometryMaxMinSquaredTolerance=n,this)},t.prototype.getType=function(){return f.GEOMETRY_COLLECTION},t.prototype.intersectsExtent=function(n){for(var i=this.geometries_,t=0,r=i.length;t<r;++t)if(i[t].intersectsExtent(n))return!0;return!1},t.prototype.isEmpty=function(){return 0===this.geometries_.length},t.prototype.rotate=function(n,t){for(var r=this.geometries_,i=0,u=r.length;i<u;++i)r[i].rotate(n,t);this.changed()},t.prototype.scale=function(n,t,i){var r=i;r||(r=su(this.getExtent()));for(var f=this.geometries_,u=0,e=f.length;u<e;++u)f[u].scale(n,t,r);this.changed()},t.prototype.setGeometries=function(n){this.setGeometriesArray(glt(n))},t.prototype.setGeometriesArray=function(n){this.unlistenGeometriesChange_();this.geometries_=n;this.listenGeometriesChange_();this.changed()},t.prototype.applyTransform=function(n){for(var i=this.geometries_,t=0,r=i.length;t<r;++t)i[t].applyTransform(n);this.changed()},t.prototype.translate=function(n,t){for(var r=this.geometries_,i=0,u=r.length;i<u;++i)r[i].translate(n,t);this.changed()},t.prototype.disposeInternal=function(){this.unlistenGeometriesChange_();n.prototype.disposeInternal.call(this)},t}(yp);tf=function(){this.dataProjection=null;this.defaultFeatureProjection=null};tf.prototype.getReadOptions=function(n,t){var i;return t&&(i={dataProjection:t.dataProjection?t.dataProjection:this.readProjection(n),featureProjection:t.featureProjection}),this.adaptOptions(i)};tf.prototype.adaptOptions=function(n){return nt({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},n)};tf.prototype.getLastExtent=function(){return null};tf.prototype.getType=function(){return p()};tf.prototype.readFeature=function(){return p()};tf.prototype.readFeatures=function(){return p()};tf.prototype.readGeometry=function(){return p()};tf.prototype.readProjection=function(){return p()};tf.prototype.writeFeature=function(){return p()};tf.prototype.writeFeatures=function(){return p()};tf.prototype.writeGeometry=function(){return p()};dl=tf;tk=function(n){function t(){n.call(this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getType=function(){return ro.JSON},t.prototype.readFeature=function(n,t){return this.readFeatureFromObject(nk(n),this.getReadOptions(n,t))},t.prototype.readFeatures=function(n,t){return this.readFeaturesFromObject(nk(n),this.getReadOptions(n,t))},t.prototype.readFeatureFromObject=function(){return p()},t.prototype.readFeaturesFromObject=function(){return p()},t.prototype.readGeometry=function(n,t){return this.readGeometryFromObject(nk(n),this.getReadOptions(n,t))},t.prototype.readGeometryFromObject=function(){return p()},t.prototype.readProjection=function(n){return this.readProjectionFromObject(nk(n))},t.prototype.readProjectionFromObject=function(){return p()},t.prototype.writeFeature=function(n,t){return JSON.stringify(this.writeFeatureObject(n,t))},t.prototype.writeFeatureObject=function(){return p()},t.prototype.writeFeatures=function(n,t){return JSON.stringify(this.writeFeaturesObject(n,t))},t.prototype.writeFeaturesObject=function(){return p()},t.prototype.writeGeometry=function(n,t){return JSON.stringify(this.writeGeometryObject(n,t))},t.prototype.writeGeometryObject=function(){return p()},t}(dl);ps={};ps[f.POINT]=function(n){return void 0!==n.m&&void 0!==n.z?new ei([n.x,n.y,n.z,n.m],v.XYZM):void 0!==n.z?new ei([n.x,n.y,n.z],v.XYZ):void 0!==n.m?new ei([n.x,n.y,n.m],v.XYM):new ei([n.x,n.y])};ps[f.LINE_STRING]=function(n){var t=gl(n);return new yi(n.paths[0],t)};ps[f.POLYGON]=function(n){var t=gl(n);return new or(n.rings,t)};ps[f.MULTI_POINT]=function(n){var t=gl(n);return new pe(n.points,t)};ps[f.MULTI_LINE_STRING]=function(n){var t=gl(n);return new yf(n.paths,t)};ps[f.MULTI_POLYGON]=function(n){var t=gl(n);return new we(n.rings,t)};ws={};ws[f.POINT]=function(n){var i,t=n.getCoordinates(),r=n.getLayout();return r===v.XYZ?i={x:t[0],y:t[1],z:t[2]}:r===v.XYM?i={x:t[0],y:t[1],m:t[2]}:r===v.XYZM?i={x:t[0],y:t[1],z:t[2],m:t[3]}:r===v.XY?i={x:t[0],y:t[1]}:g(!1,34),i};ws[f.LINE_STRING]=function(n){var t=n,i=ey(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:[t.getCoordinates()]}};ws[f.POLYGON]=function(n){var t=n,i=ey(t);return{hasZ:i.hasZ,hasM:i.hasM,rings:t.getCoordinates(!1)}};ws[f.MULTI_POINT]=function(n){var t=n,i=ey(t);return{hasZ:i.hasZ,hasM:i.hasM,points:t.getCoordinates()}};ws[f.MULTI_LINE_STRING]=function(n){var t=n,i=ey(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:t.getCoordinates()}};ws[f.MULTI_POLYGON]=function(n){for(var i,u=ey(n),r=n.getCoordinates(!1),f=[],t=0;t<r.length;t++)for(i=r[t].length-1;i>=0;i--)f.push(r[t][i]);return{hasZ:u.hasZ,hasM:u.hasM,rings:f}};var ffi=function(n){function t(t){var i=t||{};n.call(this);this.geometryName_=i.geometryName}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFeatureFromObject=function(n,t){var i=n,u=nat(i.geometry,t),r=new fi;return this.geometryName_&&r.setGeometryName(this.geometryName_),r.setGeometry(u),t&&t.idField&&i.attributes[t.idField]&&r.setId(i.attributes[t.idField]),i.attributes&&r.setProperties(i.attributes),r},t.prototype.readFeaturesFromObject=function(n,t){var r=t||{},u,f,i,e;if(n.features){for(u=[],f=n.features,r.idField=n.objectIdFieldName,i=0,e=f.length;i<e;++i)u.push(this.readFeatureFromObject(f[i],r));return u}return[this.readFeatureFromObject(n,r)]},t.prototype.readGeometryFromObject=function(n,t){return nat(n,t)},t.prototype.readProjectionFromObject=function(n){return n.spatialReference&&void 0!==n.spatialReference.wkid?w("EPSG:"+n.spatialReference.wkid):null},t.prototype.writeGeometryObject=function(n,t){return tat(n,this.adaptOptions(t))},t.prototype.writeFeatureObject=function(n,t){var i,u,r;return t=this.adaptOptions(t),i={},u=n.getGeometry(),u&&(i.geometry=tat(u,t),t&&t.featureProjection&&(i.geometry.spatialReference={wkid:Number(w(t.featureProjection).getCode().split(":").pop())})),r=n.getProperties(),delete r[n.getGeometryName()],i.attributes=wu(r)?{}:r,i},t.prototype.writeFeaturesObject=function(n,t){t=this.adaptOptions(t);for(var r=[],i=0,u=n.length;i<u;++i)r.push(this.writeFeatureObject(n[i],t));return{features:r}},t}(tk),na=function(n){function t(){n.call(this);this.xmlSerializer_=new XMLSerializer}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getType=function(){return ro.XML},t.prototype.readFeature=function(n,t){if(n){if("string"==typeof n){var i=ue(n);return this.readFeatureFromDocument(i,t)}return ye(n)?this.readFeatureFromDocument(n,t):this.readFeatureFromNode(n,t)}return null},t.prototype.readFeatureFromDocument=function(n,t){var i=this.readFeaturesFromDocument(n,t);return i.length>0?i[0]:null},t.prototype.readFeatureFromNode=function(){return null},t.prototype.readFeatures=function(n,t){if(n){if("string"==typeof n){var i=ue(n);return this.readFeaturesFromDocument(i,t)}return ye(n)?this.readFeaturesFromDocument(n,t):this.readFeaturesFromNode(n,t)}return[]},t.prototype.readFeaturesFromDocument=function(n,t){for(var r=[],i=n.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&pt(r,this.readFeaturesFromNode(i,t));return r},t.prototype.readFeaturesFromNode=function(){return p()},t.prototype.readGeometry=function(n,t){if(n){if("string"==typeof n){var i=ue(n);return this.readGeometryFromDocument(i,t)}return ye(n)?this.readGeometryFromDocument(n,t):this.readGeometryFromNode(n,t)}return null},t.prototype.readGeometryFromDocument=function(){return null},t.prototype.readGeometryFromNode=function(){return null},t.prototype.readProjection=function(n){if(n){if("string"==typeof n){var t=ue(n);return this.readProjectionFromDocument(t)}return ye(n)?this.readProjectionFromDocument(n):this.readProjectionFromNode(n)}return null},t.prototype.readProjectionFromDocument=function(){return this.dataProjection},t.prototype.readProjectionFromNode=function(){return this.dataProjection},t.prototype.writeFeature=function(n,t){var i=this.writeFeatureNode(n,t);return this.xmlSerializer_.serializeToString(i)},t.prototype.writeFeatureNode=function(){return null},t.prototype.writeFeatures=function(n,t){var i=this.writeFeaturesNode(n,t);return this.xmlSerializer_.serializeToString(i)},t.prototype.writeFeaturesNode=function(){return null},t.prototype.writeGeometry=function(n,t){var i=this.writeGeometryNode(n,t);return this.xmlSerializer_.serializeToString(i)},t.prototype.writeGeometryNode=function(){return null},t}(dl),be="http://www.opengis.net/gml",efi=/^[\s\xa0]*$/,wi=function(n){function t(t){n.call(this);var i=t||{};this.featureType=i.featureType;this.featureNS=i.featureNS;this.srsName=i.srsName;this.schemaLocation="";this.FEATURE_COLLECTION_PARSERS={};this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:b(this.readFeaturesInternal),featureMembers:tt(this.readFeaturesInternal)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFeaturesInternal=function(n,t){var u=n.localName,f=null,c,k,l,v,y,nt,p,e,w;if("FeatureCollection"==u)f=h([],this.FEATURE_COLLECTION_PARSERS,n,t,this);else if("featureMembers"==u||"featureMember"==u){var s=t[0],r=s.featureType,i=s.featureNS;if(!r&&n.childNodes){for(r=[],i={},c=0,k=n.childNodes.length;c<k;++c)if(l=n.childNodes[c],1===l.nodeType&&(v=l.nodeName.split(":").pop(),-1===r.indexOf(v))){var a="",d=0,g=l.namespaceURI;for(y in i){if(i[y]===g){a=y;break}++d}a||(i[a="p"+d]=g);r.push(a+":"+v)}"featureMember"!=u&&(s.featureType=r,s.featureNS=i)}"string"==typeof i&&(nt=i,(i={}).p0=nt);p={};e=Array.isArray(r)?r:[r];for(w in i){for(var it={},o=0,rt=e.length;o<rt;++o)(-1===e[o].indexOf(":")?"p0":e[o].split(":")[0])===w&&(it[e[o].split(":").pop()]="featureMembers"==u?b(this.readFeatureElement,this):tt(this.readFeatureElement,this));p[i[w]]=it}f=h("featureMember"==u?void 0:[],p,n,t)}return null===f&&(f=[]),f},t.prototype.readGeometryElement=function(n,t){var i=t[0],r;return i.srsName=n.firstElementChild.getAttribute("srsName"),i.srsDimension=n.firstElementChild.getAttribute("srsDimension"),r=h(null,this.GEOMETRY_PARSERS,n,t,this),r?si(r,!1,i):void 0},t.prototype.readFeatureElementInternal=function(n,t,i){for(var h,e,f,c,o,a,s,l,u={},r=n.firstElementChild;r;r=r.nextElementSibling)if(e=void 0,f=r.localName,0===r.childNodes.length||1===r.childNodes.length&&(3===r.firstChild.nodeType||4===r.firstChild.nodeType)?(e=fu(r,!1),efi.test(e)&&(e=void 0)):(i&&(e=this.readGeometryElement(r,t)),e?"boundedBy"!==f&&(h=f):e=this.readFeatureElementInternal(r,t,!1)),u[f]?(u[f]instanceof Array||(u[f]=[u[f]]),u[f].push(e)):u[f]=e,c=r.attributes.length,c>0)for(u[f]={_content_:u[f]},o=0;o<c;o++)a=r.attributes[o].name,u[f][a]=r.attributes[o].value;return i?(s=new fi(u),h&&s.setGeometryName(h),l=n.getAttribute("fid")||function(n,t,i){return n.getAttributeNS(t,i)||""}(n,this.namespace,"id"),l&&s.setId(l),s):u},t.prototype.readFeatureElement=function(n,t){return this.readFeatureElementInternal(n,t,!0)},t.prototype.readPoint=function(n,t){var i=this.readFlatCoordinatesFromNode_(n,t);if(i)return new ei(i,v.XYZ)},t.prototype.readMultiPoint=function(n,t){var i=h([],this.MULTIPOINT_PARSERS_,n,t,this);if(i)return new pe(i)},t.prototype.readMultiLineString=function(n,t){var i=h([],this.MULTILINESTRING_PARSERS_,n,t,this);if(i)return new yf(i)},t.prototype.readMultiPolygon=function(n,t){var i=h([],this.MULTIPOLYGON_PARSERS_,n,t,this);if(i)return new we(i)},t.prototype.pointMemberParser_=function(n,t){vu(this.POINTMEMBER_PARSERS_,n,t,this)},t.prototype.lineStringMemberParser_=function(n,t){vu(this.LINESTRINGMEMBER_PARSERS_,n,t,this)},t.prototype.polygonMemberParser_=function(n,t){vu(this.POLYGONMEMBER_PARSERS_,n,t,this)},t.prototype.readLineString=function(n,t){var i=this.readFlatCoordinatesFromNode_(n,t);if(i)return new yi(i,v.XYZ)},t.prototype.readFlatLinearRing_=function(n,t){var i=h(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,n,t,this);return i||void 0},t.prototype.readLinearRing=function(n,t){var i=this.readFlatCoordinatesFromNode_(n,t);if(i)return new lh(i,v.XYZ)},t.prototype.readPolygon=function(n,t){var i=h([null],this.FLAT_LINEAR_RINGS_PARSERS,n,t,this),u,e,r,f;if(i&&i[0]){for(r=i[0],f=[r.length],u=1,e=i.length;u<e;++u)pt(r,i[u]),f.push(r.length);return new or(r,v.XYZ,f)}},t.prototype.readFlatCoordinatesFromNode_=function(n,t){return h(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,n,t,this)},t.prototype.readGeometryFromNode=function(n,t){var i=this.readGeometryElement(n,[this.getReadOptions(n,t||{})]);return i||null},t.prototype.readFeaturesFromNode=function(n,t){var i={featureType:this.featureType,featureNS:this.featureNS};return t&&nt(i,this.getReadOptions(n,t)),this.readFeaturesInternal(n,[i])||[]},t.prototype.readProjectionFromNode=function(n){return w(this.srsName?this.srsName:n.firstElementChild.getAttribute("srsName"))},t}(na);wi.prototype.namespace=be;wi.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}};wi.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}};wi.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}};wi.prototype.MULTIPOINT_PARSERS_={"http://www.opengis.net/gml":{pointMember:b(wi.prototype.pointMemberParser_),pointMembers:b(wi.prototype.pointMemberParser_)}};wi.prototype.MULTILINESTRING_PARSERS_={"http://www.opengis.net/gml":{lineStringMember:b(wi.prototype.lineStringMemberParser_),lineStringMembers:b(wi.prototype.lineStringMemberParser_)}};wi.prototype.MULTIPOLYGON_PARSERS_={"http://www.opengis.net/gml":{polygonMember:b(wi.prototype.polygonMemberParser_),polygonMembers:b(wi.prototype.polygonMemberParser_)}};wi.prototype.POINTMEMBER_PARSERS_={"http://www.opengis.net/gml":{Point:b(wi.prototype.readFlatCoordinatesFromNode_)}};wi.prototype.LINESTRINGMEMBER_PARSERS_={"http://www.opengis.net/gml":{LineString:b(wi.prototype.readLineString)}};wi.prototype.POLYGONMEMBER_PARSERS_={"http://www.opengis.net/gml":{Polygon:b(wi.prototype.readPolygon)}};wi.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:tt(wi.prototype.readFlatLinearRing_)}};ct=wi;var ofi=be+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",sfi={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},k=function(n){function t(t){var i=t||{};n.call(this,i);this.surface_=void 0!==i.surface&&i.surface;this.curve_=void 0!==i.curve&&i.curve;this.multiCurve_=void 0===i.multiCurve||i.multiCurve;this.multiSurface_=void 0===i.multiSurface||i.multiSurface;this.schemaLocation=i.schemaLocation?i.schemaLocation:ofi;this.hasZ=void 0!==i.hasZ&&i.hasZ}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readMultiCurve_=function(n,t){var i=h([],this.MULTICURVE_PARSERS_,n,t,this);if(i)return new yf(i)},t.prototype.readMultiSurface_=function(n,t){var i=h([],this.MULTISURFACE_PARSERS_,n,t,this);if(i)return new we(i)},t.prototype.curveMemberParser_=function(n,t){vu(this.CURVEMEMBER_PARSERS_,n,t,this)},t.prototype.surfaceMemberParser_=function(n,t){vu(this.SURFACEMEMBER_PARSERS_,n,t,this)},t.prototype.readPatch_=function(n,t){return h([null],this.PATCHES_PARSERS_,n,t,this)},t.prototype.readSegment_=function(n,t){return h([null],this.SEGMENTS_PARSERS_,n,t,this)},t.prototype.readPolygonPatch_=function(n,t){return h([null],this.FLAT_LINEAR_RINGS_PARSERS,n,t,this)},t.prototype.readLineStringSegment_=function(n,t){return h([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,n,t,this)},t.prototype.interiorParser_=function(n,t){var i=h(void 0,this.RING_PARSERS,n,t,this);i&&t[t.length-1].push(i)},t.prototype.exteriorParser_=function(n,t){var i=h(void 0,this.RING_PARSERS,n,t,this);i&&(t[t.length-1][0]=i)},t.prototype.readSurface_=function(n,t){var i=h([null],this.SURFACE_PARSERS_,n,t,this),u,e,r,f;if(i&&i[0]){for(r=i[0],f=[r.length],u=1,e=i.length;u<e;++u)pt(r,i[u]),f.push(r.length);return new or(r,v.XYZ,f)}},t.prototype.readCurve_=function(n,t){var i=h([null],this.CURVE_PARSERS_,n,t,this);if(i)return new yi(i,v.XYZ)},t.prototype.readEnvelope_=function(n,t){var i=h([null],this.ENVELOPE_PARSERS_,n,t,this);return ef(i[1][0],i[1][1],i[2][0],i[2][1])},t.prototype.readFlatPos_=function(n,t){for(var r,h,e,o,c,l,s,f,u=fu(n,!1),i=[];f=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/.exec(u);)i.push(parseFloat(f[1])),u=u.substr(f[0].length);if(""===u){if(e=t[0].srsName,o="enu",e&&(o=w(e).getAxisOrientation()),"neu"===o)for(r=0,h=i.length;r<h;r+=3)c=i[r],l=i[r+1],i[r]=l,i[r+1]=c;if(s=i.length,2==s&&i.push(0),0!==s)return i}},t.prototype.readFlatPosList_=function(n,t){var v=fu(n,!1).replace(/^\s*|\s*$/g,""),h=t[0],c=h.srsName,l=h.srsDimension,a="enu",f,e,o,r,i;c&&(a=w(c).getAxisOrientation());r=v.split(/\s+/);i=2;n.getAttribute("srsDimension")?i=eo(n.getAttribute("srsDimension")):n.getAttribute("dimension")?i=eo(n.getAttribute("dimension")):n.parentNode.getAttribute("srsDimension")?i=eo(n.parentNode.getAttribute("srsDimension")):l&&(i=eo(l));for(var s=[],u=0,y=r.length;u<y;u+=i)f=parseFloat(r[u]),e=parseFloat(r[u+1]),o=3===i?parseFloat(r[u+2]):0,"en"===a.substr(0,2)?s.push(f,e,o):s.push(e,f,o);return s},t.prototype.writePos_=function(n,t,i){var o=i[i.length-1],s=o.hasZ,h=s?"3":"2",u,f,e,r;n.setAttribute("srsDimension",h);u=o.srsName;f="enu";u&&(f=w(u).getAxisOrientation());r=t.getCoordinates();(e="en"===f.substr(0,2)?r[0]+" "+r[1]:r[1]+" "+r[0],s)&&(e+=" "+(r[2]||0));ut(n,e)},t.prototype.getCoords_=function(n,t,i){var u="enu",r;return t&&(u=w(t).getAxisOrientation()),r="en"===u.substr(0,2)?n[0]+" "+n[1]:n[1]+" "+n[0],i&&(r+=" "+(n[2]||0)),r},t.prototype.writePosList_=function(n,t,i){var u=i[i.length-1],f=u.hasZ,c=f?"3":"2";n.setAttribute("srsDimension",c);for(var e,l=u.srsName,o=t.getCoordinates(),s=o.length,h=new Array(s),r=0;r<s;++r)e=o[r],h[r]=this.getCoords_(e,l,f);ut(n,h.join(" "))},t.prototype.writePoint_=function(n,t,i){var u=i[i.length-1].srsName,r;u&&n.setAttribute("srsName",u);r=rt(n.namespaceURI,"pos");n.appendChild(r);this.writePos_(r,t,i)},t.prototype.writeEnvelope=function(n,t,i){var r=i[i.length-1].srsName,u;r&&n.setAttribute("srsName",r);u=[t[0]+" "+t[1],t[2]+" "+t[3]];it({node:n},this.ENVELOPE_SERIALIZERS_,hr,u,i,["lowerCorner","upperCorner"],this)},t.prototype.writeLinearRing_=function(n,t,i){var u=i[i.length-1].srsName,r;u&&n.setAttribute("srsName",u);r=rt(n.namespaceURI,"posList");n.appendChild(r);this.writePosList_(r,t,i)},t.prototype.RING_NODE_FACTORY_=function(n,t){var i=t[t.length-1],u=i.node,r=i.exteriorWritten;return void 0===r&&(i.exteriorWritten=!0),rt(u.namespaceURI,void 0!==r?"interior":"exterior")},t.prototype.writeSurfaceOrPolygon_=function(n,t,i){var f=i[i.length-1],o=f.hasZ,r=f.srsName,e,u;("PolygonPatch"!==n.nodeName&&r&&n.setAttribute("srsName",r),"Polygon"===n.nodeName||"PolygonPatch"===n.nodeName)?(e=t.getLinearRings(),it({node:n,hasZ:o,srsName:r},this.RING_SERIALIZERS_,this.RING_NODE_FACTORY_,e,i,void 0,this)):"Surface"===n.nodeName&&(u=rt(n.namespaceURI,"patches"),n.appendChild(u),this.writeSurfacePatches_(u,t,i))},t.prototype.writeCurveOrLineString_=function(n,t,i){var f=i[i.length-1].srsName,r,u;("LineStringSegment"!==n.nodeName&&f&&n.setAttribute("srsName",f),"LineString"===n.nodeName||"LineStringSegment"===n.nodeName)?(r=rt(n.namespaceURI,"posList"),n.appendChild(r),this.writePosList_(r,t,i)):"Curve"===n.nodeName&&(u=rt(n.namespaceURI,"segments"),n.appendChild(u),this.writeCurveSegments_(u,t,i))},t.prototype.writeMultiSurfaceOrPolygon_=function(n,t,i){var r=i[i.length-1],e=r.hasZ,u=r.srsName,o=r.surface,f;u&&n.setAttribute("srsName",u);f=t.getPolygons();it({node:n,hasZ:e,srsName:u,surface:o},this.SURFACEORPOLYGONMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,f,i,void 0,this)},t.prototype.writeMultiPoint_=function(n,t,i){var u=i[i.length-1],r=u.srsName,e=u.hasZ,f;r&&n.setAttribute("srsName",r);f=t.getPoints();it({node:n,hasZ:e,srsName:r},this.POINTMEMBER_SERIALIZERS_,gt("pointMember"),f,i,void 0,this)},t.prototype.writeMultiCurveOrLineString_=function(n,t,i){var r=i[i.length-1],e=r.hasZ,u=r.srsName,o=r.curve,f;u&&n.setAttribute("srsName",u);f=t.getLineStrings();it({node:n,hasZ:e,srsName:u,curve:o},this.LINESTRINGORCURVEMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,f,i,void 0,this)},t.prototype.writeRing_=function(n,t,i){var r=rt(n.namespaceURI,"LinearRing");n.appendChild(r);this.writeLinearRing_(r,t,i)},t.prototype.writeSurfaceOrPolygonMember_=function(n,t,i){var r=this.GEOMETRY_NODE_FACTORY_(t,i);r&&(n.appendChild(r),this.writeSurfaceOrPolygon_(r,t,i))},t.prototype.writePointMember_=function(n,t,i){var r=rt(n.namespaceURI,"Point");n.appendChild(r);this.writePoint_(r,t,i)},t.prototype.writeLineStringOrCurveMember_=function(n,t,i){var r=this.GEOMETRY_NODE_FACTORY_(t,i);r&&(n.appendChild(r),this.writeCurveOrLineString_(r,t,i))},t.prototype.writeSurfacePatches_=function(n,t,i){var r=rt(n.namespaceURI,"PolygonPatch");n.appendChild(r);this.writeSurfaceOrPolygon_(r,t,i)},t.prototype.writeCurveSegments_=function(n,t,i){var r=rt(n.namespaceURI,"LineStringSegment");n.appendChild(r);this.writeCurveOrLineString_(r,t,i)},t.prototype.writeGeometryElement=function(n,t,i){var u,r=i[i.length-1],f=nt({},r);f.node=n;u=Array.isArray(t)?r.dataProjection?bo(t,r.featureProjection,r.dataProjection):t:si(t,!0,r);it(f,this.GEOMETRY_SERIALIZERS_,this.GEOMETRY_NODE_FACTORY_,[u],i,void 0,this)},t.prototype.writeFeatureElement=function(n,t,i){var h=t.getId(),u,o,s;h&&n.setAttribute("fid",h);var r=i[i.length-1],f=r.featureNS,v=t.getGeometryName();r.serializers||(r.serializers={},r.serializers[f]={});var c=t.getProperties(),l=[],a=[];for(u in c)o=c[u],null!==o&&(l.push(u),a.push(o),u==v||"function"==typeof o.getSimplifiedGeometry?u in r.serializers[f]||(r.serializers[f][u]=e(this.writeGeometryElement,this)):u in r.serializers[f]||(r.serializers[f][u]=e(ut)));s=nt({},r);s.node=n;it(s,r.serializers,gt(void 0,f),a,i,l)},t.prototype.writeFeatureMembers_=function(n,t,i){var r=i[i.length-1],s=r.featureType,u=r.featureNS,f={},o;f[u]={};f[u][s]=e(this.writeFeatureElement,this);o=nt({},r);o.node=n;it(o,f,gt(s,u),t,i)},t.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(n,t){var i=t[t.length-1].node;return rt(this.namespace,sfi[i.nodeName])},t.prototype.GEOMETRY_NODE_FACTORY_=function(n,t){var i,r=t[t.length-1],u=r.multiSurface,f=r.surface,e=r.curve,o=r.multiCurve;return Array.isArray(n)?i="Envelope":"MultiPolygon"===(i=n.getType())&&!0===u?i="MultiSurface":"Polygon"===i&&!0===f?i="Surface":"LineString"===i&&!0===e?i="Curve":"MultiLineString"===i&&!0===o&&(i="MultiCurve"),rt(this.namespace,i)},t.prototype.writeGeometryNode=function(n,t){t=this.adaptOptions(t);var i=rt(this.namespace,"geom"),r={node:i,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return t&&nt(r,t),this.writeGeometryElement(i,n,[r]),i},t.prototype.writeFeaturesNode=function(n,t){var i,r;return t=this.adaptOptions(t),i=rt(this.namespace,"featureMembers"),i.setAttributeNS(hs,"xsi:schemaLocation",this.schemaLocation),r={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType},t&&nt(r,t),this.writeFeatureMembers_(i,n,[r]),i},t}(ct);k.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:tt(k.prototype.readFlatPos_),posList:tt(k.prototype.readFlatPosList_)}};k.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:k.prototype.interiorParser_,exterior:k.prototype.exteriorParser_}};k.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:tt(ct.prototype.readPoint),MultiPoint:tt(ct.prototype.readMultiPoint),LineString:tt(ct.prototype.readLineString),MultiLineString:tt(ct.prototype.readMultiLineString),LinearRing:tt(ct.prototype.readLinearRing),Polygon:tt(ct.prototype.readPolygon),MultiPolygon:tt(ct.prototype.readMultiPolygon),Surface:tt(k.prototype.readSurface_),MultiSurface:tt(k.prototype.readMultiSurface_),Curve:tt(k.prototype.readCurve_),MultiCurve:tt(k.prototype.readMultiCurve_),Envelope:tt(k.prototype.readEnvelope_)}};k.prototype.MULTICURVE_PARSERS_={"http://www.opengis.net/gml":{curveMember:b(k.prototype.curveMemberParser_),curveMembers:b(k.prototype.curveMemberParser_)}};k.prototype.MULTISURFACE_PARSERS_={"http://www.opengis.net/gml":{surfaceMember:b(k.prototype.surfaceMemberParser_),surfaceMembers:b(k.prototype.surfaceMemberParser_)}};k.prototype.CURVEMEMBER_PARSERS_={"http://www.opengis.net/gml":{LineString:b(ct.prototype.readLineString),Curve:b(k.prototype.readCurve_)}};k.prototype.SURFACEMEMBER_PARSERS_={"http://www.opengis.net/gml":{Polygon:b(ct.prototype.readPolygon),Surface:b(k.prototype.readSurface_)}};k.prototype.SURFACE_PARSERS_={"http://www.opengis.net/gml":{patches:tt(k.prototype.readPatch_)}};k.prototype.CURVE_PARSERS_={"http://www.opengis.net/gml":{segments:tt(k.prototype.readSegment_)}};k.prototype.ENVELOPE_PARSERS_={"http://www.opengis.net/gml":{lowerCorner:b(k.prototype.readFlatPosList_),upperCorner:b(k.prototype.readFlatPosList_)}};k.prototype.PATCHES_PARSERS_={"http://www.opengis.net/gml":{PolygonPatch:tt(k.prototype.readPolygonPatch_)}};k.prototype.SEGMENTS_PARSERS_={"http://www.opengis.net/gml":{LineStringSegment:tt(k.prototype.readLineStringSegment_)}};k.prototype.writeFeatures;k.prototype.RING_SERIALIZERS_={"http://www.opengis.net/gml":{exterior:e(k.prototype.writeRing_),interior:e(k.prototype.writeRing_)}};k.prototype.ENVELOPE_SERIALIZERS_={"http://www.opengis.net/gml":{lowerCorner:e(ut),upperCorner:e(ut)}};k.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{surfaceMember:e(k.prototype.writeSurfaceOrPolygonMember_),polygonMember:e(k.prototype.writeSurfaceOrPolygonMember_)}};k.prototype.POINTMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{pointMember:e(k.prototype.writePointMember_)}};k.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{lineStringMember:e(k.prototype.writeLineStringOrCurveMember_),curveMember:e(k.prototype.writeLineStringOrCurveMember_)}};k.prototype.GEOMETRY_SERIALIZERS_={"http://www.opengis.net/gml":{Curve:e(k.prototype.writeCurveOrLineString_),MultiCurve:e(k.prototype.writeMultiCurveOrLineString_),Point:e(k.prototype.writePoint_),MultiPoint:e(k.prototype.writeMultiPoint_),LineString:e(k.prototype.writeCurveOrLineString_),MultiLineString:e(k.prototype.writeMultiCurveOrLineString_),LinearRing:e(k.prototype.writeLinearRing_),Polygon:e(k.prototype.writeSurfaceOrPolygon_),MultiPolygon:e(k.prototype.writeMultiSurfaceOrPolygon_),Surface:e(k.prototype.writeSurfaceOrPolygon_),MultiSurface:e(k.prototype.writeMultiSurfaceOrPolygon_),Envelope:e(k.prototype.writeEnvelope)}};et=k;uk=et;uk.prototype.writeFeatures;uk.prototype.writeFeaturesNode;var hfi=uk,cfi=be+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",lfi={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},vt=function(n){function t(t){var i=t||{};n.call(this,i);this.FEATURE_COLLECTION_PARSERS[be].featureMember=b(this.readFeaturesInternal);this.schemaLocation=i.schemaLocation?i.schemaLocation:cfi}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFlatCoordinates_=function(n,t){var a=fu(n,!1).replace(/^\s*|\s*$/g,""),e=t[0].srsName,o="enu",r;e&&(r=w(e),r&&(o=r.getAxisOrientation()));for(var s=a.trim().split(/\s+/),u=[],f=0,v=s.length;f<v;f++){var i=s[f].split(/,+/),h=parseFloat(i[0]),c=parseFloat(i[1]),l=3===i.length?parseFloat(i[2]):0;"en"===o.substr(0,2)?u.push(h,c,l):u.push(c,h,l)}return u},t.prototype.readBox_=function(n,t){var i=h([null],this.BOX_PARSERS_,n,t,this);return ef(i[1][0],i[1][1],i[1][3],i[1][4])},t.prototype.innerBoundaryIsParser_=function(n,t){var i=h(void 0,this.RING_PARSERS,n,t,this);i&&t[t.length-1].push(i)},t.prototype.outerBoundaryIsParser_=function(n,t){var i=h(void 0,this.RING_PARSERS,n,t,this);i&&(t[t.length-1][0]=i)},t.prototype.GEOMETRY_NODE_FACTORY_=function(n,t){var i,r=t[t.length-1],u=r.multiSurface,f=r.surface,e=r.multiCurve;return Array.isArray(n)?i="Envelope":"MultiPolygon"===(i=n.getType())&&!0===u?i="MultiSurface":"Polygon"===i&&!0===f?i="Surface":"MultiLineString"===i&&!0===e&&(i="MultiCurve"),rt("http://www.opengis.net/gml",i)},t.prototype.writeFeatureElement=function(n,t,i){var h=t.getId(),u,o,s;h&&n.setAttribute("fid",h);var r=i[i.length-1],f=r.featureNS,v=t.getGeometryName();r.serializers||(r.serializers={},r.serializers[f]={});var c=t.getProperties(),l=[],a=[];for(u in c)o=c[u],null!==o&&(l.push(u),a.push(o),u==v||"function"==typeof o.getSimplifiedGeometry?u in r.serializers[f]||(r.serializers[f][u]=e(this.writeGeometryElement,this)):u in r.serializers[f]||(r.serializers[f][u]=e(ut)));s=nt({},r);s.node=n;it(s,r.serializers,gt(void 0,f),a,i,l)},t.prototype.writeCurveOrLineString_=function(n,t,i){var f=i[i.length-1].srsName,r,u;("LineStringSegment"!==n.nodeName&&f&&n.setAttribute("srsName",f),"LineString"===n.nodeName||"LineStringSegment"===n.nodeName)?(r=this.createCoordinatesNode_(n.namespaceURI),n.appendChild(r),this.writeCoordinates_(r,t,i)):"Curve"===n.nodeName&&(u=rt(n.namespaceURI,"segments"),n.appendChild(u),this.writeCurveSegments_(u,t,i))},t.prototype.writeLineStringOrCurveMember_=function(n,t,i){var r=this.GEOMETRY_NODE_FACTORY_(t,i);r&&(n.appendChild(r),this.writeCurveOrLineString_(r,t,i))},t.prototype.writeMultiCurveOrLineString_=function(n,t,i){var r=i[i.length-1],e=r.hasZ,u=r.srsName,o=r.curve,f;u&&n.setAttribute("srsName",u);f=t.getLineStrings();it({node:n,hasZ:e,srsName:u,curve:o},this.LINESTRINGORCURVEMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,f,i,void 0,this)},t.prototype.writeGeometryElement=function(n,t,i){var u,r=i[i.length-1],f=nt({},r);f.node=n;u=Array.isArray(t)?r.dataProjection?bo(t,r.featureProjection,r.dataProjection):t:si(t,!0,r);it(f,this.GEOMETRY_SERIALIZERS_,this.GEOMETRY_NODE_FACTORY_,[u],i,void 0,this)},t.prototype.createCoordinatesNode_=function(n){var t=rt(n,"coordinates");return t.setAttribute("decimal","."),t.setAttribute("cs",","),t.setAttribute("ts"," "),t},t.prototype.writeCoordinates_=function(n,t,i){for(var s,u=i[i.length-1],h=u.hasZ,c=u.srsName,f=t.getCoordinates(),e=f.length,o=new Array(e),r=0;r<e;++r)s=f[r],o[r]=this.getCoords_(s,c,h);ut(n,o.join(" "))},t.prototype.writeCurveSegments_=function(n,t,i){var r=rt(n.namespaceURI,"LineStringSegment");n.appendChild(r);this.writeCurveOrLineString_(r,t,i)},t.prototype.writeSurfaceOrPolygon_=function(n,t,i){var f=i[i.length-1],o=f.hasZ,r=f.srsName,e,u;("PolygonPatch"!==n.nodeName&&r&&n.setAttribute("srsName",r),"Polygon"===n.nodeName||"PolygonPatch"===n.nodeName)?(e=t.getLinearRings(),it({node:n,hasZ:o,srsName:r},this.RING_SERIALIZERS_,this.RING_NODE_FACTORY_,e,i,void 0,this)):"Surface"===n.nodeName&&(u=rt(n.namespaceURI,"patches"),n.appendChild(u),this.writeSurfacePatches_(u,t,i))},t.prototype.RING_NODE_FACTORY_=function(n,t){var i=t[t.length-1],u=i.node,r=i.exteriorWritten;return void 0===r&&(i.exteriorWritten=!0),rt(u.namespaceURI,void 0!==r?"innerBoundaryIs":"outerBoundaryIs")},t.prototype.writeSurfacePatches_=function(n,t,i){var r=rt(n.namespaceURI,"PolygonPatch");n.appendChild(r);this.writeSurfaceOrPolygon_(r,t,i)},t.prototype.writeRing_=function(n,t,i){var r=rt(n.namespaceURI,"LinearRing");n.appendChild(r);this.writeLinearRing_(r,t,i)},t.prototype.getCoords_=function(n,t,i){var u="enu",r;return t&&(u=w(t).getAxisOrientation()),r="en"===u.substr(0,2)?n[0]+","+n[1]:n[1]+","+n[0],i&&(r+=","+(n[2]||0)),r},t.prototype.writePoint_=function(n,t,i){var f=i[i.length-1],o=f.hasZ,r=f.srsName,u,e;r&&n.setAttribute("srsName",r);u=this.createCoordinatesNode_(n.namespaceURI);n.appendChild(u);e=t.getCoordinates();ut(u,this.getCoords_(e,r,o))},t.prototype.writeMultiPoint_=function(n,t,i){var u=i[i.length-1],e=u.hasZ,r=u.srsName,f;r&&n.setAttribute("srsName",r);f=t.getPoints();it({node:n,hasZ:e,srsName:r},this.POINTMEMBER_SERIALIZERS_,gt("pointMember"),f,i,void 0,this)},t.prototype.writePointMember_=function(n,t,i){var r=rt(n.namespaceURI,"Point");n.appendChild(r);this.writePoint_(r,t,i)},t.prototype.writeLinearRing_=function(n,t,i){var u=i[i.length-1].srsName,r;u&&n.setAttribute("srsName",u);r=this.createCoordinatesNode_(n.namespaceURI);n.appendChild(r);this.writeCoordinates_(r,t,i)},t.prototype.writeMultiSurfaceOrPolygon_=function(n,t,i){var r=i[i.length-1],e=r.hasZ,u=r.srsName,o=r.surface,f;u&&n.setAttribute("srsName",u);f=t.getPolygons();it({node:n,hasZ:e,srsName:u,surface:o},this.SURFACEORPOLYGONMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,f,i,void 0,this)},t.prototype.writeSurfaceOrPolygonMember_=function(n,t,i){var r=this.GEOMETRY_NODE_FACTORY_(t,i);r&&(n.appendChild(r),this.writeSurfaceOrPolygon_(r,t,i))},t.prototype.writeEnvelope=function(n,t,i){var r=i[i.length-1].srsName,u;r&&n.setAttribute("srsName",r);u=[t[0]+" "+t[1],t[2]+" "+t[3]];it({node:n},this.ENVELOPE_SERIALIZERS_,hr,u,i,["lowerCorner","upperCorner"],this)},t.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(n,t){var i=t[t.length-1].node;return rt("http://www.opengis.net/gml",lfi[i.nodeName])},t}(ct);vt.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:tt(vt.prototype.readFlatCoordinates_)}};vt.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:vt.prototype.innerBoundaryIsParser_,outerBoundaryIs:vt.prototype.outerBoundaryIsParser_}};vt.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:b(vt.prototype.readFlatCoordinates_)}};vt.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:tt(ct.prototype.readPoint),MultiPoint:tt(ct.prototype.readMultiPoint),LineString:tt(ct.prototype.readLineString),MultiLineString:tt(ct.prototype.readMultiLineString),LinearRing:tt(ct.prototype.readLinearRing),Polygon:tt(ct.prototype.readPolygon),MultiPolygon:tt(ct.prototype.readMultiPolygon),Box:tt(vt.prototype.readBox_)}};vt.prototype.GEOMETRY_SERIALIZERS_={"http://www.opengis.net/gml":{Curve:e(vt.prototype.writeCurveOrLineString_),MultiCurve:e(vt.prototype.writeMultiCurveOrLineString_),Point:e(vt.prototype.writePoint_),MultiPoint:e(vt.prototype.writeMultiPoint_),LineString:e(vt.prototype.writeCurveOrLineString_),MultiLineString:e(vt.prototype.writeMultiCurveOrLineString_),LinearRing:e(vt.prototype.writeLinearRing_),Polygon:e(vt.prototype.writeSurfaceOrPolygon_),MultiPolygon:e(vt.prototype.writeMultiSurfaceOrPolygon_),Surface:e(vt.prototype.writeSurfaceOrPolygon_),MultiSurface:e(vt.prototype.writeMultiSurfaceOrPolygon_),Envelope:e(vt.prototype.writeEnvelope)}};vt.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{lineStringMember:e(vt.prototype.writeLineStringOrCurveMember_),curveMember:e(vt.prototype.writeLineStringOrCurveMember_)}};vt.prototype.RING_SERIALIZERS_={"http://www.opengis.net/gml":{outerBoundaryIs:e(vt.prototype.writeRing_),innerBoundaryIs:e(vt.prototype.writeRing_)}};vt.prototype.POINTMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{pointMember:e(vt.prototype.writePointMember_)}};vt.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{surfaceMember:e(vt.prototype.writeSurfaceOrPolygonMember_),polygonMember:e(vt.prototype.writeSurfaceOrPolygonMember_)}};vt.prototype.ENVELOPE_SERIALIZERS_={"http://www.opengis.net/gml":{lowerCorner:e(ut),upperCorner:e(ut)}};oy=vt;bt=function(n){function t(t){var i=t||{};n.call(this,i);this.schemaLocation=i.schemaLocation?i.schemaLocation:this.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd"}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(et);bt.prototype.namespace="http://www.opengis.net/gml/3.2";bt.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:tt(et.prototype.readFlatPos_),posList:tt(et.prototype.readFlatPosList_)}};bt.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:et.prototype.interiorParser_,exterior:et.prototype.exteriorParser_}};bt.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:tt(ct.prototype.readPoint),MultiPoint:tt(ct.prototype.readMultiPoint),LineString:tt(ct.prototype.readLineString),MultiLineString:tt(ct.prototype.readMultiLineString),LinearRing:tt(ct.prototype.readLinearRing),Polygon:tt(ct.prototype.readPolygon),MultiPolygon:tt(ct.prototype.readMultiPolygon),Surface:tt(bt.prototype.readSurface_),MultiSurface:tt(et.prototype.readMultiSurface_),Curve:tt(bt.prototype.readCurve_),MultiCurve:tt(et.prototype.readMultiCurve_),Envelope:tt(bt.prototype.readEnvelope_)}};bt.prototype.MULTICURVE_PARSERS_={"http://www.opengis.net/gml/3.2":{curveMember:b(et.prototype.curveMemberParser_),curveMembers:b(et.prototype.curveMemberParser_)}};bt.prototype.MULTISURFACE_PARSERS_={"http://www.opengis.net/gml/3.2":{surfaceMember:b(et.prototype.surfaceMemberParser_),surfaceMembers:b(et.prototype.surfaceMemberParser_)}};bt.prototype.CURVEMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{LineString:b(ct.prototype.readLineString),Curve:b(et.prototype.readCurve_)}};bt.prototype.SURFACEMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{Polygon:b(ct.prototype.readPolygon),Surface:b(et.prototype.readSurface_)}};bt.prototype.SURFACE_PARSERS_={"http://www.opengis.net/gml/3.2":{patches:tt(et.prototype.readPatch_)}};bt.prototype.CURVE_PARSERS_={"http://www.opengis.net/gml/3.2":{segments:tt(et.prototype.readSegment_)}};bt.prototype.ENVELOPE_PARSERS_={"http://www.opengis.net/gml/3.2":{lowerCorner:b(et.prototype.readFlatPosList_),upperCorner:b(et.prototype.readFlatPosList_)}};bt.prototype.PATCHES_PARSERS_={"http://www.opengis.net/gml/3.2":{PolygonPatch:tt(et.prototype.readPolygonPatch_)}};bt.prototype.SEGMENTS_PARSERS_={"http://www.opengis.net/gml/3.2":{LineStringSegment:tt(et.prototype.readLineStringSegment_)}};bt.prototype.MULTIPOINT_PARSERS_={"http://www.opengis.net/gml/3.2":{pointMember:b(ct.prototype.pointMemberParser_),pointMembers:b(ct.prototype.pointMemberParser_)}};bt.prototype.MULTILINESTRING_PARSERS_={"http://www.opengis.net/gml/3.2":{lineStringMember:b(ct.prototype.lineStringMemberParser_),lineStringMembers:b(ct.prototype.lineStringMemberParser_)}};bt.prototype.MULTIPOLYGON_PARSERS_={"http://www.opengis.net/gml/3.2":{polygonMember:b(ct.prototype.polygonMemberParser_),polygonMembers:b(ct.prototype.polygonMemberParser_)}};bt.prototype.POINTMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{Point:b(ct.prototype.readFlatCoordinatesFromNode_)}};bt.prototype.LINESTRINGMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{LineString:b(ct.prototype.readLineString)}};bt.prototype.POLYGONMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{Polygon:b(ct.prototype.readPolygon)}};bt.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:tt(ct.prototype.readFlatLinearRing_)}};bt.prototype.RING_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{exterior:e(et.prototype.writeRing_),interior:e(et.prototype.writeRing_)}};bt.prototype.ENVELOPE_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{lowerCorner:e(ut),upperCorner:e(ut)}};bt.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{surfaceMember:e(et.prototype.writeSurfaceOrPolygonMember_),polygonMember:e(et.prototype.writeSurfaceOrPolygonMember_)}};bt.prototype.POINTMEMBER_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{pointMember:e(et.prototype.writePointMember_)}};bt.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{lineStringMember:e(et.prototype.writeLineStringOrCurveMember_),curveMember:e(et.prototype.writeLineStringOrCurveMember_)}};bt.prototype.GEOMETRY_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{Curve:e(et.prototype.writeCurveOrLineString_),MultiCurve:e(et.prototype.writeMultiCurveOrLineString_),Point:e(bt.prototype.writePoint_),MultiPoint:e(et.prototype.writeMultiPoint_),LineString:e(et.prototype.writeCurveOrLineString_),MultiLineString:e(et.prototype.writeMultiCurveOrLineString_),LinearRing:e(et.prototype.writeLinearRing_),Polygon:e(et.prototype.writeSurfaceOrPolygon_),MultiPolygon:e(et.prototype.writeMultiSurfaceOrPolygon_),Surface:e(et.prototype.writeSurfaceOrPolygon_),MultiSurface:e(et.prototype.writeMultiSurfaceOrPolygon_),Envelope:e(et.prototype.writeEnvelope)}};var afi=bt,gi=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],vfi={rte:iat,trk:rat,wpt:uat},yfi=s(gi,{rte:b(iat),trk:b(rat),wpt:b(uat)}),pfi=s(gi,{text:u(l,"linkText"),type:u(l,"linkType")}),wfi=s(gi,{rte:e(function(n,t,i){var h=i[0],r=t.getProperties(),u={node:n},e,o;u.properties=r;e=t.getGeometry();e.getType()==f.LINE_STRING&&(o=si(e,!0,h),u.geometryLayout=o.getLayout(),r.rtept=o.getCoordinates());var c=i[i.length-1].node,s=fei[c.namespaceURI],l=nf(r,s);it(u,eei,hr,l,i,s)}),trk:e(function(n,t,i){var h=i[0],r=t.getProperties(),e={node:n},u,o;e.properties=r;u=t.getGeometry();u.getType()==f.MULTI_LINE_STRING&&(o=si(u,!0,h),r.trkseg=o.getLineStrings());var c=i[i.length-1].node,s=sei[c.namespaceURI],l=nf(r,s);it(e,hei,hr,l,i,s)}),wpt:e(function(n,t,i){var o=i[0],e=i[i.length-1],r,u;e.properties=t.getProperties();r=t.getGeometry();r.getType()==f.POINT&&(u=si(r,!0,o),e.geometryLayout=u.getLayout(),uit(n,u.getCoordinates(),i))})}),bfi=function(n){function t(t){n.call(this);var i=t||{};this.dataProjection=w("EPSG:4326");this.readExtensions_=i.readExtensions}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleReadExtensions_=function(n){var t,r,i,u;for(n||(n=[]),t=0,r=n.length;t<r;++t)i=n[t],this.readExtensions_&&(u=i.get("extensionsNode_")||null,this.readExtensions_(i,u)),i.set("extensionsNode_",void 0)},t.prototype.readFeatureFromNode=function(n,t){var r,i;return tr(gi,n.namespaceURI)?(r=vfi[n.localName],!r)?null:(i=r(n,[this.getReadOptions(n,t)]),i?(this.handleReadExtensions_([i]),i):null):null},t.prototype.readFeaturesFromNode=function(n,t){if(!tr(gi,n.namespaceURI))return[];if("gpx"==n.localName){var i=h([],yfi,n,[this.getReadOptions(n,t)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},t.prototype.writeFeaturesNode=function(n,t){t=this.adaptOptions(t);var i=rt("http://www.topografix.com/GPX/1/1","gpx");return i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",hs),i.setAttributeNS(hs,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),it({node:i},wfi,pei,n,[t]),i},t}(na),kfi=s(gi,{name:u(l),cmt:u(l),desc:u(l),src:u(l),link:tit,number:u(cr),extensions:iit,type:u(l),rtept:function(n,t){var i=h({},dfi,n,t);if(i){var r=t[t.length-1],u=r.flatCoordinates,f=r.layoutOptions;gtt(u,f,n,i)}}}),dfi=s(gi,{ele:u(yt),time:u(dtt)}),gfi=s(gi,{name:u(l),cmt:u(l),desc:u(l),src:u(l),link:tit,number:u(cr),type:u(l),extensions:iit,trkseg:function(n,t){var i=t[t.length-1],r;vu(nei,n,t);r=i.flatCoordinates;i.ends.push(r.length)}}),nei=s(gi,{trkpt:function(n,t){var i=h({},tei,n,t);if(i){var r=t[t.length-1],u=r.flatCoordinates,f=r.layoutOptions;gtt(u,f,n,i)}}}),tei=s(gi,{ele:u(yt),time:u(dtt)}),iei=s(gi,{ele:u(yt),time:u(dtt),magvar:u(yt),geoidheight:u(yt),name:u(l),cmt:u(l),desc:u(l),src:u(l),link:tit,sym:u(l),type:u(l),fix:u(l),sat:u(cr),hdop:u(yt),vdop:u(yt),pdop:u(yt),ageofdgpsdata:u(yt),dgpsid:u(cr),extensions:iit}),rei=["text","type"],uei=s(gi,{text:e(ut),type:e(ut)}),fei=s(gi,["name","cmt","desc","src","link","number","type","rtept"]),eei=s(gi,{name:e(ut),cmt:e(ut),desc:e(ut),src:e(ut),link:e(rit),number:e(rk),type:e(ut),rtept:oct(e(uit))}),oei=s(gi,["ele","time"]),sei=s(gi,["name","cmt","desc","src","link","number","type","trkseg"]),hei=s(gi,{name:e(ut),cmt:e(ut),desc:e(ut),src:e(ut),link:e(rit),number:e(rk),type:e(ut),trkseg:oct(e(function(n,t,i){var r={node:n};r.geometryLayout=t.getLayout();r.properties={};it(r,lei,cei,t.getCoordinates(),i)}))}),cei=gt("trkpt"),lei=s(gi,{trkpt:e(uit)}),aei=s(gi,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),vei=s(gi,{ele:e(yu),time:e(function(n,t){var i=new Date(1e3*t),r=i.getUTCFullYear()+"-"+ah(i.getUTCMonth()+1,2)+"-"+ah(i.getUTCDate(),2)+"T"+ah(i.getUTCHours(),2)+":"+ah(i.getUTCMinutes(),2)+":"+ah(i.getUTCSeconds(),2)+"Z";n.appendChild(fc.createTextNode(r))}),magvar:e(yu),geoidheight:e(yu),name:e(ut),cmt:e(ut),desc:e(ut),src:e(ut),link:e(rit),sym:e(ut),type:e(ut),fix:e(ut),sat:e(rk),hdop:e(yu),vdop:e(yu),pdop:e(yu),ageofdgpsdata:e(yu),dgpsid:e(rk)}),yei={Point:"wpt",LineString:"rte",MultiLineString:"trk"};fat=bfi;eat=function(n){function t(t){var i=t||{};n.call(this);this.dataProjection=w(i.dataProjection?i.dataProjection:"EPSG:4326");i.featureProjection&&(this.defaultFeatureProjection=w(i.featureProjection));this.geometryName_=i.geometryName;this.extractGeometryName_=i.extractGeometryName}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFeatureFromObject=function(n,t){var i=null,u=fit((i="Feature"===n.type?n:{type:"Feature",geometry:n,properties:null}).geometry,t),r=new fi;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&r.setGeometryName(i.geometry_name),r.setGeometry(u),"id"in i&&r.setId(i.id),i.properties&&r.setProperties(i.properties),r},t.prototype.readFeaturesFromObject=function(n,t){var i=null;if("FeatureCollection"===n.type){i=[];for(var u=n.features,r=0,f=u.length;r<f;++r)i.push(this.readFeatureFromObject(u[r],t))}else i=[this.readFeatureFromObject(n,t)];return i},t.prototype.readGeometryFromObject=function(n,t){return fit(n,t)},t.prototype.readProjectionFromObject=function(n){var t,i=n.crs;return i?"name"==i.type?t=w(i.properties.name):g(!1,36):t=this.dataProjection,t},t.prototype.writeFeatureObject=function(n,t){var i,u,f,r;return t=this.adaptOptions(t),i={type:"Feature",geometry:null,properties:null},u=n.getId(),void 0!==u&&(i.id=u),f=n.getGeometry(),f&&(i.geometry=eit(f,t)),r=n.getProperties(),delete r[n.getGeometryName()],wu(r)||(i.properties=r),i},t.prototype.writeFeaturesObject=function(n,t){t=this.adaptOptions(t);for(var r=[],i=0,u=n.length;i<u;++i)r.push(this.writeFeatureObject(n[i],t));return{type:"FeatureCollection",features:r}},t.prototype.writeGeometryObject=function(n,t){return eit(n,this.adaptOptions(t))},t}(tk);var sy,oit,sit,hit,ek,hy,cit,lit=function(n){function t(){n.call(this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getType=function(){return ro.TEXT},t.prototype.readFeature=function(n,t){return this.readFeatureFromText(fk(n),this.adaptOptions(t))},t.prototype.readFeatureFromText=function(){return p()},t.prototype.readFeatures=function(n,t){return this.readFeaturesFromText(fk(n),this.adaptOptions(t))},t.prototype.readFeaturesFromText=function(){return p()},t.prototype.readGeometry=function(n,t){return this.readGeometryFromText(fk(n),this.adaptOptions(t))},t.prototype.readGeometryFromText=function(){return p()},t.prototype.readProjection=function(n){return this.readProjectionFromText(fk(n))},t.prototype.readProjectionFromText=function(){return this.dataProjection},t.prototype.writeFeature=function(n,t){return this.writeFeatureText(n,this.adaptOptions(t))},t.prototype.writeFeatureText=function(){return p()},t.prototype.writeFeatures=function(n,t){return this.writeFeaturesText(n,this.adaptOptions(t))},t.prototype.writeFeaturesText=function(){return p()},t.prototype.writeGeometry=function(n,t){return this.writeGeometryText(n,this.adaptOptions(t))},t.prototype.writeGeometryText=function(){return p()},t}(dl),cy={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},wei=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,bei=/^H.([A-Z]{3}).*?:(.*)/,kei=/^HFDTE(\d{2})(\d{2})(\d{2})/,dei=/\r\n|\r|\n/,gei=function(n){function t(t){n.call(this);var i=t||{};this.dataProjection=w("EPSG:4326");this.altitudeMode_=i.altitudeMode?i.altitudeMode:cy.NONE}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFeatureFromText=function(n,t){for(var o=this.altitudeMode_,w=n.split(dei),b={},u=[],h=2e3,c=0,l=1,k=-1,r,i,s,y,f,e=0,p=w.length;e<p;++e)if(r=w[e],i=void 0,"B"==r.charAt(0)){if(i=wei.exec(r)){var d=parseInt(i[1],10),g=parseInt(i[2],10),nt=parseInt(i[3],10),a=parseInt(i[4],10)+parseInt(i[5],10)/6e4;"S"==i[6]&&(a=-a);s=parseInt(i[7],10)+parseInt(i[8],10)/6e4;("W"==i[9]&&(s=-s),u.push(s,a),o!=cy.NONE)&&(y=void 0,y=o==cy.GPS?parseInt(i[11],10):o==cy.BAROMETRIC?parseInt(i[12],10):0,u.push(y));f=Date.UTC(h,c,l,d,g,nt);f<k&&(f=Date.UTC(h,c,l+1,d,g,nt));u.push(f/1e3);k=f}}else"H"==r.charAt(0)&&((i=kei.exec(r))?(l=parseInt(i[1],10),c=parseInt(i[2],10)-1,h=2e3+parseInt(i[3],10)):(i=bei.exec(r))&&(b[i[1]]=i[2].trim()));if(0===u.length)return null;var it=o==cy.NONE?v.XYM:v.XYZM,rt=new yi(u,it),tt=new fi(si(rt,!1,t));return tt.setProperties(b),tt},t.prototype.readFeaturesFromText=function(n,t){var i=this.readFeatureFromText(n,t);return i?[i]:[]},t}(lit),oo=["http://www.google.com/kml/ext/2.2"],d=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],oat={fraction:eu.FRACTION,pixels:eu.PIXELS,insetPixels:eu.PIXELS},noi=s(d,{ExtendedData:hvt,Region:cvt,MultiGeometry:u(ivt,"geometry"),LineString:u(gat,"geometry"),LinearRing:u(nvt,"geometry"),Point:u(rvt,"geometry"),Polygon:u(fvt,"geometry"),Style:u(git),StyleMap:function(n,t){var i=vat(n,t),r;i&&(r=t[t.length-1],Array.isArray(i)?r.Style=i:"string"==typeof i?r.styleUrl=i:g(!1,38))},address:u(l),description:u(l),name:u(l),open:u(bs),phoneNumber:u(l),styleUrl:u(sk),visibility:u(bs)},s(oo,{MultiTrack:u(function(n,t){var i=h([],pat,n,t);if(i)return new yf(i)},"geometry"),Track:u(bat,"geometry")})),toi=s(d,{ExtendedData:hvt,Region:cvt,Link:function(n,t){vu(ioi,n,t)},address:u(l),description:u(l),name:u(l),open:u(bs),phoneNumber:u(l),visibility:u(bs)}),ioi=s(d,{href:u(sk)}),sat=s(d,{LatLonAltBox:function(n,t){var i=h({},voi,n,t),r,u;i&&(r=t[t.length-1],u=[parseFloat(i.west),parseFloat(i.south),parseFloat(i.east),parseFloat(i.north)],r.extent=u,r.altitudeMode=i.altitudeMode,r.minAltitude=parseFloat(i.minAltitude),r.maxAltitude=parseFloat(i.maxAltitude))},Lod:function(n,t){var i=h({},yoi,n,t),r;i&&(r=t[t.length-1],r.minLodPixels=parseFloat(i.minLodPixels),r.maxLodPixels=parseFloat(i.maxLodPixels),r.minFadeExtent=parseFloat(i.minFadeExtent),r.maxFadeExtent=parseFloat(i.maxFadeExtent))}}),roi=s(d,["Document","Placemark"]),uoi=s(d,{Document:e(function(n,t,i){it({node:n},boi,koi,t,i,void 0,this)}),Placemark:e(bvt)}),ok=null,ait,vit=null,yit,pit=null,cc=null,hat=null,wit=null,foi=function(n){function t(t){n.call(this);var i=t||{};wit||(ok=new te({color:sy=[255,255,255,1]}),oit=[20,2],sit=eu.PIXELS,hit=eu.PIXELS,ek=[64,64],hy="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",cit=.5,vit=new vb({anchor:oit,anchorOrigin:ur.BOTTOM_LEFT,anchorXUnits:sit,anchorYUnits:hit,crossOrigin:"anonymous",rotation:0,scale:cit,size:ek,src:hy}),ait="NO_IMAGE",pit=new hf({color:sy,width:1}),yit=new hf({color:[51,51,51,1],width:2}),cc=new nv({font:"bold 16px Helvetica",fill:ok,stroke:yit,scale:.8}),hat=new wl({fill:ok,image:vit,text:cc,stroke:pit,zIndex:0}),wit=[hat]);this.dataProjection=w("EPSG:4326");this.defaultStyle_=i.defaultStyle?i.defaultStyle:wit;this.extractStyles_=void 0===i.extractStyles||i.extractStyles;this.writeStyles_=void 0===i.writeStyles||i.writeStyles;this.sharedStyles_={};this.showPointNames_=void 0===i.showPointNames||i.showPointNames}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readDocumentOrFolder_=function(n,t){var i=h([],s(d,{Document:ect(this.readDocumentOrFolder_,this),Folder:ect(this.readDocumentOrFolder_,this),Placemark:b(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),n,t,this);return i||void 0},t.prototype.readPlacemark_=function(n,t){var i=h({geometry:null},noi,n,t),r,e,o,u,s;if(i)return r=new fi,e=n.getAttribute("id"),null!==e&&r.setId(e),o=t[0],u=i.geometry,(u&&si(u,!1,o),r.setGeometry(u),delete i.geometry,this.extractStyles_)&&(s=function(n,t,i,r,u){return function(e){var s,o=u,h="",l,c;return(o&&(l=e.getGeometry(),l&&(o=l.getType()===f.POINT)),o&&(h=e.get("name"),o=o&&!!h),n)?o?(s=bit(n[0],h),n.concat(s)):n:t?(c=function n(t,i,r){return Array.isArray(t)?t:"string"==typeof t?(!(t in r)&&"#"+t in r&&(t="#"+t),n(r[t],i,r)):i}(t,i,r),o?(s=bit(c[0],h),c.concat(s)):c):o?(s=bit(i[0],h),i.concat(s)):i}}(i.Style,i.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_),r.setStyle(s)),delete i.Style,r.setProperties(i),r},t.prototype.readSharedStyle_=function(n,t){var r=n.getAttribute("id"),u,f,i;null!==r&&(u=git(n,t),u&&(i=n.baseURI,f=(i&&"about:blank"!=i||(i=window.location.href),i)?new URL("#"+r,i).href:"#"+r,this.sharedStyles_[f]=u))},t.prototype.readSharedStyleMap_=function(n,t){var r=n.getAttribute("id"),u,f,i;null!==r&&(u=vat(n,t),u&&(i=n.baseURI,f=(i&&"about:blank"!=i||(i=window.location.href),i)?new URL("#"+r,i).href:"#"+r,this.sharedStyles_[f]=u))},t.prototype.readFeatureFromNode=function(n,t){if(!tr(d,n.namespaceURI))return null;var i=this.readPlacemark_(n,[this.getReadOptions(n,t)]);return i||null},t.prototype.readFeaturesFromNode=function(n,t){var u,i,f,r,e;if(!tr(d,n.namespaceURI))return[];if(i=n.localName,"Document"==i||"Folder"==i)return(u=this.readDocumentOrFolder_(n,[this.getReadOptions(n,t)]))||[];if("Placemark"==i)return f=this.readPlacemark_(n,[this.getReadOptions(n,t)]),f?[f]:[];if("kml"==i){for(u=[],r=n.firstElementChild;r;r=r.nextElementSibling)e=this.readFeaturesFromNode(r,t),e&&pt(u,e);return u}return[]},t.prototype.readName=function(n){if(n){if("string"==typeof n){var t=ue(n);return this.readNameFromDocument(t)}return ye(n)?this.readNameFromDocument(n):this.readNameFromNode(n)}},t.prototype.readNameFromDocument=function(n){for(var i,t=n.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE&&(i=this.readNameFromNode(t),i))return i},t.prototype.readNameFromNode=function(n){for(var i,r,u,t=n.firstElementChild;t;t=t.nextElementSibling)if(tr(d,t.namespaceURI)&&"name"==t.localName)return l(t);for(i=n.firstElementChild;i;i=i.nextElementSibling)if(r=i.localName,tr(d,i.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)&&(u=this.readNameFromNode(i),u))return u},t.prototype.readNetworkLinks=function(n){var t=[],i;return"string"==typeof n?(i=ue(n),pt(t,this.readNetworkLinksFromDocument(i))):ye(n)?pt(t,this.readNetworkLinksFromDocument(n)):pt(t,this.readNetworkLinksFromNode(n)),t},t.prototype.readNetworkLinksFromDocument=function(n){for(var i=[],t=n.firstChild;t;t=t.nextSibling)t.nodeType==Node.ELEMENT_NODE&&pt(i,this.readNetworkLinksFromNode(t));return i},t.prototype.readNetworkLinksFromNode=function(n){for(var f,i,u,r=[],t=n.firstElementChild;t;t=t.nextElementSibling)tr(d,t.namespaceURI)&&"NetworkLink"==t.localName&&(f=h({},toi,t,[]),r.push(f));for(i=n.firstElementChild;i;i=i.nextElementSibling)u=i.localName,tr(d,i.namespaceURI)&&("Document"==u||"Folder"==u||"kml"==u)&&pt(r,this.readNetworkLinksFromNode(i));return r},t.prototype.readRegion=function(n){var t=[],i;return"string"==typeof n?(i=ue(n),pt(t,this.readRegionFromDocument(i))):ye(n)?pt(t,this.readRegionFromDocument(n)):pt(t,this.readRegionFromNode(n)),t},t.prototype.readRegionFromDocument=function(n){for(var i=[],t=n.firstChild;t;t=t.nextSibling)t.nodeType==Node.ELEMENT_NODE&&pt(i,this.readRegionFromNode(t));return i},t.prototype.readRegionFromNode=function(n){for(var f,i,u,r=[],t=n.firstElementChild;t;t=t.nextElementSibling)tr(d,t.namespaceURI)&&"Region"==t.localName&&(f=h({},sat,t,[]),r.push(f));for(i=n.firstElementChild;i;i=i.nextElementSibling)u=i.localName,tr(d,i.namespaceURI)&&("Document"==u||"Folder"==u||"kml"==u)&&pt(r,this.readRegionFromNode(i));return r},t.prototype.writeFeaturesNode=function(n,t){var i,u,e,r,f,o;return t=this.adaptOptions(t),i=rt(d[4],"kml"),u="http://www.w3.org/2000/xmlns/",i.setAttributeNS(u,"xmlns:gx",oo[0]),i.setAttributeNS(u,"xmlns:xsi",hs),i.setAttributeNS(hs,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd"),e={node:i},r={},n.length>1?r.Document=n:1==n.length&&(r.Placemark=n[0]),f=roi[i.namespaceURI],o=nf(r,f),it(e,uoi,hr,o,[t],f,this),i},t}(na);aat=s(d,{Pair:function(n,t){var i=h({},loi,n,t),r,u,f;i&&(r=i.key,r&&"normal"==r&&(u=i.styleUrl,u&&(t[t.length-1]=u),f=i.Style,f&&(t[t.length-1]=f)))}});var eoi=s(d,{Icon:u(function(n,t){var i=h({},kat,n,t);return i||null}),heading:u(yt),hotSpot:u(function(n){var i,r=n.getAttribute("xunits"),t=n.getAttribute("yunits");return i="insetPixels"!==r?"insetPixels"!==t?ur.BOTTOM_LEFT:ur.TOP_LEFT:"insetPixels"!==t?ur.BOTTOM_RIGHT:ur.TOP_RIGHT,{x:parseFloat(n.getAttribute("x")),xunits:oat[r],y:parseFloat(n.getAttribute("y")),yunits:oat[t],origin:i}}),scale:u(lat)}),ooi=s(d,{color:u(kit),scale:u(lat)}),soi=s(d,{color:u(kit),width:u(yt)}),hoi=s(d,{color:u(kit),fill:u(bs),outline:u(bs)}),coi=s(d,{coordinates:tt(cat)});pat=s(oo,{Track:b(bat)});wat=s(d,{when:function(n,t){var r=t[t.length-1].whens,u=fu(n,!1),i=Date.parse(u);r.push(isNaN(i)?0:i)}},s(oo,{coord:function(n,t){var r=t[t.length-1].flatCoordinates,u=fu(n,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(u);if(i){var f=parseFloat(i[1]),e=parseFloat(i[2]),o=parseFloat(i[3]);r.push(f,e,o,0)}else r.push(0,0,0,0)}}));kat=s(d,{href:u(sk)},s(oo,{x:u(yt),y:u(yt),w:u(yt),h:u(yt)}));dat=s(d,{coordinates:tt(cat)});ly=s(d,{extrude:u(bs),tessellate:u(bs),altitudeMode:u(l)});tvt=s(d,{LineString:b(gat),LinearRing:b(nvt),MultiGeometry:b(ivt),Point:b(rvt),Polygon:b(fvt)});uvt=s(d,{innerBoundaryIs:function(n,t){var i=h(void 0,poi,n,t),r;i&&(r=t[t.length-1],r.push(i))},outerBoundaryIs:function(n,t){var i=h(void 0,woi,n,t),r;i&&(r=t[t.length-1],r[0]=i)}});evt=s(d,{IconStyle:function(n,t){var i=h({},eoi,n,t),nt,l,r,a,v,y,tt,p,w,b,c,it;if(i){var u,e,o,s,k=t[t.length-1],f="Icon"in i?i.Icon:{},d=!("Icon"in i)||Object.keys(f).length>0,g=f.href;g?u=g:d&&(u=hy);l=ur.BOTTOM_LEFT;r=i.hotSpot;r?(e=[r.x,r.y],o=r.xunits,s=r.yunits,l=r.origin):u===hy?(e=oit,o=sit,s=hit):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(u)&&(e=[.5,0],o=eu.FRACTION,s=eu.FRACTION);v=f.x;y=f.y;void 0!==v&&void 0!==y&&(nt=[v,y]);p=f.w;w=f.h;void 0!==p&&void 0!==w&&(a=[p,w]);b=i.heading;void 0!==b&&(tt=kf(b));c=i.scale;d?(u==hy&&(a=ek,void 0===c&&(c=cit)),it=new vb({anchor:e,anchorOrigin:l,anchorXUnits:o,anchorYUnits:s,crossOrigin:"anonymous",offset:nt,offsetOrigin:ur.BOTTOM_LEFT,rotation:tt,scale:c,size:a,src:u}),k.imageStyle=it):k.imageStyle=ait}},LabelStyle:function(n,t){var i=h({},ooi,n,t),r,u;i&&(r=t[t.length-1],u=new nv({fill:new te({color:"color"in i?i.color:sy}),scale:i.scale}),r.textStyle=u)},LineStyle:function(n,t){var i=h({},soi,n,t),r,u;i&&(r=t[t.length-1],u=new hf({color:"color"in i?i.color:sy,width:"width"in i?i.width:1}),r.strokeStyle=u)},PolyStyle:function(n,t){var i=h({},hoi,n,t),r,e,u,f;i&&(r=t[t.length-1],e=new te({color:"color"in i?i.color:sy}),r.fillStyle=e,u=i.fill,void 0!==u&&(r.fill=u),f=i.outline,void 0!==f&&(r.outline=f))}});ovt=s(d,{displayName:u(l),value:u(l)});svt=s(d,{Data:function(n,t){var r=n.getAttribute("name"),i;vu(ovt,n,t);i=t[t.length-1];null!==r?i[r]=i.value:null!==i.displayName&&(i[i.displayName]=i.value);delete i.value},SchemaData:function(n,t){vu(aoi,n,t)}});var loi=s(d,{Style:u(git),key:u(l),styleUrl:u(sk)}),aoi=s(d,{SimpleData:function(n,t){var i=n.getAttribute("name"),r,u;null!==i&&(r=l(n),u=t[t.length-1],u[i]=r)}}),voi=s(d,{altitudeMode:u(l),minAltitude:u(yt),maxAltitude:u(yt),north:u(yt),south:u(yt),east:u(yt),west:u(yt)}),yoi=s(d,{minLodPixels:u(yt),maxLodPixels:u(yt),minFadeExtent:u(yt),maxFadeExtent:u(yt)}),poi=s(d,{LinearRing:tt(yat)}),woi=s(d,{LinearRing:tt(yat)});var hk=s(d,{Data:e(function(n,t,i){n.setAttribute("name",t.name);var u={node:n},r=t.value;"object"==typeof r?(null!==r&&r.displayName&&it(u,hk,hr,[r.displayName],i,["displayName"]),null!==r&&r.value&&it(u,hk,hr,[r.value],i,["value"])):it(u,hk,hr,[r],i,["value"])}),value:e(function(n,t){ut(n,t)}),displayName:e(function(n,t){!function(n,t){n.appendChild(fc.createCDATASection(t))}(n,t)})}),boi=s(d,{Placemark:e(bvt)}),koi=function(n,t){return rt(t[t.length-1].node.namespaceURI,"Placemark")},doi=gt("Data"),lvt=s(d,["href"],s(oo,["x","y","w","h"])),avt=s(d,{href:e(ut)},s(oo,{x:e(yu),y:e(yu),w:e(yu),h:e(yu)})),goi=function(n,t,i){return rt(oo[0],"gx:"+i)},nsi=s(d,["scale","heading","Icon","hotSpot"]),tsi=s(d,{Icon:e(function(n,t,i){var f={node:n},e=i[i.length-1].node,r=lvt[e.namespaceURI],u=nf(t,r);it(f,avt,hr,u,i,r);u=nf(t,r=lvt[oo[0]]);it(f,avt,goi,u,i,r)}),heading:e(yu),hotSpot:e(function(n,t){n.setAttribute("x",String(t.x));n.setAttribute("y",String(t.y));n.setAttribute("xunits",t.xunits);n.setAttribute("yunits",t.yunits)}),scale:e(ryt)}),isi=s(d,["color","scale"]),rsi=s(d,{color:e(trt),scale:e(ryt)}),usi=s(d,["color","width"]),fsi=s(d,{color:e(trt),width:e(yu)}),esi={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},vvt=function(n,t){if(n)return rt(t[t.length-1].node.namespaceURI,esi[n.getType()])},osi=gt("Point"),ssi=gt("LineString"),hsi=gt("LinearRing"),csi=gt("Polygon"),lsi=s(d,{LineString:e(ta),Point:e(ta),Polygon:e(nyt),GeometryCollection:e(yvt)});pvt=s(d,{LinearRing:e(ta)});var irt=s(d,{ExtendedData:e(function(n,t,i){for(var f={node:n},u=t.names,e=t.values,o=u.length,r=0;r<o;r++)it(f,hk,doi,[{name:u[r],value:e[r]}],i)}),MultiGeometry:e(yvt),LineString:e(ta),LinearRing:e(ta),Point:e(ta),Polygon:e(nyt),Style:e(function(n,t,i){var h={node:n},r={},f=t.getFill(),e=t.getStroke(),u=t.getImage(),o=t.getText();u&&"function"==typeof u.getSrc&&(r.IconStyle=u);o&&(r.LabelStyle=o);e&&(r.LineStyle=e);f&&(r.PolyStyle=f);var c=i[i.length-1].node,s=wsi[c.namespaceURI],l=nf(r,s);it(h,bsi,hr,l,i,s)}),address:e(ut),description:e(ut),name:e(ut),open:e(ik),phoneNumber:e(ut),styleUrl:e(ut),visibility:e(ik)}),asi=s(d,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),vsi=gt("ExtendedData");kvt=s(d,["extrude","tessellate","altitudeMode","coordinates"]);dvt=s(d,{extrude:e(ik),tessellate:e(ik),altitudeMode:e(ut),coordinates:e(function(n,t,i){var f,c=i[i.length-1],e=c.layout,l=c.stride,h,r,o,u,s;if(e==v.XY||e==v.XYM?f=2:e==v.XYZ||e==v.XYZM?f=3:g(!1,34),h=t.length,r="",h>0){for(r+=t[0],o=1;o<f;++o)r+=","+t[o];for(u=l;u<h;u+=l)for(r+=" "+t[u],s=1;s<f;++s)r+=","+t[u+s]}ut(n,r)})});var gvt=s(d,{outerBoundaryIs:e(wvt),innerBoundaryIs:e(wvt)}),ysi=gt("innerBoundaryIs"),psi=gt("outerBoundaryIs");tyt=s(d,{color:e(trt)});iyt=gt("color");var wsi=s(d,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),bsi=s(d,{IconStyle:e(function(n,t,i){var v={node:n},e={},y=t.getSrc(),r=t.getSize(),c=t.getImageSize(),o={href:y},u,f,l,s,h;r&&(o.w=r[0],o.h=r[1],u=t.getAnchor(),f=t.getOrigin(),(f&&c&&0!==f[0]&&f[1]!==r[1]&&(o.x=f[0],o.y=c[1]-(f[1]+r[1])),u&&(u[0]!==r[0]/2||u[1]!==r[1]/2))&&(l={x:u[0],xunits:eu.PIXELS,y:r[1]-u[1],yunits:eu.PIXELS},e.hotSpot=l));e.Icon=o;s=t.getScale();1!==s&&(e.scale=s);h=t.getRotation();0!==h&&(e.heading=h);var p=i[i.length-1].node,a=nsi[p.namespaceURI],w=nf(e,a);it(v,tsi,hr,w,i,a)}),LabelStyle:e(function(n,t,i){var o={node:n},u={},f=t.getFill(),r;f&&(u.color=f.getColor());r=t.getScale();r&&1!==r&&(u.scale=r);var s=i[i.length-1].node,e=isi[s.namespaceURI],h=nf(u,e);it(o,rsi,hr,h,i,e)}),LineStyle:e(function(n,t,i){var u={node:n},f={color:t.getColor(),width:t.getWidth()},e=i[i.length-1].node,r=usi[e.namespaceURI],o=nf(f,r);it(u,fsi,hr,o,i,r)}),PolyStyle:e(function(n,t,i){it({node:n},tyt,iyt,[t.getColor()],i)})}),ksi=foi,dsi=i(1),gsi=i.n(dsi),uyt=[1,0,0,1,0,0],nr=function(n,t,i,r,u){this.extent_;this.id_=u;this.type_=n;this.flatCoordinates_=t;this.flatInteriorPoints_=null;this.flatMidpoints_=null;this.ends_=i;this.properties_=r};nr.prototype.get=function(n){return this.properties_[n]};nr.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===f.POINT?uh(this.flatCoordinates_):td(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_};nr.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var n=su(this.getExtent());this.flatInteriorPoints_=wd(this.flatCoordinates_,0,this.ends_,2,n,0)}return this.flatInteriorPoints_};nr.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var n=llt(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=eft(this.flatCoordinates_,0,this.ends_,2,n)}return this.flatInteriorPoints_};nr.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=gp(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_};nr.prototype.getFlatMidpoints=function(){var t,u;if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var f=this.flatCoordinates_,i=0,r=this.ends_,n=0,e=r.length;n<e;++n)t=r[n],u=gp(f,i,t,2,.5),pt(this.flatMidpoints_,u),i=t}return this.flatMidpoints_};nr.prototype.getId=function(){return this.id_};nr.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_};nr.prototype.getGeometry=function(){return this};nr.prototype.getSimplifiedGeometry=function(){return this};nr.prototype.getProperties=function(){return this.properties_};nr.prototype.getStride=function(){return 2};nr.prototype.getStyleFunction=function(){};nr.prototype.getType=function(){return this.type_};nr.prototype.transform=function(n){var r=(n=w(n)).getExtent(),t=n.getWorldExtent(),i=ti(t)/ti(r);cu(uyt,t[0],t[3],i,-i,0,0,0);vo(this.flatCoordinates_,0,this.flatCoordinates_.length,2,uyt,this.flatCoordinates_)};nr.prototype.getEnds=nr.prototype.getEndss=function(){return this.ends_};nr.prototype.getFlatCoordinates=nr.prototype.getOrientedFlatCoordinates;rrt=nr;var uhi=function(n){function t(t){n.call(this);var i=t||{};this.dataProjection=new va({code:"",units:pr.TILE_PIXELS});this.featureClass_=i.featureClass?i.featureClass:rrt;this.geometryName_=i.geometryName;this.layerName_=i.layerName?i.layerName:"layer";this.layers_=i.layers?i.layers:null;this.extent_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readRawGeometry_=function(n,t,i,r){var s;n.pos=t.geometry;for(var l=n.readVarint()+n.pos,e=1,o=0,h=0,c=0,u=0,f=0;n.pos<l;)o||(s=n.readVarint(),e=7&s,o=s>>3),o--,1===e||2===e?(h+=n.readSVarint(),c+=n.readSVarint(),1===e&&u>f&&(r.push(u),f=u),i.push(h,c),u+=2):7===e?u>f&&(i.push(i[f],i[f+1]),u+=2):g(!1,59);u>f&&(r.push(u),f=u)},t.prototype.createFeature_=function(n,t,i){var o,p=t.type,c,h,r,u,e,l,y,k;if(0===p)return null;if(c=t.id,h=t.properties,h[this.layerName_]=t.layer.name,r=[],u=[],this.readRawGeometry_(n,t,r,u),e=function(n,t){var i;return 1===n?i=1===t?f.POINT:f.MULTI_POINT:2===n?i=1===t?f.LINE_STRING:f.MULTI_LINE_STRING:3===n&&(i=f.POLYGON),i}(p,u.length),this.featureClass_===rrt)o=new this.featureClass_(e,r,u,h,c);else{if(e==f.POLYGON){for(var a=[],w=0,b=0,s=0,d=u.length;s<d;++s)y=u[s],go(r,w,y,2)||(a.push(u.slice(b,s)),b=s),w=y;l=a.length>1?new we(r,v.XY,a):new or(r,v.XY,u)}else l=e===f.POINT?new ei(r,v.XY):e===f.LINE_STRING?new yi(r,v.XY):e===f.POLYGON?new or(r,v.XY,u):e===f.MULTI_POINT?new pe(r,v.XY):e===f.MULTI_LINE_STRING?new yf(r,v.XY,u):null;o=new this.featureClass_;this.geometryName_&&o.setGeometryName(this.geometryName_);k=si(l,!1,this.adaptOptions(i));o.setGeometry(k);o.setId(c);o.setProperties(h)}return o},t.prototype.getLastExtent=function(){return this.extent_},t.prototype.getType=function(){return ro.ARRAY_BUFFER},t.prototype.readFeatures=function(n){var f=this.layers_,i=new gsi.a(n),e=i.readFields(nhi,{}),o=[],r,s;for(r in e)if(!f||-1!=f.indexOf(r)){for(var t=e[r],u=0,h=t.length;u<h;++u)s=rhi(i,t,u),o.push(this.createFeature_(i,s));this.extent_=t?[0,0,t.extent,t.extent]:null}return o},t.prototype.readProjection=function(){return this.dataProjection},t.prototype.setLayers=function(n){this.layers_=n},t}(dl),urt=[null],fhi=s(urt,{nd:function(n,t){t[t.length-1].ndrefs.push(n.getAttribute("ref"))},tag:fyt}),ehi=s(urt,{node:function(n,t){var s=t[0],f=t[t.length-1],e=n.getAttribute("id"),o=[parseFloat(n.getAttribute("lon")),parseFloat(n.getAttribute("lat"))],r,u,i;f.nodes[e]=o;r=h({tags:{}},shi,n,t);wu(r.tags)||(u=new ei(o),si(u,!1,s),i=new fi(u),i.setId(e),i.setProperties(r.tags),f.features.push(i))},way:function(n,t){var i=h({id:n.getAttribute("id"),ndrefs:[],tags:{}},fhi,n,t);t[t.length-1].ways.push(i)}}),ohi=function(n){function t(){n.call(this);this.dataProjection=w("EPSG:4326")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFeaturesFromNode=function(n,t){var c=this.getReadOptions(n,t),i,u,s,e;if("osm"==n.localName){for(i=h({nodes:{},ways:[],features:[]},ehi,n,[c]),u=0;u<i.ways.length;u++){for(var r=i.ways[u],f=[],o=0,l=r.ndrefs.length;o<l;o++)pt(f,i.nodes[r.ndrefs[o]]);s=void 0;si(s=r.ndrefs[0]==r.ndrefs[r.ndrefs.length-1]?new or(f,v.XY,[f.length]):new yi(f,v.XY),!1,c);e=new fi(s);e.setId(r.id);e.setProperties(r.tags);i.features.push(e)}if(i.features)return i.features}return[]},t}(na),shi=s(urt,{tag:fyt});eyt=ohi;ayt=function(n){function t(t){n.call(this);var i=t||{};this.dataProjection=w("EPSG:4326");this.factor_=i.factor?i.factor:1e5;this.geometryLayout_=i.geometryLayout?i.geometryLayout:v.XY}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFeatureFromText=function(n,t){var i=this.readGeometryFromText(n,t);return new fi(i)},t.prototype.readFeaturesFromText=function(n,t){return[this.readFeatureFromText(n,t)]},t.prototype.readGeometryFromText=function(n,t){var r=od(this.geometryLayout_),i=hyt(n,r,this.factor_),u;return oyt(i,0,i.length,r,i),u=gc(i,0,i.length,r),si(new yi(u,this.geometryLayout_),!1,this.adaptOptions(t))},t.prototype.writeFeatureText=function(n,t){var i=n.getGeometry();return i?this.writeGeometryText(i,t):(g(!1,40),"")},t.prototype.writeFeaturesText=function(n,t){return this.writeFeatureText(n[0],t)},t.prototype.writeGeometryText=function(n,t){var i=(n=si(n,!0,this.adaptOptions(t))).getFlatCoordinates(),r=n.getStride();return oyt(i,0,i.length,r,i),syt(i,r,this.factor_)},t}(lit);vyt={Point:function(n,t,i){var r=n.coordinates;return t&&i&&frt(r,t,i),new ei(r)},LineString:function(n,t){var i=ck(n.arcs,t);return new yi(i)},Polygon:function(n,t){for(var r=[],i=0,u=n.arcs.length;i<u;++i)r[i]=ck(n.arcs[i],t);return new or(r)},MultiPoint:function(n,t,i){var u=n.coordinates,r,f;if(t&&i)for(r=0,f=u.length;r<f;++r)frt(u[r],t,i);return new pe(u)},MultiLineString:function(n,t){for(var r=[],i=0,u=n.arcs.length;i<u;++i)r[i]=ck(n.arcs[i],t);return new yf(r)},MultiPolygon:function(n,t){for(var u=[],i=0,o=n.arcs.length;i<o;++i){for(var f=n.arcs[i],e=[],r=0,s=f.length;r<s;++r)e[r]=ck(f[r],t);u[i]=e}return new we(u)}};pyt=function(n){function t(t){n.call(this);var i=t||{};this.layerName_=i.layerName;this.layers_=i.layers?i.layers:null;this.dataProjection=w(i.dataProjection?i.dataProjection:"EPSG:4326")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFeaturesFromObject=function(n,t){var e,i;if("Topology"==n.type){var c,r=n,u=null,f=null;r.transform&&(u=(c=r.transform).scale,f=c.translate);e=r.arcs;c&&function(n,t,i){for(var r=0,u=n.length;r<u;++r)lhi(n[r],t,i)}(e,u,f);var o,s=[],h=r.objects,l=this.layerName_;for(i in h)this.layers_&&-1==this.layers_.indexOf(i)||("GeometryCollection"===h[i].type?(o=h[i],s.push.apply(s,chi(o,e,u,f,l,i,t))):(o=h[i],s.push(yyt(o,e,u,f,l,i,t))));return s}return[]},t.prototype.readProjectionFromObject=function(){return this.dataProjection},t}(tk);ert=function(n){this.tagName_=n};ert.prototype.getTagName=function(){return this.tagName_};var ay=ert,wyt=function(n){function t(t,i){n.call(this,t);this.conditions=i;g(this.conditions.length>=2,57)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ay),ahi=function(n){function t(){n.call(this,"And",Array.prototype.slice.call(arguments))}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(wyt),byt=function(n){function t(t,i,r){n.call(this,"BBOX");this.geometryName=t;this.extent=i;this.srsName=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ay),ort=function(n){function t(t,i,r,u){n.call(this,t);this.geometryName=i||"the_geom";this.geometry=r;this.srsName=u}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ay),kyt=function(n){function t(t,i,r){n.call(this,"Contains",t,i,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ort),vy=function(n){function t(t,i){n.call(this,t);this.propertyName=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ay),dyt=function(n){function t(t,i,r){n.call(this,"During",t);this.begin=i;this.end=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(vy),ia=function(n){function t(t,i,r,u){n.call(this,t,i);this.expression=r;this.matchCase=u}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(vy),gyt=function(n){function t(t,i,r){n.call(this,"PropertyIsEqualTo",t,i,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ia),npt=function(n){function t(t,i){n.call(this,"PropertyIsGreaterThan",t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ia),tpt=function(n){function t(t,i){n.call(this,"PropertyIsGreaterThanOrEqualTo",t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ia),ipt=function(n){function t(t,i,r){n.call(this,"Intersects",t,i,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ort),rpt=function(n){function t(t,i,r){n.call(this,"PropertyIsBetween",t);this.lowerBoundary=i;this.upperBoundary=r}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(vy),upt=function(n){function t(t,i,r,u,f,e){n.call(this,"PropertyIsLike",t);this.pattern=i;this.wildCard=void 0!==r?r:"*";this.singleChar=void 0!==u?u:".";this.escapeChar=void 0!==f?f:"!";this.matchCase=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(vy),fpt=function(n){function t(t){n.call(this,"PropertyIsNull",t)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(vy),ept=function(n){function t(t,i){n.call(this,"PropertyIsLessThan",t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ia),opt=function(n){function t(t,i){n.call(this,"PropertyIsLessThanOrEqualTo",t,i)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ia),spt=function(n){function t(t){n.call(this,"Not");this.condition=t}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ay),hpt=function(n){function t(t,i,r){n.call(this,"PropertyIsNotEqualTo",t,i,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ia),cpt=function(n){function t(){n.call(this,"Or",Array.prototype.slice.call(arguments))}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(wyt),lpt=function(n){function t(t,i,r){n.call(this,"Within",t,i,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ort);var vhi={"http://www.opengis.net/gml":{boundedBy:u(ct.prototype.readGeometryElement,"bounds")}},yhi={"http://www.opengis.net/wfs":{totalInserted:u(cr),totalUpdated:u(cr),totalDeleted:u(cr)}},phi={"http://www.opengis.net/wfs":{TransactionSummary:u(function(n,t){return h({},yhi,n,t)},"transactionSummary"),InsertResults:u(function(n,t){return h([],ghi,n,t)},"insertIds")}},whi={"http://www.opengis.net/wfs":{PropertyName:e(ut)}},yy={"http://www.opengis.net/wfs":{Insert:e(function(n,t,i){var r=i[i.length-1],f=r.featureType,e=r.featureNS,o=r.gmlVersion,u=rt(e,f);n.appendChild(u);2===o?oy.prototype.writeFeatureElement(u,t,i):et.prototype.writeFeatureElement(u,t,i)}),Update:e(function(n,t,i){var r=i[i.length-1],e,u,s;g(void 0!==t.getId(),27);var l=r.featureType,h=r.featurePrefix,a=r.featureNS,v=hrt(h,l),y=t.getGeometryName();if(n.setAttribute("typeName",v),n.setAttributeNS(srt,"xmlns:"+h,a),e=t.getId(),void 0!==e){for(var o=t.getKeys(),c=[],f=0,p=o.length;f<p;f++)u=t.get(o[f]),void 0!==u&&(s=o[f],u&&"function"==typeof u.getSimplifiedGeometry&&(s=y),c.push({name:s,value:u}));it({gmlVersion:r.gmlVersion,node:n,hasZ:r.hasZ,srsName:r.srsName},yy,gt("Property"),c,i);bpt(n,e,i)}}),Delete:e(function(n,t,i){var r=i[i.length-1],u;g(void 0!==t.getId(),26);var e=r.featureType,f=r.featurePrefix,o=r.featureNS,s=hrt(f,e);n.setAttribute("typeName",s);n.setAttributeNS(srt,"xmlns:"+f,o);u=t.getId();void 0!==u&&bpt(n,u,i)}),Property:e(function(n,t,i){var u=rt(lk,"Name"),f=i[i.length-1].gmlVersion,r;(n.appendChild(u),ut(u,t.name),void 0!==t.value&&null!==t.value)&&(r=rt(lk,"Value"),n.appendChild(r),t.value&&"function"==typeof t.value.getSimplifiedGeometry?2===f?oy.prototype.writeGeometryElement(r,t.value,i):et.prototype.writeGeometryElement(r,t.value,i):ut(r,t.value))}),Native:e(function(n,t){t.vendorId&&n.setAttribute("vendorId",t.vendorId);void 0!==t.safeToIgnore&&n.setAttribute("safeToIgnore",String(t.safeToIgnore));void 0!==t.value&&ut(n,t.value)})}},ypt="feature",srt="http://www.w3.org/2000/xmlns/",lc="http://www.opengis.net/ogc",lk="http://www.opengis.net/wfs",bhi="http://www.opengis.net/fes",ppt={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},wpt="1.1.0",khi=function(n){function t(t){n.call(this);var i=t||{};this.featureType_=i.featureType;this.featureNS_=i.featureNS;this.gmlFormat_=i.gmlFormat?i.gmlFormat:new et;this.schemaLocation_=i.schemaLocation?i.schemaLocation:ppt[wpt]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getFeatureType=function(){return this.featureType_},t.prototype.setFeatureType=function(n){this.featureType_=n},t.prototype.readFeaturesFromNode=function(n,t){var r={node:n},u,i;return nt(r,{featureType:this.featureType_,featureNS:this.featureNS_}),nt(r,this.getReadOptions(n,t||{})),u=[r],this.gmlFormat_.FEATURE_COLLECTION_PARSERS[be].featureMember=b(ct.prototype.readFeaturesInternal),i=h([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,n,u,this.gmlFormat_),i||(i=[]),i},t.prototype.readTransactionResponse=function(n){if(n){if("string"==typeof n){var t=ue(n);return this.readTransactionResponseFromDocument(t)}return ye(n)?this.readTransactionResponseFromDocument(n):this.readTransactionResponseFromNode(n)}},t.prototype.readFeatureCollectionMetadata=function(n){if(n){if("string"==typeof n){var t=ue(n);return this.readFeatureCollectionMetadataFromDocument(t)}return ye(n)?this.readFeatureCollectionMetadataFromDocument(n):this.readFeatureCollectionMetadataFromNode(n)}},t.prototype.readFeatureCollectionMetadataFromDocument=function(n){for(var t=n.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(t)},t.prototype.readFeatureCollectionMetadataFromNode=function(n){var t={},i=eo(n.getAttribute("numberOfFeatures"));return t.numberOfFeatures=i,h(t,vhi,n,[],this.gmlFormat_)},t.prototype.readTransactionResponseFromDocument=function(n){for(var t=n.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(t)},t.prototype.readTransactionResponseFromNode=function(n){return h({},phi,n,[])},t.prototype.writeGetFeature=function(n){var i,t=rt(lk,"GetFeature"),r,u;return(t.setAttribute("service","WFS"),t.setAttribute("version","1.1.0"),n&&(n.handle&&t.setAttribute("handle",n.handle),n.outputFormat&&t.setAttribute("outputFormat",n.outputFormat),void 0!==n.maxFeatures&&t.setAttribute("maxFeatures",String(n.maxFeatures)),n.resultType&&t.setAttribute("resultType",n.resultType),void 0!==n.startIndex&&t.setAttribute("startIndex",String(n.startIndex)),void 0!==n.count&&t.setAttribute("count",String(n.count)),void 0!==n.viewParams&&t.setAttribute("viewParams ",n.viewParams),i=n.filter,n.bbox))&&(g(n.geometryName,12),r=vpt(n.geometryName,n.bbox,n.srsName),i=i?apt(i,r):r),t.setAttributeNS(hs,"xsi:schemaLocation",this.schemaLocation_),u={node:t},nt(u,{srsName:n.srsName,featureNS:n.featureNS?n.featureNS:this.featureNS_,featurePrefix:n.featurePrefix,geometryName:n.geometryName,filter:i,propertyNames:n.propertyNames?n.propertyNames:[]}),g(Array.isArray(n.featureTypes),11),function(n,t,i){var u=i[i.length-1],r=nt({},u);r.node=n;it(r,py,gt("Query"),t,i)}(t,n.featureTypes,[u]),t},t.prototype.writeTransaction=function(n,t,i,r){var h,f,o=[],u=rt(lk,"Transaction"),c=r.version?r.version:wpt,s="1.0.0"===c?2:3,l,e;return u.setAttribute("service","WFS"),u.setAttribute("version",c),r&&(h=r.gmlOptions?r.gmlOptions:{},r.handle&&u.setAttribute("handle",r.handle)),l=ppt[c],u.setAttributeNS(hs,"xsi:schemaLocation",l),e=r.featurePrefix?r.featurePrefix:ypt,n&&(f=nt({node:u},{featureNS:r.featureNS,featureType:r.featureType,featurePrefix:e,gmlVersion:s,hasZ:r.hasZ,srsName:r.srsName}),nt(f,h),it(f,yy,gt("Insert"),n,o)),t&&(f=nt({node:u},{featureNS:r.featureNS,featureType:r.featureType,featurePrefix:e,gmlVersion:s,hasZ:r.hasZ,srsName:r.srsName}),nt(f,h),it(f,yy,gt("Update"),t,o)),i&&it({node:u,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:e,gmlVersion:s,srsName:r.srsName},yy,gt("Delete"),i,o),r.nativeElements&&it({node:u,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:e,gmlVersion:s,srsName:r.srsName},yy,gt("Native"),r.nativeElements,o),u},t.prototype.readProjectionFromDocument=function(n){for(var t=n.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(t);return null},t.prototype.readProjectionFromNode=function(n){var t,i;if(n.firstElementChild&&n.firstElementChild.firstElementChild)for(t=(n=n.firstElementChild.firstElementChild).firstElementChild;t;t=t.nextElementSibling)if(0!==t.childNodes.length&&(1!==t.childNodes.length||3!==t.firstChild.nodeType))return i=[{}],this.gmlFormat_.readGeometryElement(t,i),w(i.pop().srsName);return null},t}(na),dhi={"http://www.opengis.net/ogc":{FeatureId:b(function(n){return n.getAttribute("fid")})}},ghi={"http://www.opengis.net/wfs":{Feature:function(n,t){vu(dhi,n,t)}}};py={"http://www.opengis.net/wfs":{Query:e(function(n,t,i){var s,r=i[i.length-1],u=r.featurePrefix,h=r.featureNS,l=r.propertyNames,c=r.srsName,f,e,o;s=u?hrt(u,t):t;n.setAttribute("typeName",s);c&&n.setAttribute("srsName",c);h&&n.setAttributeNS(srt,"xmlns:"+u,h);f=nt({},r);f.node=n;it(f,whi,gt("PropertyName"),l,i);e=r.filter;e&&(o=rt(lc,"Filter"),n.appendChild(o),kpt(o,e,i))})},"http://www.opengis.net/ogc":{During:e(function(n,t){var f=rt(bhi,"ValueReference"),i,r,u;ut(f,t.propertyName);n.appendChild(f);i=rt(be,"TimePeriod");n.appendChild(i);r=rt(be,"begin");i.appendChild(r);nwt(r,t.begin);u=rt(be,"end");i.appendChild(u);nwt(u,t.end)}),And:e(dpt),Or:e(dpt),Not:e(function(n,t,i){var u={node:n},r=t.condition;it(u,py,gt(r.getTagName()),[r],i)}),BBOX:e(function(n,t,i){i[i.length-1].srsName=t.srsName;ks(n,t.geometryName);et.prototype.writeGeometryElement(n,t.extent,i)}),Contains:e(function(n,t,i){i[i.length-1].srsName=t.srsName;ks(n,t.geometryName);et.prototype.writeGeometryElement(n,t.geometry,i)}),Intersects:e(function(n,t,i){i[i.length-1].srsName=t.srsName;ks(n,t.geometryName);et.prototype.writeGeometryElement(n,t.geometry,i)}),Within:e(function(n,t,i){i[i.length-1].srsName=t.srsName;ks(n,t.geometryName);et.prototype.writeGeometryElement(n,t.geometry,i)}),PropertyIsEqualTo:e(ra),PropertyIsNotEqualTo:e(ra),PropertyIsLessThan:e(ra),PropertyIsLessThanOrEqualTo:e(ra),PropertyIsGreaterThan:e(ra),PropertyIsGreaterThanOrEqualTo:e(ra),PropertyIsNull:e(function(n,t){ks(n,t.propertyName)}),PropertyIsBetween:e(function(n,t){var i,r;ks(n,t.propertyName);i=rt(lc,"LowerBoundary");n.appendChild(i);ak(i,""+t.lowerBoundary);r=rt(lc,"UpperBoundary");n.appendChild(r);ak(r,""+t.upperBoundary)}),PropertyIsLike:e(function(n,t){n.setAttribute("wildCard",t.wildCard);n.setAttribute("singleChar",t.singleChar);n.setAttribute("escapeChar",t.escapeChar);void 0!==t.matchCase&&n.setAttribute("matchCase",t.matchCase.toString());ks(n,t.propertyName);ak(n,""+t.pattern)})}};var nci=khi,twt={POINT:ei,LINESTRING:yi,POLYGON:or,MULTIPOINT:pe,MULTILINESTRING:yf,MULTIPOLYGON:we},iwt="EMPTY",rwt="Z",uwt="M",vk=1,so=2,ds=3,fwt=4,ua=5,tci=6,ici={};for(crt in f)ici[crt]=f[crt].toUpperCase();ho=function(n){this.wkt=n;this.index_=-1};ho.prototype.isAlpha_=function(n){return n>="a"&&n<="z"||n>="A"&&n<="Z"};ho.prototype.isNumeric_=function(n,t){return n>="0"&&n<="9"||"."==n&&!(void 0!==t&&t)};ho.prototype.isWhiteSpace_=function(n){return" "==n||"\t"==n||"\r"==n||"\n"==n};ho.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)};ho.prototype.nextToken=function(){var t,n=this.nextChar_(),r=this.index_,i=n;if("("==n)t=so;else if(","==n)t=ua;else if(")"==n)t=ds;else if(this.isNumeric_(n)||"-"==n)t=fwt,i=this.readNumber_();else if(this.isAlpha_(n))t=vk,i=this.readText_();else{if(this.isWhiteSpace_(n))return this.nextToken();if(""!==n)throw new Error("Unexpected character: "+n);t=tci}return{position:r,value:i,type:t}};ho.prototype.readNumber_=function(){var n,r=this.index_,i=!1,t=!1;do"."==n?i=!0:"e"!=n&&"E"!=n||(t=!0),n=this.nextChar_();while(this.isNumeric_(n,i)||!t&&("e"==n||"E"==n)||t&&("-"==n||"+"==n));return parseFloat(this.wkt.substring(r,this.index_--))};ho.prototype.readText_=function(){var n,t=this.index_;do n=this.nextChar_();while(this.isAlpha_(n));return this.wkt.substring(t,this.index_--).toUpperCase()};bi=function(n){this.lexer_=n;this.token_;this.layout_=v.XY};bi.prototype.consume_=function(){this.token_=this.lexer_.nextToken()};bi.prototype.isTokenType=function(n){return this.token_.type==n};bi.prototype.match=function(n){var t=this.isTokenType(n);return t&&this.consume_(),t};bi.prototype.parse=function(){return this.consume_(),this.parseGeometry_()};bi.prototype.parseGeometryLayout_=function(){var n=v.XY,i=this.token_,t;return this.isTokenType(vk)&&(t=i.value,t===rwt?n=v.XYZ:t===uwt?n=v.XYM:"ZM"===t&&(n=v.XYZM),n!==v.XY&&this.consume_()),n};bi.prototype.parseGeometryCollectionText_=function(){if(this.match(so)){var n=[];do n.push(this.parseGeometry_());while(this.match(ua));if(this.match(ds))return n}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_());};bi.prototype.parsePointText_=function(){if(this.match(so)){var n=this.parsePoint_();if(this.match(ds))return n}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_());};bi.prototype.parseLineStringText_=function(){if(this.match(so)){var n=this.parsePointList_();if(this.match(ds))return n}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_());};bi.prototype.parsePolygonText_=function(){if(this.match(so)){var n=this.parseLineStringTextList_();if(this.match(ds))return n}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_());};bi.prototype.parseMultiPointText_=function(){var n;if(this.match(so)){if(n=this.token_.type==so?this.parsePointTextList_():this.parsePointList_(),this.match(ds))return n}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_());};bi.prototype.parseMultiLineStringText_=function(){if(this.match(so)){var n=this.parseLineStringTextList_();if(this.match(ds))return n}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_());};bi.prototype.parseMultiPolygonText_=function(){if(this.match(so)){var n=this.parsePolygonTextList_();if(this.match(ds))return n}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_());};bi.prototype.parsePoint_=function(){for(var r,n=[],t=this.layout_.length,i=0;i<t;++i){if(r=this.token_,!this.match(fwt))break;n.push(r.value)}if(n.length==t)return n;throw new Error(this.formatErrorMessage_());};bi.prototype.parsePointList_=function(){for(var n=[this.parsePoint_()];this.match(ua);)n.push(this.parsePoint_());return n};bi.prototype.parsePointTextList_=function(){for(var n=[this.parsePointText_()];this.match(ua);)n.push(this.parsePointText_());return n};bi.prototype.parseLineStringTextList_=function(){for(var n=[this.parseLineStringText_()];this.match(ua);)n.push(this.parseLineStringText_());return n};bi.prototype.parsePolygonTextList_=function(){for(var n=[this.parsePolygonText_()];this.match(ua);)n.push(this.parsePolygonText_());return n};bi.prototype.isEmptyGeometry_=function(){var n=this.isTokenType(vk)&&this.token_.value==iwt;return n&&this.consume_(),n};bi.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"};bi.prototype.parseGeometry_=function(){var u=this.token_,t,r,n,i;if(this.match(vk)){if(t=u.value,this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==t)return r=this.parseGeometryCollectionText_(),new ys(r);if(i=twt[t],!i)throw new Error("Invalid geometry type: "+t);switch(t){case"POINT":n=this.parsePointText_();break;case"LINESTRING":n=this.parseLineStringText_();break;case"POLYGON":n=this.parsePolygonText_();break;case"MULTIPOINT":n=this.parseMultiPointText_();break;case"MULTILINESTRING":n=this.parseMultiLineStringText_();break;case"MULTIPOLYGON":n=this.parseMultiPolygonText_();break;default:throw new Error("Invalid geometry type: "+t);}return n||(n=i===twt.POINT?[NaN,NaN]:[]),new i(n,this.layout_)}throw new Error(this.formatErrorMessage_());};swt={Point:ewt,LineString:lrt,Polygon:owt,MultiPoint:function(n){for(var i=[],r=n.getPoints(),t=0,u=r.length;t<u;++t)i.push("("+ewt(r[t])+")");return i.join(",")},MultiLineString:function(n){for(var i=[],r=n.getLineStrings(),t=0,u=r.length;t<u;++t)i.push("("+lrt(r[t])+")");return i.join(",")},MultiPolygon:function(n){for(var i=[],r=n.getPolygons(),t=0,u=r.length;t<u;++t)i.push("("+owt(r[t])+")");return i.join(",")},GeometryCollection:function(n){for(var i=[],r=n.getGeometries(),t=0,u=r.length;t<u;++t)i.push(hwt(r[t]));return i.join(",")}};cwt=function(n){function t(t){n.call(this);var i=t||{};this.splitCollection_=void 0!==i.splitCollection&&i.splitCollection}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.parse_=function(n){var t=new ho(n);return new bi(t).parse()},t.prototype.readFeatureFromText=function(n,t){var r=this.readGeometryFromText(n,t),i;return r?(i=new fi,i.setGeometry(r),i):null},t.prototype.readFeaturesFromText=function(n,t){for(var u,e=[],i=this.readGeometryFromText(n,t),o=[],r=0,s=(e=this.splitCollection_&&i.getType()==f.GEOMETRY_COLLECTION?i.getGeometriesArray():[i]).length;r<s;++r)u=new fi,u.setGeometry(e[r]),o.push(u);return o},t.prototype.readGeometryFromText=function(n,t){var i=this.parse_(n);return i?si(i,!1,t):null},t.prototype.writeFeatureText=function(n,t){var i=n.getGeometry();return i?this.writeGeometryText(i,t):""},t.prototype.writeFeaturesText=function(n,t){var u;if(1==n.length)return this.writeFeatureText(n[0],t);for(var r=[],i=0,f=n.length;i<f;++i)r.push(n[i].getGeometry());return u=new ys(r),this.writeGeometryText(u,t)},t.prototype.writeGeometryText=function(n,t){return hwt(si(n,!0,t))},t}(lit);lwt="http://www.w3.org/1999/xlink";wy=function(){};wy.prototype.read=function(n){if(n){if("string"==typeof n){var t=ue(n);return this.readFromDocument(t)}return ye(n)?this.readFromDocument(n):this.readFromNode(n)}return null};wy.prototype.readFromDocument=function(){};wy.prototype.readFromNode=function(){};var art=wy,yr=[null,"http://www.opengis.net/wms"],rci=s(yr,{Service:u(function(n,t){return h({},eci,n,t)}),Capability:u(function(n,t){return h({},uci,n,t)})}),uci=s(yr,{Request:u(function(n,t){return h({},vci,n,t)}),Exception:u(function(n,t){return h([],cci,n,t)}),Layer:u(function(n,t){return h({},awt,n,t)})}),fci=function(n){function t(){n.call(this);this.version=void 0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFromDocument=function(n){for(var t=n.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readFromNode(t);return null},t.prototype.readFromNode=function(n){this.version=n.getAttribute("version").trim();var t=h({version:this.version},rci,n,[]);return t||null},t}(art),eci=s(yr,{Name:u(l),Title:u(l),Abstract:u(l),KeywordList:u(ywt),OnlineResource:u(fa),ContactInformation:u(function(n,t){return h({},oci,n,t)}),Fees:u(l),AccessConstraints:u(l),LayerLimit:u(cr),MaxWidth:u(cr),MaxHeight:u(cr)}),oci=s(yr,{ContactPersonPrimary:u(function(n,t){return h({},sci,n,t)}),ContactPosition:u(l),ContactAddress:u(function(n,t){return h({},hci,n,t)}),ContactVoiceTelephone:u(l),ContactFacsimileTelephone:u(l),ContactElectronicMailAddress:u(l)}),sci=s(yr,{ContactPerson:u(l),ContactOrganization:u(l)}),hci=s(yr,{AddressType:u(l),Address:u(l),City:u(l),StateOrProvince:u(l),PostCode:u(l),Country:u(l)}),cci=s(yr,{Format:b(l)}),awt=s(yr,{Name:u(l),Title:u(l),Abstract:u(l),KeywordList:u(ywt),CRS:ii(l),EX_GeographicBoundingBox:u(function(n,t){var i=h({},aci,n,t);if(i){var r=i.westBoundLongitude,u=i.southBoundLatitude,f=i.eastBoundLongitude,e=i.northBoundLatitude;if(void 0!==r&&void 0!==u&&void 0!==f&&void 0!==e)return[r,u,f,e]}}),BoundingBox:ii(function(n){var t=[fo(n.getAttribute("minx")),fo(n.getAttribute("miny")),fo(n.getAttribute("maxx")),fo(n.getAttribute("maxy"))],i=[fo(n.getAttribute("resx")),fo(n.getAttribute("resy"))];return{crs:n.getAttribute("CRS"),extent:t,res:i}}),Dimension:ii(function(n){return{name:n.getAttribute("name"),units:n.getAttribute("units"),unitSymbol:n.getAttribute("unitSymbol"),"default":n.getAttribute("default"),multipleValues:hc(n.getAttribute("multipleValues")),nearestValue:hc(n.getAttribute("nearestValue")),current:hc(n.getAttribute("current")),values:l(n)}}),Attribution:u(function(n,t){return h({},lci,n,t)}),AuthorityURL:ii(function(n,t){var i=co(n,t);if(i)return i.name=n.getAttribute("name"),i}),Identifier:ii(l),MetadataURL:ii(function(n,t){var i=co(n,t);if(i)return i.type=n.getAttribute("type"),i}),DataURL:ii(co),FeatureListURL:ii(co),Style:ii(function(n,t){return h({},bci,n,t)}),MinScaleDenominator:u(yt),MaxScaleDenominator:u(yt),Layer:ii(function(n,t){var r=t[t.length-1],i=h({},awt,n,t),u,o,f,e,s,c;if(i)return u=hc(n.getAttribute("queryable")),void 0===u&&(u=r.queryable),i.queryable=void 0!==u&&u,o=eo(n.getAttribute("cascaded")),void 0===o&&(o=r.cascaded),i.cascaded=o,f=hc(n.getAttribute("opaque")),void 0===f&&(f=r.opaque),i.opaque=void 0!==f&&f,e=hc(n.getAttribute("noSubsets")),void 0===e&&(e=r.noSubsets),i.noSubsets=void 0!==e&&e,s=fo(n.getAttribute("fixedWidth")),s||(s=r.fixedWidth),i.fixedWidth=s,c=fo(n.getAttribute("fixedHeight")),c||(c=r.fixedHeight),i.fixedHeight=c,["Style","CRS","AuthorityURL"].forEach(function(n){if(n in r){var t=i[n]||[];i[n]=t.concat(r[n])}}),["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach(function(n){if(!(n in i)){var t=r[n];i[n]=t}}),i})}),lci=s(yr,{Title:u(l),OnlineResource:u(fa),LogoURL:u(vwt)}),aci=s(yr,{westBoundLongitude:u(yt),eastBoundLongitude:u(yt),southBoundLatitude:u(yt),northBoundLatitude:u(yt)}),vci=s(yr,{GetCapabilities:u(vrt),GetMap:u(vrt),GetFeatureInfo:u(vrt)}),yci=s(yr,{Format:ii(l),DCPType:ii(function(n,t){return h({},pci,n,t)})}),pci=s(yr,{HTTP:u(function(n,t){return h({},wci,n,t)})}),wci=s(yr,{Get:u(co),Post:u(co)}),bci=s(yr,{Name:u(l),Title:u(l),Abstract:u(l),LegendURL:ii(vwt),StyleSheetURL:u(co),StyleURL:u(co)}),kci=s(yr,{Format:u(l),OnlineResource:u(fa)}),dci=s(yr,{Keyword:b(l)});var gci=fci,nli=function(n){function t(t){n.call(this);var i=t||{};this.featureNS_="http://mapserver.gis.umn.edu/mapserver";this.gmlFormat_=new oy;this.layers_=i.layers?i.layers:null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getLayers=function(){return this.layers_},t.prototype.setLayers=function(n){this.layers_=n},t.prototype.readFeatures_=function(n,t){var u,i,r,y,f,c,l,w,a,v;if(n.setAttribute("namespaceURI",this.featureNS_),u=n.localName,i=[],0===n.childNodes.length)return i;if("msGMLOutput"==u)for(r=0,y=n.childNodes.length;r<y;r++)if(f=n.childNodes[r],f.nodeType===Node.ELEMENT_NODE){var e=f,o=t[0],p=e.localName.replace("_layer","");(!this.layers_||tr(this.layers_,p))&&(c=p+"_feature",o.featureType=c,o.featureNS=this.featureNS_,l={},l[c]=b(this.gmlFormat_.readFeatureElement,this.gmlFormat_),w=s([o.featureNS,null],l),e.setAttribute("namespaceURI",this.featureNS_),a=h([],w,e,t,this.gmlFormat_),a&&pt(i,a))}return"FeatureCollection"==u&&(v=h([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,n,[{}],this.gmlFormat_),v&&(i=v)),i},t.prototype.readFeaturesFromNode=function(n,t){var i={};return t&&nt(i,this.getReadOptions(n,t)),this.readFeatures_(n,[i])},t}(na),pu=[null,"http://www.opengis.net/ows/1.1"],tli=s(pu,{ServiceIdentification:u(function(n,t){return h({},yli,n,t)}),ServiceProvider:u(function(n,t){return h({},pli,n,t)}),OperationsMetadata:u(function(n,t){return h({},cli,n,t)})}),ili=function(n){function t(){n.call(this)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFromDocument=function(n){for(var t=n.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readFromNode(t);return null},t.prototype.readFromNode=function(n){var t=h({},tli,n,[]);return t||null},t}(art),rli=s(pu,{DeliveryPoint:u(l),City:u(l),AdministrativeArea:u(l),PostalCode:u(l),Country:u(l),ElectronicMailAddress:u(l)}),uli=s(pu,{Value:ii(function(n){return l(n)})}),fli=s(pu,{AllowedValues:u(function(n,t){return h({},uli,n,t)})}),eli=s(pu,{Phone:u(function(n,t){return h({},lli,n,t)}),Address:u(function(n,t){return h({},rli,n,t)})}),oli=s(pu,{HTTP:u(function(n,t){return h({},sli,n,t)})}),sli=s(pu,{Get:ii(function(n,t){var i=fa(n);if(i)return h({href:i},ali,n,t)}),Post:void 0}),hli=s(pu,{DCP:u(function(n,t){return h({},oli,n,t)})}),cli=s(pu,{Operation:function(n,t){var r=n.getAttribute("name"),i=h({},hli,n,t);i&&(t[t.length-1][r]=i)}}),lli=s(pu,{Voice:u(l),Facsimile:u(l)}),ali=s(pu,{Constraint:ii(function(n,t){var i=n.getAttribute("name");if(i)return h({name:i},fli,n,t)})}),vli=s(pu,{IndividualName:u(l),PositionName:u(l),ContactInfo:u(function(n,t){return h({},eli,n,t)})}),yli=s(pu,{Abstract:u(l),AccessConstraints:u(l),Fees:u(l),Title:u(l),ServiceTypeVersion:u(l),ServiceType:u(l)}),pli=s(pu,{ProviderName:u(l),ProviderSite:u(fa),ServiceContact:u(function(n,t){return h({},vli,n,t)})}),wli=ili,ke=[null,"http://www.opengis.net/wmts/1.0"],ea=[null,"http://www.opengis.net/ows/1.1"],bli=s(ke,{Contents:u(function(n,t){return h({},dli,n,t)})}),kli=function(n){function t(){n.call(this);this.owsParser_=new wli}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.readFromDocument=function(n){for(var t=n.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readFromNode(t);return null},t.prototype.readFromNode=function(n){var i=n.getAttribute("version").trim(),t=this.owsParser_.readFromNode(n);return t?(t.version=i,(t=h(t,bli,n,[]))||null):null},t}(art),dli=s(ke,{Layer:ii(function(n,t){return h({},gli,n,t)}),TileMatrixSet:ii(function(n,t){return h({},eai,n,t)})}),gli=s(ke,{Style:ii(function(n,t){var i=h({},nai,n,t),r;if(i)return r="true"===n.getAttribute("isDefault"),i.isDefault=r,i}),Format:ii(l),TileMatrixSetLink:ii(function(n,t){return h({},tai,n,t)}),Dimension:ii(function(n,t){return h({},uai,n,t)}),ResourceURL:ii(function(n){var i=n.getAttribute("format"),r=n.getAttribute("template"),u=n.getAttribute("resourceType"),t={};return i&&(t.format=i),r&&(t.template=r),u&&(t.resourceType=u),t})},s(ea,{Title:u(l),Abstract:u(l),WGS84BoundingBox:u(function(n,t){var i=h([],fai,n,t);if(2==i.length)return hi(i)}),Identifier:u(l)})),nai=s(ke,{LegendURL:ii(function(n){var t={};return t.format=n.getAttribute("format"),t.href=fa(n),t})},s(ea,{Title:u(l),Identifier:u(l)})),tai=s(ke,{TileMatrixSet:u(l),TileMatrixSetLimits:u(function(n,t){return h([],iai,n,t)})}),iai=s(ke,{TileMatrixLimits:b(function(n,t){return h({},rai,n,t)})}),rai=s(ke,{TileMatrix:u(l),MinTileRow:u(cr),MaxTileRow:u(cr),MinTileCol:u(cr),MaxTileCol:u(cr)}),uai=s(ke,{Default:u(l),Value:ii(l)},s(ea,{Identifier:u(l)})),fai=s(ea,{LowerCorner:b(yrt),UpperCorner:b(yrt)}),eai=s(ke,{WellKnownScaleSet:u(l),TileMatrix:ii(function(n,t){return h({},oai,n,t)})},s(ea,{SupportedCRS:u(l),Identifier:u(l)})),oai=s(ke,{TopLeftCorner:u(yrt),ScaleDenominator:u(yt),TileWidth:u(cr),TileHeight:u(cr),MatrixWidth:u(cr),MatrixHeight:u(cr)},s(ea,{Identifier:u(l)}));pwt=kli;wwt=function(){var n;return function(){if(!n){var t=document.body;t.webkitRequestFullscreen?n="webkitfullscreenchange":t.mozRequestFullScreen?n="mozfullscreenchange":t.msRequestFullscreen?n="MSFullscreenChange":t.requestFullscreen&&(n="fullscreenchange")}return n}}();dwt=function(n){function t(t){var i=t||{},r,u,e,s,f;n.call(this,{element:document.createElement("div"),target:i.target});this.cssClassName_=void 0!==i.className?i.className:"ol-full-screen";r=void 0!==i.label?i.label:"⤢";this.labelNode_="string"==typeof r?document.createTextNode(r):r;u=void 0!==i.labelActive?i.labelActive:"×";this.labelActiveNode_="string"==typeof u?document.createTextNode(u):u;this.button_=document.createElement("button");e=i.tipLabel?i.tipLabel:"Toggle full-screen";this.setClassName_(this.button_,prt());this.button_.setAttribute("type","button");this.button_.title=e;this.button_.appendChild(this.labelNode_);o(this.button_,a.CLICK,this.handleClick_,this);s=this.cssClassName_+" "+ie+" "+gh+" "+(bwt()?"":rgt);f=this.element;f.className=s;f.appendChild(this.button_);this.keys_=void 0!==i.keys&&i.keys;this.source_=i.source}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleClick_=function(n){n.preventDefault();this.handleFullScreen_()},t.prototype.handleFullScreen_=function(){if(bwt()){var n,t=this.getMap();t&&(prt()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(n=this.source_?"string"==typeof this.source_?document.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(n){n.mozRequestFullScreenWithKeys?n.mozRequestFullScreenWithKeys():n.webkitRequestFullscreen?n.webkitRequestFullscreen():kwt(n)}(n):kwt(n)))}},t.prototype.handleFullScreenChange_=function(){var n=this.getMap();prt()?(this.setClassName_(this.button_,!0),fl(this.labelActiveNode_,this.labelNode_)):(this.setClassName_(this.button_,!1),fl(this.labelNode_,this.labelActiveNode_));n&&n.updateSize()},t.prototype.setClassName_=function(n,t){var i=this.cssClassName_+"-true",r=this.cssClassName_+"-false",u=t?i:r;n.classList.remove(i);n.classList.remove(r);n.classList.add(u)},t.prototype.setMap=function(t){n.prototype.setMap.call(this,t);t&&this.listenerKeys.push(o(document,wwt(),this.handleFullScreenChange_,this))},t}(le);yk="projection";nbt=function(n){function t(t){var i=t||{},r=document.createElement("div");r.className=void 0!==i.className?i.className:"ol-mouse-position";n.call(this,{element:r,render:i.render||gwt,target:i.target});o(this,ni(yk),this.handleProjectionChanged_,this);i.coordinateFormat&&this.setCoordinateFormat(i.coordinateFormat);i.projection&&this.setProjection(i.projection);this.undefinedHTML_=void 0!==i.undefinedHTML?i.undefinedHTML:"&#160;";this.renderOnMouseOut_=!!this.undefinedHTML_;this.renderedHTML_=r.innerHTML;this.mapProjection_=null;this.transform_=null;this.lastMouseMovePixel_=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleProjectionChanged_=function(){this.transform_=null},t.prototype.getCoordinateFormat=function(){return this.get("coordinateFormat")},t.prototype.getProjection=function(){return this.get(yk)},t.prototype.handleMouseMove=function(n){var t=this.getMap();this.lastMouseMovePixel_=t.getEventPixel(n);this.updateHTML_(this.lastMouseMovePixel_)},t.prototype.handleMouseOut=function(){this.updateHTML_(null);this.lastMouseMovePixel_=null},t.prototype.setMap=function(t){if(n.prototype.setMap.call(this,t),t){var i=t.getViewport();this.listenerKeys.push(o(i,a.MOUSEMOVE,this.handleMouseMove,this),o(i,a.TOUCHSTART,this.handleMouseMove,this));this.renderOnMouseOut_&&this.listenerKeys.push(o(i,a.MOUSEOUT,this.handleMouseOut,this),o(i,a.TOUCHEND,this.handleMouseOut,this))}},t.prototype.setCoordinateFormat=function(n){this.set("coordinateFormat",n)},t.prototype.setProjection=function(n){this.set(yk,w(n))},t.prototype.updateHTML_=function(n){var i=this.undefinedHTML_,r,t,u;n&&this.mapProjection_&&(this.transform_||(r=this.getProjection(),this.transform_=r?wo(this.mapProjection_,r):ud),t=this.getMap().getCoordinateFromPixel(n),t&&(this.transform_(t,t),u=this.getCoordinateFormat(),i=u?u(t):t.toString()));this.renderedHTML_&&i===this.renderedHTML_||(this.element.innerHTML=i,this.renderedHTML_=i)},t}(le);var sai=function(n){function t(t){var i=t||{},u,l,r,f,e,v,s;n.call(this,{element:document.createElement("div"),render:i.render||tbt,target:i.target});this.collapsed_=void 0===i.collapsed||i.collapsed;this.collapsible_=void 0===i.collapsible||i.collapsible;this.collapsible_||(this.collapsed_=!1);var w=void 0!==i.className?i.className:"ol-overviewmap",b=void 0!==i.tipLabel?i.tipLabel:"Overview map",h=void 0!==i.collapseLabel?i.collapseLabel:"«";"string"==typeof h?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=h):this.collapseLabel_=h;u=void 0!==i.label?i.label:"»";"string"==typeof u?(this.label_=document.createElement("span"),this.label_.textContent=u):this.label_=u;l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;r=document.createElement("button");r.setAttribute("type","button");r.title=b;r.appendChild(l);o(r,a.CLICK,this.handleClick_,this);this.ovmapDiv_=document.createElement("div");this.ovmapDiv_.className="ol-overviewmap-map";this.ovmap_=new yst({controls:new er,interactions:new er,view:i.view});f=this.ovmap_;i.layers&&i.layers.forEach(function(n){f.addLayer(n)}.bind(this));e=document.createElement("div");e.className="ol-overviewmap-box";e.style.boxSizing="border-box";this.boxOverlay_=new pst({position:[0,0],positioning:au.BOTTOM_LEFT,element:e});this.ovmap_.addOverlay(this.boxOverlay_);v=w+" "+ie+" "+gh+(this.collapsed_&&this.collapsible_?" "+cw:"")+(this.collapsible_?"":" ol-uncollapsible");s=this.element;s.className=v;s.appendChild(this.ovmapDiv_);s.appendChild(r);var k=this,d=this.boxOverlay_,c=this.boxOverlay_.getElement(),y=function(n){var t=function(n){return{clientX:n.clientX-c.offsetWidth/2,clientY:n.clientY+c.offsetHeight/2}}(n),i=f.getEventCoordinate(t);d.setPosition(i)},p=function(n){var t=f.getEventCoordinate(n);k.getMap().getView().setCenter(t);window.removeEventListener("mousemove",y);window.removeEventListener("mouseup",p)};c.addEventListener("mousedown",function(){window.addEventListener("mousemove",y);window.addEventListener("mouseup",p)})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setMap=function(t){var r=this.getMap(),u,i;t!==r&&(r&&(u=r.getView(),u&&this.unbindView_(u),this.ovmap_.setTarget(null)),(n.prototype.setMap.call(this,t),t)&&(this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(o(t,gs,this.handleMapPropertyChange_,this)),0===this.ovmap_.getLayers().getLength()&&this.ovmap_.setLayerGroup(t.getLayerGroup()),i=t.getView(),i&&(this.bindView_(i),i.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_()))))},t.prototype.handleMapPropertyChange_=function(n){var t,i;n.key===br.VIEW&&(t=n.oldValue,t&&this.unbindView_(t),i=this.getMap().getView(),this.bindView_(i))},t.prototype.bindView_=function(n){o(n,ni(ul),this.handleRotationChanged_,this)},t.prototype.unbindView_=function(n){ou(n,ni(ul),this.handleRotationChanged_,this)},t.prototype.handleRotationChanged_=function(){this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},t.prototype.validateExtent_=function(){var t=this.getMap(),n=this.ovmap_;if(t.isRendered()&&n.isRendered()){var c=t.getSize(),i=t.getView().calculateExtent(c),r=n.getSize(),l=n.getView().calculateExtent(r),u=n.getPixelFromCoordinate(bf(i)),f=n.getPixelFromCoordinate(fh(i)),e=Math.abs(u[0]-f[0]),o=Math.abs(u[1]-f[1]),s=r[0],h=r[1];e<.1*s||o<.1*h||e>.75*s||o>.75*h?this.resetExtent_():lr(l,i)||this.recenter_()}},t.prototype.resetExtent_=function(){var n=this.getMap(),i=this.ovmap_,r=n.getSize(),t=n.getView().calculateExtent(r),u=i.getView(),f=Math.log(7.5)/Math.LN2;fp(t,1/(.1*Math.pow(2,f/2)));u.fit(t)},t.prototype.recenter_=function(){var n=this.getMap(),t=this.ovmap_,i=n.getView();t.getView().setCenter(i.getCenter())},t.prototype.updateBox_=function(){var n=this.getMap(),r=this.ovmap_;if(n.isRendered()&&r.isRendered()){var s=n.getSize(),u=n.getView(),h=r.getView(),c=u.getRotation(),l=this.boxOverlay_,t=this.boxOverlay_.getElement(),f=u.calculateExtent(s),e=h.getResolution(),i=de(f),o=ao(f),a=this.calculateCoordinateRotate_(c,i);l.setPosition(a);t&&(t.style.width=Math.abs((i[0]-o[0])/e)+"px",t.style.height=Math.abs((o[1]-i[1])/e)+"px")}},t.prototype.calculateCoordinateRotate_=function(n,t){var r,i=this.getMap().getView().getCenter();return i&&(da(r=[t[0]-i[0],t[1]-i[1]],n),ka(r,i)),r},t.prototype.handleClick_=function(n){n.preventDefault();this.handleToggle_()},t.prototype.handleToggle_=function(){this.element.classList.toggle(cw);this.collapsed_?fl(this.collapseLabel_,this.label_):fl(this.label_,this.collapseLabel_);this.collapsed_=!this.collapsed_;var n=this.ovmap_;this.collapsed_||n.isRendered()||(n.updateSize(),this.resetExtent_(),ee(n,iw,function(){this.updateBox_()},this))},t.prototype.getCollapsible=function(){return this.collapsible_},t.prototype.setCollapsible=function(n){this.collapsible_!==n&&(this.collapsible_=n,this.element.classList.toggle("ol-uncollapsible"),!n&&this.collapsed_&&this.handleToggle_())},t.prototype.setCollapsed=function(n){this.collapsible_&&this.collapsed_!==n&&this.handleToggle_()},t.prototype.getCollapsed=function(){return this.collapsed_},t.prototype.getOverviewMap=function(){return this.ovmap_},t}(le),wrt="units",ac={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},hai=[1,2,5];rbt=function(n){function t(t){var i=t||{},r=void 0!==i.className?i.className:"ol-scale-line";n.call(this,{element:document.createElement("div"),render:i.render||ibt,target:i.target});this.innerElement_=document.createElement("div");this.innerElement_.className=r+"-inner";this.element.className=r+" "+ie;this.element.appendChild(this.innerElement_);this.viewState_=null;this.minWidth_=void 0!==i.minWidth?i.minWidth:64;this.renderedVisible_=!1;this.renderedWidth_=void 0;this.renderedHTML_="";o(this,ni(wrt),this.handleUnitsChanged_,this);this.setUnits(i.units||ac.METRIC)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getUnits=function(){return this.get(wrt)},t.prototype.handleUnitsChanged_=function(){this.updateElement_()},t.prototype.setUnits=function(n){this.set(wrt,n)},t.prototype.updateElement_=function(){var o=this.viewState_,i,t,e,c,u,s,h;if(o){var a=o.center,f=o.projection,r=this.getUnits(),l=r==ac.DEGREES?pr.DEGREES:pr.METERS,n=hp(f,o.resolution,a,l);for(f.getUnits()!=pr.DEGREES&&f.getMetersPerUnit()&&l==pr.METERS&&(n*=f.getMetersPerUnit()),i=this.minWidth_*n,t="",r==ac.DEGREES?(e=gf[pr.DEGREES],f.getUnits()==pr.DEGREES?i*=e:n/=e,i<e/60?(t="″",n*=3600):i<e?(t="′",n*=60):t="°"):r==ac.IMPERIAL?i<.9144?(t="in",n/=.0254):i<1609.344?(t="ft",n/=.3048):(t="mi",n/=1609.344):r==ac.NAUTICAL?(n/=1852,t="nm"):r==ac.METRIC?i<.001?(t="μm",n*=1e6):i<1?(t="mm",n*=1e3):i<1e3?t="m":(t="km",n/=1e3):r==ac.US?i<.9144?(t="in",n*=39.37):i<1609.344?(t="ft",n/=.30480061):(t="mi",n/=1609.3472):g(!1,33),s=3*Math.floor(Math.log(this.minWidth_*n)/Math.log(10));;){if(c=hai[(s%3+3)%3]*Math.pow(10,Math.floor(s/3)),u=Math.round(c/n),isNaN(u))return this.element.style.display="none",void(this.renderedVisible_=!1);if(u>=this.minWidth_)break;++s}h=c+" "+t;this.renderedHTML_!=h&&(this.innerElement_.innerHTML=h,this.renderedHTML_=h);this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u);this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},t}(le);oa={VERTICAL:0,HORIZONTAL:1};var cai=function(n){function t(t){var i=t||{},f,r,u;n.call(this,{element:document.createElement("div"),render:i.render||ubt});this.dragListenerKeys_=[];this.currentResolution_=void 0;this.direction_=oa.VERTICAL;this.dragging_;this.heightLimit_=0;this.widthLimit_=0;this.previousX_;this.previousY_;this.thumbSize_=null;this.sliderInitialized_=!1;this.duration_=void 0!==i.duration?i.duration:200;f=void 0!==i.className?i.className:"ol-zoomslider";r=document.createElement("button");r.setAttribute("type","button");r.className=f+"-thumb "+ie;u=this.element;u.className=f+" "+ie+" "+gh;u.appendChild(r);this.dragger_=new rg(u);o(this.dragger_,tu.POINTERDOWN,this.handleDraggerStart_,this);o(this.dragger_,tu.POINTERMOVE,this.handleDraggerDrag_,this);o(this.dragger_,tu.POINTERUP,this.handleDraggerEnd_,this);o(u,a.CLICK,this.handleContainerClick_,this);o(r,a.CLICK,tut)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.disposeInternal=function(){this.dragger_.dispose();n.prototype.disposeInternal.call(this)},t.prototype.setMap=function(t){n.prototype.setMap.call(this,t);t&&t.render()},t.prototype.initSlider_=function(){var t=this.element,r=t.offsetWidth,u=t.offsetHeight,i=t.firstElementChild,n=getComputedStyle(i),f=i.offsetWidth+parseFloat(n.marginRight)+parseFloat(n.marginLeft),e=i.offsetHeight+parseFloat(n.marginTop)+parseFloat(n.marginBottom);this.thumbSize_=[f,e];r>u?(this.direction_=oa.HORIZONTAL,this.widthLimit_=r-f):(this.direction_=oa.VERTICAL,this.heightLimit_=u-e);this.sliderInitialized_=!0},t.prototype.handleContainerClick_=function(n){var t=this.getMap().getView(),i=this.getRelativePosition_(n.offsetX-this.thumbSize_[0]/2,n.offsetY-this.thumbSize_[1]/2),r=this.getResolutionForPosition_(i);t.animate({resolution:t.constrainResolution(r),duration:this.duration_,easing:cf})},t.prototype.handleDraggerStart_=function(n){if(!this.dragging_&&n.originalEvent.target===this.element.firstElementChild&&(this.getMap().getView().setHint(oi,1),this.previousX_=n.clientX,this.previousY_=n.clientY,this.dragging_=!0,0===this.dragListenerKeys_.length)){var t=this.handleDraggerDrag_,i=this.handleDraggerEnd_;this.dragListenerKeys_.push(o(document,a.MOUSEMOVE,t,this),o(document,tu.POINTERMOVE,t,this),o(document,a.MOUSEUP,i,this),o(document,tu.POINTERUP,i,this))}},t.prototype.handleDraggerDrag_=function(n){if(this.dragging_){var t=this.element.firstElementChild,i=n.clientX-this.previousX_+parseFloat(t.style.left),r=n.clientY-this.previousY_+parseFloat(t.style.top),u=this.getRelativePosition_(i,r);this.currentResolution_=this.getResolutionForPosition_(u);this.getMap().getView().setResolution(this.currentResolution_);this.setThumbPosition_(this.currentResolution_);this.previousX_=n.clientX;this.previousY_=n.clientY}},t.prototype.handleDraggerEnd_=function(){if(this.dragging_){var n=this.getMap().getView();n.setHint(oi,-1);n.animate({resolution:n.constrainResolution(this.currentResolution_),duration:this.duration_,easing:cf});this.dragging_=!1;this.previousX_=void 0;this.previousY_=void 0;this.dragListenerKeys_.forEach(lt);this.dragListenerKeys_.length=0}},t.prototype.setThumbPosition_=function(n){var t=this.getPositionForResolution_(n),i=this.element.firstElementChild;this.direction_==oa.HORIZONTAL?i.style.left=this.widthLimit_*t+"px":i.style.top=this.heightLimit_*t+"px"},t.prototype.getRelativePosition_=function(n,t){return vi(this.direction_===oa.HORIZONTAL?n/this.widthLimit_:t/this.heightLimit_,0,1)},t.prototype.getResolutionForPosition_=function(n){return this.getMap().getView().getResolutionForValueFunction()(1-n)},t.prototype.getPositionForResolution_=function(n){return 1-this.getMap().getView().getValueForResolutionFunction()(n)},t}(le),lai=function(n){function t(t){var i=t||{},e,f;n.call(this,{element:document.createElement("div"),target:i.target});this.extent=i.extent?i.extent:null;var s=void 0!==i.className?i.className:"ol-zoom-extent",u=void 0!==i.label?i.label:"E",h=void 0!==i.tipLabel?i.tipLabel:"Fit to extent",r=document.createElement("button");r.setAttribute("type","button");r.title=h;r.appendChild("string"==typeof u?document.createTextNode(u):u);o(r,a.CLICK,this.handleClick_,this);e=s+" "+ie+" "+gh;f=this.element;f.className=e;f.appendChild(r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.handleClick_=function(n){n.preventDefault();this.handleZoomToExtent()},t.prototype.handleZoomToExtent=function(){var n=this.getMap().getView(),t=this.extent?this.extent:n.getProjection().getExtent();n.fit(t)},t}(le),r={array:{},color:{},colorlike:{},control:{},coordinate:{},easing:{},events:{}};r.events.condition={};r.extent={};r.featureloader={};r.format={};r.format.filter={};r.geom={};r.has={};r.interaction={};r.layer={};r.loadingstrategy={};r.proj={};r.proj.Units={};r.proj.proj4={};r.render={};r.render.canvas={};r.renderer={};r.renderer.canvas={};r.renderer.webgl={};r.size={};r.source={};r.sphere={};r.style={};r.style.IconImageCache={};r.tilegrid={};r.xml={};r.Collection=er;r.Feature=fi;r.Geolocation=rkt;r.Graticule=iet;r.Kinetic=ret;r.Map=yst;r.Object=rf;r.Observable=kk;r.Observable.unByKey=function(n){if(Array.isArray(n))for(var t=0,i=n.length;t<i;++t)lt(n[t]);else lt(n)};r.Overlay=pst;r.PluggableMap=hg;r.View=fg;r.WebGLMap=wti;r.array.stableSort=gk;r.color.asArray=yh;r.color.asString=vh;r.colorlike.asColorLike=du;r.control.Attribution=cg;r.control.Attribution.render=det;r.control.Control=le;r.control.FullScreen=dwt;r.control.MousePosition=nbt;r.control.MousePosition.render=gwt;r.control.OverviewMap=sai;r.control.OverviewMap.render=tbt;r.control.Rotate=lg;r.control.Rotate.render=get;r.control.ScaleLine=rbt;r.control.ScaleLine.render=ibt;r.control.Zoom=ag;r.control.ZoomSlider=cai;r.control.ZoomSlider.render=ubt;r.control.ZoomToExtent=lai;r.control.defaults=vg;r.coordinate.add=ka;r.coordinate.createStringXY=function(n){return function(t){return bft(t,n)}};r.coordinate.format=wft;r.coordinate.rotate=da;r.coordinate.toStringHDMS=function(n,t){return n?kp("NS",n[1],t)+" "+kp("EW",n[0],t):""};r.coordinate.toStringXY=bft;r.easing.easeIn=ug;r.easing.easeOut=cf;r.easing.inAndOut=fw;r.easing.linear=pet;r.easing.upAndDown=function(n){return n<.5?fw(2*n):1-fw(2*(n-.5))};r.events.condition.altKeyOnly=iot;r.events.condition.altShiftKeysOnly=rot;r.events.condition.always=iv;r.events.condition.click=function(n){return n.type==ht.CLICK};r.events.condition.doubleClick=function(n){return n.type==ht.DBLCLICK};r.events.condition.focus=wg;r.events.condition.mouseOnly=ae;r.events.condition.never=bg;r.events.condition.noModifierKeys=yw;r.events.condition.platformModifierKeyOnly=function(n){var t=n.originalEvent;return!t.altKey&&(vft?t.metaKey:t.ctrlKey)&&!t.shiftKey};r.events.condition.pointerMove=fot;r.events.condition.primaryAction=eot;r.events.condition.shiftKeyOnly=rv;r.events.condition.singleClick=kg;r.events.condition.targetNotEditable=dg;r.extent.applyTransform=la;r.extent.boundingExtent=hi;r.extent.buffer=ff;r.extent.containsCoordinate=tp;r.extent.containsExtent=lr;r.extent.containsXY=ip;r.extent.createEmpty=eut;r.extent.equals=oe;r.extent.extend=rp;r.extent.getArea=up;r.extent.getBottomLeft=de;r.extent.getBottomRight=fh;r.extent.getCenter=su;r.extent.getHeight=ti;r.extent.getIntersection=of;r.extent.getSize=function(n){return[n[2]-n[0],n[3]-n[1]]};r.extent.getTopLeft=bf;r.extent.getTopRight=ao;r.extent.getWidth=wt;r.extent.intersects=dt;r.extent.isEmpty=eh;r.featureloader.xhr=uct;r.format.EsriJSON=ffi;r.format.Feature=dl;r.format.GML=hfi;r.format.GML2=oy;r.format.GML3=et;r.format.GML32=afi;r.format.GPX=fat;r.format.GeoJSON=eat;r.format.IGC=gei;r.format.KML=ksi;r.format.MVT=uhi;r.format.OSMXML=eyt;r.format.Polyline=ayt;r.format.Polyline.decodeDeltas=hyt;r.format.Polyline.decodeFloats=lyt;r.format.Polyline.encodeDeltas=syt;r.format.Polyline.encodeFloats=cyt;r.format.TopoJSON=pyt;r.format.WFS=nci;r.format.WFS.writeFilter=function(n){var t=rt(lc,"Filter");return kpt(t,n,[]),t};r.format.WKT=cwt;r.format.WMSCapabilities=gci;r.format.WMSGetFeatureInfo=nli;r.format.WMTSCapabilities=pwt;r.format.filter.Bbox=byt;r.format.filter.Contains=kyt;r.format.filter.During=dyt;r.format.filter.EqualTo=gyt;r.format.filter.GreaterThan=npt;r.format.filter.GreaterThanOrEqualTo=tpt;r.format.filter.Intersects=ipt;r.format.filter.IsBetween=rpt;r.format.filter.IsLike=upt;r.format.filter.IsNull=fpt;r.format.filter.LessThan=ept;r.format.filter.LessThanOrEqualTo=opt;r.format.filter.Not=spt;r.format.filter.NotEqualTo=hpt;r.format.filter.Or=cpt;r.format.filter.Within=lpt;r.format.filter.and=apt;r.format.filter.bbox=vpt;r.format.filter.between=function(n,t,i){return new rpt(n,t,i)};r.format.filter.contains=function(n,t,i){return new kyt(n,t,i)};r.format.filter.during=function(n,t,i){return new dyt(n,t,i)};r.format.filter.equalTo=function(n,t,i){return new gyt(n,t,i)};r.format.filter.greaterThan=function(n,t){return new npt(n,t)};r.format.filter.greaterThanOrEqualTo=function(n,t){return new tpt(n,t)};r.format.filter.intersects=function(n,t,i){return new ipt(n,t,i)};r.format.filter.isNull=function(n){return new fpt(n)};r.format.filter.lessThan=function(n,t){return new ept(n,t)};r.format.filter.lessThanOrEqualTo=function(n,t){return new opt(n,t)};r.format.filter.like=function(n,t,i,r,u,f){return new upt(n,t,i,r,u,f)};r.format.filter.not=function(n){return new spt(n)};r.format.filter.notEqualTo=function(n,t,i){return new hpt(n,t,i)};r.format.filter.or=function(){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(cpt,n))};r.format.filter.within=function(n,t,i){return new lpt(n,t,i)};r.geom.Circle=ptt;r.geom.Geometry=yp;r.geom.GeometryCollection=ys;r.geom.LineString=yi;r.geom.LinearRing=lh;r.geom.MultiLineString=yf;r.geom.MultiPoint=pe;r.geom.MultiPolygon=we;r.geom.Point=ei;r.geom.Polygon=or;r.geom.Polygon.circular=lft;r.geom.Polygon.fromCircle=kd;r.geom.Polygon.fromExtent=ba;r.geom.SimpleGeometry=ce;r.getUid=y;r.has.DEVICE_PIXEL_RATIO=tl;r.has.GEOLOCATION=yft;r.has.TOUCH=dd;r.inherits=function(n,t){n.prototype=Object.create(t.prototype);n.prototype.constructor=n};r.interaction.DoubleClickZoom=tot;r.interaction.DragAndDrop=sui;r.interaction.DragBox=hot;r.interaction.DragPan=oot;r.interaction.DragRotate=sot;r.interaction.DragRotateAndZoom=hui;r.interaction.DragZoom=tn;r.interaction.Draw=lui;r.interaction.Draw.createBox=function(){return function(n,t){var i=hi(n),u=[[de(i),fh(i),ao(i),bf(i),de(i)]],r=t;return r?r.setCoordinates(u):r=new or(u),r}};r.interaction.Draw.createRegularPolygon=function(n,t){return function(i,r){var u=i[0],f=i[1],c=Math.sqrt(ku(u,f)),o=r||kd(new ptt(u),n),s=t,e,h;return t||(e=f[0]-u[0],h=f[1]-u[1],s=Math.atan(h/e)-(e<0?Math.PI:0)),aft(o,u,c,s),o}};r.interaction.Extent=yui;r.interaction.Interaction=ge;r.interaction.KeyboardPan=rn;r.interaction.KeyboardZoom=cot;r.interaction.Modify=bui;r.interaction.MouseWheelZoom=aot;r.interaction.PinchRotate=vot;r.interaction.PinchZoom=yot;r.interaction.Pointer=lf;r.interaction.Select=klt;r.interaction.Snap=nfi;r.interaction.Translate=ufi;r.interaction.defaults=un;r.layer.Base=eg;r.layer.Group=bet;r.layer.Heatmap=rui;r.layer.Image=tlt;r.layer.Tile=rlt;r.layer.Vector=vs;r.layer.VectorTile=uui;r.loadingstrategy.all=fct;r.loadingstrategy.bbox=function(n){return[n]};r.loadingstrategy.tile=function(n){return function(t,i){var f=n.getZForResolution(i),u=n.getTileRangeForExtentAndZ(t,f),e=[],r=[f,0,0];for(r[1]=u.minX;r[1]<=u.maxX;++r[1])for(r[2]=u.minY;r[2]<=u.maxY;++r[2])e.push(n.getTileCoordExtent(r));return e}};r.proj.Projection=va;r.proj.Units.METERS_PER_UNIT=gf;r.proj.addCoordinateTransforms=dut;r.proj.addEquivalentProjections=cp;r.proj.addProjection=fd;r.proj.equivalent=hu;r.proj.fromLonLat=function(n,t){return dc(n,"EPSG:4326",void 0!==t?t:"EPSG:3857")};r.proj.get=w;r.proj.getPointResolution=hp;r.proj.getTransform=he;r.proj.proj4.register=function(n){for(var u,f=Object.keys(n.defs),s=f.length,e,o,i,h,r,c,l,t=0;t<s;++t)e=f[t],w(e)||(o=n.defs(e),fd(new va({code:e,axisOrientation:o.axis,metersPerUnit:o.to_meter,units:o.units})));for(t=0;t<s;++t)for(i=f[t],h=w(i),u=0;u<s;++u)r=f[u],c=w(r),wut(i,r)||(n.defs[i]===n.defs[r]?cp([h,c]):(l=n(i,r),dut(h,c,l.forward,l.inverse)))};r.proj.toLonLat=function(n,t){var i=dc(n,void 0!==t?t:"EPSG:3857","EPSG:4326"),r=i[0];return(r<-180||r>180)&&(i[0]=df(r+180,360)-180),i};r.proj.transform=dc;r.proj.transformExtent=bo;r.render.VectorContext=fv;r.render.canvas.labelCache=ve;r.render.toContext=function(n,t){var i=n.canvas,f=t||{},r=f.pixelRatio||tl,u=f.size,e,o;return u&&(i.width=u[0]*r,i.height=u[1]*r,i.style.width=u[0]+"px",i.style.height=u[1]+"px"),e=[0,0,i.width,i.height],o=sf([1,0,0,1,0,0],r,r),new cn(n,r,e,o,0)};r.renderer.canvas.ImageLayer=ov;r.renderer.canvas.Map=rst;r.renderer.canvas.TileLayer=sv;r.renderer.canvas.VectorLayer=ast;r.renderer.canvas.VectorTileLayer=vst;r.renderer.webgl.ImageLayer=pht;r.renderer.webgl.Map=wht;r.renderer.webgl.TileLayer=rtt;r.renderer.webgl.VectorLayer=ict;r.size.toSize=ru;r.source.BingMaps=uii;r.source.CartoDB=fii;r.source.Cluster=eii;r.source.Image=ls;r.source.ImageArcGISRest=lii;r.source.ImageCanvas=aii;r.source.ImageMapGuide=vii;r.source.ImageStatic=yii;r.source.ImageWMS=pii;r.source.OSM=wii;r.source.OSM.ATTRIBUTION=att;r.source.Raster=tri;r.source.Source=lb;r.source.Stamen=fri;r.source.Tile=gv;r.source.TileArcGISRest=ori;r.source.TileDebug=hri;r.source.TileImage=cs;r.source.TileJSON=cri;r.source.TileWMS=ari;r.source.UTFGrid=yri;r.source.Vector=ec;r.source.VectorTile=dri;r.source.WMTS=gri;r.source.WMTS.optionsFromCapabilities=function(n,t){var i=ha(n.Contents.Layer,function(n){return n.Identifier==t.layer}),u,g,tt,y,f,p,c,l,a,it,s,b,k,d;if(null===i)return null;g=n.Contents.TileMatrixSet;(u=i.TileMatrixSetLink.length>1?uut(i.TileMatrixSetLink,"projection"in t?function(n){var i=ha(g,function(t){return t.Identifier==n.TileMatrixSet}).SupportedCRS,r=w(i.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||w(i),u=w(t.projection);return r&&u?hu(r,u):i==t.projection}:function(n){return n.TileMatrixSet==t.matrixSet}):0)<0&&(u=0);var nt=i.TileMatrixSetLink[u].TileMatrixSet,rt=i.TileMatrixSetLink[u].TileMatrixSetLimits,v=i.Format[0];"format"in t&&(v=t.format);(u=uut(i.Style,function(n){return"style"in t?n.Title==t.style:n.isDefault}))<0&&(u=0);tt=i.Style[u].Identifier;y={};"Dimension"in i&&i.Dimension.forEach(function(n){var i=n.Identifier,t=n.Default;void 0===t&&(t=n.Value[0]);y[i]=t});p=ha(n.Contents.TileMatrixSet,function(n){return n.Identifier==nt});c=p.SupportedCRS;(c&&(f=w(c.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||w(c)),"projection"in t)&&(l=w(t.projection),l&&(f&&!hu(l,f)||(f=l)));s=i.WGS84BoundingBox;void 0!==s&&(b=w("EPSG:4326").getExtent(),it=s[0]==b[0]&&s[2]==b[2],a=bo(s,"EPSG:4326",f),k=f.getExtent(),k&&(lr(k,a)||(a=void 0)));var ut=cct(p,a,rt),h=[],r=t.requestEncoding;if(r=void 0!==r?r:"","OperationsMetadata"in n&&"GetTile"in n.OperationsMetadata)for(var o=n.OperationsMetadata.GetTile.DCP.HTTP.Get,e=0,ft=o.length;e<ft;++e)if(o[e].Constraint){if(d=ha(o[e].Constraint,function(n){return"GetEncoding"==n.name}).AllowedValues.Value,""===r&&(r=d[0]),r!==as.KVP)break;tr(d,as.KVP)&&h.push(o[e].href)}else o[e].href&&(r=as.KVP,h.push(o[e].href));return 0===h.length&&(r=as.REST,i.ResourceURL.forEach(function(n){"tile"===n.resourceType&&(v=n.format,h.push(n.template))})),{urls:h,layer:t.layer,matrixSet:nt,format:v,projection:f,requestEncoding:r,tileGrid:ut,style:tt,dimensions:y,wrapX:it,crossOrigin:t.crossOrigin}};r.source.XYZ=bb;r.source.Zoomify=tui;r.sphere.getArea=function n(t,i){var v=i||{},s=v.radius||aa,p=v.projection||"EPSG:3857",l=t.getType(),e,h,r,o,c,y,u,a;l!==f.GEOMETRY_COLLECTION&&(t=t.clone().transform(p,"EPSG:4326"));u=0;switch(l){case f.POINT:case f.MULTI_POINT:case f.LINE_STRING:case f.MULTI_LINE_STRING:case f.LINEAR_RING:break;case f.POLYGON:for(e=t.getCoordinates(),u=Math.abs(op(e[0],s)),r=1,o=e.length;r<o;++r)u-=Math.abs(op(e[r],s));break;case f.MULTI_POLYGON:for(r=0,o=(e=t.getCoordinates()).length;r<o;++r)for(h=e[r],u+=Math.abs(op(h[0],s)),c=1,y=h.length;c<y;++c)u-=Math.abs(op(h[c],s));break;case f.GEOMETRY_COLLECTION:for(a=t.getGeometries(),r=0,o=a.length;r<o;++r)u+=n(a[r],i);break;default:throw new Error("Unsupported geometry type: "+l);}return u};r.sphere.getDistance=ep;r.sphere.getLength=function n(t,i){var a=i||{},h=a.radius||aa,p=a.projection||"EPSG:3857",c=t.getType(),o,v,r,u,s,y,e,l;c!==f.GEOMETRY_COLLECTION&&(t=t.clone().transform(p,"EPSG:4326"));e=0;switch(c){case f.POINT:case f.MULTI_POINT:break;case f.LINE_STRING:case f.LINEAR_RING:e=id(o=t.getCoordinates(),h);break;case f.MULTI_LINE_STRING:case f.POLYGON:for(r=0,u=(o=t.getCoordinates()).length;r<u;++r)e+=id(o[r],h);break;case f.MULTI_POLYGON:for(r=0,u=(o=t.getCoordinates()).length;r<u;++r)for(s=0,y=(v=o[r]).length;s<y;++s)e+=id(v[s],h);break;case f.GEOMETRY_COLLECTION:for(l=t.getGeometries(),r=0,u=l.length;r<u;++r)e+=n(l[r],i);break;default:throw new Error("Unsupported geometry type: "+c);}return e};r.style.AtlasManager=aht;r.style.Circle=ett;r.style.Fill=te;r.style.Icon=vb;r.style.IconImageCache.shared=ev;r.style.Image=ftt;r.style.RegularShape=lct;r.style.Stroke=hf;r.style.Style=wl;r.style.Text=nv;r.tilegrid.TileGrid=yl;r.tilegrid.WMTS=hct;r.tilegrid.WMTS.createFromCapabilitiesMatrixSet=cct;r.tilegrid.createXYZ=pl;r.xml.getAllTextContent=fu;r.xml.parse=ue;t.default=r}]).default});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).html2canvas=t()}(this,function(){"use strict";function ri(n,t){function i(){this.constructor=n}th(n,t);n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function ot(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})}function ut(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=0<(i=r.trys).length&&i[i.length-1])&&(6===e[0]||2===e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(6===e[0]&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,o])}}var f,u,i,e,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return e={next:o(0),"throw":o(1),"return":o(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e}function eu(n,t,i,r){this.left=n;this.top=t;this.width=i;this.height=r}function rh(n,t,i){return n.slice?n.slice(t,i):new Uint16Array(Array.prototype.slice.call(n,t,i))}function fh(n,t,i,r,u,f){this.initialValue=n;this.errorValue=t;this.highStart=i;this.highValueIndex=r;this.index=u;this.data=f}function ro(n,t,i,r){var o=r[i],u,f,s,e;if(Array.isArray(n)?-1!==n.indexOf(o):n===o)for(u=i;u<=r.length;){if((e=r[++u])===t)return!0;if(e!==hi)break}if(o===hi)for(u=i;0<u;){if(f=r[--u],Array.isArray(n)?-1!==n.indexOf(f):n===f)for(s=i;s<=r.length;){if((e=r[++s])===t)return!0;if(e!==hi)break}if(f!==hi)break}return!1}function eh(n,t){for(var r,i=n;0<=i;){if(r=t[i],r!==hi)return r;i--}return 0}function pv(n,t,i,r,u){var s,h,c,a,v;if(0===i[r]||(s=r-1,Array.isArray(u)&&!0===u[s]))return o;var l=s-1,y=1+s,e=t[s],p=0<=l?t[l]:0,f=t[y];if(2===e&&3===f)return o;if(-1!==lo.indexOf(e))return"!";if(-1!==lo.indexOf(f)||-1!==ah.indexOf(f))return o;if(8===eh(s,t))return"÷";if(11===lh.get(n[s])&&(f===or||f===vu||f===yu)||7===e||7===f||9===e||-1===[hi,fo,su].indexOf(e)&&9===f||-1!==[ef,hu,hh,cr,lr].indexOf(f)||eh(s,t)===cu||ro(23,cu,s,t)||ro([ef,hu],oo,s,t)||ro(12,12,s,t))return o;if(e===hi)return"÷";if(23===e||23===f)return o;if(16===f||16===e)return"÷";if(-1!==[fo,su,oo].indexOf(f)||14===e||36===p&&-1!==kv.indexOf(e)||e===lr&&36===f||f===eo&&-1!==pt.concat(eo,hh,ft,or,vu,yu).indexOf(e)||-1!==pt.indexOf(f)&&e===ft||-1!==pt.indexOf(e)&&f===ft||e===au&&-1!==[or,vu,yu].indexOf(f)||-1!==[or,vu,yu].indexOf(e)&&f===lu||-1!==pt.indexOf(e)&&-1!==vh.indexOf(f)||-1!==vh.indexOf(e)&&-1!==pt.indexOf(f)||-1!==[au,lu].indexOf(e)&&(f===ft||-1!==[cu,su].indexOf(f)&&t[1+y]===ft)||-1!==[cu,su].indexOf(e)&&f===ft||e===ft&&-1!==[ft,lr,cr].indexOf(f))return o;if(-1!==[ft,lr,cr,ef,hu].indexOf(f))for(h=s;0<=h;){if((c=t[h])===ft)return o;if(-1===[lr,cr].indexOf(c))break;h--}if(-1!==[au,lu].indexOf(f))for(h=-1!==[ef,hu].indexOf(e)?l:s;0<=h;){if((c=t[h])===ft)return o;if(-1===[lr,cr].indexOf(c))break;h--}if(co===e&&-1!==[co,of,so,ho].indexOf(f)||-1!==[of,so].indexOf(e)&&-1!==[of,sf].indexOf(f)||-1!==[sf,ho].indexOf(e)&&f===sf||-1!==yh.indexOf(e)&&-1!==[eo,lu].indexOf(f)||-1!==yh.indexOf(f)&&e===au||-1!==pt.indexOf(e)&&-1!==pt.indexOf(f)||e===cr&&-1!==pt.indexOf(f)||-1!==pt.concat(ft).indexOf(e)&&f===cu||-1!==pt.concat(ft).indexOf(f)&&e===hu)return o;if(41===e&&41===f){for(a=i[s],v=1;0<a&&41===t[--a];)v++;if(v%2!=0)return o}return e===vu&&f===yu?o:"÷"}function wv(n,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var i=function(n,t){void 0===t&&(t="strict");var i=[],r=[],u=[];return n.forEach(function(n,f){var e=lh.get(n),o;return(50<e?(u.push(!0),e-=50):u.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(n))?(r.push(f),i.push(16)):4!==e&&11!==e?(r.push(f),31===e?i.push("strict"===t?oo:or):e===ch?i.push(er):29===e?i.push(er):43===e?131072<=n&&n<=196605||196608<=n&&n<=262141?i.push(or):i.push(er):void i.push(e)):0===f?(r.push(f),i.push(er)):(o=i[f-1],-1===bv.indexOf(o)?(r.push(r[f-1]),i.push(o)):(r.push(f),i.push(er)))}),[r,i,u]}(n,t.lineBreak),u=i[0],r=i[1],f=i[2];return"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(r=r.map(function(n){return-1!==[ft,er,ch].indexOf(n)?or:n})),[u,r,"keep-all"===t.wordBreak?f.map(function(t,i){return t&&19968<=n[i]&&n[i]<=40959}):void 0]}function ph(n,t,i,r){this.codePoints=n;this.required="!"===t;this.start=i;this.end=r}function tt(n){return 48<=n&&n<=57}function ar(n){return tt(n)||65<=n&&n<=70||97<=n&&n<=102}function hf(n){return 10===n||9===n||32===n}function cf(n){return function(n){return function(n){return 97<=n&&n<=122}(n)||function(n){return 65<=n&&n<=90}(n)}(n)||function(n){return 128<=n}(n)||95===n}function wh(n){return cf(n)||tt(n)||45===n}function ci(n,t){return 92===n&&10!==t}function lf(n,t,i){return 45===n?cf(t)||ci(t,i):!!cf(n)||!(92!==n||!ci(n,t))}function ao(n,t,i){return 43===n||45===n?!!tt(t)||46===t&&tt(i):tt(46===n?t:n)}function p(){this._value=[]}function et(n){this._tokens=n}function yo(t){return t.type===n.DIMENSION_TOKEN}function vr(t){return t.type===n.NUMBER_TOKEN}function s(t){return t.type===n.IDENT_TOKEN}function ky(t){return t.type===n.STRING_TOKEN}function po(n,t){return s(n)&&n.value===t}function kh(t){return t.type!==n.WHITESPACE_TOKEN}function yr(t){return t.type!==n.WHITESPACE_TOKEN&&t.type!==n.COMMA_TOKEN}function wt(t){var r=[],i=[];return t.forEach(function(t){if(t.type===n.COMMA_TOKEN){if(0===i.length)throw new Error("Error parsing function args, zero tokens for arg");return r.push(i),void(i=[])}t.type!==n.WHITESPACE_TOKEN&&i.push(t)}),i.length&&r.push(i),r}function li(t){return t.type===n.NUMBER_TOKEN||t.type===n.DIMENSION_TOKEN}function y(t){return t.type===n.PERCENTAGE_TOKEN||li(t)}function dh(n){return 1<n.length?[n[0],n[1]]:[n[0]]}function pu(n,t,i){var r=n[0],u=n[1];return[h(r,t),h(void 0!==u?u:r,i)]}function gh(t){return t.type===n.DIMENSION_TOKEN&&("deg"===t.unit||"grad"===t.unit||"rad"===t.unit||"turn"===t.unit)}function nc(n){switch(n.filter(s).map(function(n){return n.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[k,k];case"to top":case"bottom":return ht(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[k,vi];case"to right":case"left":return ht(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[vi,vi];case"to bottom":case"top":return ht(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[vi,k];case"to left":case"right":return ht(270)}return 0}function ai(n){return 0==(255&n)}function it(n){var t=255&n,i=255&n>>8,r=255&n>>16,u=255&n>>24;return t<255?"rgba("+u+","+r+","+i+","+t/255+")":"rgb("+u+","+r+","+i+")"}function tc(t,i){if(t.type===n.NUMBER_TOKEN)return t.number;if(t.type!==n.PERCENTAGE_TOKEN)return 0;var r=3===i?1:255;return 3===i?t.number/100*r:Math.round(t.number/100*r)}function ic(n){var i=n.filter(yr),t,o;if(3===i.length){var r=i.map(tc),u=r[0],f=r[1],e=r[2];return yi(u,f,e,1)}return 4!==i.length?0:(t=i.map(tc),o=(u=t[0],f=t[1],e=t[2],t[3]),yi(u,f,e,o))}function bo(n,t,i){return i<0&&(i+=1),1<=i&&(i-=1),i<1/6?(t-n)*i*6+n:i<.5?t:i<2/3?6*(t-n)*(2/3-i)+n:n}function rc(t){var r=t.filter(yr),e=r[0],l=r[1],a=r[2],o=r[3],s=(e.type===n.NUMBER_TOKEN?ht(e.number):yf(e))/(2*Math.PI),u=y(l)?l.number/100:0,i=y(a)?a.number/100:0,v=void 0!==o&&y(o)?h(o,1):1;if(0==u)return yi(255*i,255*i,255*i,1);var f=i<=.5?i*(1+u):i+u-i*u,c=2*i-f,p=bo(c,f,s+1/3),w=bo(c,f,s),b=bo(c,f,s-1/3);return yi(255*p,255*w,255*b,v)}function pf(n){var i=ui(n[0]),t=n[1];return t&&y(t)?{color:i,stop:t}:{color:i,stop:null}}function fc(n,t){var l=n[0],a=n[n.length-1],s,f,u,c;null===l.stop&&(l.stop=k);null===a.stop&&(a.stop=vi);for(var r=[],o=0,i=0;i<n.length;i++)s=n[i].stop,null!==s?(f=h(s,t),o<f?r.push(f):r.push(o),o=f):r.push(null);for(u=null,i=0;i<r.length;i++)if(c=r[i],null===c)null===u&&(u=i);else if(null!==u){for(var v=i-u,y=(c-r[u-1])/(1+v),e=1;e<=v;e++)r[u+e-1]=y*e;u=null}return n.map(function(n,i){return{color:n.color,stop:Math.max(Math.min(1,r[i]/t),0)}})}function gy(n,t,i){var r="number"==typeof n?n:function(n,t,i){var r=t/2,u=i/2,f=h(n[0],t)-r,e=u-h(n[1],i);return(Math.atan2(e,f)+2*Math.PI)%(2*Math.PI)}(n,t,i),u=Math.abs(t*Math.sin(r))+Math.abs(i*Math.cos(r)),f=t/2,e=i/2,o=u/2,s=Math.sin(r-Math.PI/2)*o,c=Math.cos(r-Math.PI/2)*o;return[u,f-c,f+c,e-s,e+s]}function vt(n,t){return Math.sqrt(n*n+t*t)}function ec(n,t,i,r,u){return[[0,0],[0,t],[n,0],[n,t]].reduce(function(n,t){var e=t[0],o=t[1],f=vt(i-e,r-o);return(u?f<n.optimumDistance:f>n.optimumDistance)?{optimumCorner:t,optimumDistance:f}:n},{optimumDistance:u?1/0:-1/0,optimumCorner:null}).optimumCorner}function wf(t){var i=ht(180),r=[];return wt(t).forEach(function(t,u){var f,e;if(0===u){if(f=t[0],f.type===n.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(f.value))return void(i=nc(t));if(gh(f))return void(i=(yf(f)+ht(270))%ht(360))}e=pf(t);r.push(e)}),{angle:i,stops:r,type:rt.LINEAR_GRADIENT}}function oc(n){return 0===n[0]&&255===n[1]&&0===n[2]&&255===n[3]}function st(n){var t=n.id,i=n.enabled;this.id=t;this.enabled=i;this.start=Date.now()}function c(){}function sr(n,t){this.id=n;this._options=t;this._cache={}}function bf(n){var r=d.CIRCLE,t=g.FARTHEST_CORNER,u=[],i=[];return wt(n).forEach(function(n,f){var e=!0,o;(0===f?e=n.reduce(function(n,t){if(s(t))switch(t.value){case"center":return i.push(wo),!1;case"top":case"left":return i.push(k),!1;case"right":case"bottom":return i.push(vi),!1}else if(y(t)||li(t))return i.push(t),!1;return n},e):1===f&&(e=n.reduce(function(n,i){if(s(i))switch(i.value){case"circle":return r=d.CIRCLE,!1;case yc:return r=d.ELLIPSE,!1;case pc:case cc:return t=g.CLOSEST_SIDE,!1;case lc:return t=g.FARTHEST_SIDE,!1;case ac:return t=g.CLOSEST_CORNER,!1;case"cover":case vc:return t=g.FARTHEST_CORNER,!1}else if(li(i)||y(i))return Array.isArray(t)||(t=[]),t.push(i),!1;return n},e)),e)&&(o=pf(n),u.push(o))}),{size:t,shape:r,stops:u,position:i,type:rt.RADIAL_GRADIENT}}function df(n){return{name:"border-"+n+"-color",initialValue:"transparent",prefix:!1,type:e.TYPE_VALUE,format:"color"}}function gf(n){return{name:"border-radius-"+n,initialValue:"0 0",prefix:!1,type:e.LIST,parse:function(n){return dh(n.filter(y))}}}function te(n){return{name:"border-"+n+"-style",initialValue:"solid",prefix:!1,type:e.IDENT_VALUE,parse:function(n){switch(n){case"none":return kr.NONE}return kr.SOLID}}}function ie(n){return{name:"border-"+n+"-width",initialValue:"0",type:e.VALUE,prefix:!1,parse:function(n){return yo(n)?n.number:0}}}function ee(n){return{name:"margin-"+n,initialValue:"0",prefix:!1,type:e.TOKEN_VALUE}}function oe(n){return{name:"padding-"+n,initialValue:"0",prefix:!1,type:e.TYPE_VALUE,format:"length-percentage"}}function nt(n,t){return 0!=(n&t)}function el(n,t,i){if(!n)return"";var r=n[Math.min(t,n.length-1)];return r?i?r.open:r.close:""}function tr(n){this.backgroundClip=u(np,n.backgroundClip);this.backgroundColor=u(tp,n.backgroundColor);this.backgroundImage=u(hp,n.backgroundImage);this.backgroundOrigin=u(cp,n.backgroundOrigin);this.backgroundPosition=u(lp,n.backgroundPosition);this.backgroundRepeat=u(bc,n.backgroundRepeat);this.backgroundSize=u(ap,n.backgroundSize);this.borderTopColor=u(yp,n.borderTopColor);this.borderRightColor=u(pp,n.borderRightColor);this.borderBottomColor=u(wp,n.borderBottomColor);this.borderLeftColor=u(bp,n.borderLeftColor);this.borderTopLeftRadius=u(kp,n.borderTopLeftRadius);this.borderTopRightRadius=u(dp,n.borderTopRightRadius);this.borderBottomRightRadius=u(gp,n.borderBottomRightRadius);this.borderBottomLeftRadius=u(nw,n.borderBottomLeftRadius);this.borderTopStyle=u(tw,n.borderTopStyle);this.borderRightStyle=u(iw,n.borderRightStyle);this.borderBottomStyle=u(rw,n.borderBottomStyle);this.borderLeftStyle=u(uw,n.borderLeftStyle);this.borderTopWidth=u(fw,n.borderTopWidth);this.borderRightWidth=u(ew,n.borderRightWidth);this.borderBottomWidth=u(ow,n.borderBottomWidth);this.borderLeftWidth=u(sw,n.borderLeftWidth);this.boxShadow=u(fk,n.boxShadow);this.color=u(hw,n.color);this.display=u(cw,n.display);this.float=u(aw,n.cssFloat);this.fontFamily=u(wb,n.fontFamily);this.fontSize=u(kb,n.fontSize);this.fontStyle=u(nk,n.fontStyle);this.fontVariant=u(gb,n.fontVariant);this.fontWeight=u(db,n.fontWeight);this.letterSpacing=u(vw,n.letterSpacing);this.lineBreak=u(yw,n.lineBreak);this.lineHeight=u(pw,n.lineHeight);this.listStyleImage=u(ww,n.listStyleImage);this.listStylePosition=u(gc,n.listStylePosition);this.listStyleType=u(is,n.listStyleType);this.marginTop=u(bw,n.marginTop);this.marginRight=u(kw,n.marginRight);this.marginBottom=u(dw,n.marginBottom);this.marginLeft=u(gw,n.marginLeft);this.opacity=u(vb,n.opacity);var t=u(nb,n.overflow);this.overflowX=t[0];this.overflowY=t[1<t.length?1:0];this.overflowWrap=u(tb,n.overflowWrap);this.paddingTop=u(ib,n.paddingTop);this.paddingRight=u(rb,n.paddingRight);this.paddingBottom=u(ub,n.paddingBottom);this.paddingLeft=u(fb,n.paddingLeft);this.position=u(il,n.position);this.textAlign=u(tl,n.textAlign);this.textDecorationColor=u(yb,n.textDecorationColor||n.color);this.textDecorationLine=u(pb,n.textDecorationLine);this.textShadow=u(rl,n.textShadow);this.textTransform=u(eb,n.textTransform);this.transform=u(ob,n.transform);this.transformOrigin=u(cb,n.transformOrigin);this.visibility=u(fl,n.visibility);this.wordBreak=u(lb,n.wordBreak);this.zIndex=u(ab,n.zIndex)}function cl(n){var t=ol.call(this,n)||this;return t.src=n.currentSrc||n.src,t.intrinsicWidth=n.naturalWidth,t.intrinsicHeight=n.naturalHeight,dt.getInstance().addImage(t.src),t}function al(n){var t=ll.call(this,n)||this;return t.canvas=n,t.intrinsicWidth=n.width,t.intrinsicHeight=n.height,t}function yl(n){var t=vl.call(this,n)||this,i=new XMLSerializer;return t.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(n)),t.intrinsicWidth=n.width.baseVal.value,t.intrinsicHeight=n.height.baseVal.value,dt.getInstance().addImage(t.svg),t}function wl(n){var t=pl.call(this,n)||this;return t.value=n.value,t}function kl(n){var t=bl.call(this,n)||this;return t.start=n.start,t.reversed="boolean"==typeof n.reversed&&!0===n.reversed,t}function na(n){var t=dl.call(this,n)||this;switch(t.type=n.type.toLowerCase(),t.checked=n.checked,t.value=function(n){var t=n.type===kk?new Array(n.value.length+1).join("•"):n.value;return 0===t.length?n.placeholder||"":t}(n),t.type!==ce&&t.type!==le||(t.styles.backgroundColor=3739148031,t.styles.borderTopColor=t.styles.borderRightColor=t.styles.borderBottomColor=t.styles.borderLeftColor=2779096575,t.styles.borderTopWidth=t.styles.borderRightWidth=t.styles.borderBottomWidth=t.styles.borderLeftWidth=1,t.styles.borderTopStyle=t.styles.borderRightStyle=t.styles.borderBottomStyle=t.styles.borderLeftStyle=kr.SOLID,t.styles.backgroundClip=[at.BORDER_BOX],t.styles.backgroundOrigin=[0],t.bounds=function(n){return n.width>n.height?new si(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new si(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n}(t.bounds)),t.type){case ce:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=wk;break;case le:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=bk}return t}function ia(n){var t=ta.call(this,n)||this,i=n.options[n.selectedIndex||0];return t.value=i&&i.text||"",t}function ua(n){var t=ra.call(this,n)||this;return t.value=n.value,t}function fa(n){return ui(vf.create(n).parseComponentValue())}function oa(n){var t=ea.call(this,n)||this,i,r;t.src=n.src;t.width=parseInt(n.width,10)||0;t.height=parseInt(n.height,10)||0;t.backgroundColor=t.styles.backgroundColor;try{n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement&&(t.tree=la(n.contentWindow.document.documentElement),i=n.contentWindow.document.documentElement?fa(getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):kt.TRANSPARENT,r=n.contentWindow.document.body?fa(getComputedStyle(n.contentWindow.document.body).backgroundColor):kt.TRANSPARENT,t.backgroundColor=ai(i)?ai(r)?t.styles.backgroundColor:r:i)}catch(n){}return t}function sa(n){return"STYLE"===n.tagName}function du(){this.counters={}}function tu(n,t,i,r,u,f){return n<t||i<n?nf(n,u,0<f.length):r.integers.reduce(function(t,i,u){for(;i<=n;)n-=i,t+=r.values[u];return t},"")+f}function ba(n,t,i,r){for(var u="";i||n--,u=r(n)+u,t<=(n/=t)*t;);return u}function a(n,t,i,r,u){var f=i-t+1;return(n<0?"-":"")+(ba(Math.abs(n),f,r,function(n){return v(Math.floor(n%f)+t)})+u)}function hr(n,t,i){void 0===i&&(i=". ");var r=t.length;return ba(Math.abs(n),r,!1,function(n){return t[Math.floor(n%r)]})+i}function oi(n,i,r,u,f,e){var c,s,o,h;if(n<-9999||9999<n)return nf(n,t.CJK_DECIMAL,0<f.length);if(c=Math.abs(n),s=f,0===c)return i[0]+s;for(o=0;0<c&&o<=4;o++)h=c%10,0==h&&nt(e,1)&&""!==s?s=i[h]+s:1<h||1==h&&0===o||1==h&&1===o&&nt(e,2)||1==h&&1===o&&nt(e,4)&&100<n||1==h&&1<o&&nt(e,8)?s=i[h]+(0<o?r[o-1]:"")+s:1==h&&0<o&&(s=r[o-1]+s),c=Math.floor(c/10);return(n<0?u:"")+s}function ir(n,t){if(this.options=t,this.scrolledElements=[],this.referenceElement=n,this.counters=new fd,this.quoteDepth=0,!n.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(n.ownerDocument.documentElement)}function rv(n,t){return n.length===t.length&&n.some(function(n,i){return n===t[i]})}function bs(n,t){this.type=tf.VECTOR;this.x=n;this.y=t}function iu(n,t,i){return new f(n.x+(t.x-n.x)*i,n.y+(t.y-n.y)*i)}function rr(n,t,i,r){this.type=tf.BEZIER_CURVE;this.start=n;this.startControl=t;this.endControl=i;this.end=r}function ru(n){return n.type===tf.BEZIER_CURVE}function we(n){return[n.topLeftBorderBox,n.topRightBorderBox,n.bottomRightBorderBox,n.bottomLeftBorderBox]}function be(n){return[n.topLeftPaddingBox,n.topRightPaddingBox,n.bottomRightPaddingBox,n.bottomLeftPaddingBox]}function ov(n,t){var i,r;if(this.container=n,this.effects=t.slice(0),this.curves=new uv(n),null!==n.styles.transform){var u=n.bounds.left+n.styles.transformOrigin[0].number,f=n.bounds.top+n.styles.transformOrigin[1].number,e=n.styles.transform;this.effects.push(new pd(u,f,e))}n.styles.overflowX!==ki.VISIBLE&&(i=we(this.curves),r=be(this.curves),rv(i,r)?this.effects.push(new ke(i,6)):(this.effects.push(new ke(i,2)),this.effects.push(new ke(r,4))))}function sv(n){var i=n.bounds,t=n.styles;return i.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))}function de(n){var t=n.styles,i=n.bounds,r=h(t.paddingLeft,i.width),f=h(t.paddingRight,i.width),u=h(t.paddingTop,i.width),e=h(t.paddingBottom,i.width);return i.add(r+t.borderLeftWidth,u+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+f),-(t.borderTopWidth+t.borderBottomWidth+u+e))}function ks(n,t,i){var r=function(n,t){return 0===n?t.bounds:2===n?de(t):sv(t)}(fu(n.styles.backgroundOrigin,t),n),s=function(n,t){return n===at.BORDER_BOX?t.bounds:n===at.CONTENT_BOX?de(t):sv(t)}(fu(n.styles.backgroundClip,t),n),u=wd(fu(n.styles.backgroundSize,t),i,r),e=u[0],o=u[1],f=pu(fu(n.styles.backgroundPosition,t),r.width-e,r.height-o);return[bd(fu(n.styles.backgroundRepeat,t),f,u,r,s),Math.round(r.left+f[0]),Math.round(r.top+f[1]),e,o]}function uu(n){return s(n)&&n.value===br.AUTO}function ge(n){return"number"==typeof n}function gs(n){this._data={};this._document=n}function l(n){this._activeEffects=[];this.canvas=n.canvas?n.canvas:document.createElement("canvas");this.ctx=this.canvas.getContext("2d");(this.options=n).canvas||(this.canvas.width=Math.floor(n.width*n.scale),this.canvas.height=Math.floor(n.height*n.scale),this.canvas.style.width=n.width+"px",this.canvas.style.height=n.height+"px");this.fontMetrics=new kd(document);this.ctx.scale(this.options.scale,this.options.scale);this.ctx.translate(-n.x+n.scrollX,-n.y+n.scrollY);this.ctx.textBaseline="bottom";this._activeEffects=[];w.getInstance(n.id).debug("Canvas renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale)}function av(n){this.canvas=n.canvas?n.canvas:document.createElement("canvas");this.ctx=this.canvas.getContext("2d");this.options=n;this.canvas.width=Math.floor(n.width*n.scale);this.canvas.height=Math.floor(n.height*n.scale);this.canvas.style.width=n.width+"px";this.canvas.style.height=n.height+"px";this.ctx.scale(this.options.scale,this.options.scale);this.ctx.translate(-n.x+n.scrollX,-n.y+n.scrollY);w.getInstance(n.id).debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale)}function nh(n){return ui(vf.create(n).parseComponentValue())}for(var th=function(n,t){return(th=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])})(n,t)},to=function(){return(to=Object.assign||function(n){for(var r,i,t=1,u=arguments.length;t<u;t++)for(i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i]);return n}).apply(this,arguments)},si=(eu.prototype.add=function(n,t,i,r){return new eu(this.left+n,this.top+t,this.width+i,this.height+r)},eu.fromClientRect=function(n){return new eu(n.left,n.top,n.width,n.height)},eu),uh,n,r,vf,e,bt,at,pr,uc,kt,dt,hc,d,kf,g,pi,br,ts,bc,kc,t,i,gc,gi,ti,tl,ei,nr,il,rl,bu,rs,fl,ll,fs,vl,es,pl,os,bl,he,ta,hs,ra,cs,ea,ls,f,rf,b,ur,uv,lv,vv,yv,io=function(n){return si.fromClientRect(n.getBoundingClientRect())},uf=function(n){for(var t,u,r=[],i=0,f=n.length;i<f;)t=n.charCodeAt(i++),55296<=t&&t<=56319&&i<f?(u=n.charCodeAt(i++),56320==(64512&u)?r.push(((1023&t)<<10)+(1023&u)+65536):(r.push(t),i--)):r.push(t);return r},v=function(){for(var u,n,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);if(u=t.length,!u)return"";for(var r=[],f=-1,e="";++f<u;)n=t[f],n<=65535?r.push(n):(n-=65536,r.push(55296+(n>>10),n%1024+56320)),(f+1===u||16384<r.length)&&(e+=String.fromCharCode.apply(String,r),r.length=0);return e},ih="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ou="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ff=0;ff<ih.length;ff++)ou[ih.charCodeAt(ff)]=ff;uh=(fh.prototype.get=function(n){var t;if(0<=n){if(n<55296||56319<n&&n<=65535)return t=((t=this.index[n>>5])<<2)+(31&n),this.data[t];if(n<=65535)return t=((t=this.index[2048+(n-55296>>5)])<<2)+(31&n),this.data[t];if(n<this.highStart)return t=2080+(n>>11),t=this.index[t],t+=n>>5&63,t=((t=this.index[t])<<2)+(31&n),this.data[t];if(n<=1114111)return this.data[this.highValueIndex]}return this.errorValue},fh);var fr,yt,uo,oh,sh,hi=10,fo=13,su=15,ef=17,hu=18,hh=19,eo=20,oo=21,cu=22,cr=24,ft=25,lu=26,au=27,lr=28,er=30,vu=32,yu=33,so=34,ho=35,or=37,co=38,of=39,sf=40,ch=42,o="×",lh=(fr=function(n){var t,s,f,e,h,r=.75*n.length,c=n.length,o=0,i,u;for("="===n[n.length-1]&&(r--,"="===n[n.length-2]&&r--),i="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(r):new Array(r),u=Array.isArray(i)?i:new Uint8Array(i),t=0;t<c;t+=4)s=ou[n.charCodeAt(t)],f=ou[n.charCodeAt(t+1)],e=ou[n.charCodeAt(t+2)],h=ou[n.charCodeAt(t+3)],u[o++]=s<<2|f>>4,u[o++]=(15&f)<<4|e>>2,u[o++]=(3&e)<<6|63&h;return i}("KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA"),yt=Array.isArray(fr)?function(n){for(var r=n.length,i=[],t=0;t<r;t+=4)i.push(n[t+3]<<24|n[t+2]<<16|n[t+1]<<8|n[t]);return i}(fr):new Uint32Array(fr),uo=Array.isArray(fr)?function(n){for(var r=n.length,i=[],t=0;t<r;t+=2)i.push(n[t+1]<<8|n[t]);return i}(fr):new Uint16Array(fr),oh=rh(uo,12,yt[4]/2),sh=2===yt[5]?rh(uo,(24+yt[4])/2):function(n,t,i){return n.slice?n.slice(t,i):new Uint32Array(Array.prototype.slice.call(n,t,i))}(yt,Math.ceil((24+yt[4])/4)),new uh(yt[0],yt[1],yt[2],yt[3],oh,sh)),pt=[er,36],lo=[1,2,3,5],ah=[hi,8],vh=[au,lu],bv=lo.concat(ah),yh=[co,of,sf,so,ho],kv=[su,fo],dv=(ph.prototype.slice=function(){return v.apply(void 0,this.codePoints.slice(this.start,this.end))},ph);(r=n||(n={}))[r.STRING_TOKEN=0]="STRING_TOKEN";r[r.BAD_STRING_TOKEN=1]="BAD_STRING_TOKEN";r[r.LEFT_PARENTHESIS_TOKEN=2]="LEFT_PARENTHESIS_TOKEN";r[r.RIGHT_PARENTHESIS_TOKEN=3]="RIGHT_PARENTHESIS_TOKEN";r[r.COMMA_TOKEN=4]="COMMA_TOKEN";r[r.HASH_TOKEN=5]="HASH_TOKEN";r[r.DELIM_TOKEN=6]="DELIM_TOKEN";r[r.AT_KEYWORD_TOKEN=7]="AT_KEYWORD_TOKEN";r[r.PREFIX_MATCH_TOKEN=8]="PREFIX_MATCH_TOKEN";r[r.DASH_MATCH_TOKEN=9]="DASH_MATCH_TOKEN";r[r.INCLUDE_MATCH_TOKEN=10]="INCLUDE_MATCH_TOKEN";r[r.LEFT_CURLY_BRACKET_TOKEN=11]="LEFT_CURLY_BRACKET_TOKEN";r[r.RIGHT_CURLY_BRACKET_TOKEN=12]="RIGHT_CURLY_BRACKET_TOKEN";r[r.SUFFIX_MATCH_TOKEN=13]="SUFFIX_MATCH_TOKEN";r[r.SUBSTRING_MATCH_TOKEN=14]="SUBSTRING_MATCH_TOKEN";r[r.DIMENSION_TOKEN=15]="DIMENSION_TOKEN";r[r.PERCENTAGE_TOKEN=16]="PERCENTAGE_TOKEN";r[r.NUMBER_TOKEN=17]="NUMBER_TOKEN";r[r.FUNCTION=18]="FUNCTION";r[r.FUNCTION_TOKEN=19]="FUNCTION_TOKEN";r[r.IDENT_TOKEN=20]="IDENT_TOKEN";r[r.COLUMN_TOKEN=21]="COLUMN_TOKEN";r[r.URL_TOKEN=22]="URL_TOKEN";r[r.BAD_URL_TOKEN=23]="BAD_URL_TOKEN";r[r.CDC_TOKEN=24]="CDC_TOKEN";r[r.CDO_TOKEN=25]="CDO_TOKEN";r[r.COLON_TOKEN=26]="COLON_TOKEN";r[r.SEMICOLON_TOKEN=27]="SEMICOLON_TOKEN";r[r.LEFT_SQUARE_BRACKET_TOKEN=28]="LEFT_SQUARE_BRACKET_TOKEN";r[r.RIGHT_SQUARE_BRACKET_TOKEN=29]="RIGHT_SQUARE_BRACKET_TOKEN";r[r.UNICODE_RANGE_TOKEN=30]="UNICODE_RANGE_TOKEN";r[r.WHITESPACE_TOKEN=31]="WHITESPACE_TOKEN";r[r.EOF_TOKEN=32]="EOF_TOKEN";var gv={type:n.LEFT_PARENTHESIS_TOKEN},ny={type:n.RIGHT_PARENTHESIS_TOKEN},ty={type:n.COMMA_TOKEN},iy={type:n.SUFFIX_MATCH_TOKEN},ry={type:n.PREFIX_MATCH_TOKEN},uy={type:n.COLUMN_TOKEN},fy={type:n.DASH_MATCH_TOKEN},ey={type:n.INCLUDE_MATCH_TOKEN},oy={type:n.LEFT_CURLY_BRACKET_TOKEN},sy={type:n.RIGHT_CURLY_BRACKET_TOKEN},hy={type:n.SUBSTRING_MATCH_TOKEN},af={type:n.BAD_URL_TOKEN},cy={type:n.BAD_STRING_TOKEN},ly={type:n.CDO_TOKEN},ay={type:n.CDC_TOKEN},vy={type:n.COLON_TOKEN},yy={type:n.SEMICOLON_TOKEN},py={type:n.LEFT_SQUARE_BRACKET_TOKEN},wy={type:n.RIGHT_SQUARE_BRACKET_TOKEN},by={type:n.WHITESPACE_TOKEN},vo={type:n.EOF_TOKEN},bh=(p.prototype.write=function(n){this._value=this._value.concat(uf(n))},p.prototype.read=function(){for(var t=[],n=this.consumeToken();n!==vo;)t.push(n),n=this.consumeToken();return t},p.prototype.consumeToken=function(){var t=this.consumeCodePoint(),c,i,r,a,e;switch(t){case 34:return this.consumeStringToken(34);case 35:var o=this.peekCodePoint(0),s=this.peekCodePoint(1),h=this.peekCodePoint(2);if(wh(o)||ci(s,h))return c=lf(o,s,h)?2:1,i=this.consumeName(),{type:n.HASH_TOKEN,value:i,flags:c};break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),iy;break;case 39:return this.consumeStringToken(39);case 40:return gv;case 41:return ny;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),hy;break;case 43:if(ao(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 44:return ty;case 45:var l=t,u=this.peekCodePoint(0),f=this.peekCodePoint(1);if(ao(l,u,f))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(lf(l,u,f))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(45===u&&62===f)return this.consumeCodePoint(),this.consumeCodePoint(),ay;break;case 46:if(ao(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;)if((r=this.consumeCodePoint(),42===r&&47===(r=this.consumeCodePoint()))||-1===r)return this.consumeToken();break;case 58:return vy;case 59:return yy;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),ly;break;case 64:var y=this.peekCodePoint(0),p=this.peekCodePoint(1),w=this.peekCodePoint(2);if(lf(y,p,w))return i=this.consumeName(),{type:n.AT_KEYWORD_TOKEN,value:i};break;case 91:return py;case 92:if(ci(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case 93:return wy;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ry;break;case 123:return oy;case 125:return sy;case 117:case 85:return a=this.peekCodePoint(0),e=this.peekCodePoint(1),43!==a||!ar(e)&&63!==e||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),fy;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),uy;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ey;break;case-1:return vo}return hf(t)?(this.consumeWhiteSpace(),by):tt(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):cf(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:n.DELIM_TOKEN,value:v(t)}},p.prototype.consumeCodePoint=function(){var n=this._value.shift();return void 0===n?-1:n},p.prototype.reconsumeCodePoint=function(n){this._value.unshift(n)},p.prototype.peekCodePoint=function(n){return n>=this._value.length?-1:this._value[n]},p.prototype.consumeUnicodeRangeToken=function(){for(var e,o,r,u,f,i=[],t=this.consumeCodePoint();ar(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();for(e=!1;63===t&&i.length<6;)i.push(t),t=this.consumeCodePoint(),e=!0;if(e)return o=parseInt(v.apply(void 0,i.map(function(n){return 63===n?48:n})),16),r=parseInt(v.apply(void 0,i.map(function(n){return 63===n?70:n})),16),{type:n.UNICODE_RANGE_TOKEN,start:o,end:r};if(u=parseInt(v.apply(void 0,i),16),45===this.peekCodePoint(0)&&ar(this.peekCodePoint(1))){for(this.consumeCodePoint(),t=this.consumeCodePoint(),f=[];ar(t)&&f.length<6;)f.push(t),t=this.consumeCodePoint();return r=parseInt(v.apply(void 0,f),16),{type:n.UNICODE_RANGE_TOKEN,start:u,end:r}}return{type:n.UNICODE_RANGE_TOKEN,start:u,end:u}},p.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return"url"===t.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:n.FUNCTION_TOKEN,value:t}):{type:n.IDENT_TOKEN,value:t}},p.prototype.consumeUrlToken=function(){var r=[],i,u,f,t;if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:n.URL_TOKEN,value:""};if(u=this.peekCodePoint(0),39===u||34===u)return f=this.consumeStringToken(this.consumeCodePoint()),f.type===n.STRING_TOKEN&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:n.URL_TOKEN,value:f.value}):(this.consumeBadUrlRemnants(),af);for(;;){if(t=this.consumeCodePoint(),-1===t||41===t)return{type:n.URL_TOKEN,value:v.apply(void 0,r)};if(hf(t))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:n.URL_TOKEN,value:v.apply(void 0,r)}):(this.consumeBadUrlRemnants(),af);if(34===t||39===t||40===t||0<=(i=t)&&i<=8||11===i||14<=i&&i<=31||127===i)return this.consumeBadUrlRemnants(),af;if(92===t){if(!ci(t,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),af;r.push(this.consumeEscapedCodePoint())}else r.push(t)}},p.prototype.consumeWhiteSpace=function(){for(;hf(this.peekCodePoint(0));)this.consumeCodePoint()},p.prototype.consumeBadUrlRemnants=function(){for(;;){var n=this.consumeCodePoint();if(41===n||-1===n)return;ci(n,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},p.prototype.consumeStringSlice=function(n){for(var i,t="";0<n;)i=Math.min(6e4,n),t+=v.apply(void 0,this._value.splice(0,i)),n-=i;return this._value.shift(),t},p.prototype.consumeStringToken=function(t){for(var r,f,u="",i=0;;){if(r=this._value[i],-1===r||void 0===r||r===t)return u+=this.consumeStringSlice(i),{type:n.STRING_TOKEN,value:u};if(10===r)return this._value.splice(0,i),cy;92===r&&(f=this._value[i+1],-1!==f&&void 0!==f&&(10===f?(u+=this.consumeStringSlice(i),i=-1,this._value.shift()):ci(r,f)&&(u+=this.consumeStringSlice(i),u+=v(this.consumeEscapedCodePoint()),i=-1)));i++}},p.prototype.consumeNumber=function(){var n=[],r=4,t=this.peekCodePoint(0),i,u;for(43!==t&&45!==t||n.push(this.consumeCodePoint());tt(this.peekCodePoint(0));)n.push(this.consumeCodePoint());if(t=this.peekCodePoint(0),i=this.peekCodePoint(1),46===t&&tt(i))for(n.push(this.consumeCodePoint(),this.consumeCodePoint()),r=8;tt(this.peekCodePoint(0));)n.push(this.consumeCodePoint());if(t=this.peekCodePoint(0),i=this.peekCodePoint(1),u=this.peekCodePoint(2),(69===t||101===t)&&((43===i||45===i)&&tt(u)||tt(i)))for(n.push(this.consumeCodePoint(),this.consumeCodePoint()),r=8;tt(this.peekCodePoint(0));)n.push(this.consumeCodePoint());return[function(n){var t=0,o=1,i,s,r,f,h,e,u,c;for(43!==n[t]&&45!==n[t]||(45===n[t]&&(o=-1),t++),i=[];tt(n[t]);)i.push(n[t++]);for(s=i.length?parseInt(v.apply(void 0,i),10):0,46===n[t]&&t++,r=[];tt(n[t]);)r.push(n[t++]);for(f=r.length,h=f?parseInt(v.apply(void 0,r),10):0,69!==n[t]&&101!==n[t]||t++,e=1,43!==n[t]&&45!==n[t]||(45===n[t]&&(e=-1),t++),u=[];tt(n[t]);)u.push(n[t++]);return c=u.length?parseInt(v.apply(void 0,u),10):0,o*(s+h*Math.pow(10,-f))*Math.pow(10,e*c)}(n),r]},p.prototype.consumeNumericToken=function(){var r=this.consumeNumber(),t=r[0],i=r[1],u=this.peekCodePoint(0),e=this.peekCodePoint(1),o=this.peekCodePoint(2),f;return lf(u,e,o)?(f=this.consumeName(),{type:n.DIMENSION_TOKEN,number:t,flags:i,unit:f}):37===u?(this.consumeCodePoint(),{type:n.PERCENTAGE_TOKEN,number:t,flags:i}):{type:n.NUMBER_TOKEN,number:t,flags:i}},p.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint(),i,n;if(ar(t)){for(i=v(t);ar(this.peekCodePoint(0))&&i.length<6;)i+=v(this.consumeCodePoint());return hf(this.peekCodePoint(0))&&this.consumeCodePoint(),n=parseInt(i,16),0===n||function(n){return 55296<=n&&n<=57343}(n)||1114111<n?65533:n}return-1===t?65533:t},p.prototype.consumeName=function(){for(var n,t="";;)if(n=this.consumeCodePoint(),wh(n))t+=v(n);else{if(!ci(n,this.peekCodePoint(0)))return this.reconsumeCodePoint(n),t;t+=v(this.consumeEscapedCodePoint())}},p);vf=(et.create=function(n){var t=new bh;return t.write(n),new et(t.read())},et.parseValue=function(n){return et.create(n).parseComponentValue()},et.parseValues=function(n){return et.create(n).parseComponentValues()},et.prototype.parseComponentValue=function(){for(var i,t=this.consumeToken();t.type===n.WHITESPACE_TOKEN;)t=this.consumeToken();if(t.type===n.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");for(this.reconsumeToken(t),i=this.consumeComponentValue();(t=this.consumeToken()).type===n.WHITESPACE_TOKEN;);if(t.type===n.EOF_TOKEN)return i;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one");},et.prototype.parseComponentValues=function(){for(var i,t=[];;){if(i=this.consumeComponentValue(),i.type===n.EOF_TOKEN)return t;t.push(i);t.push()}},et.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case n.LEFT_CURLY_BRACKET_TOKEN:case n.LEFT_SQUARE_BRACKET_TOKEN:case n.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(t.type);case n.FUNCTION_TOKEN:return this.consumeFunction(t)}return t},et.prototype.consumeSimpleBlock=function(t){for(var r={type:t,values:[]},i=this.consumeToken();;){if(i.type===n.EOF_TOKEN||dy(i,t))return r;this.reconsumeToken(i);r.values.push(this.consumeComponentValue());i=this.consumeToken()}},et.prototype.consumeFunction=function(t){for(var i,r={name:t.value,values:[],type:n.FUNCTION};;){if(i=this.consumeToken(),i.type===n.EOF_TOKEN||i.type===n.RIGHT_PARENTHESIS_TOKEN)return r;this.reconsumeToken(i);r.values.push(this.consumeComponentValue())}},et.prototype.consumeToken=function(){var n=this._tokens.shift();return void 0===n?vo:n},et.prototype.reconsumeToken=function(n){this._tokens.unshift(n)},et);var dy=function(t,i){return i===n.LEFT_CURLY_BRACKET_TOKEN&&t.type===n.RIGHT_CURLY_BRACKET_TOKEN||i===n.LEFT_SQUARE_BRACKET_TOKEN&&t.type===n.RIGHT_SQUARE_BRACKET_TOKEN||i===n.LEFT_PARENTHESIS_TOKEN&&t.type===n.RIGHT_PARENTHESIS_TOKEN},k={type:n.NUMBER_TOKEN,number:0,flags:4},wo={type:n.PERCENTAGE_TOKEN,number:50,flags:4},vi={type:n.PERCENTAGE_TOKEN,number:100,flags:4},h=function(t,i){if(t.type===n.PERCENTAGE_TOKEN)return t.number/100*i;if(yo(t))switch(t.unit){case"rem":case"em":return 16*t.number;case"px":default:return t.number}return t.number},yf=function(t){if(t.type===n.DIMENSION_TOKEN)switch(t.unit){case"deg":return Math.PI*t.number/180;case"grad":return Math.PI/200*t.number;case"rad":return t.number;case"turn":return 2*Math.PI*t.number}throw new Error("Unsupported angle type");},ht=function(n){return Math.PI*n/180},ui=function(t){var e,f,o;if(t.type===n.FUNCTION){if(e=uc[t.name],void 0===e)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return e(t.values)}if(t.type===n.HASH_TOKEN){if(3===t.value.length){var i=t.value.substring(0,1),r=t.value.substring(1,2),u=t.value.substring(2,3);return yi(parseInt(i+i,16),parseInt(r+r,16),parseInt(u+u,16),1)}if(4===t.value.length)return i=t.value.substring(0,1),r=t.value.substring(1,2),u=t.value.substring(2,3),f=t.value.substring(3,4),yi(parseInt(i+i,16),parseInt(r+r,16),parseInt(u+u,16),parseInt(f+f,16)/255);if(6===t.value.length)return i=t.value.substring(0,2),r=t.value.substring(2,4),u=t.value.substring(4,6),yi(parseInt(i,16),parseInt(r,16),parseInt(u,16),1);if(8===t.value.length)return i=t.value.substring(0,2),r=t.value.substring(2,4),u=t.value.substring(4,6),f=t.value.substring(6,8),yi(parseInt(i,16),parseInt(r,16),parseInt(u,16),parseInt(f,16)/255)}return t.type===n.IDENT_TOKEN&&(o=kt[t.value.toUpperCase()],void 0!==o)?o:kt.TRANSPARENT},yi=function(n,t,i,r){return(n<<24|t<<16|i<<8|Math.round(255*r)<<0)>>>0};uc={hsl:rc,hsla:rc,rgb:ic,rgba:ic};kt={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};(bt=e||(e={}))[bt.VALUE=0]="VALUE";bt[bt.LIST=1]="LIST";bt[bt.IDENT_VALUE=2]="IDENT_VALUE";bt[bt.TYPE_VALUE=3]="TYPE_VALUE";bt[bt.TOKEN_VALUE=4]="TOKEN_VALUE";(pr=at||(at={}))[pr.BORDER_BOX=0]="BORDER_BOX";pr[pr.PADDING_BOX=1]="PADDING_BOX";var np={name:"background-clip",initialValue:"border-box",prefix:!(pr[pr.CONTENT_BOX=2]="CONTENT_BOX"),type:e.LIST,parse:function(n){return n.map(function(n){if(s(n))switch(n.value){case"padding-box":return at.PADDING_BOX;case"content-box":return at.CONTENT_BOX}return at.BORDER_BOX})}},tp={name:"background-color",initialValue:"transparent",prefix:!1,type:e.TYPE_VALUE,format:"color"},ko=function(n,t,i,r,u){var o="http://www.w3.org/2000/svg",e=document.createElementNS(o,"svg"),f=document.createElementNS(o,"foreignObject");return e.setAttributeNS(null,"width",n.toString()),e.setAttributeNS(null,"height",t.toString()),f.setAttributeNS(null,"width","100%"),f.setAttributeNS(null,"height","100%"),f.setAttributeNS(null,"x",i.toString()),f.setAttributeNS(null,"y",r.toString()),f.setAttributeNS(null,"externalResourcesRequired","true"),e.appendChild(f),f.appendChild(u),e},sc=function(n){return new Promise(function(t,i){var r=new Image;r.onload=function(){return t(r)};r.onerror=i;r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(n))})},ct={get SUPPORT_RANGE_BOUNDS(){var n=function(n){var i,t,r,u;return n.createRange&&(i=n.createRange(),i.getBoundingClientRect&&(t=n.createElement("boundtest"),t.style.height="123px",t.style.display="block",n.body.appendChild(t),i.selectNode(t),r=i.getBoundingClientRect(),u=Math.round(r.height),n.body.removeChild(t),123===u))?!0:!1}(document);return Object.defineProperty(ct,"SUPPORT_RANGE_BOUNDS",{value:n}),n},get SUPPORT_SVG_DRAWING(){var n=function(n){var t=new Image,i=n.createElement("canvas"),r=i.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><\/svg>";try{r.drawImage(t,0,0);i.toDataURL()}catch(n){return!1}return!0}(document);return Object.defineProperty(ct,"SUPPORT_SVG_DRAWING",{value:n}),n},get SUPPORT_FOREIGNOBJECT_DRAWING(){var n="function"==typeof Array.from&&"function"==typeof window.fetch?function(n){var r=n.createElement("canvas"),t=100,i,u,f,e;return(r.width=t,r.height=t,i=r.getContext("2d"),!i)?Promise.reject(!1):(i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,t,t),u=new Image,f=r.toDataURL(),u.src=f,e=ko(t,t,0,0,u),i.fillStyle="red",i.fillRect(0,0,t,t),sc(e).then(function(r){var e,u;return i.drawImage(r,0,0),e=i.getImageData(0,0,t,t).data,i.fillStyle="red",i.fillRect(0,0,t,t),u=n.createElement("div"),u.style.backgroundImage="url("+f+")",u.style.height="100px",oc(e)?sc(ko(t,t,0,0,u)):Promise.reject(!1)}).then(function(n){return i.drawImage(n,0,0),oc(i.getImageData(0,0,t,t).data)}).catch(function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(ct,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:n}),n},get SUPPORT_CORS_IMAGES(){var n=void 0!==(new Image).crossOrigin;return Object.defineProperty(ct,"SUPPORT_CORS_IMAGES",{value:n}),n},get SUPPORT_RESPONSE_TYPE(){var n="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(ct,"SUPPORT_RESPONSE_TYPE",{value:n}),n},get SUPPORT_CORS_XHR(){var n="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ct,"SUPPORT_CORS_XHR",{value:n}),n}},w=(st.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,[this.id,this.getTime()+"ms"].concat(t)):this.info.apply(this,t))},st.prototype.getTime=function(){return Date.now()-this.start},st.create=function(n){st.instances[n.id]=new st(n)},st.destroy=function(n){delete st.instances[n]},st.getInstance=function(n){var t=st.instances[n];if(void 0===t)throw new Error("No logger instance found with id "+n);return t},st.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,[this.id,this.getTime()+"ms"].concat(t))},st.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,[this.id,this.getTime()+"ms"].concat(t)):this.info.apply(this,t))},st.instances={},st);dt=(c.create=function(n,t){return c._caches[n]=new hc(n,t)},c.destroy=function(n){delete c._caches[n]},c.open=function(n){var t=c._caches[n];if(void 0!==t)return t;throw new Error('Cache with key "'+n+'" not found');},c.getOrigin=function(n){var t=c._link;return t?(t.href=n,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},c.isSameOrigin=function(n){return c.getOrigin(n)===c._origin},c.setContext=function(n){c._link=n.document.createElement("a");c._origin=c.getOrigin(n.location.href)},c.getInstance=function(){var n=c._current;if(null===n)throw new Error("No cache instance attached");return n},c.attachInstance=function(n){c._current=n},c.detachInstance=function(){c._current=null},c._caches={},c._origin="about:blank",c._current=null,c);hc=(sr.prototype.addImage=function(n){var t=Promise.resolve();return this.has(n)||(op(n)||fp(n))&&(this._cache[n]=this.loadImage(n)),t},sr.prototype.match=function(n){return this._cache[n]},sr.prototype.loadImage=function(n){return ot(this,void 0,void 0,function(){var i,r,u,t,f=this;return ut(this,function(e){switch(e.label){case 0:return i=dt.isSameOrigin(n),r=!go(n)&&!0===this._options.useCORS&&ct.SUPPORT_CORS_IMAGES&&!i,u=!go(n)&&!i&&"string"==typeof this._options.proxy&&ct.SUPPORT_CORS_XHR&&!r,i||!1!==this._options.allowTaint||go(n)||u||r?(t=n,u?[4,this.proxy(t)]:[3,2]):[2];case 1:t=e.sent();e.label=2;case 2:return w.getInstance(this.id).debug("Added image "+n.substring(0,256)),[4,new Promise(function(n,i){var u=new Image;u.onload=function(){return n(u)};u.onerror=i;(ep(t)||r)&&(u.crossOrigin="anonymous");u.src=t;!0===u.complete&&setTimeout(function(){return n(u)},500);0<f._options.imageTimeout&&setTimeout(function(){return i("Timed out ("+f._options.imageTimeout+"ms) loading image")},f._options.imageTimeout)})];case 3:return[2,e.sent()]}})})},sr.prototype.has=function(n){return void 0!==this._cache[n]},sr.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},sr.prototype.proxy=function(n){var i=this,r=this._options.proxy,t;if(!r)throw new Error("No proxy defined");return t=n.substring(0,256),new Promise(function(u,f){var o=ct.SUPPORT_RESPONSE_TYPE?"blob":"text",e=new XMLHttpRequest,s;(e.onload=function(){if(200===e.status)if("text"==o)u(e.response);else{var n=new FileReader;n.addEventListener("load",function(){return u(n.result)},!1);n.addEventListener("error",function(n){return f(n)},!1);n.readAsDataURL(e.response)}else f("Failed to proxy resource "+t+" with status code "+e.status)},e.onerror=f,e.open("GET",r+"?url="+encodeURIComponent(n)+"&responseType="+o),"text"!=o&&e instanceof XMLHttpRequest&&(e.responseType=o),i._options.imageTimeout)&&(s=i._options.imageTimeout,e.timeout=s,e.ontimeout=function(){return f("Timed out ("+s+"ms) proxying "+t)});e.send()})},sr);var rt,wr,ip=/^data:image\/svg\+xml/i,rp=/^data:image\/.*;base64,/i,up=/^data:image\/.*/i,fp=function(n){return ct.SUPPORT_SVG_DRAWING||!sp(n)},go=function(n){return up.test(n)},ep=function(n){return rp.test(n)},op=function(n){return"blob"===n.substr(0,4)},sp=function(n){return"svg"===n.substr(-3).toLowerCase()||ip.test(n)},cc="closest-side",lc="farthest-side",ac="closest-corner",vc="farthest-corner",yc="ellipse",pc="contain";(wr=rt||(rt={}))[wr.URL=0]="URL";wr[wr.LINEAR_GRADIENT=1]="LINEAR_GRADIENT";wr[wr.RADIAL_GRADIENT=2]="RADIAL_GRADIENT";(kf=d||(d={}))[kf.CIRCLE=0]="CIRCLE";kf[kf.ELLIPSE=1]="ELLIPSE";(pi=g||(g={}))[pi.CLOSEST_SIDE=0]="CLOSEST_SIDE";pi[pi.FARTHEST_SIDE=1]="FARTHEST_SIDE";pi[pi.CLOSEST_CORNER=2]="CLOSEST_CORNER";pi[pi.FARTHEST_CORNER=3]="FARTHEST_CORNER";var ns=function(t){var r,i;if(t.type===n.URL_TOKEN)return r={url:t.value,type:rt.URL},dt.getInstance().addImage(t.value),r;if(t.type!==n.FUNCTION)throw new Error("Unsupported image type");if(i=wc[t.name],void 0===i)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return i(t.values)},fi,wi,wc={"linear-gradient":function(t){var i=ht(180),r=[];return wt(t).forEach(function(t,u){var f,e;if(0===u){if(f=t[0],f.type===n.IDENT_TOKEN&&"to"===f.value)return void(i=nc(t));if(gh(f))return void(i=yf(f))}e=pf(t);r.push(e)}),{angle:i,stops:r,type:rt.LINEAR_GRADIENT}},"-moz-linear-gradient":wf,"-ms-linear-gradient":wf,"-o-linear-gradient":wf,"-webkit-linear-gradient":wf,"radial-gradient":function(n){var r=d.CIRCLE,t=g.FARTHEST_CORNER,u=[],i=[];return wt(n).forEach(function(n,f){var e=!0,o,h;0===f&&(o=!1,e=n.reduce(function(n,u){if(o)if(s(u))switch(u.value){case"center":return i.push(wo),n;case"top":case"left":return i.push(k),n;case"right":case"bottom":return i.push(vi),n}else(y(u)||li(u))&&i.push(u);else if(s(u))switch(u.value){case"circle":return r=d.CIRCLE,!1;case yc:return r=d.ELLIPSE,!1;case"at":return!(o=!0);case cc:return t=g.CLOSEST_SIDE,!1;case"cover":case lc:return t=g.FARTHEST_SIDE,!1;case pc:case ac:return t=g.CLOSEST_CORNER,!1;case vc:return t=g.FARTHEST_CORNER,!1}else if(li(u)||y(u))return Array.isArray(t)||(t=[]),t.push(u),!1;return n},e));e&&(h=pf(n),u.push(h))}),{size:t,shape:r,stops:u,position:i,type:rt.RADIAL_GRADIENT}},"-moz-radial-gradient":bf,"-ms-radial-gradient":bf,"-o-radial-gradient":bf,"-webkit-radial-gradient":bf,"-webkit-gradient":function(t){var u=ht(180),i=[],r=rt.LINEAR_GRADIENT,f=d.CIRCLE,e=g.FARTHEST_CORNER;return wt(t).forEach(function(t,u){var f=t[0],e,o,h;if(0===u){if(s(f)&&"linear"===f.value)return void(r=rt.LINEAR_GRADIENT);if(s(f)&&"radial"===f.value)return void(r=rt.RADIAL_GRADIENT)}f.type===n.FUNCTION&&("from"===f.name?(e=ui(f.values[0]),i.push({stop:k,color:e})):"to"===f.name?(e=ui(f.values[0]),i.push({stop:vi,color:e})):"color-stop"===f.name&&(o=f.values.filter(yr),2===o.length&&(e=ui(o[1]),h=o[0],vr(h)&&i.push({stop:{type:n.PERCENTAGE_TOKEN,number:100*h.number,flags:h.flags},color:e}))))}),r===rt.LINEAR_GRADIENT?{angle:(u+ht(180))%ht(360),stops:i,type:r}:{size:e,shape:f,stops:i,position:[],type:r}}},hp={name:"background-image",initialValue:"none",type:e.LIST,prefix:!1,parse:function(t){if(0===t.length)return[];var i=t[0];return i.type===n.IDENT_TOKEN&&"none"===i.value?[]:t.filter(function(t){return yr(t)&&function(t){return t.type!==n.FUNCTION||wc[t.name]}(t)}).map(ns)}},cp={name:"background-origin",initialValue:"border-box",prefix:!1,type:e.LIST,parse:function(n){return n.map(function(n){if(s(n))switch(n.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},lp={name:"background-position",initialValue:"0% 0%",type:e.LIST,prefix:!1,parse:function(n){return wt(n).map(function(n){return n.filter(y)}).map(dh)}};(wi=fi||(fi={}))[wi.REPEAT=0]="REPEAT";wi[wi.NO_REPEAT=1]="NO_REPEAT";wi[wi.REPEAT_X=2]="REPEAT_X";bc={name:"background-repeat",initialValue:"repeat",prefix:!(wi[wi.REPEAT_Y=3]="REPEAT_Y"),type:e.LIST,parse:function(n){return wt(n).map(function(n){return n.filter(s).map(function(n){return n.value}).join(" ")}).map(kc)}};kc=function(n){switch(n){case"no-repeat":return fi.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return fi.REPEAT_X;case"repeat-y":case"no-repeat repeat":return fi.REPEAT_Y;case"repeat":default:return fi.REPEAT}};(ts=br||(br={})).AUTO="auto";ts.CONTAIN="contain";var kr,ne,ap={name:"background-size",initialValue:"0",prefix:!(ts.COVER="cover"),type:e.LIST,parse:function(n){return wt(n).map(function(n){return n.filter(vp)})}},vp=function(n){return s(n)||y(n)},yp=df("top"),pp=df("right"),wp=df("bottom"),bp=df("left"),kp=gf("top-left"),dp=gf("top-right"),gp=gf("bottom-right"),nw=gf("bottom-left");(ne=kr||(kr={}))[ne.NONE=0]="NONE";ne[ne.SOLID=1]="SOLID";var bi,gt,tw=te("top"),iw=te("right"),rw=te("bottom"),uw=te("left"),fw=ie("top"),ew=ie("right"),ow=ie("bottom"),sw=ie("left"),hw={name:"color",initialValue:"transparent",prefix:!1,type:e.TYPE_VALUE,format:"color"},cw={name:"display",initialValue:"inline-block",prefix:!1,type:e.LIST,parse:function(n){return n.filter(s).reduce(function(n,t){return n|lw(t.value)},0)}},lw=function(n){switch(n){case"block":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};(gt=bi||(bi={}))[gt.NONE=0]="NONE";gt[gt.LEFT=1]="LEFT";gt[gt.RIGHT=2]="RIGHT";gt[gt.INLINE_START=3]="INLINE_START";var re,dc,ue,fe,aw={name:"float",initialValue:"none",prefix:!(gt[gt.INLINE_END=4]="INLINE_END"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"left":return bi.LEFT;case"right":return bi.RIGHT;case"inline-start":return bi.INLINE_START;case"inline-end":return bi.INLINE_END}return bi.NONE}},vw={name:"letter-spacing",initialValue:"0",prefix:!1,type:e.VALUE,parse:function(t){return t.type===n.IDENT_TOKEN&&"normal"===t.value?0:t.type===n.NUMBER_TOKEN?t.number:t.type===n.DIMENSION_TOKEN?t.number:0}},yw={name:"line-break",initialValue:(dc=re||(re={})).NORMAL="normal",prefix:!(dc.STRICT="strict"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"strict":return re.STRICT;case"normal":default:return re.NORMAL}}},pw={name:"line-height",initialValue:"normal",prefix:!1,type:e.TOKEN_VALUE},ww={name:"list-style-image",initialValue:"none",type:e.VALUE,prefix:!1,parse:function(t){return t.type===n.IDENT_TOKEN&&"none"===t.value?null:ns(t)}};(fe=ue||(ue={}))[fe.INSIDE=0]="INSIDE";gc={name:"list-style-position",initialValue:"outside",prefix:!(fe[fe.OUTSIDE=1]="OUTSIDE"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"inside":return ue.INSIDE;case"outside":default:return ue.OUTSIDE}}};(i=t||(t={}))[i.NONE=-1]="NONE";i[i.DISC=0]="DISC";i[i.CIRCLE=1]="CIRCLE";i[i.SQUARE=2]="SQUARE";i[i.DECIMAL=3]="DECIMAL";i[i.CJK_DECIMAL=4]="CJK_DECIMAL";i[i.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO";i[i.LOWER_ROMAN=6]="LOWER_ROMAN";i[i.UPPER_ROMAN=7]="UPPER_ROMAN";i[i.LOWER_GREEK=8]="LOWER_GREEK";i[i.LOWER_ALPHA=9]="LOWER_ALPHA";i[i.UPPER_ALPHA=10]="UPPER_ALPHA";i[i.ARABIC_INDIC=11]="ARABIC_INDIC";i[i.ARMENIAN=12]="ARMENIAN";i[i.BENGALI=13]="BENGALI";i[i.CAMBODIAN=14]="CAMBODIAN";i[i.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH";i[i.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM";i[i.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC";i[i.DEVANAGARI=18]="DEVANAGARI";i[i.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC";i[i.GEORGIAN=20]="GEORGIAN";i[i.GUJARATI=21]="GUJARATI";i[i.GURMUKHI=22]="GURMUKHI";i[i.HEBREW=22]="HEBREW";i[i.HIRAGANA=23]="HIRAGANA";i[i.HIRAGANA_IROHA=24]="HIRAGANA_IROHA";i[i.JAPANESE_FORMAL=25]="JAPANESE_FORMAL";i[i.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL";i[i.KANNADA=27]="KANNADA";i[i.KATAKANA=28]="KATAKANA";i[i.KATAKANA_IROHA=29]="KATAKANA_IROHA";i[i.KHMER=30]="KHMER";i[i.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL";i[i.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL";i[i.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL";i[i.LAO=34]="LAO";i[i.LOWER_ARMENIAN=35]="LOWER_ARMENIAN";i[i.MALAYALAM=36]="MALAYALAM";i[i.MONGOLIAN=37]="MONGOLIAN";i[i.MYANMAR=38]="MYANMAR";i[i.ORIYA=39]="ORIYA";i[i.PERSIAN=40]="PERSIAN";i[i.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL";i[i.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL";i[i.TAMIL=43]="TAMIL";i[i.TELUGU=44]="TELUGU";i[i.THAI=45]="THAI";i[i.TIBETAN=46]="TIBETAN";i[i.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL";i[i.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL";i[i.UPPER_ARMENIAN=49]="UPPER_ARMENIAN";i[i.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN";var ki,di,is={name:"list-style-type",initialValue:"none",prefix:!(i[i.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"disc":return t.DISC;case"circle":return t.CIRCLE;case"square":return t.SQUARE;case"decimal":return t.DECIMAL;case"cjk-decimal":return t.CJK_DECIMAL;case"decimal-leading-zero":return t.DECIMAL_LEADING_ZERO;case"lower-roman":return t.LOWER_ROMAN;case"upper-roman":return t.UPPER_ROMAN;case"lower-greek":return t.LOWER_GREEK;case"lower-alpha":return t.LOWER_ALPHA;case"upper-alpha":return t.UPPER_ALPHA;case"arabic-indic":return t.ARABIC_INDIC;case"armenian":return t.ARMENIAN;case"bengali":return t.BENGALI;case"cambodian":return t.CAMBODIAN;case"cjk-earthly-branch":return t.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return t.CJK_HEAVENLY_STEM;case"cjk-ideographic":return t.CJK_IDEOGRAPHIC;case"devanagari":return t.DEVANAGARI;case"ethiopic-numeric":return t.ETHIOPIC_NUMERIC;case"georgian":return t.GEORGIAN;case"gujarati":return t.GUJARATI;case"gurmukhi":return t.GURMUKHI;case"hebrew":return t.HEBREW;case"hiragana":return t.HIRAGANA;case"hiragana-iroha":return t.HIRAGANA_IROHA;case"japanese-formal":return t.JAPANESE_FORMAL;case"japanese-informal":return t.JAPANESE_INFORMAL;case"kannada":return t.KANNADA;case"katakana":return t.KATAKANA;case"katakana-iroha":return t.KATAKANA_IROHA;case"khmer":return t.KHMER;case"korean-hangul-formal":return t.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return t.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return t.KOREAN_HANJA_INFORMAL;case"lao":return t.LAO;case"lower-armenian":return t.LOWER_ARMENIAN;case"malayalam":return t.MALAYALAM;case"mongolian":return t.MONGOLIAN;case"myanmar":return t.MYANMAR;case"oriya":return t.ORIYA;case"persian":return t.PERSIAN;case"simp-chinese-formal":return t.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return t.SIMP_CHINESE_INFORMAL;case"tamil":return t.TAMIL;case"telugu":return t.TELUGU;case"thai":return t.THAI;case"tibetan":return t.TIBETAN;case"trad-chinese-formal":return t.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return t.TRAD_CHINESE_INFORMAL;case"upper-armenian":return t.UPPER_ARMENIAN;case"disclosure-open":return t.DISCLOSURE_OPEN;case"disclosure-closed":return t.DISCLOSURE_CLOSED;case"none":default:return t.NONE}}},bw=ee("top"),kw=ee("right"),dw=ee("bottom"),gw=ee("left");(di=ki||(ki={}))[di.VISIBLE=0]="VISIBLE";di[di.HIDDEN=1]="HIDDEN";di[di.SCROLL=2]="SCROLL";var wu,nl,ni,dr,nb={name:"overflow",initialValue:"visible",prefix:!(di[di.AUTO=3]="AUTO"),type:e.LIST,parse:function(n){return n.filter(s).map(function(n){switch(n.value){case"hidden":return ki.HIDDEN;case"scroll":return ki.SCROLL;case"auto":return ki.AUTO;case"visible":default:return ki.VISIBLE}})}},tb={name:"overflow-wrap",initialValue:(nl=wu||(wu={})).NORMAL="normal",prefix:!(nl.BREAK_WORD="break-word"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"break-word":return wu.BREAK_WORD;case"normal":default:return wu.NORMAL}}},ib=oe("top"),rb=oe("right"),ub=oe("bottom"),fb=oe("left");(dr=ni||(ni={}))[dr.LEFT=0]="LEFT";dr[dr.CENTER=1]="CENTER";tl={name:"text-align",initialValue:"left",prefix:!(dr[dr.RIGHT=2]="RIGHT"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"right":return ni.RIGHT;case"center":case"justify":return ni.CENTER;case"left":default:return ni.LEFT}}};(ti=gi||(gi={}))[ti.STATIC=0]="STATIC";ti[ti.RELATIVE=1]="RELATIVE";ti[ti.ABSOLUTE=2]="ABSOLUTE";ti[ti.FIXED=3]="FIXED";il={name:"position",initialValue:"static",prefix:!(ti[ti.STICKY=4]="STICKY"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"relative":return gi.RELATIVE;case"absolute":return gi.ABSOLUTE;case"fixed":return gi.FIXED;case"sticky":return gi.STICKY}return gi.STATIC}};rl={name:"text-shadow",initialValue:"none",type:e.LIST,prefix:!1,parse:function(n){return 1===n.length&&po(n[0],"none")?[]:wt(n).map(function(n){for(var t,i={color:kt.TRANSPARENT,offsetX:k,offsetY:k,blur:k},r=0,u=0;u<n.length;u++)t=n[u],li(t)?(0===r?i.offsetX=t:1===r?i.offsetY=t:i.blur=t,r++):i.color=ui(t);return i})}};(nr=ei||(ei={}))[nr.NONE=0]="NONE";nr[nr.LOWERCASE=1]="LOWERCASE";nr[nr.UPPERCASE=2]="UPPERCASE";var gr,nu,eb={name:"text-transform",initialValue:"none",prefix:!(nr[nr.CAPITALIZE=3]="CAPITALIZE"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"uppercase":return ei.UPPERCASE;case"lowercase":return ei.LOWERCASE;case"capitalize":return ei.CAPITALIZE}return ei.NONE}},ob={name:"transform",initialValue:"none",prefix:!0,type:e.VALUE,parse:function(t){if(t.type===n.IDENT_TOKEN&&"none"===t.value||t.type!==n.FUNCTION)return null;var i=sb[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return i(t.values)}},sb={matrix:function(t){var i=t.filter(function(t){return t.type===n.NUMBER_TOKEN}).map(function(n){return n.number});return 6===i.length?i:null},matrix3d:function(t){var i=t.filter(function(t){return t.type===n.NUMBER_TOKEN}).map(function(n){return n.number}),r=i[0],u=i[1],f=(i[2],i[3],i[4]),e=i[5],o=(i[6],i[7],i[8],i[9],i[10],i[11],i[12]),s=i[13];return i[14],i[15],16===i.length?[r,u,f,e,o,s]:null}},ul={type:n.PERCENTAGE_TOKEN,number:50,flags:4},hb=[ul,ul],cb={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:e.LIST,parse:function(n){var t=n.filter(y);return 2!==t.length?hb:[t[0],t[1]]}};(nu=gr||(gr={}))[nu.VISIBLE=0]="VISIBLE";nu[nu.HIDDEN=1]="HIDDEN";fl={name:"visible",initialValue:"none",prefix:!(nu[nu.COLLAPSE=2]="COLLAPSE"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"hidden":return gr.HIDDEN;case"collapse":return gr.COLLAPSE;case"visible":default:return gr.VISIBLE}}};(rs=bu||(bu={})).NORMAL="normal";rs.BREAK_ALL="break-all";var ku,us,lb={name:"word-break",initialValue:"normal",prefix:!(rs.KEEP_ALL="keep-all"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"break-all":return bu.BREAK_ALL;case"keep-all":return bu.KEEP_ALL;case"normal":default:return bu.NORMAL}}},ab={name:"z-index",initialValue:"auto",prefix:!1,type:e.VALUE,parse:function(t){if(t.type===n.IDENT_TOKEN)return{auto:!0,order:0};if(vr(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed");}},vb={name:"opacity",initialValue:"1",type:e.VALUE,prefix:!1,parse:function(n){return vr(n)?n.number:1}},yb={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:e.TYPE_VALUE,format:"color"},pb={name:"text-decoration-line",initialValue:"none",prefix:!1,type:e.LIST,parse:function(n){return n.filter(s).map(function(n){switch(n.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(n){return 0!==n})}},wb={name:"font-family",initialValue:"",prefix:!1,type:e.LIST,parse:function(n){return n.filter(bb).map(function(n){return n.value})}},bb=function(t){return t.type===n.STRING_TOKEN||t.type===n.IDENT_TOKEN},kb={name:"font-size",initialValue:"0",prefix:!1,type:e.TYPE_VALUE,format:"length"},db={name:"font-weight",initialValue:"normal",type:e.VALUE,prefix:!1,parse:function(n){if(vr(n))return n.number;if(s(n))switch(n.value){case"bold":return 700;case"normal":default:return 400}return 400}},gb={name:"font-variant",initialValue:"none",type:e.LIST,prefix:!1,parse:function(n){return n.filter(s).map(function(n){return n.value})}};(us=ku||(ku={})).NORMAL="normal";us.ITALIC="italic";var nk={name:"font-style",initialValue:"normal",prefix:!(us.OBLIQUE="oblique"),type:e.IDENT_VALUE,parse:function(n){switch(n){case"oblique":return ku.OBLIQUE;case"italic":return ku.ITALIC;case"normal":default:return ku.NORMAL}}},tk={name:"content",initialValue:"none",type:e.LIST,prefix:!1,parse:function(t){if(0===t.length)return[];var i=t[0];return i.type===n.IDENT_TOKEN&&"none"===i.value?[]:t}},ik={name:"counter-increment",initialValue:"none",prefix:!0,type:e.LIST,parse:function(t){var u,e,r,s;if(0===t.length||(u=t[0],u.type===n.IDENT_TOKEN&&"none"===u.value))return null;for(var o=[],f=t.filter(kh),i=0;i<f.length;i++)e=f[i],r=f[i+1],e.type===n.IDENT_TOKEN&&(s=r&&vr(r)?r.number:1,o.push({counter:e.value,increment:s}));return o}},rk={name:"counter-reset",initialValue:"none",prefix:!0,type:e.LIST,parse:function(n){var i,r,e;if(0===n.length)return[];for(var f=[],u=n.filter(kh),t=0;t<u.length;t++)i=u[t],r=u[t+1],s(i)&&"none"!==i.value&&(e=r&&vr(r)?r.number:0,f.push({counter:i.value,reset:e}));return f}},uk={name:"quotes",initialValue:"none",prefix:!0,type:e.LIST,parse:function(t){var u,f,i,r,e,o;if(0===t.length||(u=t[0],u.type===n.IDENT_TOKEN&&"none"===u.value)||(f=[],i=t.filter(ky),i.length%2!=0))return null;for(r=0;r<i.length;r+=2)e=i[r].value,o=i[r+1].value,f.push({open:e,close:o});return f}},fk={name:"box-shadow",initialValue:"none",type:e.LIST,prefix:!1,parse:function(n){return 1===n.length&&po(n[0],"none")?[]:wt(n).map(function(n){for(var t,i={color:255,offsetX:k,offsetY:k,blur:k,spread:k,inset:!1},r=0,u=0;u<n.length;u++)t=n[u],po(t,"inset")?i.inset=!0:li(t)?(0===r?i.offsetX=t:1===r?i.offsetY=t:2===r?i.blur=t:i.spread=t,r++):i.color=ui(t);return i})}},ek=(tr.prototype.isVisible=function(){return 0<this.display&&0<this.opacity&&this.visibility===gr.VISIBLE},tr.prototype.isTransparent=function(){return ai(this.backgroundColor)},tr.prototype.isTransformed=function(){return null!==this.transform},tr.prototype.isPositioned=function(){return this.position!==gi.STATIC},tr.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},tr.prototype.isFloating=function(){return this.float!==bi.NONE},tr.prototype.isInlineLevel=function(){return nt(this.display,4)||nt(this.display,33554432)||nt(this.display,268435456)||nt(this.display,536870912)||nt(this.display,67108864)||nt(this.display,134217728)},tr);var ol,ok=function(n){this.content=u(tk,n.content);this.quotes=u(uk,n.quotes)},sl=function(n){this.counterIncrement=u(ik,n.counterIncrement);this.counterReset=u(rk,n.counterReset)},u=function(n,t){var o=new bh,h=null!=t?t.toString():n.initialValue,i,r,u,f;o.write(h);i=new vf(o.read());switch(n.type){case e.IDENT_VALUE:return r=i.parseComponentValue(),n.parse(s(r)?r.value:n.initialValue);case e.VALUE:return n.parse(i.parseComponentValue());case e.LIST:return n.parse(i.parseComponentValues());case e.TOKEN_VALUE:return i.parseComponentValue();case e.TYPE_VALUE:switch(n.format){case"angle":return yf(i.parseComponentValue());case"color":return ui(i.parseComponentValue());case"image":return ns(i.parseComponentValue());case"length":return u=i.parseComponentValue(),li(u)?u:k;case"length-percentage":return f=i.parseComponentValue(),y(f)?f:k}}throw new Error("Attempting to parse unsupported css format type "+n.format);},ii=function(n){this.styles=new ek(window.getComputedStyle(n,null));this.textNodes=[];this.elements=[];null!==this.styles.transform&&va(n)&&(n.style.transform="none");this.bounds=io(n);this.flags=0},se=function(n,t){this.text=n;this.bounds=t},sk=function(n){var r=n.ownerDocument,t,i,u;return r&&(t=r.createElement("html2canvaswrapper"),t.appendChild(n.cloneNode(!0)),i=n.parentNode,i)?(i.replaceChild(t,n),u=io(t),t.firstChild&&i.replaceChild(t.firstChild,t),u):new si(0,0,0,0)},hk=function(n,t,i){var u=n.ownerDocument,r;if(!u)throw new Error("Node has no owner document");return r=u.createRange(),r.setStart(n,t),r.setEnd(n,t+i),si.fromClientRect(r.getBoundingClientRect())},ck=function(n,t){return 0!==t.letterSpacing?uf(n).map(function(n){return v(n)}):lk(n,t)},lk=function(n,t){for(var i,u=function(n,t){var r=uf(n),u=wv(r,t),s=u[0],h=u[1],c=u[2],f=r.length,e=0,i=0;return{next:function(){var n,t;if(f<=i)return{done:!0,value:null};for(n=o;i<f&&(n=pv(r,h,s,++i,c))===o;);return n===o&&i!==f?{done:!0,value:null}:(t=new dv(r,n,e,i),e=i,{value:t,done:!1})}}}(n,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap===wu.BREAK_WORD?"break-word":t.wordBreak}),r=[];!(i=u.next()).done;)i.value&&r.push(i.value.slice());return r},ak=function(n,t){this.text=vk(n.data,t.textTransform);this.textBounds=function(n,t,i){var f=ck(n,t),r=[],u=0;return f.forEach(function(n){if(t.textDecorationLine.length||0<n.trim().length)if(ct.SUPPORT_RANGE_BOUNDS)r.push(new se(n,hk(i,u,n.length)));else{var f=i.splitText(n.length);r.push(new se(n,sk(i)));i=f}else ct.SUPPORT_RANGE_BOUNDS||(i=i.splitText(n.length));u+=n.length}),r}(this.text,t,n)},vk=function(n,t){switch(t){case ei.LOWERCASE:return n.toLowerCase();case ei.CAPITALIZE:return n.replace(yk,pk);case ei.UPPERCASE:return n.toUpperCase();default:return n}},yk=/(^|\s|:|-|\(|\))([a-z])/g,pk=function(n,t,i){return 0<n.length?t+i.toUpperCase():n},hl=(ri(cl,ol=ii),cl);fs=(ri(al,ll=ii),al);es=(ri(yl,vl=ii),yl);os=(ri(wl,pl=ii),wl);he=(ri(kl,bl=ii),kl);var dl,wk=[{type:n.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],bk=[{type:n.PERCENTAGE_TOKEN,flags:0,number:50}],ce="checkbox",le="radio",kk="password",gl=707406591,ss=(ri(na,dl=ii),na);hs=(ri(ia,ta=ii),ia);cs=(ri(ua,ra=ii),ua);ls=(ri(oa,ea=ii),oa);var dk=["OL","UL","MENU"],ha=function(n,t,i){for(var u,r=n.firstChild,f=void 0;r;r=f)(f=r.nextSibling,aa(r)&&0<r.data.trim().length)?t.textNodes.push(new ak(r,t.styles)):as(r)&&(u=ca(r),u.styles.isVisible()&&(gk(r,u,i)?u.flags|=4:nd(u.styles)&&(u.flags|=2),-1!==dk.indexOf(r.tagName)&&(u.flags|=8),t.elements.push(u),ae(r)||ya(r)||ve(r)||ha(r,u,i)))},ca=function(n){return ud(n)?new hl(n):pa(n)?new fs(n):ya(n)?new es(n):td(n)?new os(n):id(n)?new he(n):rd(n)?new ss(n):ve(n)?new hs(n):ae(n)?new cs(n):wa(n)?new ls(n):new ii(n)},la=function(n){var t=ca(n);return t.flags|=4,ha(n,t,t),t},gk=function(n,t,i){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||vs(n)&&i.styles.isTransparent()},nd=function(n){return n.isPositioned()||n.isFloating()},aa=function(n){return n.nodeType===Node.TEXT_NODE},as=function(n){return n.nodeType===Node.ELEMENT_NODE},va=function(n){return void 0!==n.style},td=function(n){return"LI"===n.tagName},id=function(n){return"OL"===n.tagName},rd=function(n){return"INPUT"===n.tagName},ya=function(n){return"svg"===n.tagName},vs=function(n){return"BODY"===n.tagName},pa=function(n){return"CANVAS"===n.tagName},ud=function(n){return"IMG"===n.tagName},wa=function(n){return"IFRAME"===n.tagName},ae=function(n){return"TEXTAREA"===n.tagName},ve=function(n){return"SELECT"===n.tagName},fd=(du.prototype.getCounterValue=function(n){var t=this.counters[n];return t&&t.length?t[t.length-1]:1},du.prototype.getCounterValues=function(n){var t=this.counters[n];return t||[]},du.prototype.pop=function(n){var t=this;n.forEach(function(n){return t.counters[n].pop()})},du.prototype.parse=function(n){var t=this,r=n.counterIncrement,f=n.counterReset,u=!0,i;return null!==r&&r.forEach(function(n){var i=t.counters[n.counter];i&&0!==n.increment&&(u=!1,i[Math.max(0,i.length-1)]+=n.increment)}),i=[],u&&f.forEach(function(n){var r=t.counters[n.counter];i.push(n.counter);r||(r=t.counters[n.counter]=[]);r.push(n.reset)}),i},du);var gu,ye,ka={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},da={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},ed={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},od={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ys="마이너스",nf=function(n,i,r){var u=r?". ":"",f=r?"、":"",o=r?", ":"",s=r?" ":"",e;switch(i){case t.DISC:return"•"+s;case t.CIRCLE:return"◦"+s;case t.SQUARE:return"◾"+s;case t.DECIMAL_LEADING_ZERO:return e=a(n,48,57,!0,u),e.length<4?"0"+e:e;case t.CJK_DECIMAL:return hr(n,"〇一二三四五六七八九",f);case t.LOWER_ROMAN:return tu(n,1,3999,ka,t.DECIMAL,u).toLowerCase();case t.UPPER_ROMAN:return tu(n,1,3999,ka,t.DECIMAL,u);case t.LOWER_GREEK:return a(n,945,969,!1,u);case t.LOWER_ALPHA:return a(n,97,122,!1,u);case t.UPPER_ALPHA:return a(n,65,90,!1,u);case t.ARABIC_INDIC:return a(n,1632,1641,!0,u);case t.ARMENIAN:case t.UPPER_ARMENIAN:return tu(n,1,9999,da,t.DECIMAL,u);case t.LOWER_ARMENIAN:return tu(n,1,9999,da,t.DECIMAL,u).toLowerCase();case t.BENGALI:return a(n,2534,2543,!0,u);case t.CAMBODIAN:case t.KHMER:return a(n,6112,6121,!0,u);case t.CJK_EARTHLY_BRANCH:return hr(n,"子丑寅卯辰巳午未申酉戌亥",f);case t.CJK_HEAVENLY_STEM:return hr(n,"甲乙丙丁戊己庚辛壬癸",f);case t.CJK_IDEOGRAPHIC:case t.TRAD_CHINESE_INFORMAL:return oi(n,"零一二三四五六七八九","十百千萬","負",f,14);case t.TRAD_CHINESE_FORMAL:return oi(n,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",f,15);case t.SIMP_CHINESE_INFORMAL:return oi(n,"零一二三四五六七八九","十百千萬","负",f,14);case t.SIMP_CHINESE_FORMAL:return oi(n,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",f,15);case t.JAPANESE_INFORMAL:return oi(n,"〇一二三四五六七八九","十百千万","マイナス",f,0);case t.JAPANESE_FORMAL:return oi(n,"零壱弐参四伍六七八九","拾百千万","マイナス",f,7);case t.KOREAN_HANGUL_FORMAL:return oi(n,"영일이삼사오육칠팔구","십백천만",ys,o,7);case t.KOREAN_HANJA_INFORMAL:return oi(n,"零一二三四五六七八九","十百千萬",ys,o,0);case t.KOREAN_HANJA_FORMAL:return oi(n,"零壹貳參四五六七八九","拾百千",ys,o,7);case t.DEVANAGARI:return a(n,2406,2415,!0,u);case t.GEORGIAN:return tu(n,1,19999,od,t.DECIMAL,u);case t.GUJARATI:return a(n,2790,2799,!0,u);case t.GURMUKHI:return a(n,2662,2671,!0,u);case t.HEBREW:return tu(n,1,10999,ed,t.DECIMAL,u);case t.HIRAGANA:return hr(n,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case t.HIRAGANA_IROHA:return hr(n,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case t.KANNADA:return a(n,3302,3311,!0,u);case t.KATAKANA:return hr(n,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",f);case t.KATAKANA_IROHA:return hr(n,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",f);case t.LAO:return a(n,3792,3801,!0,u);case t.MONGOLIAN:return a(n,6160,6169,!0,u);case t.MYANMAR:return a(n,4160,4169,!0,u);case t.ORIYA:return a(n,2918,2927,!0,u);case t.PERSIAN:return a(n,1776,1785,!0,u);case t.TAMIL:return a(n,3046,3055,!0,u);case t.TELUGU:return a(n,3174,3183,!0,u);case t.THAI:return a(n,3664,3673,!0,u);case t.TIBETAN:return a(n,3872,3881,!0,u);case t.DECIMAL:default:return a(n,48,57,!0,u)}},ga="data-html2canvas-ignore",nv=(ir.prototype.toIFrame=function(n,t){var f=this,r=sd(n,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var e=n.defaultView.pageXOffset,o=n.defaultView.pageYOffset,u=r.contentWindow,i=u.document,s=hd(r).then(function(){return ot(f,void 0,void 0,function(){var n;return ut(this,function(f){switch(f.label){case 0:return this.scrolledElements.forEach(ad),u&&(u.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||u.scrollY===t.top&&u.scrollX===t.left||(i.documentElement.style.top=-t.top+"px",i.documentElement.style.left=-t.left+"px",i.documentElement.style.position="absolute")),n=this.options.onclone,void 0===this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:i.fonts&&i.fonts.ready?[4,i.fonts.ready]:[3,2];case 1:f.sent();f.label=2;case 2:return"function"==typeof n?[2,Promise.resolve().then(function(){return n(i)}).then(function(){return r})]:[2,r]}})})});return i.open(),i.write(cd(document.doctype)+"<html><\/html>"),ld(this.referenceElement.ownerDocument,e,o),i.replaceChild(i.adoptNode(this.documentElement),i.documentElement),i.close(),s},ir.prototype.createElementClone=function(n){return pa(n)?this.createCanvasClone(n):sa(n)?this.createStyleClone(n):n.cloneNode(!1)},ir.prototype.createStyleClone=function(n){var t,r,i;try{if(t=n.sheet,t&&t.cssRules)return r=[].slice.call(t.cssRules,0).reduce(function(n,t){return t&&"string"==typeof t.cssText?n+t.cssText:n},""),i=n.cloneNode(!1),i.textContent=r,i}catch(n){if(w.getInstance(this.options.id).error("Unable to access cssRules property",n),"SecurityError"!==n.name)throw n;}return n.cloneNode(!1)},ir.prototype.createCanvasClone=function(n){var r,t,u,i;if(this.options.inlineImages&&n.ownerDocument){r=n.ownerDocument.createElement("img");try{return r.src=n.toDataURL(),r}catch(n){w.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}t=n.cloneNode(!1);try{return t.width=n.width,t.height=n.height,u=n.getContext("2d"),i=t.getContext("2d"),i&&(u?i.putImageData(u.getImageData(0,0,n.width,n.height),0,0):i.drawImage(n,0,0)),t}catch(n){}return t},ir.prototype.cloneNode=function(n){var r,f;if(aa(n))return document.createTextNode(n.data);if(!n.ownerDocument)return n.cloneNode(!1);if(r=n.ownerDocument.defaultView,va(n)&&r){var t=this.createElementClone(n),u=r.getComputedStyle(n),o=r.getComputedStyle(n,":before"),s=r.getComputedStyle(n,":after");this.referenceElement===n&&(this.clonedReferenceElement=t);vs(t)&&vd(t);for(var h=this.counters.parse(new sl(u)),e=this.resolvePseudoContent(n,t,o,gu.BEFORE),i=n.firstChild;i;i=i.nextSibling)as(i)&&("SCRIPT"===i.tagName||i.hasAttribute(ga)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(i))||this.options.copyStyles&&as(i)&&sa(i)||t.appendChild(this.cloneNode(i));return e&&t.insertBefore(e,t.firstChild),f=this.resolvePseudoContent(n,t,s,gu.AFTER),f&&t.appendChild(f),this.counters.pop(h),u&&this.options.copyStyles&&!wa(n)&&tv(u,t),0===n.scrollTop&&0===n.scrollLeft||this.scrolledElements.push([t,n.scrollLeft,n.scrollTop]),(ae(n)||ve(n))&&(ae(t)||ve(t))&&(t.value=n.value),t}return n.cloneNode(!1)},ir.prototype.resolvePseudoContent=function(i,r,u,f){var h=this,c,o,l,e;if(u&&(c=u.content,o=r.ownerDocument,o&&c&&"none"!==c&&"-moz-alt-content"!==c&&"none"!==u.display))return this.counters.parse(new sl(u)),l=new ok(u),e=o.createElement("html2canvaspseudoelement"),tv(u,e),l.content.forEach(function(r){var c,y,w,b,a,v;if(r.type===n.STRING_TOKEN)e.appendChild(o.createTextNode(r.value));else if(r.type===n.URL_TOKEN)c=o.createElement("img"),c.src=r.value,c.style.opacity="1",e.appendChild(c);else if(r.type===n.FUNCTION){if("attr"===r.name)y=r.values.filter(s),y.length&&e.appendChild(o.createTextNode(i.getAttribute(y[0].value)||""));else if("counter"===r.name){var p=r.values.filter(yr),u=p[0],f=p[1];u&&s(u)&&(w=h.counters.getCounterValue(u.value),b=f&&s(f)?is.parse(f.value):t.DECIMAL,e.appendChild(o.createTextNode(nf(w,b,!1))))}else if("counters"===r.name&&(a=r.values.filter(yr),v=(u=a[0],a[1]),f=a[2],u&&s(u))){var k=h.counters.getCounterValues(u.value),d=f&&s(f)?is.parse(f.value):t.DECIMAL,g=v&&v.type===n.STRING_TOKEN?v.value:"",nt=k.map(function(n){return nf(n,d,!1)}).join(g);e.appendChild(o.createTextNode(nt))}}else if(r.type===n.IDENT_TOKEN)switch(r.value){case"open-quote":e.appendChild(o.createTextNode(el(l.quotes,h.quoteDepth++,!0)));break;case"close-quote":e.appendChild(o.createTextNode(el(l.quotes,--h.quoteDepth,!1)));break;default:e.appendChild(o.createTextNode(r.value))}}),e.className=ps+" "+ws,r.className+=f===gu.BEFORE?" "+ps:" "+ws,e},ir.destroy=function(n){return!!n.parentNode&&(n.parentNode.removeChild(n),!0)},ir);(ye=gu||(gu={}))[ye.BEFORE=0]="BEFORE";ye[ye.AFTER=1]="AFTER";var tf,pe,sd=function(n,t){var i=n.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=t.width.toString(),i.height=t.height.toString(),i.scrolling="no",i.setAttribute(ga,"true"),n.body.appendChild(i),i},hd=function(n){return new Promise(function(t,i){var u=n.contentWindow,r;if(!u)return i("No window assigned for iframe");r=u.document;u.onload=n.onload=r.onreadystatechange=function(){u.onload=n.onload=r.onreadystatechange=null;var i=setInterval(function(){0<r.body.childNodes.length&&"complete"===r.readyState&&(clearInterval(i),t(n))},50)}})},tv=function(n,t){for(var r,i=n.length-1;0<=i;i--)r=n.item(i),"content"!==r&&t.style.setProperty(r,n.getPropertyValue(r));return t},cd=function(n){var t="";return n&&(t+="<!DOCTYPE ",n.name&&(t+=n.name),n.internalSubset&&(t+=n.internalSubset),n.publicId&&(t+='"'+n.publicId+'"'),n.systemId&&(t+='"'+n.systemId+'"'),t+=">"),t},ld=function(n,t,i){n&&n.defaultView&&(t!==n.defaultView.pageXOffset||i!==n.defaultView.pageYOffset)&&n.defaultView.scrollTo(t,i)},ad=function(n){var t=n[0],i=n[1],r=n[2];t.scrollLeft=i;t.scrollTop=r},ps="___html2canvas___pseudoelement_before",ws="___html2canvas___pseudoelement_after",iv='{\n    content: "" !important;\n    display: none !important;\n}',vd=function(n){yd(n,"."+ps+":before"+iv+"\n         ."+ws+":after"+iv)},yd=function(n,t){var r=n.ownerDocument,i;r&&(i=r.createElement("style"),i.textContent=t,n.appendChild(i))};(pe=tf||(tf={}))[pe.VECTOR=0]="VECTOR";pe[pe.BEZIER_CURVE=1]="BEZIER_CURVE";f=(bs.prototype.add=function(n,t){return new bs(this.x+n,this.y+t)},bs);rf=(rr.prototype.subdivide=function(n,t){var i=iu(this.start,this.startControl,n),r=iu(this.startControl,this.endControl,n),u=iu(this.endControl,this.end,n),f=iu(i,r,n),e=iu(r,u,n),o=iu(f,e,n);return t?new rr(this.start,i,f,o):new rr(o,e,u,this.end)},rr.prototype.add=function(n,t){return new rr(this.start.add(n,t),this.startControl.add(n,t),this.endControl.add(n,t),this.end.add(n,t))},rr.prototype.reverse=function(){return new rr(this.end,this.endControl,this.startControl,this.start)},rr);uv=function(n){var u=n.styles,t=n.bounds,ot=pu(u.borderTopLeftRadius,t.width,t.height),v=ot[0],y=ot[1],st=pu(u.borderTopRightRadius,t.width,t.height),s=st[0],p=st[1],ht=pu(u.borderBottomRightRadius,t.width,t.height),c=ht[0],l=ht[1],ct=pu(u.borderBottomLeftRadius,t.width,t.height),w=ct[0],a=ct[1],nt=[],e;nt.push((v+s)/t.width);nt.push((w+c)/t.width);nt.push((y+a)/t.height);nt.push((p+l)/t.height);e=Math.max.apply(Math,nt);1<e&&(v/=e,y/=e,s/=e,p/=e,c/=e,l/=e,w/=e,a/=e);var tt=t.width-s,rt=t.height-l,ut=t.width-c,ft=t.height-a,r=u.borderTopWidth,g=u.borderRightWidth,k=u.borderBottomWidth,i=u.borderLeftWidth,d=h(u.paddingTop,n.bounds.width),et=h(u.paddingRight,n.bounds.width),it=h(u.paddingBottom,n.bounds.width),o=h(u.paddingLeft,n.bounds.width);this.topLeftBorderBox=0<v||0<y?lt(t.left,t.top,v,y,b.TOP_LEFT):new f(t.left,t.top);this.topRightBorderBox=0<s||0<p?lt(t.left+tt,t.top,s,p,b.TOP_RIGHT):new f(t.left+t.width,t.top);this.bottomRightBorderBox=0<c||0<l?lt(t.left+ut,t.top+rt,c,l,b.BOTTOM_RIGHT):new f(t.left+t.width,t.top+t.height);this.bottomLeftBorderBox=0<w||0<a?lt(t.left,t.top+ft,w,a,b.BOTTOM_LEFT):new f(t.left,t.top+t.height);this.topLeftPaddingBox=0<v||0<y?lt(t.left+i,t.top+r,Math.max(0,v-i),Math.max(0,y-r),b.TOP_LEFT):new f(t.left+i,t.top+r);this.topRightPaddingBox=0<s||0<p?lt(t.left+Math.min(tt,t.width+i),t.top+r,tt>t.width+i?0:s-i,p-r,b.TOP_RIGHT):new f(t.left+t.width-g,t.top+r);this.bottomRightPaddingBox=0<c||0<l?lt(t.left+Math.min(ut,t.width-i),t.top+Math.min(rt,t.height+r),Math.max(0,c-g),l-k,b.BOTTOM_RIGHT):new f(t.left+t.width-g,t.top+t.height-k);this.bottomLeftPaddingBox=0<w||0<a?lt(t.left+i,t.top+ft,Math.max(0,w-i),a-k,b.BOTTOM_LEFT):new f(t.left+i,t.top+t.height-k);this.topLeftContentBox=0<v||0<y?lt(t.left+i+o,t.top+r+d,Math.max(0,v-(i+o)),Math.max(0,y-(r+d)),b.TOP_LEFT):new f(t.left+i+o,t.top+r+d);this.topRightContentBox=0<s||0<p?lt(t.left+Math.min(tt,t.width+i+o),t.top+r+d,tt>t.width+i+o?0:s-i+o,p-(r+d),b.TOP_RIGHT):new f(t.left+t.width-(g+et),t.top+r+d);this.bottomRightContentBox=0<c||0<l?lt(t.left+Math.min(ut,t.width-(i+o)),t.top+Math.min(rt,t.height+r+d),Math.max(0,c-(g+et)),l-(k+it),b.BOTTOM_RIGHT):new f(t.left+t.width-(g+et),t.top+t.height-(k+it));this.bottomLeftContentBox=0<w||0<a?lt(t.left+i+o,t.top+ft,Math.max(0,w-(i+o)),a-(k+it),b.BOTTOM_LEFT):new f(t.left+i+o,t.top+t.height-(k+it))};(ur=b||(b={}))[ur.TOP_LEFT=0]="TOP_LEFT";ur[ur.TOP_RIGHT=1]="TOP_RIGHT";ur[ur.BOTTOM_RIGHT=2]="BOTTOM_RIGHT";ur[ur.BOTTOM_LEFT=3]="BOTTOM_LEFT";var lt=function(n,t,i,r,u){var c=(Math.sqrt(2)-1)/3*4,s=i*c,h=r*c,e=n+i,o=t+r;switch(u){case b.TOP_LEFT:return new rf(new f(n,o),new f(n,o-h),new f(e-s,t),new f(e,t));case b.TOP_RIGHT:return new rf(new f(n,t),new f(n+s,t),new f(e,o-h),new f(e,o));case b.BOTTOM_RIGHT:return new rf(new f(e,t),new f(e,t+h),new f(n+s,o),new f(n,o));case b.BOTTOM_LEFT:default:return new rf(new f(e,o),new f(e-s,o),new f(n,t+h),new f(n,t))}},pd=function(n,t,i){this.type=0;this.offsetX=n;this.offsetY=t;this.matrix=i;this.target=6},ke=function(n,t){this.type=1;this.target=t;this.path=n},fv=function(n){this.element=n;this.inlineLevel=[];this.nonInlineLevel=[];this.negativeZIndex=[];this.zeroOrAutoZIndexOrTransformedOrOpacity=[];this.positiveZIndex=[];this.nonPositionedFloats=[];this.nonPositionedInlineLevel=[]},ev=(ov.prototype.getParentEffects=function(){var t=this.effects.slice(0),i,n;return this.container.styles.overflowX!==ki.VISIBLE&&(i=we(this.curves),n=be(this.curves),rv(i,n)||t.push(new ke(n,6))),t},ov);var ds=function(n,t,i,r){n.container.elements.forEach(function(u){var a=nt(u.flags,4),v=nt(u.flags,2),o=new ev(u,n.getParentEffects()),h,f,e,s,c,l;nt(u.styles.display,2048)&&r.push(o);h=nt(u.flags,8)?[]:r;a||v?(f=a||u.styles.isPositioned()?i:t,e=new fv(o),u.styles.isPositioned()||u.styles.opacity<1||u.styles.isTransformed()?(s=u.styles.zIndex.order,s<0?(c=0,f.negativeZIndex.some(function(n,t){return s>n.element.container.styles.zIndex.order?(c=t,!1):0<c}),f.negativeZIndex.splice(c,0,e)):0<s?(l=0,f.positiveZIndex.some(function(n,t){return s>n.element.container.styles.zIndex.order?(l=t+1,!1):0<l}),f.positiveZIndex.splice(l,0,e)):f.zeroOrAutoZIndexOrTransformedOrOpacity.push(e)):u.styles.isFloating()?f.nonPositionedFloats.push(e):f.nonPositionedInlineLevel.push(e),ds(o,e,a?e:i,h)):(u.styles.isInlineLevel()?t.inlineLevel.push(o):t.nonInlineLevel.push(o),ds(o,t,i,h));nt(u.flags,8)&&hv(u,h)})},hv=function(n,t){for(var i,r=n instanceof he?n.start:1,f=n instanceof he&&n.reversed,u=0;u<t.length;u++)i=t[u],i.container instanceof os&&"number"==typeof i.container.value&&0!==i.container.value&&(r=i.container.value),i.listValue=nf(r,i.container.styles.listStyleType,!0),r+=f?-1:1},no=function(n,t,i,r){var u=[];return ru(n)?u.push(n.subdivide(.5,!1)):u.push(n),ru(i)?u.push(i.subdivide(.5,!0)):u.push(i),ru(r)?u.push(r.subdivide(.5,!0).reverse()):u.push(r),ru(t)?u.push(t.subdivide(.5,!1).reverse()):u.push(t),u},wd=function(n,t,i){var e=t[0],o=t[1],f=t[2],u=n[0],r=n[1],b,p,w,c,l;if(y(u)&&r&&y(r))return[h(u,i.width),h(r,i.height)];if(b=ge(f),s(u)&&(u.value===br.CONTAIN||u.value===br.COVER))return ge(f)?i.width/i.height<f!=(u.value===br.COVER)?[i.width,i.width/f]:[i.height*f,i.height]:[i.width,i.height];var a=ge(e),v=ge(o),k=a||v;if(uu(u)&&(!r||uu(r)))return a&&v?[e,o]:b||k?k&&b?[a?e:o*f,v?o:e/f]:[a?e:i.width,v?o:i.height]:[i.width,i.height];if(b)return p=0,w=0,y(u)?p=h(u,i.width):y(r)&&(w=h(r,i.height)),uu(u)?p=w*f:r&&!uu(r)||(w=p/f),[p,w];if(c=null,l=null,y(u)?c=h(u,i.width):r&&y(r)&&(l=h(r,i.height)),null===c||r&&!uu(r)||(l=a&&v?c/e*o:i.height),null!==l&&uu(u)&&(c=a&&v?l/o*e:i.width),null!==c&&null!==l)return[c,l];throw new Error("Unable to calculate background-size for element");},fu=function(n,t){var i=n[t];return void 0===i?n[0]:i},bd=function(n,t,i,r,u){var e=t[0],o=t[1],s=i[0],h=i[1];switch(n){case fi.REPEAT_X:return[new f(Math.round(r.left),Math.round(r.top+o)),new f(Math.round(r.left+r.width),Math.round(r.top+o)),new f(Math.round(r.left+r.width),Math.round(h+r.top+o)),new f(Math.round(r.left),Math.round(h+r.top+o))];case fi.REPEAT_Y:return[new f(Math.round(r.left+e),Math.round(r.top)),new f(Math.round(r.left+e+s),Math.round(r.top)),new f(Math.round(r.left+e+s),Math.round(r.height+r.top)),new f(Math.round(r.left+e),Math.round(r.height+r.top))];case fi.NO_REPEAT:return[new f(Math.round(r.left+e),Math.round(r.top+o)),new f(Math.round(r.left+e+s),Math.round(r.top+o)),new f(Math.round(r.left+e+s),Math.round(r.top+o+h)),new f(Math.round(r.left+e),Math.round(r.top+o+h))];default:return[new f(Math.round(u.left),Math.round(u.top)),new f(Math.round(u.left+u.width),Math.round(u.top)),new f(Math.round(u.left+u.width),Math.round(u.height+u.top)),new f(Math.round(u.left),Math.round(u.height+u.top))]}},cv="Hidden Text",kd=(gs.prototype.parseMetrics=function(n,t){var i=this._document.createElement("div"),r=this._document.createElement("img"),u=this._document.createElement("span"),f=this._document.body,e,o;return i.style.visibility="hidden",i.style.fontFamily=n,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",f.appendChild(i),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",u.style.fontFamily=n,u.style.fontSize=t,u.style.margin="0",u.style.padding="0",u.appendChild(this._document.createTextNode(cv)),i.appendChild(u),i.appendChild(r),e=r.offsetTop-u.offsetTop+2,i.removeChild(u),i.appendChild(this._document.createTextNode(cv)),i.style.lineHeight="normal",r.style.verticalAlign="super",o=r.offsetTop-i.offsetTop+2,f.removeChild(i),{baseline:e,middle:o}},gs.prototype.getMetrics=function(n,t){var i=n+" "+t;return void 0===this._data[i]&&(this._data[i]=this.parseMetrics(n,t)),this._data[i]},gs);lv=(l.prototype.applyEffects=function(n,t){for(var i=this;this._activeEffects.length;)this.popEffect();n.filter(function(n){return nt(n.target,t)}).forEach(function(n){return i.applyEffect(n)})},l.prototype.applyEffect=function(n){this.ctx.save(),function(n){return 0===n.type}(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),function(n){return 1===n.type}(n)&&(this.path(n.path),this.ctx.clip());this._activeEffects.push(n)},l.prototype.popEffect=function(){this._activeEffects.pop();this.ctx.restore()},l.prototype.renderStack=function(n){return ot(this,void 0,void 0,function(){var t;return ut(this,function(i){switch(i.label){case 0:return(t=n.element.container.styles).isVisible()?(this.ctx.globalAlpha=t.opacity,[4,this.renderStackContent(n)]):[3,2];case 1:i.sent();i.label=2;case 2:return[2]}})})},l.prototype.renderNode=function(n){return ot(this,void 0,void 0,function(){return ut(this,function(t){switch(t.label){case 0:return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(n)];case 2:t.sent();t.label=3;case 3:return[2]}})})},l.prototype.renderTextWithLetterSpacing=function(n,t){var i=this;0===t?this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+n.bounds.height):uf(n.text).map(function(n){return v(n)}).reduce(function(t,r){return i.ctx.fillText(r,t,n.bounds.top+n.bounds.height),t+i.ctx.measureText(r).width},n.bounds.left)},l.prototype.createFontStyle=function(n){var r=n.fontVariant.filter(function(n){return"normal"===n||"small-caps"===n}).join(""),t=n.fontFamily.join(", "),i=yo(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,r,n.fontWeight,i,t].join(" "),t,i]},l.prototype.renderTextNode=function(n,t){return ot(this,void 0,void 0,function(){var r,e,u,f,i=this;return ut(this,function(){return r=this.createFontStyle(t),e=r[0],u=r[1],f=r[2],this.ctx.font=e,n.textBounds.forEach(function(n){i.ctx.fillStyle=it(t.color);i.renderTextWithLetterSpacing(n,t.letterSpacing);var r=t.textShadow;r.length&&n.text.trim().length&&(r.slice(0).reverse().forEach(function(t){i.ctx.shadowColor=it(t.color);i.ctx.shadowOffsetX=t.offsetX.number*i.options.scale;i.ctx.shadowOffsetY=t.offsetY.number*i.options.scale;i.ctx.shadowBlur=t.blur.number;i.ctx.fillText(n.text,n.bounds.left,n.bounds.top+n.bounds.height)}),i.ctx.shadowColor="",i.ctx.shadowOffsetX=0,i.ctx.shadowOffsetY=0,i.ctx.shadowBlur=0);t.textDecorationLine.length&&(i.ctx.fillStyle=it(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){var r,e;switch(t){case 1:r=i.fontMetrics.getMetrics(u,f).baseline;i.ctx.fillRect(n.bounds.left,Math.round(n.bounds.top+r),n.bounds.width,1);break;case 2:i.ctx.fillRect(n.bounds.left,Math.round(n.bounds.top),n.bounds.width,1);break;case 3:e=i.fontMetrics.getMetrics(u,f).middle;i.ctx.fillRect(n.bounds.left,Math.ceil(n.bounds.top+e),n.bounds.width,1)}}))}),[2]})})},l.prototype.renderReplacedElement=function(n,t,i){if(i&&0<n.intrinsicWidth&&0<n.intrinsicHeight){var r=de(n),u=be(t);this.path(u);this.ctx.save();this.ctx.clip();this.ctx.drawImage(i,0,0,n.intrinsicWidth,n.intrinsicHeight,r.left,r.top,r.width,r.height);this.ctx.restore()}},l.prototype.renderNodeContent=function(i){return ot(this,void 0,void 0,function(){var r,a,o,v,b,d,g,e,p,tt,ft,c,k,u;return ut(this,function(ut){switch(ut.label){case 0:this.applyEffects(i.effects,4);r=i.container;a=i.curves;o=r.styles;v=0;b=r.textNodes;ut.label=1;case 1:return v<b.length?(d=b[v],[4,this.renderTextNode(d,o)]):[3,4];case 2:ut.sent();ut.label=3;case 3:return v++,[3,1];case 4:if(!(r instanceof hl))return[3,8];ut.label=5;case 5:return ut.trys.push([5,7,,8]),[4,this.options.cache.match(r.src)];case 6:return c=ut.sent(),this.renderReplacedElement(r,a,c),[3,8];case 7:return ut.sent(),w.getInstance(this.options.id).error("Error loading image "+r.src),[3,8];case 8:if(r instanceof fs&&this.renderReplacedElement(r,a,r.canvas),!(r instanceof es))return[3,12];ut.label=9;case 9:return ut.trys.push([9,11,,12]),[4,this.options.cache.match(r.svg)];case 10:return c=ut.sent(),this.renderReplacedElement(r,a,c),[3,12];case 11:return ut.sent(),w.getInstance(this.options.id).error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof ls&&r.tree?[4,new l({id:this.options.id,scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,scrollX:0,scrollY:0,width:r.width,height:r.height,cache:this.options.cache,windowWidth:r.width,windowHeight:r.height}).render(r.tree)]:[3,14];case 13:g=ut.sent();r.width&&r.height&&this.ctx.drawImage(g,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height);ut.label=14;case 14:if(r instanceof ss&&(e=Math.min(r.bounds.width,r.bounds.height),r.type===ce?r.checked&&(this.ctx.save(),this.path([new f(r.bounds.left+.39363*e,r.bounds.top+.79*e),new f(r.bounds.left+.16*e,r.bounds.top+.5549*e),new f(r.bounds.left+.27347*e,r.bounds.top+.44071*e),new f(r.bounds.left+.39694*e,r.bounds.top+.5649*e),new f(r.bounds.left+.72983*e,r.bounds.top+.23*e),new f(r.bounds.left+.84*e,r.bounds.top+.34085*e),new f(r.bounds.left+.39363*e,r.bounds.top+.79*e)]),this.ctx.fillStyle=it(gl),this.ctx.fill(),this.ctx.restore()):r.type===le&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+e/2,r.bounds.top+e/2,e/4,0,2*Math.PI,!0),this.ctx.fillStyle=it(gl),this.ctx.fill(),this.ctx.restore())),dd(r)&&r.value.length){switch(this.ctx.font=this.createFontStyle(o)[0],this.ctx.fillStyle=it(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign=ng(r.styles.textAlign),u=de(r),p=0,r.styles.textAlign){case ni.CENTER:p+=u.width/2;break;case ni.RIGHT:p+=u.width}tt=u.add(p,0,0,-u.height/2+1);this.ctx.save();this.path([new f(u.left,u.top),new f(u.left+u.width,u.top),new f(u.left+u.width,u.top+u.height),new f(u.left,u.top+u.height)]);this.ctx.clip();this.renderTextWithLetterSpacing(new se(r.value,tt),o.letterSpacing);this.ctx.restore();this.ctx.textBaseline="bottom";this.ctx.textAlign="left"}if(!nt(r.styles.display,2048))return[3,20];if(null===r.styles.listStyleImage)return[3,19];if((ft=r.styles.listStyleImage).type!==rt.URL)return[3,18];c=void 0;k=ft.url;ut.label=15;case 15:return ut.trys.push([15,17,,18]),[4,this.options.cache.match(k)];case 16:return c=ut.sent(),this.ctx.drawImage(c,r.bounds.left-(c.width+10),r.bounds.top),[3,18];case 17:return ut.sent(),w.getInstance(this.options.id).error("Error loading list-style-image "+k),[3,18];case 18:return[3,20];case 19:i.listValue&&r.styles.listStyleType!==t.NONE&&(this.ctx.font=this.createFontStyle(o)[0],this.ctx.fillStyle=it(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",u=new si(r.bounds.left,r.bounds.top+h(r.styles.paddingTop,r.bounds.width),r.bounds.width,function(t,i){return s(t)&&"normal"===t.value?1.2*i:t.type===n.NUMBER_TOKEN?i*t.number:y(t)?h(t,i):i}(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new se(i.listValue,u),o.letterSpacing),this.ctx.textBaseline="bottom",this.ctx.textAlign="left");ut.label=20;case 20:return[2]}})})},l.prototype.renderStackContent=function(n){return ot(this,void 0,void 0,function(){var i,h,r,c,u,l,f,a,e,v,o,y,s,p,t;return ut(this,function(w){switch(w.label){case 0:return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:w.sent();i=0;h=n.negativeZIndex;w.label=2;case 2:return i<h.length?(t=h[i],[4,this.renderStack(t)]):[3,5];case 3:w.sent();w.label=4;case 4:return i++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:w.sent();r=0;c=n.nonInlineLevel;w.label=7;case 7:return r<c.length?(t=c[r],[4,this.renderNode(t)]):[3,10];case 8:w.sent();w.label=9;case 9:return r++,[3,7];case 10:u=0;l=n.nonPositionedFloats;w.label=11;case 11:return u<l.length?(t=l[u],[4,this.renderStack(t)]):[3,14];case 12:w.sent();w.label=13;case 13:return u++,[3,11];case 14:f=0;a=n.nonPositionedInlineLevel;w.label=15;case 15:return f<a.length?(t=a[f],[4,this.renderStack(t)]):[3,18];case 16:w.sent();w.label=17;case 17:return f++,[3,15];case 18:e=0;v=n.inlineLevel;w.label=19;case 19:return e<v.length?(t=v[e],[4,this.renderNode(t)]):[3,22];case 20:w.sent();w.label=21;case 21:return e++,[3,19];case 22:o=0;y=n.zeroOrAutoZIndexOrTransformedOrOpacity;w.label=23;case 23:return o<y.length?(t=y[o],[4,this.renderStack(t)]):[3,26];case 24:w.sent();w.label=25;case 25:return o++,[3,23];case 26:s=0;p=n.positiveZIndex;w.label=27;case 27:return s<p.length?(t=p[s],[4,this.renderStack(t)]):[3,30];case 28:w.sent();w.label=29;case 29:return s++,[3,27];case 30:return[2]}})})},l.prototype.mask=function(n){this.ctx.beginPath();this.ctx.moveTo(0,0);this.ctx.lineTo(this.canvas.width,0);this.ctx.lineTo(this.canvas.width,this.canvas.height);this.ctx.lineTo(0,this.canvas.height);this.ctx.lineTo(0,0);this.formatPath(n.slice(0).reverse());this.ctx.closePath()},l.prototype.path=function(n){this.ctx.beginPath();this.formatPath(n);this.ctx.closePath()},l.prototype.formatPath=function(n){var t=this;n.forEach(function(n,i){var r=ru(n)?n.start:n;0===i?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y);ru(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},l.prototype.renderRepeat=function(n,t,i,r){this.path(n);this.ctx.fillStyle=t;this.ctx.translate(i,r);this.ctx.fill();this.ctx.translate(-i,-r)},l.prototype.resizeImage=function(n,t,i){if(n.width===t&&n.height===i)return n;var r=this.canvas.ownerDocument.createElement("canvas");return r.width=t,r.height=i,r.getContext("2d").drawImage(n,0,0,n.width,n.height,0,0,t,i),r},l.prototype.renderBackgroundImage=function(n){return ot(this,void 0,void 0,function(){var i,f,t,r,u,e;return ut(this,function(o){switch(o.label){case 0:i=n.styles.backgroundImage.length-1;f=function(r){var e,st,l,a,v,wt,bt,kt,dt,gt,k,nt,ht,tt,y,p,ft,et,u,f,ot,o,s,ct,c,lt,at,yt,b,ni,pt;return ut(this,function(ut){switch(ut.label){case 0:if(r.type!==rt.URL)return[3,5];e=void 0;st=r.url;ut.label=1;case 1:return ut.trys.push([1,3,,4]),[4,t.options.cache.match(st)];case 2:return e=ut.sent(),[3,4];case 3:return ut.sent(),w.getInstance(t.options.id).error("Error loading background-image "+st),[3,4];case 4:return e&&(l=ks(n,i,[e.width,e.height,e.width/e.height]),p=l[0],o=l[1],s=l[2],u=l[3],f=l[4],tt=t.ctx.createPattern(t.resizeImage(e,u,f),"repeat"),t.renderRepeat(p,tt,o,s)),[3,6];case 5:(function(n){return n.type===rt.LINEAR_GRADIENT})(r)?(a=ks(n,i,[null,null,null]),p=a[0],o=a[1],s=a[2],u=a[3],f=a[4],v=gy(r.angle,u,f),wt=v[0],bt=v[1],kt=v[2],dt=v[3],gt=v[4],(k=document.createElement("canvas")).width=u,k.height=f,nt=k.getContext("2d"),ht=nt.createLinearGradient(bt,dt,kt,gt),fc(r.stops,wt).forEach(function(n){return ht.addColorStop(n.stop,it(n.color))}),nt.fillStyle=ht,nt.fillRect(0,0,u,f),0<u&&0<f&&(tt=t.ctx.createPattern(k,"repeat"),t.renderRepeat(p,tt,o,s))):function(n){return n.type===rt.RADIAL_GRADIENT}(r)&&(y=ks(n,i,[null,null,null]),p=y[0],ft=y[1],et=y[2],u=y[3],f=y[4],ot=0===r.position.length?[wo]:r.position,o=h(ot[0],u),s=h(ot[ot.length-1],f),ct=function(n,t,i,r,u){var f=0,e=0,l;switch(n.size){case g.CLOSEST_SIDE:n.shape===d.CIRCLE?f=e=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-u)):n.shape===d.ELLIPSE&&(f=Math.min(Math.abs(t),Math.abs(t-r)),e=Math.min(Math.abs(i),Math.abs(i-u)));break;case g.CLOSEST_CORNER:if(n.shape===d.CIRCLE)f=e=Math.min(vt(t,i),vt(t,i-u),vt(t-r,i),vt(t-r,i-u));else if(n.shape===d.ELLIPSE){var o=Math.min(Math.abs(i),Math.abs(i-u))/Math.min(Math.abs(t),Math.abs(t-r)),a=ec(r,u,t,i,!0),s=a[0],c=a[1];e=o*(f=vt(s-t,(c-i)/o))}break;case g.FARTHEST_SIDE:n.shape===d.CIRCLE?f=e=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-u)):n.shape===d.ELLIPSE&&(f=Math.max(Math.abs(t),Math.abs(t-r)),e=Math.max(Math.abs(i),Math.abs(i-u)));break;case g.FARTHEST_CORNER:n.shape===d.CIRCLE?f=e=Math.max(vt(t,i),vt(t,i-u),vt(t-r,i),vt(t-r,i-u)):n.shape===d.ELLIPSE&&(o=Math.max(Math.abs(i),Math.abs(i-u))/Math.max(Math.abs(t),Math.abs(t-r)),l=ec(r,u,t,i,!1),s=l[0],c=l[1],e=o*(f=vt(s-t,(c-i)/o)))}return Array.isArray(n.size)&&(f=h(n.size[0],r),e=2===n.size.length?h(n.size[1],u):f),[f,e]}(r,o,s,u,f),c=ct[0],lt=ct[1],0<c&&0<c&&(at=t.ctx.createRadialGradient(ft+o,et+s,0,ft+o,et+s,c),fc(r.stops,2*c).forEach(function(n){return at.addColorStop(n.stop,it(n.color))}),t.path(p),t.ctx.fillStyle=at,c!==lt?(yt=n.bounds.left+.5*n.bounds.width,b=n.bounds.top+.5*n.bounds.height,pt=1/(ni=lt/c),t.ctx.save(),t.ctx.translate(yt,b),t.ctx.transform(1,0,0,ni,0,0),t.ctx.translate(-yt,-b),t.ctx.fillRect(ft,pt*(et-b)+b,u,f*pt),t.ctx.restore()):t.ctx.fill()));ut.label=6;case 6:return i--,[2]}})};t=this;r=0;u=n.styles.backgroundImage.slice(0).reverse();o.label=1;case 1:return r<u.length?(e=u[r],[5,f(e)]):[3,4];case 2:o.sent();o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},l.prototype.renderBorder=function(n,t,i){return ot(this,void 0,void 0,function(){return ut(this,function(){return this.path(function(n,t){switch(t){case 0:return no(n.topLeftBorderBox,n.topLeftPaddingBox,n.topRightBorderBox,n.topRightPaddingBox);case 1:return no(n.topRightBorderBox,n.topRightPaddingBox,n.bottomRightBorderBox,n.bottomRightPaddingBox);case 2:return no(n.bottomRightBorderBox,n.bottomRightPaddingBox,n.bottomLeftBorderBox,n.bottomLeftPaddingBox);case 3:default:return no(n.bottomLeftBorderBox,n.bottomLeftPaddingBox,n.topLeftBorderBox,n.topLeftPaddingBox)}}(i,t)),this.ctx.fillStyle=it(n),this.ctx.fill(),[2]})})},l.prototype.renderNodeBackgroundAndBorders=function(n){return ot(this,void 0,void 0,function(){var t,o,s,h,u,r,f,e,i=this;return ut(this,function(c){switch(c.label){case 0:return this.applyEffects(n.effects,2),t=n.container.styles,o=!ai(t.backgroundColor)||t.backgroundImage.length,s=[{style:t.borderTopStyle,color:t.borderTopColor},{style:t.borderRightStyle,color:t.borderRightColor},{style:t.borderBottomStyle,color:t.borderBottomColor},{style:t.borderLeftStyle,color:t.borderLeftColor}],h=gd(fu(t.backgroundClip,0),n.curves),o||t.boxShadow.length?(this.ctx.save(),this.path(h),this.ctx.clip(),ai(t.backgroundColor)||(this.ctx.fillStyle=it(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:c.sent();this.ctx.restore();t.boxShadow.slice(0).reverse().forEach(function(t){i.ctx.save();var r=we(n.curves),u=t.inset?0:1e4,f=function(n,t,i,r,u){return n.map(function(n,f){switch(f){case 0:return n.add(t,i);case 1:return n.add(t+r,i);case 2:return n.add(t+r,i+u);case 3:return n.add(t,i+u)}return n})}(r,-u+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(i.path(r),i.ctx.clip(),i.mask(f)):(i.mask(r),i.ctx.clip(),i.path(f));i.ctx.shadowOffsetX=t.offsetX.number+u;i.ctx.shadowOffsetY=t.offsetY.number;i.ctx.shadowColor=it(t.color);i.ctx.shadowBlur=t.blur.number;i.ctx.fillStyle=t.inset?it(t.color):"rgba(0,0,0,1)";i.ctx.fill();i.ctx.restore()});c.label=2;case 2:r=u=0;f=s;c.label=3;case 3:return r<f.length?(e=f[r]).style===kr.NONE||ai(e.color)?[3,5]:[4,this.renderBorder(e.color,u,n.curves)]:[3,7];case 4:c.sent();c.label=5;case 5:u++;c.label=6;case 6:return r++,[3,3];case 7:return[2]}})})},l.prototype.render=function(n){return ot(this,void 0,void 0,function(){var t;return ut(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=it(this.options.backgroundColor),this.ctx.fillRect(this.options.x-this.options.scrollX,this.options.y-this.options.scrollY,this.options.width,this.options.height)),t=function(n){var t=new ev(n,[]),i=new fv(t),r=[];return ds(t,i,i,r),hv(t.container,r),i}(n),[4,this.renderStack(t)];case 1:return i.sent(),this.applyEffects([],2),[2,this.canvas]}})})},l);var dd=function(n){return n instanceof cs||n instanceof hs||n instanceof ss&&n.type!==le&&n.type!==ce},gd=function(n,t){switch(n){case at.BORDER_BOX:return we(t);case at.CONTENT_BOX:return function(n){return[n.topLeftContentBox,n.topRightContentBox,n.bottomRightContentBox,n.bottomLeftContentBox]}(t);case at.PADDING_BOX:default:return be(t)}},ng=function(n){switch(n){case ni.CENTER:return"center";case ni.RIGHT:return"right";case ni.LEFT:default:return"left"}},tg=(av.prototype.render=function(n){return ot(this,void 0,void 0,function(){var t,i;return ut(this,function(r){switch(r.label){case 0:return t=ko(Math.max(this.options.windowWidth,this.options.width)*this.options.scale,Math.max(this.options.windowHeight,this.options.height)*this.options.scale,this.options.scrollX*this.options.scale,this.options.scrollY*this.options.scale,n),[4,vv(t)];case 1:return i=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=it(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},av);return vv=function(n){return new Promise(function(t,i){var r=new Image;r.onload=function(){t(r)};r.onerror=i;r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(n))})},dt.setContext(window),yv=function(n,t){return ot(void 0,void 0,void 0,function(){var u,f,r,e,d,g,nt,tt,h,it,i,rt,c,l,ft,a,v,o,y,p,b,k,s;return ut(this,function(ut){switch(ut.label){case 0:if(!(u=n.ownerDocument))throw new Error("Element is not attached to a Document");if(!(f=u.defaultView))throw new Error("Document is not attached to a Window");return r=(Math.round(1e3*Math.random())+Date.now()).toString(16),e=vs(n)||function(n){return"HTML"===n.tagName}(n)?function(n){var t=n.body,i=n.documentElement,r,u;if(!t||!i)throw new Error("Unable to get document size");return r=Math.max(Math.max(t.scrollWidth,i.scrollWidth),Math.max(t.offsetWidth,i.offsetWidth),Math.max(t.clientWidth,i.clientWidth)),u=Math.max(Math.max(t.scrollHeight,i.scrollHeight),Math.max(t.offsetHeight,i.offsetHeight),Math.max(t.clientHeight,i.clientHeight)),new si(0,0,r,u)}(u):io(n),d=e.width,g=e.height,nt=e.left,tt=e.top,h=to({},{allowTaint:!1,imageTimeout:15e3,proxy:void 0,useCORS:!1},t),it={backgroundColor:"#ffffff",cache:t.cache?t.cache:dt.create(r,h),logging:!0,removeContainer:!0,foreignObjectRendering:!1,scale:f.devicePixelRatio||1,windowWidth:f.innerWidth,windowHeight:f.innerHeight,scrollX:f.pageXOffset,scrollY:f.pageYOffset,x:nt,y:tt,width:Math.ceil(d),height:Math.ceil(g),id:r},i=to({},it,h,t),rt=new si(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),w.create({id:r,enabled:i.logging}),w.getInstance(r).debug("Starting document clone"),c=new nv(n,{id:r,onclone:i.onclone,ignoreElements:i.ignoreElements,inlineImages:i.foreignObjectRendering,copyStyles:i.foreignObjectRendering}),(l=c.clonedReferenceElement)?[4,c.toIFrame(u,rt)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return ft=ut.sent(),a=u.documentElement?nh(getComputedStyle(u.documentElement).backgroundColor):kt.TRANSPARENT,v=u.body?nh(getComputedStyle(u.body).backgroundColor):kt.TRANSPARENT,o=t.backgroundColor,y="string"==typeof o?nh(o):null===o?kt.TRANSPARENT:4294967295,p=n===u.documentElement?ai(a)?ai(v)?y:v:a:y,b={id:r,cache:i.cache,canvas:i.canvas,backgroundColor:p,scale:i.scale,x:i.x,y:i.y,scrollX:i.scrollX,scrollY:i.scrollY,width:i.width,height:i.height,windowWidth:i.windowWidth,windowHeight:i.windowHeight},i.foreignObjectRendering?(w.getInstance(r).debug("Document cloned, using foreign object rendering"),[4,new tg(b).render(l)]):[3,3];case 2:return k=ut.sent(),[3,5];case 3:return w.getInstance(r).debug("Document cloned, using computed rendering"),dt.attachInstance(i.cache),w.getInstance(r).debug("Starting DOM parsing"),s=la(l),dt.detachInstance(),p===s.styles.backgroundColor&&(s.styles.backgroundColor=kt.TRANSPARENT),w.getInstance(r).debug("Starting renderer"),[4,new lv(b).render(s)];case 4:k=ut.sent();ut.label=5;case 5:return!0===i.removeContainer&&(nv.destroy(ft)||w.getInstance(r).error("Cannot detach cloned iframe as it is not in the DOM anymore")),w.getInstance(r).debug("Finished rendering"),w.destroy(r),dt.destroy(r),[2,k]}})})},function(n,t){return void 0===t&&(t={}),yv(n,t)}}),function(n,t){"function"==typeof define&&define.amd?define([],t):"undefined"!=typeof exports?t():(t(),n.FileSaver={exports:{}}.exports)}(this,function(){"use strict";function f(n,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["﻿",n],{type:n.type}):n}function r(n,t,r){var u=new XMLHttpRequest;u.open("GET",n);u.responseType="blob";u.onload=function(){i(u.response,t,r)};u.onerror=function(){console.error("could not download file")};u.send()}function u(n){var t=new XMLHttpRequest;t.open("HEAD",n,!1);try{t.send()}catch(n){}return 200<=t.status&&299>=t.status}function t(n){try{n.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null);n.dispatchEvent(t)}}var n="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,i=n.saveAs||("object"!=typeof window||window!==n?function(){}:"download"in HTMLAnchorElement.prototype?function(i,f,e){var s=n.URL||n.webkitURL,o=document.createElement("a");f=f||i.name||"download";o.download=f;o.rel="noopener";"string"==typeof i?(o.href=i,o.origin===location.origin?t(o):u(o.href)?r(i,f,e):t(o,o.target="_blank")):(o.href=s.createObjectURL(i),setTimeout(function(){s.revokeObjectURL(o.href)},4e4),setTimeout(function(){t(o)},0))}:"msSaveOrOpenBlob"in navigator?function(n,i,e){if(i=i||n.name||"download","string"!=typeof n)navigator.msSaveOrOpenBlob(f(n,e),i);else if(u(n))r(n,i,e);else{var o=document.createElement("a");o.href=n;o.target="_blank";setTimeout(function(){t(o)})}}:function(t,i,u,f){var e,s,o;if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),"string"==typeof t)return r(t,i,u);var c="application/octet-stream"===t.type,l=/constructor/i.test(n.HTMLElement)||n.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);(h||c&&l)&&"undefined"!=typeof FileReader?(e=new FileReader,e.onloadend=function(){var n=e.result;n=h?n:n.replace(/^data:[^;]*;/,"data:attachment/file;");f?f.location.href=n:location=n;f=null},e.readAsDataURL(t)):(s=n.URL||n.webkitURL,o=s.createObjectURL(t),f?f.location=o:location.href=o,f=null,setTimeout(function(){s.revokeObjectURL(o)},4e4))});n.saveAs=i.saveAs=i;"undefined"!=typeof module&&(module.exports=i)});!function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){"use strict";function i(n){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function si(n){var t=0,f,o,h,r;if(71!==n[t++]||73!==n[t++]||70!==n[t++]||56!==n[t++]||56!=(n[t++]+1&253)||97!==n[t++])throw"Invalid GIF 87a/89a header.";var i=n[t++]|n[t++]<<8,b=n[t++]|n[t++]<<8,c=n[t++],k=c>>7,d=1<<(7&c)+1;n[t++];n[t++];f=null;k&&(f=t,t+=3*d);var l=!0,u=[],a=0,e=null,v=0,y=null;for(this.width=i,this.height=b;l&&t<n.length;)switch(n[t++]){case 33:switch(n[t++]){case 255:if(11!==n[t]||78==n[t+1]&&69==n[t+2]&&84==n[t+3]&&83==n[t+4]&&67==n[t+5]&&65==n[t+6]&&80==n[t+7]&&69==n[t+8]&&50==n[t+9]&&46==n[t+10]&&48==n[t+11]&&3==n[t+12]&&1==n[t+13]&&0==n[t+16])t+=14,y=n[t++]|n[t++]<<8,t++;else for(t+=12;;){if(0===(r=n[t++]))break;t+=r}break;case 249:if(4!==n[t++]||0!==n[t+4])throw"Invalid graphics extension block.";o=n[t++];a=n[t++]|n[t++]<<8;e=n[t++];0==(1&o)&&(e=null);v=o>>2&7;t++;break;case 254:for(;;){if(0===(r=n[t++]))break;t+=r}break;default:throw"Unknown graphic control label: 0x"+n[t-1].toString(16);}break;case 44:var g=n[t++]|n[t++]<<8,nt=n[t++]|n[t++]<<8,tt=n[t++]|n[t++]<<8,it=n[t++]|n[t++]<<8,s=n[t++],rt=s>>6&1,p=f,w=!1;for(s>>7&&(w=!0,p=t,t+=3*(1<<(7&s)+1)),h=t,t++;;){if(0===(r=n[t++]))break;t+=r}u.push({x:g,y:nt,width:tt,height:it,has_local_palette:w,palette_offset:p,data_offset:h,data_length:t-h,transparent_index:e,interlaced:!!rt,delay:a,disposal:v});break;case 59:l=!1;break;default:throw"Unknown gif block: 0x"+n[t-1].toString(16);}this.numFrames=function(){return u.length};this.loopCount=function(){return y};this.frameInfo=function(n){if(n<0||n>=u.length)throw"Frame index out of range.";return u[n]};this.decodeAndBlitFrameBGRA=function(t,r){var u=this.frameInfo(t),w=u.width*u.height,l=new Uint8Array(w),h,c,s;tu(n,u.data_offset,l,w);h=u.palette_offset;c=u.transparent_index;null===c&&(c=256);var e=u.width,o=i-e,a=e,b=4*(u.y*i+u.x),k=4*((u.y+u.height)*i+u.x),f=b,v=4*o;!0===u.interlaced&&(v+=28*(e+o));for(var y=8,p=0,d=l.length;p<d;++p){if(s=l[p],0===a&&(a=e,k<=(f+=v)&&(v=o+4*(e+o)*(y-1),f=b+(e+o)*(y<<1),y>>=1)),s===c)f+=4;else{var g=n[h+3*s],nt=n[h+3*s+1],tt=n[h+3*s+2];r[f++]=tt;r[f++]=nt;r[f++]=g;r[f++]=255}--a}};this.decodeAndBlitFrameRGBA=function(t,r){var u=this.frameInfo(t),w=u.width*u.height,l=new Uint8Array(w),h,c,s;tu(n,u.data_offset,l,w);h=u.palette_offset;c=u.transparent_index;null===c&&(c=256);var e=u.width,o=i-e,a=e,b=4*(u.y*i+u.x),k=4*((u.y+u.height)*i+u.x),f=b,v=4*o;!0===u.interlaced&&(v+=28*(e+o));for(var y=8,p=0,d=l.length;p<d;++p){if(s=l[p],0===a&&(a=e,k<=(f+=v)&&(v=o+4*(e+o)*(y-1),f=b+(e+o)*(y<<1),y>>=1)),s===c)f+=4;else{var g=n[h+3*s],nt=n[h+3*s+1],tt=n[h+3*s+2];r[f++]=g;r[f++]=nt;r[f++]=tt;r[f++]=255}--a}}}function tu(n,t,i,r){for(var f,p,nt,w=n[t++],b=1<<w,k=b+1,o=k+1,e=w+1,s=(1<<e)-1,h=0,d=0,c=0,a=n[t++],g=new Int32Array(4096),l=null;;){for(;h<16&&0!==a;)d|=n[t++]<<h,h+=8,1===a?a=n[t++]:--a;if(h<e)break;if(f=d&s,d>>=e,h-=e,f!==b){if(f===k)break;for(var v=f<o?f:l,y=0,u=v;b<u;)u=g[u]>>8,++y;if(p=u,r<c+y+(v!==f?1:0))return void console.log("Warning, gif stream longer than expected.");for(i[c++]=p,nt=c+=y,v!==f&&(i[c++]=p),u=v;y--;)u=g[u],i[--nt]=255&u,u>>=8;null!==l&&o<4096&&(g[o++]=l<<8|p,s+1<=o&&e<12&&(++e,s=s<<1|1));l=f}else o=k+1,s=(1<<(e=w+1))-1,l=null}return c!==r&&console.log("Warning, gif stream shorter than expected."),i}function hi(n){function l(n,t){for(var e,f=0,i=0,r=[],u=1;u<=16;u++){for(e=1;e<=n[u];e++)r[t[i]]=[],r[t[i]][0]=f,r[t[i]][1]=u,i++,f++;f*=2}return r}function u(n){for(var r=n[0],i=n[1]-1;0<=i;)r&1<<i&&(s|=1<<e),i--,--e<0&&(255==s?(t(255),t(0)):t(s),e=7,s=0)}function t(n){b.push(n)}function r(n){t(n>>8&255);t(255&n)}function k(n,t,i,r,e){for(var p,l,k,s,d,v,w,a,b=e[0],g=e[240],nt=function(n,t){for(var u,f,e,o,s,h,c,l,a,i=0,d,ut,r=0;r<8;++r){u=n[i];f=n[i+1];e=n[i+2];o=n[i+3];s=n[i+4];h=n[i+5];c=n[i+6];var ft=u+(l=n[i+7]),p=u-l,et=f+c,ot=f-c,st=e+h,ht=e-h,ct=o+s,si=o-s,v=ft+ct,w=ft-ct,b=et+st,k=et-st;n[i]=v+b;n[i+4]=v-b;d=.707106781*(k+w);n[i+2]=w+d;n[i+6]=w-d;var lt=.382683433*((v=si+ht)-(k=ot+p)),at=.5411961*v+lt,vt=1.306562965*k+lt,yt=.707106781*(b=ht+ot),pt=p+yt,wt=p-yt;n[i+5]=wt+at;n[i+3]=wt-at;n[i+1]=pt+vt;n[i+7]=pt-vt;i+=8}for(r=i=0;r<8;++r){u=n[i];f=n[i+8];e=n[i+16];o=n[i+24];s=n[i+32];h=n[i+40];c=n[i+48];var bt=u+(l=n[i+56]),g=u-l,kt=f+c,dt=f-c,gt=e+h,ni=e-h,ti=o+s,hi=o-s,y=bt+ti,nt=bt-ti,tt=kt+gt,it=kt-gt;n[i]=y+tt;n[i+32]=y-tt;ut=.707106781*(it+nt);n[i+16]=nt+ut;n[i+48]=nt-ut;var ii=.382683433*((y=hi+ni)-(it=dt+g)),ri=.5411961*y+ii,ui=1.306562965*it+ii,fi=.707106781*(tt=ni+dt),ei=g+fi,oi=g-fi;n[i+40]=oi+ri;n[i+24]=oi-ri;n[i+8]=ei+ui;n[i+56]=ei-ui;i++}for(r=0;r<64;++r)a=n[r]*t[r],rt[r]=0<a?a+.5|0:a-.5|0;return rt}(n,t),y=0;y<64;++y)o[h[y]]=nt[y];for(p=o[0]-i,i=o[0],0==p?u(r[0]):(u(r[c[a=32767+p]]),u(f[a])),l=63;0<l&&0==o[l];l--);if(0==l)return u(b),i;for(s=1;s<=l;){for(d=s;0==o[s]&&s<=l;++s);if(v=s-d,16<=v){for(k=v>>4,w=1;w<=k;++w)u(g);v&=15}a=32767+o[s];u(e[(v<<4)+c[a]]);u(f[a]);s++}return 63!=l&&u(b),i}function pt(n){(n<=0&&(n=1),100<n&&(n=100),nt!=n)&&(function(n){for(var t,l,u,i,e,c=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++)t=tt((c[r]*n+50)/100),t<1?t=1:255<t&&(t=255),y[h[r]]=t;for(l=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],u=0;u<64;u++)i=tt((l[u]*n+50)/100),i<1?i=1:255<i&&(i=255),p[h[u]]=i;for(var o=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,s=0;s<8;s++)for(e=0;e<8;e++)it[f]=1/(y[h[f]]*o[s]*o[e]*8),w[f]=1/(p[h[f]]*o[s]*o[e]*8),f++}(n<50?Math.floor(5e3/n):Math.floor(200-2*n)),nt=n)}var d,a,g,v,nt,tt=Math.floor,y=new Array(64),p=new Array(64),it=new Array(64),w=new Array(64),f=new Array(65535),c=new Array(65535),rt=new Array(64),o=new Array(64),b=[],s=0,e=7,ut=new Array(64),ft=new Array(64),et=new Array(64),wt=new Array(256),i=new Array(2048),h=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],ot=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],st=[0,1,2,3,4,5,6,7,8,9,10,11],ht=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],ct=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],lt=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],at=[0,1,2,3,4,5,6,7,8,9,10,11],vt=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],yt=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(n,f){var ti,ii,dt;(new Date).getTime();f&&pt(f);b=[];s=0;e=7;r(65496);r(65504);r(16);t(74);t(70);t(73);t(70);t(0);t(1);t(1);t(0);r(1);r(1);t(0);t(0),function(){var n,i;for(r(65499),r(132),t(0),n=0;n<64;n++)t(y[n]);for(t(1),i=0;i<64;i++)t(p[i])}();ti=n.width;ii=n.height;r(65472);r(17);t(8);r(ii);r(ti);t(3);t(1);t(17);t(0);t(2);t(17);t(1);t(3);t(17);t(1),function(){var n,i,u,f,e,o,s,h;for(r(65476),r(418),t(0),n=0;n<16;n++)t(ot[n+1]);for(i=0;i<=11;i++)t(st[i]);for(t(16),u=0;u<16;u++)t(ht[u+1]);for(f=0;f<=161;f++)t(ct[f]);for(t(1),e=0;e<16;e++)t(lt[e+1]);for(o=0;o<=11;o++)t(at[o]);for(t(17),s=0;s<16;s++)t(vt[s+1]);for(h=0;h<=161;h++)t(yt[h])}();r(65498);r(12);t(3);t(1);t(0);t(2);t(17);t(3);t(17);t(0);t(63);t(0);var ri=0,ui=0,fi=0;s=0;e=7;this.encode.displayName="_encode_";for(var c,tt,rt,wt,ei,h,bt,kt,o,gt=n.data,oi=n.width,ni=n.height,l=4*oi,nt=0;nt<ni;){for(c=0;c<l;){for(h=ei=l*nt+c,bt=-1,o=kt=0;o<64;o++)h=ei+(kt=o>>3)*l+(bt=4*(7&o)),ni<=nt+kt&&(h-=l*(nt+1+kt-ni)),l<=c+bt&&(h-=c+bt-l+4),tt=gt[h++],rt=gt[h++],wt=gt[h++],ut[o]=(i[tt]+i[rt+256>>0]+i[wt+512>>0]>>16)-128,ft[o]=(i[tt+768>>0]+i[rt+1024>>0]+i[wt+1280>>0]>>16)-128,et[o]=(i[tt+1280>>0]+i[rt+1536>>0]+i[wt+1792>>0]>>16)-128;ri=k(ut,it,ri,d,g);ui=k(ft,w,ui,a,v);fi=k(et,w,fi,a,v);c+=32}nt+=8}return 0<=e&&(dt=[],dt[1]=e+1,dt[0]=(1<<e+1)-1,u(dt)),r(65497),new Uint8Array(b)},function(){(new Date).getTime();n||(n=50),function(){for(var t=String.fromCharCode,n=0;n<256;n++)wt[n]=t(n)}();d=l(ot,st);a=l(lt,at);g=l(ht,ct);v=l(vt,yt),function(){for(var n,t,u=1,r=2,i=1;i<=15;i++){for(n=u;n<r;n++)c[32767+n]=i,f[32767+n]=[],f[32767+n][1]=i,f[32767+n][0]=n;for(t=-(r-1);t<=-u;t++)c[32767+t]=i,f[32767+t]=[],f[32767+t][1]=i,f[32767+t][0]=r-1+t;u<<=1;r<<=1}}(),function(){for(var n=0;n<256;n++)i[n]=19595*n,i[n+256>>0]=38470*n,i[n+512>>0]=7471*n+32768,i[n+768>>0]=-11059*n,i[n+1024>>0]=-21709*n,i[n+1280>>0]=32768*n+8421375,i[n+1536>>0]=-27439*n,i[n+1792>>0]=-5329*n}();pt(n);(new Date).getTime()}()}function e(n,t){if(this.pos=0,this.buffer=n,this.datav=new DataView(n.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader();this.parseBGR()}var o,li,bt,f,kt,v,p,nt,tt,it,dt,ai,vi,yi,pi,wi,gt,bi,ki,rt,w,n,ut,di,gi,ni,s,nr,ft,tr,ir,rr,ur,ti,ii,ri,ui,fr,er,or,sr,et,hr,b,ot,st,cr,lr,ar,vr,r,u,yr,pr,fi,ht,wr,ct,ei,k,lt,at,t,br,kr,dr,h,c,d,y,vt,yt,a,pt,g,gr,oi,nu,l,ci,wt;!function(n){var e,s,o,h,t;if("object"!==i(n.console)){n.console={};for(var u,f,r=n.console,c=function(){},l=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");u=l.pop();)r[u]||(r[u]={});for(;f=a.pop();)r[f]||(r[f]=c)}t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===n.btoa&&(n.btoa=function(n){var e,o,s,h,i,r=0,l=0,f="",c=[],u;if(!n)return n;for(;e=(i=n.charCodeAt(r++)<<16|n.charCodeAt(r++)<<8|n.charCodeAt(r++))>>18&63,o=i>>12&63,s=i>>6&63,h=63&i,c[l++]=t.charAt(e)+t.charAt(o)+t.charAt(s)+t.charAt(h),r<n.length;);return f=c.join(""),u=n.length%3,(u?f.slice(0,u-3):f)+"===".slice(u||3)});void 0===n.atob&&(n.atob=function(n){var r,u,e,o,s,f,i=0,c=0,h=[];if(!n)return n;for(n+="";r=(f=t.indexOf(n.charAt(i++))<<18|t.indexOf(n.charAt(i++))<<12|(o=t.indexOf(n.charAt(i++)))<<6|(s=t.indexOf(n.charAt(i++))))>>16&255,u=f>>8&255,e=255&f,h[c++]=64==o?String.fromCharCode(r):64==s?String.fromCharCode(r,u):String.fromCharCode(r,u,e),i<n.length;);return h.join("")});Array.prototype.map||(Array.prototype.map=function(n){if(null==this||"function"!=typeof n)throw new TypeError;for(var i=Object(this),r=i.length>>>0,u=new Array(r),f=1<arguments.length?arguments[1]:void 0,t=0;t<r;t++)t in i&&(u[t]=n.call(f,i[t],t,i));return u});Array.isArray||(Array.isArray=function(n){return"[object Array]"===Object.prototype.toString.call(n)});Array.prototype.forEach||(Array.prototype.forEach=function(n,t){if(null==this||"function"!=typeof n)throw new TypeError;for(var r=Object(this),u=r.length>>>0,i=0;i<u;i++)i in r&&n.call(t,r[i],i,r)});Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(n){var i,u,f,t,r;if(null==this)throw new TypeError('"this" is null or not defined');if(i=Object(this),u=i.length>>>0,"function"!=typeof n)throw new TypeError("predicate must be a function");for(f=arguments[1],t=0;t<u;){if(r=i[t],n.call(f,r,t,i))return r;t++}},configurable:!0,writable:!0});Object.keys||(Object.keys=(e=Object.prototype.hasOwnProperty,s=!{toString:null}.propertyIsEnumerable("toString"),h=(o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(n){if("object"!==i(n)&&("function"!=typeof n||null===n))throw new TypeError;var r,t,u=[];for(r in n)e.call(n,r)&&u.push(r);if(s)for(t=0;t<h;t++)e.call(n,o[t])&&u.push(o[t]);return u}));"function"!=typeof Object.assign&&(Object.assign=function(n){var i,t,r;if(null==n)throw new TypeError("Cannot convert undefined or null to object");for(n=Object(n),i=1;i<arguments.length;i++)if(t=arguments[i],null!=t)for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n});String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/g,"")});String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")});Number.isInteger=Number.isInteger||function(n){return"number"==typeof n&&isFinite(n)&&Math.floor(n)===n}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")());t=function(n){function r(t){if("object"!==i(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};this.subscribe=function(n,t,i){if(i=i||!1,"string"!=typeof n||"function"!=typeof t||"boolean"!=typeof i)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");r.hasOwnProperty(n)||(r[n]={});var u=Math.random().toString(35);return r[n][u]=[t,!!i],u};this.unsubscribe=function(n){for(var t in r)if(r[t][n])return delete r[t][n],0===Object.keys(r[t]).length&&delete r[t],!0;return!1};this.publish=function(i){var o,u,f,e;if(r.hasOwnProperty(i)){o=Array.prototype.slice.call(arguments,1);u=[];for(f in r[i]){e=r[i][f];try{e[0].apply(t,o)}catch(i){n.console&&console.error("jsPDF PubSub Error",i.message,i)}e[1]&&u.push(f)}u.length&&u.forEach(this.unsubscribe)}};this.getTopics=function(){return r}}function t(u,f,e,o){var d={},vi=[],sr=1,at,dt,nu,ai,gt;"object"===i(u)&&(u=(d=u).orientation,f=d.unit||f,e=d.format||e,o=d.compress||d.compressPdf||o,vi=d.filters||(!0===o?["FlateEncode"]:vi),sr="number"==typeof d.userUnit?Math.abs(d.userUnit):1);f=f||"mm";u=(""+(u||"P")).toLowerCase();var ni=d.putOnlyUsedFonts||!0,ti={},s={internal:{},__private__:{}};s.__private__.PubSub=r;var yi="1.3",tu=s.__private__.getPdfVersion=function(){return yi},hr=(s.__private__.setPdfVersion=function(n){yi=n},{a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]}),pi=(s.__private__.getPageFormats=function(){return hr},s.__private__.getPageFormat=function(n){return hr[n]});"string"==typeof e&&(e=pi(e));e=e||pi("a4");var ii,c=s.f2=s.__private__.f2=function(n){if(isNaN(n))throw new Error("Invalid argument passed to jsPDF.f2");return n.toFixed(2)},k=s.__private__.f3=function(n){if(isNaN(n))throw new Error("Invalid argument passed to jsPDF.f3");return n.toFixed(3)},ri="00000000000000000000000000000000",iu=s.__private__.getFileId=function(){return ri},cr=s.__private__.setFileId=function(n){return n=n||"12345678901234567890123456789012".split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),ri=n};s.setFileId=function(n){return cr(n),this};s.getFileId=function(){return iu()};var ru=s.__private__.convertDateToPDFDate=function(n){var t=n.getTimezoneOffset(),i=t<0?"+":"-",r=Math.floor(Math.abs(t/60)),u=Math.abs(t%60),f=[i,ht(r),"'",ht(u),"'"].join("");return["D:",n.getFullYear(),ht(n.getMonth()+1),ht(n.getDate()),ht(n.getHours()),ht(n.getMinutes()),ht(n.getSeconds()),f].join("")},uu=s.__private__.convertPDFDateToDate=function(n){var t=parseInt(n.substr(2,4),10),i=parseInt(n.substr(6,2),10)-1,r=parseInt(n.substr(8,2),10),u=parseInt(n.substr(10,2),10),f=parseInt(n.substr(12,2),10),e=parseInt(n.substr(14,2),10);return parseInt(n.substr(16,2),10),parseInt(n.substr(20,2),10),new Date(t,i,r,u,f,e,0)},lr=s.__private__.setCreationDate=function(n){var t;if(void 0===n&&(n=new Date),"object"===i(n)&&"[object Date]"===Object.prototype.toString.call(n))t=ru(n);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|\-0[0-9]|\-1[0-1])\'(0[0-9]|[1-5][0-9])\'?$/.test(n))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=n}return ii=t},fu=s.__private__.getCreationDate=function(n){var t=ii;return"jsDate"===n&&(t=uu(ii)),t};s.setCreationDate=function(n){return lr(n),this};s.getCreationDate=function(n){return fu(n)};var v,ui,rt,fi,yt,nt,y,ei,ht=s.__private__.padd2=function(n){return("0"+parseInt(n)).slice(-2)},pt=!1,it=[],wi=[],wt=0,h=(s.__private__.setCustomOutputDestination=function(n){ui=n},s.__private__.resetCustomOutputDestination=function(){ui=void 0},s.__private__.out=function(n){var t;return n="string"==typeof n?n:n.toString(),(t=void 0===ui?pt?it[v]:wi:ui).push(n),pt||(wt+=n.length+1),t}),eu=s.__private__.write=function(n){return h(1===arguments.length?n.toString():Array.prototype.join.call(arguments," "))},ar=s.__private__.getArrayBuffer=function(n){for(var t=n.length,i=new ArrayBuffer(t),r=new Uint8Array(i);t--;)r[t]=n.charCodeAt(t);return i},oi=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]],ut=(s.__private__.getStandardFonts=function(){return oi},d.fontSize||16),ou=(s.__private__.setFontSize=s.setFontSize=function(n){return ut=n,this},s.__private__.getFontSize=s.getFontSize=function(){return ut}),bi=d.R2L||!1,su=(s.__private__.setR2L=s.setR2L=function(n){return bi=n,this},s.__private__.getR2L=s.getR2L=function(){return bi},s.__private__.setZoomMode=function(n){if(/^\d*\.?\d*\%$/.test(n))rt=n;else if(isNaN(n)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(n))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+n+'" is not recognized.');rt=n}else rt=parseInt(n,10)}),hu=(s.__private__.getZoomMode=function(){return rt},s.__private__.setPageMode=function(n){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(n))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+n+'" is not recognized.');fi=n}),cu=(s.__private__.getPageMode=function(){return fi},s.__private__.setLayoutMode=function(n){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(n))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+n+'" is not recognized.');yt=n}),ft=(s.__private__.getLayoutMode=function(){return yt},s.__private__.setDisplayMode=s.setDisplayMode=function(n,t,i){return su(n),cu(t),hu(i),this},{title:"",subject:"",author:"",keywords:"",creator:""}),st=(s.__private__.getDocumentProperty=function(n){if(-1===Object.keys(ft).indexOf(n))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ft[n]},s.__private__.getDocumentProperties=function(){return ft},s.__private__.setDocumentProperties=s.setProperties=s.setDocumentProperties=function(n){for(var t in ft)ft.hasOwnProperty(t)&&n[t]&&(ft[t]=n[t]);return this},s.__private__.setDocumentProperty=function(n,t){if(-1===Object.keys(ft).indexOf(n))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ft[n]=t},0),ct=[],b={},tt={},et=0,a=[],si=[],g=new r(s),vr=d.hotfixes||[],bt=s.__private__.newObject=function(){var n=ot();return lt(n,!0),n},ot=s.__private__.newObjectDeferred=function(){return ct[++st]=function(){return wt},st},lt=function(n,t){return t="boolean"==typeof t&&t,ct[n]=wt,t&&h(n+" 0 obj"),n},lu=s.__private__.newAdditionalObject=function(){var n={objId:ot(),content:""};return si.push(n),n},hi=ot(),ki=ot(),di=s.__private__.decodeColorString=function(n){var t=n.split(" "),i,u,r;for(2===t.length&&("g"===t[1]||"G"===t[1])&&(i=parseFloat(t[0]),t=[i,i,i,"r"]),u="#",r=0;r<3;r++)u+=("0"+Math.floor(255*parseFloat(t[r])).toString(16)).slice(-2);return u},gi=s.__private__.encodeColorString=function(n){var r,h,s;"string"==typeof n&&(n={ch1:n});var t=n.ch1,u=n.ch2,o=n.ch3,e=n.ch4,f=(n.precision,"draw"===n.pdfColorType?["G","RG","K"]:["g","rg","k"]);if("string"==typeof t&&"#"!==t.charAt(0))if(h=new RGBColor(t),h.ok)t=h.toHex();else if(!/^\d*\.?\d*$/.test(t))throw new Error('Invalid color "'+t+'" passed to jsPDF.encodeColorString.');if(("string"==typeof t&&/^#[0-9A-Fa-f]{3}$/.test(t)&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),"string"==typeof t&&/^#[0-9A-Fa-f]{6}$/.test(t))&&(s=parseInt(t.substr(1),16),t=s>>16&255,u=s>>8&255,o=255&s),void 0===u||void 0===e&&t===u&&u===o)if("string"==typeof t)r=t+" "+f[0];else switch(n.precision){case 2:r=c(t/255)+" "+f[0];break;case 3:default:r=k(t/255)+" "+f[0]}else if(void 0===e||"object"===i(e)){if(e&&!isNaN(e.a)&&0===e.a)return["1.000","1.000","1.000",f[1]].join(" ");if("string"==typeof t)r=[t,u,o,f[1]].join(" ");else switch(n.precision){case 2:r=[c(t/255),c(u/255),c(o/255),f[1]].join(" ");break;default:case 3:r=[k(t/255),k(u/255),k(o/255),f[1]].join(" ")}}else if("string"==typeof t)r=[t,u,o,e,f[2]].join(" ");else switch(n.precision){case 2:r=[c(t/255),c(u/255),c(o/255),c(e/255),f[2]].join(" ");break;case 3:default:r=[k(t/255),k(u/255),k(o/255),k(e/255),f[2]].join(" ")}return r},nr=s.__private__.getFilters=function(){return vi},tr=s.__private__.putStream=function(n){var e=(n=n||{}).data||"",o=n.filters||nr(),s=n.alreadyAppliedFilters||[],c=n.addLength1||!1,l=e.length,r={},i,u,f;for(!0===o&&(o=["FlateEncode"]),i=n.additionalKeyValues||[],u=(r=void 0!==t.API.processDataByFilters?t.API.processDataByFilters(e,o):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(s)?s.join(" "):s.toString()),0!==r.data.length&&(i.push({key:"Length",value:r.data.length}),!0===c&&i.push({key:"Length1",value:l})),0!=u.length&&(u.split("/").length-1==1?i.push({key:"Filter",value:u}):i.push({key:"Filter",value:"["+u+"]"})),h("<<"),f=0;f<i.length;f++)h("/"+i[f].key+" "+i[f].value);h(">>");0!==r.data.length&&(h("stream"),h(r.data),h("endstream"))},au=s.__private__.putPage=function(n){var f;n.mediaBox;var i=n.number,r=n.data,t=n.objId,u=n.contentsObjId;return lt(t,!0),a[v].mediaBox.topRightX,a[v].mediaBox.bottomLeftX,a[v].mediaBox.topRightY,a[v].mediaBox.bottomLeftY,h("<<\/Type /Page"),h("/Parent "+n.rootDictionaryObjId+" 0 R"),h("/Resources "+n.resourceDictionaryObjId+" 0 R"),h("/MediaBox ["+parseFloat(c(n.mediaBox.bottomLeftX))+" "+parseFloat(c(n.mediaBox.bottomLeftY))+" "+c(n.mediaBox.topRightX)+" "+c(n.mediaBox.topRightY)+"]"),null!==n.cropBox&&h("/CropBox ["+c(n.cropBox.bottomLeftX)+" "+c(n.cropBox.bottomLeftY)+" "+c(n.cropBox.topRightX)+" "+c(n.cropBox.topRightY)+"]"),null!==n.bleedBox&&h("/BleedBox ["+c(n.bleedBox.bottomLeftX)+" "+c(n.bleedBox.bottomLeftY)+" "+c(n.bleedBox.topRightX)+" "+c(n.bleedBox.topRightY)+"]"),null!==n.trimBox&&h("/TrimBox ["+c(n.trimBox.bottomLeftX)+" "+c(n.trimBox.bottomLeftY)+" "+c(n.trimBox.topRightX)+" "+c(n.trimBox.topRightY)+"]"),null!==n.artBox&&h("/ArtBox ["+c(n.artBox.bottomLeftX)+" "+c(n.artBox.bottomLeftY)+" "+c(n.artBox.topRightX)+" "+c(n.artBox.topRightY)+"]"),"number"==typeof n.userUnit&&1!==n.userUnit&&h("/UserUnit "+n.userUnit),g.publish("putPage",{objId:t,pageContext:a[i],pageNumber:i,page:r}),h("/Contents "+u+" 0 R"),h(">>"),h("endobj"),f=r.join("\n"),lt(u,!0),tr({data:f,filters:nr()}),h("endobj"),t},vu=s.__private__.putPages=function(){for(var t,r=[],i,n=1;n<=et;n++)a[n].objId=ot(),a[n].contentsObjId=ot();for(n=1;n<=et;n++)r.push(au({number:n,data:it[n],objId:a[n].objId,contentsObjId:a[n].contentsObjId,mediaBox:a[n].mediaBox,cropBox:a[n].cropBox,bleedBox:a[n].bleedBox,trimBox:a[n].trimBox,artBox:a[n].artBox,userUnit:a[n].userUnit,rootDictionaryObjId:hi,resourceDictionaryObjId:ki}));for(lt(hi,!0),h("<<\/Type /Pages"),i="/Kids [",t=0;t<et;t++)i+=r[t]+" 0 R ";h(i+"]");h("/Count "+et);h(">>");h("endobj");g.publish("postPutPages")},yu=function(){!function(){var t,n;for(t in b)b.hasOwnProperty(t)&&(!1===ni||!0===ni&&ti.hasOwnProperty(t))&&(n=b[t],g.publish("putFont",{font:n,out:h,newObject:bt,putStream:tr}),!0!==n.isAlreadyPutted&&(n.objectNumber=bt(),h("<<"),h("/Type /Font"),h("/BaseFont /"+n.postScriptName),h("/Subtype /Type1"),"string"==typeof n.encoding&&h("/Encoding /"+n.encoding),h("/FirstChar 32"),h("/LastChar 255"),h(">>"),h("endobj")))}();g.publish("putResources");lt(ki,!0);h("<<"),function(){for(var n in h("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),h("/Font <<"),b)b.hasOwnProperty(n)&&(!1===ni||!0===ni&&ti.hasOwnProperty(n))&&h("/"+n+" "+b[n].objectNumber+" 0 R");h(">>");h("/XObject <<");g.publish("putXobjectDict");h(">>")}();h(">>");h("endobj");g.publish("postPutResources")},yr=function(n,t,i){tt.hasOwnProperty(t)||(tt[t]={});tt[t][i]=n},pr=function(n,t,i,r,u){u=u||!1;var f="F"+(Object.keys(b).length+1).toString(10),e={id:f,postScriptName:n,fontName:t,fontStyle:i,encoding:r,isStandardFont:u,metadata:{}};return g.publish("addFont",{font:e,instance:this}),void 0!==f&&(b[f]=e,yr(f,t,i)),f},kt=s.__private__.pdfEscape=s.pdfEscape=function(n,t){return function(n,t){var i,e,o,s,r,u,f,h,c;if(o=(t=t||{}).sourceEncoding||"Unicode",r=t.outputEncoding,(t.autoencode||r)&&b[nt].metadata&&b[nt].metadata[o]&&b[nt].metadata[o].encoding&&(s=b[nt].metadata[o].encoding,!r&&b[nt].encoding&&(r=b[nt].encoding),!r&&s.codePages&&(r=s.codePages[0]),"string"==typeof r&&(r=s[r]),r)){for(f=!1,u=[],i=0,e=n.length;i<e;i++)(h=r[n.charCodeAt(i)])?u.push(String.fromCharCode(h)):u.push(n[i]),u[i].charCodeAt(0)>>8&&(f=!0);n=u.join("")}for(i=n.length;void 0===f&&0!==i;)n.charCodeAt(i-1)>>8&&(f=!0),i--;if(!f)return n;for(u=t.noBOM?[]:[254,255],i=0,e=n.length;i<e;i++){if((c=(h=n.charCodeAt(i))>>8)>>8)throw new Error("Character at position "+i+" of string '"+n+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");u.push(c);u.push(h-(c<<8))}return String.fromCharCode.apply(void 0,u)}(n,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},pu=s.__private__.beginPage=function(n,t){var i,r="string"==typeof t&&t.toLowerCase();if("string"==typeof n&&(i=pi(n.toLowerCase()))&&(n=i[0],t=i[1]),Array.isArray(n)&&(t=n[1],n=n[0]),(isNaN(n)||isNaN(t))&&(n=e[0],t=e[1]),r){switch(r.substr(0,1)){case"l":n<t&&(r="s");break;case"p":t<n&&(r="s")}"s"===r&&(i=n,n=t,t=i)}(14400<n||14400<t)&&(console.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),n=Math.min(14400,n),t=Math.min(14400,t));e=[n,t];pt=!0;it[++et]=[];a[et]={objId:0,contentsObjId:0,userUnit:Number(sr),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(n),topRightY:Number(t)}};br(et)},wr=function(){pu.apply(this,arguments);ef(ff);h(li);0!==or&&h(or+" J");0!==ai&&h(ai+" j");g.publish("addPage",{pageNumber:et})},br=function(n){0<n&&n<=et&&(v=n)},wu=s.__private__.getNumberOfPages=s.getNumberOfPages=function(){return it.length-1},ir=function(n,t,i){var u,r=void 0;return i=i||{},n=void 0!==n?n:b[nt].fontName,t=void 0!==t?t:b[nt].fontStyle,u=n.toLowerCase(),void 0!==tt[u]&&void 0!==tt[u][t]?r=tt[u][t]:void 0!==tt[n]&&void 0!==tt[n][t]?r=tt[n][t]:!1===i.disableWarning&&console.warn("Unable to look up font label for font '"+n+"', '"+t+"'. Refer to getFontList() for available fonts."),r||i.noFallback||null==(r=tt.times[t])&&(r=tt.times.normal),r},bu=s.__private__.putInfo=function(){for(var n in bt(),h("<<"),h("/Producer (jsPDF "+t.version+")"),ft)ft.hasOwnProperty(n)&&ft[n]&&h("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+kt(ft[n])+")");h("/CreationDate ("+ii+")");h(">>");h("endobj")},ku=s.__private__.putCatalog=function(n){var i=(n=n||{}).rootDictionaryObjId||hi,t;switch(bt(),h("<<"),h("/Type /Catalog"),h("/Pages "+i+" 0 R"),rt||(rt="fullwidth"),rt){case"fullwidth":h("/OpenAction [3 0 R /FitH null]");break;case"fullheight":h("/OpenAction [3 0 R /FitV null]");break;case"fullpage":h("/OpenAction [3 0 R /Fit]");break;case"original":h("/OpenAction [3 0 R /XYZ null null 1]");break;default:t=""+rt;"%"===t.substr(t.length-1)&&(rt=parseInt(rt)/100);"number"==typeof rt&&h("/OpenAction [3 0 R /XYZ null null "+c(rt)+"]")}switch(yt||(yt="continuous"),yt){case"continuous":h("/PageLayout /OneColumn");break;case"single":h("/PageLayout /SinglePage");break;case"two":case"twoleft":h("/PageLayout /TwoColumnLeft");break;case"tworight":h("/PageLayout /TwoColumnRight")}fi&&h("/PageMode /"+fi);g.publish("putCatalog");h(">>");h("endobj")},du=s.__private__.putTrailer=function(){h("trailer");h("<<");h("/Size "+(st+1));h("/Root "+st+" 0 R");h("/Info "+(st-1)+" 0 R");h("/ID [ <"+ri+"> <"+ri+"> ]");h(">>")},gu=s.__private__.putHeader=function(){h("%PDF-"+yi);h("%ºß¬à")},nf=s.__private__.putXRef=function(){var n=1,t="0000000000";for(h("xref"),h("0 "+(st+1)),h("0000000000 65535 f "),n=1;n<=st;n++)"function"==typeof ct[n]?h((t+ct[n]()).slice(-10)+" 00000 n "):void 0!==ct[n]?h((t+ct[n]).slice(-10)+" 00000 n "):h("0000000000 00000 n ")},rr=s.__private__.buildDocument=function(){pt=!1;wt=st=0;wi=[];ct=[];si=[];hi=ot();ki=ot();g.publish("buildDocument");gu();vu(),function(){var n,t;for(g.publish("putAdditionalObjects"),n=0;n<si.length;n++)t=si[n],lt(t.objId,!0),h(t.content),h("endobj");g.publish("postPutAdditionalObjects")}();yu();bu();ku();var n=wt;return nf(),du(),h("startxref"),h(""+n),h("%%EOF"),pt=!0,wi.join("\n")},ci=s.__private__.getBlob=function(n){return new Blob([ar(n)],{type:"application/pdf"})},tf=s.output=s.__private__.output=((ei=function(t,i){var r,f,u;i=i||{};r=rr();switch("string"==typeof i?i={filename:i}:i.filename=i.filename||"generated.pdf",t){case void 0:return r;case"save":s.save(i.filename);break;case"arraybuffer":return ar(r);case"blob":return ci(r);case"bloburi":case"bloburl":if(void 0!==n.URL&&"function"==typeof n.URL.createObjectURL)return n.URL&&n.URL.createObjectURL(ci(r))||void 0;console.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":return"data:application/pdf;filename="+i.filename+";base64,"+btoa(r);case"dataurlnewwindow":if(f='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  <\/style><body><iframe src="'+this.output("datauristring")+'"><\/iframe><\/body><\/html>',u=n.open(),null!==u&&u.document.write(f),u||"undefined"==typeof safari)return u;case"datauri":case"dataurl":return n.document.location.href="data:application/pdf;filename="+i.filename+";base64,"+btoa(r);default:return null}}).foo=function(){var t,i;try{return ei.apply(this,arguments)}catch(r){if(t=r.stack||"",~t.indexOf(" at ")&&(t=t.split(" at ")[1]),i="Error in function "+t.split("\n")[0].split("<")[0]+": "+r.message,!n.console)throw new Error(i);n.console.error(i,r);n.alert&&alert(i)}},(ei.foo.bar=ei).foo),kr=function(n){return!0===Array.isArray(vr)&&-1<vr.indexOf(n)};switch(f){case"pt":y=1;break;case"mm":y=72/25.4;break;case"cm":y=72/2.54;break;case"in":y=72;break;case"px":y=1==kr("px_scaling")?.75:96/72;break;case"pc":case"em":y=12;break;case"ex":y=6;break;default:throw new Error("Invalid unit: "+f);}lr();cr();var dr=s.__private__.getPageInfo=function(n){if(isNaN(n)||n%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:a[n].objId,pageNumber:n,pageContext:a[n]}},rf=s.__private__.getPageInfoByObjId=function(n){for(var t in a)if(a[t].objId===n)break;if(isNaN(n)||n%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");return dr(t)},uf=s.__private__.getCurrentPageInfo=function(){return{objId:a[v].objId,pageNumber:v,pageContext:a[v]}};s.addPage=function(){return wr.apply(this,arguments),this};s.setPage=function(){return br.apply(this,arguments),this};s.insertPage=function(n){return this.addPage(),this.movePage(v,n),this};s.movePage=function(n,t){if(t<n){for(var r=it[n],u=a[n],i=n;t<i;i--)it[i]=it[i-1],a[i]=a[i-1];it[t]=r;a[t]=u;this.setPage(t)}else if(n<t){for(r=it[n],u=a[n],i=n;i<t;i++)it[i]=it[i+1],a[i]=a[i+1];it[t]=r;a[t]=u;this.setPage(t)}return this};s.deletePage=function(){return function(n){0<n&&n<=et&&(it.splice(n,1),--et<v&&(v=et),this.setPage(v))}.apply(this,arguments),this};s.__private__.text=s.text=function(n,t,r,u){function yi(n){for(var t,r=n.concat(),i=[],u=r.length;u--;)"string"==typeof(t=r.shift())?i.push(t):Array.isArray(n)&&1===t.length?i.push(t[0]):i.push([t[0],t[1],t[2]]);return i}function pi(n,t){var u;if("string"==typeof n)u=t(n)[0];else if(Array.isArray(n)){for(var i,r,e=n.concat(),f=[],o=e.length;o--;)"string"==typeof(i=e.shift())?f.push(t(i)[0]):Array.isArray(i)&&"string"===i[0]&&(r=t(i[0],i[1],i[2]),f.push([r[0],r[1],r[2]]));u=f}return u}var ai,wt,ui,ei,ht,ct,it,rt,bt,oi,si,ki,et,a,tt,li,lt,f,ni,ii,at,yt,ot,ri;"number"==typeof n&&"number"==typeof t&&("string"==typeof r||Array.isArray(r))&&(ai=r,r=t,t=n,n=ai);var o=arguments[3],v=arguments[4],d=arguments[5];if("object"===i(o)&&null!==o||("string"==typeof v&&(d=v,v=null),"string"==typeof o&&(d=o,o=null),"number"==typeof o&&(v=o,o=null),u={flags:o,angle:v,align:d}),(o=o||{}).noBOM=o.noBOM||!0,o.autoencode=o.autoencode||!0,isNaN(t)||isNaN(r)||null==n)throw new Error("Invalid arguments passed to jsPDF.text");if(0===n.length)return y;var st,pt="",vi="number"==typeof u.lineHeightFactor?u.lineHeightFactor:vt,y=u.scope||this;if(wt=!1,ui=!0,"string"==typeof n)wt=!0;else if(Array.isArray(n)){for(var fi,wi=n.concat(),e=[],s=wi.length;s--;)("string"!=typeof(fi=wi.shift())||Array.isArray(fi)&&"string"!=typeof fi[0])&&(ui=!1);wt=ui}if(!1===wt)throw new Error('Type of text must be string or Array. "'+n+'" is not recognized.');ei=b[nt].encoding;"WinAnsiEncoding"!==ei&&"StandardEncoding"!==ei||(n=pi(n,function(n,t,i){return[(r=n,r=r.split("\t").join(Array(u.TabLen||9).join(" ")),kt(r,o)),t,i];var r}));"string"==typeof n&&(n=n.match(/[\r?\n]/)?n.split(/\r\n|\r|\n/g):[n]);ht=ut/y.internal.scaleFactor;ct=ht*(vt-1);switch(u.baseline){case"bottom":r-=ct;break;case"top":r+=ht-ct;break;case"hanging":r+=ht-2*ct;break;case"middle":r+=ht/2-ct}0<(ft=u.maxWidth||0)&&("string"==typeof n?n=y.splitTextToSize(n,ft):"[object Array]"===Object.prototype.toString.call(n)&&(n=y.splitTextToSize(n.join(" "),ft)));it={text:n,x:t,y:r,options:u,mutex:{pdfEscape:kt,activeFontKey:nt,fonts:b,activeFontSize:ut}};g.publish("preProcessText",it);n=it.text;v=(u=it.options).angle;rt=y.internal.scaleFactor;bt=[];v&&(v*=Math.PI/180,oi=Math.cos(v),si=Math.sin(v),bt=[c(oi),c(si),c(-1*si),c(oi)]);void 0!==(ci=u.charSpace)&&(pt+=k(ci*rt)+" Tc\n");u.lang;var l=-1,di=void 0!==u.renderingMode?u.renderingMode:u.stroke,hi=y.internal.getCurrentPageInfo().pageContext;switch(di){case 0:case!1:case"fill":l=0;break;case 1:case!0:case"stroke":l=1;break;case 2:case"fillThenStroke":l=2;break;case 3:case"invisible":l=3;break;case 4:case"fillAndAddForClipping":l=4;break;case 5:case"strokeAndAddPathForClipping":l=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":l=6;break;case 7:case"addToPathForClipping":l=7}ki=void 0!==hi.usedRenderingMode?hi.usedRenderingMode:-1;-1!==l?pt+=l+" Tr\n":-1!==ki&&(pt+="0 Tr\n");-1!==l&&(hi.usedRenderingMode=l);d=u.align||"left";var dt=ut*vi,gi=y.internal.pageSize.getWidth(),nr=(rt=y.internal.scaleFactor,b[nt]),ci=u.charSpace||er,ft=u.maxWidth||0,gt=(o={},[]);if("[object Array]"===Object.prototype.toString.call(n))if(e=yi(n),"left"!==d&&(a=e.map(function(n){return y.getStringUnitWidth(n,{font:nr,charSpace:ci,fontSize:ut})*ut/rt})),li=Math.max.apply(Math,a),lt=0,"right"===d)for(t-=a[0],n=[],f=0,s=e.length;f<s;f++)li-a[f],et=0===f?(tt=p(t),w(r)):(tt=(lt-a[f])*rt,-dt),n.push([e[f],tt,et]),lt=a[f];else if("center"===d)for(t-=a[0]/2,n=[],f=0,s=e.length;f<s;f++)(li-a[f])/2,et=0===f?(tt=p(t),w(r)):(tt=(lt-a[f])/2*rt,-dt),n.push([e[f],tt,et]),lt=a[f];else if("left"===d)for(n=[],f=0,s=e.length;f<s;f++)et=0===f?w(r):-dt,tt=0===f?p(t):0,n.push(e[f]);else{if("justify"!==d)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(n=[],ft=0!==ft?ft:gi,f=0,s=e.length;f<s;f++)et=0===f?w(r):-dt,tt=0===f?p(t):0,f<s-1&&gt.push(((ft-a[f])/(e[f].split(" ").length-1)*rt).toFixed(2)),n.push([e[f],tt,et])}for(!0===("boolean"==typeof u.R2L?u.R2L:bi)&&(n=pi(n,function(n,t,i){return[n.split("").reverse().join(""),t,i]})),it={text:n,x:t,y:r,options:u,mutex:{pdfEscape:kt,activeFontKey:nt,fonts:b,activeFontSize:ut}},g.publish("postProcessText",it),n=it.text,st=it.mutex.isHex,e=yi(n),n=[],yt=0,ot=(s=e.length,""),f=0;f<s;f++)ot="",Array.isArray(e[f])?(ni=parseFloat(e[f][1]),ii=parseFloat(e[f][2]),at=(st?"<":"(")+e[f][0]+(st?">":")"),yt=1):(ni=p(t),ii=w(r),at=(st?"<":"(")+e[f]+(st?">":")")),void 0!==gt&&void 0!==gt[f]&&(ot=gt[f]+" Tw\n"),0!==bt.length&&0===f?n.push(ot+bt.join(" ")+" "+ni.toFixed(2)+" "+ii.toFixed(2)+" Tm\n"+at):1===yt||0===yt&&0===f?n.push(ot+ni.toFixed(2)+" "+ii.toFixed(2)+" Td\n"+at):n.push(ot+at);return n=0===yt?n.join(" Tj\nT* "):n.join(" Tj\n"),n+=" Tj\n",ri="BT\n/"+nt+" "+ut+" Tf\n"+(ut*vi).toFixed(2)+" TL\n"+fr+"\n",ri+=pt,ri+=n,h(ri+="ET"),ti[nt]=!0,y};s.__private__.lstext=s.lstext=function(n,t,i,r){return console.warn("jsPDF.lstext is deprecated"),this.text(n,t,i,{charSpace:r})};s.__private__.clip=s.clip=function(n){h("evenodd"===n?"W*":"W");h("n")};s.__private__.clip_fixed=s.clip_fixed=function(n){console.log("clip_fixed is deprecated");s.clip(n)};at=s.__private__.isValidStyle=function(n){var t=!1;return-1!==[void 0,null,"S","F","DF","FD","f","f*","B","B*"].indexOf(n)&&(t=!0),t};dt=s.__private__.getStyle=function(n){var t="S";return"F"===n?t="f":"FD"===n||"DF"===n?t="B":"f"!==n&&"f*"!==n&&"B"!==n&&"B*"!==n||(t=n),t};s.__private__.line=s.line=function(n,t,i,r){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.line");return this.lines([[i-n,r-t]],n,t)};s.__private__.lines=s.lines=function(n,t,i,r,u,f){var c,l,a,v,e,y,b,d,g,o,s,nt;if("number"==typeof n&&(nt=i,i=t,t=n,n=nt),r=r||[1,1],f=f||!1,isNaN(t)||isNaN(i)||!Array.isArray(n)||!Array.isArray(r)||!at(u)||"boolean"!=typeof f)throw new Error("Invalid arguments passed to jsPDF.lines");for(h(k(p(t))+" "+k(w(i))+" m "),c=r[0],l=r[1],v=n.length,o=t,s=i,a=0;a<v;a++)2===(e=n[a]).length?(o=e[0]*c+o,s=e[1]*l+s,h(k(p(o))+" "+k(w(s))+" l")):(y=e[0]*c+o,b=e[1]*l+s,d=e[2]*c+o,g=e[3]*l+s,o=e[4]*c+o,s=e[5]*l+s,h(k(p(y))+" "+k(w(b))+" "+k(p(d))+" "+k(w(g))+" "+k(p(o))+" "+k(w(s))+" c"));return f&&h(" h"),null!==u&&h(dt(u)),this};s.__private__.rect=s.rect=function(n,t,i,r,u){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r)||!at(u))throw new Error("Invalid arguments passed to jsPDF.rect");return h([c(p(n)),c(w(t)),c(i*y),c(-r*y),"re"].join(" ")),null!==u&&h(dt(u)),this};s.__private__.triangle=s.triangle=function(n,t,i,r,u,f,e){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r)||isNaN(u)||isNaN(f)||!at(e))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[i-n,r-t],[u-i,f-r],[n-u,t-f]],n,t,[1,1],e,!0),this};s.__private__.roundedRect=s.roundedRect=function(n,t,i,r,u,f,e){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r)||isNaN(u)||isNaN(f)||!at(e))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var o=4/3*(Math.SQRT2-1);return this.lines([[i-2*u,0],[u*o,0,u,f-f*o,u,f],[0,r-2*f],[0,f*o,-u*o,f,-u,f],[2*u-i,0],[-u*o,0,-u,-f*o,-u,-f],[0,2*f-r],[0,-f*o,u*o,-f,u,-f]],n+u,t,[1,1],e),this};s.__private__.ellipse=s.ellipse=function(n,t,i,r,u){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r)||!at(u))throw new Error("Invalid arguments passed to jsPDF.ellipse");var f=4/3*(Math.SQRT2-1)*i,e=4/3*(Math.SQRT2-1)*r;return h([c(p(n+i)),c(w(t)),"m",c(p(n+i)),c(w(t-e)),c(p(n+f)),c(w(t-r)),c(p(n)),c(w(t-r)),"c"].join(" ")),h([c(p(n-f)),c(w(t-r)),c(p(n-i)),c(w(t-e)),c(p(n-i)),c(w(t)),"c"].join(" ")),h([c(p(n-i)),c(w(t+e)),c(p(n-f)),c(w(t+r)),c(p(n)),c(w(t+r)),"c"].join(" ")),h([c(p(n+f)),c(w(t+r)),c(p(n+i)),c(w(t+e)),c(p(n+i)),c(w(t)),"c"].join(" ")),null!==u&&h(dt(u)),this};s.__private__.circle=s.circle=function(n,t,i,r){if(isNaN(n)||isNaN(t)||isNaN(i)||!at(r))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(n,t,i,i,r)};s.setFont=function(n,t){return nt=ir(n,t,{disableWarning:!1}),this};s.setFontStyle=s.setFontType=function(n){return nt=ir(void 0,n),this};s.__private__.getFontList=s.getFontList=function(){var n,t,i,r={};for(n in tt)if(tt.hasOwnProperty(n))for(t in r[n]=i=[],tt[n])tt[n].hasOwnProperty(t)&&i.push(t);return r};s.addFont=function(n,t,i,r){pr.call(this,n,t,i,r=r||"Identity-H")};var vt,ff=d.lineWidth||.200025,ef=s.__private__.setLineWidth=s.setLineWidth=function(n){return h((n*y).toFixed(2)+" w"),this},gr=(s.__private__.setLineDash=t.API.setLineDash=function(n,t){if(n=n||[],t=t||0,isNaN(t)||!Array.isArray(n))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return n=n.map(function(n){return(n*y).toFixed(3)}).join(" "),t=parseFloat((t*y).toFixed(3)),h("["+n+"] "+t+" d"),this},s.__private__.getLineHeight=s.getLineHeight=function(){return ut*vt}),of=(gr=s.__private__.getLineHeight=s.getLineHeight=function(){return ut*vt},s.__private__.setLineHeightFactor=s.setLineHeightFactor=function(n){return"number"==typeof(n=n||1.15)&&(vt=n),this}),sf=s.__private__.getLineHeightFactor=s.getLineHeightFactor=function(){return vt};of(d.lineHeight);var p=s.__private__.getHorizontalCoordinate=function(n){return n*y},w=s.__private__.getVerticalCoordinate=function(n){return a[v].mediaBox.topRightY-a[v].mediaBox.bottomLeftY-n*y},hf=s.__private__.getHorizontalCoordinateString=function(n){return c(n*y)},cf=s.__private__.getVerticalCoordinateString=function(n){return c(a[v].mediaBox.topRightY-a[v].mediaBox.bottomLeftY-n*y)},li=d.strokeColor||"0 G",ur=(s.__private__.getStrokeColor=s.getDrawColor=function(){return di(li)},s.__private__.setStrokeColor=s.setDrawColor=function(n,t,i,r){return li=gi({ch1:n,ch2:t,ch3:i,ch4:r,pdfColorType:"draw",precision:2}),h(li),this},d.fillColor||"0 g"),fr=(s.__private__.getFillColor=s.getFillColor=function(){return di(ur)},s.__private__.setFillColor=s.setFillColor=function(n,t,i,r){return ur=gi({ch1:n,ch2:t,ch3:i,ch4:r,pdfColorType:"fill",precision:2}),h(ur),this},d.textColor||"0 g"),lf=s.__private__.getTextColor=s.getTextColor=function(){return di(fr)},er=(s.__private__.setTextColor=s.setTextColor=function(n,t,i,r){return fr=gi({ch1:n,ch2:t,ch3:i,ch4:r,pdfColorType:"text",precision:3}),this},d.charSpace||0),af=s.__private__.getCharSpace=s.getCharSpace=function(){return er},or=(s.__private__.setCharSpace=s.setCharSpace=function(n){if(isNaN(n))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return er=n,this},0);s.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2};s.__private__.setLineCap=s.setLineCap=function(n){var t=s.CapJoinStyles[n];if(void 0===t)throw new Error("Line cap style of '"+n+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return h((or=t)+" J"),this};ai=0;s.__private__.setLineJoin=s.setLineJoin=function(n){var t=s.CapJoinStyles[n];if(void 0===t)throw new Error("Line join style of '"+n+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return h((ai=t)+" j"),this};s.__private__.setMiterLimit=s.setMiterLimit=function(n){if(n=n||0,isNaN(n))throw new Error("Invalid argument passed to jsPDF.setMiterLimit");return nu=parseFloat(c(n*y)),h(nu+" M"),this};for(gt in s.save=function(t,i){if(t=t||"generated.pdf",(i=i||{}).returnPromise=i.returnPromise||!1,!1!==i.returnPromise)return new Promise(function(i,r){try{var u=l(ci(rr()),t);"function"==typeof l.unload&&n.setTimeout&&setTimeout(l.unload,911);i(u)}catch(i){r(i.message)}});l(ci(rr()),t);"function"==typeof l.unload&&n.setTimeout&&setTimeout(l.unload,911)},t.API)t.API.hasOwnProperty(gt)&&("events"===gt&&t.API.events.length?function(n,t){for(var u,r,i=t.length-1;-1!==i;i--)u=t[i][0],r=t[i][1],n.subscribe.apply(n,[u].concat("function"==typeof r?[r]:r))}(g,t.API.events):s[gt]=t.API[gt]);return s.internal={pdfEscape:kt,getStyle:dt,getFont:function(){return b[ir.apply(s,arguments)]},getFontSize:ou,getCharSpace:af,getTextColor:lf,getLineHeight:gr,getLineHeightFactor:sf,write:eu,getHorizontalCoordinate:p,getVerticalCoordinate:w,getCoordinateString:hf,getVerticalCoordinateString:cf,collections:{},newObject:bt,newAdditionalObject:lu,newObjectDeferred:ot,newObjectDeferredBegin:lt,getFilters:nr,putStream:tr,events:g,scaleFactor:y,pageSize:{getWidth:function(){return(a[v].mediaBox.topRightX-a[v].mediaBox.bottomLeftX)/y},setWidth:function(n){a[v].mediaBox.topRightX=n*y+a[v].mediaBox.bottomLeftX},getHeight:function(){return(a[v].mediaBox.topRightY-a[v].mediaBox.bottomLeftY)/y},setHeight:function(n){a[v].mediaBox.topRightY=n*y+a[v].mediaBox.bottomLeftY}},output:tf,getNumberOfPages:wu,pages:it,out:h,f2:c,f3:k,getPageInfo:dr,getPageInfoByObjId:rf,getCurrentPageInfo:uf,getPDFVersion:tu,hasHotfix:kr},Object.defineProperty(s.internal.pageSize,"width",{get:function(){return(a[v].mediaBox.topRightX-a[v].mediaBox.bottomLeftX)/y},set:function(n){a[v].mediaBox.topRightX=n*y+a[v].mediaBox.bottomLeftX},enumerable:!0,configurable:!0}),Object.defineProperty(s.internal.pageSize,"height",{get:function(){return(a[v].mediaBox.topRightY-a[v].mediaBox.bottomLeftY)/y},set:function(n){a[v].mediaBox.topRightY=n*y+a[v].mediaBox.bottomLeftY},enumerable:!0,configurable:!0}),function(n){for(var i,r,t=0,u=oi.length;t<u;t++)i=pr(n[t][0],n[t][1],n[t][2],oi[t][3],!0),ti[i]=!0,r=n[t][0].split("-"),yr(i,r[0],r[1]||"");g.publish("addFonts",{fonts:b,dictionary:tt})}(oi),nt="F1",wr(e,u),g.publish("initialized"),s}return t.API={events:[]},t.version="1.5.3","function"==typeof define&&define.amd?define("jsPDF",function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t,module.exports.jsPDF=t):n.jsPDF=t,t}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")()),function(n,t){var u,ct=1,ht=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},nt=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},f=function(n){if(isNaN(n))throw new Error("Invalid argument passed to jsPDF.f2");return n.toFixed(2)},p=function(n){if(isNaN(n))throw new Error("Invalid argument passed to jsPDF.f2");return n.toFixed(5)},vt,yt,l,b,k,d,rt,h,ut,g,ft,et,y,ot,r,st;n.__acroform__={};var c=function(n,t){n.prototype=Object.create(t.prototype);n.prototype.constructor=n},w=function(n){return n*ct},tt=function(n){return n/ct},a=function(n){var t=new vt,i=r.internal.getHeight(n)||0,u=r.internal.getWidth(n)||0;return t.BBox=[0,0,Number(f(u)),Number(f(i))],t},bt=n.__acroform__.setBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<<t},kt=n.__acroform__.clearBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return n&~(1<<t)},dt=n.__acroform__.getBit=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(n&1<<t)?0:1},e=n.__acroform__.getBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return dt(n,t-1)},o=n.__acroform__.setBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return bt(n,t-1)},s=n.__acroform__.clearBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return kt(n,t-1)},gt=n.__acroform__.calculateCoordinates=function(n){var i=this.internal.getHorizontalCoordinate,r=this.internal.getVerticalCoordinate,u=n[0],e=n[1],o=n[2],s=n[3],t={};return t.lowerLeft_X=i(u)||0,t.lowerLeft_Y=r(e+s)||0,t.upperRight_X=i(u+o)||0,t.upperRight_Y=r(e)||0,[Number(f(t.lowerLeft_X)),Number(f(t.lowerLeft_Y)),Number(f(t.upperRight_X)),Number(f(t.upperRight_Y))]},ni=function(n){var i;if(n.appearanceStreamContent)return n.appearanceStreamContent;if(n.V||n.DV){var t=[],e=n.V||n.DV,r=lt(n,e),o=u.internal.getFont(n.fontName,n.fontStyle).id;return t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(u.__private__.encodeColorString(n.color)),t.push("/"+o+" "+f(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC"),i=new a(n),i.stream=t.join("\n"),i}},lt=function(n,t){var ft=n.maxFontSize||12,d=(n.fontName,{text:"",fontSize:""}),h=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" "),i=(u.__private__.encodeColorString(n.color),ft),c=r.internal.getHeight(n)||0,s,tt,e,p,v,w,nt,b,o,k;c=c<0?-c:c;s=r.internal.getWidth(n)||0;s=s<0?-s:s;tt=function(t,i,r){if(t+1<h.length){var u=i+" "+h[t+1];return it(u,n,r).width<=s-4}return!1};i++;n:for(;;){t="";var g=it("3",n,--i).height,et=n.multiline?c-i:(c-g)/2,a=-2,rt=et+=2,ut=0,y=0,l=0;if(i<=0){t="(...) Tj\n";t+="% Width of Text: "+it(t,n,i=12).width+", FieldWidth:"+s+"\n";break}l=it(h[0]+" ",n,i).width;e="";p=0;for(v in h)if(h.hasOwnProperty(v)){if(e=" "==(e+=h[v]+" ").substr(e.length-1)?e.substr(0,e.length-1):e,w=parseInt(v),l=it(e+" ",n,i).width,nt=tt(w,e,i),b=v>=h.length-1,nt&&!b){e+=" ";continue}if(nt||b){if(b)y=w;else if(n.multiline&&c<(g+2)*(p+2)+2)continue n}else{if(!n.multiline)continue n;if(c<(g+2)*(p+2)+2)continue n;y=w}for(o="",k=ut;k<=y;k++)o+=h[k]+" ";switch(o=" "==o.substr(o.length-1)?o.substr(0,o.length-1):o,l=it(o,n,i).width,n.textAlign){case"right":a=s-l-2;break;case"center":a=(s-l)/2;break;case"left":default:a=2}t+=f(a)+" "+f(rt)+" Td\n";t+="("+ht(o)+") Tj\n";t+=-f(a)+" 0 Td\n";rt=-(i+2);l=0;ut=y+1;p++;e=""}break}return d.text=t,d.fontSize=i,d},it=function(n,t,i){var r=u.internal.getFont(t.fontName,t.fontStyle),f=u.getStringUnitWidth(n,{font:r,fontSize:parseFloat(i),charSpace:0})*parseFloat(i);return{height:u.getStringUnitWidth("3",{font:r,fontSize:parseFloat(i),charSpace:0})*parseFloat(i)*1.5,width:f}},ti={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},ii=function(){var n,i,t;u.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;n=u.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(i in n)n.hasOwnProperty(i)&&(t=n[i],t.objId=void 0,t.hasAnnotation&&ri.call(u,t))},ri=function(n){var t={type:"reference",object:n};void 0===u.internal.getPageInfo(n.page).pageContext.annotations.find(function(n){return n.type===t.type&&n.object===t.object})&&u.internal.getPageInfo(n.page).pageContext.annotations.push(t)},ui=function(){if(void 0===u.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");u.internal.write("/AcroForm "+u.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},fi=function(){u.internal.events.unsubscribe(u.internal.acroformPlugin.acroFormDictionaryRoot._eventID);delete u.internal.acroformPlugin.acroFormDictionaryRoot._eventID;u.internal.acroformPlugin.printedOut=!0},ei=function(n){var a=!n,l,o,c,s,e,f;n||(u.internal.newObjectDeferredBegin(u.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),u.internal.acroformPlugin.acroFormDictionaryRoot.putStream());n=n||u.internal.acroformPlugin.acroFormDictionaryRoot.Kids;for(e in n)if(n.hasOwnProperty(e)){var t=n[e],h=[],v=t.Rect;if((t.Rect&&(t.Rect=gt.call(this,t.Rect)),u.internal.newObjectDeferredBegin(t.objId,!0),t.DA=r.createDefaultAppearanceStream(t),"object"===i(t)&&"function"==typeof t.getKeyValueListForStream&&(h=t.getKeyValueListForStream()),t.Rect=v,t.hasAppearanceStream&&!t.appearanceStreamContent)&&(l=ni.call(this,t),h.push({key:"AP",value:"<<\/N "+l+">>"}),u.internal.acroformPlugin.xForms.push(l)),t.appearanceStreamContent){o="";for(c in t.appearanceStreamContent)if(t.appearanceStreamContent.hasOwnProperty(c)){if(s=t.appearanceStreamContent[c],o+="/"+c+" ",o+="<<",1<=Object.keys(s).length||Array.isArray(s))for(e in s)s.hasOwnProperty(e)&&("function"==typeof(f=s[e])&&(f=f.call(this,t)),o+="/"+e+" "+f+" ",0<=u.internal.acroformPlugin.xForms.indexOf(f)||u.internal.acroformPlugin.xForms.push(f));else"function"==typeof(f=s)&&(f=f.call(this,t)),o+="/"+e+" "+f,0<=u.internal.acroformPlugin.xForms.indexOf(f)||u.internal.acroformPlugin.xForms.push(f);o+=">>"}h.push({key:"AP",value:"<<\n"+o+">>"})}u.internal.putStream({additionalKeyValues:h});u.internal.out("endobj")}a&&oi.call(this,u.internal.acroformPlugin.xForms)},oi=function(n){var r,f,t;for(r in n)n.hasOwnProperty(r)&&(f=r,t=n[r],u.internal.newObjectDeferredBegin(t&&t.objId,!0),"object"===i(t)&&"function"==typeof t.putStream&&t.putStream(),delete n[f])},pt=function(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(u=this,l.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(ti)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");ct=u.internal.scaleFactor;u.internal.acroformPlugin.acroFormDictionaryRoot=new yt;u.internal.acroformPlugin.acroFormDictionaryRoot._eventID=u.internal.events.subscribe("postPutResources",fi);u.internal.events.subscribe("buildDocument",ii);u.internal.events.subscribe("putCatalog",ui);u.internal.events.subscribe("postPutPages",ei);u.internal.acroformPlugin.isInitialized=!0}},wt=n.__acroform__.arrayToPdfArray=function(n){if(Array.isArray(n)){for(var r="[",t=0;t<n.length;t++)switch(0!==t&&(r+=" "),i(n[t])){case"boolean":case"number":case"object":r+=n[t].toString();break;case"string":r+="/"!==n[t].substr(0,1)?"("+ht(n[t].toString())+")":n[t].toString()}return r+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray");},at=function(n){return(n=n||"").toString(),n="("+ht(n)+")"},v=function(){var n;Object.defineProperty(this,"objId",{configurable:!0,get:function(){if(n||(n=u.internal.newObjectDeferred()),!n)throw new Error("AcroFormPDFObject: Couldn't create Object ID");return n},set:function(t){n=t}})};v.prototype.toString=function(){return this.objId+" 0 R"};v.prototype.putStream=function(){var n=this.getKeyValueListForStream();u.internal.putStream({data:this.stream,additionalKeyValues:n});u.internal.out("endobj")};v.prototype.getKeyValueListForStream=function(){return function(n){var r=[],u=Object.getOwnPropertyNames(n).filter(function(n){return"content"!=n&&"appearanceStreamContent"!=n&&"_"!=n.substring(0,1)}),f,i,t;for(f in u)!1===Object.getOwnPropertyDescriptor(n,u[f]).configurable&&(i=u[f],t=n[i],t&&(Array.isArray(t)?r.push({key:i,value:wt(t)}):t instanceof v?r.push({key:i,value:t.objId+" 0 R"}):"function"!=typeof t&&r.push({key:i,value:t})));return r}(this)};vt=function(){v.call(this);Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writeable:!0});Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writeable:!0});Object.defineProperty(this,"FormType",{value:1,configurable:!1,writeable:!0});var n,t=[];Object.defineProperty(this,"BBox",{configurable:!1,writeable:!0,get:function(){return t},set:function(n){t=n}});Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writeable:!0});Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){n=t.trim()},get:function(){return n||null}})};c(vt,v);yt=function(){v.call(this);var n,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){if(0<t.length)return t}});Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}});Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(n)return"("+n+")"},set:function(t){n=t}})};c(yt,v);l=function n(){var c,a,t,p,u,b,k,d,g,it,l,i,r,rt,ut,f;v.call(this);c=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return c},set:function(n){if(isNaN(n))throw new Error('Invalid value "'+n+'" for attribute F supplied.');c=n}});Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(c,3))},set:function(n){this.F=!0===Boolean(n)?o(c,3):s(c,3)}});a=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return a},set:function(n){if(isNaN(n))throw new Error('Invalid value "'+n+'" for attribute Ff supplied.');a=n}});t=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==t.length)return t},set:function(n){t=void 0!==n?n:[]}});Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!t||isNaN(t[0])?0:tt(t[0])},set:function(n){t[0]=w(n)}});Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!t||isNaN(t[1])?0:tt(t[1])},set:function(n){t[1]=w(n)}});Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!t||isNaN(t[2])?0:tt(t[2])},set:function(n){t[2]=w(n)}});Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!t||isNaN(t[3])?0:tt(t[3])},set:function(n){t[3]=w(n)}});p="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return p},set:function(n){switch(n){case"/Btn":case"/Tx":case"/Ch":case"/Sig":p=n;break;default:throw new Error('Invalid value "'+n+'" for attribute FT supplied.');}}});u=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!u||u.length<1){if(this instanceof ft)return;u="FieldObject"+n.FieldNum++}return"("+ht(u)+")"},set:function(n){u=n.toString()}});Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return u},set:function(n){u=n}});b="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return b},set:function(n){b=n}});k="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return k},set:function(n){k=n}});d=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return tt(d)},set:function(n){d=w(n)}});g=50;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return tt(g)},set:function(n){g=w(n)}});it="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return it},set:function(n){it=n}});l="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!l||this instanceof ft||this instanceof y))return at(l)},set:function(n){n=n.toString();l=n}});i=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(i)return this instanceof h==!1?at(i):i},set:function(n){n=n.toString();i=this instanceof h==!1?"("===n.substr(0,1)?nt(n.substr(1,n.length-2)):nt(n):n}});Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof h==!0?nt(i.substr(1,i.length-1)):i},set:function(n){n=n.toString();i=this instanceof h==!0?"/"+n:n}});r=null;Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(r)return this instanceof h==!1?at(r):r},set:function(n){n=n.toString();r=this instanceof h==!1?"("===n.substr(0,1)?nt(n.substr(1,n.length-2)):nt(n):n}});Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof h==!0?nt(r.substr(1,r.length-1)):r},set:function(n){n=n.toString();r=this instanceof h==!0?"/"+n:n}});Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}});Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}});Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});ut=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,writeable:!0,get:function(){return ut},set:function(n){n=Boolean(n);ut=n}});Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writeable:!0,get:function(){if(rt)return rt},set:function(n){rt=n}});Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,1))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,1):s(this.Ff,1)}});Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,2))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,2):s(this.Ff,2)}});Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,3))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,3):s(this.Ff,3)}});f=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==f)return f},set:function(n){if(-1===[0,1,2].indexOf(n))throw new Error('Invalid value "'+n+'" for attribute Q supplied.');f=n}});Object.defineProperty(this,"textAlign",{get:function(){var n="left";switch(f){case 0:default:n="left";break;case 1:n="center";break;case 2:n="right"}return n},configurable:!0,enumerable:!0,set:function(n){switch(n){case"right":case 2:f=2;break;case"center":case 1:f=1;break;case"left":case 0:default:f=0}}})};c(l,v);b=function(){var t,n;l.call(this);this.FT="/Ch";this.V="()";this.fontName="zapfdingbats";t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n}});Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(n){t=n}});n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return wt(n)},set:function(t){var r,i;i=[];"string"==typeof(r=t)&&(i=function(n,t,i){i||(i=1);for(var r,u=[];r=t.exec(n);)u.push(r[i]);return u}(r,/\((.*?)\)/g));n=i}});this.getOptions=function(){return n};this.setOptions=function(t){n=t;this.sort&&n.sort()};this.addOption=function(t){t=(t=t||"").toString();n.push(t);this.sort&&n.sort()};this.removeOption=function(t,i){for(i=i||!1,t=(t=t||"").toString();-1!==n.indexOf(t)&&(n.splice(n.indexOf(t),1),!1!==i););};Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,18))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,18):s(this.Ff,18)}});Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,19))},set:function(n){!0===this.combo&&(this.Ff=!0===Boolean(n)?o(this.Ff,19):s(this.Ff,19))}});Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=o(this.Ff,20),n.sort()):this.Ff=s(this.Ff,20)}});Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,22))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,22):s(this.Ff,22)}});Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,23))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,23):s(this.Ff,23)}});Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,27))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,27):s(this.Ff,27)}});this.hasAppearanceStream=!1};c(b,l);k=function(){b.call(this);this.fontName="helvetica";this.combo=!1};c(k,b);d=function(){k.call(this);this.combo=!0};c(d,k);rt=function(){d.call(this);this.edit=!0};c(rt,d);h=function(){l.call(this);this.FT="/Btn";Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,15))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,15):s(this.Ff,15)}});Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,16))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,16):s(this.Ff,16)}});Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,17))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,17):s(this.Ff,17)}});Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,26))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,26):s(this.Ff,26)}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){if(0!==Object.keys(n).length){var i,t=[];for(i in t.push("<<"),n)t.push("/"+i+" ("+n[i]+")");return t.push(">>"),t.join("\n")}},set:function(t){"object"===i(t)&&(n=t)}});Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}});Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(n){t=n}});Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(n){t="/"+n}})};c(h,l);ut=function(){h.call(this);this.pushButton=!0};c(ut,h);g=function(){h.call(this);this.radio=!0;this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=void 0!==t?t:[]}})};c(g,h);ft=function(){var u,f,t,n;l.call(this);Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return u},set:function(n){u=n}});Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return f},set:function(n){f=n}});n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i,t=[];for(i in t.push("<<"),n)t.push("/"+i+" ("+n[i]+")");return t.push(">>"),t.join("\n")},set:function(t){"object"===i(t)&&(n=t)}});Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}});Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(n){t=n}});Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(n){t="/"+n}});this.optionName=name;this.caption="l";this.appearanceState="Off";this._AppearanceType=r.RadioButton.Circle;this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(name)};c(ft,l);g.prototype.setAppearance=function(n){var i,t;if(!("createAppearanceStream"in n&&"getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(i in this.Kids)this.Kids.hasOwnProperty(i)&&(t=this.Kids[i],t.appearanceStreamContent=n.createAppearanceStream(t.optionName),t.caption=n.getCA())};g.prototype.createOption=function(n){this.Kids.length;var t=new ft;return t.Parent=this,t.optionName=n,this.Kids.push(t),st.call(this,t),t};et=function(){h.call(this);this.fontName="zapfdingbats";this.caption="3";this.appearanceState="On";this.value="On";this.textAlign="center";this.appearanceStreamContent=r.CheckBox.createAppearanceStream()};c(et,h);y=function(){l.call(this);this.FT="/Tx";Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,13))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,13):s(this.Ff,13)}});Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,21))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,21):s(this.Ff,21)}});Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,23))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,23):s(this.Ff,23)}});Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,24))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,24):s(this.Ff,24)}});Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,25))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,25):s(this.Ff,25)}});Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,26))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,26):s(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}});Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){Number.isInteger(t)&&(n=t)}});Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};c(y,l);ot=function(){y.call(this);Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(e(this.Ff,14))},set:function(n){this.Ff=!0===Boolean(n)?o(this.Ff,14):s(this.Ff,14)}});this.password=!0};c(ot,y);r={CheckBox:{createAppearanceStream:function(){return{N:{On:r.CheckBox.YesNormal},D:{On:r.CheckBox.YesPushDown,Off:r.CheckBox.OffPushDown}}},YesPushDown:function(n){var i=a(n),t=[],o=u.internal.getFont(n.fontName,n.fontStyle).id,s=u.__private__.encodeColorString(n.color),e=lt(n,n.caption);return t.push("0.749023 g"),t.push("0 0 "+f(r.internal.getWidth(n))+" "+f(r.internal.getHeight(n))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+o+" "+f(e.fontSize)+" Tf "+s),t.push("BT"),t.push(e.text),t.push("ET"),t.push("Q"),t.push("EMC"),i.stream=t.join("\n"),i},YesNormal:function(n){var i=a(n),h=u.internal.getFont(n.fontName,n.fontStyle).id,c=u.__private__.encodeColorString(n.color),t=[],e=r.internal.getHeight(n),o=r.internal.getWidth(n),s=lt(n,n.caption);return t.push("1 g"),t.push("0 0 "+f(o)+" "+f(e)+" re"),t.push("f"),t.push("q"),t.push("0 0 1 rg"),t.push("0 0 "+f(o-1)+" "+f(e-1)+" re"),t.push("W"),t.push("n"),t.push("0 g"),t.push("BT"),t.push("/"+h+" "+f(s.fontSize)+" Tf "+c),t.push(s.text),t.push("ET"),t.push("Q"),i.stream=t.join("\n"),i},OffPushDown:function(n){var i=a(n),t=[];return t.push("0.749023 g"),t.push("0 0 "+f(r.internal.getWidth(n))+" "+f(r.internal.getHeight(n))+" re"),t.push("f"),i.stream=t.join("\n"),i}},RadioButton:{Circle:{createAppearanceStream:function(n){var t={D:{Off:r.RadioButton.Circle.OffPushDown},N:{}};return t.N[n]=r.RadioButton.Circle.YesNormal,t.D[n]=r.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(n){var f=a(n),i=[],t=r.internal.getWidth(n)<=r.internal.getHeight(n)?r.internal.getWidth(n)/4:r.internal.getHeight(n)/4,e,u;return t=Number((.9*t).toFixed(5)),e=r.internal.Bezier_C,u=Number((t*e).toFixed(5)),i.push("q"),i.push("1 0 0 1 "+p(r.internal.getWidth(n)/2)+" "+p(r.internal.getHeight(n)/2)+" cm"),i.push(t+" 0 m"),i.push(t+" "+u+" "+u+" "+t+" 0 "+t+" c"),i.push("-"+u+" "+t+" -"+t+" "+u+" -"+t+" 0 c"),i.push("-"+t+" -"+u+" -"+u+" -"+t+" 0 -"+t+" c"),i.push(u+" -"+t+" "+t+" -"+u+" "+t+" 0 c"),i.push("f"),i.push("Q"),f.stream=i.join("\n"),f},YesPushDown:function(n){var o=a(n),t=[],i=r.internal.getWidth(n)<=r.internal.getHeight(n)?r.internal.getWidth(n)/4:r.internal.getHeight(n)/4,u=(i=Number((.9*i).toFixed(5)),Number((2*i).toFixed(5))),f=Number((u*r.internal.Bezier_C).toFixed(5)),e=Number((i*r.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+p(r.internal.getWidth(n)/2)+" "+p(r.internal.getHeight(n)/2)+" cm"),t.push(u+" 0 m"),t.push(u+" "+f+" "+f+" "+u+" 0 "+u+" c"),t.push("-"+f+" "+u+" -"+u+" "+f+" -"+u+" 0 c"),t.push("-"+u+" -"+f+" -"+f+" -"+u+" 0 -"+u+" c"),t.push(f+" -"+u+" "+u+" -"+f+" "+u+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+p(r.internal.getWidth(n)/2)+" "+p(r.internal.getHeight(n)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+e+" "+e+" "+i+" 0 "+i+" c"),t.push("-"+e+" "+i+" -"+i+" "+e+" -"+i+" 0 c"),t.push("-"+i+" -"+e+" -"+e+" -"+i+" 0 -"+i+" c"),t.push(e+" -"+i+" "+i+" -"+e+" "+i+" 0 c"),t.push("f"),t.push("Q"),o.stream=t.join("\n"),o},OffPushDown:function(n){var e=a(n),i=[],f=r.internal.getWidth(n)<=r.internal.getHeight(n)?r.internal.getWidth(n)/4:r.internal.getHeight(n)/4,t=(f=Number((.9*f).toFixed(5)),Number((2*f).toFixed(5))),u=Number((t*r.internal.Bezier_C).toFixed(5));return i.push("0.749023 g"),i.push("q"),i.push("1 0 0 1 "+p(r.internal.getWidth(n)/2)+" "+p(r.internal.getHeight(n)/2)+" cm"),i.push(t+" 0 m"),i.push(t+" "+u+" "+u+" "+t+" 0 "+t+" c"),i.push("-"+u+" "+t+" -"+t+" "+u+" -"+t+" 0 c"),i.push("-"+t+" -"+u+" -"+u+" -"+t+" 0 -"+t+" c"),i.push(u+" -"+t+" "+t+" -"+u+" "+t+" 0 c"),i.push("f"),i.push("Q"),e.stream=i.join("\n"),e}},Cross:{createAppearanceStream:function(n){var t={D:{Off:r.RadioButton.Cross.OffPushDown},N:{}};return t.N[n]=r.RadioButton.Cross.YesNormal,t.D[n]=r.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(n){var u=a(n),t=[],i=r.internal.calculateCross(n);return t.push("q"),t.push("1 1 "+f(r.internal.getWidth(n)-2)+" "+f(r.internal.getHeight(n)-2)+" re"),t.push("W"),t.push("n"),t.push(f(i.x1.x)+" "+f(i.x1.y)+" m"),t.push(f(i.x2.x)+" "+f(i.x2.y)+" l"),t.push(f(i.x4.x)+" "+f(i.x4.y)+" m"),t.push(f(i.x3.x)+" "+f(i.x3.y)+" l"),t.push("s"),t.push("Q"),u.stream=t.join("\n"),u},YesPushDown:function(n){var u=a(n),i=r.internal.calculateCross(n),t=[];return t.push("0.749023 g"),t.push("0 0 "+f(r.internal.getWidth(n))+" "+f(r.internal.getHeight(n))+" re"),t.push("f"),t.push("q"),t.push("1 1 "+f(r.internal.getWidth(n)-2)+" "+f(r.internal.getHeight(n)-2)+" re"),t.push("W"),t.push("n"),t.push(f(i.x1.x)+" "+f(i.x1.y)+" m"),t.push(f(i.x2.x)+" "+f(i.x2.y)+" l"),t.push(f(i.x4.x)+" "+f(i.x4.y)+" m"),t.push(f(i.x3.x)+" "+f(i.x3.y)+" l"),t.push("s"),t.push("Q"),u.stream=t.join("\n"),u},OffPushDown:function(n){var i=a(n),t=[];return t.push("0.749023 g"),t.push("0 0 "+f(r.internal.getWidth(n))+" "+f(r.internal.getHeight(n))+" re"),t.push("f"),i.stream=t.join("\n"),i}}},createDefaultAppearanceStream:function(n){var t=u.internal.getFont(n.fontName,n.fontStyle).id,i=u.__private__.encodeColorString(n.color);return"/"+t+" "+n.fontSize+" Tf "+i}};r.internal={Bezier_C:.551915024494,calculateCross:function(n){var i=r.internal.getWidth(n),u=r.internal.getHeight(n),t=Math.min(i,u);return{x1:{x:(i-t)/2,y:(u-t)/2+t},x2:{x:(i-t)/2+t,y:(u-t)/2},x3:{x:(i-t)/2,y:(u-t)/2},x4:{x:(i-t)/2+t,y:(u-t)/2+t}}}};r.internal.getWidth=function(n){var t=0;return"object"===i(n)&&(t=w(n.Rect[2])),t};r.internal.getHeight=function(n){var t=0;return"object"===i(n)&&(t=w(n.Rect[3])),t};st=n.addField=function(n){if(pt.call(this),!(n instanceof l))throw new Error("Invalid argument passed to jsPDF.addField.");return function(n){u.internal.acroformPlugin.printedOut&&(u.internal.acroformPlugin.printedOut=!1,u.internal.acroformPlugin.acroFormDictionaryRoot=null);u.internal.acroformPlugin.acroFormDictionaryRoot||pt.call(u);u.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n)}.call(this,n),n.page=u.internal.getCurrentPageInfo().pageNumber,this};n.addButton=function(n){if(n instanceof h==!1)throw new Error("Invalid argument passed to jsPDF.addButton.");return st.call(this,n)};n.addTextField=function(n){if(n instanceof y==!1)throw new Error("Invalid argument passed to jsPDF.addTextField.");return st.call(this,n)};n.addChoiceField=function(n){if(n instanceof b==!1)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return st.call(this,n)};"object"==i(t)&&void 0===t.ChoiceField&&void 0===t.ListBox&&void 0===t.ComboBox&&void 0===t.EditBox&&void 0===t.Button&&void 0===t.PushButton&&void 0===t.RadioButton&&void 0===t.CheckBox&&void 0===t.TextField&&void 0===t.PasswordField?(t.ChoiceField=b,t.ListBox=k,t.ComboBox=d,t.EditBox=rt,t.Button=h,t.PushButton=ut,t.RadioButton=g,t.CheckBox=et,t.TextField=y,t.PasswordField=ot,t.AcroForm={Appearance:r}):console.warn("AcroForm-Classes are not populated into global-namespace, because the class-Names exist already.");n.AcroFormChoiceField=b;n.AcroFormListBox=k;n.AcroFormComboBox=d;n.AcroFormEditBox=rt;n.AcroFormButton=h;n.AcroFormPushButton=ut;n.AcroFormRadioButton=g;n.AcroFormCheckBox=et;n.AcroFormTextField=y;n.AcroFormPasswordField=ot;n.AcroFormAppearance=r;n.AcroForm={ChoiceField:b,ListBox:k,ComboBox:d,EditBox:rt,Button:h,PushButton:ut,RadioButton:g,CheckBox:et,TextField:y,PasswordField:ot,Appearance:r}}((window.tmp=t).API,"undefined"!=typeof window&&window||"undefined"!=typeof global&&global),function(n){var t="addImage_",f={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},h=n.getImageFileTypeByImageData=function(t,i){var r,u,e,s,h,o;i=i||"UNKNOWN";o="UNKNOWN";for(h in n.isArrayBufferView(t)&&(t=n.arrayBufferToBinaryString(t)),f)for(e=f[h],r=0;r<e.length;r+=1){for(s=!0,u=0;u<e[r].length;u+=1)if(void 0!==e[r][u]&&e[r][u]!==t.charCodeAt(u)){s=!1;break}if(!0===s){o=h;break}}return"UNKNOWN"===o&&"UNKNOWN"!==i&&(console.warn('FileType of Image not recognized. Processing image as "'+i+'".'),o=i),o},c=function l(n){for(var t,h,c,f,i=this.internal.newObject(),e=this.internal.write,o=this.internal.putStream,u=this.internal.getFilters();-1!==u.indexOf("FlateEncode");)u.splice(u.indexOf("FlateEncode"),1);if(n.n=i,t=[],t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Image"}),t.push({key:"Width",value:n.w}),t.push({key:"Height",value:n.h}),n.cs===this.color_spaces.INDEXED?t.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(n.pal.length/3-1)+" "+("smask"in n?i+2:i+1)+" 0 R]"}):(t.push({key:"ColorSpace",value:"/"+n.cs}),n.cs===this.color_spaces.DEVICE_CMYK&&t.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),t.push({key:"BitsPerComponent",value:n.bpc}),"dp"in n&&t.push({key:"DecodeParms",value:"<<"+n.dp+">>"}),"trns"in n&&n.trns.constructor==Array){for(var s="",r=0,a=n.trns.length;r<a;r++)s+=n.trns[r]+" "+n.trns[r]+" ";t.push({key:"Mask",value:"["+s+"]"})}"smask"in n&&t.push({key:"SMask",value:i+1+" 0 R"});h=void 0!==n.f?["/"+n.f]:void 0;(o({data:n.data,additionalKeyValues:t,alreadyAppliedFilters:h}),e("endobj"),"smask"in n)&&(c="/Predictor "+n.p+" /Colors 1 /BitsPerComponent "+n.bpc+" /Columns "+n.w,f={w:n.w,h:n.h,cs:"DeviceGray",bpc:n.bpc,dp:c,data:n.smask},"f"in n&&(f.f=n.f),l.call(this,f));n.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),o({data:this.arrayBufferToBinaryString(new Uint8Array(n.pal))}),e("endobj"))},a=function(){var n=this.internal.collections[t+"images"],i;for(i in n)c.call(this,n[i])},v=function(){var n,i=this.internal.collections[t+"images"],u=this.internal.write,r;for(r in i)u("/I"+(n=i[r]).i,n.n,"0","R")},e=function(t){return"function"==typeof n["process"+t.toUpperCase()]},r=function(n){return"object"===i(n)&&1===n.nodeType},o=function(t,i){var u,f,r,e;if("IMG"===t.nodeName&&t.hasAttribute("src")){if(u=""+t.getAttribute("src"),0===u.indexOf("data:image/"))return unescape(u);if(f=n.loadFile(u),void 0!==f)return btoa(f)}if("CANVAS"===t.nodeName)return r=t,t.toDataURL("image/jpeg",1);if((r=document.createElement("canvas")).width=t.clientWidth||t.width,r.height=t.clientHeight||t.height,e=r.getContext("2d"),!e)throw"addImage requires canvas to be supported by browser.";return e.drawImage(t,0,0,r.width,r.height),r.toDataURL("png"==(""+i).toLowerCase()?"image/png":"image/jpeg")},s=function(n,t){var r,i;if(t)for(i in t)if(n===t[i].alias){r=t[i];break}return r},u;n.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};n.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};n.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"};n.sHashCode=function(n){var i,t=0;if(0===(n=n||"").length)return t;for(i=0;i<n.length;i++)t=(t<<5)-t+n.charCodeAt(i),t|=0;return t};n.isString=function(n){return"string"==typeof n};n.validateStringAsBase64=function(n){(n=n||"").toString().trim();var t=!0;return 0===n.length&&(t=!1),n.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+\/]+$/.test(n.substr(0,n.length-2))&&(t=!1),!1===/^[A-Za-z0-9\/][A-Za-z0-9+\/]|[A-Za-z0-9+\/]=|==$/.test(n.substr(-2))&&(t=!1),t};n.extractInfoFromBase64DataURI=function(n){return/^data:([\w]+?\/([\w]+?));\S*;*base64,(.+)$/g.exec(n)};n.extractImageFromDataUrl=function(n){var i=(n=n||"").split("base64,"),r=null,t;return 2===i.length&&(t=/^data:(\w*\/\w*);*(charset=[\w=-]*)*;*$/.exec(i[0]),Array.isArray(t)&&(r={mimeType:t[1],charset:t[2],data:i[1]})),r};n.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};n.isArrayBuffer=function(n){return!!this.supportsArrayBuffer()&&n instanceof ArrayBuffer};n.isArrayBufferView=function(n){return!!this.supportsArrayBuffer()&&"undefined"!=typeof Uint32Array&&(n instanceof Int8Array||n instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&n instanceof Uint8ClampedArray||n instanceof Int16Array||n instanceof Uint16Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Float32Array||n instanceof Float64Array)};n.binaryStringToUint8Array=function(n){for(var i=n.length,r=new Uint8Array(i),t=0;t<i;t++)r[t]=n.charCodeAt(t);return r};n.arrayBufferToBinaryString=function(n){if("function"==typeof atob)return atob(this.arrayBufferToBase64(n))};n.arrayBufferToBase64=function(n){for(var t,f="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(n),s=r.byteLength,o=s%3,e=s-o,u=0;u<e;u+=3)f+=i[(16515072&(t=r[u]<<16|r[u+1]<<8|r[u+2]))>>18]+i[(258048&t)>>12]+i[(4032&t)>>6]+i[63&t];return 1==o?f+=i[(252&(t=r[e]))>>2]+i[(3&t)<<4]+"==":2==o&&(f+=i[(64512&(t=r[e]<<8|r[e+1]))>>10]+i[(1008&t)>>4]+i[(15&t)<<2]+"="),f};n.createImageInfo=function(n,t,i,r,u,f,e,o,s,h,c,l,a){var v={alias:o,w:t,h:i,cs:r,bpc:u,i:e,data:n};return f&&(v.f=f),s&&(v.dp=s),h&&(v.trns=h),c&&(v.pal=c),l&&(v.smask=l),a&&(v.p=a),v};n.addImage=function(u,f,h,c,l,y,p,w,b){var tt="",ft,k,et,g,ot,d,rt,ut,it,st,nt;if("string"!=typeof f&&(ft=y,y=l,l=c,c=h,h=f,f=ft),"object"===i(u)&&!r(u)&&"imageData"in u&&(k=u,u=k.imageData,f=k.format||f||"UNKNOWN",h=k.x||h||0,c=k.y||c||0,l=k.w||l,y=k.h||y,p=k.alias||p,w=k.compression||w,b=k.rotation||k.angle||b),et=this.internal.getFilters(),void 0===w&&-1!==et.indexOf("FlateEncode")&&(w="SLOW"),"string"==typeof u&&(u=unescape(u)),isNaN(h)||isNaN(c))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");if(nt=function(){var n=this.internal.collections[t+"images"];return n||(this.internal.collections[t+"images"]=n={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",v)),n}.call(this),!((g=s(u,nt))||(r(u)&&(u=o(u,f)),(null==(st=p)||0===st.length)&&(p="string"==typeof(it=u)?n.sHashCode(it):n.isArrayBufferView(it)?n.sHashCode(n.arrayBufferToBinaryString(it)):null),g=s(p,nt)))){if(this.isString(u)&&(""!==(tt=this.convertStringToImageData(u))?u=tt:void 0!==(tt=n.loadFile(u))&&(u=tt)),f=this.getImageFileTypeByImageData(u,f),!e(f))throw new Error("addImage does not support files of type '"+f+"', please ensure that a plugin for '"+f+"' support is added.");if(this.supportsArrayBuffer()&&(u instanceof Uint8Array||(ot=u,u=this.binaryStringToUint8Array(u))),!(g=this["process"+f.toUpperCase()](u,(ut=0,(rt=nt)&&(ut=Object.keys?Object.keys(rt).length:function(n){var t=0,i;for(i in n)n.hasOwnProperty(i)&&t++;return t}(rt)),ut),p,((d=w)&&"string"==typeof d&&(d=d.toUpperCase()),d in n.image_compression?d:n.image_compression.NONE),ot)))throw new Error("An unknown error occurred whilst processing the image");}return function(n,t,i,r,u,f,e,o){var c=function(n,t,i){return n||t||(t=n=-96),n<0&&(n=-72*i.w/n/this.internal.scaleFactor),t<0&&(t=-72*i.h/t/this.internal.scaleFactor),0===n&&(n=t*i.w/i.h),0===t&&(t=n*i.h/i.w),[n,t]}.call(this,i,r,u),s=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;if(i=c[0],r=c[1],e[f]=u,o){o*=Math.PI/180;var a=Math.cos(o),v=Math.sin(o),h=function(n){return n.toFixed(4)},y=[h(a),h(v),h(-1*v),h(a),0,0,"cm"]}this.internal.write("q");o?(this.internal.write([1,"0","0",1,s(n),l(t+r),"cm"].join(" ")),this.internal.write(y.join(" ")),this.internal.write([s(i),"0","0",s(r),"0","0","cm"].join(" "))):this.internal.write([s(i),"0","0",s(r),s(n),l(t+r),"cm"].join(" "));this.internal.write("/I"+u.i+" Do");this.internal.write("Q")}.call(this,h,c,l,y,g,g.i,nt,b),this};n.convertStringToImageData=function(t){var i,r="",u;if(this.isString(t)){i=null!==(u=this.extractImageFromDataUrl(t))?u.data:t;try{r=atob(i)}catch(t){throw n.validateStringAsBase64(i)?new Error("atob-Error in jsPDF.convertStringToImageData "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertStringToImageData ");}}return r};u=function(n,t){return n.subarray(t,t+5)};n.processJPEG=function(n,t,i,r,f,e){var o,s=this.decode.DCT_DECODE;if(!this.isString(n)&&!this.isArrayBuffer(n)&&!this.isArrayBufferView(n))return null;if(this.isString(n)&&(o=function(n){var i;if("JPEG"!==h(n))throw new Error("getJpegSize requires a binary string jpeg file");for(var r=256*n.charCodeAt(4)+n.charCodeAt(5),t=4,u=n.length;t<u;){if(t+=r,255!==n.charCodeAt(t))throw new Error("getJpegSize could not find the size of the image");if(192===n.charCodeAt(t+1)||193===n.charCodeAt(t+1)||194===n.charCodeAt(t+1)||195===n.charCodeAt(t+1)||196===n.charCodeAt(t+1)||197===n.charCodeAt(t+1)||198===n.charCodeAt(t+1)||199===n.charCodeAt(t+1))return i=256*n.charCodeAt(t+5)+n.charCodeAt(t+6),[256*n.charCodeAt(t+7)+n.charCodeAt(t+8),i,n.charCodeAt(t+9)];t+=2;r=256*n.charCodeAt(t)+n.charCodeAt(t+1)}}(n)),this.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.isArrayBufferView(n)&&(o=function(n){if(65496!=(n[0]<<8|n[1]))throw new Error("Supplied data is not a JPEG");for(var t,f=n.length,r=(n[4]<<8)+n[5],i=4;i<f;){if(r=((t=u(n,i+=r))[2]<<8)+t[3],(192===t[1]||194===t[1])&&255===t[0]&&7<r)return{width:((t=u(n,i+5))[2]<<8)+t[3],height:(t[0]<<8)+t[1],numcomponents:t[4]};i+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image");}(n),n=f||this.arrayBufferToBinaryString(n)),void 0===e)switch(o.numcomponents){case 1:e=this.color_spaces.DEVICE_GRAY;break;case 4:e=this.color_spaces.DEVICE_CMYK;break;default:case 3:e=this.color_spaces.DEVICE_RGB}return this.createImageInfo(n,o.width,o.height,e,8,s,t,i)};n.processJPG=function(){return this.processJPEG.apply(this,arguments)};n.getImageProperties=function(t){var i,u,f="";if(r(t)&&(t=o(t)),this.isString(t)&&(""!==(f=this.convertStringToImageData(t))?t=f:void 0!==(f=n.loadFile(t))&&(t=f)),u=this.getImageFileTypeByImageData(t),!e(u))throw new Error("addImage does not support files of type '"+u+"', please ensure that a plugin for '"+u+"' support is added.");if(this.supportsArrayBuffer()&&(t instanceof Uint8Array||(t=this.binaryStringToUint8Array(t))),!(i=this["process"+u.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return{fileType:u,width:i.w,height:i.h,colorSpace:i.cs,compressionMode:i.f,bitsPerComponent:i.bpc}}}(t.API);o=t.API;t.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]);o.events.push(["putPage",function(n){for(var u,r,t,v,e,y,l,i,p,w=this.internal.getPageInfoByObjId(n.objId),o=n.pageContext.annotations,a=function(n){if(void 0!==n&&""!=n)return!0},s=!1,f=0;f<o.length&&!s;f++)switch((t=o[f]).type){case"link":if(a(t.options.url)||a(t.options.pageNumber)){s=!0;break}case"reference":case"text":case"freetext":s=!0}if(0!=s){for(this.internal.write("/Annots ["),this.internal.pageSize.height,u=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,f=0;f<o.length;f++)switch((t=o[f]).type){case"reference":this.internal.write(" "+t.object.objId+" 0 R ");break;case"text":var h=this.internal.newAdditionalObject(),c=this.internal.newAdditionalObject(),b=t.title||"Note";i="<<\/Type /Annot /Subtype /Text "+(e="/Rect ["+u(t.bounds.x)+" "+r(t.bounds.y+t.bounds.h)+" "+u(t.bounds.x+t.bounds.w)+" "+r(t.bounds.y)+"] ")+"/Contents ("+t.contents+")";i+=" /Popup "+c.objId+" 0 R";i+=" /P "+w.objId+" 0 R";i+=" /T ("+b+") >>";h.content=i;v=h.objId+" 0 R";i="<<\/Type /Annot /Subtype /Popup "+(e="/Rect ["+u(t.bounds.x+30)+" "+r(t.bounds.y+t.bounds.h)+" "+u(t.bounds.x+t.bounds.w+30)+" "+r(t.bounds.y)+"] ")+" /Parent "+v;t.open&&(i+=" /Open true");i+=" >>";c.content=i;this.internal.write(h.objId,"0 R",c.objId,"0 R");break;case"freetext":e="/Rect ["+u(t.bounds.x)+" "+r(t.bounds.y)+" "+u(t.bounds.x+t.bounds.w)+" "+r(t.bounds.y+t.bounds.h)+"] ";y=t.color||"#000000";i="<<\/Type /Annot /Subtype /FreeText "+e+"/Contents ("+t.contents+")";i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")";i+=" /Border [0 0 0]";i+=" >>";this.internal.write(i);break;case"link":if(t.options.name?(l=this.annotations._nameMap[t.options.name],t.options.pageNumber=l.page,t.options.top=l.y):t.options.top||(t.options.top=0),e="/Rect ["+u(t.x)+" "+r(t.y)+" "+u(t.x+t.w)+" "+r(t.y+t.h)+"] ",i="",t.options.url)i="<<\/Type /Annot /Subtype /Link "+e+"/Border [0 0 0] /A <<\/S /URI /URI ("+t.options.url+") >>";else if(t.options.pageNumber)switch(i="<<\/Type /Annot /Subtype /Link "+e+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(t.options.pageNumber).objId+" 0 R",t.options.magFactor=t.options.magFactor||"XYZ",t.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+t.options.top+"]";break;case"FitV":t.options.left=t.options.left||0;i+=" /FitV "+t.options.left+"]";break;case"XYZ":default:p=r(t.options.top);t.options.left=t.options.left||0;void 0===t.options.zoom&&(t.options.zoom=0);i+=" /XYZ "+t.options.left+" "+p+" "+t.options.zoom+"]"}""!=i&&(i+=" >>",this.internal.write(i))}this.internal.write("]")}}]);o.createAnnotation=function(n){var t=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":t.pageContext.annotations.push(n)}};o.link=function(n,t,i,r,u){this.internal.getCurrentPageInfo().pageContext.annotations.push({x:n,y:t,w:i,h:r,options:u,type:"link"})};o.textWithLink=function(n,t,i,r){var f=this.getTextWidth(n),u=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(n,t,i),i+=.2*u,this.link(t,i-u,f,u,r),f};o.getTextWidth=function(n){var t=this.internal.getFontSize();return this.getStringUnitWidth(n)*t/this.internal.scaleFactor},function(n){var i={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},f={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},h={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},c=[1570,1571,1573,1575];n.__arabicParser__={};var u=n.__arabicParser__.isInArabicSubstitutionA=function(n){return void 0!==i[n.charCodeAt(0)]},t=n.__arabicParser__.isArabicLetter=function(n){return"string"==typeof n&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(n)},r=n.__arabicParser__.isArabicEndLetter=function(n){return t(n)&&u(n)&&i[n.charCodeAt(0)].length<=2},l=n.__arabicParser__.isArabicAlfLetter=function(n){return t(n)&&0<=c.indexOf(n.charCodeAt(0))},o=(n.__arabicParser__.arabicLetterHasIsolatedForm=function(n){return t(n)&&u(n)&&1<=i[n.charCodeAt(0)].length},n.__arabicParser__.arabicLetterHasFinalForm=function(n){return t(n)&&u(n)&&2<=i[n.charCodeAt(0)].length}),a=(n.__arabicParser__.arabicLetterHasInitialForm=function(n){return t(n)&&u(n)&&3<=i[n.charCodeAt(0)].length},n.__arabicParser__.arabicLetterHasMedialForm=function(n){return t(n)&&u(n)&&4==i[n.charCodeAt(0)].length}),v=n.__arabicParser__.resolveLigatures=function(n){for(var t=0,r=f,e=0,u="",i=0,t=0;t<n.length;t+=1)void 0!==r[n.charCodeAt(t)]?(i++,"number"==typeof(r=r[n.charCodeAt(t)])&&(e=-1!==(e=s(n.charAt(t),n.charAt(t-i),n.charAt(t+1)))?e:0,u+=String.fromCharCode(r),r=f,i=0),t===n.length-1&&(r=f,u+=n.charAt(t-(i-1)),t-=i-1,i=0)):(r=f,u+=n.charAt(t-i),t-=i,i=0);return u},s=(n.__arabicParser__.isArabicDiacritic=function(n){return void 0!==n&&void 0!==h[n.charCodeAt(0)]},n.__arabicParser__.getCorrectForm=function(n,i,f){return t(n)?!1===u(n)?-1:!o(n)||!t(i)&&!t(f)||!t(f)&&r(i)||r(n)&&!t(i)||r(n)&&l(i)||r(n)&&r(i)?0:a(n)&&t(i)&&!r(i)&&t(f)&&o(f)?3:r(n)||!t(f)?1:2:-1}),e=n.__arabicParser__.processArabic=n.processArabic=function(n){for(var r=0,u=0,h=0,f="",c="",l="",o=(n=n||"").split("\\s+"),e=[],r=0;r<o.length;r+=1){for(e.push(""),u=0;u<o[r].length;u+=1)f=o[r][u],c=o[r][u-1],l=o[r][u+1],t(f)?(h=s(f,c,l),e[r]+=-1!==h?String.fromCharCode(i[f.charCodeAt(0)][h]):f):e[r]+=f;e[r]=v(e[r])}return e.join(" ")};n.events.push(["preProcessText",function(n){var i=n.text,u=(n.x,n.y,n.options||{}),r=(n.mutex,u.lang,[]),t;if("[object Array]"===Object.prototype.toString.call(i)){for(t=0,r=[],t=0;t<i.length;t+=1)"[object Array]"===Object.prototype.toString.call(i[t])?r.push([e(i[t][0]),i[t][1],i[t][2]]):r.push([e(i[t])]);n.text=r}else n.text=e(i)}])}(t.API);t.API.autoPrint=function(n){var t;switch((n=n||{}).variant=n.variant||"non-conform",n.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject();this.internal.out("<<");this.internal.out("/S /Named");this.internal.out("/Type /Action");this.internal.out("/N /Print");this.internal.out(">>");this.internal.out("endobj")});this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})}return this};li=t.API;(bt=function(){var u=void 0,n,t,i,r;Object.defineProperty(this,"pdf",{get:function(){return u},set:function(n){u=n}});n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(t){n=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t;this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});t=300;Object.defineProperty(this,"height",{get:function(){return t},set:function(n){t=isNaN(n)||!1===Number.isInteger(n)||n<0?300:n;this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=t+1)}});i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(n){i=n}});r={};Object.defineProperty(this,"style",{get:function(){return r},set:function(n){r=n}});Object.defineProperty(this,"parentNode",{get:function(){return!1}})}).prototype.getContext=function(n,t){var i;if("2d"!==(n=n||"2d"))return null;for(i in t)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=t[i]);return(this.pdf.context2d._canvas=this).pdf.context2d};bt.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.");};li.events.push(["initialized",function(){this.canvas=new bt;this.canvas.pdf=this}]);f=t.API;v={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0};p=1;nt=function(n,t,i,r,u){v={x:n,y:t,w:i,h:r,ln:u}};tt=function(){return v};it={left:0,top:0,bottom:0};f.setHeaderFunction=function(n){kt=n};f.getTextDimensions=function(n,t){var r=this.table_font_size||this.internal.getFontSize(),e=(this.internal.getFont().fontStyle,(t=t||{}).scaleFactor||this.internal.scaleFactor),i=0,f=0,o=0,u;if("string"==typeof n)0!=(i=this.getStringUnitWidth(n)*r)&&(f=1);else{if("[object Array]"!==Object.prototype.toString.call(n))throw new Error("getTextDimensions expects text-parameter to be of type String or an Array of Strings.");for(u=0;u<n.length;u++)i<(o=this.getStringUnitWidth(n[u])*r)&&(i=o);0!==i&&(f=n.length)}return{w:i/=e,h:Math.max((f*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/e,0)}};f.cellAddPage=function(){var n=this.margins||it;this.addPage();nt(n.left,n.top,void 0,void 0);p+=1};f.cellInitialize=function(){v={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0};p=1};f.cell=function(n,t,i,r,u,f,e){var o=tt(),c=!1,l,s,h,a;if(void 0!==o.ln&&(o.ln===f?(n=o.x+o.w,t=o.y):(l=this.margins||it,o.y+o.h+r+13>=this.internal.pageSize.getHeight()-l.bottom&&(this.cellAddPage(),c=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(f,!0)),t=tt().y+tt().h,c&&(t=23))),void 0!==u[0])if(this.printingHeaderRow?this.rect(n,t,i,r,"FD"):this.rect(n,t,i,r),"right"===e)for(u instanceof Array||(u=[u]),s=0;s<u.length;s++)h=u[s],a=this.getStringUnitWidth(h)*this.internal.getFontSize()/this.internal.scaleFactor,this.text(h,n+i-a-3,t+this.internal.getLineHeight()*(s+1));else this.text(u,n+3,t+this.internal.getLineHeight());return nt(n,t,i,r,f),this};f.arrayMax=function(n,t){for(var i,r=n[0],u=0,f=n.length;u<f;u+=1)i=n[u],t?-1===t(r,i)&&(r=i):r<i&&(r=i);return r};f.table=function(n,t,i,r,u){var b;if(!i)throw"No data for PDF table";var o,e,h,nt,tt,rt,c,k,ut,ft,s=[],l=[],et={},a={},y=[],ot=[],st=!1,d=!0,w=12,g=it;if(g.width=this.internal.pageSize.getWidth(),u&&(!0===u.autoSize&&(st=!0),!1===u.printHeaders&&(d=!1),u.fontSize&&(w=u.fontSize),u.css&&void 0!==u.css["font-size"]&&(w=16*u.css["font-size"]),u.margins&&(g=u.margins)),this.lnMod=0,v={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},p=1,this.printHeaders=d,this.margins=g,this.setFontSize(w),this.table_font_size=w,null==r)s=Object.keys(i[0]);else if(r[0]&&"string"!=typeof r[0])for(e=0,h=r.length;e<h;e+=1)o=r[e],s.push(o.name),l.push(o.prompt),a[o.name]=o.width*(19.049976/25.4);else s=r;if(st)for(ft=function(n){return n[o]},e=0,h=s.length;e<h;e+=1){for(et[o=s[e]]=i.map(ft),y.push(this.getTextDimensions(l[e]||o,{scaleFactor:1}).w),c=0,nt=(rt=et[o]).length;c<nt;c+=1)tt=rt[c],y.push(this.getTextDimensions(tt,{scaleFactor:1}).w);a[o]=f.arrayMax(y);y=[]}if(d){for(b=this.calculateLineHeight(s,a,l.length?l:s),e=0,h=s.length;e<h;e+=1)o=s[e],ot.push([n,t,a[o],b,String(l.length?l[e]:o)]);this.setTableHeaderRow(ot);this.printHeaderRow(1,!1)}for(e=0,h=i.length;e<h;e+=1)for(k=i[e],b=this.calculateLineHeight(s,a,k),c=0,ut=s.length;c<ut;c+=1)o=s[c],this.cell(n,t,a[o],b,k[o],e+2,o.align);return this.lastCellPos=v,this.table_x=n,this.table_y=t,this};f.calculateLineHeight=function(n,t,i){for(var r,e,u=0,f=0;f<n.length;f++)i[r=n[f]]=this.splitTextToSize(String(i[r]),t[r]-3),e=this.internal.getLineHeight()*i[r].length+3,u<e&&(u=e);return u};f.setTableHeaderRow=function(n){this.tableHeaderRow=n};f.printHeaderRow=function(n,t){var r,e,u,o,i,f;if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";for((this.printingHeaderRow=!0,void 0!==kt)&&(i=kt(this,p),nt(i[0],i[1],i[2],i[3],-1)),this.setFontStyle("bold"),f=[],u=0,o=this.tableHeaderRow.length;u<o;u+=1)this.setFillColor(200,200,200),r=this.tableHeaderRow[u],t&&(this.margins.top=13,r[1]=this.margins&&this.margins.top||0,f.push(r)),e=[].concat(r),this.cell.apply(this,e.concat(n));0<f.length&&this.setTableHeaderRow(f);this.setFontStyle("normal");this.printingHeaderRow=!1},function(n){var f,a,v,c,l,y=function(n){return n=n||{},this.isStrokeTransparent=n.isStrokeTransparent||!1,this.strokeOpacity=n.strokeOpacity||1,this.strokeStyle=n.strokeStyle||"#000000",this.fillStyle=n.fillStyle||"#000000",this.isFillTransparent=n.isFillTransparent||!1,this.fillOpacity=n.fillOpacity||1,this.font=n.font||"10px sans-serif",this.textBaseline=n.textBaseline||"alphabetic",this.textAlign=n.textAlign||"left",this.lineWidth=n.lineWidth||1,this.lineJoin=n.lineJoin||"miter",this.lineCap=n.lineCap||"butt",this.path=n.path||[],this.transform=void 0!==n.transform?n.transform.clone():new u,this.globalCompositeOperation=n.globalCompositeOperation||"normal",this.globalAlpha=n.globalAlpha||1,this.clip_path=n.clip_path||[],this.currentPoint=n.currentPoint||new r,this.miterLimit=n.miterLimit||10,this.lastPoint=n.lastPoint||new r,this.ignoreClearRect="boolean"!=typeof n.ignoreClearRect||n.ignoreClearRect,this},t;n.events.push(["initialized",function(){this.context2d=new t(this);f=this.internal.f2;this.internal.f3;a=this.internal.getCoordinateString;v=this.internal.getVerticalCoordinateString;c=this.internal.getHorizontalCoordinate;l=this.internal.getVerticalCoordinate}]);t=function(n){var i,r,u,f,e,o,s,t,h;Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});Object.defineProperty(this,"pdf",{get:function(){return n}});i=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return i},set:function(n){i=Boolean(n)}});r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(n){r=Boolean(n)}});u=0;Object.defineProperty(this,"posX",{get:function(){return u},set:function(n){isNaN(n)||(u=n)}});f=0;Object.defineProperty(this,"posY",{get:function(){return f},set:function(n){isNaN(n)||(f=n)}});e=!1;Object.defineProperty(this,"autoPaging",{get:function(){return e},set:function(n){e=Boolean(n)}});o=0;Object.defineProperty(this,"lastBreak",{get:function(){return o},set:function(n){o=n}});s=[];Object.defineProperty(this,"pageBreaks",{get:function(){return s},set:function(n){s=n}});t=new y;Object.defineProperty(this,"ctx",{get:function(){return t},set:function(n){n instanceof y&&(t=n)}});Object.defineProperty(this,"path",{get:function(){return t.path},set:function(n){t.path=n}});h=[];Object.defineProperty(this,"ctxStack",{get:function(){return h},set:function(n){h=n}});Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(n){var t;t=d(n);this.ctx.fillStyle=t.style;this.ctx.isFillTransparent=0===t.a;this.ctx.fillOpacity=t.a;this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a});this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}});Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(n){var t=d(n);this.ctx.strokeStyle=t.style;this.ctx.isStrokeTransparent=0===t.a;this.ctx.strokeOpacity=t.a;0===t.a?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}});Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(n){-1!==["butt","round","square"].indexOf(n)&&(this.ctx.lineCap=n,this.pdf.setLineCap(n))}});Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(n){isNaN(n)||(this.ctx.lineWidth=n,this.pdf.setLineWidth(n))}});Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(n){-1!==["bevel","round","miter"].indexOf(n)&&(this.ctx.lineJoin=n,this.pdf.setLineJoin(n))}});Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(n){isNaN(n)||(this.ctx.miterLimit=n,this.pdf.setMiterLimit(n))}});Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(n){this.ctx.textBaseline=n}});Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(n){-1!==["right","end","center","left","start"].indexOf(n)&&(this.ctx.textAlign=n)}});Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(n){var f,i;if(this.ctx.font=n,null!==(f=/^\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*$/i.exec(n))){var o=f[1],s=(f[2],f[3]),e=f[4],h=f[5],l=f[6];e="px"===h?Math.floor(parseFloat(e)):"em"===h?Math.floor(parseFloat(e)*this.pdf.getFontSize()):Math.floor(parseFloat(e));this.pdf.setFontSize(e);i="";("bold"===s||700<=parseInt(s,10)||"bold"===o)&&(i="bold");"italic"===o&&(i+="italic");0===i.length&&(i="normal");for(var u="",r=l.toLowerCase().replace(/"|'/g,"").split(/\s*,\s*/),c={arial:"Helvetica",verdana:"Helvetica",helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",courier:"Courier",times:"Times",cursive:"Times",fantasy:"Times",serif:"Times"},t=0;t<r.length;t++){if(void 0!==this.pdf.internal.getFont(r[t],i,{noFallback:!0,disableWarning:!0})){u=r[t];break}if("bolditalic"===i&&void 0!==this.pdf.internal.getFont(r[t],"bold",{noFallback:!0,disableWarning:!0}))u=r[t],i="bold";else if(void 0!==this.pdf.internal.getFont(r[t],"normal",{noFallback:!0,disableWarning:!0})){u=r[t];i="normal";break}}if(""===u)for(t=0;t<r.length;t++)if(c[r[t]]){u=c[r[t]];break}u=""===u?"Times":u;this.pdf.setFont(u,i)}}});Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(n){this.ctx.globalCompositeOperation=n}});Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(n){this.ctx.globalAlpha=n}});Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(n){this.ctx.ignoreClearRect=Boolean(n)}})};t.prototype.fill=function(){k.call(this,"fill",!1)};t.prototype.stroke=function(){k.call(this,"stroke",!1)};t.prototype.beginPath=function(){this.path=[{type:"begin"}]};t.prototype.moveTo=function(n,t){if(isNaN(n)||isNaN(t))throw console.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var i=this.ctx.transform.applyToPoint(new r(n,t));this.path.push({type:"mt",x:i.x,y:i.y});this.ctx.lastPoint=new r(n,t)};t.prototype.closePath=function(){for(var t=new r(0,0),n=0,n=this.path.length-1;-1!==n;n--)if("begin"===this.path[n].type&&"object"===i(this.path[n+1])&&"number"==typeof this.path[n+1].x){t=new r(this.path[n+1].x,this.path[n+1].y);this.path.push({type:"lt",x:t.x,y:t.y});break}"object"===i(this.path[n+2])&&"number"==typeof this.path[n+2].x&&this.path.push(JSON.parse(JSON.stringify(this.path[n+2])));this.path.push({type:"close"});this.ctx.lastPoint=new r(t.x,t.y)};t.prototype.lineTo=function(n,t){if(isNaN(n)||isNaN(t))throw console.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var i=this.ctx.transform.applyToPoint(new r(n,t));this.path.push({type:"lt",x:i.x,y:i.y});this.ctx.lastPoint=new r(i.x,i.y)};t.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path));k.call(this,null,!0)};t.prototype.quadraticCurveTo=function(n,t,i,u){if(isNaN(i)||isNaN(u)||isNaN(n)||isNaN(t))throw console.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var f=this.ctx.transform.applyToPoint(new r(i,u)),e=this.ctx.transform.applyToPoint(new r(n,t));this.path.push({type:"qct",x1:e.x,y1:e.y,x:f.x,y:f.y});this.ctx.lastPoint=new r(f.x,f.y)};t.prototype.bezierCurveTo=function(n,t,i,u,f,e){if(isNaN(f)||isNaN(e)||isNaN(n)||isNaN(t)||isNaN(i)||isNaN(u))throw console.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var o=this.ctx.transform.applyToPoint(new r(f,e)),s=this.ctx.transform.applyToPoint(new r(n,t)),h=this.ctx.transform.applyToPoint(new r(i,u));this.path.push({type:"bct",x1:s.x,y1:s.y,x2:h.x,y2:h.y,x:o.x,y:o.y});this.ctx.lastPoint=new r(o.x,o.y)};t.prototype.arc=function(n,t,i,u,f,e){var o,s,h;if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(u)||isNaN(f))throw console.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");(e=Boolean(e),this.ctx.transform.isIdentity)||(o=this.ctx.transform.applyToPoint(new r(n,t)),n=o.x,t=o.y,s=this.ctx.transform.applyToPoint(new r(0,i)),h=this.ctx.transform.applyToPoint(new r(0,0)),i=Math.sqrt(Math.pow(s.x-h.x,2)+Math.pow(s.y-h.y,2)));Math.abs(f-u)>=2*Math.PI&&(u=0,f=2*Math.PI);this.path.push({type:"arc",x:n,y:t,radius:i,startAngle:u,endAngle:f,counterclockwise:e})};t.prototype.arcTo=function(){throw new Error("arcTo not implemented.");};t.prototype.rect=function(n,t,i,r){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r))throw console.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(n,t);this.lineTo(n+i,t);this.lineTo(n+i,t+r);this.lineTo(n,t+r);this.lineTo(n,t);this.lineTo(n+i,t);this.lineTo(n,t)};t.prototype.fillRect=function(n,t,i,r){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r))throw console.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var u={};"butt"!==this.lineCap&&(u.lineCap=this.lineCap,this.lineCap="butt");"miter"!==this.lineJoin&&(u.lineJoin=this.lineJoin,this.lineJoin="miter");this.beginPath();this.rect(n,t,i,r);this.fill();u.hasOwnProperty("lineCap")&&(this.lineCap=u.lineCap);u.hasOwnProperty("lineJoin")&&(this.lineJoin=u.lineJoin)}};t.prototype.strokeRect=function(n,t,i,r){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r))throw console.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");w.call(this)||(this.beginPath(),this.rect(n,t,i,r),this.stroke())};t.prototype.clearRect=function(n,t,i,r){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r))throw console.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(n,t,i,r))};t.prototype.save=function(n){var i,t,r;for(n="boolean"!=typeof n||n,i=this.pdf.internal.getCurrentPageInfo().pageNumber,t=0;t<this.pdf.internal.getNumberOfPages();t++)this.pdf.setPage(t+1),this.pdf.internal.out("q");(this.pdf.setPage(i),n)&&(this.ctx.fontSize=this.pdf.internal.getFontSize(),r=new y(this.ctx),this.ctxStack.push(this.ctx),this.ctx=r)};t.prototype.restore=function(n){n="boolean"!=typeof n||n;for(var i=this.pdf.internal.getCurrentPageInfo().pageNumber,t=0;t<this.pdf.internal.getNumberOfPages();t++)this.pdf.setPage(t+1),this.pdf.internal.out("Q");this.pdf.setPage(i);n&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin)};t.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.");};var d=function(n){var t,i,r,f,u,e;return(!0===n.isCanvasGradient&&(n=n.getColor()),!n)?{r:0,g:0,b:0,a:0,style:n}:(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(n)?f=r=i=t=0:(u=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(n),null!==u?(t=parseInt(u[1]),i=parseInt(u[2]),r=parseInt(u[3]),f=1):null!==(u=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/.exec(n))?(t=parseInt(u[1]),i=parseInt(u[2]),r=parseInt(u[3]),f=parseFloat(u[4])):((f=1,"string"==typeof n&&"#"!==n.charAt(0))&&(e=new RGBColor(n),n=e.ok?e.toHex():"#000000"),4===n.length?(t=n.substring(1,2),t+=t,i=n.substring(2,3),i+=i,r=n.substring(3,4),r+=r):(t=n.substring(1,3),i=n.substring(3,5),r=n.substring(5,7)),t=parseInt(t,16),i=parseInt(i,16),r=parseInt(r,16))),{r:t,g:i,b:r,a:f,style:n})},p=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},w=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};t.prototype.fillText=function(n,t,i,r){if(isNaN(t)||isNaN(i)||"string"!=typeof n)throw console.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(r=isNaN(r)?void 0:r,!p.call(this)){i=nt.call(this,i);var u=h(this.ctx.transform.rotation),f=this.ctx.transform.scaleX;rt.call(this,{text:n,x:t,y:i,scale:f,angle:u,align:this.textAlign,maxWidth:r})}};t.prototype.strokeText=function(n,t,i,r){if(isNaN(t)||isNaN(i)||"string"!=typeof n)throw console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!w.call(this)){r=isNaN(r)?void 0:r;i=nt.call(this,i);var u=h(this.ctx.transform.rotation),f=this.ctx.transform.scaleX;rt.call(this,{text:n,x:t,y:i,scale:f,renderingMode:"stroke",angle:u,align:this.textAlign,maxWidth:r})}};t.prototype.measureText=function(n){if("string"!=typeof n)throw console.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var t=this.pdf,i=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),u=t.getStringUnitWidth(n)*r/t.internal.scaleFactor;return new function(n){var t=(n=n||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this}({width:u*=Math.round(96*i/72*1e4)/1e4})};t.prototype.scale=function(n,t){if(isNaN(n)||isNaN(t))throw console.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var i=new u(n,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(i)};t.prototype.rotate=function(n){if(isNaN(n))throw console.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var t=new u(Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0);this.ctx.transform=this.ctx.transform.multiply(t)};t.prototype.translate=function(n,t){if(isNaN(n)||isNaN(t))throw console.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var i=new u(1,0,0,1,n,t);this.ctx.transform=this.ctx.transform.multiply(i)};t.prototype.transform=function(n,t,i,r,f,e){if(isNaN(n)||isNaN(t)||isNaN(i)||isNaN(r)||isNaN(f)||isNaN(e))throw console.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var o=new u(n,t,i,r,f,e);this.ctx.transform=this.ctx.transform.multiply(o)};t.prototype.setTransform=function(n,t,i,r,f,e){n=isNaN(n)?1:n;t=isNaN(t)?0:t;i=isNaN(i)?0:i;r=isNaN(r)?1:r;f=isNaN(f)?0:f;e=isNaN(e)?0:e;this.ctx.transform=new u(n,t,i,r,f,e)};t.prototype.drawImage=function(n,t,i,f,c,l,a,v,y){var tt=this.pdf.getImageProperties(n),ft=1,et=1,ot=1,st=1,p,rt,ct,w;void 0!==f&&void 0!==v&&(ot=v/f,st=y/c,ft=tt.width/f*v/f,et=tt.height/c*y/c);void 0===l&&(l=t,a=i,i=t=0);void 0!==f&&void 0===v&&(v=f,y=c);void 0===f&&void 0===v&&(v=tt.width,y=tt.height);p=this.ctx.transform.decompose();rt=h(p.rotate.shx);p.scale.sx;p.scale.sy;for(var ht,g=new u,k=((g=(g=(g=g.multiply(p.translate)).multiply(p.skew)).multiply(p.scale)).applyToPoint(new r(v,y)),g.applyToRectangle(new o(l-t*ot,a-i*st,f*ft,c*et))),ut=b.call(this,k),d=[],it=0;it<ut.length;it+=1)-1===d.indexOf(ut[it])&&d.push(ut[it]);if(d.sort(),this.autoPaging)for(var lt=d[0],at=d[d.length-1],nt=lt;nt<at+1;nt++)(this.pdf.setPage(nt),0!==this.ctx.clip_path.length)&&(ct=this.path,ht=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=e(ht,this.posX,-1*this.pdf.internal.pageSize.height*(nt-1)+this.posY),s.call(this,"fill",!0),this.path=ct),w=JSON.parse(JSON.stringify(k)),w=e([w],this.posX,-1*this.pdf.internal.pageSize.height*(nt-1)+this.posY)[0],this.pdf.addImage(n,"jpg",w.x,w.y,w.w,w.h,null,null,rt);else this.pdf.addImage(n,"jpg",k.x,k.y,k.w,k.h,null,null,rt)};var b=function(n,t,i){var r=[],u,f,e;switch(t=t||this.pdf.internal.pageSize.width,i=i||this.pdf.internal.pageSize.height,n.type){default:case"mt":case"lt":r.push(Math.floor((n.y+this.posY)/i)+1);break;case"arc":r.push(Math.floor((n.y+this.posY-n.radius)/i)+1);r.push(Math.floor((n.y+this.posY+n.radius)/i)+1);break;case"qct":u=at(this.ctx.lastPoint.x,this.ctx.lastPoint.y,n.x1,n.y1,n.x,n.y);r.push(Math.floor(u.y/i)+1);r.push(Math.floor((u.y+u.h)/i)+1);break;case"bct":f=vt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,n.x1,n.y1,n.x2,n.y2,n.x,n.y);r.push(Math.floor(f.y/i)+1);r.push(Math.floor((f.y+f.h)/i)+1);break;case"rect":r.push(Math.floor((n.y+this.posY)/i)+1);r.push(Math.floor((n.y+n.h+this.posY)/i)+1)}for(e=0;e<r.length;e+=1)for(;this.pdf.internal.getNumberOfPages()<r[e];)g.call(this);return r},g=function(){var n=this.fillStyle,t=this.strokeStyle,i=this.font,r=this.lineCap,u=this.lineWidth,f=this.lineJoin;this.pdf.addPage();this.fillStyle=n;this.strokeStyle=t;this.font=i;this.lineCap=r;this.lineWidth=u;this.lineJoin=f},e=function(n,t,i){for(var r=0;r<n.length;r++)switch(n[r].type){case"bct":n[r].x2+=t;n[r].y2+=i;case"qct":n[r].x1+=t;n[r].y1+=i;case"mt":case"lt":case"arc":default:n[r].x+=t;n[r].y+=i}return n},k=function(n,t){for(var f,u,a,v,y,h,c,p=this.fillStyle,w=this.strokeStyle,k=(this.font,this.lineCap),d=this.lineWidth,nt=this.lineJoin,l=JSON.parse(JSON.stringify(this.path)),o=JSON.parse(JSON.stringify(this.path)),r=[],i=0;i<o.length;i++)if(void 0!==o[i].x)for(f=b.call(this,o[i]),u=0;u<f.length;u+=1)-1===r.indexOf(f[u])&&r.push(f[u]);for(i=0;i<r.length;i++)for(;this.pdf.internal.getNumberOfPages()<r[i];)g.call(this);if(r.sort(),this.autoPaging)for(a=r[0],v=r[r.length-1],i=a;i<v+1;i++)(this.pdf.setPage(i),this.fillStyle=p,this.strokeStyle=w,this.lineCap=k,this.lineWidth=d,this.lineJoin=nt,0!==this.ctx.clip_path.length)&&(y=this.path,h=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=e(h,this.posX,-1*this.pdf.internal.pageSize.height*(i-1)+this.posY),s.call(this,n,!0),this.path=y),c=JSON.parse(JSON.stringify(l)),this.path=e(c,this.posX,-1*this.pdf.internal.pageSize.height*(i-1)+this.posY),!1!==t&&0!==i||s.call(this,n,t);else s.call(this,n,t);this.path=l},s=function(n,t){var r,c,f,i,u,o,s,a,l,e;if(("stroke"!==n||t||!w.call(this))&&("stroke"===n||t||!p.call(this))){for(r=[],this.ctx.globalAlpha,this.ctx.fillOpacity<1&&this.ctx.fillOpacity,f=this.path,i=0;i<f.length;i++){u=f[i];switch(u.type){case"begin":r.push({begin:!0});break;case"close":r.push({close:!0});break;case"mt":r.push({start:u,deltas:[],abs:[]});break;case"lt":if(o=r.length,!isNaN(f[i-1].x)&&(s=[u.x-f[i-1].x,u.y-f[i-1].y],0<o))for(;0<=o;o--)if(!0!==r[o-1].close&&!0!==r[o-1].begin){r[o-1].deltas.push(s);r[o-1].abs.push(u);break}break;case"bct":s=[u.x1-f[i-1].x,u.y1-f[i-1].y,u.x2-f[i-1].x,u.y2-f[i-1].y,u.x-f[i-1].x,u.y-f[i-1].y];r[r.length-1].deltas.push(s);break;case"qct":var b=f[i-1].x+2/3*(u.x1-f[i-1].x),k=f[i-1].y+2/3*(u.y1-f[i-1].y),d=u.x+2/3*(u.x1-u.x),g=u.y+2/3*(u.y1-u.y),nt=u.x,rt=u.y;s=[b-f[i-1].x,k-f[i-1].y,d-f[i-1].x,g-f[i-1].y,nt-f[i-1].x,rt-f[i-1].y];r[r.length-1].deltas.push(s);break;case"arc":r.push({deltas:[],abs:[],arc:!0});Array.isArray(r[r.length-1].abs)&&r[r.length-1].abs.push(u)}}for(c=t?null:"stroke"===n?"stroke":"fill",i=0;i<r.length;i++){if(r[i].arc)for(a=r[i].abs,l=0;l<a.length;l++)if(e=a[l],void 0!==e.startAngle){var ut=h(e.startAngle),et=h(e.endAngle),v=e.x,y=e.y;ft.call(this,v,y,e.radius,ut,et,e.counterclockwise,c,t)}else ot.call(this,e.x,e.y);r[i].arc||!0===r[i].close||!0===r[i].begin||(v=r[i].start.x,y=r[i].start.y,st.call(this,r[i].deltas,v,y,null,null))}c&&tt.call(this,c);t&&it.call(this)}},nt=function(n){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,i=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return n-i;case"top":return n+t-i;case"hanging":return n+t-2*i;case"middle":return n+t/2-i;case"ideographic":return n;case"alphabetic":default:return n}};t.prototype.createLinearGradient=function(){var n=function(){};return n.colorStops=[],n.addColorStop=function(n,t){this.colorStops.push([n,t])},n.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},n.isCanvasGradient=!0,n};t.prototype.createPattern=function(){return this.createLinearGradient()};t.prototype.createRadialGradient=function(){return this.createLinearGradient()};var ft=function(n,t,i,r,u,f,e,o){var s;this.pdf.internal.scaleFactor;for(var l=ut(r),a=ut(u),c=ct.call(this,i,l,a,f),h=0;h<c.length;h++)s=c[h],0===h&&et.call(this,s.x1+n,s.y1+t),ht.call(this,n,t,s.x2,s.y2,s.x3,s.y3,s.x4,s.y4);o?it.call(this):tt.call(this,e)},tt=function(n){switch(n){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},it=function(){this.pdf.clip()},et=function(n,t){this.pdf.internal.out(a(n)+" "+v(t)+" m")},rt=function(n){var f,d,a,i;switch(n.align){case"right":case"end":f="right";break;case"center":f="center";break;case"left":case"start":default:f="left"}var w=this.ctx.transform.applyToPoint(new r(n.x,n.y)),y=this.ctx.transform.decompose(),h=new u;h=(h=(h=h.multiply(y.translate)).multiply(y.skew)).multiply(y.scale);for(var k,c=this.pdf.getTextDimensions(n.text),g=this.ctx.transform.applyToRectangle(new o(n.x,n.y,c.w,c.h)),nt=h.applyToRectangle(new o(n.x,n.y-c.h,c.w,c.h)),p=b.call(this,nt),t=[],v=0;v<p.length;v+=1)-1===t.indexOf(p[v])&&t.push(p[v]);if(t.sort(),!0===this.autoPaging)for(var tt=t[0],it=t[t.length-1],l=tt;l<it+1;l++)(this.pdf.setPage(l),0!==this.ctx.clip_path.length)&&(d=this.path,k=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=e(k,this.posX,-1*this.pdf.internal.pageSize.height*(l-1)+this.posY),s.call(this,"fill",!0),this.path=d),a=JSON.parse(JSON.stringify(g)),(a=e([a],this.posX,-1*this.pdf.internal.pageSize.height*(l-1)+this.posY)[0],.01<=n.scale)&&(i=this.pdf.internal.getFontSize(),this.pdf.setFontSize(i*n.scale)),this.pdf.text(n.text,a.x,a.y,{angle:n.angle,align:f,renderingMode:n.renderingMode,maxWidth:n.maxWidth}),.01<=n.scale&&this.pdf.setFontSize(i);else.01<=n.scale&&(i=this.pdf.internal.getFontSize(),this.pdf.setFontSize(i*n.scale)),this.pdf.text(n.text,w.x+this.posX,w.y+this.posY,{angle:n.angle,align:f,renderingMode:n.renderingMode,maxWidth:n.maxWidth}),.01<=n.scale&&this.pdf.setFontSize(i)},ot=function(n,t,i,r){i=i||0;r=r||0;this.pdf.internal.out(a(n+i)+" "+v(t+r)+" l")},st=function(n,t,i){return this.pdf.lines(n,t,i,null,null)},ht=function(n,t,i,r,u,e,o,s){this.pdf.internal.out([f(c(i+n)),f(l(r+t)),f(c(u+n)),f(l(e+t)),f(c(o+n)),f(l(s+t)),"c"].join(" "))},ct=function(n,t,i,r){var u=2*Math.PI,e=t,f,s;(e<u||u<e)&&(e%=u);f=i;(f<u||u<f)&&(f%=u);for(var c=[],l=Math.PI/2,a=r?-1:1,o=t,h=Math.min(u,Math.abs(f-e));1e-5<h;)s=o+a*Math.min(h,l),c.push(lt.call(this,n,o,s)),h-=Math.abs(s-o),o=s;return c},lt=function(n,t,i){var o=(i-t)/2,s=n*Math.cos(o),h=n*Math.sin(o),r=s,u=-h,a=r*r+u*u,v=a+r*s+u*h,y=4/3*(Math.sqrt(2*a*v)-v)/(r*h-u*s),c=r-y*u,l=u+y*r,p=c,w=-l,b=o+t,f=Math.cos(b),e=Math.sin(b);return{x1:n*Math.cos(t),y1:n*Math.sin(t),x2:c*f-l*e,y2:c*e+l*f,x3:p*f-w*e,y3:p*e+w*f,x4:n*Math.cos(i),y4:n*Math.sin(i)}},h=function(n){return 180*n/Math.PI},ut=function(n){return n*Math.PI/180},at=function(n,t,i,r,u,f){var e=n+.5*(i-n),s=t+.5*(r-t),h=u+.5*(i-u),c=f+.5*(r-f),l=Math.min(n,u,e,h),v=Math.max(n,u,e,h),a=Math.min(t,f,s,c),y=Math.max(t,f,s,c);return new o(l,a,v-l,y-a)},vt=function(n,t,i,r,u,f,e,s){for(var h,d,g,w,b,nt,tt,a,v,c,l,y,k,it=i-n,rt=r-t,ut=u-i,ft=f-r,et=e-u,ot=s-f,p=0;p<41;p++)a=(nt=(d=n+(h=p/40)*it)+h*((w=i+h*ut)-d))+h*(w+h*(u+h*et-w)-nt),v=(tt=(g=t+h*rt)+h*((b=r+h*ft)-g))+h*(b+h*(f+h*ot-b)-tt),k=0==p?(y=c=a,l=v):(c=Math.min(c,a),l=Math.min(l,v),y=Math.max(y,a),Math.max(k,v));return new o(Math.round(c),Math.round(l),Math.round(y-c),Math.round(k-l))},r=function(n,t){var u=n||0,i,r;return Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(n){isNaN(n)||(u=parseFloat(n))}}),i=t||0,Object.defineProperty(this,"y",{enumerable:!0,get:function(){return i},set:function(n){isNaN(n)||(i=parseFloat(n))}}),r="pt",Object.defineProperty(this,"type",{enumerable:!0,get:function(){return r},set:function(n){r=n.toString()}}),this},o=function(n,t,i,u){var f,e;return r.call(this,n,t),this.type="rect",f=i||0,Object.defineProperty(this,"w",{enumerable:!0,get:function(){return f},set:function(n){isNaN(n)||(f=parseFloat(n))}}),e=u||0,Object.defineProperty(this,"h",{enumerable:!0,get:function(){return e},set:function(n){isNaN(n)||(e=parseFloat(n))}}),this},u=function(n,t,i,r,u,f){var e=[];return Object.defineProperty(this,"sx",{get:function(){return e[0]},set:function(n){e[0]=Math.round(1e5*n)/1e5}}),Object.defineProperty(this,"shy",{get:function(){return e[1]},set:function(n){e[1]=Math.round(1e5*n)/1e5}}),Object.defineProperty(this,"shx",{get:function(){return e[2]},set:function(n){e[2]=Math.round(1e5*n)/1e5}}),Object.defineProperty(this,"sy",{get:function(){return e[3]},set:function(n){e[3]=Math.round(1e5*n)/1e5}}),Object.defineProperty(this,"tx",{get:function(){return e[4]},set:function(n){e[4]=Math.round(1e5*n)/1e5}}),Object.defineProperty(this,"ty",{get:function(){return e[5]},set:function(n){e[5]=Math.round(1e5*n)/1e5}}),Object.defineProperty(this,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(this,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(this,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(this,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),this.sx=isNaN(n)?1:n,this.shy=isNaN(t)?0:t,this.shx=isNaN(i)?0:i,this.sy=isNaN(r)?1:r,this.tx=isNaN(u)?0:u,this.ty=isNaN(f)?0:f,this};u.prototype.multiply=function(n){var t=n.sx*this.sx+n.shy*this.shx,i=n.sx*this.shy+n.shy*this.sy,r=n.shx*this.sx+n.sy*this.shx,f=n.shx*this.shy+n.sy*this.sy,e=n.tx*this.sx+n.ty*this.shx+this.tx,o=n.tx*this.shy+n.ty*this.sy+this.ty;return new u(t,i,r,f,e,o)};u.prototype.decompose=function(){var n=this.sx,t=this.shy,r=this.shx,f=this.sy,s=this.tx,h=this.ty,e=Math.sqrt(n*n+t*t),i=(n/=e)*r+(t/=e)*f,o;return r-=n*i,f-=t*i,o=Math.sqrt(r*r+f*f),i/=o,n*(f/=o)<t*(r/=o)&&(n=-n,t=-t,i=-i,e=-e),{scale:new u(e,0,0,o,0,0),translate:new u(1,0,0,1,s,h),rotate:new u(n,t,-t,n,0,0),skew:new u(1,0,i,1,0,0)}};u.prototype.applyToPoint=function(n){var t=n.x*this.sx+n.y*this.shx+this.tx,i=n.x*this.shy+n.y*this.sy+this.ty;return new r(t,i)};u.prototype.applyToRectangle=function(n){var t=this.applyToPoint(n),i=this.applyToPoint(new r(n.x+n.w,n.y+n.h));return new o(t.x,t.y,i.x-t.x,i.y-t.y)};u.prototype.clone=function(){var n=this.sx,t=this.shy,i=this.shx,r=this.sy,f=this.tx,e=this.ty;return new u(n,t,i,r,f,e)}}(t.API,"undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")());dt=t.API;ai=function(n){var u,r,i,f,t,e,o,s,h,c;for(/[^\x00-\xFF]/.test(n),r=[],i=0,f=(n+=u="\0\0\0\0".slice(n.length%4||4)).length;i<f;i+=4)0!==(t=(n.charCodeAt(i)<<24)+(n.charCodeAt(i+1)<<16)+(n.charCodeAt(i+2)<<8)+n.charCodeAt(i+3))?(e=(t=((t=((t=((t=(t-(c=t%85))/85)-(h=t%85))/85)-(s=t%85))/85)-(o=t%85))/85)%85,r.push(e+33,o+33,s+33,h+33,c+33)):r.push(122);return function(n){for(var t=u.length;0<t;t--)n.pop()}(r),String.fromCharCode.apply(String,r)+"~>"};vi=function(n){var o,i,u,t,s,h=String,f="length",r="charCodeAt",e="slice",c="replace";for(n[e](-2),n=n[e](0,-2)[c](/\s/g,"")[c]("z","!!!!!"),u=[],t=0,s=(n+=o="uuuuu"[e](n[f]%5||5))[f];t<s;t+=5)i=52200625*(n[r](t)-33)+614125*(n[r](t+1)-33)+7225*(n[r](t+2)-33)+85*(n[r](t+3)-33)+(n[r](t+4)-33),u.push(255&i>>24,255&i>>16,255&i>>8,255&i);return function(n){for(var t=o[f];0<t;t--)n.pop()}(u),h.fromCharCode.apply(h,u)};yi=function(n){for(var i="",t=0;t<n.length;t+=1)i+=("0"+n.charCodeAt(t).toString(16)).slice(-2);return i+">"};pi=function(n){var r=new RegExp(/^([0-9A-Fa-f]{2})+$/),i,t;if(-1!==(n=n.replace(/\s/g,"")).indexOf(">")&&(n=n.substr(0,n.indexOf(">"))),n.length%2&&(n+="0"),!1===r.test(n))return"";for(i="",t=0;t<n.length;t+=2)i+=String.fromCharCode("0x"+(n[t]+n[t+1]));return i};wi=function(n,t){t=Object.assign({predictor:1,colors:1,bitsPerComponent:8,columns:1},t);for(var r,f,i=[],u=n.length;u--;)i[u]=n.charCodeAt(u);return r=dt.adler32cs.from(n),(f=new Deflater(6)).append(new Uint8Array(i)),n=f.flush(),(i=new Uint8Array(n.length+6)).set(new Uint8Array([120,156])),i.set(n,2),i.set(new Uint8Array([255&r,r>>8&255,r>>16&255,r>>24&255]),n.length+2),n=String.fromCharCode.apply(null,i)};dt.processDataByFilters=function(n,t){var u=0,i=n||"",r=[];for("string"==typeof(t=t||[])&&(t=[t]),u=0;u<t.length;u+=1)switch(t[u]){case"ASCII85Decode":case"/ASCII85Decode":i=vi(i);r.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":i=ai(i);r.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":i=pi(i);r.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":i=yi(i);r.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":i=wi(i);r.push("/FlateDecode");break;default:throw'The filter: "'+t[u]+'" is not implemented';}return{data:i,reverseChain:r.reverse().join(" ")}};(gt=t.API).loadFile=function(n,t,i){var r;t=t||!0;i=i||function(){};try{r=function(n,t){var i=new XMLHttpRequest,u=[],r=0,f=function(n){var t=n.length,i=String.fromCharCode;for(r=0;r<t;r+=1)u.push(i(255&n.charCodeAt(r)));return u.join("")};if(i.open("GET",n,!t),i.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(i.onload=function(){return f(this.responseText)}),i.send(null),200===i.status)return t?f(i.responseText):void 0;console.warn('Unable to load file "'+n+'"')}(n,t)}catch(n){r=void 0}return r};gt.loadImageFile=gt.loadFile;bi=t.API;ki="undefined"!=typeof window&&window||"undefined"!=typeof global&&global;rt=function(n){var t=i(n);return"undefined"===t?"undefined":"string"===t||n instanceof String?"string":"number"===t||n instanceof Number?"number":"function"===t||n instanceof Function?"function":n&&n.constructor===Array?"array":n&&1===n.nodeType?"element":"object"===t?"object":"unknown"};w=function(n,t){var i=document.createElement(n),r,u,f;if(t.className&&(i.className=t.className),t.innerHTML)for(i.innerHTML=t.innerHTML,r=i.getElementsByTagName("script"),u=r.length;0<u--;null)r[u].parentNode.removeChild(r[u]);for(f in t.style)i.style[f]=t.style[f];return i};(((n=function o(n){var i=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),t=o.convert(Promise.resolve(),i);return(t=t.setProgress(1,o,1,[o])).set(n)}).prototype=Object.create(Promise.prototype)).constructor=n).convert=function(t,i){return t.__proto__=i||n.prototype,t};n.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{}}};n.prototype.from=function(n,t){return this.then(function(){switch(t=t||function(n){switch(rt(n)){case"string":return"string";case"element":return"canvas"===n.nodeName.toLowerCase?"canvas":"element";default:return"unknown"}}(n)){case"string":return this.set({src:w("div",{innerHTML:n})});case"element":return this.set({src:n});case"canvas":return this.set({canvas:n});case"img":return this.set({img:n});default:return this.error("Unknown source type.")}})};n.prototype.to=function(n){switch(n){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}};n.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var n={position:"relative",display:"inline-block",width:Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:"white"},t=function n(t,i){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),u=t.firstChild;u;u=u.nextSibling)!0!==i&&1===u.nodeType&&"SCRIPT"===u.nodeName||r.appendChild(n(u,i));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",function(){r.scrollTop=t.scrollTop;r.scrollLeft=t.scrollLeft},!0)),r}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(n.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px");this.prop.overlay=w("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}});this.prop.container=w("div",{className:"html2pdf__container",style:n});this.prop.container.appendChild(t);this.prop.container.firstChild.appendChild(w("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}}));this.prop.container.style.float="none";this.prop.overlay.appendChild(this.prop.container);document.body.appendChild(this.prop.overlay);this.prop.container.firstChild.style.position="relative";this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})};n.prototype.toCanvas=function(){var n=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(n).then(function(){var n=Object.assign({},this.opt.html2canvas);if(delete n.onrendered,this.isHtml2CanvasLoaded())return html2canvas(this.prop.container,n)}).then(function(n){(this.opt.html2canvas.onrendered||function(){})(n);this.prop.canvas=n;document.body.removeChild(this.prop.overlay)})};n.prototype.toContext2d=function(){var n=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(n).then(function(){var t=this.opt.jsPDF,n=Object.assign({async:!0,allowTaint:!0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete n.onrendered,t.context2d.autoPaging=!0,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,n.windowHeight=n.windowHeight||0,n.windowHeight=0==n.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):n.windowHeight,this.isHtml2CanvasLoaded())return html2canvas(this.prop.container,n)}).then(function(n){(this.opt.html2canvas.onrendered||function(){})(n);this.prop.canvas=n;document.body.removeChild(this.prop.overlay)})};n.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var n=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img");this.prop.img.src=n})};n.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})};n.prototype.output=function(n,t,i){return"img"===(i=i||"pdf").toLowerCase()||"image"===i.toLowerCase()?this.outputImg(n,t):this.outputPdf(n,t)};n.prototype.outputPdf=function(n,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(n,t)})};n.prototype.outputImg=function(n){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(n){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+n+'" is not supported.';}})};n.prototype.isHtml2CanvasLoaded=function(){var n=void 0!==ki.html2canvas;return n||console.error("html2canvas not loaded."),n};n.prototype.save=function(n){if(this.isHtml2CanvasLoaded())return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(n?{filename:n}:null).then(function(){this.prop.pdf.save(this.opt.filename)})};n.prototype.doCallback=function(){if(this.isHtml2CanvasLoaded())return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})};n.prototype.set=function(t){if("object"!==rt(t))return this;var i=Object.keys(t||{}).map(function(i){if(i in n.template.prop)return function(){this.prop[i]=t[i]};switch(i){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[i]=t[i]}}},this);return this.then(function(){return this.thenList(i)})};n.prototype.get=function(t,i){return this.then(function(){var r=t in n.template.prop?this.prop[t]:this.opt[t];return i?i(r):r})};n.prototype.setMargin=function(n){return this.then(function(){switch(rt(n)){case"number":n=[n,n,n,n];case"array":if(2===n.length&&(n=[n[0],n[1],n[0],n[1]]),4===n.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=n}).then(this.setPageSize)};n.prototype.setPageSize=function(n){function i(n,t){return Math.floor(n*t/72*96)}return this.then(function(){(n=n||t.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(n.inner={width:n.width-this.opt.margin[1]-this.opt.margin[3],height:n.height-this.opt.margin[0]-this.opt.margin[2]},n.inner.px={width:i(n.inner.width,n.k),height:i(n.inner.height,n.k)},n.inner.ratio=n.inner.height/n.inner.width);this.prop.pageSize=n})};n.prototype.setProgress=function(n,t,i,r){return null!=n&&(this.progress.val=n),null!=t&&(this.progress.state=t),null!=i&&(this.progress.n=i),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this};n.prototype.updateProgress=function(n,t,i,r){return this.setProgress(n?this.progress.val+n:null,t||null,i?this.progress.n+i:null,r?this.progress.stack.concat(r):null)};n.prototype.then=function(n,t){var i=this;return this.thenCore(n,t,function(n,t){return i.updateProgress(null,null,1,[n]),Promise.prototype.then.call(this,function(t){return i.updateProgress(null,n),t}).then(n,t).then(function(n){return i.updateProgress(1),n})})};n.prototype.thenCore=function(t,i,r){var u,f,e;return r=r||Promise.prototype.then,u=this,t&&(t=t.bind(u)),i&&(i=i.bind(u)),f=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?u:n.convert(Object.assign({},u),Promise.prototype),e=r.call(f,t,i),n.convert(e,u.__proto__)};n.prototype.thenExternal=function(n,t){return Promise.prototype.then.call(this,n,t)};n.prototype.thenList=function(n){var t=this;return n.forEach(function(n){t=t.thenCore(n)}),t};n.prototype.catch=function(t){t&&(t=t.bind(this));var i=Promise.prototype.catch.call(this,t);return n.convert(i,this)};n.prototype.catchExternal=function(n){return Promise.prototype.catch.call(this,n)};n.prototype.error=function(n){return this.then(function(){throw new Error(n);})};n.prototype.using=n.prototype.set;n.prototype.saveAs=n.prototype.save;n.prototype.export=n.prototype.output;n.prototype.run=n.prototype.then;t.getPageSize=function(n,t,r){var o,s,h,u,f,e,c;"object"===i(n)&&(o=n,n=o.orientation,t=o.unit||t,r=o.format||r);t=t||"mm";r=r||"a4";n=(""+(n||"P")).toLowerCase();s=(""+r).toLowerCase();h={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case"pt":u=1;break;case"mm":u=72/25.4;break;case"cm":u=72/2.54;break;case"in":u=72;break;case"px":u=.75;break;case"pc":case"em":u=12;break;case"ex":u=6;break;default:throw"Invalid unit: "+t;}if(h.hasOwnProperty(s))f=h[s][1]/u,e=h[s][0]/u;else try{f=r[1];e=r[0]}catch(n){throw new Error("Invalid format: "+r);}if("p"===n||"portrait"===n)(n="p",f<e)&&(c=e,e=f,f=c);else{if("l"!==n&&"landscape"!==n)throw"Invalid orientation: "+n;n="l";e<f&&(c=e,e=f,f=c)}return{width:e,height:f,unit:t,k:u}};bi.html=function(t,i){(i=i||{}).callback=i.callback||function(){};i.html2canvas=i.html2canvas||{};i.html2canvas.canvas=i.html2canvas.canvas||this.canvas;i.jsPDF=i.jsPDF||this;i.jsPDF;var r=new n(i);return i.worker?r:r.from(t).doCallback()};t.API.addJS=function(n){return gi=n,this.internal.events.subscribe("postPutResources",function(){ut=this.internal.newObject();this.internal.out("<<");this.internal.out("/Names [(EmbeddedJS) "+(ut+1)+" 0 R]");this.internal.out(">>");this.internal.out("endobj");di=this.internal.newObject();this.internal.out("<<");this.internal.out("/S /JavaScript");this.internal.out("/JS ("+gi+")");this.internal.out(">>");this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==ut&&void 0!==di&&this.internal.out("/Names <<\/JavaScript "+ut+" 0 R>>")}),this};(ni=t.API).events.push(["postPutResources",function(){var n=this,r,t,u,f,e,o,i,s,h,c;if(0<this.outline.root.children.length)for(r=n.outline.render().split(/\r\n/),t=0;t<r.length;t++)u=r[t],f=/^(\d+) 0 obj$/.exec(u),null!=f&&(e=f[1],n.internal.newObjectDeferredBegin(e,!1)),n.internal.write(u);if(this.outline.createNamedDestinations){for(o=this.internal.pages.length,i=[],t=0;t<o;t++)s=n.internal.newObject(),i.push(s),h=n.internal.getPageInfo(t+1),n.internal.write("<< /D["+h.objId+" 0 R /XYZ null null null]>> endobj");for(c=n.internal.newObject(),n.internal.write("<< /Names [ "),t=0;t<i.length;t++)n.internal.write("(page_"+(t+1)+")"+i[t]+" 0 R");n.internal.write(" ] >>","endobj");n.internal.newObject();n.internal.write("<< /Dests "+c+" 0 R");n.internal.write(">>","endobj")}}]);ni.events.push(["putCatalog",function(){0<this.outline.root.children.length&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+namesOid+" 0 R"))}]);ni.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}};n.outline.add=function(n,t,i){var r={title:t,options:i,children:[]};return null==n&&(n=this.root),n.children.push(r),r};n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val};n.outline.genIds_r=function(t){t.id=n.internal.newObjectDeferred();for(var i=0;i<t.children.length;i++)this.genIds_r(t.children[i])};n.outline.renderRoot=function(n){this.objStart(n);this.line("/Type /Outlines");0<n.children.length&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1])));this.line("/Count "+this.count_r({count:0},n));this.objEnd()};n.outline.renderItems=function(t){var f,r,i,u,e;for(this.ctx.pdf.internal.getCoordinateString,f=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++)i=t.children[r],this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(t)),0<r&&this.line("/Prev "+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[r+1])),0<i.children.length&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),u=this.count=this.count_r({count:0},i),(0<u&&this.line("/Count "+u),i.options&&i.options.pageNumber)&&(e=n.internal.getPageInfo(i.options.pageNumber),this.line("/Dest ["+e.objId+" 0 R /XYZ 0 "+f(0)+" 0]")),this.objEnd();for(r=0;r<t.children.length;r++)i=t.children[r],this.renderItems(i)};n.outline.line=function(n){this.ctx.val+=n+"\r\n"};n.outline.makeRef=function(n){return n.id+" 0 R"};n.outline.makeString=function(t){return"("+n.internal.pdfEscape(t)+")"};n.outline.objStart=function(n){this.ctx.val+="\r\n"+n.id+" 0 obj\r\n<<\r\n"};n.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"};n.outline.count_r=function(n,t){for(var i=0;i<t.children.length;i++)n.count++,this.count_r(n,t.children[i]);return n.count}}]);s=t.API;nr=function(){var n="function"==typeof Deflater;if(!n)throw new Error("requires deflate.js for compression");return n};ft=function(n,t,i,r){var f=5,o=ii;switch(r){case s.image_compression.FAST:f=3;o=ti;break;case s.image_compression.MEDIUM:f=6;o=ri;break;case s.image_compression.SLOW:f=9;o=ui}n=rr(n,t,i,o);var h=new Uint8Array(tr(f)),c=ir(n),a=new Deflater(f),l=a.append(n),v=a.flush(),e=h.length+l.length+v.length,u=new Uint8Array(e+4);return u.set(h),u.set(l,h.length),u.set(v,h.length+l.length),u[e++]=c>>>24&255,u[e++]=c>>>16&255,u[e++]=c>>>8&255,u[e++]=255&c,s.arrayBufferToBinaryString(u)};tr=function(n,t){var r=Math.LOG2E*Math.log(32768)-8<<4|8,i=r<<8;return i|=Math.min(3,(t-1&255)>>1)<<6,i|=0,[r,255&(i+=31-i%31)]};ir=function(n,t){for(var f,r=1,u=0,i=n.length,e=0;0<i;){for(i-=f=t<i?t:i;u+=r+=n[e++],--f;);r%=65521;u%=65521}return(u<<16|r)>>>0};rr=function(n,t,i,r){for(var v,e,s,u,l=n.length/t,h=new Uint8Array(n.length+l),a=er(),f=0;f<l;f++){if(u=f*t,e=n.subarray(u,u+t),r)h.set(r(e,i,s),u+f);else{for(var o=0,y=a.length,c=[];o<y;o++)c[o]=a[o](e,i,s);v=or(c.concat());h.set(c[v],u+f)}s=e}return h};ur=function(n){var t=Array.apply([],n);return t.unshift(0),t};ti=function(n,t){var u,r=[],i=0,f=n.length;for(r[0]=1;i<f;i++)u=n[i-t]||0,r[i+1]=n[i]-u+256&255;return r};ii=function(n,t,i){var f,u=[],r=0,e=n.length;for(u[0]=2;r<e;r++)f=i&&i[r]||0,u[r+1]=n[r]-f+256&255;return u};ri=function(n,t,i){var f,e,u=[],r=0,o=n.length;for(u[0]=3;r<o;r++)f=n[r-t]||0,e=i&&i[r]||0,u[r+1]=n[r]+256-(f+e>>>1)&255;return u};ui=function(n,t,i){var f,e,o,s,u=[],r=0,h=n.length;for(u[0]=4;r<h;r++)f=n[r-t]||0,e=i&&i[r]||0,o=i&&i[r-t]||0,s=fr(f,e,o),u[r+1]=n[r]-s+256&255;return u};fr=function(n,t,i){var r=n+t-i,u=Math.abs(r-n),f=Math.abs(r-t),e=Math.abs(r-i);return u<=f&&u<=e?n:f<=e?t:i};er=function(){return[ur,ti,ii,ri,ui]};or=function(n){for(var r,i,u,t=0,f=n.length;t<f;)((r=sr(n[t].slice(1)))<i||!i)&&(i=r,u=t),t++;return u};sr=function(n){for(var t=0,r=n.length,i=0;t<r;)i+=Math.abs(n[t++]);return i};s.processPNG=function(n,t,i,r){var u,tt,it,k,rt,o,d=this.color_spaces.DEVICE_RGB,g=this.decode.FLATE_DECODE,y=8,h,ut,et,v,b,c,nt;if(this.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.isArrayBufferView(n)){if("function"!=typeof PNG||"function"!=typeof wt)throw new Error("PNG support requires png.js and zlib.js");if(n=(u=new PNG(n)).imgData,y=u.bits,d=u.colorSpace,k=u.colors,-1!==[4,6].indexOf(u.colorType)){if(8===u.bits)for(var p,e=(c=32==u.pixelBitlength?new Uint32Array(u.decodePixels().buffer):16==u.pixelBitlength?new Uint16Array(u.decodePixels().buffer):new Uint8Array(u.decodePixels().buffer)).length,a=new Uint8Array(e*u.colors),l=new Uint8Array(e),ot=u.pixelBitlength-u.bits,f=0,w=0;f<e;f++){for(h=c[f],p=0;p<ot;)a[w++]=h>>>p&255,p+=u.bits;l[f]=h>>>p&255}if(16===u.bits){for(e=(c=new Uint32Array(u.decodePixels().buffer)).length,a=new Uint8Array(e*(32/u.pixelBitlength)*u.colors),l=new Uint8Array(e*(32/u.pixelBitlength)),ut=1<u.colors,et=w=f=0;f<e;)h=c[f++],a[w++]=h>>>0&255,ut&&(a[w++]=h>>>16&255,h=c[f++],a[w++]=h>>>0&255),l[et++]=h>>>16&255;y=8}r!==s.image_compression.NONE&&nr()?(n=ft(a,u.width*u.colors,u.colors,r),o=ft(l,u.width,1,r)):(n=a,o=l,g=null)}if(3===u.colorType&&(d=this.color_spaces.INDEXED,rt=u.palette,u.transparency.indexed)){for(v=u.transparency.indexed,b=0,f=0,e=v.length;f<e;++f)b+=v[f];if((b/=255)==e-1&&-1!==v.indexOf(0))it=[v.indexOf(0)];else if(b!==e){for(c=u.decodePixels(),l=new Uint8Array(c.length),f=0,e=c.length;f<e;f++)l[f]=v[c[f]];o=ft(l,u.width,1)}}return nt=function(n){var t;switch(n){case s.image_compression.FAST:t=11;break;case s.image_compression.MEDIUM:t=13;break;case s.image_compression.SLOW:t=14;break;default:t=12}return t}(r),tt=g===this.decode.FLATE_DECODE?"/Predictor "+nt+" /Colors "+k+" /BitsPerComponent "+y+" /Columns "+u.width:"/Colors "+k+" /BitsPerComponent "+y+" /Columns "+u.width,(this.isArrayBuffer(n)||this.isArrayBufferView(n))&&(n=this.arrayBufferToBinaryString(n)),(o&&this.isArrayBuffer(o)||this.isArrayBufferView(o))&&(o=this.arrayBufferToBinaryString(o)),this.createImageInfo(n,u.width,u.height,d,y,g,t,i,tt,it,rt,o,nt)}throw new Error("Unsupported PNG image data, try using JPEG instead.");};(et=t.API).processGIF89A=function(n,t,i,r){var u=new si(n),s=u.width,h=u.height,f=[],e,o;return u.decodeAndBlitFrameRGBA(0,f),e={data:f,width:s,height:h},o=new hi(100).encode(e,100),et.processJPEG.call(this,o,t,i,r)};et.processGIF87A=et.processGIF89A;(hr=t.API).processBMP=function(n,t,i,r){var u=new e(n,!1),f=u.width,o=u.height,s={data:u.getData(),width:f,height:o},h=new hi(100).encode(s,100);return hr.processJPEG.call(this,h,t,i,r)};t.API.setLanguage=function(n){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"FYRO Macedonian",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[n]&&(this.internal.languageSettings.languageCode=n,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this};b=t.API;ot=b.getCharWidthsArray=function(n,t){for(var i,r=(t=t||{}).font||this.internal.getFont(),l=t.fontSize||this.internal.getFontSize(),a=t.charSpace||this.internal.getCharSpace(),f=t.widths?t.widths:r.metadata.Unicode.widths,h=f.fof?f.fof:1,e=t.kerning?t.kerning:r.metadata.Unicode.kerning,v=e.fof?e.fof:1,c=0,y=f[0]||h,o=[],u=0,s=n.length;u<s;u++)i=n.charCodeAt(u),"function"==typeof r.metadata.widthOfString?o.push((r.metadata.widthOfGlyph(r.metadata.characterToGlyph(i))+a*(1e3/l)||0)/1e3):o.push((f[i]||y)/h+(e[i]&&e[i][c]||0)/v),c=i;return o};st=b.getArraySum=function(n){for(var t=n.length,i=0;t;)i+=n[--t];return i};cr=b.getStringUnitWidth=function(n,t){var i=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),u=t.charSpace||this.internal.getCharSpace();return"function"==typeof r.metadata.widthOfString?r.metadata.widthOfString(n,i,u)/i:st(ot.apply(this,arguments))};lr=function(n,t,i,r){for(var e,o=[],u=0,s=n.length,f=0;u!==s&&f+t[u]<i;)f+=t[u],u++;for(o.push(n.slice(0,u)),e=u,f=0;u!==s;)f+t[u]>r&&(o.push(n.slice(e,u)),f=0,e=u),f+=t[u],u++;return e!==u&&o.push(n.slice(e,u)),o};ar=function(n,t,i){var p,c,w,d;i||(i={});var r,l,a,b,e,f,u=[],y=[u],v=i.textIndent||0,o=0,s=0,h=n.split(" "),k=ot.apply(this,[" ",i])[0];for((f=-1===i.lineIndent?h[0].length+2:i.lineIndent||0)&&(p=Array(f).join(" "),c=[],h.map(function(n){1<(n=n.split(/\s*\n/)).length?c=c.concat(n.map(function(n,t){return(t&&n.length?"\n":"")+n})):c.push(n[0])}),h=c,f=cr.apply(this,[p,i])),a=0,b=h.length;a<b;a++)if(w=0,r=h[a],f&&"\n"==r[0]&&(r=r.substr(1),w=1),l=ot.apply(this,[r,i]),t<v+o+(s=st(l))||w){if(t<s){for(e=lr.apply(this,[r,l,t-(v+o),t]),u.push(e.shift()),u=[e.pop()];e.length;)y.push([e.shift()]);s=st(l.slice(r.length-(u[0]?u[0].length:0)))}else u=[r];y.push(u);v=s+f;o=k}else u.push(r),v+=o+s,o=k;return d=f?function(n,t){return(t?p:"")+n.join(" ")}:function(n){return n.join(" ")},y.map(d)};b.splitTextToSize=function(n,t,i){var f,o=(i=i||{}).fontSize||this.internal.getFontSize(),e=function(n){var t,i;return n.widths&&n.kerning?{widths:n.widths,kerning:n.kerning}:(t=this.internal.getFont(n.fontName,n.fontStyle),i="Unicode",t.metadata[i]?{widths:t.metadata[i].widths||{0:1},kerning:t.metadata[i].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()})}.call(this,i),s,r,h,u;for(f=Array.isArray(n)?n:n.split(/\r?\n/),s=1*this.internal.scaleFactor*t/o,e.textIndent=i.textIndent?1*i.textIndent*this.internal.scaleFactor/o:0,e.lineIndent=i.lineIndent,u=[],r=0,h=f.length;r<h;r++)u=u.concat(ar.apply(this,[f[r],s,e]));return u};vr=t.API;u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:(r=function(n){for(var a="klmnopqrstuvwxyz",u={},i=0;i<a.length;i++)u[a[i]]="0123456789abcdef"[i];var f,e,l,r,t,v={},o=1,s=v,y=[],h="",c="",p=n.length-1;for(i=1;i!=p;)t=n[i],i+=1,"'"==t?e=e?(r=e.join(""),f):[]:e?e.push(t):"{"==t?(y.push([s,r]),s={},r=f):"}"==t?((l=y.pop())[0][l[1]]=s,r=f,s=l[0]):"-"==t?o=-1:r===f?u.hasOwnProperty(t)?(h+=u[t],r=parseInt(h,16)*o,o=1,h=""):h+=t:u.hasOwnProperty(t)?(c+=u[t],s[r]=parseInt(c,16)*o,o=1,r=f,c=""):c+=t;return v})("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")};yr={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}};pr={Unicode:{"Courier-Oblique":r("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":r("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":r("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:r("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":r("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":r("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:r("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:r("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":r("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:r("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":r("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":r("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":r("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":r("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};vr.events.push(["addFont",function(n){var u,f,r,t=n.font,i="Unicode";(u=pr[i][t.postScriptName])&&((f=t.metadata[i]?t.metadata[i]:t.metadata[i]={}).widths=u.widths,f.kerning=u.kerning);(r=yr[i][t.postScriptName])&&((f=t.metadata[i]?t.metadata[i]:t.metadata[i]={}).encoding=r).codePages&&r.codePages.length&&(t.encoding=r.codePages[0])}]);fi=t;"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||"undefined"!=typeof window&&window||Function("return this")();fi.API.events.push(["addFont",function(n){var t=n.font,i=n.instance,r;if(void 0!==i&&i.existsFileInVFS(t.postScriptName)){if(r=i.getFileFromVFS(t.postScriptName),"string"!=typeof r)throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+t.postScriptName+"').");t.metadata=fi.API.TTFFont.open(t.postScriptName,t.fontName,r,t.encoding);t.metadata.Unicode=t.metadata.Unicode||{encoding:{},kerning:{},widths:[]};t.metadata.glyIdsUsed=[0]}else if(!1===t.isStandardFont)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+t.postScriptName+"').");}]);(ht=t.API).addSvg=function(n,t,i,r,u){function tt(n){for(var r=parseFloat(n[1]),u=parseFloat(n[2]),i=[],t=3,f=n.length;t<f;)"c"===n[t]?(i.push([parseFloat(n[t+1]),parseFloat(n[t+2]),parseFloat(n[t+3]),parseFloat(n[t+4]),parseFloat(n[t+5]),parseFloat(n[t+6])]),t+=7):"l"===n[t]?(i.push([parseFloat(n[t+1]),parseFloat(n[t+2])]),t+=3):t+=1;return[r,u,i]}var a,nt,b,e,k;if(void 0===t||void 0===i)throw new Error("addSVG needs values for 'x' and 'y'");var d,g,v,h,y,p,s,f,it=(h=document,f=h.createElement("iframe"),y=".jsPDF_sillysvg_iframe {display:none;position:absolute;}",(s=(p=h).createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=y:s.appendChild(p.createTextNode(y)),p.getElementsByTagName("head")[0].appendChild(s),f.name="childframe",f.setAttribute("width",0),f.setAttribute("height",0),f.setAttribute("frameborder","0"),f.setAttribute("scrolling","no"),f.setAttribute("seamless","seamless"),f.setAttribute("class","jsPDF_sillysvg_iframe"),h.body.appendChild(f),f),w=(d=n,(v=((g=it).contentWindow||g.contentDocument).document).write(d),v.close(),v.getElementsByTagName("svg")[0]),o=[1,1],c=parseFloat(w.getAttribute("width")),l=parseFloat(w.getAttribute("height"));for(c&&l&&(r&&u?o=[r/c,u/l]:r?o=[r/c,r/c]:u&&(o=[u/l,u/l])),k=w.childNodes,a=0,nt=k.length;a<nt;a++)(b=k[a]).tagName&&"PATH"===b.tagName.toUpperCase()&&((e=tt(b.getAttribute("d").split(" ")))[0]=e[0]*o[0]+t,e[1]=e[1]*o[1]+i,this.lines.call(this,e[2],e[0],e[1],o));return this};ht.addSVG=ht.addSvg;ht.addSvgAsImage=function(n,t,i,r,u,f,e,o){var s,h;if(isNaN(t)||isNaN(i))throw console.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(u))throw console.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");return s=document.createElement("canvas"),s.width=r,s.height=u,h=s.getContext("2d"),h.fillStyle="#fff",h.fillRect(0,0,s.width,s.height),canvg(s,n,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0}),this.addImage(s.toDataURL("image/jpeg",1),t,i,r,u,e,o),this};t.API.putTotalPages=function(n){for(var r,u=0,i,u=parseInt(this.internal.getFont().id.substr(1),10)<15?(r=new RegExp(n,"g"),this.internal.getNumberOfPages()):(r=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont())),t=1;t<=this.internal.getNumberOfPages();t++)for(i=0;i<this.internal.pages[t].length;i++)this.internal.pages[t][i]=this.internal.pages[t][i].replace(r,u);return this};t.API.viewerPreferences=function(n,t){function v(n,t){for(var r=!1,i=0;i<n.length;i+=1)n[i]===t&&(r=!0);return r}var r,y;n=n||{};t=t||!1;var f,u,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(a),c=[],e=0,h=0,o=0,l=!0;if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,"reset"===n||!0===t)for(y=s.length,o=0;o<y;o+=1)r[s[o]].value=r[s[o]].defaultValue,r[s[o]].explicitSet=!1;if("object"===i(n))for(f in n)if(u=n[f],v(s,f)&&void 0!==u){if("boolean"===r[f].type&&"boolean"==typeof u)r[f].value=u;else if("name"===r[f].type&&v(r[f].valueSet,u))r[f].value=u;else if("integer"===r[f].type&&Number.isInteger(u))r[f].value=u;else if("array"===r[f].type){for(e=0;e<u.length;e+=1)if(l=!0,1===u[e].length&&"number"==typeof u[e][0])c.push(String(u[e]-1));else if(1<u[e].length){for(h=0;h<u[e].length;h+=1)"number"!=typeof u[e][h]&&(l=!1);!0===l&&c.push([u[e][0]-1,u[e][1]-1].join(" "))}r[f].value="["+c.join(" ")+"]"}else r[f].value=r[f].defaultValue;r[f].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var n,t=[];for(n in r)!0===r[n].explicitSet&&("name"===r[n].type?t.push("/"+n+" /"+r[n].value):t.push("/"+n+" "+r[n].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this};wr=t.API;k=ei=ct="";wr.addMetadata=function(n,t){return ei=t||"http://jspdf.default.namespaceuri/",ct=n,this.internal.events.subscribe("postPutResources",function(){if(ct){var f='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+ei+'"><jspdf:metadata>',n=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),t=unescape(encodeURIComponent(f)),i=unescape(encodeURIComponent(ct)),r=unescape(encodeURIComponent("<\/jspdf:metadata><\/rdf:Description><\/rdf:RDF>")),u=unescape(encodeURIComponent("<\/x:xmpmeta>")),e=t.length+i.length+r.length+n.length+u.length;k=this.internal.newObject();this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e+" >>");this.internal.write("stream");this.internal.write(n+t+i+r+u);this.internal.write("endstream");this.internal.write("endobj")}else k=""}),this.internal.events.subscribe("putCatalog",function(){k&&this.internal.write("/Metadata "+k+" 0 R")}),this},function(n){var t=n.API,u=t.pdfEscape16=function(n,t){for(var i,u=t.metadata.Unicode.widths,e=["","0","00","000","0000"],f=[""],r=0,o=n.length;r<o;++r){if(i=t.metadata.characterToGlyph(n.charCodeAt(r)),t.metadata.glyIdsUsed.push(i),t.metadata.toUnicode[i]=n.charCodeAt(r),-1==u.indexOf(i)&&(u.push(i),u.push([parseInt(t.metadata.widthOfGlyph(i),10)])),"0"==i)return f.join("");i=i.toString(16);f.push(e[4-i.length],i)}return f.join("")},r=function(n){var i,f,t,e,r,u,o;for(r="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",t=[],u=0,o=(f=Object.keys(n).sort(function(n,t){return n-t})).length;u<o;u++)i=f[u],100<=t.length&&(r+="\n"+t.length+" beginbfchar\n"+t.join("\n")+"\nendbfchar",t=[]),e=("0000"+n[i].toString(16)).slice(-4),i=("0000"+(+i).toString(16)).slice(-4),t.push("<"+i+"><"+e+">");return t.length&&(r+="\n"+t.length+" beginbfchar\n"+t.join("\n")+"\nendbfchar\n"),r+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},i;t.events.push(["putFont",function(t){!function(t,i,u,f){var h,c,l,a;if(t.metadata instanceof n.API.TTFFont&&"Identity-H"===t.encoding){for(var v=t.metadata.Unicode.widths,o=t.metadata.subset.encode(t.metadata.glyIdsUsed,1),s="",e=0;e<o.length;e++)s+=String.fromCharCode(o[e]);h=u();f({data:s,addLength1:!0});i("endobj");c=u();f({data:r(t.metadata.toUnicode),addLength1:!0});i("endobj");l=u();i("<<");i("/Type /FontDescriptor");i("/FontName /"+t.fontName);i("/FontFile2 "+h+" 0 R");i("/FontBBox "+n.API.PDFObject.convert(t.metadata.bbox));i("/Flags "+t.metadata.flags);i("/StemV "+t.metadata.stemV);i("/ItalicAngle "+t.metadata.italicAngle);i("/Ascent "+t.metadata.ascender);i("/Descent "+t.metadata.decender);i("/CapHeight "+t.metadata.capHeight);i(">>");i("endobj");a=u();i("<<");i("/Type /Font");i("/BaseFont /"+t.fontName);i("/FontDescriptor "+l+" 0 R");i("/W "+n.API.PDFObject.convert(v));i("/CIDToGIDMap /Identity");i("/DW 1000");i("/Subtype /CIDFontType2");i("/CIDSystemInfo");i("<<");i("/Supplement 0");i("/Registry (Adobe)");i("/Ordering ("+t.encoding+")");i(">>");i(">>");i("endobj");t.objectNumber=u();i("<<");i("/Type /Font");i("/Subtype /Type0");i("/ToUnicode "+c+" 0 R");i("/BaseFont /"+t.fontName);i("/Encoding /"+t.encoding);i("/DescendantFonts ["+a+" 0 R]");i(">>");i("endobj");t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]);t.events.push(["putFont",function(t){!function(t,i,u,f){var h,c,l;if(t.metadata instanceof n.API.TTFFont&&"WinAnsiEncoding"===t.encoding){t.metadata.Unicode.widths;for(var o=t.metadata.rawData,s="",e=0;e<o.length;e++)s+=String.fromCharCode(o[e]);for(h=u(),f({data:s,addLength1:!0}),i("endobj"),c=u(),f({data:r(t.metadata.toUnicode),addLength1:!0}),i("endobj"),l=u(),i("<<"),i("/Descent "+t.metadata.decender),i("/CapHeight "+t.metadata.capHeight),i("/StemV "+t.metadata.stemV),i("/Type /FontDescriptor"),i("/FontFile2 "+h+" 0 R"),i("/Flags 96"),i("/FontBBox "+n.API.PDFObject.convert(t.metadata.bbox)),i("/FontName /"+t.fontName),i("/ItalicAngle "+t.metadata.italicAngle),i("/Ascent "+t.metadata.ascender),i(">>"),i("endobj"),t.objectNumber=u(),e=0;e<t.metadata.hmtx.widths.length;e++)t.metadata.hmtx.widths[e]=parseInt(t.metadata.hmtx.widths[e]*(1e3/t.metadata.head.unitsPerEm));i("<<\/Subtype/TrueType/Type/Font/ToUnicode "+c+" 0 R/BaseFont/"+t.fontName+"/FontDescriptor "+l+" 0 R/Encoding/"+t.encoding+" /FirstChar 29 /LastChar 255 /Widths "+n.API.PDFObject.convert(t.metadata.hmtx.widths)+">>");i("endobj");t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]);i=function(n){var c,t,o=n.text||"",l=n.x,a=n.y,v=n.options||{},i=n.mutex||{},w=i.pdfEscape,y=i.activeFontKey,e=i.fonts,h=(i.activeFontSize,""),r=0,f="",p=e[t=y].encoding,s;if("Identity-H"!==e[t].encoding)return{text:o,x:l,y:a,options:v,mutex:i};for(f=o,t=y,"[object Array]"===Object.prototype.toString.call(o)&&(f=o[0]),r=0;r<f.length;r+=1)e[t].metadata.hasOwnProperty("cmap")&&(c=e[t].metadata.cmap.unicode.codeMap[f[r].charCodeAt(0)]),h+=c?f[r]:f[r].charCodeAt(0)<256&&e[t].metadata.hasOwnProperty("Unicode")?f[r]:"";return s="",parseInt(t.slice(1))<14||"WinAnsiEncoding"===p?s=function(n){for(var i="",t=0;t<n.length;t++)i+=""+n.charCodeAt(t).toString(16);return i}(w(h,t)):"Identity-H"===p&&(s=u(h,e[t])),i.isHex=!0,{text:s,x:l,y:a,options:v,mutex:i}};t.events.push(["postProcessText",function(n){var t=n.text||"",o=n.x,s=n.y,e=n.options,h=n.mutex,u=(e.lang,[]),f={text:t,x:o,y:s,options:e,mutex:h},r;if("[object Array]"===Object.prototype.toString.call(t)){for(r=0,r=0;r<t.length;r+=1)"[object Array]"===Object.prototype.toString.call(t[r])&&3===t[r].length?u.push([i(Object.assign({},f,{text:t[r][0]})).text,t[r][1],t[r][2]]):u.push(i(Object.assign({},f,{text:t[r]})).text);n.text=u}else n.text=i(Object.assign({},f,{text:t})).text}])}(t,"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||"undefined"!=typeof window&&window||Function("return this")());lt=t.API;at=function(n){return void 0!==n&&(void 0===n.vFS&&(n.vFS={}),!0)};lt.existsFileInVFS=function(n){return!!at(this.internal)&&void 0!==this.internal.vFS[n]};lt.addFileToVFS=function(n,t){return at(this.internal),this.internal.vFS[n]=t,this};lt.getFileFromVFS=function(n){return at(this.internal),void 0!==this.internal.vFS[n]?this.internal.vFS[n]:null};t.API.addHTML=function(n,t,i,r,u){var h;if("undefined"==typeof html2canvas&&"undefined"==typeof rasterizeHTML)throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");"number"!=typeof t&&(r=t,u=i);"function"==typeof r&&(u=r,r=null);"function"!=typeof u&&(u=function(){});var s=this.internal,f=s.scaleFactor,e=s.pageSize.getWidth(),o=s.pageSize.getHeight();return((r=r||{}).onrendered=function(n){var v,y,h,p,w;t=parseInt(t)||0;i=parseInt(i)||0;var b=r.dim||{},s=Object.assign({top:0,right:0,bottom:0,left:0,useFor:"content"},r.margin),k=b.h||Math.min(o,n.height/f),c=b.w||Math.min(e,n.width/f)-t,l=r.format||"JPEG",a=r.imageCompression||"SLOW";n.height>o-s.top-s.bottom&&r.pagesplit?(v=function(n,t,i,u,f){var o=document.createElement("canvas"),e;return o.height=f,o.width=u,e=o.getContext("2d"),e.mozImageSmoothingEnabled=!1,e.webkitImageSmoothingEnabled=!1,e.msImageSmoothingEnabled=!1,e.imageSmoothingEnabled=!1,e.fillStyle=r.backgroundColor||"#ffffff",e.fillRect(0,0,u,f),e.drawImage(n,t,i,u,f,0,0,u,f),o},y=function(){for(var w,k,h,p,r=0,b=0,y={},d=!1;;){if(b=0,y.top=0!==r?s.top:i,y.left=0!==r?s.left:t,d=(e-s.left-s.right)*f<n.width,"content"===s.useFor?0===r?(h=Math.min((e-s.left)*f,n.width),p=Math.min((o-s.top)*f,n.height-r)):(h=Math.min(e*f,n.width),p=Math.min(o*f,n.height-r),y.top=0):(h=Math.min((e-s.left-s.right)*f,n.width),p=Math.min((o-s.bottom-s.top)*f,n.height-r)),d)for(;;){if("content"===s.useFor&&(0===b?h=Math.min((e-s.left)*f,n.width):(h=Math.min(e*f,n.width-b),y.left=0)),k=[w=v(n,b,r,h,p),y.left,y.top,w.width/f,w.height/f,l,null,a],this.addImage.apply(this,k),(b+=h)>=n.width)break;this.addPage()}else k=[w=v(n,0,r,h,p),y.left,y.top,w.width/f,w.height/f,l,null,a],this.addImage.apply(this,k);if((r+=p)>=n.height)break;this.addPage()}u(c,r,null,k)}.bind(this),"CANVAS"===n.nodeName?(h=new Image,h.onload=y,h.src=n.toDataURL("image/png"),n=h):y()):(p=Math.random().toString(35),w=[n,t,i,c,k,l,p,a],this.addImage.apply(this,w),u(c,k,p,w))}.bind(this),"undefined"!=typeof html2canvas&&!r.rstz)?html2canvas(n,r):"undefined"==typeof rasterizeHTML?null:(h="drawDocument","string"==typeof n&&(h=/^http/.test(n)?"drawURL":"drawHTML"),r.width=r.width||e*f,rasterizeHTML[h](n,void 0,r).then(function(n){r.onrendered(n.image)},function(n){u(null,n)}))},function(n){var c,u,v,y,p,w,b,k,e,l,t,d,r,f,o,s,g,nt,tt,it,h,a;c=function(){function n(){}return function(t){return n.prototype=t,new n}}();l=function(n){var i,t,r,u,o,f,e;for(t=0,r=n.length,i=void 0,f=u=!1;!u&&t!==r;)(i=n[t]=n[t].trimLeft())&&(u=!0),t++;for(t=r-1;r&&!f&&-1!==t;)(i=n[t]=n[t].trimRight())&&(f=!0),t--;for(o=/\s+$/g,e=!0,t=0;t!==r;)"\u2028"!=n[t]&&(i=n[t].replace(/\s+/g," "),e&&(i=i.trimLeft()),i&&(e=o.test(i)),n[t]=i),t++;return n};d=function(n){for(var r,t=void 0,i=(r=n.split(",")).shift();!t&&i;)t=v[i.trim().toLowerCase()],i=r.shift();return t};r=function(n){var t;return-1<(n="auto"===n?"0px":n).indexOf("em")&&!isNaN(Number(n.replace("em","")))&&(n=18.719*Number(n.replace("em",""))+"px"),-1<n.indexOf("pt")&&!isNaN(Number(n.replace("pt","")))&&(n=1.333*Number(n.replace("pt",""))+"px"),void 0,(t=f[n])?t:void 0!==(t={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[n])?f[n]=t/16:(t=parseFloat(n))?f[n]=t/16:(t=n.match(/([\d\.]+)(px)/),f[n]=Array.isArray(t)&&3===t.length?parseFloat(t[1])/16:1)};e=function(n){var t,u,i,e,f;return f=n,e=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(f,null):f.currentStyle?f.currentStyle:f.style,u=void 0,(t={})["font-family"]=d((i=function(n){return n=n.replace(/-\D/g,function(n){return n.charAt(1).toUpperCase()}),e[n]})("font-family"))||"times",t["font-style"]=y[i("font-style")]||"normal",t["text-align"]=p[i("text-align")]||"left","bold"===(u=w[i("font-weight")]||"normal")&&(t["font-style"]="normal"===t["font-style"]?u:u+t["font-style"]),t["font-size"]=r(i("font-size"))||1,t["line-height"]=r(i("line-height"))||1,t.display="inline"===i("display")?"inline":"block",u="block"===t.display,t["margin-top"]=u&&r(i("margin-top"))||0,t["margin-bottom"]=u&&r(i("margin-bottom"))||0,t["padding-top"]=u&&r(i("padding-top"))||0,t["padding-bottom"]=u&&r(i("padding-bottom"))||0,t["margin-left"]=u&&r(i("margin-left"))||0,t["margin-right"]=u&&r(i("margin-right"))||0,t["padding-left"]=u&&r(i("padding-left"))||0,t["padding-right"]=u&&r(i("padding-right"))||0,t["page-break-before"]=i("page-break-before")||"auto",t.float=b[i("cssFloat")]||"none",t.clear=k[i("clear")]||"none",t.color=i("color"),t};o=function(n,t,i){var r,u,f,e,o;if(f=!1,e=u=void 0,r=i["#"+n.id])if("function"==typeof r)f=r(n,t);else for(u=0,e=r.length;!f&&u!==e;)f=r[u](n,t),u++;if(r=i[n.nodeName],!f&&r)if("function"==typeof r)f=r(n,t);else for(u=0,e=r.length;!f&&u!==e;)f=r[u](n,t),u++;for(o="string"==typeof n.className?n.className.split(" "):[],u=0;u<o.length;u++)if(r=i["."+o[u]],!f&&r)if("function"==typeof r)f=r(n,t);else for(u=0,e=r.length;!f&&u!==e;)f=r[u](n,t),u++;return f};it=function(n,t){var e,u,i,r,o,s,h,f,c;for(e=[],u=[],i=0,c=n.rows[0].cells.length,h=n.clientWidth;i<c;)f=n.rows[0].cells[i],u[i]={name:f.textContent.toLowerCase().replace(/\s+/g,""),prompt:f.textContent.replace(/\r?\n/g,""),width:f.clientWidth/h*t.pdf.internal.pageSize.getWidth()},i++;for(i=1;i<n.rows.length;){for(s=n.rows[i],o={},r=0;r<s.cells.length;)o[u[r].name]=s.cells[r].textContent.replace(/\r?\n/g,""),r++;e.push(o);i++}return{rows:e,headers:u}};h={SCRIPT:1,STYLE:1,NOSCRIPT:1,OBJECT:1,EMBED:1,SELECT:1};a=1;u=function(n,t,r){var f,g,v,y,ft,et,nt,ot,st,ht,p,w,rt,at;for(g=n.childNodes,f=void 0,(ft="block"===(v=e(n)).display)&&(t.setBlockBoundary(),t.setBlockStyle(v)),y=0,et=g.length;y<et;){if("object"===i(f=g[y]))if((t.executeWatchFunctions(f),1===f.nodeType&&"HEADER"===f.nodeName)&&(st=f,ht=t.pdf.margins_doc.top,t.pdf.internal.events.subscribe("addPage",function(){t.y=ht;u(st,t,r);t.pdf.margins_doc.top=t.y+10;t.y+=10},!1)),8===f.nodeType&&"#comment"===f.nodeName)~f.textContent.indexOf("ADD_PAGE")&&(t.pdf.addPage(),t.y=t.pdf.margins_doc.top);else if(1!==f.nodeType||h[f.nodeName])if(3===f.nodeType){if(p=f.nodeValue,f.nodeValue&&"LI"===f.parentNode.nodeName)if("OL"===f.parentNode.parentNode.nodeName)p=a+++". "+p;else{var tt=v["font-size"],vt=(3-.75*tt)*t.pdf.internal.scaleFactor,yt=.75*tt*t.pdf.internal.scaleFactor,pt=1.74*tt/t.pdf.internal.scaleFactor;ot=function(n,t){this.pdf.circle(n+vt,t+yt,pt,"FD")}}16&f.ownerDocument.body.compareDocumentPosition(f)&&t.addText(p,v)}else"string"==typeof f&&t.addText(f,v);else if("IMG"===f.nodeName&&(rt=f.getAttribute("src"),w=s[t.pdf.sHashCode(rt)||rt]),w){t.pdf.internal.pageSize.getHeight()-t.pdf.margins_doc.bottom<t.y+f.height&&t.y>t.pdf.margins_doc.top&&(t.pdf.addPage(),t.y=t.pdf.margins_doc.top,t.executeWatchFunctions(f));var l=e(f),ct=t.x,b=12/t.pdf.internal.scaleFactor,k=(l["margin-left"]+l["padding-left"])*b,d=(l["margin-right"]+l["padding-right"])*b,ut=(l["margin-top"]+l["padding-top"])*b,lt=(l["margin-bottom"]+l["padding-bottom"])*b;ct+=void 0!==l.float&&"right"===l.float?t.settings.width-f.width-d:k;t.pdf.addImage(w,ct,t.y+ut,f.width,f.height);w=void 0;"right"===l.float||"left"===l.float?(t.watchFunctions.push(function(n,i,r,u){return t.y>=i?(t.x+=n,t.settings.width+=r,!0):!!(u&&1===u.nodeType&&!h[u.nodeName]&&t.x+u.width>t.pdf.margins_doc.left+t.pdf.margins_doc.width)&&(t.x+=n,t.y=i,t.settings.width+=r,!0)}.bind(this,"left"===l.float?-f.width-k-d:0,t.y+f.height+ut+lt,f.width)),t.watchFunctions.push(function(n,i,r){return!(t.y<n&&i===t.pdf.internal.getNumberOfPages())||1===r.nodeType&&"both"===e(r).clear&&(t.y=n,!0)}.bind(this,t.y+f.height,t.pdf.internal.getNumberOfPages())),t.settings.width-=f.width+k+d,"left"===l.float&&(t.x+=f.width+k+d)):t.y+=f.height+ut+lt}else"TABLE"===f.nodeName?(nt=it(f,t),t.y+=10,t.pdf.table(t.x,t.y,nt.rows,nt.headers,{autoSize:!1,printHeaders:r.printHeaders,margins:t.pdf.margins_doc,css:e(f)}),t.y=t.pdf.lastCellPos.y+t.pdf.lastCellPos.h+20):"OL"===f.nodeName||"UL"===f.nodeName?(a=1,o(f,t,r)||u(f,t,r),t.y+=10):"LI"===f.nodeName?(at=t.x,t.x+=20/t.pdf.internal.scaleFactor,t.y+=3,o(f,t,r)||u(f,t,r),t.x=at):"BR"===f.nodeName?(t.y+=v["font-size"]*t.pdf.internal.scaleFactor,t.addText("\u2028",c(v))):o(f,t,r)||u(f,t,r);y++}if(r.outY=t.y,ft)return t.setBlockBoundary(ot)};s={};g=function(n,t,i,r){function h(){t.pdf.internal.events.publish("imagesLoaded");r(o)}function c(n,i,r){if(n){var u=new Image;o=++e;u.crossOrigin="";u.onerror=u.onload=function(){if(u.complete&&(0===u.src.indexOf("data:image/")&&(u.width=i||u.width||0,u.height=r||u.height||0),u.width+u.height)){var f=t.pdf.sHashCode(n)||n;s[f]=s[f]||u}--e||h()};u.src=n}}for(var o,u=n.getElementsByTagName("img"),f=u.length,e=0;f--;)c(u[f].getAttribute("src"),u[f].width,u[f].height);return e||h()};nt=function(n,t,i){var r=n.getElementsByTagName("footer"),s,e,f;if(0<r.length){r=r[0];s=t.pdf.internal.write;e=t.y;t.pdf.internal.write=function(){};u(r,t,i);f=Math.ceil(t.y-e)+5;t.y=e;t.pdf.internal.write=s;t.pdf.margins_doc.bottom+=f;for(var c=function(n){var s=void 0!==n?n.pageNumber:1,h=t.y,o,e;for(t.y=t.pdf.internal.pageSize.getHeight()-t.pdf.margins_doc.bottom,t.pdf.margins_doc.bottom-=f,o=r.getElementsByTagName("span"),e=0;e<o.length;++e)-1<(" "+o[e].className+" ").replace(/[\n\t]/g," ").indexOf(" pageCounter ")&&(o[e].innerHTML=s),-1<(" "+o[e].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")&&(o[e].innerHTML="###jsPDFVarTotalPages###");u(r,t,i);t.pdf.margins_doc.bottom+=f;t.y=h},l=r.getElementsByTagName("span"),o=0;o<l.length;++o)-1<(" "+l[o].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")&&t.pdf.internal.events.subscribe("htmlRenderingFinished",t.pdf.putTotalPages.bind(t.pdf,"###jsPDFVarTotalPages###"),!0);t.pdf.internal.events.subscribe("addPage",c,!1);c();h.FOOTER=1}};tt=function(n,i,r,f,e,o){var v,h,c,l,a,s;return i?("string"==typeof i||i.parentNode||(i=""+i.innerHTML),"string"==typeof i&&(v=i.replace(/<\/?script[^>]*?>/gi,""),l="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),(c=document.createElement("div")).style.cssText="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",c.innerHTML='<iframe style="height:1px;width:1px" name="'+l+'" />',document.body.appendChild(c),(h=window.frames[l]).document.open(),h.document.writeln(v),h.document.close(),i=h.document.body),s=new t(n,r,f,e),g.call(this,i,s,e.elementHandlers,function(n){nt(i,s,e.elementHandlers);u(i,s,e.elementHandlers);s.pdf.internal.events.publish("htmlRenderingFinished");a=s.dispose();"function"==typeof o?o(a):n&&console.error("jsPDF Warning: rendering issues? provide a callback to fromHTML!")}),a||{x:s.x,y:s.y}):!1};(t=function(n,t,i,r){return this.pdf=n,this.x=t,this.y=i,this.settings=r,this.watchFunctions=[],this.init(),this}).prototype.init=function(){return this.paragraph={text:[],style:[]},this.pdf.internal.write("q")};t.prototype.dispose=function(){return this.pdf.internal.write("Q"),{x:this.x,y:this.y,ready:!0}};t.prototype.executeWatchFunctions=function(n){var i=!1,r=[],t;if(0<this.watchFunctions.length){for(t=0;t<this.watchFunctions.length;++t)!0===this.watchFunctions[t](n)?i=!0:r.push(this.watchFunctions[t]);this.watchFunctions=r}return i};t.prototype.splitFragmentsIntoLines=function(n,t){var h,a,s,k,o,l,v,f,y,p,e,r,w,i,u,d,b,g;for(p=this.pdf.internal.scaleFactor,k={},l=v=f=i=o=s=y=a=void 0,r=[e=[]],h=0,w=this.settings.width;n.length;)if(o=n.shift(),i=t.shift(),o)if((s=k[(a=i["font-family"])+(y=i["font-style"])])||(s=this.pdf.internal.getFont(a,y).metadata.Unicode,k[a+y]=s),f={widths:s.widths,kerning:s.kerning,fontSize:12*i["font-size"],textIndent:h},v=this.pdf.getStringUnitWidth(o,f)*f.fontSize/p,"\u2028"==o)e=[],r.push(e);else if(w<h+v){for(l=this.pdf.splitTextToSize(o,w,f),e.push([l.shift(),i]);l.length;)e=[[l.shift(),i]],r.push(e);h=this.pdf.getStringUnitWidth(e[0][0],f)*f.fontSize/p}else e.push([o,i]),h+=v;if(void 0!==i["text-align"]&&("center"===i["text-align"]||"right"===i["text-align"]||"justify"===i["text-align"]))for(u=0;u<r.length;++u)d=this.pdf.getStringUnitWidth(r[u][0][0],f)*f.fontSize/p,0<u&&(r[u][0][1]=c(r[u][0][1])),b=w-d,"right"===i["text-align"]?r[u][0][1]["margin-left"]=b:"center"===i["text-align"]?r[u][0][1]["margin-left"]=b/2:"justify"===i["text-align"]&&(g=r[u][0][0].split(" ").length-1,r[u][0][1]["word-spacing"]=b/g,u===r.length-1&&(r[u][0][1]["word-spacing"]=0));return r};t.prototype.RenderTextFragment=function(n,t){var u,i,r;i=0;this.pdf.internal.pageSize.getHeight()-this.pdf.margins_doc.bottom<this.y+this.pdf.internal.getFontSize()&&(this.pdf.internal.write("ET","Q"),this.pdf.addPage(),this.y=this.pdf.margins_doc.top,this.pdf.internal.write("q","BT",this.getPdfColor(t.color),this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td"),i=Math.max(i,t["line-height"],t["font-size"]),this.pdf.internal.write(0,(-12*i).toFixed(2),"Td"));u=this.pdf.internal.getFont(t["font-family"],t["font-style"]);r=this.getPdfColor(t.color);r!==this.lastTextColor&&(this.pdf.internal.write(r),this.lastTextColor=r);void 0!==t["word-spacing"]&&0<t["word-spacing"]&&this.pdf.internal.write(t["word-spacing"].toFixed(2),"Tw");this.pdf.internal.write("/"+u.id,(12*t["font-size"]).toFixed(2),"Tf","("+this.pdf.internal.pdfEscape(n)+") Tj");void 0!==t["word-spacing"]&&this.pdf.internal.write(0,"Tw")};t.prototype.getPdfColor=function(n){var t,i,r,f=/rgb\s*\(\s*(\d+),\s*(\d+),\s*(\d+\s*)\)/.exec(n),o,e,u;return null!=f?(t=parseInt(f[1]),i=parseInt(f[2]),r=parseInt(f[3])):("string"==typeof n&&"#"!=n.charAt(0)&&(o=new RGBColor(n),n=o.ok?o.toHex():"#000000"),t=n.substring(1,3),t=parseInt(t,16),i=n.substring(3,5),i=parseInt(i,16),r=n.substring(5,7),r=parseInt(r,16)),"string"==typeof t&&/^#[0-9A-Fa-f]{6}$/.test(t)&&(e=parseInt(t.substr(1),16),t=e>>16&255,i=e>>8&255,r=255&e),u=this.f3,0===t&&0===i&&0===r||void 0===i?u(t/255)+" g":[u(t/255),u(i/255),u(r/255),"rg"].join(" ")};t.prototype.f3=function(n){return n.toFixed(3)};t.prototype.renderParagraph=function(n){var r,u,h,t,s,i,f,e,o,b,c,k,d,a,v,y,p,w;if(h=l(this.paragraph.text),k=this.paragraph.style,r=this.paragraph.blockstyle,this.paragraph.priorblockstyle||{},this.paragraph={text:[],style:[],blockstyle:{},priorblockstyle:r},h.join("").trim()){for(f=this.splitFragmentsIntoLines(h,k),e=i=void 0,u=12/this.pdf.internal.scaleFactor,this.priorMarginBottom=this.priorMarginBottom||0,c=(Math.max((r["margin-top"]||0)-this.priorMarginBottom,0)+(r["padding-top"]||0))*u,b=((r["margin-bottom"]||0)+(r["padding-bottom"]||0))*u,this.priorMarginBottom=r["margin-bottom"]||0,"always"===r["page-break-before"]&&(this.pdf.addPage(),this.y=0,c=((r["margin-top"]||0)+(r["padding-top"]||0))*u),o=this.pdf.internal.write,s=t=void 0,this.y+=c,o("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td"),a=0;f.length;){for(t=e=0,s=(i=f.shift()).length;t!==s;)i[t][0].trim()&&(e=Math.max(e,i[t][1]["line-height"],i[t][1]["font-size"]),d=7*i[t][1]["font-size"]),t++;for(v=0,y=0,void 0!==i[0][1]["margin-left"]&&0<i[0][1]["margin-left"]&&(v=(y=this.pdf.internal.getCoordinateString(i[0][1]["margin-left"]))-a,a=y),o(v+Math.max(r["margin-left"]||0,0)*u,(-12*e).toFixed(2),"Td"),t=0,s=i.length;t!==s;)i[t][0]&&this.RenderTextFragment(i[t][0],i[t][1]),t++;(this.y+=e*u,this.executeWatchFunctions(i[0][1])&&0<f.length)&&(p=[],w=[],f.forEach(function(n){for(var t=0,i=n.length;t!==i;)n[t][0]&&(p.push(n[t][0]+" "),w.push(n[t][1])),++t}),f=this.splitFragmentsIntoLines(l(p),w),o("ET","Q"),o("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td"))}return n&&"function"==typeof n&&n.call(this,this.x-9,this.y-d/2),o("ET","Q"),this.y+=b}};t.prototype.setBlockBoundary=function(n){return this.renderParagraph(n)};t.prototype.setBlockStyle=function(n){return this.paragraph.blockstyle=n};t.prototype.addText=function(n,t){return this.paragraph.text.push(n),this.paragraph.style.push(t)};v={helvetica:"helvetica","sans-serif":"helvetica","times new roman":"times",serif:"times",times:"times",monospace:"courier",courier:"courier"};w={100:"normal",200:"normal",300:"normal",400:"normal",500:"bold",600:"bold",700:"bold",800:"bold",900:"bold",normal:"normal",bold:"bold",bolder:"bold",lighter:"normal"};y={normal:"normal",italic:"italic",oblique:"italic"};p={left:"left",right:"right",center:"center",justify:"justify"};b={none:"none",right:"right",left:"left"};k={none:"none",both:"both"};f={normal:1};n.fromHTML=function(n,t,i,r,u,f){return this.margins_doc=f||{top:0,bottom:0},r||(r={}),r.elementHandlers||(r.elementHandlers={}),tt(this,n,isNaN(t)?4:t,isNaN(i)?4:i,r,u)}}(t.API);t.API;("undefined"!=typeof window&&window||"undefined"!=typeof global&&global).html2pdf=function(n,t,i){var e=t.canvas,s,o,r,f,u,h;e?(((e.pdf=t).annotations={_nameMap:[],createAnnotation:function(n,i){var r,f=t.context2d._wrapX(i.left),e=t.context2d._wrapY(i.top),u=(t.context2d._page(i.top),n.indexOf("#"));r=0<=u?{name:n.substring(u+1)}:{url:n};t.link(f,e,i.right-i.left,i.bottom-i.top,r)},setName:function(n,i){var r=t.context2d._wrapX(i.left),u=t.context2d._wrapY(i.top),f=t.context2d._page(i.top);this._nameMap[n]={page:f,x:r,y:u}}},e.annotations=t.annotations,t.context2d._pageBreakAt=function(n){this.pageBreaks.push(n)},t.context2d._gotoPage=function(n){for(;t.internal.getNumberOfPages()<n;)t.addPage();t.setPage(n)},"string"==typeof n)?(n=n.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),u=document.createElement("iframe"),document.body.appendChild(u),null!=(r=u.contentDocument)&&null!=r||(r=u.contentWindow.document),r.open(),r.write(n),r.close(),s=r.body,f=r.body||{},n=r.documentElement||{},o=Math.max(f.scrollHeight,f.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)):(f=(s=n).body||{},o=Math.max(f.scrollHeight,f.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)),h={async:!0,allowTaint:!0,backgroundColor:"#ffffff",canvas:e,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1,windowHeight:o=t.internal.pageSize.getHeight(),scrollY:o},t.context2d.pageWrapYEnabled=!0,t.context2d.pageWrapY=t.internal.pageSize.getHeight(),html2canvas(s,h).then(function(){i&&(u&&u.parentElement.removeChild(u),i(t))})):alert("jsPDF canvas plugin not installed")};window.tmp=html2pdf,function(n){function o(n){return n.map(function(n){var t,i;return n.buffer instanceof ArrayBuffer?(t=n.buffer,n.byteLength!==t.byteLength&&(i=new Uint8Array(n.byteLength),i.set(new Uint8Array(t,n.byteOffset,n.byteLength)),t=i.buffer),t):n})}function s(n,t){t=t||{};var r=new i;return o(n).forEach(function(n){r.append(n)}),t.type?r.getBlob(t.type):r.getBlob()}function h(n,t){return new l(o(n),t||{})}function c(){var u=!!n.ActiveXObject||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,r=n.XMLHttpRequest&&n.XMLHttpRequest.prototype.send,i;u&&r&&(XMLHttpRequest.prototype.send=function(n){n instanceof Blob&&this.setRequestHeader("Content-Type",n.type);r.call(this,n)});try{new File([],"")}catch(u){try{i=new Function('class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name;this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date;this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File')();n.File=i}catch(u){i=function(n,i,r){var u=new Blob(n,r),f=r&&void 0!==r.lastModified?new Date(r.lastModified):new Date;return u.name=i,u.lastModifiedDate=f,u.lastModified=+f,u.toString=function(){return"[object File]"},t&&(u[t]="File"),u};n.File=i}}}var i=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder;n.URL=n.URL||n.webkitURL||function(n,t){return(t=document.createElement("a")).href=n,t};var l=n.Blob,a=URL.createObjectURL,u=URL.revokeObjectURL,t=n.Symbol&&n.Symbol.toStringTag,f=!1,e=!1,r=!!n.ArrayBuffer,v=i&&i.prototype.append&&i.prototype.getBlob;try{f=2===new Blob(["ä"]).size;e=2===new Blob([new Uint8Array([1,2])]).size}catch(f){}if(n.Blob&&(s.prototype=Blob.prototype,h.prototype=Blob.prototype),t)try{File.prototype[t]="File";Blob.prototype[t]="Blob";FileReader.prototype[t]="FileReader"}catch(f){}f?(c(),n.Blob=e?n.Blob:h):v?(c(),n.Blob=s):function(){function s(n){for(var t,i=[],r=0;r<n.length;r++)t=n.charCodeAt(r),t<128?i.push(t):t<2048?i.push(192|t>>6,128|63&t):t<55296||57344<=t?i.push(224|t>>12,128|t>>6&63,128|63&t):(r++,t=65536+((1023&t)<<10|1023&n.charCodeAt(r)),i.push(240|t>>18,128|t>>12&63,128|t>>6&63,128|63&t));return i}function h(n){var i,t,f,r,u,e;for(i="",f=n.length,t=0;t<f;)switch((r=n[t++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i+=String.fromCharCode(r);break;case 12:case 13:u=n[t++];i+=String.fromCharCode((31&r)<<6|63&u);break;case 14:u=n[t++];e=n[t++];i+=String.fromCharCode((15&r)<<12|(63&u)<<6|(63&e)<<0)}return i}function c(n){for(var t=new Array(n.byteLength),r=new Uint8Array(n),i=t.length;i--;)t[i]=r[i];return t}function l(n){for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[],t=0;t<n.length;t+=3){var u=n[t],f=t+1<n.length,e=f?n[t+1]:0,o=t+2<n.length,s=o?n[t+2]:0,l=u>>2,a=(3&u)<<4|e>>4,h=(15&e)<<2|s>>6,c=63&s;o||(c=64,f||(h=64));r.push(i[l],i[a],i[h],i[c])}return r.join("")}function i(n,t){for(var u,o,f=0,e=(n=n||[]).length;f<e;f++)u=n[f],n[f]=u instanceof i?u._buffer:"string"==typeof u?s(u):r&&(ArrayBuffer.prototype.isPrototypeOf(u)||y(u))?c(u):r&&(o=u)&&DataView.prototype.isPrototypeOf(o)?c(u.buffer):s(String(u));this._buffer=[].concat.apply([],n);this.size=this._buffer.length;this.type=t&&t.type||""}function f(n,t,r){var u=i.call(this,n,r=r||{})||this;return u.name=t,u.lastModifiedDate=r.lastModified?new Date(r.lastModified):new Date,u.lastModified=+u.lastModifiedDate,u}function t(){if(!(this instanceof t))throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");var n=document.createDocumentFragment();this.addEventListener=n.addEventListener;this.dispatchEvent=function(t){var i=this["on"+t.type];"function"==typeof i&&i(t);n.dispatchEvent(t)};this.removeEventListener=n.removeEventListener}function o(n,r,u){if(!(r instanceof i))throw new TypeError("Failed to execute '"+u+"' on 'FileReader': parameter 1 is not of type 'Blob'.");n.result="";setTimeout(function(){this.readyState=t.LOADING;n.dispatchEvent(new Event("load"));n.dispatchEvent(new Event("loadend"))})}var p=Object.create||function(n){function t(){}return t.prototype=n,new t},v,y,e;if(r&&(v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],y=ArrayBuffer.isView||function(n){return n&&-1<v.indexOf(Object.prototype.toString.call(n))}),i.prototype.slice=function(n,t,r){return new i([this._buffer.slice(n||0,t||this._buffer.length)],{type:r})},i.prototype.toString=function(){return"[object Blob]"},(f.prototype=p(i.prototype)).constructor=f,Object.setPrototypeOf)Object.setPrototypeOf(f,i);else try{f.__proto__=i}catch(p){}f.prototype.toString=function(){return"[object File]"};t.EMPTY=0;t.LOADING=1;t.DONE=2;t.prototype.error=null;t.prototype.onabort=null;t.prototype.onerror=null;t.prototype.onload=null;t.prototype.onloadend=null;t.prototype.onloadstart=null;t.prototype.onprogress=null;t.prototype.readAsDataURL=function(n){o(this,n,"readAsDataURL");this.result="data:"+n.type+";base64,"+l(n._buffer)};t.prototype.readAsText=function(n){o(this,n,"readAsText");this.result=h(n._buffer)};t.prototype.readAsArrayBuffer=function(n){o(this,n,"readAsText");this.result=n._buffer.slice()};t.prototype.abort=function(){};URL.createObjectURL=function(n){return n instanceof i?"data:"+n.type+";base64,"+l(n._buffer):a.call(URL,n)};URL.revokeObjectURL=function(n){u&&u.call(URL,n)};e=n.XMLHttpRequest&&n.XMLHttpRequest.prototype.send;e&&(XMLHttpRequest.prototype.send=function(n){n instanceof i?(this.setRequestHeader("Content-Type",n.type),e.call(this,h(n._buffer))):e.call(this,n)});n.FileReader=t;n.File=f;n.Blob=i}()}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")());l=l||function(n){if(!(void 0===n||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var h=n.document,r=function(){return n.URL||n.webkitURL||n},i=h.createElementNS("http://www.w3.org/1999/xhtml","a"),c="download"in i,l=/constructor/i.test(n.HTMLElement)||n.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent),f=n.setImmediate||n.setTimeout,a=function(n){f(function(){throw n;},0)},e=function(n){setTimeout(function(){"string"==typeof n?r().revokeObjectURL(n):n.remove()},4e4)},o=function(n){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob([String.fromCharCode(65279),n],{type:n.type}):n},s=function(t,s,h){h||(t=o(t));var y,v=this,w="application/octet-stream"===t.type,p=function(){!function(n,t,i){for(var u,r=(t=[].concat(t)).length;r--;)if(u=n["on"+t[r]],"function"==typeof u)try{u.call(n,i||n)}catch(n){a(n)}}(v,"writestart progress write writeend".split(" "))};if(v.readyState=v.INIT,c)return y=r().createObjectURL(t),void f(function(){var n,t;i.href=y;i.download=s;n=i;t=new MouseEvent("click");n.dispatchEvent(t);p();e(y);v.readyState=v.DONE},0);!function(){if((u||w&&l)&&n.FileReader){var i=new FileReader;return i.onloadend=function(){var t=u?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");n.open(t,"_blank")||(n.location.href=t);t=void 0;v.readyState=v.DONE;p()},i.readAsDataURL(t),v.readyState=v.INIT}y||(y=r().createObjectURL(t));w?n.location.href=y:n.open(y,"_blank")||(n.location.href=y);v.readyState=v.DONE;p();e(y)}()},t=s.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(n,t,i){return t=t||n.name||"download",i||(n=o(n)),navigator.msSaveOrOpenBlob(n,t)}:(t.abort=function(){},t.readyState=t.INIT=0,t.WRITING=1,t.DONE=2,t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null,function(n,t,i){return new s(n,t||n.name||"download",i)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0);try{exports.GifWriter=function(n,t,i,r){function v(n){var t=n.length;if(t<2||256<t||t&t-1)throw"Invalid code/color length, must be power of 2 and 2 .. 256.";return t}var u=0,e=void 0===(r=void 0===r?{}:r).loop?null:r.loop,f=void 0===r.palette?null:r.palette,o,h,c,l,y,a,s;if(t<=0||i<=0||65535<t||65535<i)throw"Width/Height invalid.";if(n[u++]=71,n[u++]=73,n[u++]=70,n[u++]=56,n[u++]=57,n[u++]=97,o=0,h=0,null!==f){for(c=v(f);c>>=1;)++o;if(c=1<<o,--o,void 0!==r.background){if(c<=(h=r.background))throw"Background index out of range.";if(0===h)throw"Background index explicitly passed as 0.";}}if(n[u++]=255&t,n[u++]=t>>8&255,n[u++]=255&i,n[u++]=i>>8&255,n[u++]=(null!==f?128:0)|o,n[u++]=h,n[u++]=0,null!==f)for(l=0,y=f.length;l<y;++l)a=f[l],n[u++]=a>>16&255,n[u++]=a>>8&255,n[u++]=255&a;if(null!==e){if(e<0||65535<e)throw"Loop count invalid.";n[u++]=33;n[u++]=255;n[u++]=11;n[u++]=78;n[u++]=69;n[u++]=84;n[u++]=83;n[u++]=67;n[u++]=65;n[u++]=80;n[u++]=69;n[u++]=50;n[u++]=46;n[u++]=48;n[u++]=3;n[u++]=1;n[u++]=255&e;n[u++]=e>>8&255;n[u++]=0}s=!1;this.addFrame=function(t,i,r,e,o,h){var y,c,p,l,w,a,b,k,d,nt,g;if(!0===s&&(--u,s=!1),h=void 0===h?{}:h,t<0||i<0||65535<t||65535<i)throw"x/y invalid.";if(r<=0||e<=0||65535<r||65535<e)throw"Width/Height invalid.";if(o.length<r*e)throw"Not enough pixels for the frame size.";if(y=!0,c=h.palette,null==c&&(y=!1,c=f),null==c)throw"Must supply either a local or global palette.";for(p=v(c),l=0;p>>=1;)++l;if(p=1<<l,w=void 0===h.delay?0:h.delay,a=void 0===h.disposal?0:h.disposal,a<0||3<a)throw"Disposal out of range.";if(b=!1,k=0,void 0!==h.transparent&&null!==h.transparent&&(b=!0,(k=h.transparent)<0||p<=k))throw"Transparent color index.";if((0!==a||b||0!==w)&&(n[u++]=33,n[u++]=249,n[u++]=4,n[u++]=a<<2|(!0===b?1:0),n[u++]=255&w,n[u++]=w>>8&255,n[u++]=k,n[u++]=0),n[u++]=44,n[u++]=255&t,n[u++]=t>>8&255,n[u++]=255&i,n[u++]=i>>8&255,n[u++]=255&r,n[u++]=r>>8&255,n[u++]=255&e,n[u++]=e>>8&255,n[u++]=!0===y?128|l-1:0,!0===y)for(d=0,nt=c.length;d<nt;++d)g=c[d],n[u++]=g>>16&255,n[u++]=g>>8&255,n[u++]=255&g;u=function(n,t,i,r){function w(i){for(;i<=f;)n[t++]=255&e,e>>=8,f-=8,t===u+256&&(n[u]=255,u=t++)}function l(n){e|=n<<f;f+=s;w(8)}var o,a,v,b;n[t++]=i;var u=t++,h=1<<i,p=h-1,y=h+1,c=y+1,s=i+1,f=0,e=0;for(o=r[0]&p,a={},l(h),v=1,b=r.length;v<b;++v){var k=r[v]&p,d=o<<8|k,g=a[d];if(void 0===g){for(e|=o<<f,f+=s;8<=f;)n[t++]=255&e,e>>=8,f-=8,t===u+256&&(n[u]=255,u=t++);4096===c?(l(h),c=y+1,s=i+1,a={}):(1<<s<=c&&++s,a[d]=c++);o=k}else o=g}return l(o),l(y),w(1),u+1===t?n[u]=0:(n[u]=t-u-1,n[t++]=0),t}(n,u,l<2?2:l,o)};this.end=function(){return!1===s&&(n[u++]=59,s=!0),u}};exports.GifReader=si}catch(o){}window.tmp=si;t.API.adler32cs=(d="function"==typeof ArrayBuffer&&"function"==typeof Uint8Array,y=null,vt=function(){if(!d)return function(){return!1};try{var n={};"function"==typeof n.Buffer&&(y=n.Buffer)}catch(n){}return function(n){return n instanceof ArrayBuffer||null!==y&&n instanceof y}}(),yt=null!==y?function(n){return new y(n,"utf8").toString("binary")}:function(n){return unescape(encodeURIComponent(n))},a=function(n,t){for(var i=65535&n,r=n>>>16,u=0,f=t.length;u<f;u++)i=(i+(255&t.charCodeAt(u)))%65521,r=(r+i)%65521;return(r<<16|i)>>>0},pt=function(n,t){for(var i=65535&n,r=n>>>16,u=0,f=t.length;u<f;u++)i=(i+t[u])%65521,r=(r+i)%65521;return(r<<16|i)>>>0},gr=(g={}).Adler32=(((c=(h=function(n){if(!(this instanceof h))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(n=null==n?1:+n))throw new Error("First arguments needs to be a finite number.");this.checksum=n>>>0}).prototype={}).constructor=h).from=((br=function(n){if(!(this instanceof h))throw new TypeError("Constructor cannot called be as a function.");if(null==n)throw new Error("First argument needs to be a string.");this.checksum=a(1,n.toString())}).prototype=c,br),h.fromUtf8=((kr=function(n){if(!(this instanceof h))throw new TypeError("Constructor cannot called be as a function.");if(null==n)throw new Error("First argument needs to be a string.");var t=yt(n.toString());this.checksum=a(1,t)}).prototype=c,kr),d&&(h.fromBuffer=((dr=function(n){if(!(this instanceof h))throw new TypeError("Constructor cannot called be as a function.");if(!vt(n))throw new Error("First argument needs to be ArrayBuffer.");var t=new Uint8Array(n);return this.checksum=pt(1,t)}).prototype=c,dr)),c.update=function(n){if(null==n)throw new Error("First argument needs to be a string.");return n=n.toString(),this.checksum=a(this.checksum,n)},c.updateUtf8=function(n){if(null==n)throw new Error("First argument needs to be a string.");var t=yt(n.toString());return this.checksum=a(this.checksum,t)},d&&(c.updateBuffer=function(n){if(!vt(n))throw new Error("First argument needs to be ArrayBuffer.");var t=new Uint8Array(n);return this.checksum=pt(this.checksum,t)}),c.clone=function(){return new gr(this.checksum)},h),g.from=function(n){if(null==n)throw new Error("First argument needs to be a string.");return a(1,n.toString())},g.fromUtf8=function(n){if(null==n)throw new Error("First argument needs to be a string.");var t=yt(n.toString());return a(1,t)},d&&(g.fromBuffer=function(n){if(!vt(n))throw new Error("First argument need to be ArrayBuffer.");var t=new Uint8Array(n);return pt(1,t)}),g),function(n){n.__bidiEngine__=n.prototype.__bidiEngine__=function(n){var l,a,e,r,o,u,h,k=i,d=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],nt={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},tt={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},v=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],it=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),s=!1,t=0;this.__bidiEngine__={};var y=function(n){var i=n.charCodeAt(),t=i>>8,r=tt[t];return void 0!==r?k[256*r+(255&i)]:252===t||253===t?"AL":it.test(t)?"L":8===t?"R":"N"},p=function(n){for(var i,t=0;t<n.length;t++){if("L"===(i=y(n.charAt(t))))return!1;if("R"===i)return!0}return!1},rt=function(n,i,u,f){var c,y,h,v,o=i[f],p,w;switch(o){case"L":case"R":s=!1;break;case"EN":s&&(o="AN");break;case"AL":s=!0;o="R";break;case"WS":o="N";break;case"CS":f<1||f+1>=i.length||"EN"!==(c=u[f-1])&&"AN"!==c||"EN"!==(y=i[f+1])&&"AN"!==y?o="N":s&&(y="AN");o=y===c?y:"N";break;case"ES":o="EN"===(c=0<f?u[f-1]:"B")&&f+1<i.length&&"EN"===i[f+1]?"EN":"N";break;case"ET":if(0<f&&"EN"===u[f-1]){o="EN";break}if(s){o="N";break}for(h=f+1,v=i.length;h<v&&"ET"===i[h];)h++;o=h<v&&"EN"===i[h]?"EN":"N";break;case"NSM":if(e&&!r){for(v=i.length,h=f+1;h<v&&"NSM"===i[h];)h++;if(h<v&&(p=n[f],w=1425<=p&&p<=2303||64286===p,c=i[h],w&&("R"===c||"AL"===c))){o="R";break}}o=f<1||"B"===(c=i[f-1])?"N":u[f-1];break;case"B":l=!(s=!1);o=t;break;case"S":a=!0;o="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":s=!1;break;case"BN":o="N"}return o},c=function(n,i,r){var u=n.split("");return r&&w(u,r,{hiLevel:t}),u.reverse(),i&&i.reverse(),u.join("")},w=function(n,i,r){var c,u,f,v,k,e=-1,p=n.length,o=0,w=[],b=t?g:d,h=[];for(a=l=s=!1,u=0;u<p;u++)h[u]=y(n[u]);for(f=0;f<p;f++){if(k=o,w[f]=rt(n,h,w,f),c=240&(o=b[k][nt[w[f]]]),o&=15,i[f]=v=b[o][5],0<c)if(16===c){for(u=e;u<f;u++)i[u]=1;e=-1}else e=-1;if(b[o][6])-1===e&&(e=f);else if(-1<e){for(u=e;u<f;u++)i[u]=v;e=-1}"B"===h[f]&&(i[f]=0);r.hiLevel|=v}a&&function(n,i,r){for(var f,u=0;u<r;u++)if("S"===n[u])for(i[u]=t,f=u-1;0<=f&&"WS"===n[f];f--)i[f]=t}(h,i,p)},b=function(n,i,r,u,f){if(!(f.hiLevel<n)){if(1===n&&1===t&&!l)return i.reverse(),void(r&&r.reverse());for(var c,e,s,o,a=i.length,h=0;h<a;){if(u[h]>=n){for(s=h+1;s<a&&u[s]>=n;)s++;for(o=h,e=s-1;o<e;o++,e--)c=i[o],i[o]=i[e],i[e]=c,r&&(c=r[o],r[o]=r[e],r[e]=c);h=s}h++}}},f=function(n,i,r){var u=n.split(""),f={hiLevel:t};return r||(r=[]),w(u,r,f),function(n,t,i){if(0!==i.hiLevel&&h)for(var u,r=0;r<n.length;r++)1===t[r]&&0<=(u=v.indexOf(n[r]))&&(n[r]=v[u+1])}(u,r,f),b(2,u,i,r,f),b(1,u,i,r,f),u.join("")};return this.__bidiEngine__.doBidiReorder=function(n,i,s){if(function(n,t){if(t)for(var i=0;i<n.length;i++)t[i]=i;void 0===r&&(r=p(n));void 0===u&&(u=p(n))}(n,i),e||!o||u)if(e&&o&&r^u)t=r?1:0,n=c(n,i,s);else if(!e&&o&&u)t=r?1:0,n=f(n,i,s),n=c(n,i);else if(!e||r||o||u){if(e&&!o&&r^u)n=c(n,i),n=r?(t=0,f(n,i,s)):(t=1,n=f(n,i,s),c(n,i));else if(e&&r&&!o&&u)t=1,n=f(n,i,s),n=c(n,i);else if(!e&&!o&&r^u){var l=h;r?(t=1,n=f(n,i,s),t=0,h=!1,n=f(n,i,s),h=l):(t=0,n=f(n,i,s),n=c(n,i),h=!(t=1),n=f(n,i,s),h=l,n=c(n,i))}}else t=0,n=f(n,i,s);else t=r?1:0,n=f(n,i,s);return n},this.__bidiEngine__.setOptions=function(n){n&&(e=n.isInputVisual,o=n.isOutputVisual,r=n.isInputRtl,u=n.isOutputRtl,h=n.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var i=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new n.__bidiEngine__({isInputVisual:!0});n.API.events.push(["postProcessText",function(n){var r=n.text,f=(n.x,n.y,n.options||{}),u=(n.mutex,f.lang,[]),i;if("[object Array]"===Object.prototype.toString.call(r)){for(i=0,u=[],i=0;i<r.length;i+=1)"[object Array]"===Object.prototype.toString.call(r[i])?u.push([t.doBidiReorder(r[i][0]),r[i][1],r[i][2]]):u.push([t.doBidiReorder(r[i])]);n.text=u}else n.text=t.doBidiReorder(r)}])}(t);window.tmp=hi;e.prototype.parseHeader=function(){var t,n;if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15)for(t=0===this.colors?1<<this.bitPP:this.colors,this.palette=new Array(t),n=0;n<t;n++){var i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0);this.palette[n]={red:u,green:r,blue:i,quad:f}}this.height<0&&(this.height*=-1,this.bottom_up=!1)};e.prototype.parseBGR=function(){this.pos=this.offset;try{var n="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t);this[n]()}catch(n){console.log("bit decode error:"+n)}};e.prototype.bit1=function(){for(var f=Math.ceil(this.width/8),e=f%4,t=0<=this.height?this.height-1:-this.height,o,i,u,t=this.height-1;0<=t;t--){for(o=this.bottom_up?t:this.height-1-t,i=0;i<f;i++)for(var s=this.datav.getUint8(this.pos++,!0),r=o*this.width*4+32*i,n=0;n<8&&8*i+n<this.width;n++)u=this.palette[s>>7-n&1],this.data[r+4*n]=u.blue,this.data[r+4*n+1]=u.green,this.data[r+4*n+2]=u.red,this.data[r+4*n+3]=255;0!=e&&(this.pos+=4-e)}};e.prototype.bit4=function(){for(var e,i,u=Math.ceil(this.width/2),f=u%4,r=this.height-1;0<=r;r--){for(e=this.bottom_up?r:this.height-1-r,i=0;i<u;i++){var o=this.datav.getUint8(this.pos++,!0),n=e*this.width*4+8*i,s=o>>4,h=15&o,t=this.palette[s];if(this.data[n]=t.blue,this.data[n+1]=t.green,this.data[n+2]=t.red,this.data[n+3]=255,2*i+1>=this.width)break;t=this.palette[h];this.data[n+4]=t.blue;this.data[n+4+1]=t.green;this.data[n+4+2]=t.red;this.data[n+4+3]=255}0!=f&&(this.pos+=4-f)}};e.prototype.bit8=function(){for(var e,i,f,n,r,u=this.width%4,t=this.height-1;0<=t;t--){for(e=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++)f=this.datav.getUint8(this.pos++,!0),n=e*this.width*4+4*i,f<this.palette.length?(r=this.palette[f],this.data[n]=r.red,this.data[n+1]=r.green,this.data[n+2]=r.blue,this.data[n+3]=255):(this.data[n]=255,this.data[n+1]=255,this.data[n+2]=255,this.data[n+3]=255);0!=u&&(this.pos+=4-u)}};e.prototype.bit15=function(){for(var f,r,t,e=this.width%3,n=parseInt("11111",2),i=this.height-1;0<=i;i--){for(f=this.bottom_up?i:this.height-1-i,r=0;r<this.width;r++){t=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(t&n)/n*255|0,s=(t>>5&n)/n*255|0,h=(t>>10&n)/n*255|0,c=t>>15?255:0,u=f*this.width*4+4*r;this.data[u]=h;this.data[u+1]=s;this.data[u+2]=o;this.data[u+3]=c}this.pos+=e}};e.prototype.bit16=function(){for(var e,t,i,o=this.width%3,u=parseInt("11111",2),f=parseInt("111111",2),n=this.height-1;0<=n;n--){for(e=this.bottom_up?n:this.height-1-n,t=0;t<this.width;t++){i=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(i&u)/u*255|0,h=(i>>5&f)/f*255|0,c=(i>>11)/u*255|0,r=e*this.width*4+4*t;this.data[r]=c;this.data[r+1]=h;this.data[r+2]=s;this.data[r+3]=255}this.pos+=o}};e.prototype.bit24=function(){for(var r,t,n=this.height-1;0<=n;n--){for(r=this.bottom_up?n:this.height-1-n,t=0;t<this.width;t++){var u=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),e=this.datav.getUint8(this.pos++,!0),i=r*this.width*4+4*t;this.data[i]=e;this.data[i+1]=f;this.data[i+2]=u;this.data[i+3]=255}this.pos+=this.width%4}};e.prototype.bit32=function(){for(var r,t,n=this.height-1;0<=n;n--)for(r=this.bottom_up?n:this.height-1-n,t=0;t<this.width;t++){var u=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),e=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),i=r*this.width*4+4*t;this.data[i]=e;this.data[i+1]=f;this.data[i+2]=u;this.data[i+3]=o}};e.prototype.getData=function(){return this.data};window.tmp=e,function(n){function t(){function t(n,t){for(var i=0;i|=1&n,n>>>=1,i<<=1,0<--t;);return i>>>1}var n=this;n.build_tree=function(i){var r,o,e,u=n.dyn_tree,c=n.stat_desc.static_tree,l=n.stat_desc.elems,h=-1;for(i.heap_len=0,i.heap_max=s,r=0;r<l;r++)0!==u[2*r]?(i.heap[++i.heap_len]=h=r,i.depth[r]=0):u[2*r+1]=0;for(;i.heap_len<2;)u[2*(e=i.heap[++i.heap_len]=h<2?++h:0)]=1,i.depth[e]=0,i.opt_len--,c&&(i.static_len-=c[2*e+1]);for(n.max_code=h,r=Math.floor(i.heap_len/2);1<=r;r--)i.pqdownheap(u,r);for(e=l;r=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(u,1),o=i.heap[1],i.heap[--i.heap_max]=r,i.heap[--i.heap_max]=o,u[2*e]=u[2*r]+u[2*o],i.depth[e]=Math.max(i.depth[r],i.depth[o])+1,u[2*r+1]=u[2*o+1]=e,i.heap[1]=e++,i.pqdownheap(u,1),2<=i.heap_len;);i.heap[--i.heap_max]=i.heap[1],function(t){for(var e,r,o,c,a,u=n.dyn_tree,v=n.stat_desc.static_tree,p=n.stat_desc.extra_bits,y=n.stat_desc.extra_base,h=n.stat_desc.max_length,l=0,i=0;i<=f;i++)t.bl_count[i]=0;for(u[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;e<s;e++)h<(i=u[2*u[2*(r=t.heap[e])+1]+1]+1)&&(i=h,l++),u[2*r+1]=i,r>n.max_code||(t.bl_count[i]++,c=0,y<=r&&(c=p[r-y]),a=u[2*r],t.opt_len+=a*(i+c),v&&(t.static_len+=a*(v[2*r+1]+c)));if(0!==l){do{for(i=h-1;0===t.bl_count[i];)i--;t.bl_count[i]--;t.bl_count[i+1]+=2;t.bl_count[h]--;l-=2}while(0<l);for(i=h;0!==i;i--)for(r=t.bl_count[i];0!==r;)(o=t.heap[--e])>n.max_code||(u[2*o+1]!=i&&(t.opt_len+=(i-u[2*o+1])*u[2*o],u[2*o+1]=i),r--)}}(i),function(n,i,r){for(var e,o,s=[],h=0,u=1;u<=f;u++)s[u]=h=h+r[u-1]<<1;for(e=0;e<=i;e++)0!==(o=n[2*e+1])&&(n[2*e]=t(s[o]++,o))}(u,n.max_code,i.bl_count)}}function i(n,t,i,r,u){this.static_tree=n;this.extra_bits=t;this.extra_base=i;this.elems=r;this.max_length=u}function u(n,t,i,r,u){this.good_length=n;this.max_lazy=t;this.nice_length=i;this.max_chain=r;this.func=u}function c(n,t,i,r){var u=n[2*t],f=n[2*i];return u<f||u==f&&r[t]<=r[i]}function a(){function pi(){for(var n=0;n<286;n++)et[2*n]=0;for(n=0;n<30;n++)ot[2*n]=0;for(n=0;n<19;n++)p[2*n]=0;et[512]=1;f.opt_len=f.static_len=0;g=si=0}function wi(n,t){var e,i,s=-1,r=n[1],u=0,f=7,o=4;for(0===r&&(f=138,o=3),n[2*(t+1)+1]=65535,e=0;e<=t;e++)i=r,r=n[2*(e+1)+1],++u<f&&i==r||(u<o?p[2*i]+=u:0!==i?(i!=s&&p[2*i]++,p[32]++):u<=10?p[34]++:p[36]++,s=i,o=(u=0)===r?(f=138,3):i==r?(f=6,3):(f=7,4))}function vt(n){f.pending_buf[f.pending++]=n}function ni(n){vt(255&n);vt(n>>>8&255)}function b(n,t){var r,i=t;16-i<w?(ni(nt|=(r=n)<<w&65535),nt=r>>>16-w,w+=i-16):(nt|=n<<w&65535,w+=i)}function tt(n,t){var i=2*n;b(65535&t[i],65535&t[i+1])}function bi(n,t){var e,r,s=-1,u=n[1],i=0,f=7,o=4;for(0===u&&(f=138,o=3),e=0;e<=t;e++)if(r=u,u=n[2*(e+1)+1],!(++i<f&&r==u)){if(i<o)for(;tt(r,p),0!=--i;);else 0!==r?(r!=s&&(tt(r,p),i--),tt(16,p),b(i-3,2)):i<=10?(tt(17,p),b(i-3,3)):(tt(18,p),b(i-11,7));s=r;o=(i=0)===u?(f=138,3):r==u?(f=6,3):(f=7,4)}}function ki(){16==w?(ni(nt),w=nt=0):8<=w&&(vt(255&nt),nt>>>=8,w-=8)}function ti(i,r){var e,o,u;if(f.pending_buf[bt+2*g]=i>>>8&255,f.pending_buf[bt+2*g+1]=255&i,f.pending_buf[oi+g]=255&r,g++,0===i?et[2*r]++:(si++,i--,et[2*(t._length_code[r]+256+1)]++,ot[2*t.d_code(i)]++),0==(8191&g)&&2<y){for(e=8*g,o=n-rt,u=0;u<30;u++)e+=ot[2*u]*(5+t.extra_dbits[u]);if(e>>>=3,si<Math.floor(g/2)&&e<Math.floor(o/2))return!0}return g==at-1}function di(n,i){var e,o,r,s,u=0;if(0!==g)for(;e=f.pending_buf[bt+2*u]<<8&65280|255&f.pending_buf[bt+2*u+1],o=255&f.pending_buf[oi+u],u++,0===e?tt(o,n):(tt((r=t._length_code[o])+256+1,n),0!==(s=t.extra_lbits[r])&&b(o-=t.base_length[r],s),tt(r=t.d_code(--e),i),0!==(s=t.extra_dbits[r])&&b(e-=t.base_dist[r],s)),u<g;);tt(256,n);kt=n[513]}function gi(){8<w?ni(nt):0<w&&vt(255&nt);w=nt=0}function nr(n,t,i){var e,r,o;b(0+(i?1:0),3);e=n;r=t;o=!0;gi();kt=8;o&&(ni(r),ni(~r));f.pending_buf.set(u.subarray(e,e+r),f.pending);f.pending+=r}function ir(n,r,u){var e,o,s=0;0<y?(dt.build_tree(f),gt.build_tree(f),s=function(){var n;for(wi(et,dt.max_code),wi(ot,gt.max_code),hi.build_tree(f),n=18;3<=n&&0===p[2*t.bl_order[n]+1];n--);return f.opt_len+=3*(n+1)+5+5+4,n}(),e=f.opt_len+3+7>>>3,(o=f.static_len+3+7>>>3)<=e&&(e=o)):e=o=r+5;r+4<=e&&-1!=n?nr(n,r,u):o==e?(b(2+(u?1:0),3),di(i.static_ltree,i.static_dtree)):(b(4+(u?1:0),3),function(n,i,r){var u;for(b(n-257,5),b(i-1,5),b(r-4,4),u=0;u<r;u++)b(p[2*t.bl_order[u]+1],3);bi(et,n-1);bi(ot,i-1)}(dt.max_code+1,gt.max_code+1,s+1),di(et,ot));pi();u&&gi()}function st(t){ir(0<=rt?rt:-1,n-rt,t);rt=n;l.flush_pending()}function ci(){var t,i,r,f;do{if(0==(f=ai-o-n)&&0===n&&0===o)f=h;else if(-1==f)f--;else if(h+h-262<=n){for(u.set(u.subarray(h,h+h),0),pt-=h,n-=h,rt-=h,r=t=yt;i=65535&a[--r],a[r]=h<=i?i-h:0,0!=--t;);for(r=t=h;i=65535&it[--r],it[r]=h<=i?i-h:0,0!=--t;);f+=h}if(0===l.avail_in)return;t=l.read_buf(u,n+o,f);3<=(o+=t)&&(s=((s=255&u[n])<<ft^255&u[n+1])&ut)}while(o<262&&0!==l.avail_in)}function tr(t){var r,e,l=ui,i=n,f=d,y=h-262<n?n-(h-262):0,s=ei,p=ht,c=n+258,a=u[i+f-1],v=u[i+f];fi<=d&&(l>>=2);o<s&&(s=o);do if(u[(r=t)+f]==v&&u[r+f-1]==a&&u[r]==u[i]&&u[++r]==u[i+1]){i+=2;r++;do;while(u[++i]==u[++r]&&u[++i]==u[++r]&&u[++i]==u[++r]&&u[++i]==u[++r]&&u[++i]==u[++r]&&u[++i]==u[++r]&&u[++i]==u[++r]&&u[++i]==u[++r]&&i<c);if(e=258-(c-i),i=c-258,f<e){if(pt=t,s<=(f=e))break;a=u[i+f-1];v=u[i+f]}}while((t=65535&it[t&p])>y&&0!=--l);return f<=o?f:o}function rr(t){return t.total_in=t.total_out=0,t.msg=null,f.pending=0,f.pending_out=0,k=113,ct=0,dt.dyn_tree=et,dt.stat_desc=i.static_l_desc,gt.dyn_tree=ot,gt.stat_desc=i.static_d_desc,hi.dyn_tree=p,hi.stat_desc=i.static_bl_desc,w=nt=0,kt=8,pi(),function(){var t;for(ai=2*h,t=a[yt-1]=0;t<yt-1;t++)a[t]=0;ii=r[y].max_lazy;fi=r[y].good_length;ei=r[y].nice_length;ui=r[y].max_chain;v=d=2;s=lt=o=rt=n=0}(),0}var l,k,ri,ct,h,li,ht,u,ai,it,a,s,yt,vi,ut,ft,rt,v,yi,lt,n,pt,o,d,ui,ii,y,wt,fi,ei,et,ot,p,oi,at,g,bt,si,kt,nt,w,f=this,dt=new t,gt=new t,hi=new t;f.depth=[];f.bl_count=[];f.heap=[];et=[];ot=[];p=[];f.pqdownheap=function(n,t){for(var r=f.heap,u=r[t],i=t<<1;i<=f.heap_len&&(i<f.heap_len&&c(n,r[i+1],r[i],f.depth)&&i++,!c(n,u,r[i],f.depth));)r[t]=r[i],t=i,i<<=1;r[t]=u};f.deflateInit=function(n,t,i,r,e,o){return r||(r=8),e||(e=8),o||(o=0),n.msg=null,-1==t&&(t=6),e<1||9<e||8!=r||i<9||15<i||t<0||9<t||o<0||2<o?-2:(n.dstate=f,ht=(h=1<<(li=i))-1,ut=(yt=1<<(vi=e+7))-1,ft=Math.floor((vi+3-1)/3),u=new Uint8Array(2*h),it=[],a=[],at=1<<e+6,f.pending_buf=new Uint8Array(4*at),ri=4*at,bt=Math.floor(at/2),oi=3*at,y=t,wt=o,rr(n))};f.deflateEnd=function(){return 42!=k&&113!=k&&666!=k?-2:(f.pending_buf=null,u=it=a=null,f.dstate=null,113==k?-3:0)};f.deflateParams=function(n,t,i){var u=0;return-1==t&&(t=6),t<0||9<t||i<0||2<i?-2:(r[y].func!=r[t].func&&0!==n.total_in&&(u=n.deflate(1)),y!=t&&(ii=r[y=t].max_lazy,fi=r[y].good_length,ei=r[y].nice_length,ui=r[y].max_chain),wt=i,u)};f.deflateSetDictionary=function(t,i,r){var f,e=r,o=0;if(!i||42!=k)return-2;if(e<3)return 0;for(h-262<e&&(o=r-(e=h-262)),u.set(i.subarray(o,o+e),0),rt=n=e,s=((s=255&u[0])<<ft^255&u[1])&ut,f=0;f<=e-3;f++)s=(s<<ft^255&u[f+2])&ut,it[f&ht]=a[s],a[s]=f;return 0};f.deflate=function(t,c){var nt,g,et,ot,p,at;if(4<c||c<0)return-2;if(!t.next_out||!t.next_in&&0!==t.avail_in||666==k&&4!=c)return t.msg=e[4],-2;if(0===t.avail_out)return t.msg=e[7],-5;if(l=t,ot=ct,ct=c,42==k&&(g=8+(li-8<<4)<<8,3<(et=(y-1&255)>>1)&&(et=3),g|=et<<6,0!==n&&(g|=32),k=113,vt((at=g+=31-g%31)>>8&255),vt(255&at)),0!==f.pending){if(l.flush_pending(),0===l.avail_out)return ct=-1,0}else if(0===l.avail_in&&c<=ot&&4!=c)return l.msg=e[7],-5;if(666==k&&0!==l.avail_in)return t.msg=e[7],-5;if(0!==l.avail_in||0!==o||0!=c&&666!=k){switch(p=-1,r[y].func){case 0:p=function(t){var i,r=65535;for(ri-5<r&&(r=ri-5);;){if(o<=1){if(ci(),0===o&&0==t)return 0;if(0===o)break}if((n+=o,i=rt+r,((o=0)===n||i<=n)&&(o=n-i,n=i,st(!1),0===l.avail_out))||h-262<=n-rt&&(st(!1),0===l.avail_out))return 0}return st(4==t),0===l.avail_out?4==t?2:0:4==t?3:1}(c);break;case 1:p=function(t){for(var r,i=0;;){if(o<262){if(ci(),o<262&&0==t)return 0;if(0===o)break}if(3<=o&&(s=(s<<ft^255&u[n+2])&ut,i=65535&a[s],it[n&ht]=a[s],a[s]=n),0!==i&&(n-i&65535)<=h-262&&2!=wt&&(v=tr(i)),3<=v)if(r=ti(n-pt,v-3),o-=v,v<=ii&&3<=o){for(v--;s=(s<<ft^255&u[++n+2])&ut,i=65535&a[s],it[n&ht]=a[s],a[s]=n,0!=--v;);n++}else n+=v,v=0,s=((s=255&u[n])<<ft^255&u[n+1])&ut;else r=ti(0,255&u[n]),o--,n++;if(r&&(st(!1),0===l.avail_out))return 0}return st(4==t),0===l.avail_out?4==t?2:0:4==t?3:1}(c);break;case 2:p=function(t){for(var r,f,i=0;;){if(o<262){if(ci(),o<262&&0==t)return 0;if(0===o)break}if(3<=o&&(s=(s<<ft^255&u[n+2])&ut,i=65535&a[s],it[n&ht]=a[s],a[s]=n),d=v,yi=pt,v=2,0!==i&&d<ii&&(n-i&65535)<=h-262&&(2!=wt&&(v=tr(i)),v<=5&&(1==wt||3==v&&4096<n-pt)&&(v=2)),3<=d&&v<=d){for(f=n+o-3,r=ti(n-1-yi,d-3),o-=d-1,d-=2;++n<=f&&(s=(s<<ft^255&u[n+2])&ut,i=65535&a[s],it[n&ht]=a[s],a[s]=n),0!=--d;);if(lt=0,v=2,n++,r&&(st(!1),0===l.avail_out))return 0}else if(0!==lt){if((r=ti(0,255&u[n-1]))&&st(!1),n++,o--,0===l.avail_out)return 0}else lt=1,n++,o--}return 0!==lt&&(r=ti(0,255&u[n-1]),lt=0),st(4==t),0===l.avail_out?4==t?2:0:4==t?3:1}(c)}if(2!=p&&3!=p||(k=666),0==p||2==p)return 0===l.avail_out&&(ct=-1),0;if(1==p){if(1==c)b(2,3),tt(256,i.static_ltree),ki(),1+kt+10-w<9&&(b(2,3),tt(256,i.static_ltree),ki()),kt=7;else if(nr(0,0,!1),3==c)for(nt=0;nt<yt;nt++)a[nt]=0;if(l.flush_pending(),0===l.avail_out)return ct=-1,0}}return 4!=c?0:1}}function l(){this.next_in_index=0;this.next_out_index=0;this.avail_in=0;this.total_in=0;this.avail_out=0;this.total_out=0}var f=15,s=573,h=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29],r,e,o;t._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28];t.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];t.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];t.d_code=function(n){return n<256?h[n]:h[256+(n>>>7)]};t.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];t.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];t.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];t.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];i.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8];i.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5];i.static_l_desc=new i(i.static_ltree,t.extra_lbits,257,286,f);i.static_d_desc=new i(i.static_dtree,t.extra_dbits,0,30,f);i.static_bl_desc=new i(null,t.extra_blbits,0,19,7);r=[new u(0,0,0,0,0),new u(4,4,8,4,1),new u(4,5,16,8,1),new u(4,6,32,32,1),new u(4,4,16,16,2),new u(8,16,32,32,2),new u(8,16,128,128,2),new u(8,32,128,256,2),new u(32,128,258,1024,2),new u(32,258,258,4096,2)];e=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];l.prototype={deflateInit:function(n,t){return this.dstate=new a,t||(t=f),this.dstate.deflateInit(this,n,t)},deflate:function(n){return this.dstate?this.dstate.deflate(this,n):-2},deflateEnd:function(){if(!this.dstate)return-2;var n=this.dstate.deflateEnd();return this.dstate=null,n},deflateParams:function(n,t){return this.dstate?this.dstate.deflateParams(this,n,t):-2},deflateSetDictionary:function(n,t){return this.dstate?this.dstate.deflateSetDictionary(this,n,t):-2},read_buf:function(n,t,i){var r=this.avail_in;return i<r&&(r=i),0===r?0:(this.avail_in-=r,n.set(this.next_in.subarray(this.next_in_index,this.next_in_index+r),t),this.next_in_index+=r,this.total_in+=r,r)},flush_pending:function(){var n=this,t=n.dstate.pending;t>n.avail_out&&(t=n.avail_out);0!==t&&(n.next_out.set(n.dstate.pending_buf.subarray(n.dstate.pending_out,n.dstate.pending_out+t),n.next_out_index),n.next_out_index+=t,n.dstate.pending_out+=t,n.total_out+=t,n.avail_out-=t,n.dstate.pending-=t,0===n.dstate.pending&&(n.dstate.pending_out=0))}};o=n.zip||n;o.Deflater=o._jzlib_Deflater=function(n){var t=new l,i=new Uint8Array(512),r=n?n.level:-1;void 0===r&&(r=-1);t.deflateInit(r);t.next_out=i;this.append=function(n,r){var u,f=[],e=0,o=0,s=0;if(n.length){t.next_in_index=0;t.next_in=n;t.avail_in=n.length;do{if(t.next_out_index=0,t.avail_out=512,0!=t.deflate(0))throw new Error("deflating: "+t.msg);t.next_out_index&&(512==t.next_out_index?f.push(new Uint8Array(i)):f.push(new Uint8Array(i.subarray(0,t.next_out_index))));s+=t.next_out_index;r&&0<t.next_in_index&&t.next_in_index!=e&&(r(t.next_in_index),e=t.next_in_index)}while(0<t.avail_in||0===t.avail_out);return u=new Uint8Array(s),f.forEach(function(n){u.set(n,o);o+=n.length}),u}};this.flush=function(){var r,n,u=[],f=0,e=0;do{if(t.next_out_index=0,t.avail_out=512,1!=(r=t.deflate(4))&&0!=r)throw new Error("deflating: "+t.msg);0<512-t.avail_out&&u.push(new Uint8Array(i.subarray(0,t.next_out_index)));e+=t.next_out_index}while(0<t.avail_in||0===t.avail_out);return t.deflateEnd(),n=new Uint8Array(e),u.forEach(function(t){n.set(t,f);f+=t.length}),n}}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")());("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")()).RGBColor=function(n){var i,u,f,r,t;n=n||"";this.ok=!1;"#"==n.charAt(0)&&(n=n.substr(1,6));n=(n=n.replace(/ /g,"")).toLowerCase();u={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(f in u)n==f&&(n=u[f]);for(r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(n){return[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}}],t=0;t<r.length;t++){var o=r[t].re,s=r[t].process,e=o.exec(n);e&&(i=s(e),this.r=i[0],this.g=i[1],this.b=i[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:255<this.r?255:this.r;this.g=this.g<0||isNaN(this.g)?0:255<this.g?255:this.g;this.b=this.b<0||isNaN(this.b)?0:255<this.b?255:this.b;this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var n=this.r.toString(16),t=this.g.toString(16),i=this.b.toString(16);return 1==n.length&&(n="0"+n),1==t.length&&(t="0"+t),1==i.length&&(i="0"+i),"#"+n+t+i}},function(n){var l="+".charCodeAt(0),a="/".charCodeAt(0),f="0".charCodeAt(0),e="a".charCodeAt(0),o="A".charCodeAt(0),v="-".charCodeAt(0),y="_".charCodeAt(0),r=function(n){var t=n.charCodeAt(0);return t===l||t===v?62:t===a||t===y?63:t<f?-1:t<f+10?t-f+26+26:t<o+26?t-o:t<e+26?t-e+26:void 0};n.API.TTFFont=function(){function n(n,t){var i;if(this.rawData=n,i=this.contents=new u(n),this.contents.pos=4,"ttcf"===i.readString(4)){if(!t)throw new Error("Must specify a font name for TTC files.");throw new Error("Font "+t+" not found in TTC file.");}i.pos=0;this.parse();this.subset=new st(this);this.registerTTF()}return n.open=function(t,i,u,f){if("string"!=typeof u)throw new Error("Invalid argument supplied in TTFFont.open");return new n(function(n){function u(n){e[c++]=n}var t,s,h,i,f,e,o,c;if(0<n.length%4)throw new Error("Invalid string. Length must be a multiple of 4");for(o=n.length,f="="===n.charAt(o-2)?2:"="===n.charAt(o-1)?1:0,e=new Uint8Array(3*n.length/4-f),h=0<f?n.length-4:n.length,c=0,s=t=0;t<h;t+=4,s+=3)u((16711680&(i=r(n.charAt(t))<<18|r(n.charAt(t+1))<<12|r(n.charAt(t+2))<<6|r(n.charAt(t+3))))>>16),u((65280&i)>>8),u(255&i);return 2===f?u(255&(i=r(n.charAt(t))<<2|r(n.charAt(t+1))>>4)):1===f&&(u((i=r(n.charAt(t))<<10|r(n.charAt(t+1))<<4|r(n.charAt(t+2))>>2)>>8&255),u(255&i)),e}(u),i,f)},n.prototype.parse=function(){return this.directory=new p(this.contents),this.head=new b(this),this.name=new tt(this),this.cmap=new h(this),this.toUnicode=new Map,this.hhea=new k(this),this.maxp=new it(this),this.hmtx=new rt(this),this.post=new g(this),this.os2=new d(this),this.loca=new ot(this),this.glyf=new ut(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},n.prototype.registerTTF=function(){var i,t,r,u,n;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var n,r,u,t;for(t=[],n=0,r=(u=this.bbox).length;n<r;n++)i=u[n],t.push(Math.round(i*this.scaleFactor));return t}.call(this),this.stemV=0,this.post.exists?(r=255&(u=this.post.italic_angle),!0&(t=u>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(n=this.familyClass)||2===n||3===n||4===n||5===n||7===n,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font");},n.prototype.characterToGlyph=function(n){var t;return(null!=(t=this.cmap.unicode)?t.codeMap[n]:void 0)||0},n.prototype.widthOfGlyph=function(n){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*t},n.prototype.widthOfString=function(n,t,i){for(var o,e,r,f=r=e=0,u=(n=""+n).length;0<=u?r<u:u<r;f=0<=u?++r:--r)o=n.charCodeAt(f),e+=this.widthOfGlyph(this.characterToGlyph(o))+i*(1e3/t)||0;return e*(t/1e3)},n.prototype.lineHeight=function(n,t){var i;return null==t&&(t=!1),i=t?this.lineGap:0,(this.ascender+i-this.decender)/1e3*n},n}();var t,u=function(){function n(n){this.data=null!=n?n:[];this.pos=0;this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(n){return this.data[this.pos++]=n},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},n.prototype.readInt32=function(){var n;return 2147483648<=(n=this.readUInt32())?n-4294967296:n},n.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},n.prototype.readInt16=function(){var n;return 32768<=(n=this.readUInt16())?n-65536:n},n.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},n.prototype.readString=function(n){for(var t,r=[],i=t=0;0<=n?t<n:n<t;i=0<=n?++t:--t)r[i]=String.fromCharCode(this.readByte());return r.join("")},n.prototype.writeString=function(n){var r,t,i,u;for(u=[],r=t=0,i=n.length;0<=i?t<i:i<t;r=0<=i?++t:--t)u.push(this.writeByte(n.charCodeAt(r)));return u},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(n){return this.writeInt16(n)},n.prototype.readLongLong=function(){var n,t,i,r,u,f,e,o;return n=this.readByte(),t=this.readByte(),i=this.readByte(),r=this.readByte(),u=this.readByte(),f=this.readByte(),e=this.readByte(),o=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^t)+1099511627776*(255^i)+4294967296*(255^r)+16777216*(255^u)+65536*(255^f)+256*(255^e)+(255^o)+1):72057594037927940*n+281474976710656*t+1099511627776*i+4294967296*r+16777216*u+65536*f+256*e+o},n.prototype.writeLongLong=function(n){var t,i;return t=Math.floor(n/4294967296),i=4294967295&n,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(n){return this.writeInt32(n)},n.prototype.read=function(n){for(var i=[],t=0;0<=n?t<n:n<t;0<=n?++t:--t)i.push(this.readByte());return i},n.prototype.write=function(n){var r,t,u,i;for(i=[],t=0,u=n.length;t<u;t++)r=n[t],i.push(this.writeByte(r));return i},n}(),p=function(){function t(n){var r,t,i;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},t=0,i=this.tableCount;0<=i?t<i:i<t;0<=i?++t:--t)r={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[r.tag]=r}var n;return t.prototype.encode=function(t){var a,i,v,y,c,l,r,p,s,f,e,o,h;for(h in e=Object.keys(t).length,l=Math.log(2),s=16*Math.floor(Math.log(e)/l),y=Math.floor(s/l),p=16*e-s,(i=new u).writeInt(this.scalarType),i.writeShort(e),i.writeShort(s),i.writeShort(y),i.writeShort(p),v=16*e,r=i.pos+v,c=null,o=[],t)for(f=t[h],i.writeString(h),i.writeInt(n(f)),i.writeInt(r),i.writeInt(f.length),o=o.concat(f),"head"===h&&(c=r),r+=f.length;r%4;)o.push(0),r++;return i.write(o),a=2981146554-n(i.data),i.pos=c+8,i.writeUInt32(a),i.data},n=function(n){var t,r,i,f;for(n=c.call(n);n.length%4;)n.push(0);for(r=new u(n),i=t=0,f=n.length;i<f;i+=4)t+=r.readUInt32();return 4294967295&t},t}(),w={}.hasOwnProperty,i=function(n,t){function r(){this.constructor=n}for(var i in t)w.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};t=function(){function n(n){var t;this.file=n;t=this.file.directory.tables[this.tag];this.exists=!!t;t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return n.prototype.parse=function(){},n.prototype.encode=function(){},n.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},n}();var b=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="head",n.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.revision=n.readInt(),this.checkSumAdjustment=n.readInt(),this.magicNumber=n.readInt(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.readLongLong(),this.modified=n.readLongLong(),this.xMin=n.readShort(),this.yMin=n.readShort(),this.xMax=n.readShort(),this.yMax=n.readShort(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort(),this.indexToLocFormat=n.readShort(),this.glyphDataFormat=n.readShort()},n.prototype.encode=function(n){var t;return(t=new u).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(n),t.writeShort(this.glyphDataFormat),t.data},n}(),s=function(){function n(n,t){var u,f,c,s,p,i,l,a,w,r,b,h,k,e,v,y,o,d;switch(this.platformID=n.readUInt16(),this.encodingID=n.readShort(),this.offset=t+n.readInt(),w=n.pos,n.pos=this.offset,this.format=n.readUInt16(),this.length=n.readUInt16(),this.language=n.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(i=v=0;v<256;i=++v)this.codeMap[i]=n.readByte();break;case 4:for(b=n.readUInt16(),r=b/2,n.pos+=6,c=function(){var t,u;for(u=[],i=t=0;0<=r?t<r:r<t;i=0<=r?++t:--t)u.push(n.readUInt16());return u}(),n.pos+=2,k=function(){var t,u;for(u=[],i=t=0;0<=r?t<r:r<t;i=0<=r?++t:--t)u.push(n.readUInt16());return u}(),l=function(){var t,u;for(u=[],i=t=0;0<=r?t<r:r<t;i=0<=r?++t:--t)u.push(n.readUInt16());return u}(),a=function(){var t,u;for(u=[],i=t=0;0<=r?t<r:r<t;i=0<=r?++t:--t)u.push(n.readUInt16());return u}(),f=(this.length-n.pos+this.offset)/2,p=function(){var t,r;for(r=[],i=t=0;0<=f?t<f:f<t;i=0<=f?++t:--t)r.push(n.readUInt16());return r}(),i=y=0,d=c.length;y<d;i=++y)for(e=c[i],u=o=h=k[i];h<=e?o<=e:e<=o;u=h<=e?++o:--o)0===a[i]?s=u+l[i]:0!==(s=p[a[i]/2+(u-h)-(r-i)]||0)&&(s+=l[i]),this.codeMap[u]=65535&s}n.pos=w}return n.encode=function(n,t){var y,r,ht,p,w,l,ct,b,s,yt,a,h,k,lt,c,f,at,pt,d,v,wt,tt,g,bt,e,o,kt,i,it,rt,vt,nt,dt,gt,ni,ti,ii,ri,ui,fi,ut,ft,ei,et,ot,st;switch(i=new u,p=Object.keys(n).sort(function(n,t){return n-t}),t){case"macroman":for(k=0,lt=function(){var n,t;for(t=[],h=n=0;n<256;h=++n)t.push(0);return t}(),f={0:0},ht={},it=0,dt=p.length;it<dt;it++)null==f[ei=n[r=p[it]]]&&(f[ei]=++k),ht[r]={old:n[r],"new":f[n[r]]},lt[r]=f[n[r]];return i.writeUInt16(1),i.writeUInt16(0),i.writeUInt32(12),i.writeUInt16(0),i.writeUInt16(262),i.writeUInt16(0),i.write(lt),{charMap:ht,subtable:i.data,maxGlyphID:k+1};case"unicode":for(o=[],s=[],f={},y={},c=ct=null,rt=at=0,gt=p.length;rt<gt;rt++)null==f[d=n[r=p[rt]]]&&(f[d]=++at),y[r]={old:d,"new":f[d]},w=f[d]-r,null!=c&&w===ct||(c&&s.push(c),o.push(r),ct=w),c=r;for(c&&s.push(c),s.push(65535),o.push(65535),bt=2*(g=o.length),tt=2*Math.pow(Math.log(g)/Math.LN2,2),yt=Math.log(tt/2)/Math.LN2,wt=2*g-tt,l=[],v=[],a=[],h=vt=0,ni=o.length;vt<ni;h=++vt){if(e=o[h],b=s[h],65535===e){l.push(0);v.push(0);break}if(32768<=e-(kt=y[e].new))for(l.push(0),v.push(2*(a.length+g-h)),r=nt=e;e<=b?nt<=b:b<=nt;r=e<=b?++nt:--nt)a.push(y[r].new);else l.push(kt-e),v.push(0)}for(i.writeUInt16(3),i.writeUInt16(1),i.writeUInt32(12),i.writeUInt16(4),i.writeUInt16(16+8*g+2*a.length),i.writeUInt16(0),i.writeUInt16(bt),i.writeUInt16(tt),i.writeUInt16(yt),i.writeUInt16(wt),ut=0,ti=s.length;ut<ti;ut++)r=s[ut],i.writeUInt16(r);for(i.writeUInt16(0),ft=0,ii=o.length;ft<ii;ft++)r=o[ft],i.writeUInt16(r);for(et=0,ri=l.length;et<ri;et++)w=l[et],i.writeUInt16(w);for(ot=0,ui=v.length;ot<ui;ot++)pt=v[ot],i.writeUInt16(pt);for(st=0,fi=a.length;st<fi;st++)k=a[st],i.writeUInt16(k);return{charMap:y,subtable:i.data,maxGlyphID:at+1}}},n}(),h=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="cmap",n.prototype.parse=function(n){var r,t,i;for(n.pos=this.offset,this.version=n.readUInt16(),t=n.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=t?i<t:t<i;0<=t?++i:--i)r=new s(n,this.offset),this.tables.push(r),r.isUnicode&&null==this.unicode&&(this.unicode=r);return!0},n.encode=function(n,t){var i,r;return null==t&&(t="macroman"),i=s.encode(n,t),(r=new u).writeUInt16(0),r.writeUInt16(1),i.table=r.data.concat(i.subtable),i},n}(),k=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="hhea",n.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},n}(),d=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="OS/2",n.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=function(){for(var i=[],t=0;t<10;++t)i.push(n.readByte());return i}(),this.charRange=function(){for(var i=[],t=0;t<4;++t)i.push(n.readInt());return i}(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),0<this.version&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=function(){for(var i=[],t=0;t<2;++t)i.push(n.readInt());return i}(),1<this.version))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},n}(),g=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="post",n.prototype.parse=function(n){var u,t,i,r;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 131072:for(t=n.readUInt16(),this.glyphNameIndex=[],i=0;0<=t?i<t:t<i;0<=t?++i:--i)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],r=[];n.pos<this.offset+this.length;)u=n.readByte(),r.push(this.names.push(n.readString(u)));return r;case 151552:return t=n.readUInt16(),this.offsets=n.read(t);case 262144:return this.map=function(){var t,i,r;for(r=[],t=0,i=this.file.maxp.numGlyphs;0<=i?t<i:i<t;0<=i?++t:--t)r.push(n.readUInt32());return r}.call(this)}},n}(),nt=function(n,t){this.raw=n;this.length=n.length;this.platformID=t.platformID;this.encodingID=t.encodingID;this.languageID=t.languageID},tt=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="name",n.prototype.parse=function(n){var r,e,i,u,s,h,t,c,f,o,l,a;for(n.pos=this.offset,n.readShort(),r=n.readShort(),h=n.readShort(),e=[],u=f=0;0<=r?f<r:r<f;u=0<=r?++f:--f)e.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+h+n.readShort()});for(t={},u=o=0,l=e.length;o<l;u=++o)i=e[u],n.pos=i.offset,c=n.readString(i.length),s=new nt(c,i),null==t[a=i.nameID]&&(t[a]=[]),t[i.nameID].push(s);this.strings=t;this.copyright=t[0];this.fontFamily=t[1];this.fontSubfamily=t[2];this.uniqueSubfamily=t[3];this.fontName=t[4];this.version=t[5];try{this.postscriptName=t[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(n){this.postscriptName=t[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=t[7],this.manufacturer=t[8],this.designer=t[9],this.description=t[10],this.vendorUrl=t[11],this.designerUrl=t[12],this.license=t[13],this.licenseUrl=t[14],this.preferredFamily=t[15],this.preferredSubfamily=t[17],this.compatibleFull=t[18],this.sampleText=t[19]},n}(),it=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="maxp",n.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.numGlyphs=n.readUInt16(),this.maxPoints=n.readUInt16(),this.maxContours=n.readUInt16(),this.maxCompositePoints=n.readUInt16(),this.maxComponentContours=n.readUInt16(),this.maxZones=n.readUInt16(),this.maxTwilightPoints=n.readUInt16(),this.maxStorage=n.readUInt16(),this.maxFunctionDefs=n.readUInt16(),this.maxInstructionDefs=n.readUInt16(),this.maxStackElements=n.readUInt16(),this.maxSizeOfInstructions=n.readUInt16(),this.maxComponentElements=n.readUInt16(),this.maxComponentDepth=n.readUInt16()},n}(),rt=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="hmtx",n.prototype.parse=function(n){var e,t,o,i,r,u,f;for(n.pos=this.offset,this.metrics=[],i=0,u=this.file.hhea.numberOfMetrics;0<=u?i<u:u<i;0<=u?++i:--i)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(t=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){for(var r=[],i=0;0<=t?i<t:t<i;0<=t?++i:--i)r.push(n.readInt16());return r}(),this.widths=function(){var n,i,r,t;for(t=[],n=0,i=(r=this.metrics).length;n<i;n++)o=r[n],t.push(o.advance);return t}.call(this),e=this.widths[this.widths.length-1],f=[],r=0;0<=t?r<t:t<r;0<=t?++r:--r)f.push(this.widths.push(e));return f},n.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},n}(),c=[].slice,ut=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(n){var i,c,l,r,f,t,e,o,s,h;return(n=n)in this.cache?this.cache[n]:(r=this.file.loca,i=this.file.contents,c=r.indexOf(n),0===(l=r.lengthOf(n))?this.cache[n]=null:(i.pos=this.offset+c,f=(t=new u(i.read(l))).readShort(),o=t.readShort(),h=t.readShort(),e=t.readShort(),s=t.readShort(),this.cache[n]=-1===f?new et(t,o,h,e,s):new ft(t,f,o,h,e,s),this.cache[n]))},n.prototype.encode=function(n,t,i){var e,u,r,f,o;for(r=[],u=[],f=0,o=t.length;f<o;f++)e=n[t[f]],u.push(r.length),e&&(r=r.concat(e.encode(i)));return u.push(r.length),{table:r,offsets:u}},n}(),ft=function(){function n(n,t,i,r,u,f){this.raw=n;this.numberOfContours=t;this.xMin=i;this.yMin=r;this.xMax=u;this.yMax=f;this.compound=!1}return n.prototype.encode=function(){return this.raw.data},n}(),et=function(){function n(n,t,i,r,u){var f,e;for(this.raw=n,this.xMin=t,this.yMin=i,this.xMax=r,this.yMax=u,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],f=this.raw;e=f.readShort(),this.glyphOffsets.push(f.pos),this.glyphIDs.push(f.readShort()),32&e;)f.pos+=1&e?4:2,128&e?f.pos+=8:64&e?f.pos+=4:8&e&&(f.pos+=2)}return n.prototype.encode=function(){var n,t,i,r,f;for(t=new u(c.call(this.raw.data)),n=i=0,r=(f=this.glyphIDs).length;i<r;n=++i)f[n],t.pos=this.glyphOffsets[n];return t.data},n}(),ot=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tag="loca",n.prototype.parse=function(n){var t;return n.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=0===t?function(){var t,r,i;for(i=[],t=0,r=this.length;t<r;t+=2)i.push(2*n.readUInt16());return i}.call(this):function(){var t,r,i;for(i=[],t=0,r=this.length;t<r;t+=4)i.push(n.readUInt32());return i}.call(this)},n.prototype.indexOf=function(n){return this.offsets[n]},n.prototype.lengthOf=function(n){return this.offsets[n+1]-this.offsets[n]},n.prototype.encode=function(n,t){for(var h,s,f,i,r=new Uint32Array(this.offsets.length),e=0,o=0,u=0;u<r.length;++u)(r[u]=e,o<t.length&&t[o]==u)&&(++o,r[u]=e,h=this.offsets[u],s=this.offsets[u+1]-h,0<s&&(e+=s));for(f=new Array(4*r.length),i=0;i<r.length;++i)f[4*i+3]=255&r[i],f[4*i+2]=(65280&r[i])>>8,f[4*i+1]=(16711680&r[i])>>16,f[4*i]=(4278190080&r[i])>>24;return f},n}(),st=function(){function n(n){this.font=n;this.subset={};this.unicodes={};this.next=33}return n.prototype.generateCmap=function(){var n,t,i,r,u;for(t in r=this.font.cmap.tables[0].codeMap,n={},u=this.subset)i=u[t],n[t]=r[i];return n},n.prototype.glyphsFor=function(n){var r,u,i,t,f,e,o;for(i={},f=0,e=n.length;f<e;f++)i[t=n[f]]=this.font.glyf.glyphFor(t);for(t in r=[],i)(null!=(u=i[t])?u.compound:void 0)&&r.push.apply(r,u.glyphIDs);if(0<r.length)for(t in o=this.glyphsFor(r))u=o[t],i[t]=u;return i},n.prototype.encode=function(n,t){var r,a,u,f,v,y,p,e,o,w,i,s,c,l,b;for(a in r=h.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(n),i={0:0},b=r.charMap)i[(y=b[a]).old]=y.new;for(s in w=r.maxGlyphID,f)s in i||(i[s]=w++);return e=function(n){var t,i;for(t in i={},n)i[n[t]]=t;return i}(i),o=Object.keys(e).sort(function(n,t){return n-t}),c=function(){var n,i,t;for(t=[],n=0,i=o.length;n<i;n++)v=o[n],t.push(e[v]);return t}(),u=this.font.glyf.encode(f,c,i),p=this.font.loca.encode(u.offsets,c),l={cmap:this.font.cmap.raw(),glyf:u.table,loca:p,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(l["OS/2"]=this.font.os2.raw()),this.font.directory.encode(l)},n}();n.API.PDFObject=function(){function t(){}var n;return n=function(n,t){return(Array(t+1).join("0")+n).slice(-t)},t.convert=function(i){var f,u,r,e;if(Array.isArray(i))return"["+function(){var n,u,r;for(r=[],n=0,u=i.length;n<u;n++)f=i[n],r.push(t.convert(f));return r}().join(" ")+"]";if("string"==typeof i)return"/"+i;if(null!=i?i.isString:void 0)return"("+i+")";if(i instanceof Date)return"(D:"+n(i.getUTCFullYear(),4)+n(i.getUTCMonth(),2)+n(i.getUTCDate(),2)+n(i.getUTCHours(),2)+n(i.getUTCMinutes(),2)+n(i.getUTCSeconds(),2)+"Z)";if("[object Object]"!=={}.toString.call(i))return""+i;for(u in r=["<<"],i)e=i[u],r.push("/"+u+" "+t.convert(e));return r.push(">>"),r.join("\n")},t}()}(t);oi="undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")();nu=function(){function n(n){var t,h,e,c,l,i,o,a,v,r,s,u,f,y;for(this.data=n,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),v=function(){for(var t=[],n=0;n<4;++n)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join("")){case"IHDR":this.width=this.readUInt32();this.height=this.readUInt32();this.bits=this.data[this.pos++];this.colorType=this.data[this.pos++];this.compressionMethod=this.data[this.pos++];this.filterMethod=this.data[this.pos++];this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":i&&this.animation.frames.push(i);this.pos+=4;i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()};l=this.readUInt16();c=this.readUInt16()||100;i.delay=1e3*l/c;i.disposeOp=this.data[this.pos++];i.blendOp=this.data[this.pos++];i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===v&&(this.pos+=4,t-=4),n=(null!=i?i.data:void 0)||this.imgData,u=0;0<=t?u<t:t<u;0<=t?++u:--u)n.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(e=this.palette.length/3,this.transparency.indexed=this.read(t),this.transparency.indexed.length>e)throw new Error("More transparent colors than palette size");if(0<(r=e-this.transparency.indexed.length))for(f=0;0<=r?f<r:r<f;0<=r?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":o=(s=this.read(t)).indexOf(0);a=String.fromCharCode.apply(String,s.slice(0,o));this.text[a]=String.fromCharCode.apply(String,s.slice(o+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(y=this.colorType)||6===y,h=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*h,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file");}}var r,i,t;n.load=function(t,i,r){var u;return"function"==typeof i&&(r=i),(u=new XMLHttpRequest).open("GET",t,!0),u.responseType="arraybuffer",u.onload=function(){var t;return t=new n(new Uint8Array(u.response||u.mozResponseArrayBuffer)),"function"==typeof(null!=i?i.getContext:void 0)&&t.render(i),"function"==typeof r?r(t):void 0},u.send(null)};n.prototype.read=function(n){for(var i=[],t=0;0<=n?t<n:n<t;0<=n?++t:--t)i.push(this.data[this.pos++]);return i};n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]};n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]};n.prototype.decodePixels=function(n){function r(r,e,o,s){var p,v,w,h,b,lt,d,g,at,nt,tt,c,l,a,y,k,it,rt,ut,ft,et,ot=Math.ceil((u.width-r)/o),st=Math.ceil((u.height-e)/s),vt=u.width==ot&&u.height==st,ht,yt,ct;for(a=t*ot,c=vt?f:new Uint8Array(a*st),lt=n.length,v=l=0;l<st&&i<lt;){switch(n[i++]){case 0:for(h=it=0;it<a;h=it+=1)c[v++]=n[i++];break;case 1:for(h=rt=0;rt<a;h=rt+=1)p=n[i++],b=h<t?0:c[v-t],c[v++]=(p+b)%256;break;case 2:for(h=ut=0;ut<a;h=ut+=1)p=n[i++],w=(h-h%t)/t,y=l&&c[(l-1)*a+w*t+h%t],c[v++]=(y+p)%256;break;case 3:for(h=ft=0;ft<a;h=ft+=1)p=n[i++],w=(h-h%t)/t,b=h<t?0:c[v-t],y=l&&c[(l-1)*a+w*t+h%t],c[v++]=(p+Math.floor((b+y)/2))%256;break;case 4:for(h=et=0;et<a;h=et+=1)p=n[i++],w=(h-h%t)/t,b=h<t?0:c[v-t],0===l?y=k=0:(y=c[(l-1)*a+w*t+h%t],k=w&&c[(l-1)*a+(w-1)*t+h%t]),d=b+y-k,g=Math.abs(d-b),nt=Math.abs(d-y),tt=Math.abs(d-k),at=g<=nt&&g<=tt?b:nt<=tt?y:k,c[v++]=(p+at)%256;break;default:throw new Error("Invalid filter algorithm: "+n[i-1]);}if(!vt)for(ht=((e+l*s)*u.width+r)*t,yt=l*a,h=0;h<ot;h+=1){for(ct=0;ct<t;ct+=1)f[ht++]=c[yt++];ht+=(o-1)*t}l++}}var t=this.pixelBitlength/8,f=new Uint8Array(this.width*this.height*t),i=0,u=this;return(null==n&&(n=this.imgData),0===n.length)?new Uint8Array(0):(n=(n=new wt(n)).getBytes(),1==u.interlaceMethod?(r(0,0,8,8),r(4,0,8,8),r(0,4,4,8),r(2,0,4,4),r(0,2,2,4),r(1,0,2,2),r(0,1,1,2)):r(0,0,1,1),f)};n.prototype.decodePalette=function(){var e,i,n,r,t,u,f,o,s;for(n=this.palette,u=this.transparency.indexed||[],t=new Uint8Array((u.length||0)+n.length),r=0,n.length,i=f=e=0,o=n.length;f<o;i=f+=3)t[r++]=n[i],t[r++]=n[i+1],t[r++]=n[i+2],t[r++]=null!=(s=u[e++])?s:255;return t};n.prototype.copyToImageData=function(n,t){var s,c,u,i,f,e,r,l,o,h,a;if(c=this.colors,o=null,s=this.hasAlphaChannel,this.palette.length&&(o=null!=(a=this._decodedPalette)?a:this._decodedPalette=this.decodePalette(),c=4,s=!0),l=(u=n.data||n).length,f=o||t,i=e=0,1===c)for(;i<l;)r=o?4*t[i/4]:e,h=f[r++],u[i++]=h,u[i++]=h,u[i++]=h,u[i++]=s?f[r++]:255,e=r;else for(;i<l;)r=o?4*t[i/4]:e,u[i++]=f[r++],u[i++]=f[r++],u[i++]=f[r++],u[i++]=s?f[r++]:255,e=r};n.prototype.decode=function(){var n;return n=new Uint8Array(this.width*this.height*4),this.copyToImageData(n,this.decodePixels()),n};try{i=oi.document.createElement("canvas");t=i.getContext("2d")}catch(u){return-1}return r=function(n){var r;return t.width=n.width,t.height=n.height,t.clearRect(0,0,n.width,n.height),t.putImageData(n,0,0),(r=new Image).src=i.toDataURL(),r},n.prototype.decodeFrames=function(n){var t,u,i,o,f,s,h,e;if(this.animation){for(e=[],u=f=0,s=(h=this.animation.frames).length;f<s;u=++f)t=h[u],i=n.createImageData(t.width,t.height),o=this.decodePixels(new Uint8Array(t.data)),this.copyToImageData(i,o),t.imageData=i,e.push(t.image=r(i));return e}},n.prototype.renderFrame=function(n,t){var r,u,i;return r=(u=this.animation.frames)[t],i=u[t-1],0===t&&n.clearRect(0,0,this.width,this.height),1===(null!=i?i.disposeOp:void 0)?n.clearRect(i.xOffset,i.yOffset,i.width,i.height):2===(null!=i?i.disposeOp:void 0)&&n.putImageData(i.imageData,i.xOffset,i.yOffset),0===r.blendOp&&n.clearRect(r.xOffset,r.yOffset,r.width,r.height),n.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(n){var u,r,f,t,e,i,o=this;return r=0,i=this.animation,t=i.numFrames,f=i.frames,e=i.numPlays,(u=function(){var i,s;if(i=r++%t,s=f[i],o.renderFrame(n,i),1<t&&r/t<e)return o.animation._timeout=setTimeout(u,s.delay)})()},n.prototype.stopAnimation=function(){var n;return clearTimeout(null!=(n=this.animation)?n._timeout:void 0)},n.prototype.render=function(n){var t,i;return n._png&&n._png.stopAnimation(),n._png=this,n.width=this.width,n.height=this.height,t=n.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(i=t.createImageData(this.width,this.height),this.copyToImageData(i,this.decodePixels()),t.putImageData(i,0,0))},n}();oi.PNG=nu;ci=function(){function n(){this.pos=0;this.bufferLength=0;this.eof=!1;this.buffer=null}return n.prototype={ensureBuffer:function(n){var i=this.buffer,f=i?i.byteLength:0,r,u,t;if(n<f)return i;for(r=512;r<n;)r<<=1;for(u=new Uint8Array(r),t=0;t<f;++t)u[t]=i[t];return this.buffer=u},getByte:function(){for(var n=this.pos;this.bufferLength<=n;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(n){var i=this.pos,t,r;if(n){for(this.ensureBuffer(i+n),t=i+n;!this.eof&&this.bufferLength<t;)this.readBlock();r=this.bufferLength;r<t&&(t=r)}else{for(;!this.eof;)this.readBlock();t=this.bufferLength}return this.pos=t,this.buffer.subarray(i,t)},lookChar:function(){for(var n=this.pos;this.bufferLength<=n;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var n=this.pos;this.bufferLength<=n;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(n,t,i){for(var r=n+t;this.bufferLength<=r&&!this.eof;)this.readBlock();return new Stream(this.buffer,n,t,i)},skip:function(n){n||(n=1);this.pos+=n},reset:function(){this.pos=0}},n}();wt=function(){function n(n){throw new Error(n);}function t(t){var u=0,i=t[u++],r=t[u++];-1!=i&&-1!=r||n("Invalid header in flate stream");8!=(15&i)&&n("Unknown compression method in flate stream");((i<<8)+r)%31!=0&&n("Bad FCHECK in flate stream");32&r&&n("FDICT bit set in flate stream");this.bytes=t;this.bytesPos=2;this.codeSize=0;this.codeBuf=0;ci.call(this)}if("undefined"!=typeof Uint32Array){var i=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),u=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),f=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],e=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return(t.prototype=Object.create(ci.prototype)).getBits=function(t){for(var i,r=this.codeSize,u=this.codeBuf,e=this.bytes,f=this.bytesPos;r<t;)void 0===(i=e[f++])&&n("Bad encoding in flate stream"),u|=i<<r,r+=8;return i=u&(1<<t)-1,this.codeBuf=u>>t,this.codeSize=r-=t,this.bytesPos=f,i},t.prototype.getCode=function(t){for(var o,h=t[0],f=t[1],i=this.codeSize,u=this.codeBuf,c=this.bytes,e=this.bytesPos;i<f;)void 0===(o=c[e++])&&n("Bad encoding in flate stream"),u|=o<<i,i+=8;var s=h[u&(1<<f)-1],r=s>>16,l=65535&s;return(0==i||i<r||0==r)&&n("Bad encoding in flate stream"),this.codeBuf=u>>r,this.codeSize=i-r,this.bytesPos=e,l},t.prototype.generateHuffmanTable=function(n){for(var u,f,o,s=n.length,i=0,t=0;t<s;++t)n[t]>i&&(i=n[t]);for(var h=1<<i,c=new Uint32Array(h),r=1,e=0,l=2;r<=i;++r,e<<=1,l<<=1)for(u=0;u<s;++u)if(n[u]==r){for(f=0,o=e,t=0;t<r;++t)f=f<<1|1&o,o>>=1;for(t=f;t<h;t+=l)c[t]=r<<16|u;++e}return[c,i]},t.prototype.readBlock=function(){function nt(n,t,i,r,u){for(var f=n.getBits(i)+r;0<f--;)t[v++]=u}var d=this.getBits(3),tt,it,w,b,o,t,h,st,ft,s,p,a,k,ht,g;if(1&d&&(this.eof=!0),0!=(d>>=1)){if(1==d)tt=f,it=e;else if(2==d){for(var rt=this.getBits(5)+257,lt=this.getBits(5)+1,at=this.getBits(4)+4,ot=Array(i.length),v=0;v<at;)ot[i[v++]]=this.getBits(3);for(var vt=this.generateHuffmanTable(ot),c=0,ut=(v=0,rt+lt),y=new Array(ut);v<ut;)w=this.getCode(vt),16==w?nt(this,y,2,3,c):17==w?nt(this,y,3,3,c=0):18==w?nt(this,y,7,11,c=0):y[v++]=c=w;tt=this.generateHuffmanTable(y.slice(0,rt));it=this.generateHuffmanTable(y.slice(rt,ut))}else n("Unknown block type in flate stream");for(b=(l=this.buffer)?l.length:0,o=this.bufferLength;;)if(t=this.getCode(tt),t<256)b<=o+1&&(b=(l=this.ensureBuffer(o+1)).length),l[o++]=t;else{if(256==t)return void(this.bufferLength=o);for(h=(t=r[t-=257])>>16,0<h&&(h=this.getBits(h)),c=(65535&t)+h,t=this.getCode(it),0<(h=(t=u[t])>>16)&&(h=this.getBits(h)),st=(65535&t)+h,b<=o+c&&(b=(l=this.ensureBuffer(o+c)).length),ft=0;ft<c;++ft,++o)l[o]=l[o-st]}}else{p=this.bytes;a=this.bytesPos;void 0===(s=p[a++])&&n("Bad block header in flate stream");k=s;void 0===(s=p[a++])&&n("Bad block header in flate stream");k|=s<<8;void 0===(s=p[a++])&&n("Bad block header in flate stream");ht=s;void 0===(s=p[a++])&&n("Bad block header in flate stream");(ht|=s<<8)!=(65535&~k)&&n("Bad uncompressed block length in flate stream");this.codeBuf=0;this.codeSize=0;var et=this.bufferLength,l=this.ensureBuffer(et+k),ct=et+k;for(this.bufferLength=ct,g=et;g<ct;++g){if(void 0===(s=p[a++])){this.eof=!0;break}l[g]=s}this.bytesPos=a}},t}}();window.tmp=wt});try{module.exports=jsPDF}catch(t){}