(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";e.exports=n(1653)},function(e,t,n){e.exports=n(1680)()},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ServerStyleSheet",(function(){return Be})),n.d(t,"StyleSheetConsumer",(function(){return ie})),n.d(t,"StyleSheetContext",(function(){return re})),n.d(t,"StyleSheetManager",(function(){return ce})),n.d(t,"ThemeConsumer",(function(){return Le})),n.d(t,"ThemeContext",(function(){return ke})),n.d(t,"ThemeProvider",(function(){return Re})),n.d(t,"__PRIVATE__",(function(){return He})),n.d(t,"createGlobalStyle",(function(){return Fe})),n.d(t,"css",(function(){return _e})),n.d(t,"isStyledComponent",(function(){return _})),n.d(t,"keyframes",(function(){return ze})),n.d(t,"useTheme",(function(){return Ve})),n.d(t,"version",(function(){return x})),n.d(t,"withTheme",(function(){return Ue}));var r=n(349),i=n(0),o=n.n(i),a=n(1375),s=n.n(a),l=n(616),u=n(410),c=n(854),f=n(122),d=n.n(f);function p(){return(p=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var S=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&M(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o=P&&(P=t+1),T.set(e,t),C.set(t,e)},D="style["+A+'][data-styled-version="5.3.5"]',j=new RegExp("^"+A+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),I=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(A))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(A,"active"),r.setAttribute("data-styled-version","5.3.5");var a=F();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},B=function(){function e(e){var t=this.element=z(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+",")})),r+=""+s+l+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),Y=/(a)(d)/gi,G=function(e){return String.fromCharCode(e+(e>25?39:97))};function X(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=G(t%52)+n;return(G(t%52)+n).replace(Y,"$1-$2")}var Z=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},K=function(e){return Z(5381,e)};function $(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var s=n(o,"."+a,void 0,r);t.insertRules(r,a,s)}i.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,u=Z(this.baseHash,n.hash),c="",f=0;f>>0);if(!t.hasNameForId(r,g)){var m=n(c,"."+g,void 0,r);t.insertRules(r,g,m)}i.push(g)}}return i.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,i,o=void 0===e?y:e,a=o.options,s=void 0===a?y:a,u=o.plugins,c=void 0===u?m:u,f=new l.a(s),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,s,l,u,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),h=function(e,r,o){return 0===r&&-1!==te.indexOf(o[n.length])||o.match(i)?e:"."+t};function g(e,o,a,s){void 0===s&&(s="&");var l=e.replace(ee,""),u=o&&a?a+" "+o+" { "+l+" }":l;return t=s,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),f(a||!o?"":o,u)}return f.use([].concat(c,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,h))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),g.hash=c.length?c.reduce((function(e,t){return t.name||M(15),Z(e,t.name)}),5381).toString():"",g}var re=o.a.createContext(),ie=re.Consumer,oe=o.a.createContext(),ae=(oe.Consumer,new q),se=ne();function le(){return Object(i.useContext)(re)||ae}function ue(){return Object(i.useContext)(oe)||se}function ce(e){var t=Object(i.useState)(e.stylisPlugins),n=t[0],r=t[1],a=le(),l=Object(i.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),u=Object(i.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(i.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),o.a.createElement(re.Provider,{value:l},o.a.createElement(oe.Provider,{value:u},e.children))}var fe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return M(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),de=/([A-Z])/,pe=/([A-Z])/g,he=/^ms-/,ge=function(e){return"-"+e.toLowerCase()};function me(e){return de.test(e)?e.replace(pe,ge).replace(he,"-ms-"):e}var ye=function(e){return null==e||!1===e||""===e};function ve(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],a=0,s=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,we=/(^-|-$)/g;function Ee(e){return e.replace(xe,"-").replace(we,"")}var Oe=function(e){return X(K(e)>>>0)};function Me(e){return"string"==typeof e&&!0}var Se=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Te=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ce(e,t,n){var r=e[n];Se(t)&&Se(r)?Pe(r,t):e[n]=t}function Pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(Me(e)?e:Ee(b(e)));return je(e,p({},i,{attrs:x,componentId:o}),n)},Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Pe({},e.defaultProps,t):t}}),E.toString=function(){return"."+E.styledComponentId},a&&d()(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),E}var Ie=function(e){return function e(t,n,i){if(void 0===i&&(i=y),!Object(r.isValidElementType)(n))return M(1,String(n));var o=function(){return t(n,i,_e.apply(void 0,arguments))};return o.withConfig=function(r){return e(t,n,p({},i,{},r))},o.attrs=function(r){return e(t,n,p({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},o}(je,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ie[e]=Ie(e)}));var Ne=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=$(e),q.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(ve(this.rules,t,n,r).join(""),""),o=this.componentId+e;n.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&q.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Fe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?M(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return M(2);var n=((t={})[A]="",t["data-styled-version"]="5.3.5",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=F();return r&&(n.nonce=r),[o.a.createElement("style",p({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new q({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?M(2):o.a.createElement(ce,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return M(3)},e}(),Ue=function(e){var t=o.a.forwardRef((function(t,n){var r=Object(i.useContext)(ke),a=e.defaultProps,s=Ae(t,r,a);return o.a.createElement(e,p({},t,{theme:s,ref:n}))}));return d()(t,e),t.displayName="WithTheme("+b(e)+")",t},Ve=function(){return Object(i.useContext)(ke)},He={StyleSheet:q,masterSheet:ae};t.default=Ie}.call(this,n(61))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,O=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,D={},j={};function I(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(j[e]=i),t&&(j[t[0]]=function(){return k(i.apply(this,arguments),t[1],t[2])}),n&&(j[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function N(e,t){return e.isValid()?(t=F(t,e.localeData()),D[t]=D[t]||function(e){var t,n,r,i=e.match(L);for(t=0,n=i.length;t=0&&R.test(e);)e=e.replace(R,r),R.lastIndex=0,n-=1;return e}var z={};function B(e,t){var n=e.toLowerCase();z[n]=z[n+"s"]=z[t]=e}function U(e){return"string"==typeof e?z[e]||z[e.toLowerCase()]:void 0}function V(e){var t,n,r={};for(n in e)s(e,n)&&(t=U(n))&&(r[t]=e[n]);return r}var H={};function W(e,t){H[e]=t}function q(e){return e%4==0&&e%100!=0||e%400==0}function Y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Y(t)),n}function X(e,t){return function(n){return null!=n?(K(this,e,n),i.updateOffset(this,t),this):Z(this,e)}}function Z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function K(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&q(e.year())&&1===e.month()&&29===e.date()?(n=G(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var $,J=/\d/,Q=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,re=/\d\d?/,ie=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,ae=/\d{1,3}/,se=/\d{1,4}/,le=/[+-]?\d{1,6}/,ue=/\d+/,ce=/[+-]?\d+/,fe=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function he(e,t,n){$[e]=T(t)?t:function(e,r){return e&&n?n:t}}function ge(e,t){return s($,e)?$[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}$={};var ye,ve={};function be(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),c(t)&&(i=function(e,n){n[t]=G(e)}),r=e.length,n=0;n68?1900:2e3)};var Re=X("FullYear",!0);function De(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function je(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ie(e,t,n){var r=7+t-n;return-(7+je(e,0,r).getUTCDay()-t)%7+r-1}function Ne(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Ie(e,r,i);return s<=0?a=Le(o=e-1)+s:s>Le(e)?(o=e+1,a=s-Le(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Fe(e,t,n){var r,i,o=Ie(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+ze(i=e.year()-1,t,n):a>ze(e.year(),t,n)?(r=a-ze(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function ze(e,t,n){var r=Ie(e,t,n),i=Ie(e+1,t,n);return(Le(e)-r+i)/7}function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),W("week",5),W("isoWeek",5),he("w",re),he("ww",re,Q),he("W",re),he("WW",re,Q),_e(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=G(e)})),I("d",0,"do","day"),I("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),I("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),I("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),he("d",re),he("e",re),he("E",re),he("dd",(function(e,t){return t.weekdaysMinRegex(e)})),he("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),he("dddd",(function(e,t){return t.weekdaysRegex(e)})),_e(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e})),_e(["d","e","E"],(function(e,t,n,r){t[r]=G(e)}));var Ue="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),He="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),We=pe,qe=pe,Ye=pe;function Ge(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null}function Xe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=me(this.weekdaysMin(n,"")),i=me(this.weekdaysShort(n,"")),o=me(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);a.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ze(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function $e(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Ze),I("k",["kk",2],0,(function(){return this.hours()||24})),I("hmm",0,0,(function(){return""+Ze.apply(this)+k(this.minutes(),2)})),I("hmmss",0,0,(function(){return""+Ze.apply(this)+k(this.minutes(),2)+k(this.seconds(),2)})),I("Hmm",0,0,(function(){return""+this.hours()+k(this.minutes(),2)})),I("Hmmss",0,0,(function(){return""+this.hours()+k(this.minutes(),2)+k(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),B("hour","h"),W("hour",13),he("a",$e),he("A",$e),he("H",re),he("h",re),he("k",re),he("HH",re,Q),he("hh",re,Q),he("kk",re,Q),he("hmm",ie),he("hmmss",oe),he("Hmm",ie),he("Hmmss",oe),be(["H","HH"],3),be(["k","kk"],(function(e,t,n){var r=G(e);t[3]=24===r?0:r})),be(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),be(["h","hh"],(function(e,t,n){t[3]=G(e),g(n).bigHour=!0})),be("hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r)),g(n).bigHour=!0})),be("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(i)),g(n).bigHour=!0})),be("Hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r))})),be("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(i))}));var Je,Qe=X("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:we,monthsShort:Ee,week:{dow:0,doy:6},weekdays:Ue,weekdaysMin:He,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=ot(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&rt(i,n)>=t-1)break;t--}o++}return Je}(e)}function ut(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>xe(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,g(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),g(e)._overflowWeeks&&-1===t&&(t=7),g(e)._overflowWeekday&&-1===t&&(t=8),g(e).overflow=t),e}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ht=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gt=/^\/?Date\((-?\d+)/i,mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,yt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,r,i,o,a,s=e._i,l=ct.exec(s)||ft.exec(s),u=pt.length,c=ht.length;if(l){for(g(e).iso=!0,t=0,n=u;t7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,u=Fe(Mt(),o,a),n=At(t.gg,e._a[0],u.year),r=At(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>ze(n,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=Ne(n,r,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=At(e._a[0],r[0]),(e._dayOfYear>Le(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=je(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?je:De).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function wt(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],g(e).empty=!0;var t,n,r,o,a,s,l,u=""+e._i,c=u.length,f=0;for(l=(r=F(e._f,e._locale).match(L)||[]).length,t=0;t0&&g(e).unusedInput.push(a),u=u.slice(u.indexOf(n)+n.length),f+=n.length),j[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),Ae(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);g(e).charsLeftOver=c-f,u.length>0&&g(e).unusedInput.push(u),e._a[3]<=12&&!0===g(e).bigHour&&e._a[3]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=g(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),xt(e),ut(e)}else _t(e);else vt(e)}function Et(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),x(t)?new A(ut(t)):(f(t)?e._d=t:o(n)?function(e){var t,n,r,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:y()}));function Ct(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Mt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function on(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function an(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],r=[],i=[],o=[],a=this.eras();for(e=0,t=a.length;e(o=ze(e,r,i))&&(t=o),cn.call(this,e,t,n,r,i))}function cn(e,t,n,r,i){var o=Ne(e,t,n,r,i),a=je(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}I("N",0,0,"eraAbbr"),I("NN",0,0,"eraAbbr"),I("NNN",0,0,"eraAbbr"),I("NNNN",0,0,"eraName"),I("NNNNN",0,0,"eraNarrow"),I("y",["y",1],"yo","eraYear"),I("y",["yy",2],0,"eraYear"),I("y",["yyy",3],0,"eraYear"),I("y",["yyyy",4],0,"eraYear"),he("N",an),he("NN",an),he("NNN",an),he("NNNN",(function(e,t){return t.erasNameRegex(e)})),he("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e})),he("y",ue),he("yy",ue),he("yyy",ue),he("yyyy",ue),he("yo",(function(e,t){return t._eraYearOrdinalRegex||ue})),be(["y","yy","yyy","yyyy"],0),be(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)})),I(0,["gg",2],0,(function(){return this.weekYear()%100})),I(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),he("G",ce),he("g",ce),he("GG",re,Q),he("gg",re,Q),he("GGGG",se,te),he("gggg",se,te),he("GGGGG",le,ne),he("ggggg",le,ne),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=G(e)})),_e(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),I("Q",0,"Qo","quarter"),B("quarter","Q"),W("quarter",7),he("Q",J),be("Q",(function(e,t){t[1]=3*(G(e)-1)})),I("D",["DD",2],"Do","date"),B("date","D"),W("date",9),he("D",re),he("DD",re,Q),he("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),be(["D","DD"],2),be("Do",(function(e,t){t[2]=G(e.match(re)[0])}));var fn=X("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),W("dayOfYear",4),he("DDD",ae),he("DDDD",ee),be(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=G(e)})),I("m",["mm",2],0,"minute"),B("minute","m"),W("minute",14),he("m",re),he("mm",re,Q),be(["m","mm"],4);var dn=X("Minutes",!1);I("s",["ss",2],0,"second"),B("second","s"),W("second",15),he("s",re),he("ss",re,Q),be(["s","ss"],5);var pn,hn,gn=X("Seconds",!1);for(I("S",0,0,(function(){return~~(this.millisecond()/100)})),I(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),I(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),I(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),I(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),I(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),I(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),B("millisecond","ms"),W("millisecond",16),he("S",ae,J),he("SS",ae,Q),he("SSS",ae,ee),pn="SSSS";pn.length<=9;pn+="S")he(pn,ue);function mn(e,t){t[6]=G(1e3*("0."+e))}for(pn="S";pn.length<=9;pn+="S")be(pn,mn);hn=X("Milliseconds",!1),I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var yn=A.prototype;function vn(e){return e}yn.add=Gt,yn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):$t(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Mt(),r=Nt(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(T(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Mt(n)))},yn.clone=function(){return new A(this)},yn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Nt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=U(t)){case"year":o=Jt(this,r)/12;break;case"month":o=Jt(this,r);break;case"quarter":o=Jt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:Y(o)},yn.endOf=function(e){var t,n;if(void 0===(e=U(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},yn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=N(this,e);return this.localeData().postformat(t)},yn.from=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Mt(e).isValid())?Vt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},yn.fromNow=function(e){return this.from(Mt(),e)},yn.to=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Mt(e).isValid())?Vt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},yn.toNow=function(e){return this.to(Mt(),e)},yn.get=function(e){return T(this[e=U(e)])?this[e]():this},yn.invalidAt=function(){return g(this).overflow},yn.isAfter=function(e,t){var n=x(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?N(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",N(n,"Z")):N(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},yn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(yn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),yn.toJSON=function(){return this.isValid()?this.toISOString():null},yn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},yn.unix=function(){return Math.floor(this.valueOf()/1e3)},yn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},yn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},yn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yn.isLocal=function(){return!!this.isValid()&&!this._isUTC},yn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yn.isUtc=zt,yn.isUTC=zt,yn.zoneAbbr=function(){return this._isUTC?"UTC":""},yn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yn.dates=E("dates accessor is deprecated. Use date instead.",fn),yn.months=E("months accessor is deprecated. Use month instead",Pe),yn.years=E("years accessor is deprecated. Use year instead",Re),yn.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),yn.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Et(t))._a?(e=t._isUTC?h(t._a):Mt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted}));var bn=P.prototype;function _n(e,t,n,r){var i=lt(),o=h().set(r,t);return i[n](o,e)}function An(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return _n(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=_n(e,r,n,"month");return i}function xn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=lt(),a=e?o._week.dow:0,s=[];if(null!=n)return _n(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=_n(t,(i+a)%7,r,"day");return s}bn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r},bn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},bn.invalidDate=function(){return this._invalidDate},bn.ordinal=function(e){return this._ordinal.replace("%d",e)},bn.preparse=vn,bn.postformat=vn,bn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)},bn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},bn.set=function(e){var t,n;for(n in e)s(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},bn.eras=function(e,t){var n,r,o,a=this._eras||lt("en")._eras;for(n=0,r=a.length;n=0)return l[r]},bn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n},bn.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},bn.erasNameRegex=function(e){return s(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},bn.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},bn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},bn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},bn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Te.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},bn.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||ke.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Se),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},bn.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||ke.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Me),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},bn.week=function(e){return Fe(e,this._week.dow,this._week.doy).week},bn.firstDayOfYear=function(){return this._week.doy},bn.firstDayOfWeek=function(){return this._week.dow},bn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Be(n,this._week.dow):e?n[e.day()]:n},bn.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},bn.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},bn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ge.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},bn.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=We),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},bn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},bn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ye),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},bn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},bn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===G(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=E("moment.lang is deprecated. Use moment.locale instead.",at),i.langData=E("moment.langData is deprecated. Use moment.localeData instead.",lt);var wn=Math.abs;function En(e,t,n,r){var i=Vt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function On(e){return e<0?Math.floor(e):Math.ceil(e)}function Mn(e){return 4800*e/146097}function Sn(e){return 146097*e/4800}function Tn(e){return function(){return this.as(e)}}var Cn=Tn("ms"),Pn=Tn("s"),kn=Tn("m"),Ln=Tn("h"),Rn=Tn("d"),Dn=Tn("w"),jn=Tn("M"),In=Tn("Q"),Nn=Tn("y");function Fn(e){return function(){return this.isValid()?this._data[e]:NaN}}var zn=Fn("milliseconds"),Bn=Fn("seconds"),Un=Fn("minutes"),Vn=Fn("hours"),Hn=Fn("days"),Wn=Fn("months"),qn=Fn("years"),Yn=Math.round,Gn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var Zn=Math.abs;function Kn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=Zn(this._milliseconds)/1e3,u=Zn(this._days),c=Zn(this._months),f=this.asSeconds();return f?(e=Y(l/60),t=Y(e/60),l%=60,e%=60,n=Y(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=f<0?"-":"",o=Kn(this._months)!==Kn(f)?"-":"",a=Kn(this._days)!==Kn(f)?"-":"",s=Kn(this._milliseconds)!==Kn(f)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?a+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var Jn=kt.prototype;return Jn.isValid=function(){return this._isValid},Jn.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},Jn.add=function(e,t){return En(this,e,t,1)},Jn.subtract=function(e,t){return En(this,e,t,-1)},Jn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=U(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Mn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Sn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Jn.asMilliseconds=Cn,Jn.asSeconds=Pn,Jn.asMinutes=kn,Jn.asHours=Ln,Jn.asDays=Rn,Jn.asWeeks=Dn,Jn.asMonths=jn,Jn.asQuarters=In,Jn.asYears=Nn,Jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},Jn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*On(Sn(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=Y(o/1e3),l.seconds=e%60,t=Y(e/60),l.minutes=t%60,n=Y(t/60),l.hours=n%24,a+=Y(n/24),i=Y(Mn(a)),s+=i,a-=On(Sn(i)),r=Y(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Jn.clone=function(){return Vt(this)},Jn.get=function(e){return e=U(e),this.isValid()?this[e+"s"]():NaN},Jn.milliseconds=zn,Jn.seconds=Bn,Jn.minutes=Un,Jn.hours=Vn,Jn.days=Hn,Jn.weeks=function(){return Y(this.days()/7)},Jn.months=Wn,Jn.years=qn,Jn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=Gn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},Gn,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var i=Vt(e).abs(),o=Yn(i.as("s")),a=Yn(i.as("m")),s=Yn(i.as("h")),l=Yn(i.as("d")),u=Yn(i.as("M")),c=Yn(i.as("w")),f=Yn(i.as("y")),d=o<=n.ss&&["s",o]||o0,d[4]=r,Xn.apply(null,d)}(this,!i,o,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},Jn.toISOString=$n,Jn.toString=$n,Jn.toJSON=$n,Jn.locale=Qt,Jn.localeData=tn,Jn.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Jn.lang=en,I("X",0,0,"unix"),I("x",0,0,"valueOf"),he("x",ce),he("X",/[+-]?\d+(\.\d{1,3})?/),be("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),be("x",(function(e,t,n){n._d=new Date(G(e))})), //! moment.js i.version="2.29.2",t=Mt,i.fn=yn,i.min=function(){var e=[].slice.call(arguments,0);return Ct("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return Ct("isAfter",e)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=h,i.unix=function(e){return Mt(1e3*e)},i.months=function(e,t){return An(e,t,"months")},i.isDate=f,i.locale=at,i.invalid=y,i.duration=Vt,i.isMoment=x,i.weekdays=function(e,t,n){return xn(e,t,n,"weekdays")},i.parseZone=function(){return Mt.apply(null,arguments).parseZone()},i.localeData=lt,i.isDuration=Lt,i.monthsShort=function(e,t){return An(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return xn(e,t,n,"weekdaysMin")},i.defineLocale=st,i.updateLocale=function(e,t){if(null!=t){var n,r,i=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(C(tt[e]._config,t)):(null!=(r=ot(e))&&(i=r._config),t=C(i,t),null==r&&(t.abbr=e),(n=new P(t)).parentLocale=tt[e],tt[e]=n),at(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===at()&&at(e)):null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return O(tt)},i.weekdaysShort=function(e,t,n){return xn(e,t,n,"weekdaysShort")},i.normalizeUnits=U,i.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Gn[e]&&(void 0===t?Gn[e]:(Gn[e]=t,"s"===e&&(Gn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=yn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(219)(e))},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,l,"next",e)}function l(e){r(a,i,o,s,l,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1381);var i=n(617),o=n(1382);function a(e,t){return Object(r.a)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||Object(i.a)(e,t)||Object(o.a)()}},function(e,t,n){"use strict";n.d(t,"k",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return z})),n.d(t,"n",(function(){return F})),n.d(t,"l",(function(){return B})),n.d(t,"o",(function(){return U})),n.d(t,"c",(function(){return J})),n.d(t,"m",(function(){return ee})),n.d(t,"h",(function(){return Q})),n.d(t,"e",(function(){return H})),n.d(t,"d",(function(){return W}));const r=new(n(2459).a)({id:"luma.gl"});function i(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}function o(e){return"undefined"!=typeof WebGLRenderingContext&&e instanceof WebGLRenderingContext||("undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&Number.isFinite(e._version)))}function a(e){return"undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}function s(e){return a(e)?e:null}function l(e){return i(o(e),"Invalid WebGLRenderingContext"),e}function u(e){return i(a(e),"Requires WebGL2"),e}const c={};function f(e,t){var n;c[e]=!0,void 0!==t&&(n=t,globalThis.console&&globalThis.console.error&&globalThis.console.error(n))}const d=function e(t){const n=t.gl;this.ext=t,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(t.maxVertexAttribs);for(let t=0;t{var e;e="OESVertexArrayObject emulation library context restored",globalThis.console&&globalThis.console.log&&globalThis.console.log(e),t.reset_()},!0),this.reset_()};p.prototype.VERTEX_ARRAY_BINDING_OES=34229,p.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(let e=0;ea(e)?void 0:0,g={3074:e=>a(e)?void 0:36064,35723:e=>a(e)?void 0:4352,35977:h,32937:h,36795:(e,t)=>{const n=a(e)?e.getExtension("EXT_disjoint_timer_query_webgl2"):e.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?t(n.GPU_DISJOINT_EXT):0},37445:(e,t)=>{const n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_VENDOR_WEBGL||7936)},37446:(e,t)=>{const n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_RENDERER_WEBGL||7937)},34047:(e,t)=>{const n=e.luma.extensions.EXT_texture_filter_anisotropic;return n?t(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1},32883:h,35071:h,37447:h,36063:(e,t)=>{if(!a(e)){const n=e.getExtension("WEBGL_draw_buffers");return n?t(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:h,35374:h,35377:h,34852:e=>{if(!a(e)){const t=e.getExtension("WEBGL_draw_buffers");return t?t.MAX_DRAW_BUFFERS_WEBGL:0}},36203:e=>e.getExtension("OES_element_index")?2147483647:65535,33001:e=>e.getExtension("OES_element_index")?16777216:65535,33e3:e=>16777216,37157:h,35373:h,35657:h,36183:h,37137:h,34045:h,35978:h,35979:h,35968:h,35376:h,35375:h,35659:h,37154:h,35371:h,35658:h,35076:h,35077:h,35380:h};const m={OES_vertex_array_object:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},ANGLE_instanced_arrays:{meta:{suffix:"ANGLE"},vertexAttribDivisor(e,t){i(0===t,"WebGL instanced rendering not supported")},drawElementsInstanced:()=>{},drawArraysInstanced:()=>{}},WEBGL_draw_buffers:{meta:{suffix:"WEBGL"},drawBuffers:()=>{i(!1)}},EXT_disjoint_timer_query:{meta:{suffix:"EXT"},createQuery:()=>{i(!1)},deleteQuery:()=>{i(!1)},beginQuery:()=>{i(!1)},endQuery:()=>{},getQuery(e,t){return this.getQueryObject(e,t)},getQueryParameter(e,t){return this.getQueryObject(e,t)},getQueryObject:()=>{}}},y={readBuffer:(e,t,n)=>{a(e)&&t(n)},getVertexAttrib:(e,t,n,r)=>{const{webgl2:i,ext:o}=function(e,t){return{webgl2:a(e),ext:e.getExtension(t)}}(e,"ANGLE_instanced_arrays");let s;switch(r){case 35069:s=!!i&&void 0;break;case 35070:s=i||o?void 0:0}return void 0!==s?s:t(n,r)},getProgramParameter:(e,t,n,r)=>{if(!a(e))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return t(n,r)},getInternalformatParameter:(e,t,n,r,i)=>{if(!a(e))switch(i){case 32937:return new Int32Array([0])}return e.getInternalformatParameter(n,r,i)},getTexParameter(e,t,n,r){switch(r){case 34046:const{extensions:t}=e.luma,n=t.EXT_texture_filter_anisotropic;r=n&&n.TEXTURE_MAX_ANISOTROPY_EXT||34046}return t(n,r)},getParameter:function(e,t,n){const r=g[n],i="function"==typeof r?r(e,t,n):r;return void 0!==i?i:t(n)},hint:(e,t,n,r)=>t(n,r)};function v(e,t){let{extension:n,target:r,target2:o}=t;const a=m[n];i(a);const{meta:s={}}=a,{suffix:l=""}=s,u=e.getExtension(n);for(const t of Object.keys(a)){const n="".concat(t).concat(l);let i=null;"meta"===t||"function"==typeof e[t]||(u&&"function"==typeof u[n]?i=function(){return u[n](...arguments)}:"function"==typeof a[t]&&(i=a[t].bind(r))),i&&(r[t]=i,o[t]=i)}}globalThis.polyfillContext=function(e){e.luma=e.luma||{};const{luma:t}=e;return t.polyfilled||(!function(e){if("function"==typeof e.createVertexArray)return;const t=e.getSupportedExtensions;e.getSupportedExtensions=function(){const e=t.call(this)||[];return e.indexOf("OES_vertex_array_object")<0&&e.push("OES_vertex_array_object"),e};const n=e.getExtension;e.getExtension=function(t){const r=n.call(this,t);return r||("OES_vertex_array_object"!==t?null:(e.__OESVertexArrayObject||(this.__OESVertexArrayObject=new p(this)),this.__OESVertexArrayObject))}}(e),function(e){e.luma.extensions={};const t=e.getSupportedExtensions()||[];for(const n of t)e.luma[n]=e.getExtension(n)}(e),function(e,t){for(const n of Object.getOwnPropertyNames(t))"overrides"!==n&&v(e,{extension:n,target:e.luma,target2:e})}(e,m),function(e,t){let{target:n,target2:r}=t;Object.keys(y).forEach(t=>{if("function"==typeof y[t]){const i=e[t]?e[t].bind(e):()=>{},o=y[t].bind(null,e,i);n[t]=o,r[t]=o}})}(e,{target:t,target2:e}),t.polyfilled=!0),e};const b={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,36006:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],3333:4,3317:4,37440:!1,37441:!1,37443:37444,35723:4352,36010:null,35977:!1,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},_=(e,t,n)=>t?e.enable(n):e.disable(n),A=(e,t,n)=>e.hint(n,t),x=(e,t,n)=>e.pixelStorei(n,t);function w(e){return Array.isArray(e)||ArrayBuffer.isView(e)}const E={3042:_,32773:(e,t)=>e.blendColor(...t),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(e,t)=>e.clearColor(...t),3107:(e,t)=>e.colorMask(...t),2884:_,2885:(e,t)=>e.cullFace(t),2929:_,2931:(e,t)=>e.clearDepth(t),2932:(e,t)=>e.depthFunc(t),2928:(e,t)=>e.depthRange(...t),2930:(e,t)=>e.depthMask(t),3024:_,35723:A,36006:(e,t)=>{const n=a(e)?36009:36160;return e.bindFramebuffer(n,t)},2886:(e,t)=>e.frontFace(t),33170:A,2849:(e,t)=>e.lineWidth(t),32823:_,32824:"polygonOffset",10752:"polygonOffset",35977:_,32938:"sampleCoverage",32939:"sampleCoverage",3089:_,3088:(e,t)=>e.scissor(...t),2960:_,2961:(e,t)=>e.clearStencil(t),2968:(e,t)=>e.stencilMaskSeparate(1028,t),36005:(e,t)=>e.stencilMaskSeparate(1029,t),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(e,t)=>e.viewport(...t),3333:x,3317:x,37440:x,37441:x,37443:x,3330:x,3332:x,3331:x,36010:(e,t)=>e.bindFramebuffer(36008,t),3314:x,32878:x,3316:x,3315:x,32877:x,framebuffer:(e,t)=>{const n=t&&"handle"in t?t.handle:t;return e.bindFramebuffer(36160,n)},blend:(e,t)=>t?e.enable(3042):e.disable(3042),blendColor:(e,t)=>e.blendColor(...t),blendEquation:(e,t)=>{t=w(t)?t:[t,t],e.blendEquationSeparate(...t)},blendFunc:(e,t)=>{t=w(t)&&2===t.length?[...t,...t]:t,e.blendFuncSeparate(...t)},clearColor:(e,t)=>e.clearColor(...t),clearDepth:(e,t)=>e.clearDepth(t),clearStencil:(e,t)=>e.clearStencil(t),colorMask:(e,t)=>e.colorMask(...t),cull:(e,t)=>t?e.enable(2884):e.disable(2884),cullFace:(e,t)=>e.cullFace(t),depthTest:(e,t)=>t?e.enable(2929):e.disable(2929),depthFunc:(e,t)=>e.depthFunc(t),depthMask:(e,t)=>e.depthMask(t),depthRange:(e,t)=>e.depthRange(...t),dither:(e,t)=>t?e.enable(3024):e.disable(3024),derivativeHint:(e,t)=>{e.hint(35723,t)},frontFace:(e,t)=>e.frontFace(t),mipmapHint:(e,t)=>e.hint(33170,t),lineWidth:(e,t)=>e.lineWidth(t),polygonOffsetFill:(e,t)=>t?e.enable(32823):e.disable(32823),polygonOffset:(e,t)=>e.polygonOffset(...t),sampleCoverage:(e,t)=>e.sampleCoverage(...t),scissorTest:(e,t)=>t?e.enable(3089):e.disable(3089),scissor:(e,t)=>e.scissor(...t),stencilTest:(e,t)=>t?e.enable(2960):e.disable(2960),stencilMask:(e,t)=>{t=w(t)?t:[t,t];const[n,r]=t;e.stencilMaskSeparate(1028,n),e.stencilMaskSeparate(1029,r)},stencilFunc:(e,t)=>{t=w(t)&&3===t.length?[...t,...t]:t;const[n,r,i,o,a,s]=t;e.stencilFuncSeparate(1028,n,r,i),e.stencilFuncSeparate(1029,o,a,s)},stencilOp:(e,t)=>{t=w(t)&&3===t.length?[...t,...t]:t;const[n,r,i,o,a,s]=t;e.stencilOpSeparate(1028,n,r,i),e.stencilOpSeparate(1029,o,a,s)},viewport:(e,t)=>e.viewport(...t)};function O(e,t,n){return void 0!==t[e]?t[e]:n[e]}const M={blendEquation:(e,t,n)=>e.blendEquationSeparate(O(32777,t,n),O(34877,t,n)),blendFunc:(e,t,n)=>e.blendFuncSeparate(O(32969,t,n),O(32968,t,n),O(32971,t,n),O(32970,t,n)),polygonOffset:(e,t,n)=>e.polygonOffset(O(32824,t,n),O(10752,t,n)),sampleCoverage:(e,t,n)=>e.sampleCoverage(O(32938,t,n),O(32939,t,n)),stencilFuncFront:(e,t,n)=>e.stencilFuncSeparate(1028,O(2962,t,n),O(2967,t,n),O(2963,t,n)),stencilFuncBack:(e,t,n)=>e.stencilFuncSeparate(1029,O(34816,t,n),O(36003,t,n),O(36004,t,n)),stencilOpFront:(e,t,n)=>e.stencilOpSeparate(1028,O(2964,t,n),O(2965,t,n),O(2966,t,n)),stencilOpBack:(e,t,n)=>e.stencilOpSeparate(1029,O(34817,t,n),O(34818,t,n),O(34819,t,n))},S={enable:(e,t)=>e({[t]:!0}),disable:(e,t)=>e({[t]:!1}),pixelStorei:(e,t,n)=>e({[t]:n}),hint:(e,t,n)=>e({[t]:n}),bindFramebuffer:(e,t,n)=>{switch(t){case 36160:return e({36006:n,36010:n});case 36009:return e({36006:n});case 36008:return e({36010:n});default:return null}},blendColor:(e,t,n,r,i)=>e({32773:new Float32Array([t,n,r,i])}),blendEquation:(e,t)=>e({32777:t,34877:t}),blendEquationSeparate:(e,t,n)=>e({32777:t,34877:n}),blendFunc:(e,t,n)=>e({32969:t,32968:n,32971:t,32970:n}),blendFuncSeparate:(e,t,n,r,i)=>e({32969:t,32968:n,32971:r,32970:i}),clearColor:(e,t,n,r,i)=>e({3106:new Float32Array([t,n,r,i])}),clearDepth:(e,t)=>e({2931:t}),clearStencil:(e,t)=>e({2961:t}),colorMask:(e,t,n,r,i)=>e({3107:[t,n,r,i]}),cullFace:(e,t)=>e({2885:t}),depthFunc:(e,t)=>e({2932:t}),depthRange:(e,t,n)=>e({2928:new Float32Array([t,n])}),depthMask:(e,t)=>e({2930:t}),frontFace:(e,t)=>e({2886:t}),lineWidth:(e,t)=>e({2849:t}),polygonOffset:(e,t,n)=>e({32824:t,10752:n}),sampleCoverage:(e,t,n)=>e({32938:t,32939:n}),scissor:(e,t,n,r,i)=>e({3088:new Int32Array([t,n,r,i])}),stencilMask:(e,t)=>e({2968:t,36005:t}),stencilMaskSeparate:(e,t,n)=>e({[1028===t?2968:36005]:n}),stencilFunc:(e,t,n,r)=>e({2962:t,2967:n,2963:r,34816:t,36003:n,36004:r}),stencilFuncSeparate:(e,t,n,r,i)=>e({[1028===t?2962:34816]:n,[1028===t?2967:36003]:r,[1028===t?2963:36004]:i}),stencilOp:(e,t,n,r)=>e({2964:t,2965:n,2966:r,34817:t,34818:n,34819:r}),stencilOpSeparate:(e,t,n,r,i)=>e({[1028===t?2964:34817]:n,[1028===t?2965:34818]:r,[1028===t?2966:34819]:i}),viewport:(e,t,n,r,i)=>e({2978:[t,n,r,i]})},T=(e,t)=>e.isEnabled(t),C={3042:T,2884:T,2929:T,3024:T,32823:T,32926:T,32928:T,3089:T,2960:T,35977:T};function P(e){for(const t in e)return!1;return!0}function k(e,t){if(e===t)return!0;const n=Array.isArray(e)||ArrayBuffer.isView(e),r=Array.isArray(t)||ArrayBuffer.isView(t);if(n&&r&&e.length===t.length){for(let n=0;n{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.program=null,this.stateStack=[],this.enable=!0,this.cache=t?z(e):Object.assign({},b),this.log=n,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(){this.stateStack.push({})}pop(){i(this.stateStack.length>0);const e=this.stateStack[this.stateStack.length-1];F(this.gl,e),this.stateStack.pop()}_updateCache(e){let t,n=!1;const r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(const o in e){i(void 0!==o);const a=e[o],s=this.cache[o];k(a,s)||(n=!0,t=s,r&&!(o in r)&&(r[o]=s),this.cache[o]=a)}return{valueChanged:n,oldValue:t}}}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{enable:n=!0,copyState:r}=t;if(i(void 0!==r),!e.state){const{polyfillContext:t}=globalThis;t&&t(e),e.state=new j(e,{copyState:r}),D(e);for(const t in S){R(e,t,S[t])}L(e,"getParameter"),L(e,"isEnabled")}return e.state.enable=n,e}function N(e){i(e.state),e.state.pop()}function F(e,t){if(i(o(e),"setParameters requires a WebGL context"),P(t))return;const n={};for(const r in t){const i=Number(r),o=E[r];o&&("string"==typeof o?n[o]=!0:o(e,t[r],i))}const r=e.state&&e.state.cache;if(r)for(const i in n){(0,M[i])(e,t,r)}}function z(e,t){if("number"==typeof(t=t||b)){const n=t,r=C[n];return r?r(e,n):e.getParameter(n)}const n=Array.isArray(t)?t:Object.keys(t),r={};for(const t of n){const n=C[t];r[t]=n?n(e,Number(t)):e.getParameter(Number(t))}return r}function B(e){F(e,b)}function U(e,t,n){if(P(t))return n(e);const{nocatch:r=!0}=t;let i;if(function(e){e.state||I(e,{copyState:!1}),e.state.push()}(e),F(e,t),r)i=n(e),N(e);else try{i=n(e)}finally{N(e)}return i}var V=n(299);function H(e){const{luma:t}=e;if(e.canvas&&t){const{clientWidth:n}=t.canvasSizeInfo;return n?e.drawingBufferWidth/n:1}return 1}function W(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=H(e),i=e.drawingBufferWidth,o=e.drawingBufferHeight;return Y(t,r,i,o,n)}function q(e){const t="undefined"==typeof window?1:window.devicePixelRatio||1;return Number.isFinite(e)?e<=0?1:e:e?t:1}function Y(e,t,n,r,i){const o=G(e[0],t,n);let a=X(e[1],t,r,i),s=G(e[0]+1,t,n);const l=s===n-1?s:s-1;let u;return s=X(e[1]+1,t,r,i),i?(s=0===s?s:s+1,u=a,a=s):u=s===r-1?s:s-1,{x:o,y:a,width:Math.max(l-o+1,1),height:Math.max(u-a+1,1)}}function G(e,t,n){return Math.min(Math.round(e*t),n-1)}function X(e,t,n,r){return r?Math.max(0,n-1-Math.round(e*t)):Math.min(Math.round(e*t),n-1)}const Z=Object(V.a)(),K=Z&&"undefined"!=typeof document,$={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function J(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(Z,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),e=Object.assign({},$,e);const{width:t,height:n}=e;function r(t){if(e.throwOnError)throw new Error(t);return console.error(t),null}let o;e.onError=r;const{canvas:a}=e,s=ne({canvas:a,width:t,height:n,onError:r});return o=te(s,e),o?(o=Q(o,e),re(o),o):null}function Q(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||e._instrumented)return e;e._version=e._version||ie(e),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{},t=Object.assign({},$,t);const{manageState:n,debug:i}=t;return n&&I(e,{copyState:!1,log:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(e.canvas){return void oe(e,q(t.useDevicePixels),t)}const n=e.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in t&&"height"in t&&n.resize(t.width,t.height)}function te(e,t){const{onError:n}=t;let r=null;const i=e=>r=e.statusMessage||r;e.addEventListener("webglcontextcreationerror",i,!1);const{webgl1:o=!0,webgl2:a=!0}=t;let s=null;return a&&(s=s||e.getContext("webgl2",t),s=s||e.getContext("experimental-webgl2",t)),o&&(s=s||e.getContext("webgl",t),s=s||e.getContext("experimental-webgl",t)),e.removeEventListener("webglcontextcreationerror",i,!1),s?(t.onContextLost&&e.addEventListener("webglcontextlost",t.onContextLost,!1),t.onContextRestored&&e.addEventListener("webglcontextrestored",t.onContextRestored,!1),s):n("Failed to create ".concat(a&&!o?"WebGL2":"WebGL"," context: ").concat(r||"Unknown error"))}function ne(e){let t,{canvas:n,width:r=800,height:i=600,onError:o}=e;if("string"==typeof n){K&&"complete"===document.readyState||o("createGLContext called on canvas '".concat(n,"' before page was loaded")),t=document.getElementById(n)}else n?t=n:(t=document.createElement("canvas"),t.id="lumagl-canvas",t.style.width=Number.isFinite(r)?"".concat(r,"px"):"100%",t.style.height=Number.isFinite(i)?"".concat(i,"px"):"100%",document.body.insertBefore(t,document.body.firstChild));return t}function re(e){const t=a(e)?"WebGL2":"WebGL1",n=function(e){const t=e.getParameter(7936),n=e.getParameter(7937),r=e.getExtension("WEBGL_debug_renderer_info");return{vendor:r&&e.getParameter(r.UNMASKED_VENDOR_WEBGL||7936)||t,renderer:r&&e.getParameter(r.UNMASKED_RENDERER_WEBGL||7937)||n,vendorMasked:t,rendererMasked:n,version:e.getParameter(7938),shadingLanguageVersion:e.getParameter(35724)}}(e),i=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",o=e.debug?" debug":"";r.info(1,"".concat(t).concat(o," context ").concat(i))()}function ie(e){return"undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext?2:1}function oe(e,t,n){let i="width"in n?n.width:e.canvas.clientWidth,o="height"in n?n.height:e.canvas.clientHeight;i&&o||(r.log(1,"Canvas clientWidth/clientHeight is 0")(),t=1,i=e.canvas.width||1,o=e.canvas.height||1),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{};const a=e.luma.canvasSizeInfo;if(a.clientWidth!==i||a.clientHeight!==o||a.devicePixelRatio!==t){let n=t;const a=Math.floor(i*n),s=Math.floor(o*n);e.canvas.width=a,e.canvas.height=s,e.drawingBufferWidth===a&&e.drawingBufferHeight===s||(r.warn("Device pixel ratio clamped")(),n=Math.min(e.drawingBufferWidth/i,e.drawingBufferHeight/o),e.canvas.width=Math.floor(i*n),e.canvas.height=Math.floor(o*n)),Object.assign(e.luma.canvasSizeInfo,{clientWidth:i,clientHeight:o,devicePixelRatio:t})}}},function(e,t,n){var r=n(78),i=n(214),o=n(175),a=n(176),s=n(215),l=function(e,t,n){var u,c,f,d,p=e&l.F,h=e&l.G,g=e&l.S,m=e&l.P,y=e&l.B,v=h?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?i:i[t]||(i[t]={}),_=b.prototype||(b.prototype={});for(u in h&&(n=t),n)f=((c=!p&&v&&void 0!==v[u])?v:n)[u],d=y&&c?s(f,r):m&&"function"==typeof f?s(Function.call,f):f,v&&a(v,u,f,e&l.U),b[u]!=f&&o(b,u,d),m&&_[u]!=f&&(_[u]=f)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11);function i(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}function o(){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=i(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=u(n(2236)),i=u(n(2241)),o=u(n(2263)),a=u(n(2264)),s=u(n(2265)),l=u(n(2266));function u(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=s.default,t.loop=l.default;var c=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a1?0:e<-1?f:Math.acos(e)}function g(e){return e>=1?d:e<=-1?-d:Math.asin(e)}},function(e,t,n){"use strict";var r=n(74);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.c})),n.d(t,"d",(function(){return r.d})),n.d(t,"e",(function(){return r.e})),n.d(t,"f",(function(){return r.f})),n.d(t,"g",(function(){return r.g}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,o=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(1654)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(5);Object.defineProperty(t,"__esModule",{value:!0}),t.MAP_CONTROLS=t.DATASET_FORMATS=t.LOADING_METHODS=t.MAP_INFO_CHARACTER=t.MAP_THUMBNAIL_DIMENSION=t.MAX_GPU_FILTERS=t.EDITOR_AVAILABLE_LAYERS=t.EDITOR_MODES=t.GEOCODER_ICON_SIZE=t.GEOCODER_ICON_COLOR=t.GEOCODER_GEO_OFFSET=t.GEOCODER_LAYER_ID=t.GEOCODER_DATASET_NAME=t.SPEED_CONTROL_STEP=t.SPEED_CONTROL_RANGE=t.DEFAULT_TIME_FORMAT=t.ANIMATION_WINDOW=t.FPS=t.BASE_SPEED=t.THROTTLE_NOTIFICATION_TIME=t.DEFAULT_NOTIFICATION_TOPICS=t.DEFAULT_NOTIFICATION_TYPES=t.DEFAULT_NOTIFICATION_MESSAGE=t.DEFAULT_UUID_COUNT=t.EXPORT_HTML_MAP_MODE_OPTIONS=t.EXPORT_MAP_FORMAT_OPTIONS=t.EXPORT_HTML_MAP_MODES=t.EXPORT_MAP_FORMATS=t.EXPORT_DATA_TYPE_OPTIONS=t.EXPORT_DATA_TYPE=t.EXPORT_IMG_RESOLUTION_OPTIONS=t.EXPORT_IMG_RATIO_OPTIONS=t.EXPORT_IMG_RATIOS=t.RESOLUTIONS=t.MAX_DEFAULT_TOOLTIPS=t.LAYER_BLENDINGS=t.NO_VALUE_COLOR=t.DEFAULT_TOOLTIP_FIELDS=t.DEFAULT_LAYER_COLOR=t.CHANNEL_SCALE_SUPPORTED_FIELDS=t.FIELD_OPTS=t.DEFAULT_AGGREGATION=t.notSupportAggrOpts=t.notSupportedScaleOpts=t.ordinalFieldAggrScaleFunctions=t.ordinalFieldScaleFunctions=t.linearFieldAggrScaleFunctions=t.linearFieldScaleFunctions=t.AGGREGATION_TYPES=t.CHANNEL_SCALES=t.HIGHLIGH_COLOR_3D=t.FIELD_COLORS=t.FILED_TYPE_DISPLAY=t.TABLE_OPTION_LIST=t.TABLE_OPTION=t.SORT_ORDER=t.ALL_FIELD_TYPES=t.SCALE_FUNC=t.SCALE_TYPES=t.FILTER_TYPES=t.TRIP_ARC_FIELDS=t.TRIP_POINT_FIELDS=t.ICON_FIELDS=t.GEOJSON_FIELDS=t.DEFAULT_MAP_STYLES=t.DEFAULT_LAYER_GROUPS=t.PANELS=t.SIDEBAR_PANELS=t.THEME=t.DIMENSIONS=t.KEPLER_GL_WEBSITE=t.KEPLER_GL_VERSION=t.KEPLER_GL_NAME=t.SHARE_MAP_ID=t.OVERWRITE_MAP_ID=t.SAVE_MAP_ID=t.EXPORT_MAP_ID=t.ADD_MAP_STYLE_ID=t.EXPORT_DATA_ID=t.EXPORT_IMAGE_ID=t.ADD_DATA_ID=t.DELETE_DATA_ID=t.DATA_TABLE_ID=t.DEFAULT_MAPBOX_API_URL=t.ICON_PREFIX=t.CLOUDFRONT=t.ACTION_PREFIX=void 0;var i,o,a,s,l,u,c,f,d,p,h,g,m=r(n(4)),y=r(n(386)),v=n(560),b=n(828),_=n(54),A=n(88),x=n(469),w=n(387);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"COORDINATE_SYSTEM",(function(){return r.a})),n.d(t,"LightingEffect",(function(){return i.a})),n.d(t,"AmbientLight",(function(){return o.a})),n.d(t,"DirectionalLight",(function(){return a.a})),n.d(t,"PointLight",(function(){return h})),n.d(t,"_CameraLight",(function(){return _})),n.d(t,"_SunLight",(function(){return T})),n.d(t,"PostProcessEffect",(function(){return j})),n.d(t,"_LayersPass",(function(){return z.a})),n.d(t,"Deck",(function(){return B.a})),n.d(t,"LayerManager",(function(){return U.a})),n.d(t,"AttributeManager",(function(){return V.a})),n.d(t,"Layer",(function(){return H.a})),n.d(t,"CompositeLayer",(function(){return W.a})),n.d(t,"DeckRenderer",(function(){return q.a})),n.d(t,"Viewport",(function(){return Y.a})),n.d(t,"WebMercatorViewport",(function(){return G.a})),n.d(t,"_GlobeViewport",(function(){return te})),n.d(t,"picking",(function(){return re.a})),n.d(t,"project",(function(){return ie.a})),n.d(t,"project32",(function(){return oe.a})),n.d(t,"gouraudLighting",(function(){return ae.a})),n.d(t,"phongLighting",(function(){return ae.b})),n.d(t,"shadow",(function(){return se.a})),n.d(t,"View",(function(){return le.a})),n.d(t,"MapView",(function(){return ue.a})),n.d(t,"FirstPersonView",(function(){return ye})),n.d(t,"OrbitView",(function(){return Te})),n.d(t,"OrthographicView",(function(){return De})),n.d(t,"_GlobeView",(function(){return Ve})),n.d(t,"Controller",(function(){return fe.a})),n.d(t,"MapController",(function(){return Ne.b})),n.d(t,"_GlobeController",(function(){return Be})),n.d(t,"FirstPersonController",(function(){return me})),n.d(t,"OrbitController",(function(){return Ee})),n.d(t,"OrthographicController",(function(){return Pe})),n.d(t,"Effect",(function(){return C.a})),n.d(t,"LayerExtension",(function(){return He.a})),n.d(t,"TRANSITION_EVENTS",(function(){return be.a})),n.d(t,"TransitionInterpolator",(function(){return We.a})),n.d(t,"LinearInterpolator",(function(){return ve.a})),n.d(t,"FlyToInterpolator",(function(){return Ge})),n.d(t,"log",(function(){return Xe.a})),n.d(t,"createIterable",(function(){return Ze.a})),n.d(t,"fp64LowPart",(function(){return pe.c})),n.d(t,"Tesselator",(function(){return Ke.a})),n.d(t,"_fillArray",(function(){return $e.a})),n.d(t,"_flatten",(function(){return $e.b})),n.d(t,"_count",(function(){return Je.a})),n.d(t,"_memoize",(function(){return Qe.a})),n.d(t,"_mergeShaders",(function(){return et.a})),n.d(t,"_compareProps",(function(){return tt.a}));var r=n(52),i=n(487),o=n(598),a=n(352),s=n(6),l=n(7),u=n(493),c=[255,255,255],f=[0,0,1],d=[0,0,1],p=0,h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(this,e);var n=t.color,r=void 0===n?c:n,i=t.intensity,o=void 0===i?1:i,a=t.position,l=void 0===a?d:a;this.id=t.id||"point-".concat(p++),this.color=r,this.intensity=o,this.type="point",this.position=l,this.attenuation=g(t),this.projectedLight=Object.assign({},this)}return Object(l.a)(e,[{key:"getProjectedLight",value:function(e){var t=e.layer,n=this.projectedLight,i=t.context.viewport,o=t.props,a=o.coordinateSystem,s=o.coordinateOrigin,l=Object(u.b)(this.position,{viewport:i,coordinateSystem:a,coordinateOrigin:s,fromCoordinateSystem:i.isGeospatial?r.a.LNGLAT:r.a.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return n.color=this.color,n.intensity=this.intensity,n.position=l,n}}]),e}();function g(e){return"attenuation"in e?e.attenuation:"intensity"in e?[0,0,e.intensity]:f}var m=n(20),y=n(11),v=n(19),b=n(424),_=function(e){function t(){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).apply(this,arguments))}return Object(v.a)(t,e),Object(l.a)(t,[{key:"getProjectedLight",value:function(e){var t=e.layer,n=this.projectedLight,r=t.context.viewport,i=t.props,o=i.coordinateSystem,a=i.coordinateOrigin,s=i.modelMatrix,l=Object(b.b)({viewport:r,modelMatrix:s,coordinateSystem:o,coordinateOrigin:a}).project_uCameraPosition;return n.color=this.color,n.intensity=this.intensity,n.position=l,n}}]),t}(h),A=n(39),x=Math.PI/180,w=23.4397*x;function E(e,t,n){var r,i,o,a,s,l,u=x*-n,c=x*t,f=function(e){return function(e){return e/864e5-.5+2440588}(e)-2451545}(e),d=(r=x*(357.5291+.98560028*f),i=x*(1.9148*Math.sin(r)+.02*Math.sin(2*r)+3e-4*Math.sin(3*r)),o=r+i+102.9372*x+Math.PI,{declination:(a=o,s=0,l=a,Math.asin(Math.sin(s)*Math.cos(w)+Math.cos(s)*Math.sin(w)*Math.sin(l))),rightAscension:O(o,0)}),p=function(e,t){return x*(280.147+360.9856235*e)-t}(f,u)-d.rightAscension;return{azimuth:M(p,c,d.declination),altitude:S(p,c,d.declination)}}function O(e,t){var n=e;return Math.atan2(Math.sin(n)*Math.cos(w)-Math.tan(t)*Math.sin(w),Math.cos(n))}function M(e,t,n){var r=e,i=t,o=n;return Math.atan2(Math.sin(r),Math.cos(r)*Math.sin(i)-Math.tan(o)*Math.cos(i))}function S(e,t,n){var r=e,i=t,o=n;return Math.asin(Math.sin(i)*Math.sin(o)+Math.cos(i)*Math.cos(o)*Math.cos(r))}var T=function(e){function t(e){var n,r=e.timestamp,i=Object(A.a)(e,["timestamp"]);return Object(s.a)(this,t),(n=Object(m.a)(this,Object(y.a)(t).call(this,i))).timestamp=r,n}return Object(v.a)(t,e),Object(l.a)(t,[{key:"getProjectedLight",value:function(e){var t=e.layer.context.viewport,n=t.latitude,r=t.longitude;return this.direction=function(e,t,n){var r=E(e,t,n),i=r.azimuth,o=r.altitude,a=i+Math.PI;return[-Math.sin(a),-Math.cos(a),-Math.sin(o)]}(this.timestamp,n,r),this}}]),t}(a.a),C=n(301),P=n(2527),k=n(25),L=n(653),R=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(s.a)(this,t),n=Object(m.a)(this,Object(y.a)(t).call(this,e,r));var i=r.module,o=r.fs,a=r.id;return n.model=new P.a(e,{id:a,fs:o,modules:[i]}),n}return Object(v.a)(t,e),Object(l.a)(t,[{key:"render",value:function(e){var t=this,n=this.gl;Object(k.o)(n,{framebuffer:e.outputBuffer,clearColor:[0,0,0,0]},(function(){return t._renderPass(n,e)}))}},{key:"delete",value:function(){this.model.delete(),this.model=null}},{key:"_renderPass",value:function(e,t){var n=t.inputBuffer;t.outputBuffer;Object(L.a)(e,{color:!0}),this.model.draw({moduleSettings:this.props.moduleSettings,uniforms:{texture:n,texSize:[n.width,n.height]},parameters:{depthWrite:!1,depthTest:!1}})}}]),t}(n(637).a),D=n(855),j=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s.a)(this,t),(n=Object(m.a)(this,Object(y.a)(t).call(this,r))).id="".concat(e.name,"-pass"),Object(D.b)(e),n.module=e,n}return Object(v.a)(t,e),Object(l.a)(t,[{key:"postRender",value:function(e,t){this.passes||(this.passes=function(e,t,n,r){if(t.filter||t.sampler){var i=F(t);return[new R(e,{id:n,module:t,fs:i,moduleSettings:r})]}return(t.passes||[]).map((function(i,o){var a=F(t,i),s="".concat(n,"-").concat(o);return new R(e,{id:s,module:t,fs:a,moduleSettings:r})}))}(e,this.module,this.id,this.props));for(var n=t.target,r=t.inputBuffer,i=t.swapBuffer,o=0;o1&&void 0!==arguments[1]?arguments[1]:e;if(t.filter){var n="string"==typeof t.filter?t.filter:"".concat(e.name,"_filterColor");return I(n)}if(t.sampler){var r="string"==typeof t.sampler?t.sampler:"".concat(e.name,"_sampleColor");return N(r)}return null}var z=n(300),B=n(1367),U=n(611),V=n(608),H=n(407),W=n(833),q=n(614),Y=n(137),G=n(400),X=n(24),Z=n(33),K=n(58),$=n(86),J=Math.PI/180,Q=180/Math.PI;function ee(){var e=Math.PI/180*256;return{unitsPerMeter:[256/6370972,256/6370972,256/6370972],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[e,e,256/6370972],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/e,1/e,24886.609375]}}var te=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(this,t);var r=n.latitude,i=void 0===r?0:r,o=n.longitude,a=void 0===o?0:o,l=n.zoom,u=void 0===l?11:l,c=n.nearZMultiplier,f=void 0===c?.1:c,d=n.farZMultiplier,p=void 0===d?1:d,h=n.resolution,g=void 0===h?10:h,v=n.width,b=n.height,_=n.altitude,A=void 0===_?1.5:_;v=v||1,b=b||1,A=Math.max(.75,A);var x=(new Z.a).lookAt({eye:[0,-A,0],up:[0,0,1]}),w=Math.pow(2,u);x.rotateX(i*J),x.rotateZ(-a*J),x.scale(w/b);var E=Math.atan(.5/A),O=512*w/b,M=Object.assign({},n,{width:v,height:b,viewMatrix:x,longitude:a,latitude:i,zoom:u,fovyRadians:2*E,aspect:v/b,focalDistance:A,near:f,far:Math.min(2,1/O+1)*A*p});return(e=Object(m.a)(this,Object(y.a)(t).call(this,M))).resolution=g,e.distanceScales=ee(),e}return Object(v.a)(t,e),Object(l.a)(t,[{key:"getDistanceScales",value:function(){return this.distanceScales}},{key:"unproject",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.topLeft,i=void 0===r||r,o=n.targetZ,a=Object(X.a)(e,3),s=a[0],l=a[1],u=a[2],c=i?l:this.height-l,f=this.pixelUnprojectionMatrix;if(Number.isFinite(u))t=ne(f,[s,c,u,1]);else{var d=ne(f,[s,c,-1,1]),p=ne(f,[s,c,1,1]),h=256*((o||0)/6370972+1),g=K.p(K.q([],d,p)),m=K.p(d),y=K.p(p),v=(4*m*y-Math.pow(g-m-y,2))/16,b=4*v/g,_=Math.sqrt(m-b),A=Math.sqrt(Math.max(0,h*h-b)),x=(_-A)/Math.sqrt(g);t=K.i([],d,p,x)}var w=this.unprojectPosition(t),E=Object(X.a)(w,3),O=E[0],M=E[1],S=E[2];return Number.isFinite(u)?[O,M,S]:Number.isFinite(o)?[O,M,o]:[O,M]}},{key:"projectPosition",value:function(e){var t=Object(X.a)(e,3),n=t[0],r=t[1],i=t[2],o=void 0===i?0:i,a=n*J,s=r*J,l=Math.cos(s),u=256*(o/6370972+1);return[Math.sin(a)*l*u,-Math.cos(a)*l*u,Math.sin(s)*u]}},{key:"unprojectPosition",value:function(e){var t=Object(X.a)(e,3),n=t[0],r=t[1],i=t[2],o=K.g(e),a=Math.asin(i/o);return[Math.atan2(n,-r)*Q,a*Q,6370972*(o/256-1)]}},{key:"projectFlat",value:function(e){return e}},{key:"unprojectFlat",value:function(e){return e}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=e.pos,r=this.unproject(n);return[t[0]-r[0]+this.longitude,t[1]-r[1]+this.latitude]}},{key:"projectionMode",get:function(){return r.c.GLOBE}}]),t}(Y.a);function ne(e,t){var n=$.n([],t,e);return $.k(n,n,1/n[3]),n}var re=n(1198),ie=n(356),oe=n(1199),ae=n(2544),se=n(427),le=n(204),ue=n(599),ce=n(85),fe=n(203),de=n(428),pe=n(117),he={position:[0,0,0],pitch:0,bearing:0,maxPitch:90,minPitch:-90},ge=function(e){function t(e){var n,r=e.width,i=e.height,o=e.position,a=void 0===o?he.position:o,l=e.bearing,u=void 0===l?he.bearing:l,c=e.pitch,f=void 0===c?he.pitch:c,d=e.longitude,p=e.latitude,h=e.maxPitch,g=void 0===h?he.maxPitch:h,v=e.minPitch,b=void 0===v?he.minPitch:v,_=e.startBearing,A=e.startPitch,x=e.startZoomPosition,w=e.startZoom;return Object(s.a)(this,t),(n=Object(m.a)(this,Object(y.a)(t).call(this,{width:r,height:i,position:a,bearing:u,pitch:f,longitude:d,latitude:p,maxPitch:g,minPitch:b})))._interactiveState={startBearing:_,startPitch:A,startZoomPosition:x,startZoom:w},n}return Object(v.a)(t,e),Object(l.a)(t,[{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"getDirection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Z.d({bearing:this._viewportProps.bearing,pitch:e?90:90+this._viewportProps.pitch}),n=t.toVector3().normalize();return n}},{key:"panStart",value:function(){return this}},{key:"pan",value:function(){return this}},{key:"panEnd",value:function(){return this}},{key:"rotateStart",value:function(e){e.pos;return this._getUpdatedState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(e){var t=e.deltaScaleX,n=e.deltaScaleY,r=this._interactiveState,i=r.startBearing,o=r.startPitch;return Number.isFinite(i)&&Number.isFinite(o)?this._getUpdatedState({bearing:i-180*t,pitch:o-90*n}):this}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(){return this._getUpdatedState({startZoomPosition:this._viewportProps.position,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(e){var t=e.scale,n=this._interactiveState.startZoomPosition;n||(n=this._viewportProps.position);var r=this.getDirection();return this._move(r,Math.log2(t),n)}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}},{key:"moveLeft",value:function(){var e=this.getDirection(!0);return this._move(e.rotateZ({radians:Math.PI/2}))}},{key:"moveRight",value:function(){var e=this.getDirection(!0);return this._move(e.rotateZ({radians:-Math.PI/2}))}},{key:"moveUp",value:function(){var e=this.getDirection(!0);return this._move(e)}},{key:"moveDown",value:function(){var e=this.getDirection(!0);return this._move(e.negate())}},{key:"rotateLeft",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch+10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch-10})}},{key:"zoomIn",value:function(){return this.zoom({scale:2})}},{key:"zoomOut",value:function(){return this.zoom({scale:.5})}},{key:"shortestPathFrom",value:function(e){var t=e.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.bearing,i=n.longitude;return Math.abs(r-t.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-t.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}},{key:"_move",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._viewportProps.position,r=e.scale(20*t);return this._getUpdatedState({position:new Z.c(n).add(r)})}},{key:"_getUpdatedState",value:function(e){return new t(Object.assign({},this._viewportProps,this._interactiveState,e))}},{key:"_applyConstraints",value:function(e){var t=e.pitch,n=e.maxPitch,r=e.minPitch,i=e.longitude,o=e.bearing;return e.pitch=Object(Z.e)(t,r,n),(i<-180||i>180)&&(e.longitude=Object(pe.e)(i+180,360)-180),(o<-180||o>180)&&(e.bearing=Object(pe.e)(o+180,360)-180),e}}]),t}(de.a),me=function(e){function t(e){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).call(this,ge,e))}return Object(v.a)(t,e),t}(fe.a);var ye=function(e){function t(){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).apply(this,arguments))}return Object(v.a)(t,e),Object(l.a)(t,[{key:"_getViewport",value:function(e){var t=e.modelMatrix,n=void 0===t?null:t,r=e.bearing,i=void 0===r?0:r,o=e.pitch,a=void 0===o?0:o,s=e.up,l=void 0===s?[0,0,1]:s,u=function(e){var t=e.bearing,n=e.pitch;return new Z.d({bearing:t,pitch:n}).toVector3().normalize()}({bearing:i,pitch:90+a}),c=n?n.transformDirection(u):u,f=Object(ce.h)(e),d=Math.pow(2,f),p=(new Z.a).lookAt({eye:[0,0,0],center:c,up:l}).scale(d);return new Y.a(Object.assign({},e,{zoom:f,viewMatrix:p}))}},{key:"controller",get:function(){return this._getControllerProps({type:me})}}]),t}(le.a);ye.displayName="FirstPersonView";var ve=n(201),be=n(202),_e={orbitAxis:"Z",rotationX:0,rotationOrbit:0,zoom:0,target:[0,0,0],minRotationX:-90,maxRotationX:90,minZoom:-1/0,maxZoom:1/0},Ae={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new ve.a(["target","zoom","rotationX","rotationOrbit"]),transitionInterruption:be.a.BREAK},xe=function(e){return Math.pow(2,e)},we=function(e){function t(e){var n,r=e.makeViewport,i=e.width,o=e.height,a=e.orbitAxis,l=void 0===a?_e.orbitAxis:a,u=e.rotationX,c=void 0===u?_e.rotationX:u,f=e.rotationOrbit,d=void 0===f?_e.rotationOrbit:f,p=e.target,h=void 0===p?_e.target:p,g=e.zoom,v=void 0===g?_e.zoom:g,b=e.minRotationX,_=void 0===b?_e.minRotationX:b,A=e.maxRotationX,x=void 0===A?_e.maxRotationX:A,w=e.minZoom,E=void 0===w?_e.minZoom:w,O=e.maxZoom,M=void 0===O?_e.maxZoom:O,S=e.startPanPosition,T=e.startTarget,C=e.startRotationX,P=e.startRotationOrbit,k=e.startZoomPosition,L=e.startZoom;return Object(s.a)(this,t),(n=Object(m.a)(this,Object(y.a)(t).call(this,{width:i,height:o,orbitAxis:l,rotationX:c,rotationOrbit:d,target:h,zoom:v,minRotationX:_,maxRotationX:x,minZoom:E,maxZoom:M})))._interactiveState={startPanPosition:S,startTarget:T,startRotationX:C,startRotationOrbit:P,startZoomPosition:k,startZoom:L},n.makeViewport=r,n}return Object(v.a)(t,e),Object(l.a)(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(e){var t=e.pos,n=this._viewportProps.target;return this._getUpdatedState({startPanPosition:t,startTarget:n})}},{key:"pan",value:function(e){var t=e.pos,n=(e.startPos,this._interactiveState),r=n.startPanPosition,i=n.startTarget,o=new Z.b(t).subtract(r);return this._getUpdatedState({target:this._calculateNewTarget({startTarget:i,pixelOffset:o})})}},{key:"panEnd",value:function(){return this._getUpdatedState({startPanPosition:null,startTarget:null})}},{key:"rotateStart",value:function(e){e.pos;return this._getUpdatedState({startRotationX:this._viewportProps.rotationX,startRotationOrbit:this._viewportProps.rotationOrbit})}},{key:"rotate",value:function(e){var t=e.deltaScaleX,n=e.deltaScaleY,r=this._interactiveState,i=r.startRotationX,o=r.startRotationOrbit;return Number.isFinite(i)&&Number.isFinite(o)?((i<-90||i>90)&&(t*=-1),this._getUpdatedState({rotationX:i+180*n,rotationOrbit:o+180*t,isRotating:!0})):this}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}},{key:"shortestPathFrom",value:function(e){var t=e.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.rotationOrbit;return Math.abs(r-t.rotationOrbit)>180&&(n.rotationOrbit=r<0?r+360:r-360),n}},{key:"zoomStart",value:function(e){var t=e.pos;return this._getUpdatedState({startZoomPosition:t,startTarget:this._viewportProps.target,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(e){var t=e.pos,n=e.startPos,r=e.scale,i=this._viewportProps,o=i.zoom,a=i.width,s=i.height,l=i.target,u=this._interactiveState,c=u.startZoom,f=u.startZoomPosition,d=u.startTarget;Number.isFinite(c)||(c=o,d=l,f=n||t);var p=this._calculateNewZoom({scale:r,startZoom:c}),h=xe(c),g=xe(p),m=(a/2-f[0])*(g/h-1),y=(s/2-f[1])*(g/h-1);return this._getUpdatedState({zoom:p,target:this._calculateNewTarget({startTarget:d,zoom:p,pixelOffset:[m,y]})})}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startTarget:null,startZoom:null})}},{key:"zoomIn",value:function(){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:2})})}},{key:"zoomOut",value:function(){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:.5})})}},{key:"moveLeft",value:function(){var e=[-50,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveRight",value:function(){var e=[50,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveUp",value:function(){var e=[0,-50];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveDown",value:function(){var e=[0,50];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"rotateLeft",value:function(){return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({rotationX:this._viewportProps.rotationX-10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({rotationX:this._viewportProps.rotationX+10})}},{key:"_calculateNewZoom",value:function(e){var t=e.scale,n=e.startZoom,r=this._viewportProps,i=r.maxZoom,o=r.minZoom;Number.isFinite(n)||(n=this._viewportProps.zoom);var a=n+Math.log2(t);return Object(Z.e)(a,o,i)}},{key:"_calculateNewTarget",value:function(e){var t=e.startTarget,n=e.zoom,r=e.pixelOffset,i=Object.assign({},this._viewportProps);Number.isFinite(n)&&(i.zoom=n),t&&(i.target=t);var o=this.makeViewport(i),a=o.project(i.target);return o.unproject([a[0]-r[0],a[1]-r[1],a[2]])}},{key:"_getUpdatedState",value:function(e){return new t(Object.assign({},this._viewportProps,this._interactiveState,e))}},{key:"_applyConstraints",value:function(e){var t=e.maxZoom,n=e.minZoom,r=e.zoom,i=e.maxRotationX,o=e.minRotationX,a=e.rotationOrbit;return e.zoom=Object(Z.e)(r,n,t),e.rotationX=Object(Z.e)(e.rotationX,o,i),(a<-180||a>180)&&(e.rotationOrbit=Object(pe.e)(a+180,360)-180),e}}]),t}(de.a),Ee=function(e){function t(e){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).call(this,we,e))}return Object(v.a)(t,e),Object(l.a)(t,[{key:"_getTransitionProps",value:function(){return Ae}}]),t}(fe.a),Oe=Math.PI/180;function Me(e){var t=e.height,n=e.fovy,r=e.orbitAxis,i=e.rotationX,o=e.rotationOrbit,a=e.zoom,s=.5/Math.tan(n*Oe/2),l="Z"===r?[0,0,1]:[0,1,0],u="Z"===r?[0,-s,0]:[0,0,s],c=(new Z.a).lookAt({eye:u,up:l});c.rotateX(i*Oe),"Z"===r?c.rotateZ(o*Oe):c.rotateY(o*Oe);var f=Math.pow(2,a)/(t||1);return c.scale(f),c}var Se=function(e){function t(e){Object(s.a)(this,t);var n=e.id,r=e.x,i=e.y,o=e.width,a=e.height,l=e.fovy,u=void 0===l?50:l,c=e.near,f=e.far,d=e.orbitAxis,p=void 0===d?"Z":d,h=e.target,g=void 0===h?[0,0,0]:h,v=e.rotationX,b=void 0===v?0:v,_=e.rotationOrbit,A=void 0===_?0:_,x=e.zoom,w=void 0===x?0:x;return Object(m.a)(this,Object(y.a)(t).call(this,{id:n,viewMatrix:Me({height:a,fovy:u,orbitAxis:p,rotationX:b,rotationOrbit:A,zoom:w}),fovy:u,near:c,far:f,x:r,y:i,position:g,width:o,height:a,zoom:w}))}return Object(v.a)(t,e),t}(Y.a),Te=function(e){function t(e){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).call(this,Object.assign({},e,{type:Se})))}return Object(v.a)(t,e),Object(l.a)(t,[{key:"controller",get:function(){return this._getControllerProps({type:Ee})}}]),t}(le.a);Te.displayName="OrbitView";var Ce={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new ve.a(["target","zoom"]),transitionInterruption:be.a.BREAK},Pe=function(e){function t(e){var n;return Object(s.a)(this,t),(n=Object(m.a)(this,Object(y.a)(t).call(this,we,e))).invertPan=!0,n}return Object(v.a)(t,e),Object(l.a)(t,[{key:"_onPanRotate",value:function(e){return!1}},{key:"_getTransitionProps",value:function(){return Ce}}]),t}(fe.a),ke=(new Z.a).lookAt({eye:[0,0,1]});function Le(e){var t=e.width,n=e.height,r=e.near,i=e.far;return t=t||1,n=n||1,(new Z.a).ortho({left:-t/2,right:t/2,bottom:n/2,top:-n/2,near:r,far:i})}var Re=function(e){function t(e){var n=e.id,r=e.x,i=e.y,o=e.width,a=e.height,l=e.near,u=void 0===l?.1:l,c=e.far,f=void 0===c?1e3:c,d=e.zoom,p=void 0===d?0:d,h=e.target,g=void 0===h?[0,0,0]:h;Object(s.a)(this,t);var y=Math.pow(2,p);return Object(m.a)(void 0,new Y.a({id:n,x:r,y:i,width:o,height:a,position:g,viewMatrix:ke.clone().scale(y),projectionMatrix:Le({width:o,height:a,near:u,far:f}),zoom:p}))}return Object(v.a)(t,e),t}(Y.a),De=function(e){function t(e){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).call(this,Object.assign({},e,{type:Re})))}return Object(v.a)(t,e),Object(l.a)(t,[{key:"controller",get:function(){return this._getControllerProps({type:Pe})}}]),t}(le.a);De.displayName="OrthographicView";var je=n(3),Ie=n(28),Ne=n(401),Fe={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new ve.a(["longitude","latitude","zoom"]),transitionInterruption:be.a.BREAK},ze=function(e){function t(){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).apply(this,arguments))}return Object(v.a)(t,e),Object(l.a)(t,[{key:"_applyConstraints",value:function(e){var t=e.maxZoom,n=e.minZoom,r=e.zoom;e.zoom=Object(Z.e)(r,n,t);var i=e.longitude,o=e.latitude;return(i<-180||i>180)&&(e.longitude=Object(pe.e)(i+180,360)-180),e.latitude=Object(Z.e)(o,-89,89),e}}]),t}(Ne.a),Be=function(e){function t(e){var n;return Object(s.a)(this,t),(n=Object(m.a)(this,Object(y.a)(t).call(this,ze,e))).invertPan=!0,n}return Object(v.a)(t,e),Object(l.a)(t,[{key:"setProps",value:function(e){Object(Ie.a)(Object(y.a)(t.prototype),"setProps",this).call(this,e),this.dragRotate=!1,this.touchRotate=!1}},{key:"_getTransitionProps",value:function(){return Fe}}]),t}(fe.a);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ve=function(e){function t(e){return Object(s.a)(this,t),Object(m.a)(this,Object(y.a)(t).call(this,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return Object(s.a)(this,t),(e=Object(m.a)(this,Object(y.a)(t).call(this,{compare:["longitude","latitude","zoom","bearing","pitch"],extract:["width","height","longitude","latitude","zoom","bearing","pitch"],required:["width","height","latitude","longitude","zoom"]}))).props=Object.assign({},Ye,n),e}return Object(v.a)(t,e),Object(l.a)(t,[{key:"interpolateProps",value:function(e,t,n){var r=Object(ce.d)(e,t,n,this.props),i=!0,o=!1,a=void 0;try{for(var s,l=qe[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;r[u]=Object(Z.g)(e[u]||0,t[u]||0,n)}}catch(e){o=!0,a=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw a}}return r}},{key:"getDuration",value:function(e,t){var n=t.transitionDuration;return"auto"===n&&(n=Object(ce.g)(e,t,this.props)),n}}]),t}(We.a),Xe=n(57),Ze=n(170),Ke=n(1200),$e=n(221),Je=n(600),Qe=n(262),et=n(596),tt=n(485)},,function(e,t,n){"use strict";n.d(t,"q",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"p",(function(){return l})),n.d(t,"o",(function(){return u})),n.d(t,"k",(function(){return c})),n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return d})),n.d(t,"n",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"c",(function(){return g})),n.d(t,"d",(function(){return m})),n.d(t,"j",(function(){return y})),n.d(t,"i",(function(){return v})),n.d(t,"g",(function(){return b})),n.d(t,"b",(function(){return _}));var r=n(34);function i(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function o(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],d=t[10],p=t[11],h=t[12],g=t[13],m=t[14],y=t[15],v=n*s-r*a,b=n*l-i*a,_=n*u-o*a,A=r*l-i*s,x=r*u-o*s,w=i*u-o*l,E=c*g-f*h,O=c*m-d*h,M=c*y-p*h,S=f*m-d*g,T=f*y-p*g,C=d*y-p*m,P=v*C-b*T+_*S+A*M-x*O+w*E;return P?(P=1/P,e[0]=(s*C-l*T+u*S)*P,e[1]=(i*T-r*C-o*S)*P,e[2]=(g*w-m*x+y*A)*P,e[3]=(d*x-f*w-p*A)*P,e[4]=(l*M-a*C-u*O)*P,e[5]=(n*C-i*M+o*O)*P,e[6]=(m*_-h*w-y*b)*P,e[7]=(c*w-d*_+p*b)*P,e[8]=(a*T-s*M+u*E)*P,e[9]=(r*M-n*T-o*E)*P,e[10]=(h*x-g*_+y*v)*P,e[11]=(f*_-c*x-p*v)*P,e[12]=(s*O-a*S-l*E)*P,e[13]=(n*S-r*O+i*E)*P,e[14]=(g*b-h*A-m*v)*P,e[15]=(c*A-f*b+d*v)*P,e):null}function a(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],h=e[13],g=e[14],m=e[15];return(t*a-n*o)*(f*m-d*g)-(t*s-r*o)*(c*m-d*h)+(t*l-i*o)*(c*g-f*h)+(n*s-r*a)*(u*m-d*p)-(n*l-i*a)*(u*g-f*p)+(r*l-i*s)*(u*h-c*p)}function s(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],p=t[10],h=t[11],g=t[12],m=t[13],y=t[14],v=t[15],b=n[0],_=n[1],A=n[2],x=n[3];return e[0]=b*r+_*s+A*f+x*g,e[1]=b*i+_*l+A*d+x*m,e[2]=b*o+_*u+A*p+x*y,e[3]=b*a+_*c+A*h+x*v,b=n[4],_=n[5],A=n[6],x=n[7],e[4]=b*r+_*s+A*f+x*g,e[5]=b*i+_*l+A*d+x*m,e[6]=b*o+_*u+A*p+x*y,e[7]=b*a+_*c+A*h+x*v,b=n[8],_=n[9],A=n[10],x=n[11],e[8]=b*r+_*s+A*f+x*g,e[9]=b*i+_*l+A*d+x*m,e[10]=b*o+_*u+A*p+x*y,e[11]=b*a+_*c+A*h+x*v,b=n[12],_=n[13],A=n[14],x=n[15],e[12]=b*r+_*s+A*f+x*g,e[13]=b*i+_*l+A*d+x*m,e[14]=b*o+_*u+A*p+x*y,e[15]=b*a+_*c+A*h+x*v,e}function l(e,t,n){var r,i,o,a,s,l,u,c,f,d,p,h,g=n[0],m=n[1],y=n[2];return t===e?(e[12]=t[0]*g+t[4]*m+t[8]*y+t[12],e[13]=t[1]*g+t[5]*m+t[9]*y+t[13],e[14]=t[2]*g+t[6]*m+t[10]*y+t[14],e[15]=t[3]*g+t[7]*m+t[11]*y+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],p=t[10],h=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=f,e[9]=d,e[10]=p,e[11]=h,e[12]=r*g+s*m+f*y+t[12],e[13]=i*g+l*m+d*y+t[13],e[14]=o*g+u*m+p*y+t[14],e[15]=a*g+c*m+h*y+t[15]),e}function u(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function c(e,t,n,i){var o,a,s,l,u,c,f,d,p,h,g,m,y,v,b,_,A,x,w,E,O,M,S,T,C=i[0],P=i[1],k=i[2],L=Math.hypot(C,P,k);return Le*i,t)}function f(e,t){return g(e,e=>e*r,t)}function d(e,t,n){return g(e,e=>Math.max(t,Math.min(n,e)))}function p(e,t,n){return s(e)?e.map((e,r)=>p(e,t[r],n)):n*t+(1-n)*e}function h(e,t,n){const r=o.EPSILON;n&&(o.EPSILON=n);try{if(e===t)return!0;if(s(e)&&s(t)){if(e.length!==t.length)return!1;for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(M.c)("truncated-code-geometry")}=e,{indices:n,attributes:r}=function(e){const{bottomRadius:t=0,topRadius:n=0,height:r=1,nradial:i=10,nvertical:o=10,verticalAxis:a="y",topCap:s=!1,bottomCap:l=!1}=e,u=(s?2:0)+(l?2:0),c=(i+1)*(o+1+u),f=Math.atan2(t-n,r),d=Math.sin,p=Math.cos,h=Math.PI,g=p(f),m=d(f),y=s?-2:0,v=o+(l?2:0),b=i+1,_=new Uint16Array(i*(o+u)*6),A=S[a],x=new Float32Array(3*c),w=new Float32Array(3*c),E=new Float32Array(2*c);let O=0,M=0;for(let e=y;e<=v;e++){let a,s=e/o,l=r*s;e<0?(l=0,s=1,a=t):e>o?(l=r,s=1,a=n):a=t+e/o*(n-t),-2!==e&&e!==o+2||(a=0,s=0),l-=r/2;for(let t=0;to?0:n*g,w[O+A[1]]=e<0?-1:e>o?1:m,w[O+A[2]]=e<0||e>o?0:r*g,E[M+0]=t/i,E[M+1]=s,M+=2,O+=3}}for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(M.c)("cone-geometry"),radius:n=1,cap:r=!0}=e;super({...e,id:t,topRadius:0,topCap:Boolean(r),bottomCap:Boolean(r),bottomRadius:n})}}var P=n(2458);class k extends T{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(M.c)("cylinder-geometry"),radius:n=1}=e;super({...e,id:t,bottomRadius:n,topRadius:n})}}var L=n(597);const R=[-1,0,0,0,1,0,0,0,-1,0,0,1,0,-1,0,1,0,0],D=[3,4,5,3,5,1,3,1,0,3,0,4,4,0,2,4,2,5,2,0,1,5,2,1];class j extends E.a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(M.c)("ico-sphere-geometry")}=e,{indices:n,attributes:r}=function(e){const{iterations:t=0}=e,n=Math.PI,r=2*n,i=[...R];let o=[...D];i.push(),o.push();const a=(()=>{const e={};return(t,n)=>{const r=(t*=3)>(n*=3)?t:n,o="".concat(t=0;e-=3){const t=o[e+0],a=o[e+1],u=o[e+2],c=3*t,f=3*a,d=3*u,p=2*t,h=2*a,g=2*u,m=i[c+0],y=i[c+1],v=i[c+2],b=Math.acos(v/Math.sqrt(m*m+y*y+v*v)),_=Math.atan2(y,m)+n,A=b/n,x=1-_/r,w=i[f+0],E=i[f+1],O=i[f+2],M=Math.acos(O/Math.sqrt(w*w+E*E+O*O)),S=Math.atan2(E,w)+n,T=M/n,C=1-S/r,P=i[d+0],k=i[d+1],R=i[d+2],D=Math.acos(R/Math.sqrt(P*P+k*k+R*R)),j=Math.atan2(k,P)+n,I=D/n,N=1-j/r,F=[P-w,k-E,R-O],z=[m-w,y-E,v-O],B=new L.a(F).cross(z).normalize();let U;(0===x||0===C||0===N)&&(0===x||x>.5)&&(0===C||C>.5)&&(0===N||N>.5)&&(i.push(i[c+0],i[c+1],i[c+2]),U=i.length/3-1,o.push(U),l[2*U+0]=1,l[2*U+1]=A,s[3*U+0]=B.x,s[3*U+1]=B.y,s[3*U+2]=B.z,i.push(i[f+0],i[f+1],i[f+2]),U=i.length/3-1,o.push(U),l[2*U+0]=1,l[2*U+1]=T,s[3*U+0]=B.x,s[3*U+1]=B.y,s[3*U+2]=B.z,i.push(i[d+0],i[d+1],i[d+2]),U=i.length/3-1,o.push(U),l[2*U+0]=1,l[2*U+1]=I,s[3*U+0]=B.x,s[3*U+1]=B.y,s[3*U+2]=B.z),s[c+0]=s[f+0]=s[d+0]=B.x,s[c+1]=s[f+1]=s[d+1]=B.y,s[c+2]=s[f+2]=s[d+2]=B.z,l[p+0]=x,l[p+1]=A,l[h+0]=C,l[h+1]=T,l[g+0]=N,l[g+1]=I}return{indices:{size:1,value:new Uint16Array(o)},attributes:{POSITION:{size:3,value:new Float32Array(i)},NORMAL:{size:3,value:new Float32Array(s)},TEXCOORD_0:{size:2,value:new Float32Array(l)}}}}(e);super({...e,id:t,indices:n,attributes:{...r,...e.attributes}})}}class I extends E.a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(M.c)("plane-geometry")}=e,{indices:n,attributes:r}=function(e){const{type:t="x,y",offset:n=0,flipCull:r=!1,unpack:i=!1}=e,o=t.split(",");let a=e["".concat(o[0],"len")]||1;const s=e["".concat(o[1],"len")]||1,l=e["n".concat(o[0])]||1,u=e["n".concat(o[1])]||1,c=(l+1)*(u+1),f=new Float32Array(3*c),d=new Float32Array(3*c),p=new Float32Array(2*c);r&&(a=-a);let h=0,g=0;for(let e=0;e<=u;e++)for(let i=0;i<=l;i++){const o=i/l,c=e/u;switch(p[h+0]=r?1-o:o,p[h+1]=c,t){case"x,y":f[g+0]=a*o-.5*a,f[g+1]=s*c-.5*s,f[g+2]=n,d[g+0]=0,d[g+1]=0,d[g+2]=r?1:-1;break;case"x,z":f[g+0]=a*o-.5*a,f[g+1]=n,f[g+2]=s*c-.5*s,d[g+0]=0,d[g+1]=r?1:-1,d[g+2]=0;break;case"y,z":f[g+0]=n,f[g+1]=a*o-.5*a,f[g+2]=s*c-.5*s,d[g+0]=r?1:-1,d[g+1]=0,d[g+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}h+=2,g+=3}const m=l+1,y=new Uint16Array(l*u*6);for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(M.c)("sphere-geometry")}=e,{indices:n,attributes:r}=function(e){const{nlat:t=10,nlong:n=10}=e;let{radius:r=1}=e;const i=Math.PI-0,o=2*Math.PI-0,a=(t+1)*(n+1);if("number"==typeof r){const e=r;r=(t,n,r,i,o)=>e}const s=new Float32Array(3*a),l=new Float32Array(3*a),u=new Float32Array(2*a),c=new(a>65535?Uint32Array:Uint16Array)(t*n*6);for(let e=0;e<=t;e++)for(let a=0;a<=n;a++){const c=a/n,f=e/t,d=a+e*(n+1),p=2*d,h=3*d,g=o*c,m=i*f,y=Math.sin(g),v=Math.cos(g),b=Math.sin(m),_=Math.cos(m),A=v*b,x=_,w=y*b,E=r(A,x,w,c,f);s[h+0]=E*A,s[h+1]=E*x,s[h+2]=E*w,l[h+0]=A,l[h+1]=x,l[h+2]=w,u[p+0]=c,u[p+1]=1-f}const f=n+1;for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:H;const t={};return void 0!==e.modelMatrix&&(t.modelMatrix=e.modelMatrix),void 0!==e.viewMatrix&&(t.viewMatrix=e.viewMatrix),void 0!==e.projectionMatrix&&(t.projectionMatrix=e.projectionMatrix),void 0!==e.cameraPositionWorld&&(t.cameraPositionWorld=e.cameraPositionWorld),void 0===e.projectionMatrix&&void 0===e.viewMatrix||(t.viewProjectionMatrix=new U.a(e.projectionMatrix).multiplyRight(e.viewMatrix)),t},vs:"".concat(W,"\nuniform mat4 modelMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewProjectionMatrix;\nuniform vec3 cameraPositionWorld;\n\nstruct World {\n vec3 position;\n vec3 normal;\n};\n\nWorld world;\n\nvoid project_setPosition(vec4 position) {\n project_vPositionWorld = position;\n}\n\nvoid project_setNormal(vec3 normal) {\n project_vNormalWorld = normal;\n}\n\nvoid project_setPositionAndNormal_World(vec3 position, vec3 normal) {\n world.position = position;\n world.normal = normal;\n}\n\nvoid project_setPositionAndNormal_Model(vec3 position, vec3 normal) {\n world.position = (modelMatrix * vec4(position, 1.)).xyz;\n world.normal = mat3(modelMatrix) * normal;\n}\n\nvec4 project_model_to_clipspace(vec4 position) {\n return viewProjectionMatrix * modelMatrix * position;\n}\n\nvec4 project_model_to_clipspace(vec3 position) {\n return viewProjectionMatrix * modelMatrix * vec4(position, 1.);\n}\n\nvec4 project_world_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_view_to_clipspace(vec3 position) {\n return projectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n"),fs:"\n".concat(W)},Y={lightDirection:new Float32Array([1,1,2])};const G={name:"dirlight",vs:null,fs:"uniform vec3 dirlight_uLightDirection;\nvec4 dirlight_filterColor(vec4 color) {\n vec3 normal = project_getNormal_World();\n float d = abs(dot(normalize(normal), normalize(dirlight_uLightDirection)));\n return vec4(color.rgb * d, color.a);\n}\n",getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y;const t={};return e.lightDirection&&(t.dirlight_uLightDirection=e.lightDirection),t},dependencies:[q]};var X=n(2457),Z=n(2544),K=n(2541),$=n(30)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={};function i(e){var t=e&&e.lastIndexOf("/");return t>=0?e.substr(0,t):""}n.r(r),n.d(r,"dirname",(function(){return i}))},function(e,t,n){"use strict";var r=n(2459);t.a=new r.a({id:"deck"})},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"h",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"l",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"i",(function(){return d})),n.d(t,"s",(function(){return p})),n.d(t,"r",(function(){return h})),n.d(t,"t",(function(){return g})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return y})),n.d(t,"o",(function(){return v})),n.d(t,"b",(function(){return b})),n.d(t,"q",(function(){return A})),n.d(t,"j",(function(){return x})),n.d(t,"g",(function(){return w})),n.d(t,"p",(function(){return E}));var r=n(34);function i(){var e=new r.a(3);return r.a!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function o(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function a(e,t,n){var i=new r.a(3);return i[0]=e,i[1]=t,i[2]=n,i}function s(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function l(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function u(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function c(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function f(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}function d(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}function p(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function h(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function g(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],l=t[1],u=t[2],c=i*u-o*l,f=o*s-r*u,d=r*l-i*s,p=i*d-o*f,h=o*c-r*d,g=r*f-i*c,m=2*a;return c*=m,f*=m,d*=m,p*=2,h*=2,g*=2,e[0]=s+c+p,e[1]=l+f+h,e[2]=u+d+g,e}function m(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function y(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function v(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function b(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),u=l&&c(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}var _,A=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e},x=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e},w=o,E=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r};_=i()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,f=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):f=-1,u.length&&p())}function p(){if(!c){var e=s(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++f1)for(var n=1;n0?m(S,--O):0,w--,10===M&&(w=1,x--),M}function k(){return M=O2||j(M)>3?"":" "}function B(e,t){for(;--t&&k()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return D(e,R()+(t<6&&32==L()&&32==k()))}function U(e,t){for(;k()&&e+M!==57&&(e+M!==84||47!==L()););return"/*"+D(t,O-1)+"*"+f(47===e?e:k())}function V(e){for(;!j(L());)k();return D(e,O)}function H(e){return N(function e(t,n,r,i,o,a,s,l,u){var c=0,d=0,p=s,m=0,y=0,b=0,A=1,x=1,w=1,E=0,O="",M=o,S=a,T=i,C=O;for(;x;)switch(b=E,E=k()){case 40:if(108!=b&&58==C.charCodeAt(p-1)){-1!=g(C+=h(F(E),"&","&\f"),"&\f")&&(w=-1);break}case 34:case 39:case 91:C+=F(E);break;case 9:case 10:case 13:case 32:C+=z(b);break;case 92:C+=B(R()-1,7);continue;case 47:switch(L()){case 42:case 47:_(q(U(k(),R()),n,r),u);break;default:C+="/"}break;case 123*A:l[c++]=v(C)*w;case 125*A:case 59:case 0:switch(E){case 0:case 125:x=0;case 59+d:y>0&&v(C)-p&&_(y>32?Y(C+";",i,r,p-1):Y(h(C," ","")+";",i,r,p-2),u);break;case 59:C+=";";default:if(_(T=W(C,n,r,c,d,o,l,O,M=[],S=[],p),a),123===E)if(0===d)e(C,n,T,T,M,a,p,l,S);else switch(m){case 100:case 109:case 115:e(t,T,T,i&&_(W(t,T,T,0,0,o,l,O,o,M=[],p),S),o,S,p,l,i?M:S);break;default:e(C,T,T,T,[""],S,0,l,S)}}c=d=y=0,A=w=1,O=C="",p=s;break;case 58:p=1+v(C),y=b;default:if(A<1)if(123==E)--A;else if(125==E&&0==A++&&125==P())continue;switch(C+=f(E),E*A){case 38:w=d>0?1:(C+="\f",-1);break;case 44:l[c++]=(v(C)-1)*w,w=1;break;case 64:45===L()&&(C+=F(k())),m=L(),d=p=v(O=C+=V(R())),E++;break;case 45:45===b&&2==v(C)&&(A=0)}}return a}("",null,null,null,[""],e=I(e),0,[0],e))}function W(e,t,n,r,i,o,a,l,u,f,d){for(var g=i-1,m=0===i?o:[""],v=b(m),_=0,A=0,x=0;_0?m[w]+" "+E:h(E,/&\f/g,m[w])))&&(u[x++]=O);return T(e,t,n,0===i?s:l,u,f,d)}function q(e,t,n){return T(e,t,n,a,f(M),y(e,2,-2),0)}function Y(e,t,n,r){return T(e,t,n,l,y(e,0,r),y(e,r+1,-1),r)}function G(e,t){switch(function(e,t){return(((t<<2^m(e,0))<<2^m(e,1))<<2^m(e,2))<<2^m(e,3)}(e,t)){case 5103:return o+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return o+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return o+e+i+e+r+e+e;case 6828:case 4268:return o+e+r+e+e;case 6165:return o+e+r+"flex-"+e+e;case 5187:return o+e+h(e,/(\w+).+(:[^]+)/,o+"box-$1$2"+r+"flex-$1$2")+e;case 5443:return o+e+r+"flex-item-"+h(e,/flex-|-self/,"")+e;case 4675:return o+e+r+"flex-line-pack"+h(e,/align-content|flex-|-self/,"")+e;case 5548:return o+e+r+h(e,"shrink","negative")+e;case 5292:return o+e+r+h(e,"basis","preferred-size")+e;case 6060:return o+"box-"+h(e,"-grow","")+o+e+r+h(e,"grow","positive")+e;case 4554:return o+h(e,/([^-])(transform)/g,"$1"+o+"$2")+e;case 6187:return h(h(h(e,/(zoom-|grab)/,o+"$1"),/(image-set)/,o+"$1"),e,"")+e;case 5495:case 3959:return h(e,/(image-set\([^]*)/,o+"$1$`$1");case 4968:return h(h(e,/(.+:)(flex-)?(.*)/,o+"box-pack:$3"+r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o+e+e;case 4095:case 3583:case 4068:case 2532:return h(e,/(.+)-inline(.+)/,o+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(v(e)-1-t>6)switch(m(e,t+1)){case 109:if(45!==m(e,t+4))break;case 102:return h(e,/(.+:)(.+)-([^]+)/,"$1"+o+"$2-$3$1"+i+(108==m(e,t+3)?"$3":"$2-$3"))+e;case 115:return~g(e,"stretch")?G(h(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==m(e,t+1))break;case 6444:switch(m(e,v(e)-3-(~g(e,"!important")&&10))){case 107:return h(e,":",":"+o)+e;case 101:return h(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o+(45===m(e,14)?"inline-":"")+"box$3$1"+o+"$2$3$1"+r+"$2box$3")+e}break;case 5936:switch(m(e,t+11)){case 114:return o+e+r+h(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return o+e+r+h(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return o+e+r+h(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o+e+r+e+e}return e}function X(e,t){for(var n="",r=b(e),i=0;i-1&&!e.return)switch(e.type){case l:e.return=G(e.value,e.length);break;case u:return X([C(e,{value:h(e.value,"@","@"+o)})],i);case s:if(e.length)return A(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return X([C(e,{props:[h(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return X([C(e,{props:[h(t,/:(plac\w+)/,":"+o+"input-$1")]}),C(e,{props:[h(t,/:(plac\w+)/,":-moz-$1")]}),C(e,{props:[h(t,/:(plac\w+)/,r+"input-$1")]})],i)}return""}))}}},,function(e,t,n){var r=n(87);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(1729),i=n(1064),o=n(705),a=n(1730);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return C})),n.d(t,"c",(function(){return P})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return w})),n.d(t,"f",(function(){return E})),n.d(t,"g",(function(){return O})),n.d(t,"h",(function(){return M}));var r=n(189),i=n(0); /** * React Router v6.3.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ const o=Object(i.createContext)(null);const a=Object(i.createContext)(null);const s=Object(i.createContext)({outlet:null,matches:[]});function l(e,t){if(!e)throw new Error(t)}function u(e,t,n){void 0===n&&(n="/");let i=m(("string"==typeof t?Object(r.d)(t):t).pathname||"/",n);if(null==i)return null;let o=function e(t,n,r,i){void 0===n&&(n=[]);void 0===r&&(r=[]);void 0===i&&(i="");return t.forEach((t,o)=>{let a={relativePath:t.path||"",caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(i)||l(!1),a.relativePath=a.relativePath.slice(i.length));let s=y([i,a.relativePath]),u=r.concat(a);t.children&&t.children.length>0&&(!0===t.index&&l(!1),e(t.children,n,u,s)),(null!=t.path||t.index)&&n.push({path:s,score:d(s,t.index),routesMeta:u})}),n}(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let a=null;for(let e=0;null==a&&e"*"===e;function d(e,t){let n=e.split("/"),r=n.length;return n.some(f)&&(r+=-2),t&&(r+=2),n.filter(e=>!f(e)).reduce((e,t)=>e+(c.test(t)?3:""===t?1:10),r)}function p(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let e=0;e(r.push(t),"([^\\/]+)"));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";return[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,t,n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(t){return e}}(s[n]||""),e},{}),pathname:o,pathnameBase:a,pattern:e}}function g(e,t,n){let i,o="string"==typeof e?Object(r.d)(e):e,a=""===e||""===o.pathname?"/":o.pathname;if(null==a)i=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:i="",hash:o=""}="string"==typeof e?Object(r.d)(e):e;return{pathname:n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t,search:b(i),hash:_(o)}}(o,i);return a&&"/"!==a&&a.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function m(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const y=e=>e.join("/").replace(/\/\/+/g,"/"),v=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),b=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",_=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function A(e){x()||l(!1);let{basename:t,navigator:n}=Object(i.useContext)(o),{hash:a,pathname:s,search:u}=M(e),c=s;if("/"!==t){let n=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?Object(r.d)(e).pathname:e.pathname}(e),i=null!=n&&n.endsWith("/");c="/"===s?t+(i?"/":""):y([t,s])}return n.createHref({pathname:c,search:u,hash:a})}function x(){return null!=Object(i.useContext)(a)}function w(){return x()||l(!1),Object(i.useContext)(a).location}function E(){x()||l(!1);let{basename:e,navigator:t}=Object(i.useContext)(o),{matches:n}=Object(i.useContext)(s),{pathname:r}=w(),a=JSON.stringify(n.map(e=>e.pathnameBase)),u=Object(i.useRef)(!1);return Object(i.useEffect)(()=>{u.current=!0}),Object(i.useCallback)((function(n,i){if(void 0===i&&(i={}),!u.current)return;if("number"==typeof n)return void t.go(n);let o=g(n,JSON.parse(a),r);"/"!==e&&(o.pathname=y([e,o.pathname])),(i.replace?t.replace:t.push)(o,i.state)}),[e,t,a,r])}function O(){let{matches:e}=Object(i.useContext)(s),t=e[e.length-1];return t?t.params:{}}function M(e){let{matches:t}=Object(i.useContext)(s),{pathname:n}=w(),r=JSON.stringify(t.map(e=>e.pathnameBase));return Object(i.useMemo)(()=>g(e,JSON.parse(r),n),[e,r,n])}function S(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight((n,r,o)=>Object(i.createElement)(s.Provider,{children:void 0!==r.route.element?r.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,o+1))}}),null)}function T(e){l(!1)}function C(e){let{basename:t="/",children:n=null,location:s,navigationType:u=r.a.Pop,navigator:c,static:f=!1}=e;x()&&l(!1);let d=v(t),p=Object(i.useMemo)(()=>({basename:d,navigator:c,static:f}),[d,c,f]);"string"==typeof s&&(s=Object(r.d)(s));let{pathname:h="/",search:g="",hash:y="",state:b=null,key:_="default"}=s,A=Object(i.useMemo)(()=>{let e=m(h,d);return null==e?null:{pathname:e,search:g,hash:y,state:b,key:_}},[d,h,g,y,b,_]);return null==A?null:Object(i.createElement)(o.Provider,{value:p},Object(i.createElement)(a.Provider,{children:n,value:{location:A,navigationType:u}}))}function P(e){let{children:t,location:n}=e;return function(e,t){x()||l(!1);let{matches:n}=Object(i.useContext)(s),o=n[n.length-1],a=o?o.params:{},c=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let f,d=w();if(t){var p;let e="string"==typeof t?Object(r.d)(t):t;"/"===c||(null==(p=e.pathname)?void 0:p.startsWith(c))||l(!1),f=e}else f=d;let h=f.pathname||"/",g=u(e,{pathname:"/"===c?h:h.slice(c.length)||"/"});return S(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:y([c,e.pathname]),pathnameBase:"/"===e.pathnameBase?c:y([c,e.pathnameBase])})),n)}(function e(t){let n=[];return i.Children.forEach(t,t=>{if(!Object(i.isValidElement)(t))return;if(t.type===i.Fragment)return void n.push.apply(n,e(t.props.children));t.type!==T&&l(!1);let r={caseSensitive:t.props.caseSensitive,element:t.props.element,index:t.props.index,path:t.props.path};t.props.children&&(r.children=e(t.props.children)),n.push(r)}),n}(t),n)}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(591),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,o.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return d})),n.d(t,"f",(function(){return g}));var r=n(34);function i(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function o(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function a(e){var t=e[0],n=e[1];return Math.hypot(t,n)}function s(e,t){return e[0]=-t[0],e[1]=-t[1],e}function l(e,t,n,r){var i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function u(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e}function c(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function f(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function d(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}var p,h,g=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e};p=new r.a(2),r.a!=Float32Array&&(p[0]=0,p[1]=0),h=p},function(e,t,n){"use strict";var r=n(5);Object.defineProperty(t,"__esModule",{value:!0}),t.unique=function(e){var t=[];return new Set(e).forEach((function(e){h(e)&&t.push(e)})),t},t.findMapBounds=function(e){var t=e.reduce((function(e,t){return t.meta&&t.meta.bounds&&e.push(t.meta.bounds),e}),[]);if(0===t.length)return null;return t.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.min(e[1],t[1]),Math.max(e[2],t[2]),Math.max(e[3],t[3])]}),[180,90,-180,-90])},t.getLatLngBounds=function(e,t,n){var r=e.map((function(e){return Array.isArray(e)&&e[t]})).filter(Number.isFinite).sort(y);if(!r.length)return null;return[Math.max(r[0],n[0]),Math.min(r[r.length-1],n[1])]},t.clamp=function(e,t){var n=(0,a.default)(e,2),r=n[0],i=n[1];return t<=r?r:t>=i?i:t},t.getSampleData=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=Math.max(Math.floor(e.length/t),1),i=[],o=0;o0?1:0)*(Math.sign(e)*(10/Math.pow(100,t))))/n).toFixed(t)}function b(e){isNaN(e)&&((0,s.default)("step is not a number"),(0,s.default)(e));var t=e.toString().split(".");return 1===t.length?0:t[1].length}function _(e,t){var n=(0,f.bisectLeft)(t,e);return 0===n?t[n]:n===t.length?t[n-1]:t[t[n]-e0&&(this.theta=Math.atan2(e[0],e[1]),this.phi=Math.acos(Object(a.a)(e[2]/this.radius,-1,1))),this.check()}toVector3(){return new i.a(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}check(){if(!(Number.isFinite(this.phi)&&Number.isFinite(this.theta)&&this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(1981);t.default=r.FlexView},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(1716)),i=a(n(1720)),o=a(n(591));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,o.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"deck.gl: assertion failed.")}n.d(t,"a",(function(){return r}))},,,function(e,t,n){var r; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;tn?n:e}const l=Math.log2||function(e){return Math.log(e)*Math.LOG2E};var u=n(43),c=n(72),f=n(58);function d(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}const p=Math.PI,h=p/4,g=p/180,m=180/p,y=1.5;function v(e){return Math.pow(2,e)}function b(e){return l(e)}function _(e){const[t,n]=e;d(Number.isFinite(t)),d(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=n*g;return[512*(t*g+p)/(2*p),512*(p+Math.log(Math.tan(h+.5*r)))/(2*p)]}function A(e){const[t,n]=e,r=t/512*(2*p)-p,i=2*(Math.atan(Math.exp(n/512*(2*p)-p))-h);return[r*m,i*m]}function x(e){const{latitude:t}=e;d(Number.isFinite(t));return b(4003e4*Math.cos(t*g))-9}function w(e){const{latitude:t,longitude:n,highPrecision:r=!1}=e;d(Number.isFinite(t)&&Number.isFinite(n));const i=Math.cos(t*g),o=512/360/i,a=512/4003e4/i,s={unitsPerMeter:[a,a,a],metersPerUnit:[1/a,1/a,1/a],unitsPerDegree:[512/360,o,a],degreesPerUnit:[.703125,1/o,1/a]};if(r){const e=g*Math.tan(t*g)/i,n=512/360*e/2,r=512/4003e4*e,l=r/o*a;s.unitsPerDegree2=[0,n,r],s.unitsPerMeter2=[l,0,l]}return s}function E(e,t){const[n,r,i]=e,[o,a,s]=t,{unitsPerMeter:l,unitsPerMeter2:u}=w({longitude:n,latitude:r,highPrecision:!0}),c=_(e);c[0]+=o*(l[0]+u[0]*a),c[1]+=a*(l[1]+u[1]*a);const f=A(c),d=(i||0)+(s||0);return Number.isFinite(i)||Number.isFinite(s)?[f[0],f[1],d]:f}function O(e){const{height:t,pitch:n,bearing:r,altitude:i,scale:o,center:a}=e,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];u.p(s,s,[0,0,-i]),u.l(s,s,-n*g),u.n(s,s,r*g);const l=o/t;return u.o(s,s,[l,l,l]),a&&u.p(s,s,f.k([],a)),s}function M(e){const{width:t,height:n,altitude:r,pitch:i=0,offset:o,center:a,scale:l,nearZMultiplier:u=1,farZMultiplier:c=1}=e;let{fovy:f=S(y)}=e;void 0!==r&&(f=S(r));const d=f*g,p=i*g,h=T(f);let m=h;a&&(m+=a[2]*l/Math.cos(p)/n);const v=d*(.5+(o?o[1]:0)/n),b=Math.sin(v)*m/Math.sin(s(Math.PI/2-p-v,.01,Math.PI-.01)),_=Math.sin(p)*b+m,A=10*m;return{fov:d,aspect:t/n,focalDistance:h,near:u,far:Math.min(_*c,A)}}function S(e){return 2*Math.atan(.5/e)*m}function T(e){return.5/Math.tan(.5*e*g)}function C(e,t){const[n,r,i=0]=e;return d(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),o(t,[n,r,i,1])}function P(e,t,n=0){const[r,i,a]=e;if(d(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(a)){return o(t,[r,i,a,1])}const s=o(t,[r,i,0,1]),l=o(t,[r,i,1,1]),u=s[2],f=l[2],p=u===f?0:((n||0)-u)/(f-u);return c.c([],s,l,p)}function k(e){const{width:t,height:n,bounds:r,minExtent:i=0,maxZoom:o=24,offset:a=[0,0]}=e,[[u,c],[f,p]]=r,h=function(e=0){if("number"==typeof e)return{top:e,bottom:e,left:e,right:e};return d(Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&Number.isFinite(e.left)&&Number.isFinite(e.right)),e}(e.padding),g=_([u,s(p,-85.051129,85.051129)]),m=_([f,s(c,-85.051129,85.051129)]),y=[Math.max(Math.abs(m[0]-g[0]),i),Math.max(Math.abs(m[1]-g[1]),i)],v=[t-h.left-h.right-2*Math.abs(a[0]),n-h.top-h.bottom-2*Math.abs(a[1])];d(v[0]>0&&v[1]>0);const b=v[0]/y[0],x=v[1]/y[1],w=(h.right-h.left)/2/b,E=(h.top-h.bottom)/2/x,O=A([(m[0]+g[0])/2+w,(m[1]+g[1])/2+E]),M=Math.min(o,l(Math.abs(Math.min(b,x))));return d(Number.isFinite(M)),{longitude:O[0],latitude:O[1],zoom:M}}const L=Math.PI/180;function R(e,t=0){const{width:n,height:r,unproject:i}=e,o={targetZ:t},a=i([0,r],o),s=i([n,r],o);let l,u;return(e.fovy?.5*e.fovy*L:Math.atan(.5/e.altitude))>(90-e.pitch)*L-.01?(l=D(e,0,t),u=D(e,n,t)):(l=i([0,0],o),u=i([n,0],o)),[a,s,u,l]}function D(e,t,n){const{pixelUnprojectionMatrix:r}=e,i=o(r,[t,0,1,1]),a=o(r,[t,e.height,1,1]),s=(n*e.distanceScales.unitsPerMeter[2]-i[2])/(a[2]-i[2]),l=A(c.c([],i,a,s));return l.push(n),l}class j{constructor(e={width:1,height:1}){Object(r.a)(this,"latitude",void 0),Object(r.a)(this,"longitude",void 0),Object(r.a)(this,"zoom",void 0),Object(r.a)(this,"pitch",void 0),Object(r.a)(this,"bearing",void 0),Object(r.a)(this,"altitude",void 0),Object(r.a)(this,"fovy",void 0),Object(r.a)(this,"meterOffset",void 0),Object(r.a)(this,"center",void 0),Object(r.a)(this,"width",void 0),Object(r.a)(this,"height",void 0),Object(r.a)(this,"scale",void 0),Object(r.a)(this,"distanceScales",void 0),Object(r.a)(this,"viewMatrix",void 0),Object(r.a)(this,"projectionMatrix",void 0),Object(r.a)(this,"viewProjectionMatrix",void 0),Object(r.a)(this,"pixelProjectionMatrix",void 0),Object(r.a)(this,"pixelUnprojectionMatrix",void 0),Object(r.a)(this,"equals",e=>e instanceof j&&(e.width===this.width&&e.height===this.height&&u.b(e.projectionMatrix,this.projectionMatrix)&&u.b(e.viewMatrix,this.viewMatrix))),Object(r.a)(this,"project",(e,t={})=>{const{topLeft:n=!0}=t,r=C(this.projectPosition(e),this.pixelProjectionMatrix),[i,o]=r,a=n?o:this.height-o;return 2===e.length?[i,a]:[i,a,r[2]]}),Object(r.a)(this,"unproject",(e,t={})=>{const{topLeft:n=!0,targetZ:r}=t,[i,o,a]=e,s=n?o:this.height-o,l=r&&r*this.distanceScales.unitsPerMeter[2],u=P([i,s,a],this.pixelUnprojectionMatrix,l),[c,f,d]=this.unprojectPosition(u);return Number.isFinite(a)?[c,f,d]:Number.isFinite(r)?[c,f,r]:[c,f]}),Object(r.a)(this,"projectPosition",e=>{const[t,n]=_(e);return[t,n,(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}),Object(r.a)(this,"unprojectPosition",e=>{const[t,n]=A(e);return[t,n,(e[2]||0)*this.distanceScales.metersPerUnit[2]]});let{width:t,height:n,altitude:i=null,fovy:o=null}=e;const{latitude:a=0,longitude:s=0,zoom:l=0,pitch:c=0,bearing:d=0,position:p=null,nearZMultiplier:h=.02,farZMultiplier:g=1.01}=e;t=t||1,n=n||1,null===o&&null===i?(i=y,o=S(i)):null===o?o=S(i):null===i&&(i=T(o));const m=v(l);i=Math.max(.75,i);const b=w({longitude:s,latitude:a}),x=_([s,a]);x.push(0),p&&f.a(x,x,f.j([],p,b.unitsPerMeter)),this.projectionMatrix=function(e){const{fov:t,aspect:n,near:r,far:i}=M(e);return u.j([],t,n,r,i)}({width:t,height:n,scale:m,center:x,pitch:c,fovy:o,nearZMultiplier:h,farZMultiplier:g}),this.viewMatrix=O({height:n,scale:m,center:x,pitch:c,bearing:d,altitude:i}),this.width=t,this.height=n,this.scale=m,this.latitude=a,this.longitude=s,this.zoom=l,this.pitch=c,this.bearing=d,this.altitude=i,this.fovy=o,this.center=x,this.meterOffset=p||[0,0,0],this.distanceScales=b,this._initMatrices(),Object.freeze(this)}_initMatrices(){const{width:e,height:t,projectionMatrix:n,viewMatrix:r}=this,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];u.h(i,i,n),u.h(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];u.o(o,o,[e/2,-t/2,1]),u.p(o,o,[1,-1,0]),u.h(o,o,i);const a=u.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!a)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=a}projectFlat(e){return _(e)}unprojectFlat(e){return A(e)}getMapCenterByLngLatPosition({lngLat:e,pos:t}){const n=P(t,this.pixelUnprojectionMatrix),r=_(e),i=c.a([],r,c.d([],n));return A(c.a([],this.center,i))}fitBounds(e,t={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=k(Object.assign({width:n,height:r,bounds:e},t));return new j({width:n,height:r,longitude:i,latitude:o,zoom:a})}getBounds(e){const t=this.getBoundingRegion(e),n=Math.min(...t.map(e=>e[0])),r=Math.max(...t.map(e=>e[0]));return[[n,Math.min(...t.map(e=>e[1]))],[r,Math.max(...t.map(e=>e[1]))]]}getBoundingRegion(e={}){return R(this,e.z||0)}getLocationAtPoint({lngLat:e,pos:t}){return this.getMapCenterByLngLatPosition({lngLat:e,pos:t})}}function I(e){const{width:t,height:n,pitch:r=0}=e;let{longitude:i,latitude:o,zoom:s,bearing:u=0}=e;(i<-180||i>180)&&(i=a(i+180,360)-180),(u<-180||u>180)&&(u=a(u+180,360)-180);const c=l(n/512);if(s<=c)s=c,o=0;else{const e=n/2/Math.pow(2,s),t=A([0,e])[1];if(ot&&(o=t)}}return{width:t,height:n,longitude:i,latitude:o,zoom:s,pitch:r,bearing:u}}const N=["longitude","latitude","zoom"],F={curve:1.414,speed:1.2};function z(e,t,n,r){const{startZoom:i,startCenterXY:o,uDelta:a,w0:s,u1:l,S:u,rho:f,rho2:d,r0:p}=U(e,t,r);if(l<.01){const r={};for(const i of N){const o=e[i],a=t[i];r[i]=(h=n)*a+(1-h)*o}return r}var h;const g=n*u,m=Math.cosh(p)/Math.cosh(p+f*g),y=s*((Math.cosh(p)*Math.tanh(p+f*g)-Math.sinh(p))/d)/l,v=i+b(1/m),_=c.e([],a,y);c.a(_,_,o);const x=A(_);return{longitude:x[0],latitude:x[1],zoom:v}}function B(e,t,n){const r={...F,...n},{screenSpeed:i,speed:o,maxDuration:a}=r,{S:s,rho:l}=U(e,t,r),u=1e3*s;let c;return c=Number.isFinite(i)?u/(i/l):u/o,Number.isFinite(a)&&c>a?0:c}function U(e,t,n){const r=(n=Object.assign({},F,n)).curve,i=e.zoom,o=[e.longitude,e.latitude],a=v(i),s=t.zoom,l=[t.longitude,t.latitude],u=v(s-i),f=_(o),d=_(l),p=c.f([],d,f),h=Math.max(e.width,e.height),g=h/u,m=c.b(p)*a,y=Math.max(m,.01),b=r*r,A=(g*g-h*h+b*b*y*y)/(2*h*b*y),x=(g*g-h*h-b*b*y*y)/(2*g*b*y),w=Math.log(Math.sqrt(A*A+1)-A),E=Math.log(Math.sqrt(x*x+1)-x);return{startZoom:i,startCenterXY:f,uDelta:p,w0:h,u1:m,S:(E-w)/r,rho:r,rho2:b,r0:w,r1:E}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"l",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"k",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"m",(function(){return f})),n.d(t,"j",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"i",(function(){return h})),n.d(t,"n",(function(){return g})),n.d(t,"o",(function(){return m})),n.d(t,"f",(function(){return y})),n.d(t,"e",(function(){return v}));var r=n(34);function i(e){var t=new r.a(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(e,t,n,i){var o=new r.a(4);return o[0]=e,o[1]=t,o[2]=n,o[3]=i,o}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function s(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function u(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function c(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.hypot(t,n,r,i)}function f(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function d(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a,e}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function h(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e}function g(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}function m(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*o-l*i,f=u*i+l*r-a*o,d=u*o+a*i-s*r,p=-a*r-s*i-l*o;return e[0]=c*u+p*-a+f*-l-d*-s,e[1]=f*u+p*-s+d*-a-c*-l,e[2]=d*u+p*-l+c*-s-f*-a,e[3]=t[3],e}function y(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function v(e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=t[0],l=t[1],u=t[2],c=t[3];return Math.abs(n-s)<=r.b*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-l)<=r.b*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-u)<=r.b*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(a-c)<=r.b*Math.max(1,Math.abs(a),Math.abs(c))}var b,_;b=new r.a(4),r.a!=Float32Array&&(b[0]=0,b[1]=0,b[2]=0,b[3]=0),_=b},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";(function(e){var r=n(5);Object.defineProperty(t,"__esModule",{value:!0}),t.generateHashId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;return Math.random().toString(36).substr(e)},t.isChrome=function(){return l.default.chrome&&l.default.chrome.webstore},t.isPlainObject=function(e){return e===Object(e)&&"function"!=typeof e&&!Array.isArray(e)},t.capitalizeFirstLetter=f,t.camelToTitle=function(e){return f(e.replace(/([A-Z])/g," $1"))},t.getHTMLMapModeTileUrl=function(e){return"https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/map-".concat(e.toLowerCase(),"-mode.png")},t.toArray=function(e){if(Array.isArray(e))return e;if(null==e)return[];return[e]},t.isObject=p,t.getError=function e(t){if(!t)return"Something went wrong";if("string"==typeof t)return t;if(t instanceof Error)return t.message;if("object"===(0,o.default)(t))return t.error?e(t.error):t.err?e(t.err):t.message?e(t.message):JSON.stringify(t);return null},t.arrayInsert=function(e,t,n){if(!Array.isArray(e))return e;return[].concat((0,s.default)(e.slice(0,t)),[n],(0,s.default)(e.slice(t)))},t.isTest=function(){var t,n;return"test"===(null===(t=e)||void 0===t||null===(n=t.env)||void 0===n?void 0:"production")},t.set=t.insertValue=t.camelize=void 0;var i=r(n(1165)),o=r(n(130)),a=r(n(4)),s=r(n(69)),l=r(n(93));function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t0?i(r(e),9007199254740991):0}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(1059),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},,function(e,t,n){e.exports=!n(83)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";n.r(t),n.d(t,"ArcLayer",(function(){return r.a})),n.d(t,"BitmapLayer",(function(){return E})),n.d(t,"IconLayer",(function(){return z})),n.d(t,"LineLayer",(function(){return B.a})),n.d(t,"PointCloudLayer",(function(){return U.a})),n.d(t,"ScatterplotLayer",(function(){return V.a})),n.d(t,"ColumnLayer",(function(){return H.a})),n.d(t,"GridCellLayer",(function(){return W.a})),n.d(t,"PathLayer",(function(){return q.a})),n.d(t,"PolygonLayer",(function(){return Y.a})),n.d(t,"GeoJsonLayer",(function(){return G.a})),n.d(t,"TextLayer",(function(){return ve})),n.d(t,"SolidPolygonLayer",(function(){return be.a})),n.d(t,"_MultiIconLayer",(function(){return $}));var r=n(1368),i=n(6),o=n(7),a=n(20),s=n(11),l=n(28),u=n(19),c=n(3),f=n(1199),d=n(1198),p=n(407),h=n(643),g=n(207),m=n(435),y=n(33),v=new Uint16Array([0,2,1,0,3,2]),b=new Float32Array([0,1,0,0,1,0,1,1]);function _(e,t){if(!t)return function(e){for(var t=new Float64Array(12),n=0;n0&&h>0&&(s[f++]=c-o,s[f++]=c-o-1,s[f++]=c-1,s[f++]=c-o,s[f++]=c-1,s[f++]=c),c++}return{vertexCount:a,positions:u,indices:s,texCoords:l}}function A(e,t,n){return Object(y.g)(Object(y.g)(e[0],e[1],n),Object(y.g)(e[3],e[2],n),t)}var x,w=(x={},Object(c.a)(x,10241,9987),Object(c.a)(x,10240,9729),Object(c.a)(x,10242,33071),Object(c.a)(x,10243,33071),x),E=function(e){function t(){return Object(i.a)(this,t),Object(a.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(o.a)(t,[{key:"getShaders",value:function(){return Object(l.a)(Object(s.a)(t.prototype),"getShaders",this).call(this,{vs:"\n#define SHADER_NAME bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n geometry.worldPosition = positions;\n geometry.uv = texCoords;\n geometry.pickingColor = pickingColor;\n\n gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vTexCoord = texCoords;\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:"\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvoid main(void) {\n vec4 bitmapColor = texture2D(bitmapTexture, vTexCoord);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = vTexCoord;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[f.a,d.a]})}},{key:"initializeState",value:function(){var e=this,t=this.getAttributeManager();t.remove(["instancePickingColors"]);t.add({indices:{size:1,isIndexed:!0,update:function(t){return t.value=e.state.mesh.indices},noAlloc:!0},positions:{size:3,type:5130,fp64:this.use64bitPositions(),update:function(t){return t.value=e.state.mesh.positions},noAlloc:!0},texCoords:{size:2,update:function(t){return t.value=e.state.mesh.texCoords},noAlloc:!0}})}},{key:"updateState",value:function(e){var t=e.props,n=e.oldProps;if(e.changeFlags.extensionsChanged){var r=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(r)}),this.getAttributeManager().invalidateAll()}t.image!==n.image&&this.loadTexture(t.image);var i=this.getAttributeManager();if(t.bounds!==n.bounds){var o=this.state.mesh,a=this._createMesh();for(var s in this.state.model.setVertexCount(a.vertexCount),a)o&&o[s]!==a[s]&&i.invalidate(s);this.setState({mesh:a})}}},{key:"finalizeState",value:function(){Object(l.a)(Object(s.a)(t.prototype),"finalizeState",this).call(this),this.state.bitmapTexture&&this.state.bitmapTexture.delete()}},{key:"_createMesh",value:function(){var e=this.props.bounds,t=e;return Number.isFinite(e[0])&&(t=[[e[0],e[1]],[e[0],e[3]],[e[2],e[3]],[e[2],e[1]]]),_(t,this.context.viewport.resolution)}},{key:"_getModel",value:function(e){return e?new h.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new g.a({drawMode:4,vertexCount:6}),isInstanced:!1})):null}},{key:"draw",value:function(e){var t=e.uniforms,n=this.state,r=n.bitmapTexture,i=n.model,o=this.props,a=o.image,s=o.desaturate,l=o.transparentColor,u=o.tintColor;r&&a instanceof HTMLVideoElement&&a.readyState>HTMLVideoElement.HAVE_METADATA&&(r.width!==a.videoWidth||r.height!==a.videoHeight?(r.resize({width:a.videoWidth,height:a.videoHeight,mipmaps:!0}),r.setSubImageData({data:a,paramters:w})):r.setSubImageData({data:a}),r.generateMipmap());r&&i&&i.setUniforms(Object.assign({},t,{bitmapTexture:r,desaturate:s,transparentColor:l.map((function(e){return e/255})),tintColor:u.slice(0,3).map((function(e){return e/255}))})).draw()}},{key:"loadTexture",value:function(e){var t=this.context.gl;this.state.bitmapTexture&&this.state.bitmapTexture.delete(),e instanceof m.a?this.setState({bitmapTexture:e}):e instanceof HTMLVideoElement?this.setState({bitmapTexture:new m.a(t,{width:1,height:1,parameters:w,mipmaps:!1})}):e&&this.setState({bitmapTexture:new m.a(t,{data:e,parameters:w})})}}]),t}(p.a);E.layerName="BitmapLayer",E.defaultProps={image:{type:"object",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]}};var O,M=n(1412),S=n(856),T=n(2534),C=n(1182),P=n(170),k=n(57),L=function(){},R=(O={},Object(c.a)(O,10241,9987),Object(c.a)(O,10240,9729),Object(c.a)(O,10242,33071),Object(c.a)(O,10243,33071),O);function D(e){return e&&(e.id||e.url)}function j(e,t,n){for(var r=0;r0){var l=function(e){for(var t,n=e.icons,r=e.buffer,i=e.mapping,o=void 0===i?{}:i,a=e.xOffset,s=void 0===a?0:a,l=e.yOffset,u=void 0===l?0:l,c=e.rowHeight,f=void 0===c?0:c,d=e.canvasWidth,p=[],h=0;hd&&(j(o,p,u),s=0,u=f+u+r,f=0,p=[]),p.push({icon:g,xOffset:s}),s=s+y+r,f=Math.max(f,m)}}return p.length>0&&j(o,p,u),{mapping:o,rowHeight:f,xOffset:s,yOffset:u,canvasWidth:d,canvasHeight:(t=f+u+r,Math.pow(2,Math.ceil(Math.log2(t))))}}({icons:s,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset}),u=l.mapping,c=l.xOffset,f=l.yOffset,d=l.rowHeight,p=l.canvasHeight;this._rowHeight=d,this._mapping=u,this._xOffset=c,this._yOffset=f,this._canvasHeight=p,this._texture||(this._texture=new m.a(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:R})),this._texture.height!==this._canvasHeight&&(this._texture=(this.gl,t=this._texture,n=this._canvasWidth,r=this._canvasHeight,i=t.width,o=t.height,a=Object(M.a)(t,{width:n,height:r}),Object(S.b)(t,a,{targetY:0,width:i,height:o}),t.delete(),a)),this.onUpdate(),this._loadIcons(s)}}},{key:"_loadIcons",value:function(e){var t=this,n=this._canvas.getContext("2d"),r=!0,i=!1,o=void 0;try{for(var a,s=function(){var e=a.value;t._pendingCount++,Object(C.a)(e.url,T.a,t._loadOptions).then((function(r){var i=D(e),o=t._mapping[i],a=o.x,s=o.y,l=o.width,u=o.height,c=function(e,t,n,r){return n===t.width&&r===t.height?t:(e.canvas.height=r,e.canvas.width=n,e.clearRect(0,0,e.canvas.width,e.canvas.height),e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.canvas)}(n,r,l,u);t._texture.setSubImageData({data:c,x:a,y:s,width:l,height:u}),t._texture.generateMipmap(),t.onUpdate()})).catch((function(e){k.a.error(e)()})).finally((function(){t._pendingCount--}))},l=e[Symbol.iterator]();!(r=(a=l.next()).done);r=!0)s()}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}}},{key:"isLoaded",get:function(){return 0===this._pendingCount}}]),e}(),N=[0,0,0,255],F={iconAtlas:{type:"object",value:null,async:!0},iconMapping:{type:"object",value:{},async:!0},sizeScale:{type:"number",value:1,min:0},billboard:!0,sizeUnits:"pixels",sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},alphaCutoff:{type:"number",value:.05,min:0,max:1},getPosition:{type:"accessor",value:function(e){return e.position}},getIcon:{type:"accessor",value:function(e){return e.icon}},getColor:{type:"accessor",value:N},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]}},z=function(e){function t(){return Object(i.a)(this,t),Object(a.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(o.a)(t,[{key:"getShaders",value:function(){return Object(l.a)(Object(s.a)(t.prototype),"getShaders",this).call(this,{vs:"#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\nattribute vec2 instancePixelOffset;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform bool billboard;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = angle * PI / 180.0;\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n\n vec2 iconSize = instanceIconFrames.zw;\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale), \n sizeMinPixels, sizeMaxPixels\n );\n float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;\n vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;\n pixelOffset += instancePixelOffset;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position); \n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vTextureCoords = mix(\n instanceIconFrames.xy,\n instanceIconFrames.xy + iconSize,\n (positions.xy + 1.0) / 2.0\n ) / iconsTextureDim;\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n\n vColorMode = instanceColorModes;\n}\n",fs:"#define SHADER_NAME icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float alphaCutoff;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n float a = texColor.a * opacity * vColor.a;\n\n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color, a);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[f.a,d.a]})}},{key:"initializeState",value:function(){var e=this;this.state={iconManager:new I(this.context.gl,{onUpdate:function(){return e._onUpdate()}})},this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceOffsets:{size:2,accessor:"getIcon",transform:this.getInstanceOffset},instanceIconFrames:{size:4,accessor:"getIcon",transform:this.getInstanceIconFrame},instanceColorModes:{size:1,type:5121,accessor:"getIcon",transform:this.getInstanceColorMode},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:N},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}},{key:"updateState",value:function(e){var n=e.oldProps,r=e.props,i=e.changeFlags;Object(l.a)(Object(s.a)(t.prototype),"updateState",this).call(this,{props:r,oldProps:n,changeFlags:i});var o=this.getAttributeManager(),a=r.iconAtlas,u=r.iconMapping,c=r.data,f=r.getIcon,d=this.state.iconManager;d.setProps({loadOptions:r.loadOptions});var p=!1;if(a||this.internalState.isAsyncPropLoading("iconAtlas")?(n.iconAtlas!==r.iconAtlas&&d.setProps({iconAtlas:a,autoPacking:!1}),n.iconMapping!==r.iconMapping&&(d.setProps({iconMapping:u}),p=!0)):d.setProps({autoPacking:!0}),(i.dataChanged||i.updateTriggersChanged&&(i.updateTriggersChanged.all||i.updateTriggersChanged.getIcon))&&(d.setProps({data:c,getIcon:f}),p=!0),p&&(o.invalidate("instanceOffsets"),o.invalidate("instanceIconFrames"),o.invalidate("instanceColorModes")),i.extensionsChanged){var h=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(h)}),o.invalidateAll()}}},{key:"finalizeState",value:function(){Object(l.a)(Object(s.a)(t.prototype),"finalizeState",this).call(this),this.state.iconManager.finalize()}},{key:"draw",value:function(e){var t=e.uniforms,n=this.props,r=n.sizeScale,i=n.sizeMinPixels,o=n.sizeMaxPixels,a=n.sizeUnits,s=n.billboard,l=n.alphaCutoff,u=this.state.iconManager,c=this.context.viewport,f=u.getTexture();f&&f.loaded&&this.state.model.setUniforms(Object.assign({},t,{iconsTexture:f,iconsTextureDim:[f.width,f.height],sizeScale:r*("pixels"===a?c.metersPerPixel:1),sizeMinPixels:i,sizeMaxPixels:o,billboard:s,alphaCutoff:l})).draw()}},{key:"_getModel",value:function(e){return new h.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new g.a({drawMode:6,attributes:{positions:{size:2,value:new Float32Array([-1,-1,-1,1,1,1,1,-1])}}}),isInstanced:!0}))}},{key:"_onUpdate",value:function(){this.setNeedsRedraw()}},{key:"getInstanceOffset",value:function(e){var t=this.state.iconManager.getIconMapping(e);return[t.width/2-t.anchorX||0,t.height/2-t.anchorY||0]}},{key:"getInstanceColorMode",value:function(e){return this.state.iconManager.getIconMapping(e).mask?1:0}},{key:"getInstanceIconFrame",value:function(e){var t=this.state.iconManager.getIconMapping(e);return[t.x||0,t.y||0,t.width||0,t.height||0]}},{key:"isLoaded",get:function(){return Object(l.a)(Object(s.a)(t.prototype),"isLoaded",this)&&this.state.iconManager.isLoaded}}]),t}(p.a);z.layerName="IconLayer",z.defaultProps=F;var B=n(1369),U=n(1370),V=n(612),H=n(610),W=n(1201),q=n(353),Y=n(1202),G=n(1373),X=n(24),Z=n(833),K=[],$=function(e){function t(){return Object(i.a)(this,t),Object(a.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(o.a)(t,[{key:"getShaders",value:function(){return Object.assign({},Object(l.a)(Object(s.a)(t.prototype),"getShaders",this).call(this),{inject:{"vs:#decl":"\n uniform float gamma;\n varying float vGamma;\n","vs:#main-end":"\n vGamma = gamma / (sizeScale * iconSize.y);\n"},fs:"#define SHADER_NAME multi-icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float buffer;\nuniform bool sdf;\nuniform float alphaCutoff;\nuniform bool shouldDrawBackground;\nuniform vec3 backgroundColor;\n\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying float vGamma;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n if (!picking_uActive) {\n float alpha = texture2D(iconsTexture, vTextureCoords).a;\n if (sdf) {\n alpha = smoothstep(buffer - vGamma, buffer + vGamma, alpha);\n }\n float a = alpha * vColor.a;\n \n if (a < alphaCutoff) {\n if (shouldDrawBackground) {\n gl_FragColor = vec4(backgroundColor, vColor.a);\n return;\n } else {\n discard;\n }\n }\n\n if (shouldDrawBackground) {\n gl_FragColor = vec4(mix(backgroundColor, vColor.rgb, alpha), vColor.a * opacity);\n } else {\n gl_FragColor = vec4(vColor.rgb, a * opacity);\n }\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"})}},{key:"initializeState",value:function(){var e=this;Object(l.a)(Object(s.a)(t.prototype),"initializeState",this).call(this),this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:function(t,n){var r=n.index,i=n.target;return e.encodePickingColor(r,i)}}})}},{key:"updateState",value:function(e){Object(l.a)(Object(s.a)(t.prototype),"updateState",this).call(this,e);var n=e.oldProps,r=e.props;if(r.backgroundColor!==n.backgroundColor){var i=Array.isArray(r.backgroundColor)?r.backgroundColor.map((function(e){return e/255})).slice(0,3):null;this.setState({backgroundColor:i})}}},{key:"draw",value:function(e){var n=e.uniforms,r=this.props.sdf,i=this.state.backgroundColor,o=Array.isArray(i);Object(l.a)(Object(s.a)(t.prototype),"draw",this).call(this,{uniforms:Object.assign({},n,{buffer:.75,gamma:.2,sdf:Boolean(r),backgroundColor:i||[0,0,0],shouldDrawBackground:o})})}},{key:"getInstanceOffset",value:function(e){var n=this;return e?Array.from(e).map((function(e){return Object(l.a)(Object(s.a)(t.prototype),"getInstanceOffset",n).call(n,e)})):K}},{key:"getInstanceColorMode",value:function(e){return 1}},{key:"getInstanceIconFrame",value:function(e){var n=this;return e?Array.from(e).map((function(e){return Object(l.a)(Object(s.a)(t.prototype),"getInstanceIconFrame",n).call(n,e)})):K}}]),t}(z);$.layerName="MultiIconLayer",$.defaultProps={backgroundColor:{type:"color",value:null,optional:!0},getIconOffsets:{type:"accessor",value:function(e){return e.offsets}}};var J=n(1417),Q=n.n(J);function ee(e,t){for(var n=0,r=0;rt&&(it){var c=o-s.length;if(it){var f=te(s,t,n);f.rows.length>1&&(r=r.concat(f.rows.slice(0,f.rows.length-1))),i+=f.lastRowStartCharIndex,u=f.lastRowOffsetLeft}}a+=u}return i0&&void 0!==arguments[0]?arguments[0]:5;Object(i.a)(this,e),this.limit=t,this.clear()}return Object(o.a)(e,[{key:"clear",value:function(){this._cache={},this._order=[]}},{key:"get",value:function(e){var t=this._cache[e];return t&&(this._deleteOrder(e),this._appendOrder(e)),t}},{key:"set",value:function(e,t){this._cache[e]?(this.delete(e),this._cache[e]=t,this._appendOrder(e)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[e]=t,this._appendOrder(e))}},{key:"delete",value:function(e){this._cache[e]&&(this._deleteCache(e),this._deleteOrder(e))}},{key:"_deleteCache",value:function(e){delete this._cache[e]}},{key:"_deleteOrder",value:function(e){var t=this._order.findIndex((function(t){return t===e}));t>=0&&this._order.splice(t,1)}},{key:"_appendOrder",value:function(e){this._order.push(e)}}]),e}();var oe=function(){for(var e=[],t=32;t<128;t++)e.push(String.fromCharCode(t));return e}(),ae=new ie(3),se=["fontFamily","fontWeight","characterSet","fontSize","sdf","buffer","cutoff","radius"];function le(e,t){var n=ae.get(e);if(!n)return t;var r=[],i=n.mapping,o=Object.keys(i);o=new Set(o);var a=t;return a instanceof Array&&(a=new Set(a)),a.forEach((function(e){o.has(e)||r.push(e)})),r}function ue(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};se.forEach((function(n){n in t&&(e.props[n]=t[n])}));var n=this._key;this._key=this._getKey();var r=le(this._key,this.props.characterSet),i=ae.get(this._key);if(i&&0===r.length)this._key!==n&&this._updateTexture(i);else{var o=this._generateFontAtlas(this._key,r,i);this._updateTexture(o),ae.set(this._key,o)}}},{key:"_updateTexture",value:function(e){var t,n=e.data,r=e.width,i=e.height;this._texture.width===r&&this._texture.height===i||this._texture.resize({width:r,height:i}),this._texture.setImageData({data:n,width:r,height:i,parameters:(t={},Object(c.a)(t,10242,33071),Object(c.a)(t,10243,33071),t)}),this._texture.generateMipmap()}},{key:"_generateFontAtlas",value:function(e,t,n){var r=this.props,i=r.fontFamily,o=r.fontWeight,a=r.fontSize,s=r.buffer,l=r.sdf,u=r.radius,c=r.cutoff,f=n&&n.data;f||((f=document.createElement("canvas")).width=1024);var d=f.getContext("2d");ce(d,i,a,o);var p=function(e){var t=e.characterSet,n=e.getFontWidth,r=e.fontHeight,i=e.buffer,o=e.maxCanvasWidth,a=e.mapping,s=void 0===a?{}:a,l=e.xOffset,u=void 0===l?0:l,c=e.yOffset,f=void 0===c?0:c,d=0,p=u,h=0,g=!0,m=!1,y=void 0;try{for(var v,b=t[Symbol.iterator]();!(g=(v=b.next()).done);g=!0){var _=v.value;if(!s[_]){var A=n(_,h++);p+A+2*i>o&&(p=0,d++),s[_]={x:p+i,y:f+d*(r+2*i)+i,width:A,height:r},p+=A+2*i}}}catch(e){m=!0,y=e}finally{try{g||null==b.return||b.return()}finally{if(m)throw y}}var x,w=r+2*i;return{mapping:s,xOffset:p,yOffset:f+d*w,canvasHeight:(x=f+(d+1)*w,Math.pow(2,Math.ceil(Math.log2(x))))}}(Object.assign({getFontWidth:function(e){return d.measureText(e).width},fontHeight:1.2*a,buffer:s,characterSet:t,maxCanvasWidth:1024},n&&{mapping:n.mapping,xOffset:n.xOffset,yOffset:n.yOffset})),h=p.mapping,g=p.canvasHeight,m=p.xOffset,y=p.yOffset;if(f.height!==g){var v=d.getImageData(0,0,f.width,f.height);f.height=g,d.putImageData(v,0,0)}if(ce(d,i,a,o),l){var b=new Q.a(a,s,u,c,i,o),_=d.getImageData(0,0,b.size,b.size),A=!0,x=!1,w=void 0;try{for(var E,O=t[Symbol.iterator]();!(A=(E=O.next()).done);A=!0){var M=E.value;ue(b.draw(M),_),d.putImageData(_,h[M].x-s,h[M].y-s)}}catch(e){x=!0,w=e}finally{try{A||null==O.return||O.return()}finally{if(x)throw w}}}else{var S=!0,T=!1,C=void 0;try{for(var P,k=t[Symbol.iterator]();!(S=(P=k.next()).done);S=!0){var L=P.value;d.fillText(L,h[L].x,h[L].y+.9*a)}}catch(e){T=!0,C=e}finally{try{S||null==k.return||k.return()}finally{if(T)throw C}}}return{xOffset:m,yOffset:y,mapping:h,data:f,width:f.width,height:f.height}}},{key:"_getKey",value:function(){var e=this.props,t=e.gl,n=e.fontFamily,r=e.fontWeight,i=e.fontSize,o=e.buffer,a=e.sdf,s=e.radius,l=e.cutoff;return a?"".concat(t," ").concat(n," ").concat(r," ").concat(i," ").concat(o," ").concat(s," ").concat(l):"".concat(t," ").concat(n," ").concat(r," ").concat(i," ").concat(o)}},{key:"texture",get:function(){return this._texture}},{key:"mapping",get:function(){var e=ae.get(this._key);return e&&e.mapping}},{key:"scale",get:function(){return 1.2}}]),e}();function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var pe={fontSize:64,buffer:2,sdf:!1,radius:3,cutoff:.25},he={start:1,middle:0,end:-1},ge={top:1,center:0,bottom:-1},me=["fontSize","buffer","sdf","radius","cutoff"],ye={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,backgroundColor:{type:"color",value:null,optional:!0},characterSet:oe,fontFamily:"Monaco, monospace",fontWeight:"normal",lineHeight:1,fontSettings:{},wordBreak:"word-break",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:function(e){return e.text}},getPosition:{type:"accessor",value:function(e){return e.position}},getColor:{type:"accessor",value:[0,0,0,255]},getSize:{type:"accessor",value:32},getAngle:{type:"accessor",value:0},getTextAnchor:{type:"accessor",value:"middle"},getAlignmentBaseline:{type:"accessor",value:"center"},getPixelOffset:{type:"accessor",value:[0,0]}},ve=function(e){function t(){return Object(i.a)(this,t),Object(a.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(o.a)(t,[{key:"initializeState",value:function(){this.state={styleVersion:0,fontAtlasManager:new fe(this.context.gl)}}},{key:"updateState",value:function(e){var t=e.props,n=e.oldProps,r=e.changeFlags,i=this._fontChanged(n,t);i&&this._updateFontAtlas(n,t);var o=i||t.lineHeight!==n.lineHeight||t.wordBreak!==n.wordBreak||t.maxWidth!==n.maxWidth;(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getText))&&this._updateText(),o&&this.setState({styleVersion:this.state.styleVersion+1})}},{key:"finalizeState",value:function(){Object(l.a)(Object(s.a)(t.prototype),"finalizeState",this).call(this),this.state.fontAtlasManager.finalize()}},{key:"getPickingInfo",value:function(e){var t=e.info;return Object.assign(t,{object:t.index>=0?this.props.data[t.index]:null})}},{key:"_updateFontAtlas",value:function(e,t){var n=t.characterSet,r=t.fontSettings,i=t.fontFamily,o=t.fontWeight;this.state.fontAtlasManager.setProps(Object.assign({},pe,r,{characterSet:n,fontFamily:i,fontWeight:o})),this.setNeedsRedraw(!0)}},{key:"_fontChanged",value:function(e,t){if(e.fontFamily!==t.fontFamily||e.characterSet!==t.characterSet||e.fontWeight!==t.fontWeight)return!0;if(e.fontSettings===t.fontSettings)return!1;var n=e.fontSettings||{},r=t.fontSettings||{};return me.some((function(e){return n[e]!==r[e]}))}},{key:"_updateText",value:function(){var e,t=this.props.data,n=t.attributes&&t.attributes.getText,r=this.props.getText,i=t.startIndices;if(n&&i){var o=function(e){var t=e.value,n=e.length,r=e.stride,i=e.offset,o=e.startIndices,a=t.BYTES_PER_ELEMENT,s=r?r/a:1,l=i?i/a:0,u=o[n]||Math.floor((t.length-l-a)/s)+1,c=new Array(n),f=t;if(s>1||l>0){f=new t.constructor(u);for(var d=0;d0,s=[0,0],l=0,u=0,c=0;c<=e.length;c++){var f=e[c],d=void 0;if("\n"!==f&&void 0!==f||(d=e.slice(u,c)),d){var p=a?ne(d,n,r,i).rows:[d],h=!0,g=!1,m=void 0;try{for(var y,v=p[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var b=re(y.value,i),_=b.rowWidth,A=b.rowHeight,x=b.leftOffsets,w=!0,E=!1,O=void 0;try{for(var M,S=x[Symbol.iterator]();!(w=(M=S.next()).done);w=!0){var T=M.value;o[u++]={x:T,y:l+A/2,rowWidth:_}}}catch(e){E=!0,O=e}finally{try{w||null==S.return||S.return()}finally{if(E)throw O}}l+=A*t,s[0]=a?r:Math.max(s[0],_)}}catch(e){g=!0,m=e}finally{try{h||null==v.return||v.return()}finally{if(g)throw m}}}"\n"===f&&(o[u++]={x:0,y:0,rowWidth:0})}return s[1]=l,{characters:o,size:s}}(c,s,o,a,n),d=f.characters,p=Object(X.a)(f.size,2),h=p[0],g=p[1],m=he["function"==typeof l?l(e,t):l],y=ge["function"==typeof u?u(e,t):u],v=new Array(2*c.length),b=0,_=!0,A=!1,x=void 0;try{for(var w,E=d[Symbol.iterator]();!(_=(w=E.next()).done);_=!0){var O=w.value,M=O.rowWidth,S=O.x,T=O.y,C=(1-m)*(h-M)/2;v[b++]=(m-1)*h/2+C+S,v[b++]=(y-1)*g/2+T}}catch(e){A=!0,x=e}finally{try{_||null==E.return||E.return()}finally{if(A)throw x}}return v}},{key:"renderLayers",value:function(){var e=this.state,t=e.startIndices,n=e.numInstances,r=e.getText,i=e.fontAtlasManager,o=i.scale,a=i.texture,s=i.mapping,l=e.styleVersion,u=this.props,c=u.data,f=u._dataDiff,d=u.backgroundColor,p=u.getPosition,h=u.getColor,g=u.getSize,m=u.getAngle,y=u.getPixelOffset,v=u.billboard,b=u.sdf,_=u.sizeScale,A=u.sizeUnits,x=u.sizeMinPixels,w=u.sizeMaxPixels,E=u.transitions,O=u.updateTriggers,M=this.getIconOffsets.bind(this);return new(this.getSubLayerClass("characters",$))({sdf:b,iconAtlas:a,iconMapping:s,backgroundColor:d,getPosition:p,getColor:h,getSize:g,getAngle:m,getPixelOffset:y,billboard:v,sizeScale:_*o,sizeUnits:A,sizeMinPixels:x*o,sizeMaxPixels:w*o,transitions:E&&{getPosition:E.getPosition,getAngle:E.getAngle,getColor:E.getColor,getSize:E.getSize,getPixelOffset:O.getPixelOffset}},this.getSubLayerProps({id:"characters",updateTriggers:{getPosition:O.getPosition,getAngle:O.getAngle,getColor:O.getColor,getSize:O.getSize,getPixelOffset:O.getPixelOffset,getIconOffsets:{getText:O.getText,getTextAnchor:O.getTextAnchor,getAlignmentBaseline:O.getAlignmentBaseline,styleVersion:l}}}),{data:c,_dataDiff:f,startIndices:t,numInstances:n,getIconOffsets:M,getIcon:r})}}]),t}(Z.a);ve.layerName="TextLayer",ve.defaultProps=ye;var be=n(408)},,function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(57),i={};function o(e){i=e}function a(e){var t;r.a.level>0&&i[e]&&(t=i[e]).call.apply(t,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},i={COMPONENT:Symbol.for("component"),ASYNC_DEFAULTS:Symbol.for("asyncPropDefaults"),ASYNC_ORIGINAL:Symbol.for("asyncPropOriginal"),ASYNC_RESOLVED:Symbol.for("asyncPropResolved")}},function(e,t,n){"use strict";var r=n(624),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(634);function i(e){var t,n;function i(t,n){try{var a=e[t](n),s=a.value,l=s instanceof r.a;Promise.resolve(l?s.wrapped:s).then((function(e){l?i("return"===t?"return":"next",e):o(a.done?"return":"normal",e)}),(function(e){i("throw",e)}))}catch(e){o("throw",e)}}function o(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise((function(o,a){var s={key:e,arg:r,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,i(e,r))}))},"function"!=typeof e.return&&(this.return=void 0)}function o(e){return function(){return new i(e.apply(this,arguments))}}i.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(e){return this._invoke("next",e)},i.prototype.throw=function(e){return this._invoke("throw",e)},i.prototype.return=function(e){return this._invoke("return",e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(136),i=n(213),o=n(172),a=n(25),s=n(30),l=n(492);const u={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},c={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:u},f={removedProps:u};class d extends r.a{get[Symbol.toStringTag](){return"Buffer"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),this.target=t.target||(this.gl.webgl2?36662:34962),this.initialize(t),Object.seal(this)}getElementCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerElement(e))}getVertexCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerVertex(e))}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(e)&&(e={data:e}),Number.isFinite(e)&&(e={byteLength:e}),e=Object(l.a)("Buffer",e,c),this.usage=e.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},e,e.accessor)),e.data?this._setData(e.data,e.offset,e.byteLength):this._setByteLength(e.byteLength||0),this}setProps(e){return"accessor"in(e=Object(l.a)("Buffer",e,f))&&this.setAccessor(e.accessor),this}setAccessor(e){return delete(e=Object.assign({},e)).buffer,this.accessor=new i.a(e),this}reallocate(e){return e>this.byteLength?(this._setByteLength(e),!0):(this.bytesUsed=e,!1)}setData(e){return this.initialize(e)}subData(e){ArrayBuffer.isView(e)&&(e={data:e});const{data:t,offset:n=0,srcOffset:r=0}=e,i=e.byteLength||e.length;Object(s.a)(t);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?(Object(a.a)(this.gl),this.gl.bufferSubData(this.target,n,t,r,i)):this.gl.bufferSubData(o,n,t),this.gl.bindBuffer(o,null),this.debugData=null,this._inferType(t),this}copyData(e){let{sourceBuffer:t,readOffset:n=0,writeOffset:r=0,size:i}=e;const{gl:o}=this;return Object(a.a)(o),o.bindBuffer(36662,t.handle),o.bindBuffer(36663,this.handle),o.copyBufferSubData(36662,36663,n,r,i),o.bindBuffer(36662,null),o.bindBuffer(36663,null),this.debugData=null,this}getData(){let{dstData:e=null,srcByteOffset:t=0,dstOffset:n=0,length:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this.gl);const i=Object(o.c)(this.accessor.type||5126,{clamped:!1}),l=this._getAvailableElementCount(t),u=n;let c,f;e?(f=e.length,c=f-u):(c=Math.min(l,r||l),f=u+c);const d=Math.min(l,c);return r=r||d,Object(s.a)(r<=d),e=e||new i(f),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,t,e,n,r),this.gl.bindBuffer(36662,null),e}bind(){let{target:e=this.target,index:t=this.accessor&&this.accessor.index,offset:n=0,size:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===e||35982===e?void 0!==r?this.gl.bindBufferRange(e,t,this.handle,n,r):(Object(s.a)(0===n),this.gl.bindBufferBase(e,t,this.handle)):this.gl.bindBuffer(e,this.handle),this}unbind(){let{target:e=this.target,index:t=this.accessor&&this.accessor.index}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===e||35982===e?this.gl.bindBufferBase(e,t,null):this.gl.bindBuffer(e,null),this}getDebugData(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}invalidateDebugData(){this.debugData=null}_setData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength+t;Object(s.a)(ArrayBuffer.isView(e)),this._trackDeallocatedMemory();const r=this._getTarget();this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,this.usage),this.gl.bufferSubData(r,t,e),this.gl.bindBuffer(r,null),this.debugData=e.slice(0,10),this.bytesUsed=n,this._trackAllocatedMemory(n);const a=Object(o.b)(e);return Object(s.a)(a),this.setAccessor(new i.a(this.accessor,{type:a})),this}_setByteLength(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(s.a)(e>=0),this._trackDeallocatedMemory();let n=e;0===e&&(n=new Float32Array(0));const r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,t),this.gl.bindBuffer(r,null),this.usage=t,this.debugData=null,this.bytesUsed=e,this._trackAllocatedMemory(e),this}_getTarget(){return this.gl.webgl2?36663:this.target}_getAvailableElementCount(e){const t=e/Object(o.c)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-t}_inferType(e){this.accessor.type||this.setAccessor(new i.a(this.accessor,{type:Object(o.b)(e)}))}_createHandle(){return this.gl.createBuffer()}_deleteHandle(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}_getParameter(e){this.gl.bindBuffer(this.target,this.handle);const t=this.gl.getBufferParameter(this.target,e);return this.gl.bindBuffer(this.target,null),t}get type(){return a.k.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return a.k.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(e){return a.k.deprecated("setByteLength","reallocate")(),this.reallocate(e)}updateAccessor(e){return a.k.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.a(this.accessor,e),this}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(305);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){var r=n(68),i=n(865),o=n(228),a=Object.defineProperty;t.f=n(104)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:n(1745)})},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultMemoize",(function(){return i})),n.d(t,"defaultEqualityCheck",(function(){return r})),n.d(t,"createSelectorCreator",(function(){return a})),n.d(t,"createSelector",(function(){return s})),n.d(t,"createStructuredSelector",(function(){return l}));var r=function(e,t){return e===t};function i(e,t){var n,i,o="object"==typeof t?t:{equalityCheck:t},a=o.equalityCheck,s=void 0===a?r:a,l=o.maxSize,u=void 0===l?1:l,c=o.resultEqualityCheck,f=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return"NOT_FOUND"}return{get:r,put:function(t,i){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(u,f);function p(){var t=d.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),c){var n=d.getEntries(),r=n.find((function(e){return c(e.value,t)}));r&&(t=r.value)}d.put(arguments,t)}return t}return p.clearCache=function(){return d.clear()},p}function o(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<+~=|^:(),"'`\s])/g,E="undefined"!=typeof CSS&&CSS.escape,O=function(e){return E?E(e):e.replace(w,"\\$1")},M=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),S=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(Object(p.a)(Object(p.a)(i)),s),i.selectorText="."+O(i.id)),i}Object(d.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=b(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return x(this.selectorText,this.style,n)},Object(f.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(M),T={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new S(e,t,n)}},C={indent:1,children:!0},P=/@([\w-]+)/,k=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var i=e.match(P);for(var o in this.at=i?i[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new ee(Object(r.a)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=C);var t=_(e).linebreak;if(null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),L=/@media|@supports\s+/,R={onCreateRule:function(e,t,n){return L.test(e)?new k(e,t,n):null}},D={indent:1,children:!0},j=/@keyframes\s+([\w-]+)/,I=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=e.match(j);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,s=n.generateId;for(var l in this.id=!1===o?this.name:O(s(this,a)),this.rules=new ee(Object(r.a)({},n,{parent:this})),t)this.rules.add(l,t[l],Object(r.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=D);var t=_(e).linebreak;if(null==e.indent&&(e.indent=D.indent),null==e.children&&(e.children=D.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),N=/@keyframes\s+/,F=/\$([\w-]+)/g,z=function(e,t){return"string"==typeof e?e.replace(F,(function(e,n){return n in t?t[n]:e})):e},B=function(e,t,n){var r=e[t],i=z(r,n);i!==r&&(e[t]=i)},U={onCreateRule:function(e,t,n){return"string"==typeof e&&N.test(e)?new I(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&B(e,"animation-name",n.keyframes),"animation"in e&&B(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return z(e,r.keyframes);default:return e}}},V=function(e){function t(){return e.apply(this,arguments)||this}return Object(d.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return x(this.key,this.style,n)},t}(M),H={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new V(e,t,n):null}},W=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=_(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(h.a)(t,["attached"]),i=_(r).linebreak,o="",a=0;a0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=pe(),n=0;nn?n:t},ve=function(){function e(e){this.getPropertyValue=ue,this.setProperty=ce,this.removeProperty=fe,this.setSelector=de,this.hasInsertedRules=!1,this.cssRules=[],e&&re.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=ge();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=he(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else pe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var i=Object(r.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}var Ee={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Oe=n(2461),Me="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Se=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Te=Date.now(),Ce="fnValues"+Te,Pe="fnStyle"+ ++Te,ke=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=y(e,{},n);return r[Pe]=t,r},onProcessStyle:function(e,t){if(Ce in t||Pe in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Ce]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Pe];o&&(i.style=o(e)||{});var a=i[Ce];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},Le="@global",Re=function(){function e(e,t,n){for(var i in this.type="global",this.at=Le,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new ee(Object(r.a)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),De=function(){function e(e,t,n){this.type="global",this.at=Le,this.isProcessed=!1,this.key=e,this.options=n;var i=e.substr("@global ".length);this.rule=n.jss.createRule(i,t,Object(r.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),je=/\s*,\s*/g;function Ie(e,t){for(var n=e.split(je),r="",i=0;i-1){var i=Nt[e];if(!Array.isArray(i))return ft+At(i)in t&&dt+i;if(!r)return!1;for(var o=0;ot?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,u=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Se.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Me]&&""===a?"".concat(o,"-").concat(u()):o}return"".concat(s).concat(i).concat(u())}}(),jss:nn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},on=a.a.createContext(rn);var an=-1e9;function sn(){return an+=1}n(36);var ln=n(2519);function un(e){var t="function"==typeof e;return{create:function(n,i){var o;try{o=t?e(n):e}catch(e){throw e}if(!i||!n.overrides||!n.overrides[i])return o;var a=n.overrides[i],s=Object(r.a)({},o);return Object.keys(a).forEach((function(e){s[e]=Object(ln.a)(s[e],a[e])})),s},options:{}}}var cn={};function fn(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=we({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function dn(e,t){var n=e.state,i=e.theme,o=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!o.disableGeneration){var l=Ee.get(o.sheetsManager,a,i);l||(l={refs:0,staticSheet:null,dynamicStyles:null},Ee.set(o.sheetsManager,a,i,l));var u=Object(r.a)({},a.options,o,{theme:i,flip:"boolean"==typeof o.flip?o.flip:"rtl"===i.direction});u.generateId=u.serverGenerateClassName||u.generateClassName;var c=o.sheetsRegistry;if(0===l.refs){var f;o.sheetsCache&&(f=Ee.get(o.sheetsCache,a,i));var d=a.create(i,s);f||((f=o.jss.createStyleSheet(d,Object(r.a)({link:!1},u))).attach(),o.sheetsCache&&Ee.set(o.sheetsCache,a,i,f)),c&&c.add(f),l.staticSheet=f,l.dynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],o=typeof i;if("function"===o)n||(n={}),n[r]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var a=e(i);a&&(n||(n={}),n[r]=a)}}return n}(d)}if(l.dynamicStyles){var p=o.jss.createStyleSheet(l.dynamicStyles,Object(r.a)({link:!0},u));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=we({baseClasses:l.staticSheet.classes,newClasses:p.classes}),c&&c.add(p)}else n.classes=l.staticSheet.classes;l.refs+=1}}function pn(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function hn(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Ee.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Ee.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function gn(e,t){var n,r=a.a.useRef([]),i=a.a.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),a.a.useEffect((function(){return function(){n&&n()}}),[i])}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,o=t.classNamePrefix,s=t.Component,l=t.defaultTheme,u=void 0===l?cn:l,c=Object(i.a)(t,["name","classNamePrefix","Component","defaultTheme"]),f=un(e),d=n||o||"makeStyles";f.options={index:sn(),name:n,meta:d,classNamePrefix:d};var p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(Oe.a)()||u,i=Object(r.a)({},a.a.useContext(on),c),o=a.a.useRef(),l=a.a.useRef();gn((function(){var r={name:n,state:{},stylesCreator:f,stylesOptions:i,theme:t};return dn(r,e),l.current=!1,o.current=r,function(){hn(r)}}),[t,f]),a.a.useEffect((function(){l.current&&pn(o.current,e),l.current=!0}));var d=fn(o.current,e.classes,s);return d};return p}var yn=n(2520),vn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=t.defaultTheme,s=t.withTheme,u=void 0!==s&&s,c=t.name,f=Object(i.a)(t,["defaultTheme","withTheme","name"]);var d=c,p=mn(e,Object(r.a)({defaultTheme:o,Component:n,name:c||n.displayName,classNamePrefix:d},f)),h=a.a.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,f=Object(i.a)(e,["classes","innerRef"]),d=p(Object(r.a)({},n.defaultProps,e)),h=f;return("string"==typeof c||u)&&(s=Object(Oe.a)()||o,c&&(h=Object(yn.a)({theme:s,name:c,props:f})),u&&!h.theme&&(h.theme=s)),a.a.createElement(n,Object(r.a)({ref:l||t,classes:d},h))}));return l()(h,n),h}},bn=n(642);t.a=function(e,t){return vn(e,Object(r.a)({defaultTheme:bn.a},t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return m})),n.d(t,"c",(function(){return y})),n.d(t,"f",(function(){return v}));var r=n(269),i=n(33);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(e,t){var n=e%t;return n<0?t+n:n}function s(e){var t=e.viewMatrix,n=e.viewMatrixInverse;return{eye:[n[12],n[13],n[14]],direction:[-t[2],-t[6],-t[10]],up:[t[1],t[5],t[9]],right:[t[0],t[4],t[8]]}}var l,u=new i.c,c=new i.c,f=new i.c,d=new i.c,p=new i.c,h=new i.c,g=new i.c;function m(e){var t=e.aspect,n=e.near,r=e.far,o=e.fovyRadians,a=e.position,s=e.direction,l=e.up,m=e.right;c.copy(s);var y=1/c.len();c.normalize(),u.copy(a),f.copy(l);var v=1/f.len();f.normalize(),d.copy(m).normalize();var b=2*Math.tan(o/2)*n*v,_=b*t;p.copy(c).scale(n*y).add(u),h.copy(c).scale(r*y).add(u);var A=c.clone().negate(),x=A.dot(p),w={near:{distance:x,normal:A},far:{distance:c.dot(h),normal:c.clone()}};return g.copy(d).scale(.5*_).add(p).subtract(u).normalize(),A=new i.c(g).cross(f),x=u.dot(A),w.right={normal:A,distance:x},g.copy(d).scale(.5*-_).add(p).subtract(u).normalize(),A=new i.c(f).cross(g),x=u.dot(A),w.left={normal:A,distance:x},g.copy(f).scale(.5*b).add(p).subtract(u).normalize(),A=new i.c(d).cross(g),x=u.dot(A),w.top={normal:A,distance:x},g.copy(f).scale(.5*-b).add(p).subtract(u).normalize(),A=new i.c(g).cross(d),x=u.dot(A),w.bottom={normal:A,distance:x},w}function y(e){return e-Math.fround(e)}function v(e,t){var n=t.size,i=void 0===n?1:n,o=t.startIndex,a=void 0===o?0:o,s=t.endIndex;Number.isFinite(s)||(s=e.length);var u=(s-a)/i;l=r.a.allocate(l,u,{type:Float32Array,size:2*i});for(var c=a,f=0;c=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function A(e,t){void 0===t&&(t="kilometers");var n=i[t];if(!n)throw new Error(t+" units is invalid");return e*n}function x(e,t){void 0===t&&(t="kilometers");var n=i[t];if(!n)throw new Error(t+" units is invalid");return e/n}function w(e,t){return O(x(e,t))}function E(e){var t=e%360;return t<0&&(t+=360),t}function O(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function S(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return A(x(e,t),n)}function T(e,t,n){if(void 0===t&&(t="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var r=a[t];if(!r)throw new Error("invalid original units");var i=a[n];if(!i)throw new Error("invalid final units");return e/r*i}function C(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function P(e){return!!e&&e.constructor===Object}function k(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!C(e))throw new Error("bbox must only contain numbers")}))}function L(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},function(e,t,n){var r=n(229);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r=n(349),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var s=l(t),g=l(n),m=0;m0){for(t=1,n=1;t1&&"}"===e)},$=ge("\n",!1),J=ye("argNameOrNumber"),Q=ye("argNumber"),ee=ge("0",!1),te=/^[1-9]/,ne=me([["1","9"]],!1,!1),re=/^[0-9]/,ie=me([["0","9"]],!1,!1),oe=ye("argName"),ae=0,se=0,le=[{line:1,column:1}],ue=0,ce=[],fe=0;if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function de(){return e.substring(se,ae)}function pe(){return be(se,ae)}function he(e,t){throw function(e,t){return new v(e,[],"",t)}(e,t=void 0!==t?t:be(se,ae))}function ge(e,t){return{type:"literal",text:e,ignoreCase:t}}function me(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function ye(e){return{type:"other",description:e}}function ve(t){var n,r=le[t];if(r)return r;for(n=t-1;!le[n];)n--;for(r={line:(r=le[n]).line,column:r.column};nue&&(ue=ae,ce=[]),ce.push(e))}function Ae(e,t,n){return new v(v.buildMessage(e,t),e,t,n)}function xe(){return we()}function we(){var e,t;for(e=[],t=Ee();t!==i;)e.push(t),t=Ee();return e}function Ee(){var t;return(t=function(){var e,t;e=ae,(t=Oe())!==i&&(se=e,n=t,t=y({type:r.literal,value:n},qe()));var n;return e=t}())===i&&(t=function(){var t,n,o,a;fe++,t=ae,123===e.charCodeAt(ae)?(n="{",ae++):(n=i,0===fe&&_e(u));n!==i&&je()!==i&&(o=Be())!==i&&je()!==i?(125===e.charCodeAt(ae)?(a="}",ae++):(a=i,0===fe&&_e(c)),a!==i?(se=t,n=function(e){return y({type:r.argument,value:e},qe())}(o),t=n):(ae=t,t=i)):(ae=t,t=i);fe--,t===i&&(n=i,0===fe&&_e(l));return t}())===i&&(t=function(){var t;(t=function(){var t,n,r,o,a,s,l,f,d;t=ae,123===e.charCodeAt(ae)?(n="{",ae++):(n=i,0===fe&&_e(u));n!==i&&je()!==i&&(r=Be())!==i&&je()!==i?(44===e.charCodeAt(ae)?(o=",",ae++):(o=i,0===fe&&_e(x)),o!==i&&je()!==i?("number"===e.substr(ae,6)?(a="number",ae+=6):(a=i,0===fe&&_e(w)),a!==i&&je()!==i?(s=ae,44===e.charCodeAt(ae)?(l=",",ae++):(l=i,0===fe&&_e(x)),l!==i&&(f=je())!==i&&(d=function(){var t,n,r;t=ae,"::"===e.substr(ae,2)?(n="::",ae+=2):(n=i,0===fe&&_e(_));n!==i&&(r=function(){var e,t,n;if(e=ae,t=[],(n=Te())!==i)for(;n!==i;)t.push(n),n=Te();else t=i;t!==i&&(se=e,t=y({type:0,tokens:t},qe()));return e=t}())!==i?(se=t,t=n=r):(ae=t,t=i);t===i&&(t=ae,se=ae,He.push("numberArgStyle"),(n=(n=!0)?void 0:i)!==i&&(r=Oe())!==i?(se=t,n=A(r),t=n):(ae=t,t=i));return t}())!==i?s=l=[l,f,d]:(ae=s,s=i),s===i&&(s=null),s!==i&&(l=je())!==i?(125===e.charCodeAt(ae)?(f="}",ae++):(f=i,0===fe&&_e(c)),f!==i?(se=t,n=E(r,a,s),t=n):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i);return t}())===i&&(t=function(){var t,n,r,o,a,s,l,f,d;t=ae,123===e.charCodeAt(ae)?(n="{",ae++):(n=i,0===fe&&_e(u));n!==i&&je()!==i&&(r=Be())!==i&&je()!==i?(44===e.charCodeAt(ae)?(o=",",ae++):(o=i,0===fe&&_e(x)),o!==i&&je()!==i?("date"===e.substr(ae,4)?(a="date",ae+=4):(a=i,0===fe&&_e(L)),a===i&&("time"===e.substr(ae,4)?(a="time",ae+=4):(a=i,0===fe&&_e(R))),a!==i&&je()!==i?(s=ae,44===e.charCodeAt(ae)?(l=",",ae++):(l=i,0===fe&&_e(x)),l!==i&&(f=je())!==i&&(d=function(){var t,n,r;t=ae,"::"===e.substr(ae,2)?(n="::",ae+=2):(n=i,0===fe&&_e(_));n!==i&&(r=function(){var t,n,r,o;t=ae,n=ae,r=[],(o=Ce())===i&&(o=Pe());if(o!==i)for(;o!==i;)r.push(o),(o=Ce())===i&&(o=Pe());else r=i;n=r!==i?e.substring(n,ae):r;n!==i&&(se=t,n=y({type:1,pattern:n},qe()));return t=n}())!==i?(se=t,t=n=r):(ae=t,t=i);t===i&&(t=ae,se=ae,He.push("dateOrTimeArgStyle"),(n=(n=!0)?void 0:i)!==i&&(r=Oe())!==i?(se=t,n=A(r),t=n):(ae=t,t=i));return t}())!==i?s=l=[l,f,d]:(ae=s,s=i),s===i&&(s=null),s!==i&&(l=je())!==i?(125===e.charCodeAt(ae)?(f="}",ae++):(f=i,0===fe&&_e(c)),f!==i?(se=t,n=E(r,a,s),t=n):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i);return t}());return t}())===i&&(t=function(){var t,n,o,a,s,l,f,d,p,h,g;t=ae,123===e.charCodeAt(ae)?(n="{",ae++):(n=i,0===fe&&_e(u));if(n!==i)if(je()!==i)if((o=Be())!==i)if(je()!==i)if(44===e.charCodeAt(ae)?(a=",",ae++):(a=i,0===fe&&_e(x)),a!==i)if(je()!==i)if("plural"===e.substr(ae,6)?(s="plural",ae+=6):(s=i,0===fe&&_e(D)),s===i&&("selectordinal"===e.substr(ae,13)?(s="selectordinal",ae+=13):(s=i,0===fe&&_e(j))),s!==i)if(je()!==i)if(44===e.charCodeAt(ae)?(l=",",ae++):(l=i,0===fe&&_e(x)),l!==i)if(je()!==i)if(f=ae,"offset:"===e.substr(ae,7)?(d="offset:",ae+=7):(d=i,0===fe&&_e(I)),d!==i&&(p=je())!==i&&(h=Ie())!==i?f=d=[d,p,h]:(ae=f,f=i),f===i&&(f=null),f!==i)if((d=je())!==i){if(p=[],(h=Le())!==i)for(;h!==i;)p.push(h),h=Le();else p=i;p!==i&&(h=je())!==i?(125===e.charCodeAt(ae)?(g="}",ae++):(g=i,0===fe&&_e(c)),g!==i?(se=t,n=function(e,t,n,i){return y({type:r.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:n?n[2]:0,options:i.reduce((function(e,t){var n=t.id,r=t.value,i=t.location;return n in e&&he('Duplicate option "'+n+'" in plural element: "'+de()+'"',pe()),e[n]={value:r,location:i},e}),{})},qe())}(o,s,f,p),t=n):(ae=t,t=i)):(ae=t,t=i)}else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;return t}())===i&&(t=function(){var t,n,o,a,s,l,f,d,p;t=ae,123===e.charCodeAt(ae)?(n="{",ae++):(n=i,0===fe&&_e(u));if(n!==i)if(je()!==i)if((o=Be())!==i)if(je()!==i)if(44===e.charCodeAt(ae)?(a=",",ae++):(a=i,0===fe&&_e(x)),a!==i)if(je()!==i)if("select"===e.substr(ae,6)?(s="select",ae+=6):(s=i,0===fe&&_e(N)),s!==i)if(je()!==i)if(44===e.charCodeAt(ae)?(l=",",ae++):(l=i,0===fe&&_e(x)),l!==i)if(je()!==i){if(f=[],(d=ke())!==i)for(;d!==i;)f.push(d),d=ke();else f=i;f!==i&&(d=je())!==i?(125===e.charCodeAt(ae)?(p="}",ae++):(p=i,0===fe&&_e(c)),p!==i?(se=t,n=function(e,t){return y({type:r.select,value:e,options:t.reduce((function(e,t){var n=t.id,r=t.value,i=t.location;return n in e&&he('Duplicate option "'+n+'" in select element: "'+de()+'"',pe()),e[n]={value:r,location:i},e}),{})},qe())}(o,f),t=n):(ae=t,t=i)):(ae=t,t=i)}else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;else ae=t,t=i;return t}())===i&&(t=function(){var t,n;t=ae,35===e.charCodeAt(ae)?(n="#",ae++):(n=i,0===fe&&_e(s));n!==i&&(se=t,n=y({type:r.pound},qe()));return t=n}()),t}function Oe(){var e,t,n;if(e=ae,t=[],(n=Ne())===i&&(n=Fe())===i&&(n=ze()),n!==i)for(;n!==i;)t.push(n),(n=Ne())===i&&(n=Fe())===i&&(n=ze());else t=i;return t!==i&&(se=e,t=t.join("")),e=t}function Me(){var t,n,r,o,a;if(fe++,t=ae,n=[],r=ae,o=ae,fe++,(a=Re())===i&&(d.test(e.charAt(ae))?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(p))),fe--,a===i?o=void 0:(ae=o,o=i),o!==i?(e.length>ae?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(h)),a!==i?r=o=[o,a]:(ae=r,r=i)):(ae=r,r=i),r!==i)for(;r!==i;)n.push(r),r=ae,o=ae,fe++,(a=Re())===i&&(d.test(e.charAt(ae))?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(p))),fe--,a===i?o=void 0:(ae=o,o=i),o!==i?(e.length>ae?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(h)),a!==i?r=o=[o,a]:(ae=r,r=i)):(ae=r,r=i);else n=i;return t=n!==i?e.substring(t,ae):n,fe--,t===i&&(n=i,0===fe&&_e(f)),t}function Se(){var t,n,r;return fe++,t=ae,47===e.charCodeAt(ae)?(n="/",ae++):(n=i,0===fe&&_e(m)),n!==i&&(r=Me())!==i?(se=t,t=n=r):(ae=t,t=i),fe--,t===i&&(n=i,0===fe&&_e(g)),t}function Te(){var e,t,n,r;if(fe++,e=ae,je()!==i)if((t=Me())!==i){for(n=[],r=Se();r!==i;)n.push(r),r=Se();n!==i?(se=e,e=function(e,t){return{stem:e,options:t}}(t,n)):(ae=e,e=i)}else ae=e,e=i;else ae=e,e=i;return fe--,e===i&&(i,0===fe&&_e(b)),e}function Ce(){var t,n,r,o;if(t=ae,39===e.charCodeAt(ae)?(n="'",ae++):(n=i,0===fe&&_e(O)),n!==i){if(r=[],(o=Ne())===i&&(M.test(e.charAt(ae))?(o=e.charAt(ae),ae++):(o=i,0===fe&&_e(S))),o!==i)for(;o!==i;)r.push(o),(o=Ne())===i&&(M.test(e.charAt(ae))?(o=e.charAt(ae),ae++):(o=i,0===fe&&_e(S)));else r=i;r!==i?(39===e.charCodeAt(ae)?(o="'",ae++):(o=i,0===fe&&_e(O)),o!==i?t=n=[n,r,o]:(ae=t,t=i)):(ae=t,t=i)}else ae=t,t=i;if(t===i)if(t=[],(n=Ne())===i&&(T.test(e.charAt(ae))?(n=e.charAt(ae),ae++):(n=i,0===fe&&_e(C))),n!==i)for(;n!==i;)t.push(n),(n=Ne())===i&&(T.test(e.charAt(ae))?(n=e.charAt(ae),ae++):(n=i,0===fe&&_e(C)));else t=i;return t}function Pe(){var t,n;if(t=[],P.test(e.charAt(ae))?(n=e.charAt(ae),ae++):(n=i,0===fe&&_e(k)),n!==i)for(;n!==i;)t.push(n),P.test(e.charAt(ae))?(n=e.charAt(ae),ae++):(n=i,0===fe&&_e(k));else t=i;return t}function ke(){var t,n,r,o,a;return t=ae,je()!==i&&(n=Ve())!==i&&je()!==i?(123===e.charCodeAt(ae)?(r="{",ae++):(r=i,0===fe&&_e(u)),r!==i?(se=ae,He.push("select"),(!0?void 0:i)!==i&&(o=we())!==i?(125===e.charCodeAt(ae)?(a="}",ae++):(a=i,0===fe&&_e(c)),a!==i?(se=t,t=function(e,t){return He.pop(),y({id:e,value:t},qe())}(n,o)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i),t}function Le(){var t,n,r,o,a;return t=ae,je()!==i&&(n=function(){var t,n,r,o;return t=ae,n=ae,61===e.charCodeAt(ae)?(r="=",ae++):(r=i,0===fe&&_e(F)),r!==i&&(o=Ie())!==i?n=r=[r,o]:(ae=n,n=i),(t=n!==i?e.substring(t,ae):n)===i&&(t=Ve()),t}())!==i&&je()!==i?(123===e.charCodeAt(ae)?(r="{",ae++):(r=i,0===fe&&_e(u)),r!==i?(se=ae,He.push("plural"),(!0?void 0:i)!==i&&(o=we())!==i?(125===e.charCodeAt(ae)?(a="}",ae++):(a=i,0===fe&&_e(c)),a!==i?(se=t,t=function(e,t){return He.pop(),y({id:e,value:t},qe())}(n,o)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i)):(ae=t,t=i),t}function Re(){var t;return fe++,B.test(e.charAt(ae))?(t=e.charAt(ae),ae++):(t=i,0===fe&&_e(U)),fe--,t===i&&(i,0===fe&&_e(z)),t}function De(){var t;return fe++,H.test(e.charAt(ae))?(t=e.charAt(ae),ae++):(t=i,0===fe&&_e(W)),fe--,t===i&&(i,0===fe&&_e(V)),t}function je(){var t,n,r;for(fe++,t=ae,n=[],r=Re();r!==i;)n.push(r),r=Re();return t=n!==i?e.substring(t,ae):n,fe--,t===i&&(n=i,0===fe&&_e(q)),t}function Ie(){var t,n,r,o,a;return fe++,t=ae,45===e.charCodeAt(ae)?(n="-",ae++):(n=i,0===fe&&_e(G)),n===i&&(n=null),n!==i&&(r=Ue())!==i?(se=t,o=n,t=n=(a=r)?o?-a:a:0):(ae=t,t=i),fe--,t===i&&(n=i,0===fe&&_e(Y)),t}function Ne(){var t,n;return fe++,t=ae,"''"===e.substr(ae,2)?(n="''",ae+=2):(n=i,0===fe&&_e(Z)),n!==i&&(se=t,n="'"),fe--,(t=n)===i&&(n=i,0===fe&&_e(X)),t}function Fe(){var t,n,r,o,a,s;if(t=ae,39===e.charCodeAt(ae)?(n="'",ae++):(n=i,0===fe&&_e(O)),n!==i)if((r=function(){var t,n,r,o;t=ae,n=ae,e.length>ae?(r=e.charAt(ae),ae++):(r=i,0===fe&&_e(h));r!==i?(se=ae,(o=(o="{"===(a=r)||"}"===a||We()&&"#"===a)?void 0:i)!==i?n=r=[r,o]:(ae=n,n=i)):(ae=n,n=i);var a;t=n!==i?e.substring(t,ae):n;return t}())!==i){for(o=ae,a=[],"''"===e.substr(ae,2)?(s="''",ae+=2):(s=i,0===fe&&_e(Z)),s===i&&(M.test(e.charAt(ae))?(s=e.charAt(ae),ae++):(s=i,0===fe&&_e(S)));s!==i;)a.push(s),"''"===e.substr(ae,2)?(s="''",ae+=2):(s=i,0===fe&&_e(Z)),s===i&&(M.test(e.charAt(ae))?(s=e.charAt(ae),ae++):(s=i,0===fe&&_e(S)));(o=a!==i?e.substring(o,ae):a)!==i?(39===e.charCodeAt(ae)?(a="'",ae++):(a=i,0===fe&&_e(O)),a===i&&(a=null),a!==i?(se=t,t=n=r+o.replace("''","'")):(ae=t,t=i)):(ae=t,t=i)}else ae=t,t=i;else ae=t,t=i;return t}function ze(){var t,n,r,o;return t=ae,n=ae,e.length>ae?(r=e.charAt(ae),ae++):(r=i,0===fe&&_e(h)),r!==i?(se=ae,(o=(o=K(r))?void 0:i)!==i?n=r=[r,o]:(ae=n,n=i)):(ae=n,n=i),n===i&&(10===e.charCodeAt(ae)?(n="\n",ae++):(n=i,0===fe&&_e($))),t=n!==i?e.substring(t,ae):n}function Be(){var t,n;return fe++,t=ae,(n=Ue())===i&&(n=Ve()),t=n!==i?e.substring(t,ae):n,fe--,t===i&&(n=i,0===fe&&_e(J)),t}function Ue(){var t,n,r,o,a;if(fe++,t=ae,48===e.charCodeAt(ae)?(n="0",ae++):(n=i,0===fe&&_e(ee)),n!==i&&(se=t,n=0),(t=n)===i){if(t=ae,n=ae,te.test(e.charAt(ae))?(r=e.charAt(ae),ae++):(r=i,0===fe&&_e(ne)),r!==i){for(o=[],re.test(e.charAt(ae))?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(ie));a!==i;)o.push(a),re.test(e.charAt(ae))?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(ie));o!==i?n=r=[r,o]:(ae=n,n=i)}else ae=n,n=i;n!==i&&(se=t,n=parseInt(n.join(""),10)),t=n}return fe--,t===i&&(n=i,0===fe&&_e(Q)),t}function Ve(){var t,n,r,o,a;if(fe++,t=ae,n=[],r=ae,o=ae,fe++,(a=Re())===i&&(a=De()),fe--,a===i?o=void 0:(ae=o,o=i),o!==i?(e.length>ae?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(h)),a!==i?r=o=[o,a]:(ae=r,r=i)):(ae=r,r=i),r!==i)for(;r!==i;)n.push(r),r=ae,o=ae,fe++,(a=Re())===i&&(a=De()),fe--,a===i?o=void 0:(ae=o,o=i),o!==i?(e.length>ae?(a=e.charAt(ae),ae++):(a=i,0===fe&&_e(h)),a!==i?r=o=[o,a]:(ae=r,r=i)):(ae=r,r=i);else n=i;return t=n!==i?e.substring(t,ae):n,fe--,t===i&&(n=i,0===fe&&_e(oe)),t}var He=["root"];function We(){return"plural"===He[He.length-1]}function qe(){return t&&t.captureLocation?{location:pe()}:{}}if((n=a())!==i&&ae===e.length)return n;throw n!==i&&ae1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(C,(function(e,n,r){return"."===e?t.maximumFractionDigits=0:"+"===r?t.minimumFractionDigits=r.length:"#"===n[0]?t.maximumFractionDigits=n.length:(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length+("string"==typeof r?r.length:0)),""})),i.options.length&&(t=M(M({},t),k(i.options[0])))}else if(P.test(i.stem))t=M(M({},t),k(i.stem));else{var o=L(i.stem);o&&(t=M(M({},t),o))}}return t}var j,I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(){for(var e=0,t=0,n=arguments.length;t(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/,W=Date.now()+"@@",q=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function Y(e,t,n,r,i,o){var a=z(e,t,n,r,i,void 0,o),s={},l=a.reduce((function(e,t){if(0===t.type)return e+t.value;var n=Date.now()+"_"+ ++U;return s[n]=t.value,e+"@@"+n+"@@"}),"");if(!H.test(l))return V(l,s);if(!i)throw new F("Message has placeholders but no values was given");if("undefined"==typeof DOMParser)throw new F("Cannot format XML message without DOMParser");j||(j=new DOMParser);var u=j.parseFromString(''+l+"","text/html").getElementById(W);if(!u)throw new F("Malformed HTML message "+l);var c=Object.keys(i).filter((function(e){return!!u.getElementsByTagName(e).length}));if(!c.length)return V(l,s);var f=c.filter((function(e){return e!==e.toLowerCase()}));if(f.length)throw new F("HTML tag must be lowercased but the following tags are not: "+f.join(", "));return Array.prototype.slice.call(u.childNodes).reduce((function(e,t){return e.concat(function e(t,n,r){var i=t.tagName,o=t.outerHTML,a=t.textContent,s=t.childNodes;if(!i)return V(a||"",n);i=i.toLowerCase();var l=~q.indexOf(i),u=r[i];if(u&&l)throw new F(i+" is a self-closing tag and can not be used, please use another tag name.");if(!s.length)return[o];var c=Array.prototype.slice.call(s).reduce((function(t,i){return t.concat(e(i,n,r))}),[]);return u?"function"==typeof u?[u.apply(void 0,c)]:[u]:N(["<"+i+">"],c,[""])}(t,s,i))}),[])}var G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<"']/g;function Q(e,t,n={}){return t.reduce((t,r)=>(r in e?t[r]=e[r]:r in n&&(t[r]=n[r]),t),{})}function ee(e){K(e,"[React Intl] Could not find required `intl` object. needs to exist in the component ancestry.")}function te(e,t){return`[React Intl] ${e}${t?"\n"+t.stack:""}`}const ne={formats:{},messages:{},timeZone:void 0,textComponent:i.Fragment,defaultLocale:"en",defaultFormats:{},onError:function(e){0}};function re(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function ie(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}){const t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames;return{getDateTimeFormat:O(Intl.DateTimeFormat,e.dateTime),getNumberFormat:O(Intl.NumberFormat,e.number),getMessageFormat:O(Z,e.message),getRelativeTimeFormat:O(t,e.relativeTime),getPluralRules:O(Intl.PluralRules,e.pluralRules),getListFormat:O(n,e.list),getDisplayNames:O(r,e.displayNames)}}function oe(e,t,n,r){const i=e&&e[t];let o;if(i&&(o=i[n]),o)return o;r(te(`No ${t} format named: ${n}`))}var ae=n(122);const se=n.n(ae).a||ae;const le=i.createContext(null),{Consumer:ue,Provider:ce}=le,fe=ce,de=le;function pe(e,t){const{intlPropName:n="intl",forwardRef:r=!1,enforceContext:o=!0}=t||{},a=t=>i.createElement(ue,null,a=>(o&&ee(a),i.createElement(e,Object.assign({},t,{[n]:a},{ref:r?t.forwardedRef:null}))));var s;return a.displayName=`injectIntl(${s=e,s.displayName||s.name||"Component"})`,a.WrappedComponent=e,se(r?i.forwardRef((e,t)=>i.createElement(a,Object.assign({},e,{forwardedRef:t}))):a,e)}var he,ge,me=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);ii.createElement(de.Consumer,null,t=>{ee(t);const{value:n,children:r}=e,i=me(e,["value","children"]);return r(t.formatNumberToParts(n,i))});function ve(e){const t=t=>i.createElement(de.Consumer,null,n=>{ee(n);const{value:r,children:i}=t,o=me(t,["value","children"]),a="string"==typeof r?new Date(r||0):r;return i("formatDate"===e?n.formatDateToParts(a,o):n.formatTimeToParts(a,o))});return t.displayName=ge[e],t}function be(e){const t=t=>i.createElement(de.Consumer,null,n=>{ee(n);const{value:r,children:o}=t,a=me(t,["value","children"]),s=n[e](r,a);if("function"==typeof o)return o(s);const l=n.textComponent||i.Fragment;return i.createElement(l,null,s)});return t.displayName=he[e],t}function _e(){const e=Object(i.useContext)(de);return ee(e),e}ye.displayName="FormattedNumberParts";const Ae=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay"];function xe({locale:e,formats:t,onError:n},r,i={}){const{format:o}=i,a=o&&oe(t,"number",o,n)||{};return r(e,Q(i,Ae,a))}function we(e,t,n,r={}){try{return xe(e,t,r).format(n)}catch(t){e.onError(te("Error formatting number.",t))}return String(n)}function Ee(e,t,n,r={}){try{return xe(e,t,r).formatToParts(n)}catch(t){e.onError(te("Error formatting number.",t))}return[]}const Oe=["numeric","style"];function Me(e,t,n,r,i={}){r||(r="second");Intl.RelativeTimeFormat||e.onError(te('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n'));try{return function({locale:e,formats:t,onError:n},r,i={}){const{format:o}=i,a=!!o&&oe(t,"relative",o,n)||{};return r(e,Q(i,Oe,a))}(e,t,i).format(n,r)}catch(t){e.onError(te("Error formatting relative time.",t))}return String(n)}const Se=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function Te({locale:e,formats:t,onError:n,timeZone:r},i,o,a={}){const{format:s}=a,l=Object.assign(Object.assign({},r&&{timeZone:r}),s&&oe(t,i,s,n));let u=Q(a,Se,l);return"time"!==i||u.hour||u.minute||u.second||(u=Object.assign(Object.assign({},u),{hour:"numeric",minute:"numeric"})),o(e,u)}function Ce(e,t,n,r={}){const i="string"==typeof n?new Date(n||0):n;try{return Te(e,"date",t,r).format(i)}catch(t){e.onError(te("Error formatting date.",t))}return String(i)}function Pe(e,t,n,r={}){const i="string"==typeof n?new Date(n||0):n;try{return Te(e,"time",t,r).format(i)}catch(t){e.onError(te("Error formatting time.",t))}return String(i)}function ke(e,t,n,r={}){const i="string"==typeof n?new Date(n||0):n;try{return Te(e,"date",t,r).formatToParts(i)}catch(t){e.onError(te("Error formatting date.",t))}return[]}function Le(e,t,n,r={}){const i="string"==typeof n?new Date(n||0):n;try{return Te(e,"time",t,r).formatToParts(i)}catch(t){e.onError(te("Error formatting time.",t))}return[]}const Re=["localeMatcher","type"];function De({locale:e,onError:t},n,r,i={}){Intl.PluralRules||t(te('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n'));const o=Q(i,Re);try{return n(e,o).select(r)}catch(e){t(te("Error formatting plural.",e))}return"other"}function je(e,t){return Object.keys(e).reduce((n,r)=>(n[r]=Object.assign({timeZone:t},e[r]),n),{})}function Ie(e,t){return Object.keys(Object.assign(Object.assign({},e),t)).reduce((n,r)=>(n[r]=Object.assign(Object.assign({},e[r]||{}),t[r]||{}),n),{})}function Ne(e,t){if(!t)return e;const n=Z.formats;return Object.assign(Object.assign(Object.assign({},n),e),{date:Ie(je(n.date,t),je(e.date||{},t)),time:Ie(je(n.time,t),je(e.time||{},t))})}function Fe({locale:e,formats:t,messages:n,defaultLocale:r,defaultFormats:o,onError:a,timeZone:s},l,u={id:""},c={}){const{id:f,defaultMessage:d}=u;K(!!f,"[React Intl] An `id` must be provided to format a message.");const p=n&&n[String(f)];t=Ne(t,s),o=Ne(o,s);let h=[];if(p)try{h=l.getMessageFormat(p,e,t,{formatters:l}).formatHTMLMessage(c)}catch(t){a(te(`Error formatting message: "${f}" for locale: "${e}"`+(d?", using default message as fallback.":""),t))}else(!d||e&&e.toLowerCase()!==r.toLowerCase())&&a(te(`Missing message: "${f}" for locale: "${e}"`+(d?", using default message as fallback.":"")));if(!h.length&&d)try{h=l.getMessageFormat(d,r,o).formatHTMLMessage(c)}catch(e){a(te(`Error formatting the default message for: "${f}"`,e))}return h.length?1===h.length&&"string"==typeof h[0]?h[0]||d||String(f):(g=h,i.createElement(i.Fragment,null,...g)):(a(te(`Cannot format message: "${f}", using message ${p||d?"source":"id"} as fallback.`)),"string"==typeof p?p||d||String(f):d||String(f));var g}function ze(e,t,n={id:""},r={}){return Fe(e,t,n,Object.keys(r).reduce((e,t)=>{const n=r[t];return e[t]="string"==typeof n?(""+n).replace(J,e=>$[e.charCodeAt(0)]):n,e},{}))}var Be=n(444),Ue=n.n(Be);const Ve=["localeMatcher","type","style"],He=Date.now();function We({locale:e,onError:t},n,r,i={}){Intl.ListFormat||t(te('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n'));const o=Q(i,Ve);try{const t={},i=r.map((e,n)=>{if("object"==typeof e){const r=function(e){return`${He}_${e}_${He}`}(n);return t[r]=e,r}return String(e)});if(!Object.keys(t).length)return n(e,o).format(i);return n(e,o).formatToParts(i).reduce((e,n)=>{const r=n.value;return t[r]?e.push(t[r]):"string"==typeof e[e.length-1]?e[e.length-1]+=r:e.push(r),e},[])}catch(e){t(te("Error formatting list.",e))}return r}const qe=["localeMatcher","style","type","fallback"];function Ye({locale:e,onError:t},n,r,i={}){Intl.DisplayNames||t(te('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n'));const o=Q(i,qe);try{return n(e,o).of(r)}catch(e){t(te("Error formatting display name.",e))}}const Ge=Ue.a||Be;function Xe(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError}}function Ze(e,t){const n=ie(t),r=Object.assign(Object.assign({},ne),e),{locale:i,defaultLocale:o,onError:a}=r;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&a?a(te(`Missing locale data for locale: "${i}" in Intl.NumberFormat. Using default locale: "${o}" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details`)):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&a&&a(te(`Missing locale data for locale: "${i}" in Intl.DateTimeFormat. Using default locale: "${o}" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details`)):(a&&a(te(`"locale" was not configured, using "${o}" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/API.md#intlshape for more details`)),r.locale=r.defaultLocale||"en"),Object.assign(Object.assign({},r),{formatters:n,formatNumber:we.bind(null,r,n.getNumberFormat),formatNumberToParts:Ee.bind(null,r,n.getNumberFormat),formatRelativeTime:Me.bind(null,r,n.getRelativeTimeFormat),formatDate:Ce.bind(null,r,n.getDateTimeFormat),formatDateToParts:ke.bind(null,r,n.getDateTimeFormat),formatTime:Pe.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Le.bind(null,r,n.getDateTimeFormat),formatPlural:De.bind(null,r,n.getPluralRules),formatMessage:Fe.bind(null,r,n),formatHTMLMessage:ze.bind(null,r,n),formatList:We.bind(null,r,n.getListFormat),formatDisplayName:Ye.bind(null,r,n.getDisplayNames)})}class Ke extends i.PureComponent{constructor(){super(...arguments),this.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},this.state={cache:this.cache,intl:Ze(Xe(this.props),this.cache),prevConfig:Xe(this.props)}}static getDerivedStateFromProps(e,{prevConfig:t,cache:n}){const r=Xe(e);return Ge(t,r)?null:{intl:Ze(r,n),prevConfig:r}}render(){return ee(this.state.intl),i.createElement(fe,{value:this.state.intl},this.props.children)}}Ke.displayName="IntlProvider",Ke.defaultProps=ne;function $e(e){const t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":"day"}function Je(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return 3600;default:return 86400}}function Qe(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}const et=["second","minute","hour"];function tt(e="second"){return et.includes(e)}class nt extends i.PureComponent{constructor(e){super(e),this._updateTimer=null,this.state={prevUnit:this.props.unit,prevValue:this.props.value,currentValueInSeconds:tt(this.props.unit)?Qe(this.props.value,this.props.unit):0},K(!e.updateIntervalInSeconds||!(!e.updateIntervalInSeconds||!tt(e.unit)),"Cannot schedule update with unit longer than hour")}scheduleNextUpdate({updateIntervalInSeconds:e,unit:t},{currentValueInSeconds:n}){if(clearTimeout(this._updateTimer),this._updateTimer=null,!e||!tt(t))return;const r=n-e,i=$e(r);if("day"===i)return;const o=Je(i),a=r-r%o,s=a>=n?a-o:a,l=Math.abs(s-n);this._updateTimer=setTimeout(()=>this.setState({currentValueInSeconds:s}),1e3*l)}componentDidMount(){this.scheduleNextUpdate(this.props,this.state)}componentDidUpdate(){this.scheduleNextUpdate(this.props,this.state)}componentWillUnmount(){clearTimeout(this._updateTimer),this._updateTimer=null}static getDerivedStateFromProps(e,t){return e.unit!==t.prevUnit||e.value!==t.prevValue?{prevValue:e.value,prevUnit:e.unit,currentValueInSeconds:tt(e.unit)?Qe(e.value,e.unit):0}:null}render(){return i.createElement(de.Consumer,null,e=>{ee(e);const{formatRelativeTime:t,textComponent:n}=e,{children:r,value:o,unit:a,updateIntervalInSeconds:s}=this.props,{currentValueInSeconds:l}=this.state;let u=o||0,c=a;if(tt(a)&&"number"==typeof l&&s){c=$e(l);const e=Je(c);u=Math.round(l/e)}const f=t(u,c,Object.assign({},this.props));return"function"==typeof r?r(f):n?i.createElement(n,null,f):f})}}nt.displayName="FormattedRelativeTime",nt.defaultProps={value:0,unit:"second"};var rt=nt;const it=e=>{const{value:t,other:n,children:r,intl:{formatPlural:o,textComponent:a}}=e,s=e[o(t,e)]||n;return"function"==typeof r?r(s):a?i.createElement(a,null,s):s};it.defaultProps={type:"cardinal"},it.displayName="FormattedPlural";var ot=pe(it),at=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);iFe(Object.assign(Object.assign({},ne),{locale:"en"}),ie(),e,t);class ut extends i.Component{shouldComponentUpdate(e){const t=this.props,{values:n}=t,r=at(t,["values"]),{values:i}=e,o=at(e,["values"]);return!st(i,n)||!st(r,o)}render(){return i.createElement(de.Consumer,null,e=>{this.props.defaultMessage||ee(e);const{formatMessage:t=lt,textComponent:n=i.Fragment}=e||{},{id:r,description:o,defaultMessage:a,values:s,children:l,tagName:u=n}=this.props;let c=t({id:r,description:o,defaultMessage:a},s);return Array.isArray(c)||(c=[c]),"function"==typeof l?l(...c):u?i.createElement(u,null,...c):c})}}ut.displayName="FormattedMessage",ut.defaultProps={values:{}};var ct=ut;class ft extends ct{render(){return i.createElement(de.Consumer,null,e=>{this.props.defaultMessage||ee(e);const{formatHTMLMessage:t,textComponent:n}=e,{id:r,description:o,defaultMessage:a,values:s,children:l}=this.props;let{tagName:u}=this.props;u||(u=n||"span");const c=t({id:r,description:o,defaultMessage:a},s);if("function"==typeof l)return l(c);const f={__html:c};return i.createElement(u,{dangerouslySetInnerHTML:f})})}}ft.displayName="FormattedHTMLMessage",ft.defaultProps=Object.assign(Object.assign({},ct.defaultProps),{tagName:"span"});var dt=ft;function pt(e){return e}const ht=be("formatDate"),gt=be("formatTime"),mt=be("formatNumber"),yt=be("formatList"),vt=be("formatDisplayName"),bt=ve("formatDate"),_t=ve("formatTime")},function(e,t,n){"use strict";t.a=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return _})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return E})),n.d(t,"b",(function(){return O})),n.d(t,"f",(function(){return k}));var r=n(173);function i(){}var o=.7,a=1/o,s="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c=/^#([0-9a-f]{3,8})$/,f=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),d=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),p=new RegExp("^rgba\\("+[s,s,s,l]+"\\)$"),h=new RegExp("^rgba\\("+[u,u,u,l]+"\\)$"),g=new RegExp("^hsl\\("+[l,u,u]+"\\)$"),m=new RegExp("^hsla\\("+[l,u,u,l]+"\\)$"),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function _(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=c.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?A(t):3===n?new O(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?x(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?x(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=f.exec(e))?new O(t[1],t[2],t[3],1):(t=d.exec(e))?new O(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?x(t[1],t[2],t[3],t[4]):(t=h.exec(e))?x(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?C(t[1],t[2]/100,t[3]/100,1):(t=m.exec(e))?C(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?A(y[e]):"transparent"===e?new O(NaN,NaN,NaN,0):null}function A(e){return new O(e>>16&255,e>>8&255,255&e,1)}function x(e,t,n,r){return r<=0&&(e=t=n=NaN),new O(e,t,n,r)}function w(e){return e instanceof i||(e=_(e)),e?new O((e=e.rgb()).r,e.g,e.b,e.opacity):new O}function E(e,t,n,r){return 1===arguments.length?w(e):new O(e,t,n,null==r?1:r)}function O(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function M(){return"#"+T(this.r)+T(this.g)+T(this.b)}function S(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function T(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function C(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new L(e,t,n,r)}function P(e){if(e instanceof L)return new L(e.h,e.s,e.l,e.opacity);if(e instanceof i||(e=_(e)),!e)return new L;if(e instanceof L)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,l=a-o,u=(a+o)/2;return l?(s=t===a?(n-r)/l+6*(n0&&u<1?0:s,new L(s,l,u,e.opacity)}function k(e,t,n,r){return 1===arguments.length?P(e):new L(e,t,n,null==r?1:r)}function L(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function R(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Object(r.a)(i,_,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:v,formatHex:v,formatHsl:function(){return P(this).formatHsl()},formatRgb:b,toString:b}),Object(r.a)(O,E,Object(r.b)(i,{brighter:function(e){return e=null==e?a:Math.pow(a,e),new O(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new O(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:M,formatHex:M,formatRgb:S,toString:S})),Object(r.a)(L,k,Object(r.b)(i,{brighter:function(e){return e=null==e?a:Math.pow(a,e),new L(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new L(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new O(R(e>=240?e-240:e+120,i,r),R(e,i,r),R(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}))},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var r=n(1770),i=n(1070),o=n(709);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var f=!0,d=0;di&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+f<=n)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(50))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){e.exports={default:n(1839),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(1059),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t,n){return t in e?(0,o.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MAP="__SECRET_MAP_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.MARKER="__SECRET_MARKER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.MARKER_WITH_LABEL="__SECRET_MARKER_WITH_LABEL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.RECTANGLE="__SECRET_RECTANGLE_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.POLYLINE="__SECRET_POLYLINE_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.POLYGON="__SECRET_POLYGON_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.CIRCLE="__SECRET_CIRCLE_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.KML_LAYER="__SECRET_KML_LAYER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.DIRECTIONS_RENDERER="__SECRET_DIRECTIONS_RENDERER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.HEATMAP_LAYER="__SECRET_HEATMAP_LAYER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.FUSION_TABLES_LAYER="__SECRET_FUSION_TABLES_LAYER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.ANCHOR="__SECRET_ANCHOR_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.INFO_WINDOW="__SECRET_INFO_WINDOW_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.OVERLAY_VIEW="__SECRET_OVERLAY_VIEW_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.GROUND_LAYER="__SECRET_GROUND_LAYER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.DRAWING_MANAGER="__SECRET_DRAWING_MANAGER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.SEARCH_BOX="__SECRET_SEARCH_BOX_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.MARKER_CLUSTERER="__SECRET_MARKER_CLUSTERER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.INFO_BOX="__SECRET_INFO_BOX_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.TRAFFIC_LAYER="__SECRET_TRAFFIC_LAYER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.STREET_VIEW_PANORAMA="__SECRET_STREET_VIEW_PANORAMA_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",t.BICYCLING_LAYER="__SECRET_BICYCLING_LAYER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(25),i=n(502),o=n(161),a=n(30),s=n(160),l=n(635);const u="Resource subclass must define virtual methods";class c{get[Symbol.toStringTag](){return"Resource"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.b)(e);const{id:n,userData:i={}}=t;this.gl=e,this.gl2=e,this.id=n||Object(s.c)(this[Symbol.toStringTag]),this.userData=i,this._bound=!1,this._handle=t.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}toString(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}get handle(){return this._handle}delete(){let{deleteChildren:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,t&&e&&t.filter(Boolean).forEach(e=>e.delete()),this}bind(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!=typeof t?(this._bindHandle(t),this):(this._bound?e=t():(this._bindHandle(this.handle),this._bound=!0,e=t(),this._bound=!1,this._bindHandle(null)),e)}unbind(){this.bind(null)}getParameter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(o.b)(this.gl,e),Object(a.a)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=Object(r.j)(this.gl);if(!((!("webgl2"in n)||e)&&(!("extension"in n)||this.gl.getExtension(n.extension)))){const t=n.webgl1,r="webgl2"in n?n.webgl2:n.webgl1;return e?r:t}}return this._getParameter(e,t)}getParameters(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{parameters:t,keys:n}=e,i=this.constructor.PARAMETERS||{},a=Object(r.j)(this.gl),s={},l=t||Object.keys(i);for(const t of l){const r=i[t];if(r&&(!("webgl2"in r)||a)&&(!("extension"in r)||this.gl.getExtension(r.extension))){const i=n?Object(o.a)(this.gl,t):t;s[i]=this.getParameter(t,e),n&&"GLenum"===r.type&&(s[i]=Object(o.a)(this.gl,s[i]))}}return s}setParameter(e,t){e=Object(o.b)(this.gl,e),Object(a.a)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=Object(r.j)(this.gl);if(!((!("webgl2"in n)||e)&&(!("extension"in n)||this.gl.getExtension(n.extension))))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(t=Object(o.b)(t))}return this._setParameter(e,t),this}setParameters(e){for(const t in e)this.setParameter(t,e[t]);return this}stubRemovedMethods(e,t,n){return Object(l.a)(this,e,t,n)}initialize(e){}_createHandle(){throw new Error(u)}_deleteHandle(){throw new Error(u)}_bindHandle(e){throw new Error(u)}_getOptsFromHandle(){throw new Error(u)}_getParameter(e,t){throw new Error(u)}_setParameter(e,t){throw new Error(u)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_addStats(){const e=this[Symbol.toStringTag],t=i.a.get("Resource Counts");t.get("Resources Created").incrementCount(),t.get("".concat(e,"s Created")).incrementCount(),t.get("".concat(e,"s Active")).incrementCount()}_removeStats(){const e=this[Symbol.toStringTag];i.a.get("Resource Counts").get("".concat(e,"s Active")).decrementCount()}_trackAllocatedMemory(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag];this._trackAllocatedMemoryForContext(e,t),this._trackAllocatedMemoryForContext(e,t,this.gl.canvas&&this.gl.canvas.id),this.byteLength=e}_trackAllocatedMemoryForContext(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=i.a.get("Memory Usage".concat(n));r.get("GPU Memory").addCount(e),r.get("".concat(t," Memory")).addCount(e)}_trackDeallocatedMemory(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag];this._trackDeallocatedMemoryForContext(e),this._trackDeallocatedMemoryForContext(e,this.gl.canvas&&this.gl.canvas.id),this.byteLength=0}_trackDeallocatedMemoryForContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=i.a.get("Memory Usage".concat(t));n.get("GPU Memory").subtractCount(this.byteLength),n.get("".concat(e," Memory")).subtractCount(this.byteLength)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(24),i=n(6),o=n(7),a=n(57),s=n(117),l=n(33),u=n(43),c=n(85),f=n(52),d=Math.PI/180,p=Object(s.a)(),h=[0,0,0],g={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]},m=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,e);var n=t.id,r=void 0===n?null:n,o=t.x,a=void 0===o?0:o,s=t.y,l=void 0===s?0:s,u=t.width,c=void 0===u?1:u,f=t.height,d=void 0===f?1:f;this.id=r||this.constructor.displayName||"viewport",this.x=a,this.y=l,this.width=c||1,this.height=d||1,this._frustumPlanes={},this._initViewMatrix(t),this._initProjectionMatrix(t),this._initPixelMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return Object(o.a)(e,[{key:"equals",value:function(t){return t instanceof e&&(this===t||t.width===this.width&&t.height===this.height&&t.scale===this.scale&&Object(l.f)(t.projectionMatrix,this.projectionMatrix)&&Object(l.f)(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,i=void 0===n||n,o=this.projectPosition(e),a=Object(c.o)(o,this.pixelProjectionMatrix),s=Object(r.a)(a,2),l=s[0],u=s[1],f=i?u:this.height-u;return 2===e.length?[l,f]:[l,f,a[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,i=void 0===n||n,o=t.targetZ,a=Object(r.a)(e,3),s=a[0],l=a[1],u=a[2],f=i?l:this.height-l,d=o&&o*this.distanceScales.unitsPerMeter[2],p=Object(c.m)([s,f,u],this.pixelUnprojectionMatrix,d),h=this.unprojectPosition(p),g=Object(r.a)(h,3),m=g[0],y=g[1],v=g[2];return Number.isFinite(u)?[m,y,v]:Number.isFinite(o)?[m,y,o]:[m,y]}},{key:"projectPosition",value:function(e){var t=this.projectFlat(e),n=Object(r.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(e){var t=this.unprojectFlat(e),n=Object(r.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(e){return this.isGeospatial?Object(c.k)(e):e}},{key:"unprojectFlat",value:function(e){return this.isGeospatial?Object(c.n)(e):e}},{key:"getBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={targetZ:e.z||0},n=this.unproject([0,0],t),r=this.unproject([this.width,0],t),i=this.unproject([0,this.height],t),o=this.unproject([this.width,this.height],t);return[Math.min(n[0],r[0],i[0],o[0]),Math.min(n[1],r[1],i[1],o[1]),Math.max(n[0],r[0],i[0],o[0]),Math.max(n[1],r[1],i[1],o[1])]}},{key:"getDistanceScales",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?Object(c.f)({longitude:e[0],latitude:e[1],highPrecision:!0}):this.distanceScales}},{key:"containsPixel",value:function(e){var t=e.x,n=e.y,r=e.width,i=void 0===r?1:r,o=e.height,a=void 0===o?1:o;return t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:console;A(e,null,n,h,g,t);var r,i=c(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=e&&e[o.id]||{},s=o.options&&o.options[o.id]||{},l=o.defaultOptions&&o.defaultOptions[o.id]||{};A(a,o.id,n,s,l,t)}}catch(e){i.e(e)}finally{i.f()}}(e,n=Array.isArray(n)?n:[n]),w(t,e,r)}function _(e,t){var n=y(),r=e.fetch||n.fetch;return"function"==typeof r?r:Object(o.f)(r)?function(e){return Object(a.a)(e,r)}:t&&t.fetch?t.fetch:function(t){return Object(a.a)(t,e)}}function A(e,t,n,r,i,a){var s=t||"Top level",l=t?"".concat(t,"."):"";for(var u in e){var c=!t&&Object(o.f)(e[u]);if(!(u in r))if(u in i)n.warn("".concat(s," loader option '").concat(l).concat(u,"' deprecated, use '").concat(i[u],"'"));else if(!c){var f=x(u,a);n.warn("".concat(s," loader option '").concat(l).concat(u,"' not recognized. ").concat(f))}}}function x(e,t){var n,r=e.toLowerCase(),i="",o=c(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;for(var s in a.options){if(e===s)return"Did you mean '".concat(a.id,".").concat(s,"'?");var l=s.toLowerCase();(r.startsWith(l)||l.startsWith(r))&&(i=i||"Did you mean '".concat(a.id,".").concat(s,"'?"))}}}catch(e){o.e(e)}finally{o.f()}return i}function w(e,t,n){var r=p({},e.options||{});return null===r.log&&(r.log=new u),E(r,y()),E(r,t),function(e,t){t&&!e.baseUri&&(e.baseUri=t)}(r,n),r}function E(e,t){for(var n in t)if(n in t){var r=t[n];Object(o.h)(r)&&Object(o.h)(e[n])?e[n]=p(p({},e[n]),t[n]):e[n]=t[n]}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,i=n(0),o=n(8);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var a=function(e){return e};function s(e){e.preventDefault(),e.returnValue=""}function l(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function u(){return Math.random().toString(36).substr(2,8)}function c(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function f(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var d=n(70);n(189);function p(e){let{basename:t,children:n,window:p}=e,h=Object(i.useRef)();null==h.current&&(h.current=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,i=n.history;function d(){var e=n.location,t=e.pathname,r=e.search,o=e.hash,s=i.state||{};return[s.idx,a({pathname:t,search:r,hash:o,state:s.usr||null,key:s.key||"default"})]}var p=null;n.addEventListener("popstate",(function(){if(p)b.call(p),p=null;else{var e=r.Pop,t=d(),n=t[0],i=t[1];if(b.length){if(null!=n){var o=m-n;o&&(p={action:e,location:i,retry:function(){O(-1*o)}},O(o))}}else E(e)}}));var h=r.Pop,g=d(),m=g[0],y=g[1],v=l(),b=l();function _(e){return"string"==typeof e?e:c(e)}function A(e,t){return void 0===t&&(t=null),a(Object(o.a)({pathname:y.pathname,hash:"",search:""},"string"==typeof e?f(e):e,{state:t,key:u()}))}function x(e,t){return[{usr:e.state,key:e.key,idx:t},_(e)]}function w(e,t,n){return!b.length||(b.call({action:e,location:t,retry:n}),!1)}function E(e){h=e;var t=d();m=t[0],y=t[1],v.call({action:h,location:y})}function O(e){i.go(e)}return null==m&&(m=0,i.replaceState(Object(o.a)({},i.state,{idx:m}),"")),{get action(){return h},get location(){return y},createHref:_,push:function e(t,o){var a=r.Push,s=A(t,o);if(w(a,s,(function(){e(t,o)}))){var l=x(s,m+1),u=l[0],c=l[1];try{i.pushState(u,"",c)}catch(e){n.location.assign(c)}E(a)}},replace:function e(t,n){var o=r.Replace,a=A(t,n);if(w(o,a,(function(){e(t,n)}))){var s=x(a,m),l=s[0],u=s[1];i.replaceState(l,"",u),E(o)}},go:O,back:function(){O(-1)},forward:function(){O(1)},listen:function(e){return v.push(e)},block:function(e){var t=b.push(e);return 1===b.length&&n.addEventListener("beforeunload",s),function(){t(),b.length||n.removeEventListener("beforeunload",s)}}}}({window:p}));let g=h.current,[m,y]=Object(i.useState)({action:g.action,location:g.location});return Object(i.useLayoutEffect)(()=>g.listen(y),[g]),Object(i.createElement)(d.b,{basename:t,children:n,location:m.location,navigationType:m.action,navigator:g})}},function(e,t,n){"use strict";(function(e,r){n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return p}));var i=n(36),o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},a=o.self||o.window||o.global,s=o.window||o.self||o.global,l=o.global||o.self||o.window,u=o.document||{},c="object"!==(void 0===r?"undefined":Object(i.a)(r))||"[object process]"!==String(r)||r.browser,f="function"==typeof importScripts,d=void 0!==r&&r.version&&r.version.match(/v([0-9]*)/),p=d&&parseFloat(d[1])||0}).call(this,n(50),n(61))},,function(e,t,n){"use strict";function r(e){var t=e.source,n=e.target,r=e.start,i=void 0===r?0:r,o=e.end,a=e.getData;o=o||n.length;var s=t.length,l=o-i;if(s>l)n.set(t.subarray(0,l),i);else if(n.set(t,i),a)for(var u=s;u=g)){var y=m?i.value:i.getBuffer().getData({srcByteOffset:d});if(i.settings.normalized&&!m){var v=l;l=function(e,t){return i._normalizeConstant(v(e,t))}}var b=m?function(e,t){return l(y,t)}:function(e,t){return l(y.subarray(e,e+f),t)},_=t.getData({length:o}),A=new Float32Array(g);!function(e){var t=e.source,n=e.target,i=e.size,o=e.getData,a=e.sourceStartIndices,s=e.targetStartIndices;if(!Array.isArray(s))return r({source:t,target:n,getData:o}),n;for(var l=0,u=0,c=o&&function(e,t){return o(e+u,t)},f=Math.min(a.length,s.length),d=1;d0&&e.extensions[0]),(e.parseTextSync||e.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(36),i=n(6),o=n(7),a=n(315);var s=n(222),l=n(118),u=n(210),c=function(){function e(t){if(Object(i.a)(this,e),t instanceof e)return t;t||(t={json:{asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},buffers:[]}),this.byteLength=0,this.gltf=t,Object(l.a)(this.gltf.json)}return Object(o.a)(e,[{key:"getApplicationData",value:function(e){return this.json[e]}},{key:"getExtraData",value:function(e){return(this.json.extras||{})[e]}},{key:"getExtension",value:function(e){var t=this.getUsedExtensions().find((function(t){return t===e})),n=this.json.extensions||{};return t?n[e]||!0:null}},{key:"getRequiredExtension",value:function(e){return this.getRequiredExtensions().find((function(t){return t===e}))?this.getExtension(e):null}},{key:"getRequiredExtensions",value:function(){return this.json.extensionsRequired||[]}},{key:"getUsedExtensions",value:function(){return this.json.extensionsUsed||[]}},{key:"getObjectExtension",value:function(e,t){return(e.extensions||{})[t]}},{key:"getScene",value:function(e){return this.getObject("scenes",e)}},{key:"getNode",value:function(e){return this.getObject("nodes",e)}},{key:"getSkin",value:function(e){return this.getObject("skins",e)}},{key:"getMesh",value:function(e){return this.getObject("meshes",e)}},{key:"getMaterial",value:function(e){return this.getObject("materials",e)}},{key:"getAccessor",value:function(e){return this.getObject("accessors",e)}},{key:"getCamera",value:function(e){return null}},{key:"getTexture",value:function(e){return this.getObject("textures",e)}},{key:"getSampler",value:function(e){return this.getObject("samplers",e)}},{key:"getImage",value:function(e){return this.getObject("images",e)}},{key:"getBufferView",value:function(e){return this.getObject("bufferViews",e)}},{key:"getBuffer",value:function(e){return this.getObject("buffers",e)}},{key:"getObject",value:function(e,t){if("object"===Object(r.a)(t))return t;var n=this.json[e]&&this.json[e][t];if(!n)throw new Error("glTF file error: Could not find ".concat(e,"[").concat(t,"]"));return n}},{key:"getTypedArrayForBufferView",value:function(e){var t=(e=this.getBufferView(e)).buffer,n=this.gltf.buffers[t];Object(l.a)(n);var r=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,e.byteLength)}},{key:"getTypedArrayForAccessor",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,r=Object(u.a)(e,t),i=r.ArrayType,o=r.length;return new i(n,t.byteOffset+e.byteOffset,o)}},{key:"getTypedArrayForImageData",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(n,r,t.byteLength)}},{key:"addApplicationData",value:function(e,t){return this.json[e]=t,this}},{key:"addExtraData",value:function(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}},{key:"addObjectExtension",value:function(e,t,n){return Object(l.a)(n),e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}},{key:"setObjectExtension",value:function(e,t,n){(e.extensions||{})[t]=n}},{key:"removeObjectExtension",value:function(e,t){var n=e.extensions||{},r=n[t];return delete n[t],r}},{key:"addExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(l.a)(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}},{key:"addRequiredExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(l.a)(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}},{key:"registerUsedExtension",value:function(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((function(t){return t===e}))||this.json.extensionsUsed.push(e)}},{key:"registerRequiredExtension",value:function(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((function(t){return t===e}))||this.json.extensionsRequired.push(e)}},{key:"removeExtension",value:function(e){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e),this.json.extensions&&delete this.json.extensions[e]}},{key:"addMesh",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=this._addAttributes(e),i={primitives:[{attributes:r,indices:t,mode:n}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}},{key:"addPointCloud",value:function(e){var t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}},{key:"addImage",value:function(e,t){var n,r;t=t||(n=e,(r=Object(a.a)(n))?r.mimeType:null);var i={bufferView:this.addBufferView(e),mimeType:t};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}},{key:"addBufferView",value:function(e){var t=e.byteLength;Object(l.a)(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);var n={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=Object(s.c)(t),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}},{key:"addAccessor",value:function(e,t){var n={bufferView:e,type:Object(u.b)(t.size),componentType:t.componentType,count:t.count};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}},{key:"addBinaryBuffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3},n=this.addBufferView(e),r={size:t.size,componentType:Object(u.c)(e),count:Math.round(e.length/t.size)};return this.addAccessor(n,Object.assign(r,t))}},{key:"createBinaryChunk",value:function(){if(!this.arrayBuffer){for(var e=this.byteLength,t=new ArrayBuffer(e),n=new Uint8Array(t),r=0,i=0;i-1?e.splice(r,1):n=!1}}},{key:"json",get:function(){return this.gltf.json}}]),e}()},function(e,t,n){"use strict";var r=n(109).a.Symbol;t.a=r},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(30);const i={};function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[e]=i[e]||1;const t=i[e]++;return"".concat(e,"-").concat(t)}function a(e){return Object(r.a)("number"==typeof e,"Input must be a number"),e&&0==(e&e-1)}function s(e){let t=!0;for(const n in e){t=!1;break}return t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(30);function i(e,t){if("string"!=typeof t)return t;const n=Number(t);if(!isNaN(n))return n;const i=e[t=t.replace(/^.*\./,"")];return Object(r.a)(void 0!==i,"Accessing undefined constant GL.".concat(t)),i}function o(e,t){t=Number(t);for(const n in e)if(e[n]===t)return"GL.".concat(n);return String(t)}},function(e,t,n){"use strict";var r=n(1036),i=Object.prototype.toString;function o(e){return Array.isArray(e)}function a(e){return void 0===e}function s(e){return"[object ArrayBuffer]"===i.call(e)}function l(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;ne.toString()).join(",")}function s(e){if("string"==typeof e){const t=e.split(",").map(Number);return{lat:t[0],lng:t[1]}}if(Array.isArray(e)&&2===e.length){const t=e.map(Number);return{lat:t[0],lng:t[1]}}if("lat"in e&&"lng"in e)return e;if("latitude"in e&&"longitude"in e)return{lat:e.latitude,lng:e.longitude};throw new TypeError}function l(e,t,n){e.client=e.client_id;const r=e.client_secret;delete e.client_id,delete e.client_secret;const a=(0,o.stringify)(e,t),s=`${n}?${a}`;return`${a}&signature=${(0,i.createSignature)(s,r)}`}t.latLngToString=a,t.objectToString=function(e){if("string"==typeof e)return e;{let t=Object.keys(e);return t.sort(),t.map(t=>t+":"+e[t]).join("|")}},t.latLngBoundsToString=function(e){return"string"==typeof e?e:a(e.southwest)+"|"+a(e.northeast)},t.toLatLngLiteral=s,t.latLngArrayToStringMaybeEncoded=function(e){if("string"==typeof e)return e;const t=e.map(a).join("|"),n="enc:"+(0,r.encodePath)(e.map(s));return n.length{const i=Object.assign({},r);return Object.keys(e).forEach(t=>{t in i&&(i[t]=e[t](i[t]))}),"client_id"in i&&"client_secret"in i?l(i,n,t):(0,o.stringify)(i,n)}},t.toTimestamp=function(e){return"now"===e?e:e instanceof Date?Number(e)/1e3:e},t.createPremiumPlanQueryString=l},function(e,t,n){"use strict";var r=n(1148),i=Object.prototype.toString;function o(e){return Array.isArray(e)}function a(e){return void 0===e}function s(e){return"[object ArrayBuffer]"===i.call(e)}function l(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,o=r,a={index:-1,data:e,target:[]};return e?"function"==typeof e[Symbol.iterator]?o=e:e.length>0&&(i.length=e.length,o=i):o=r,(t>0||Number.isFinite(n))&&(o=(Array.isArray(o)?o:Array.from(o)).slice(t,n),a.index=t-1),{iterable:o,objectInfo:a}}function a(e){return e&&e[Symbol.asyncIterator]}function s(e,t){var n=t.size,r=t.stride,i=t.offset,o=t.startIndices,a=t.nested,s=e.BYTES_PER_ELEMENT,l=r?r/s:n,u=i?i/s:0,c=Math.floor((e.length-u)/l);return function(t,r){var i=r.index,s=r.target;if(!o){for(var f=i*l+u,d=0;d1&&void 0!==arguments[1]?arguments[1]:{};switch(e){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return t?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function o(e){let{data:t,width:n,height:r,bytesPerPixel:i=4,temp:o}=e;const a=n*i;o=o||new Uint8Array(a);for(let e=0;e0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343){var l=e.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&l}if(s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}t[n]=0})(e,v,t,n)})(e,t=ee(n),n)}return t},array:function(e){var t=ee(e.length);return function(e,t){y.set(e,t)}(e,t),t}};var a=d(e),s=[],l=0;if(r)for(var u=0;u=r);)++i;if(i-t>16&&e.subarray&&h)return h.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}(v,e,t):""}var m,y,v,b,_,A,x;"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function w(e,t){return e%t>0&&(e+=t-e%t),e}function E(e){m=e,n.HEAP8=y=new Int8Array(e),n.HEAP16=b=new Int16Array(e),n.HEAP32=_=new Int32Array(e),n.HEAPU8=v=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=A=new Float32Array(e),n.HEAPF64=x=new Float64Array(e)}var O=n.TOTAL_MEMORY||33554432;function M(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}O=(m=n.buffer?n.buffer:new ArrayBuffer(O)).byteLength,E(m),_[6004]=5266928;var S=[],T=[],C=[],P=[];var k=Math.abs,L=Math.ceil,R=Math.floor,D=Math.min,j=0,I=null,N=null;n.preloadedImages={},n.preloadedAudios={};var F,z,B=null,U="data:application/octet-stream;base64,";function V(e){return String.prototype.startsWith?e.startsWith(U):0===e.indexOf(U)}B="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAABFAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/NFQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";function H(e){return e}function W(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))}function q(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function Y(){return y.length}function G(e){try{var t=new ArrayBuffer(e);if(t.byteLength!=e)return;return new Int8Array(t).set(y),Q(t),E(t),1}catch(e){}}var X="function"==typeof atob?atob:function(e){var t,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(u++))<<2|(i=s.indexOf(e.charAt(u++)))>>4,n=(15&i)<<4|(o=s.indexOf(e.charAt(u++)))>>2,r=(3&o)<<6|(a=s.indexOf(e.charAt(u++))),l+=String.fromCharCode(t),64!==o&&(l+=String.fromCharCode(n)),64!==a&&(l+=String.fromCharCode(r))}while(u>2]=e,i[s+4>>2]=t,(s=0!=(0|o))&&(i[o>>2]=0),0|De(e,t))return P=a,0|(h=1);i[h>>2]=0;e:do{if((0|n)>=1)if(s)for(f=0,d=1,p=1,l=0,s=e;;){if(!(l|f)){if(0==(0|(s=0|D(s,t,4,h)))&0==(0|(t=0|w()))){s=2;break e}if(0|De(s,t)){s=1;break e}}if(0==(0|(s=0|D(s,t,0|i[16+(f<<2)>>2],h)))&0==(0|(t=0|w()))){s=2;break e}if(i[(e=r+(p<<3)|0)>>2]=s,i[e+4>>2]=t,i[o+(p<<2)>>2]=d,e=(0|(l=l+1|0))==(0|d),c=6==(0|(u=f+1|0)),0|De(s,t)){s=1;break e}if((0|(d=d+(c&e&1)|0))>(0|n)){s=0;break}f=e?c?0:u:f,p=p+1|0,l=e?0:l}else for(f=0,d=1,p=1,l=0,s=e;;){if(!(l|f)){if(0==(0|(s=0|D(s,t,4,h)))&0==(0|(t=0|w()))){s=2;break e}if(0|De(s,t)){s=1;break e}}if(0==(0|(s=0|D(s,t,0|i[16+(f<<2)>>2],h)))&0==(0|(t=0|w()))){s=2;break e}if(i[(e=r+(p<<3)|0)>>2]=s,i[e+4>>2]=t,e=(0|(l=l+1|0))==(0|d),c=6==(0|(u=f+1|0)),0|De(s,t)){s=1;break e}if((0|(d=d+(c&e&1)|0))>(0|n)){s=0;break}f=e?c?0:u:f,p=p+1|0,l=e?0:l}else s=0}while(0);return P=a,0|(h=s)}function R(e,t,n,r,o,a,s){n|=0,r|=0,o|=0,a|=0,s|=0;var l,u,c=0,f=0,d=0,p=0,h=0;if(u=P,P=P+16|0,l=u,0==(0|(e|=0))&0==(0|(t|=0)))P=u;else{if(c=0|wt(0|e,0|t,0|a,((0|a)<0)<<31>>31|0),w(),!(0==(0|(h=0|i[(p=f=r+(c<<3)|0)>>2]))&0==(0|(p=0|i[p+4>>2]))|(d=(0|h)==(0|e)&(0|p)==(0|t))))do{d=(0|(p=0|i[(h=f=r+((c=(c+1|0)%(0|a)|0)<<3)|0)>>2]))==(0|e)&(0|(h=0|i[h+4>>2]))==(0|t)}while(!(0==(0|p)&0==(0|h)|d));c=o+(c<<2)|0,d&&(0|i[c>>2])<=(0|s)||(i[(h=f)>>2]=e,i[h+4>>2]=t,i[c>>2]=s,(0|s)>=(0|n)||(h=s+1|0,i[l>>2]=0,R(p=0|D(e,t,2,l),0|w(),n,r,o,a,h),i[l>>2]=0,R(p=0|D(e,t,3,l),0|w(),n,r,o,a,h),i[l>>2]=0,R(p=0|D(e,t,1,l),0|w(),n,r,o,a,h),i[l>>2]=0,R(p=0|D(e,t,5,l),0|w(),n,r,o,a,h),i[l>>2]=0,R(p=0|D(e,t,4,l),0|w(),n,r,o,a,h),i[l>>2]=0,R(p=0|D(e,t,6,l),0|w(),n,r,o,a,h))),P=u}}function D(e,t,n,r){e|=0,t|=0,n|=0;var o,a,s=0,l=0,u=0,c=0,f=0,d=0,p=0;if((0|i[(r|=0)>>2])>0){s=0;do{n=0|le(n),s=s+1|0}while((0|s)<(0|i[r>>2]))}o=0|Et(0|e,0|t,45),w(),a=127&o,l=0|je(e,t),s=0|Et(0|e,0|t,52),w(),s&=15;e:do{if(s)for(;;){if(d=0|Et(0|e,0|t,0|(f=3*(15-s|0)|0)),w(),d&=7,p=0==(0|Be(s)),s=s+-1|0,c=0|Ot(7,0,0|f),t&=~(0|w()),e=(f=0|Ot(0|i[(p?464:48)+(28*d|0)+(n<<2)>>2],0,0|f))|e&~c,t|=0|w(),!(n=0|i[(p?672:256)+(28*d|0)+(n<<2)>>2])){n=0;break e}if(!s){u=6;break}}else u=6}while(0);6==(0|u)&&(e|=d=0|Ot(0|(p=0|i[880+(28*a|0)+(n<<2)>>2]),0,45),t=0|w()|-1040385&t,n=0|i[4304+(28*a|0)+(n<<2)>>2],127==(127&p|0)&&(p=0|Ot(0|i[880+(28*a|0)+20>>2],0,45),t=0|w()|-1040385&t,n=0|i[4304+(28*a|0)+20>>2],e=0|Ne(p|e,t),t=0|w(),i[r>>2]=1+(0|i[r>>2]))),u=0|Et(0|e,0|t,45),w(),u&=127;e:do{if(0|I(u)){t:do{if(1==(0|je(e,t))){if((0|a)!=(0|u)){if(0|B(u,0|i[7728+(28*a|0)>>2])){e=0|ze(e,t),l=1,t=0|w();break}e=0|Ne(e,t),l=1,t=0|w();break}switch(0|l){case 5:e=0|ze(e,t),t=0|w(),i[r>>2]=5+(0|i[r>>2]),l=0;break t;case 3:e=0|Ne(e,t),t=0|w(),i[r>>2]=1+(0|i[r>>2]),l=0;break t;default:return p=0,x(0|(d=0)),0|p}}else l=0}while(0);if((0|n)>0){s=0;do{e=0|Ie(e,t),t=0|w(),s=s+1|0}while((0|s)!=(0|n))}if((0|a)!=(0|u)){if(!(0|N(u))){if(0!=(0|l)|5!=(0|je(e,t)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&o){case 8:case 118:break e}3!=(0|je(e,t))&&(i[r>>2]=1+(0|i[r>>2]))}}else if((0|n)>0){s=0;do{e=0|Ne(e,t),t=0|w(),s=s+1|0}while((0|s)!=(0|n))}}while(0);return i[r>>2]=((0|i[r>>2])+n|0)%6|0,p=e,x(0|(d=t)),0|p}function j(e,t,n,r,a,s){t|=0,n|=0,r|=0,a|=0,s|=0;var l,u,c,f,d,p,h,g,m,y=0,v=0,b=0,_=0,A=0,x=0,E=0,O=0,M=0,S=0,T=0,C=0,k=0,L=0;if(m=P,P=P+48|0,p=m+32|0,h=m+16|0,g=m,(0|(y=0|i[(e|=0)>>2]))<=0)return P=m,0|(C=0);l=e+4|0,u=p+8|0,c=h+8|0,f=g+8|0,d=((0|t)<0)<<31>>31,T=0;e:for(;;){M=(v=0|i[l>>2])+(T<<4)|0,i[p>>2]=i[M>>2],i[p+4>>2]=i[M+4>>2],i[p+8>>2]=i[M+8>>2],i[p+12>>2]=i[M+12>>2],(0|T)==(y+-1|0)?(i[h>>2]=i[v>>2],i[h+4>>2]=i[v+4>>2],i[h+8>>2]=i[v+8>>2],i[h+12>>2]=i[v+12>>2]):(M=v+(T+1<<4)|0,i[h>>2]=i[M>>2],i[h+4>>2]=i[M+4>>2],i[h+8>>2]=i[M+8>>2],i[h+12>>2]=i[M+12>>2]),M=0|Y(p,h,n);t:do{if((0|M)>0){S=+(0|M),O=0;n:for(;;){L=+(M-O|0),k=+(0|O),o[g>>3]=+o[p>>3]*L/S+ +o[h>>3]*k/S,o[f>>3]=+o[u>>3]*L/S+ +o[c>>3]*k/S,v=0|wt(0|(x=0|Ue(g,n)),0|(E=0|w()),0|t,0|d),w(),_=0|i[(b=y=s+(v<<3)|0)>>2],b=0|i[b+4>>2];r:do{if(0==(0|_)&0==(0|b))C=14;else for(A=0;;){if((0|A)>(0|t)){y=1;break r}if((0|_)==(0|x)&(0|b)==(0|E)){y=7;break r}if(0==(0|(_=0|i[(b=y=s+((v=(v+1|0)%(0|t)|0)<<3)|0)>>2]))&0==(0|(b=0|i[b+4>>2]))){C=14;break}A=A+1|0}}while(0);switch(14==(0|C)&&(C=0,0==(0|x)&0==(0|E)?y=7:(i[y>>2]=x,i[y+4>>2]=E,y=0|i[r>>2],i[(A=a+(y<<3)|0)>>2]=x,i[A+4>>2]=E,i[r>>2]=y+1,y=0)),7&y){case 7:case 0:break;default:break n}if((0|M)<=(0|(O=O+1|0))){C=8;break t}}if(0|y){y=-1,C=20;break e}}else C=8}while(0);if(8==(0|C)&&(C=0),(0|(T=T+1|0))>=(0|(y=0|i[e>>2]))){y=0,C=20;break}}return 20==(0|C)?(P=m,0|y):0}function I(e){return 0|i[7728+(28*(e|=0)|0)+16>>2]}function N(e){return 4==(0|(e|=0))|117==(0|e)|0}function F(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)>>2]}function z(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)+4>>2]}function B(e,t){return t|=0,(0|i[7728+(28*(e|=0)|0)+20>>2])==(0|t)?0|(t=1):0|(t=(0|i[7728+(28*e|0)+24>>2])==(0|t))}function U(e,t){return 0|i[880+(28*(e|=0)|0)+((t|=0)<<2)>>2]}function V(e,t){return t|=0,(0|i[880+(28*(e|=0)|0)>>2])==(0|t)?0|(t=0):(0|i[880+(28*e|0)+4>>2])==(0|t)?0|(t=1):(0|i[880+(28*e|0)+8>>2])==(0|t)?0|(t=2):(0|i[880+(28*e|0)+12>>2])==(0|t)?0|(t=3):(0|i[880+(28*e|0)+16>>2])==(0|t)?0|(t=4):(0|i[880+(28*e|0)+20>>2])==(0|t)?0|(t=5):0|((0|i[880+(28*e|0)+24>>2])==(0|t)?6:7)}function H(e){return+o[(e|=0)+16>>3]<+o[e+24>>3]|0}function W(e,t){e|=0;var n,r,i=0;return(i=+o[(t|=0)>>3])>=+o[e+8>>3]&&i<=+o[e>>3]?(n=+o[e+16>>3],i=+o[e+24>>3],t=(r=+o[t+8>>3])>=i,e=r<=n&1,n>2]=0,f=f+4|0}while((0|f)<(0|d));return Ye(t,a),We(d=0|i[(f=a)>>2],f=0|i[f+4>>2],n),qe(d,f,r),u=+Te(n,r+8|0),o[n>>3]=+o[e>>3],o[(f=n+8|0)>>3]=+o[e+16>>3],o[r>>3]=+o[e+8>>3],o[(d=r+8|0)>>3]=+o[e+24>>3],c=+Te(n,r),d=~~+v(+c*c/+Mt(+ +l(+(+o[f>>3]-+o[d>>3])/(+o[n>>3]-+o[r>>3])),3)/(u*(2.59807621135*u)*.8)),P=s,0|(0==(0|d)?1:d)}function Y(e,t,n){e|=0,t|=0,n|=0;var r,o,a,s,l,u=0,c=0;s=P,P=P+288|0,r=s+264|0,o=s+96|0,c=(u=a=s)+96|0;do{i[u>>2]=0,u=u+4|0}while((0|u)<(0|c));return Ye(n,a),We(u=0|i[(c=a)>>2],c=0|i[c+4>>2],r),qe(u,c,o),l=+Te(r,o+8|0),c=~~+v(+ +Te(e,t)/(2*l)),P=s,0|(0==(0|c)?1:c)}function G(e,t,n,r){t|=0,n|=0,r|=0,i[(e|=0)>>2]=t,i[e+4>>2]=n,i[e+8>>2]=r}function X(e,t){e|=0;var n,r,a,s,u=0,c=0,f=0,d=0,p=0,h=0,g=0;i[(s=(t|=0)+8|0)>>2]=0,r=+o[e>>3],d=+l(+r),a=+o[e+8>>3],d+=.5*(p=+l(+a)/.8660254037844386),d-=+(0|(u=~~d)),p-=+(0|(e=~~p));do{if(d<.5){if(d<.3333333333333333){if(i[t>>2]=u,p<.5*(d+1)){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(e=(1&!(p<(g=1-d)))+e|0,i[t+4>>2]=e,g<=p&p<2*d){u=u+1|0,i[t>>2]=u;break}i[t>>2]=u;break}if(!(d<.6666666666666666)){if(u=u+1|0,i[t>>2]=u,p<.5*d){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(p<1-d){if(i[t+4>>2]=e,2*d-1>2]=u;break}}else e=e+1|0,i[t+4>>2]=e;u=u+1|0,i[t>>2]=u}while(0);do{if(r<0){if(1&e){u=~~(+(0|u)-(2*(+((h=0|_t(0|u,((0|u)<0)<<31>>31|0,0|(h=(e+1|0)/2|0),((0|h)<0)<<31>>31|0))>>>0)+4294967296*+(0|w()))+1)),i[t>>2]=u;break}u=~~(+(0|u)-2*(+((h=0|_t(0|u,((0|u)<0)<<31>>31|0,0|(h=(0|e)/2|0),((0|h)<0)<<31>>31|0))>>>0)+4294967296*+(0|w()))),i[t>>2]=u;break}}while(0);h=t+4|0,a<0&&(u=u-((1|e<<1)/2|0)|0,i[t>>2]=u,e=0-e|0,i[h>>2]=e),c=e-u|0,(0|u)<0?(f=0-u|0,i[h>>2]=c,i[s>>2]=f,i[t>>2]=0,e=c,u=0):f=0,(0|e)<0&&(u=u-e|0,i[t>>2]=u,f=f-e|0,i[s>>2]=f,i[h>>2]=0,e=0),n=u-f|0,c=e-f|0,(0|f)<0&&(i[t>>2]=n,i[h>>2]=c,i[s>>2]=0,e=c,u=n,f=0),(0|(c=(0|f)<(0|(c=(0|e)<(0|u)?e:u))?f:c))<=0||(i[t>>2]=u-c,i[h>>2]=e-c,i[s>>2]=f-c)}function Z(e){var t,n=0,r=0,o=0,a=0,s=0;n=0|i[(e|=0)>>2],r=0|i[(t=e+4|0)>>2],(0|n)<0&&(r=r-n|0,i[t>>2]=r,i[(s=e+8|0)>>2]=(0|i[s>>2])-n,i[e>>2]=0,n=0),(0|r)<0?(n=n-r|0,i[e>>2]=n,a=(0|i[(s=e+8|0)>>2])-r|0,i[s>>2]=a,i[t>>2]=0,r=0):(s=a=e+8|0,a=0|i[a>>2]),(0|a)<0&&(n=n-a|0,i[e>>2]=n,r=r-a|0,i[t>>2]=r,i[s>>2]=0,a=0),(0|(o=(0|a)<(0|(o=(0|r)<(0|n)?r:n))?a:o))<=0||(i[e>>2]=n-o,i[t>>2]=r-o,i[s>>2]=a-o)}function K(e,t){t|=0;var n,r;r=0|i[(e|=0)+8>>2],n=+((0|i[e+4>>2])-r|0),o[t>>3]=+((0|i[e>>2])-r|0)-.5*n,o[t+8>>3]=.8660254037844386*n}function $(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[t>>2])+(0|i[e>>2]),i[n+4>>2]=(0|i[t+4>>2])+(0|i[e+4>>2]),i[n+8>>2]=(0|i[t+8>>2])+(0|i[e+8>>2])}function J(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[e>>2])-(0|i[t>>2]),i[n+4>>2]=(0|i[e+4>>2])-(0|i[t+4>>2]),i[n+8>>2]=(0|i[e+8>>2])-(0|i[t+8>>2])}function Q(e,t){t|=0;var n,r=0;r=0|b(0|i[(e|=0)>>2],t),i[e>>2]=r,n=0|b(0|i[(r=e+4|0)>>2],t),i[r>>2]=n,t=0|b(0|i[(e=e+8|0)>>2],t),i[e>>2]=t}function ee(e){var t,n,r=0,o=0,a=0,s=0,l=0;l=(0|(n=0|i[(e|=0)>>2]))<0,e=(e=(o=(0|(s=((t=(0|(a=(0|i[e+4>>2])-(l?n:0)|0))<0)?0-a|0:0)+((0|i[e+8>>2])-(l?n:0))|0))<0)?0:s)-((a=(0|(o=(0|e)<(0|(o=(0|(r=(t?0:a)-(o?s:0)|0))<(0|(s=(l?0:n)-(t?a:0)-(o?s:0)|0))?r:s))?e:o))>0)?o:0)|0,r=r-(a?o:0)|0;e:do{switch(s-(a?o:0)|0){case 0:switch(0|r){case 0:return 0|(l=0==(0|e)?0:1==(0|e)?1:7);case 1:return 0|(l=0==(0|e)?2:1==(0|e)?3:7);default:break e}case 1:switch(0|r){case 0:return 0|(l=0==(0|e)?4:1==(0|e)?5:7);case 1:if(e)break e;return 0|(e=6);default:break e}}}while(0);return 0|(l=7)}function te(e){var t,n,r=0,o=0,a=0,s=0,l=0;o=0|i[(t=(e|=0)+8|0)>>2],a=0|mt(+((3*(r=(0|i[e>>2])-o|0)|0)-(o=(0|i[(n=e+4|0)>>2])-o|0)|0)/7),i[e>>2]=a,r=0|mt(+((o<<1)+r|0)/7),i[n>>2]=r,i[t>>2]=0,o=r-a|0,(0|a)<0?(l=0-a|0,i[n>>2]=o,i[t>>2]=l,i[e>>2]=0,r=o,a=0,o=l):o=0,(0|r)<0&&(a=a-r|0,i[e>>2]=a,o=o-r|0,i[t>>2]=o,i[n>>2]=0,r=0),l=a-o|0,s=r-o|0,(0|o)<0?(i[e>>2]=l,i[n>>2]=s,i[t>>2]=0,r=s,s=l,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=r-a,i[t>>2]=o-a)}function ne(e){var t,n,r=0,o=0,a=0,s=0,l=0;o=0|i[(t=(e|=0)+8|0)>>2],a=0|mt(+(((r=(0|i[e>>2])-o|0)<<1)+(o=(0|i[(n=e+4|0)>>2])-o|0)|0)/7),i[e>>2]=a,r=0|mt(+((3*o|0)-r|0)/7),i[n>>2]=r,i[t>>2]=0,o=r-a|0,(0|a)<0?(l=0-a|0,i[n>>2]=o,i[t>>2]=l,i[e>>2]=0,r=o,a=0,o=l):o=0,(0|r)<0&&(a=a-r|0,i[e>>2]=a,o=o-r|0,i[t>>2]=o,i[n>>2]=0,r=0),l=a-o|0,s=r-o|0,(0|o)<0?(i[e>>2]=l,i[n>>2]=s,i[t>>2]=0,r=s,s=l,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=r-a,i[t>>2]=o-a)}function re(e){var t,n,r,o=0,a=0,s=0,l=0;o=0|i[(e|=0)>>2],a=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],l=a+(3*o|0)|0,i[e>>2]=l,a=s+(3*a|0)|0,i[n>>2]=a,o=(3*s|0)+o|0,i[r>>2]=o,s=a-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=s,i[r>>2]=o,i[e>>2]=0,a=s,s=0):s=l,(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function ie(e){var t,n,r,o=0,a=0,s=0,l=0;l=0|i[(e|=0)>>2],s=(3*(o=0|i[(n=e+4|0)>>2])|0)+l|0,l=(a=0|i[(r=e+8|0)>>2])+(3*l|0)|0,i[e>>2]=l,i[n>>2]=s,o=(3*a|0)+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,l=0):a=s,(0|a)<0&&(l=l-a|0,i[e>>2]=l,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=l-o|0,s=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,l=t,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|l)?s:l))?o:a))<=0||(i[e>>2]=l-a,i[n>>2]=s-a,i[r>>2]=o-a)}function oe(e,t){e|=0;var n,r,o,a=0,s=0,l=0;((t|=0)+-1|0)>>>0>=6||(l=(0|i[15472+(12*t|0)>>2])+(0|i[e>>2])|0,i[e>>2]=l,o=e+4|0,s=(0|i[15472+(12*t|0)+4>>2])+(0|i[o>>2])|0,i[o>>2]=s,r=e+8|0,t=(0|i[15472+(12*t|0)+8>>2])+(0|i[r>>2])|0,i[r>>2]=t,a=s-l|0,(0|l)<0?(t=t-l|0,i[o>>2]=a,i[r>>2]=t,i[e>>2]=0,s=0):(a=s,s=l),(0|a)<0&&(s=s-a|0,i[e>>2]=s,t=t-a|0,i[r>>2]=t,i[o>>2]=0,a=0),n=s-t|0,l=a-t|0,(0|t)<0?(i[e>>2]=n,i[o>>2]=l,i[r>>2]=0,s=n,t=0):l=a,(0|(a=(0|t)<(0|(a=(0|l)<(0|s)?l:s))?t:a))<=0||(i[e>>2]=s-a,i[o>>2]=l-a,i[r>>2]=t-a))}function ae(e){var t,n,r,o=0,a=0,s=0,l=0;l=0|i[(e|=0)>>2],s=(o=0|i[(n=e+4|0)>>2])+l|0,l=(a=0|i[(r=e+8|0)>>2])+l|0,i[e>>2]=l,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,s=0):(a=s,s=l),(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function se(e){var t,n,r,o=0,a=0,s=0,l=0;o=0|i[(e|=0)>>2],s=0|i[(n=e+4|0)>>2],a=0|i[(r=e+8|0)>>2],l=s+o|0,i[e>>2]=l,s=a+s|0,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,s=0):(a=s,s=l),(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function le(e){switch(0|(e|=0)){case 1:e=5;break;case 5:e=4;break;case 4:e=6;break;case 6:e=2;break;case 2:e=3;break;case 3:e=1}return 0|e}function ue(e){switch(0|(e|=0)){case 1:e=3;break;case 3:e=2;break;case 2:e=6;break;case 6:e=4;break;case 4:e=5;break;case 5:e=1}return 0|e}function ce(e){var t,n,r,o=0,a=0,s=0,l=0;o=0|i[(e|=0)>>2],a=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],l=a+(o<<1)|0,i[e>>2]=l,a=s+(a<<1)|0,i[n>>2]=a,o=(s<<1)+o|0,i[r>>2]=o,s=a-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=s,i[r>>2]=o,i[e>>2]=0,a=s,s=0):s=l,(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function fe(e){var t,n,r,o=0,a=0,s=0,l=0;l=0|i[(e|=0)>>2],s=((o=0|i[(n=e+4|0)>>2])<<1)+l|0,l=(a=0|i[(r=e+8|0)>>2])+(l<<1)|0,i[e>>2]=l,i[n>>2]=s,o=(a<<1)+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,l=0):a=s,(0|a)<0&&(l=l-a|0,i[e>>2]=l,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=l-o|0,s=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,l=t,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|l)?s:l))?o:a))<=0||(i[e>>2]=l-a,i[n>>2]=s-a,i[r>>2]=o-a)}function de(e,t){t|=0;var n,r,o,a=0,s=0,l=0;return o=(0|(r=(0|i[(e|=0)>>2])-(0|i[t>>2])|0))<0,n=(0|(s=(0|i[e+4>>2])-(0|i[t+4>>2])-(o?r:0)|0))<0,t=(t=(e=(0|(l=(o?0-r|0:0)+(0|i[e+8>>2])-(0|i[t+8>>2])+(n?0-s|0:0)|0))<0)?0:l)-((s=(0|(e=(0|t)<(0|(e=(0|(a=(n?0:s)-(e?l:0)|0))<(0|(l=(o?0:r)-(n?s:0)-(e?l:0)|0))?a:l))?t:e))>0)?e:0)|0,a=a-(s?e:0)|0,0|((0|(e=(0|(e=l-(s?e:0)|0))>-1?e:0-e|0))>(0|(t=(0|(a=(0|a)>-1?a:0-a|0))>(0|(t=(0|t)>-1?t:0-t|0))?a:t))?e:t)}function pe(e,t){t|=0;var n;n=0|i[(e|=0)+8>>2],i[t>>2]=(0|i[e>>2])-n,i[t+4>>2]=(0|i[e+4>>2])-n}function he(e,t){t|=0;var n,r,o,a=0,s=0,l=0;s=0|i[(e|=0)>>2],i[t>>2]=s,e=0|i[e+4>>2],i[(r=t+4|0)>>2]=e,i[(o=t+8|0)>>2]=0,a=e-s|0,(0|s)<0?(e=0-s|0,i[r>>2]=a,i[o>>2]=e,i[t>>2]=0,s=0):(a=e,e=0),(0|a)<0&&(s=s-a|0,i[t>>2]=s,e=e-a|0,i[o>>2]=e,i[r>>2]=0,a=0),n=s-e|0,l=a-e|0,(0|e)<0?(i[t>>2]=n,i[r>>2]=l,i[o>>2]=0,a=l,l=n,e=0):l=s,(0|(s=(0|e)<(0|(s=(0|a)<(0|l)?a:l))?e:s))<=0||(i[t>>2]=l-s,i[r>>2]=a-s,i[o>>2]=e-s)}function ge(e){var t,n,r,o;n=(o=0|i[(t=(e|=0)+8|0)>>2])-(0|i[e>>2])|0,i[e>>2]=n,e=(0|i[(r=e+4|0)>>2])-o|0,i[r>>2]=e,i[t>>2]=0-(e+n)}function me(e){var t,n,r=0,o=0,a=0,s=0,l=0;r=0-(o=0|i[(e|=0)>>2])|0,i[e>>2]=r,i[(t=e+8|0)>>2]=0,s=(a=0|i[(n=e+4|0)>>2])+o|0,(0|o)>0?(i[n>>2]=s,i[t>>2]=o,i[e>>2]=0,r=0,a=s):o=0,(0|a)<0?(l=r-a|0,i[e>>2]=l,o=o-a|0,i[t>>2]=o,i[n>>2]=0,s=l-o|0,r=0-o|0,(0|o)<0?(i[e>>2]=s,i[n>>2]=r,i[t>>2]=0,a=r,o=0):(a=0,s=l)):s=r,(0|(r=(0|o)<(0|(r=(0|a)<(0|s)?a:s))?o:r))<=0||(i[e>>2]=s-r,i[n>>2]=a-r,i[t>>2]=o-r)}function ye(e,t,n,r){t|=0,n|=0,r|=0;var a,s=0,l=0,u=0,c=0;if(a=P,P=P+32|0,function(e,t){t|=0;var n,r,i=0;i=+o[(e=e|0)>>3],n=+f(+i),i=+d(+i),o[t+16>>3]=i,i=+o[e+8>>3],r=n*+f(+i),o[t>>3]=r,i=n*+d(+i),o[t+8>>3]=i}(e|=0,l=a),i[n>>2]=0,s=+lt(15888,l),(u=+lt(15912,l))>2]=1,s=u),(u=+lt(15936,l))>2]=2,s=u),(u=+lt(15960,l))>2]=3,s=u),(u=+lt(15984,l))>2]=4,s=u),(u=+lt(16008,l))>2]=5,s=u),(u=+lt(16032,l))>2]=6,s=u),(u=+lt(16056,l))>2]=7,s=u),(u=+lt(16080,l))>2]=8,s=u),(u=+lt(16104,l))>2]=9,s=u),(u=+lt(16128,l))>2]=10,s=u),(u=+lt(16152,l))>2]=11,s=u),(u=+lt(16176,l))>2]=12,s=u),(u=+lt(16200,l))>2]=13,s=u),(u=+lt(16224,l))>2]=14,s=u),(u=+lt(16248,l))>2]=15,s=u),(u=+lt(16272,l))>2]=16,s=u),(u=+lt(16296,l))>2]=17,s=u),(u=+lt(16320,l))>2]=18,s=u),(u=+lt(16344,l))>2]=19,s=u),(u=+h(+(1-.5*s)))<1e-16)return i[r>>2]=0,i[r+4>>2]=0,i[r+8>>2]=0,i[r+12>>2]=0,void(P=a);if(n=0|i[n>>2],s=+Me((s=+o[16368+(24*n|0)>>3])-+Me(+function(e,t){e|=0;var n,r,i,a,s;return a=+o[(t=t|0)>>3],r=+f(+a),i=+o[t+8>>3]-+o[e+8>>3],s=r*+d(+i),n=+o[e>>3],+ +y(+s,+(+d(+a)*+f(+n)-+f(+i)*(r*+d(+n))))}(15568+(n<<4)|0,e))),c=0|Be(t)?+Me(s+-.3334731722518321):s,s=+p(+u)/.381966011250105,(0|t)>0){l=0;do{s*=2.6457513110645907,l=l+1|0}while((0|l)!=(0|t))}u=+f(+c)*s,o[r>>3]=u,c=+d(+c)*s,o[r+8>>3]=c,P=a}function ve(e,t,n,r,a){t|=0,n|=0,r|=0,a|=0;var s=0,c=0;if((s=+function(e){var t,n;return n=+o[(e=e|0)>>3],t=+o[e+8>>3],+ +u(+(n*n+t*t))}(e|=0))<1e-16)return t=15568+(t<<4)|0,i[a>>2]=i[t>>2],i[a+4>>2]=i[t+4>>2],i[a+8>>2]=i[t+8>>2],void(i[a+12>>2]=i[t+12>>2]);if(c=+y(+ +o[e+8>>3],+ +o[e>>3]),(0|n)>0){e=0;do{s/=2.6457513110645907,e=e+1|0}while((0|e)!=(0|n))}r?(s/=3,n=0==(0|Be(n)),s=+m(.381966011250105*(n?s:s/2.6457513110645907))):(s=+m(.381966011250105*s),0|Be(n)&&(c=+Me(c+.3334731722518321))),function(e,t,n,r){e|=0,t=+t,r|=0;var a=0,s=0,u=0,c=0;if((n=+n)<1e-16)return i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],void(i[r+12>>2]=i[e+12>>2]);s=t<0?t+6.283185307179586:t,s=t>=6.283185307179586?s+-6.283185307179586:s;do{if(!(s<1e-16)){if(a=+l(+(s+-3.141592653589793))<1e-16,t=+o[e>>3],a){t-=n,o[r>>3]=t,a=r;break}if(u=+f(+n),n=+d(+n),t=u*+d(+t)+ +f(+s)*(n*+f(+t)),t=+g(+((t=t>1?1:t)<-1?-1:t)),o[r>>3]=t,+l(+(t+-1.5707963267948966))<1e-16)return o[r>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+l(+(t+1.5707963267948966))<1e-16)return o[r>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if(c=+f(+t),s=n*+d(+s)/c,n=+o[e>>3],t=(u-+d(+t)*+d(+n))/+f(+n)/c,u=s>1?1:s,t=t>1?1:t,(t=+o[e+8>>3]+ +y(+(u<-1?-1:u),+(t<-1?-1:t)))>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);return void(o[r+8>>3]=t)}t=+o[e>>3]+n,o[r>>3]=t,a=r}while(0);if(+l(+(t+-1.5707963267948966))<1e-16)return o[a>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+l(+(t+1.5707963267948966))<1e-16)return o[a>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if((t=+o[e+8>>3])>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);o[r+8>>3]=t}(15568+(t<<4)|0,+Me(+o[16368+(24*t|0)>>3]-c),s,a)}function be(e,t,n){t|=0,n|=0;var r,o;r=P,P=P+16|0,K((e|=0)+4|0,o=r),ve(o,0|i[e>>2],t,0,n),P=r}function _e(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,l,u,c,f,d,p,h,g,m,y,v,b,_,A,x,w,O,M,S,T,C,k=0,L=0,R=0,D=0,j=0,I=0;if(C=P,P=P+272|0,D=C+240|0,M=C,S=C+224|0,T=C+208|0,y=C+176|0,v=C+160|0,b=C+192|0,_=C+144|0,A=C+128|0,x=C+112|0,w=C+96|0,O=C+80|0,i[(k=C+256|0)>>2]=t,i[D>>2]=i[e>>2],i[D+4>>2]=i[e+4>>2],i[D+8>>2]=i[e+8>>2],i[D+12>>2]=i[e+12>>2],Ae(D,k,M),i[a>>2]=0,(0|(D=r+n+(5==(0|r)&1)|0))<=(0|n))P=C;else{l=S+4|0,u=y+4|0,c=n+5|0,f=16848+((s=0|i[k>>2])<<2)|0,d=16928+(s<<2)|0,p=A+8|0,h=x+8|0,g=w+8|0,m=T+4|0,R=n;e:for(;;){L=M+(((0|R)%5|0)<<4)|0,i[T>>2]=i[L>>2],i[T+4>>2]=i[L+4>>2],i[T+8>>2]=i[L+8>>2],i[T+12>>2]=i[L+12>>2];do{}while(2==(0|xe(T,s,0,1)));if((0|R)>(0|n)&0!=(0|Be(t))){if(i[y>>2]=i[T>>2],i[y+4>>2]=i[T+4>>2],i[y+8>>2]=i[T+8>>2],i[y+12>>2]=i[T+12>>2],K(l,v),r=0|i[y>>2],k=0|i[17008+(80*r|0)+(i[S>>2]<<2)>>2],i[y>>2]=i[18608+(80*r|0)+(20*k|0)>>2],(0|(L=0|i[18608+(80*r|0)+(20*k|0)+16>>2]))>0){e=0;do{ae(u),e=e+1|0}while((0|e)<(0|L))}switch(L=18608+(80*r|0)+(20*k|0)+4|0,i[b>>2]=i[L>>2],i[b+4>>2]=i[L+4>>2],i[b+8>>2]=i[L+8>>2],Q(b,3*(0|i[f>>2])|0),$(u,b,u),Z(u),K(u,_),j=+(0|i[d>>2]),o[A>>3]=3*j,o[p>>3]=0,I=-1.5*j,o[x>>3]=I,o[h>>3]=2.598076211353316*j,o[w>>3]=I,o[g>>3]=-2.598076211353316*j,0|i[17008+(80*(0|i[y>>2])|0)+(i[T>>2]<<2)>>2]){case 1:e=x,r=A;break;case 3:e=w,r=x;break;case 2:e=A,r=w;break;default:e=12;break e}at(v,_,r,e,O),ve(O,0|i[y>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])}if((0|R)<(0|c)&&(K(m,y),ve(y,0|i[T>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),i[S>>2]=i[T>>2],i[S+4>>2]=i[T+4>>2],i[S+8>>2]=i[T+8>>2],i[S+12>>2]=i[T+12>>2],(0|(R=R+1|0))>=(0|D)){e=3;break}}3!=(0|e)?12==(0|e)&&E(22474,22521,581,22531):P=C}}function Ae(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,l=0,u=0;r=P,P=P+128|0,a=r,l=20208,u=(s=o=r+64|0)+60|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));l=20272,u=(s=a)+60|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));o=(u=0==(0|Be(0|i[t>>2])))?o:a,ce(a=e+4|0),fe(a),0|Be(0|i[t>>2])&&(ie(a),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],$(a,o,t=n+4|0),Z(t),i[n+16>>2]=i[e>>2],$(a,o+12|0,t=n+20|0),Z(t),i[n+32>>2]=i[e>>2],$(a,o+24|0,t=n+36|0),Z(t),i[n+48>>2]=i[e>>2],$(a,o+36|0,t=n+52|0),Z(t),i[n+64>>2]=i[e>>2],$(a,o+48|0,n=n+68|0),Z(n),P=r}function xe(e,t,n,r){n|=0,r|=0;var o,a,s,l,u,c,f=0,d=0,p=0,h=0,g=0;if(c=P,P=P+32|0,u=c+12|0,a=c,g=(e|=0)+4|0,h=0|i[16928+((t|=0)<<2)>>2],h=(l=0!=(0|r))?3*h|0:h,f=0|i[g>>2],o=0|i[(s=e+8|0)>>2],l){if((0|(f=o+f+(r=0|i[(d=e+12|0)>>2])|0))==(0|h))return P=c,0|(g=1);p=d}else f=o+f+(r=0|i[(p=e+12|0)>>2])|0;if((0|f)<=(0|h))return P=c,0|(g=0);do{if((0|r)>0){if(r=0|i[e>>2],(0|o)>0){d=18608+(80*r|0)+60|0,r=e;break}r=18608+(80*r|0)+40|0,n?(G(u,h,0,0),J(g,u,a),se(a),$(a,u,g),d=r,r=e):(d=r,r=e)}else d=18608+(80*(0|i[e>>2])|0)+20|0,r=e}while(0);if(i[r>>2]=i[d>>2],(0|i[(f=d+16|0)>>2])>0){r=0;do{ae(g),r=r+1|0}while((0|r)<(0|i[f>>2]))}return e=d+4|0,i[u>>2]=i[e>>2],i[u+4>>2]=i[e+4>>2],i[u+8>>2]=i[e+8>>2],t=0|i[16848+(t<<2)>>2],Q(u,l?3*t|0:t),$(g,u,g),Z(g),r=l&&((0|i[s>>2])+(0|i[g>>2])+(0|i[p>>2])|0)==(0|h)?1:2,P=c,0|(g=r)}function we(e,t){e|=0,t|=0;var n=0;do{n=0|xe(e,t,0,1)}while(2==(0|n));return 0|n}function Ee(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,l,u,c,f,d,p,h,g,m,y,v,b,_,A,x,w,O,M=0,S=0,T=0,C=0,k=0;if(O=P,P=P+240|0,_=O+208|0,A=O,x=O+192|0,w=O+176|0,g=O+160|0,m=O+144|0,y=O+128|0,v=O+112|0,b=O+96|0,i[(M=O+224|0)>>2]=t,i[_>>2]=i[e>>2],i[_+4>>2]=i[e+4>>2],i[_+8>>2]=i[e+8>>2],i[_+12>>2]=i[e+12>>2],Oe(_,M,A),i[a>>2]=0,(0|(h=r+n+(6==(0|r)&1)|0))<=(0|n))P=O;else{l=n+6|0,u=16928+((s=0|i[M>>2])<<2)|0,c=m+8|0,f=y+8|0,d=v+8|0,p=x+4|0,S=0,T=n,r=-1;e:for(;;){if(e=A+((M=(0|T)%6|0)<<4)|0,i[x>>2]=i[e>>2],i[x+4>>2]=i[e+4>>2],i[x+8>>2]=i[e+8>>2],i[x+12>>2]=i[e+12>>2],e=S,S=0|xe(x,s,0,1),(0|T)>(0|n)&0!=(0|Be(t))&&(1!=(0|e)&&(0|i[x>>2])!=(0|r))){switch(K(A+(((M+5|0)%6|0)<<4)+4|0,w),K(A+(M<<4)+4|0,g),C=+(0|i[u>>2]),o[m>>3]=3*C,o[c>>3]=0,k=-1.5*C,o[y>>3]=k,o[f>>3]=2.598076211353316*C,o[v>>3]=k,o[d>>3]=-2.598076211353316*C,M=0|i[_>>2],0|i[17008+(80*M|0)+(((0|r)==(0|M)?0|i[x>>2]:r)<<2)>>2]){case 1:e=y,r=m;break;case 3:e=v,r=y;break;case 2:e=m,r=v;break;default:e=8;break e}at(w,g,r,e,b),0|st(w,b)||0|st(g,b)||(ve(b,0|i[_>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2]))}if((0|T)<(0|l)&&(K(p,w),ve(w,0|i[x>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),(0|(T=T+1|0))>=(0|h)){e=3;break}r=0|i[x>>2]}3!=(0|e)?8==(0|e)&&E(22557,22521,746,22602):P=O}}function Oe(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,l=0,u=0;r=P,P=P+160|0,a=r,l=20336,u=(s=o=r+80|0)+72|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));l=20416,u=(s=a)+72|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));o=(u=0==(0|Be(0|i[t>>2])))?o:a,ce(a=e+4|0),fe(a),0|Be(0|i[t>>2])&&(ie(a),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],$(a,o,t=n+4|0),Z(t),i[n+16>>2]=i[e>>2],$(a,o+12|0,t=n+20|0),Z(t),i[n+32>>2]=i[e>>2],$(a,o+24|0,t=n+36|0),Z(t),i[n+48>>2]=i[e>>2],$(a,o+36|0,t=n+52|0),Z(t),i[n+64>>2]=i[e>>2],$(a,o+48|0,t=n+68|0),Z(t),i[n+80>>2]=i[e>>2],$(a,o+60|0,n=n+84|0),Z(n),P=r}function Me(e){var t;return t=(e=+e)<0?e+6.283185307179586:e,+(e>=6.283185307179586?t+-6.283185307179586:t)}function Se(e,t){return t|=0,+l(+(+o[(e|=0)>>3]-+o[t>>3]))<17453292519943298e-27?0|(t=+l(+(+o[e+8>>3]-+o[t+8>>3]))<17453292519943298e-27):0|(t=0)}function Te(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+d(.5*(r-n)))*i+(a=+d(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+f(+r)*+f(+n)*a),2*+y(+ +u(+a),+ +u(+(1-a)))*6371.007180918475}function Ce(e,t,n){e|=0,n|=0;var r,i,a,s,l=0,c=0,h=0,g=0,v=0,b=0;return b=+o[(t|=0)>>3],a=+o[e>>3],v=+d(.5*(b-a)),h=+o[t+8>>3],i=+o[e+8>>3],g=+d(.5*(h-i)),r=+f(+a),s=+f(+b),g=2*+y(+ +u(+(g=v*v+g*(s*r*g))),+ +u(+(1-g))),v=+o[n>>3],b=+d(.5*(v-b)),l=+o[n+8>>3],h=+d(.5*(l-h)),c=+f(+v),h=2*+y(+ +u(+(h=b*b+h*(s*c*h))),+ +u(+(1-h))),v=+d(.5*(a-v)),l=+d(.5*(i-l)),l=2*+y(+ +u(+(l=v*v+l*(r*c*l))),+ +u(+(1-l))),4*+m(+ +u(+ +p(.5*(c=.5*(g+h+l)))*+p(.5*(c-g))*+p(.5*(c-h))*+p(.5*(c-l))))}function Pe(e,t){return t=0|Et(0|(e|=0),0|(t|=0),45),w(),127&t|0}function ke(e,t){var n=0,r=0,i=0,o=0,a=0,s=0;if(!(!0&134217728==(-16777216&(t|=0)|0)))return 0|(t=0);if(a=0|Et(0|(e|=0),0|t,45),w(),(a&=127)>>>0>121)return 0|(t=0);n=0|Et(0|e,0|t,52),w(),n&=15;do{if(0|n){for(i=1,r=0;;){if(o=0|Et(0|e,0|t,3*(15-i|0)|0),w(),0!=(0|(o&=7))&(1^r)){if(1==(0|o)&0!=(0|I(a))){s=0,r=13;break}r=1}if(7==(0|o)){s=0,r=13;break}if(!(i>>>0>>0)){r=9;break}i=i+1|0}if(9==(0|r)){if(15!=(0|n))break;return 0|(s=1)}if(13==(0|r))return 0|s}}while(0);for(;;){if(s=0|Et(0|e,0|t,3*(14-n|0)|0),w(),!(7==(7&s|0)&!0)){s=0,r=13;break}if(!(n>>>0<14)){s=1,r=13;break}n=n+1|0}return 13==(0|r)?0|s:0}function Le(e,t,n){n|=0;var r=0,i=0;if(r=0|Et(0|(e|=0),0|(t|=0),52),w(),(0|(r&=15))>=(0|n)){if((0|r)!=(0|n))if(n>>>0<=15){if(e|=i=0|Ot(0|n,0,52),t=0|w()|-15728641&t,(0|r)>(0|n))do{i=0|Ot(7,0,3*(14-n|0)|0),n=n+1|0,e|=i,t=0|w()|t}while((0|n)<(0|r))}else t=0,e=0}else t=0,e=0;return x(0|t),0|e}function Re(e,t,n,r){n|=0,r|=0;var o,a=0,s=0,l=0,u=0,c=0,f=0;if(l=0|Et(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(l&=15))<=(0|n)){if((0|l)==(0|n))return i[(n=r)>>2]=e,void(i[n+4>>2]=t);if(o=(0|(c=0|tt(7,n-l|0)))/7|0,u=0|Et(0|e,0|t,45),w(),0|I(127&u)){e:do{if(l)for(s=1;;){if(a=0|Et(0|e,0|t,3*(15-s|0)|0),w(),0|(a&=7))break e;if(!(s>>>0>>0)){a=0;break}s=s+1|0}else a=0}while(0);s=0==(0|a)}else s=0;if(f=0|Ot(l+1|0,0,52),a=0|w()|-15728641&t,Re(t=(f|e)&~(t=0|Ot(7,0,0|(u=3*(14-l|0)|0))),l=a&~(0|w()),n,r),a=r+(o<<3)|0,!s)return Re((f=0|Ot(1,0,0|u))|t,0|w()|l,n,a),f=a+(o<<3)|0,Re((c=0|Ot(2,0,0|u))|t,0|w()|l,n,f),f=f+(o<<3)|0,Re((c=0|Ot(3,0,0|u))|t,0|w()|l,n,f),f=f+(o<<3)|0,Re((c=0|Ot(4,0,0|u))|t,0|w()|l,n,f),f=f+(o<<3)|0,Re((c=0|Ot(5,0,0|u))|t,0|w()|l,n,f),void Re((c=0|Ot(6,0,0|u))|t,0|w()|l,n,f+(o<<3)|0);s=a+(o<<3)|0,(0|c)>6&&(Ct(0|a,0,(f=(s>>>0>(c=a+8|0)>>>0?s:c)+-1+(0-a)|0)+8&-8|0),a=c+(f>>>3<<3)|0),Re((f=0|Ot(2,0,0|u))|t,0|w()|l,n,a),f=a+(o<<3)|0,Re((c=0|Ot(3,0,0|u))|t,0|w()|l,n,f),f=f+(o<<3)|0,Re((c=0|Ot(4,0,0|u))|t,0|w()|l,n,f),f=f+(o<<3)|0,Re((c=0|Ot(5,0,0|u))|t,0|w()|l,n,f),Re((c=0|Ot(6,0,0|u))|t,0|w()|l,n,f+(o<<3)|0)}}function De(e,t){var n=0,r=0,i=0;if(i=0|Et(0|(e|=0),0|(t|=0),45),w(),!(0|I(127&i)))return 0|(i=0);i=0|Et(0|e,0|t,52),w(),i&=15;e:do{if(i)for(r=1;;){if(n=0|Et(0|e,0|t,3*(15-r|0)|0),w(),0|(n&=7))break e;if(!(r>>>0>>0)){n=0;break}r=r+1|0}else n=0}while(0);return 0|(i=0==(0|n)&1)}function je(e,t){var n=0,r=0,i=0;if(i=0|Et(0|(e|=0),0|(t|=0),52),w(),!(i&=15))return 0|(i=0);for(r=1;;){if(n=0|Et(0|e,0|t,3*(15-r|0)|0),w(),0|(n&=7)){r=5;break}if(!(r>>>0>>0)){n=0,r=5;break}r=r+1|0}return 5==(0|r)?0|n:0}function Ie(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,l=0;if(l=0|Et(0|(e|=0),0|(t|=0),52),w(),!(l&=15))return l=e,x(0|(s=t)),0|l;for(s=1,n=0;;){r=0|Ot(7,0,0|(o=3*(15-s|0)|0)),i=0|w(),a=0|Et(0|e,0|t,0|o),w(),e=(o=0|Ot(0|le(7&a),0,0|o))|e&~r,t=(a=0|w())|t&~i;e:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Et(0|e,0|t,52),w(),r&=15){n=1;t:for(;;){switch(a=0|Et(0|e,0|t,3*(15-n|0)|0),w(),7&a){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(i=0|Et(0|e,0|t,0|(a=3*(15-n|0)|0)),w(),o=0|Ot(7,0,0|a),t&=~(0|w()),e=e&~o|(a=0|Ot(0|le(7&i),0,0|a)),t=0|t|w(),!(n>>>0>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0>>0))break;s=s+1|0}return x(0|t),0|e}function Ne(e,t){var n=0,r=0,i=0,o=0,a=0;if(r=0|Et(0|(e|=0),0|(t|=0),52),w(),!(r&=15))return r=e,x(0|(n=t)),0|r;for(n=1;a=0|Et(0|e,0|t,0|(o=3*(15-n|0)|0)),w(),i=0|Ot(7,0,0|o),t&=~(0|w()),e=(o=0|Ot(0|le(7&a),0,0|o))|e&~i,t=0|w()|t,n>>>0>>0;)n=n+1|0;return x(0|t),0|e}function Fe(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,l=0;if(l=0|Et(0|(e|=0),0|(t|=0),52),w(),!(l&=15))return l=e,x(0|(s=t)),0|l;for(s=1,n=0;;){r=0|Ot(7,0,0|(o=3*(15-s|0)|0)),i=0|w(),a=0|Et(0|e,0|t,0|o),w(),e=(o=0|Ot(0|ue(7&a),0,0|o))|e&~r,t=(a=0|w())|t&~i;e:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Et(0|e,0|t,52),w(),r&=15){n=1;t:for(;;){switch(a=0|Et(0|e,0|t,3*(15-n|0)|0),w(),7&a){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(o=0|Ot(7,0,0|(i=3*(15-n|0)|0)),a=t&~(0|w()),t=0|Et(0|e,0|t,0|i),w(),e=e&~o|(t=0|Ot(0|ue(7&t),0,0|i)),t=0|a|w(),!(n>>>0>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0>>0))break;s=s+1|0}return x(0|t),0|e}function ze(e,t){var n=0,r=0,i=0,o=0,a=0;if(r=0|Et(0|(e|=0),0|(t|=0),52),w(),!(r&=15))return r=e,x(0|(n=t)),0|r;for(n=1;o=0|Ot(7,0,0|(a=3*(15-n|0)|0)),i=t&~(0|w()),t=0|Et(0|e,0|t,0|a),w(),e=(t=0|Ot(0|ue(7&t),0,0|a))|e&~o,t=0|w()|i,n>>>0>>0;)n=n+1|0;return x(0|t),0|e}function Be(e){return 0|(0|(e|=0))%2}function Ue(e,t){e|=0;var n,r;return r=P,P=P+16|0,n=r,(t|=0)>>>0<=15&&2146435072!=(2146435072&i[e+4>>2]|0)&&2146435072!=(2146435072&i[e+8+4>>2]|0)?(!function(e,t,n){var r,i;r=P,P=P+16|0,ye(e|=0,t|=0,n|=0,i=r),X(i,n+4|0),P=r}(e,t,n),t=0|function(e,t){e|=0;var n,r=0,o=0,a=0,s=0,l=0,u=0,c=0,f=0;if(n=P,P=P+64|0,u=n+40|0,o=n+24|0,a=n+12|0,s=n,Ot(0|(t|=0),0,52),r=134225919|w(),!t)return(0|i[e+4>>2])>2||(0|i[e+8>>2])>2||(0|i[e+12>>2])>2?(u=0,x(0|(l=0)),P=n,0|u):(Ot(0|F(e),0,45),l=0|w()|r,u=-1,x(0|l),P=n,0|u);if(i[u>>2]=i[e>>2],i[u+4>>2]=i[e+4>>2],i[u+8>>2]=i[e+8>>2],i[u+12>>2]=i[e+12>>2],l=u+4|0,(0|t)>0)for(e=-1;i[o>>2]=i[l>>2],i[o+4>>2]=i[l+4>>2],i[o+8>>2]=i[l+8>>2],1&t?(te(l),i[a>>2]=i[l>>2],i[a+4>>2]=i[l+4>>2],i[a+8>>2]=i[l+8>>2],re(a)):(ne(l),i[a>>2]=i[l>>2],i[a+4>>2]=i[l+4>>2],i[a+8>>2]=i[l+8>>2],ie(a)),J(o,a,s),Z(s),c=0|Ot(7,0,0|(f=3*(15-t|0)|0)),r&=~(0|w()),e=(f=0|Ot(0|ee(s),0,0|f))|e&~c,r=0|w()|r,(0|t)>1;)t=t+-1|0;else e=-1;e:do{if((0|i[l>>2])<=2&&(0|i[u+8>>2])<=2&&(0|i[u+12>>2])<=2){if(t=0|Ot(0|(o=0|F(u)),0,45),t|=e,e=0|w()|-1040385&r,s=0|z(u),!(0|I(o))){if((0|s)<=0)break;for(a=0;;){if(o=0|Et(0|t,0|e,52),w(),o&=15)for(r=1;u=0|Et(0|t,0|e,0|(f=3*(15-r|0)|0)),w(),c=0|Ot(7,0,0|f),e&=~(0|w()),t=t&~c|(f=0|Ot(0|le(7&u),0,0|f)),e=0|e|w(),r>>>0>>0;)r=r+1|0;if((0|(a=a+1|0))==(0|s))break e}}a=0|Et(0|t,0|e,52),w(),a&=15;t:do{if(a){r=1;n:for(;;){switch(f=0|Et(0|t,0|e,3*(15-r|0)|0),w(),7&f){case 1:break n;case 0:break;default:break t}if(!(r>>>0>>0))break t;r=r+1|0}if(0|B(o,0|i[u>>2]))for(r=1;c=0|Ot(7,0,0|(u=3*(15-r|0)|0)),f=e&~(0|w()),e=0|Et(0|t,0|e,0|u),w(),t=t&~c|(e=0|Ot(0|ue(7&e),0,0|u)),e=0|f|w(),r>>>0>>0;)r=r+1|0;else for(r=1;u=0|Et(0|t,0|e,0|(f=3*(15-r|0)|0)),w(),c=0|Ot(7,0,0|f),e&=~(0|w()),t=t&~c|(f=0|Ot(0|le(7&u),0,0|f)),e=0|e|w(),r>>>0>>0;)r=r+1|0}}while(0);if((0|s)>0){r=0;do{t=0|Ie(t,e),e=0|w(),r=r+1|0}while((0|r)!=(0|s))}}else t=0,e=0}while(0);return f=t,x(0|(c=e)),P=n,0|f}(n,t),e=0|w()):(e=0,t=0),x(0|e),P=r,0|t}function Ve(e,t,n){var r,o=0,a=0,s=0;if(r=(n|=0)+4|0,a=0|Et(0|(e|=0),0|(t|=0),52),w(),a&=15,s=0|Et(0|e,0|t,45),w(),o=0==(0|a),0|I(127&s)){if(o)return 0|(s=1);o=1}else{if(o)return 0|(s=0);o=0==(0|i[r>>2])&&0==(0|i[n+8>>2])?0!=(0|i[n+12>>2])&1:1}for(n=1;1&n?re(r):ie(r),s=0|Et(0|e,0|t,3*(15-n|0)|0),w(),oe(r,7&s),n>>>0>>0;)n=n+1|0;return 0|o}function He(e,t,n){n|=0;var r,o,a=0,s=0,l=0,u=0,c=0,f=0;o=P,P=P+16|0,r=o,f=0|Et(0|(e|=0),0|(t|=0),45),w(),f&=127;e:do{if(0!=(0|I(f))&&(l=0|Et(0|e,0|t,52),w(),0!=(0|(l&=15)))){a=1;t:for(;;){switch(c=0|Et(0|e,0|t,3*(15-a|0)|0),w(),7&c){case 5:break t;case 0:break;default:a=t;break e}if(!(a>>>0>>0)){a=t;break e}a=a+1|0}for(s=1,a=t;u=0|Ot(7,0,0|(t=3*(15-s|0)|0)),c=a&~(0|w()),a=0|Et(0|e,0|a,0|t),w(),e=e&~u|(a=0|Ot(0|ue(7&a),0,0|t)),a=0|c|w(),s>>>0>>0;)s=s+1|0}else a=t}while(0);if(c=7728+(28*f|0)|0,i[n>>2]=i[c>>2],i[n+4>>2]=i[c+4>>2],i[n+8>>2]=i[c+8>>2],i[n+12>>2]=i[c+12>>2],0|Ve(e,a,n)){if(u=n+4|0,i[r>>2]=i[u>>2],i[r+4>>2]=i[u+4>>2],i[r+8>>2]=i[u+8>>2],l=0|Et(0|e,0|a,52),w(),c=15&l,1&l?(ie(u),l=c+1|0):l=c,0|I(f)){e:do{if(c)for(t=1;;){if(s=0|Et(0|e,0|a,3*(15-t|0)|0),w(),0|(s&=7)){a=s;break e}if(!(t>>>0>>0)){a=0;break}t=t+1|0}else a=0}while(0);a=4==(0|a)&1}else a=0;if(0|xe(n,l,a,0)){if(0|I(f))do{}while(0!=(0|xe(n,l,0,0)));(0|l)!=(0|c)&&ne(u)}else(0|l)!=(0|c)&&(i[u>>2]=i[r>>2],i[u+4>>2]=i[r+4>>2],i[u+8>>2]=i[r+8>>2]);P=o}else P=o}function We(e,t,n){n|=0;var r,i;r=P,P=P+16|0,He(e|=0,t|=0,i=r),t=0|Et(0|e,0|t,52),w(),be(i,15&t,n),P=r}function qe(e,t,n){n|=0;var r,i,o=0,a=0;i=P,P=P+16|0,He(e|=0,t|=0,r=i),o=0|Et(0|e,0|t,45),w(),o=0==(0|I(127&o)),a=0|Et(0|e,0|t,52),w(),a&=15;e:do{if(!o){if(0|a)for(o=1;;){if(!(0==((0|Ot(7,0,3*(15-o|0)|0))&e|0)&0==((0|w())&t|0)))break e;if(!(o>>>0>>0))break;o=o+1|0}return _e(r,a,0,5,n),void(P=i)}}while(0);Ee(r,a,0,6,n),P=i}function Ye(e,t){t|=0;var n,r=0,o=0,a=0,s=0,l=0,u=0;if(Ot(0|(e|=0),0,52),n=134225919|w(),(0|e)<1){o=0,r=0;do{0|I(o)&&(Ot(0|o,0,45),l=0|n|w(),i[(e=t+(r<<3)|0)>>2]=-1,i[e+4>>2]=l,r=r+1|0),o=o+1|0}while(122!=(0|o))}else{l=0,r=0;do{if(0|I(l)){for(Ot(0|l,0,45),o=1,a=-1,s=0|n|w();a&=~(u=0|Ot(7,0,3*(15-o|0)|0)),s&=~(0|w()),(0|o)!=(0|e);)o=o+1|0;i[(u=t+(r<<3)|0)>>2]=a,i[u+4>>2]=s,r=r+1|0}l=l+1|0}while(122!=(0|l))}}function Ge(e,t,n,r){var o,a=0,s=0,l=0,u=0,c=0;if(o=P,P=P+64|0,l=o,(0|(e|=0))==(0|(n|=0))&(0|(t|=0))==(0|(r|=0))|!1|134217728!=(2013265920&t|0)|!1|134217728!=(2013265920&r|0))return P=o,0|(l=0);if(a=0|Et(0|e,0|t,52),w(),a&=15,s=0|Et(0|n,0|r,52),w(),(0|a)!=(15&s|0))return P=o,0|(l=0);if(s=a+-1|0,a>>>0>1&&(c=0|Le(e,t,s),u=0|w(),(0|c)==(0|(s=0|Le(n,r,s)))&(0|u)==(0|w()))){if(a=0|Et(0|e,0|t,0|(s=3*(15^a)|0)),w(),a&=7,s=0|Et(0|n,0|r,0|s),w(),0==(0|a)|0==(0|(s&=7)))return P=o,0|(c=1);if((0|i[21136+(a<<2)>>2])==(0|s))return P=o,0|(c=1);if((0|i[21168+(a<<2)>>2])==(0|s))return P=o,0|(c=1)}s=(a=l)+56|0;do{i[a>>2]=0,a=a+4|0}while((0|a)<(0|s));return k(e,t,1,l),a=(0|i[(c=l)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+8|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+16|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+24|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+32|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+40|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)?1:1&((0|i[(a=l+48|0)>>2])==(0|n)?(0|i[a+4>>2])==(0|r):0),P=o,0|(c=a)}function Xe(e,t,n){n|=0;var r,o,a,s,l=0;if(a=P,P=P+16|0,o=a,l=0|Et(0|(e|=0),0|(t|=0),56),w(),-1==(0|(t=0|function(e,t,n){n|=0;var r,o=0;if(o=0|De(e=e|0,t=t|0),(n+-1|0)>>>0>5)return 0|(n=-1);if(1==(0|n)&(r=0!=(0|o)))return 0|(n=-1);return o=0|function(e,t){var n,r,o,a=0,s=0,l=0,u=0,c=0;if(o=P,P=P+32|0,r=o,He(e=e|0,t=t|0,n=o+16|0),l=0|Pe(e,t),c=0|je(e,t),function(e,t){e=7728+(28*(e|=0)|0)|0,i[(t|=0)>>2]=i[e>>2],i[t+4>>2]=i[e+4>>2],i[t+8>>2]=i[e+8>>2],i[t+12>>2]=i[e+12>>2]}(l,r),t=0|function(e,t){e|=0;var n=0,r=0;if((t|=0)>>>0>20)return 0|(t=-1);do{if((0|i[11152+(216*t|0)>>2])!=(0|e))if((0|i[11152+(216*t|0)+8>>2])!=(0|e))if((0|i[11152+(216*t|0)+16>>2])!=(0|e))if((0|i[11152+(216*t|0)+24>>2])!=(0|e))if((0|i[11152+(216*t|0)+32>>2])!=(0|e))if((0|i[11152+(216*t|0)+40>>2])!=(0|e))if((0|i[11152+(216*t|0)+48>>2])!=(0|e))if((0|i[11152+(216*t|0)+56>>2])!=(0|e))if((0|i[11152+(216*t|0)+64>>2])!=(0|e))if((0|i[11152+(216*t|0)+72>>2])!=(0|e))if((0|i[11152+(216*t|0)+80>>2])!=(0|e))if((0|i[11152+(216*t|0)+88>>2])!=(0|e))if((0|i[11152+(216*t|0)+96>>2])!=(0|e))if((0|i[11152+(216*t|0)+104>>2])!=(0|e))if((0|i[11152+(216*t|0)+112>>2])!=(0|e))if((0|i[11152+(216*t|0)+120>>2])!=(0|e))if((0|i[11152+(216*t|0)+128>>2])!=(0|e)){if((0|i[11152+(216*t|0)+136>>2])!=(0|e)){if((0|i[11152+(216*t|0)+144>>2])==(0|e)){e=0,n=2,r=0;break}if((0|i[11152+(216*t|0)+152>>2])==(0|e)){e=0,n=2,r=1;break}if((0|i[11152+(216*t|0)+160>>2])==(0|e)){e=0,n=2,r=2;break}if((0|i[11152+(216*t|0)+168>>2])==(0|e)){e=1,n=2,r=0;break}if((0|i[11152+(216*t|0)+176>>2])==(0|e)){e=1,n=2,r=1;break}if((0|i[11152+(216*t|0)+184>>2])==(0|e)){e=1,n=2,r=2;break}if((0|i[11152+(216*t|0)+192>>2])==(0|e)){e=2,n=2,r=0;break}if((0|i[11152+(216*t|0)+200>>2])==(0|e)){e=2,n=2,r=1;break}if((0|i[11152+(216*t|0)+208>>2])==(0|e)){e=2,n=2,r=2;break}return 0|(e=-1)}e=2,n=1,r=2}else e=2,n=1,r=1;else e=2,n=1,r=0;else e=1,n=1,r=2;else e=1,n=1,r=1;else e=1,n=1,r=0;else e=0,n=1,r=2;else e=0,n=1,r=1;else e=0,n=1,r=0;else e=2,n=0,r=2;else e=2,n=0,r=1;else e=2,n=0,r=0;else e=1,n=0,r=2;else e=1,n=0,r=1;else e=1,n=0,r=0;else e=0,n=0,r=2;else e=0,n=0,r=1;else e=0,n=0,r=0}while(0);return 0|(t=0|i[11152+(216*t|0)+(72*n|0)+(24*e|0)+(r<<3)+4>>2])}(l,0|i[n>>2]),!(0|I(l)))return P=o,0|(c=t);switch(0|l){case 4:e=0,a=14;break;case 14:e=1,a=14;break;case 24:e=2,a=14;break;case 38:e=3,a=14;break;case 49:e=4,a=14;break;case 58:e=5,a=14;break;case 63:e=6,a=14;break;case 72:e=7,a=14;break;case 83:e=8,a=14;break;case 97:e=9,a=14;break;case 107:e=10,a=14;break;case 117:e=11,a=14;break;default:u=0,s=0}14==(0|a)&&(u=0|i[22096+(24*e|0)+8>>2],s=0|i[22096+(24*e|0)+16>>2]);(0|(e=0|i[n>>2]))!=(0|i[r>>2])&&(l=0|N(l),e=0|i[n>>2],l|(0|e)==(0|s)&&(t=(t+1|0)%6|0));if(3==(0|c)&(0|e)==(0|s))return P=o,0|(c=(t+5|0)%6|0);if(!(5==(0|c)&(0|e)==(0|u)))return P=o,0|(c=t);return P=o,0|(c=(t+1|0)%6|0)}(e,t),r?0|(n=(5-o+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-o+(0|i[22416+(n<<2)>>2])|0)%6|0)}(r=(s=!0&268435456==(2013265920&t|0))?e:0,e=s?-2130706433&t|134217728:0,7&l))))return i[n>>2]=0,void(P=a);He(r,e,o),l=0|Et(0|r,0|e,52),w(),l&=15,0|De(r,e)?_e(o,l,t,2,n):Ee(o,l,t,2,n),P=a}function Ze(e){e|=0;var t,n,r=0;return(t=0|bt(1,12))||E(22691,22646,49,22704),0|(r=0|i[(n=e+4|0)>>2])?(i[(r=r+8|0)>>2]=t,i[n>>2]=t,0|t):(0|i[e>>2]&&E(22721,22646,61,22744),i[(r=e)>>2]=t,i[n>>2]=t,0|t)}function Ke(e,t){e|=0,t|=0;var n,r;return(r=0|yt(24))||E(22758,22646,78,22772),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[r+16>>2]=0,0|(n=0|i[(t=e+4|0)>>2])?(i[n+16>>2]=r,i[t>>2]=r,0|r):(0|i[e>>2]&&E(22787,22646,82,22772),i[e>>2]=r,i[t>>2]=r,0|r)}function $e(e){var t,n,r=0,a=0,s=0,u=0,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0,A=0,x=0,w=0,O=0,M=0,S=0,T=0,C=0,P=0,k=0,L=0,R=0,D=0,j=0,I=0;if(0|i[(u=(e|=0)+8|0)>>2])return 0|(I=1);if(!(s=0|i[e>>2]))return 0|(I=0);r=s,a=0;do{a=a+1|0,r=0|i[r+8>>2]}while(0!=(0|r));if(a>>>0<2)return 0|(I=0);(n=0|yt(a<<2))||E(22807,22646,317,22826),(t=0|yt(a<<5))||E(22848,22646,321,22826),i[e>>2]=0,i[(T=e+4|0)>>2]=0,i[u>>2]=0,a=0,D=0,S=0,m=0;e:for(;;){if(g=0|i[s>>2]){c=0,f=g;do{if(p=+o[f+8>>3],r=f,f=0|i[f+16>>2],d=+o[(u=(h=0==(0|f))?g:f)+8>>3],+l(+(p-d))>3.141592653589793){I=14;break}c+=(d-p)*(+o[r>>3]+ +o[u>>3])}while(!h);if(14==(0|I)){I=0,c=0,r=g;do{M=+o[r+8>>3],L=0|i[(R=r+16|0)>>2],O=+o[(L=0==(0|L)?g:L)+8>>3],c+=(+o[r>>3]+ +o[L>>3])*((O<0?O+6.283185307179586:O)-(M<0?M+6.283185307179586:M)),r=0|i[(0==(0|r)?s:R)>>2]}while(0!=(0|r))}c>0?(i[n+(D<<2)>>2]=s,D=D+1|0,u=S,r=m):I=19}else I=19;if(19==(0|I)){I=0;do{if(!a){if(m){u=T,f=m+8|0,r=s,a=e;break}if(0|i[e>>2]){I=27;break e}u=T,f=e,r=s,a=e;break}if(0|i[(r=a+8|0)>>2]){I=21;break e}if(!(a=0|bt(1,12))){I=23;break e}i[r>>2]=a,u=a+4|0,f=a,r=m}while(0);if(i[f>>2]=s,i[u>>2]=s,f=t+(S<<5)|0,h=0|i[s>>2]){for(o[(g=t+(S<<5)+8|0)>>3]=17976931348623157e292,o[(m=t+(S<<5)+24|0)>>3]=17976931348623157e292,o[f>>3]=-17976931348623157e292,o[(y=t+(S<<5)+16|0)>>3]=-17976931348623157e292,x=17976931348623157e292,w=-17976931348623157e292,u=0,v=h,p=17976931348623157e292,_=17976931348623157e292,A=-17976931348623157e292,d=-17976931348623157e292;c=+o[v>>3],M=+o[v+8>>3],v=0|i[v+16>>2],O=+o[((b=0==(0|v))?h:v)+8>>3],c>3]=c,p=c),M<_&&(o[m>>3]=M,_=M),c>A?o[f>>3]=c:c=A,M>d&&(o[y>>3]=M,d=M),x=M>0&Mw?M:w,u|=+l(+(M-O))>3.141592653589793,!b;)A=c;u&&(o[y>>3]=w,o[m>>3]=x)}else i[f>>2]=0,i[f+4>>2]=0,i[f+8>>2]=0,i[f+12>>2]=0,i[f+16>>2]=0,i[f+20>>2]=0,i[f+24>>2]=0,i[f+28>>2]=0;u=S+1|0}if(s=0|i[(R=s+8|0)>>2],i[R>>2]=0,!s){I=45;break}S=u,m=r}if(21==(0|I))E(22624,22646,35,22658);else if(23==(0|I))E(22678,22646,37,22658);else if(27==(0|I))E(22721,22646,61,22744);else if(45==(0|I)){e:do{if((0|D)>0){for(R=0==(0|u),k=u<<2,L=0==(0|e),P=0,r=0;;){if(C=0|i[n+(P<<2)>>2],R)I=73;else{if(!(S=0|yt(k))){I=50;break}if(!(T=0|yt(k))){I=52;break}t:do{if(L)a=0;else{for(u=0,a=0,f=e;s=t+(u<<5)|0,0|Je(0|i[f>>2],s,0|i[C>>2])?(i[S+(a<<2)>>2]=f,i[T+(a<<2)>>2]=s,b=a+1|0):b=a,f=0|i[f+8>>2];)u=u+1|0,a=b;if((0|b)>0)if(s=0|i[S>>2],1==(0|b))a=s;else for(y=0,v=-1,a=s,m=s;;){for(h=0|i[m>>2],s=0,f=0;g=(0|(u=0|i[i[S+(f<<2)>>2]>>2]))==(0|h)?s:s+(1&(0|Je(u,0|i[T+(f<<2)>>2],0|i[h>>2])))|0,(0|(f=f+1|0))!=(0|b);)s=g;if(a=(u=(0|g)>(0|v))?m:a,(0|(s=y+1|0))==(0|b))break t;y=s,v=u?g:v,m=0|i[S+(s<<2)>>2]}else a=0}}while(0);if(vt(S),vt(T),a){if(s=0|i[(u=a+4|0)>>2])a=s+8|0;else if(0|i[a>>2]){I=70;break}i[a>>2]=C,i[u>>2]=C}else I=73}if(73==(0|I)){if(I=0,0|(r=0|i[C>>2]))do{T=r,r=0|i[r+16>>2],vt(T)}while(0!=(0|r));vt(C),r=2}if((0|(P=P+1|0))>=(0|D)){j=r;break e}}50==(0|I)?E(22863,22646,249,22882):52==(0|I)?E(22901,22646,252,22882):70==(0|I)&&E(22721,22646,61,22744)}else j=0}while(0);return vt(n),vt(t),0|(I=j)}return 0}function Je(e,t,n){e|=0;var r,a=0,s=0,l=0,u=0,c=0,f=0,d=0;if(!(0|W(t|=0,n|=0)))return 0|(e=0);if(t=0|H(t),r=+o[n>>3],a=t&(a=+o[n+8>>3])<0?a+6.283185307179586:a,!(e=0|i[e>>2]))return 0|(e=0);if(t){t=0,n=e;e:for(;;){for(;u=+o[n>>3],f=+o[n+8>>3],d=0|i[(n=n+16|0)>>2],l=+o[(d=0==(0|d)?e:d)>>3],s=+o[d+8>>3],u>l?(c=u,u=f):(c=l,l=u,u=s,s=f),rc;)if(!(n=0|i[n>>2])){n=22;break e}if(a=(u=u<0?u+6.283185307179586:u)==a|(f=s<0?s+6.283185307179586:s)==a?a+-2220446049250313e-31:a,((f+=(r-l)/(c-l)*(u-f))<0?f+6.283185307179586:f)>a&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}else{t=0,n=e;e:for(;;){for(;u=+o[n>>3],f=+o[n+8>>3],d=0|i[(n=n+16|0)>>2],l=+o[(d=0==(0|d)?e:d)>>3],s=+o[d+8>>3],u>l?(c=u,u=f):(c=l,l=u,u=s,s=f),rc;)if(!(n=0|i[n>>2])){n=22;break e}if(s+(r-l)/(c-l)*(u-s)>(a=u==a|s==a?a+-2220446049250313e-31:a)&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}return 0}function Qe(e,t,n,o,a){n|=0,o|=0,a|=0;var s,l,u,c,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0;if(c=P,P=P+32|0,_=c+16|0,u=c,f=0|Et(0|(e|=0),0|(t|=0),52),w(),f&=15,y=0|Et(0|n,0|o,52),w(),(0|f)!=(15&y|0))return P=c,0|(_=1);if(g=0|Et(0|e,0|t,45),w(),g&=127,m=0|Et(0|n,0|o,45),w(),y=(0|g)!=(0|(m&=127))){if(7==(0|(p=0|V(g,m))))return P=c,0|(_=2);7==(0|(h=0|V(m,g)))?E(22925,22949,151,22959):(v=p,d=h)}else v=0,d=0;s=0|I(g),l=0|I(m),i[_>>2]=0,i[_+4>>2]=0,i[_+8>>2]=0,i[_+12>>2]=0;do{if(v){if(p=(0|(m=0|i[4304+(28*g|0)+(v<<2)>>2]))>0,l)if(p){g=0,h=n,p=o;do{h=0|Fe(h,p),p=0|w(),1==(0|(d=0|ue(d)))&&(d=0|ue(1)),g=g+1|0}while((0|g)!=(0|m));m=d,g=h,h=p}else m=d,g=n,h=o;else if(p){g=0,h=n,p=o;do{h=0|ze(h,p),p=0|w(),d=0|ue(d),g=g+1|0}while((0|g)!=(0|m));m=d,g=h,h=p}else m=d,g=n,h=o;if(Ve(g,h,_),y||E(22972,22949,181,22959),(p=0!=(0|s))&(d=0!=(0|l))&&E(22999,22949,182,22959),p){if(d=0|je(e,t),0|r[22032+(7*d|0)+v>>0]){f=3;break}g=h=0|i[21200+(28*d|0)+(v<<2)>>2],b=26}else if(d){if(d=0|je(g,h),0|r[22032+(7*d|0)+m>>0]){f=4;break}g=0,h=0|i[21200+(28*m|0)+(d<<2)>>2],b=26}else d=0;if(26==(0|b))if((0|h)<=-1&&E(23030,22949,212,22959),(0|g)<=-1&&E(23053,22949,213,22959),(0|h)>0){p=_+4|0,d=0;do{se(p),d=d+1|0}while((0|d)!=(0|h));d=g}else d=g;if(i[u>>2]=0,i[u+4>>2]=0,i[u+8>>2]=0,oe(u,v),0|f)for(;0|Be(f)?re(u):ie(u),(0|f)>1;)f=f+-1|0;if((0|d)>0){f=0;do{se(u),f=f+1|0}while((0|f)!=(0|d))}$(b=_+4|0,u,b),Z(b),b=50}else if(Ve(n,o,_),0!=(0|s)&0!=(0|l))if((0|m)!=(0|g)&&E(23077,22949,243,22959),d=0|je(e,t),f=0|je(n,o),0|r[22032+(7*d|0)+f>>0])f=5;else if((0|(d=0|i[21200+(28*d|0)+(f<<2)>>2]))>0){p=_+4|0,f=0;do{se(p),f=f+1|0}while((0|f)!=(0|d));b=50}else b=50;else b=50}while(0);return 50==(0|b)&&(f=_+4|0,i[a>>2]=i[f>>2],i[a+4>>2]=i[f+4>>2],i[a+8>>2]=i[f+8>>2],f=0),P=c,0|(_=f)}function et(e,t,n,r){n|=0,r|=0;var o,a,s=0,l=0,u=0,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0;if(a=P,P=P+48|0,u=a+36|0,c=a+24|0,f=a+12|0,d=a,l=0|Et(0|(e|=0),0|(t|=0),52),w(),l&=15,h=0|Et(0|e,0|t,45),w(),o=0|I(h&=127),Ot(0|l,0,52),y=134225919|w(),i[(m=r)>>2]=-1,i[m+4>>2]=y,!l)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(s=0|U(h,0|ee(n))))?(P=a,0|(y=1)):(g=0|Ot(0|s,0,45),m=0|w(),m=-1040385&i[(h=r)+4>>2]|m,i[(y=r)>>2]=i[h>>2]|g,i[y+4>>2]=m,P=a,0|(y=0));for(i[u>>2]=i[n>>2],i[u+4>>2]=i[n+4>>2],i[u+8>>2]=i[n+8>>2];i[c>>2]=i[u>>2],i[c+4>>2]=i[u+4>>2],i[c+8>>2]=i[u+8>>2],0|Be(l)?(te(u),i[f>>2]=i[u>>2],i[f+4>>2]=i[u+4>>2],i[f+8>>2]=i[u+8>>2],re(f)):(ne(u),i[f>>2]=i[u>>2],i[f+4>>2]=i[u+4>>2],i[f+8>>2]=i[u+8>>2],ie(f)),J(c,f,d),Z(d),v=0|i[(m=r)>>2],m=0|i[m+4>>2],n=0|Ot(7,0,0|(b=3*(15-l|0)|0)),m&=~(0|w()),b=0|Ot(0|ee(d),0,0|b),m=0|w()|m,i[(y=r)>>2]=b|v&~n,i[y+4>>2]=m,(0|l)>1;)l=l+-1|0;e:do{if((0|i[u>>2])<=1&&(0|i[u+4>>2])<=1&&(0|i[u+8>>2])<=1){d=127==(0|(c=0|U(h,l=0|ee(u))))?0:0|I(c);t:do{if(l){if(o){if(u=21408+(28*(0|je(e,t))|0)+(l<<2)|0,(0|(u=0|i[u>>2]))>0){n=0;do{l=0|le(l),n=n+1|0}while((0|n)!=(0|u))}if(1==(0|l)){s=3;break e}127==(0|(n=0|U(h,l)))&&E(23104,22949,376,23134),0|I(n)?E(23147,22949,377,23134):(g=u,p=l,s=n)}else g=0,p=l,s=c;if((0|(f=0|i[4304+(28*h|0)+(p<<2)>>2]))<=-1&&E(23178,22949,384,23134),!d){if((0|g)<=-1&&E(23030,22949,417,23134),0|g){l=0,n=0|i[(u=r)>>2],u=0|i[u+4>>2];do{n=0|Ne(n,u),u=0|w(),i[(b=r)>>2]=n,i[b+4>>2]=u,l=l+1|0}while((0|l)<(0|g))}if((0|f)<=0){l=54;break}for(l=0,n=0|i[(u=r)>>2],u=0|i[u+4>>2];;)if(n=0|Ne(n,u),u=0|w(),i[(b=r)>>2]=n,i[b+4>>2]=u,(0|(l=l+1|0))==(0|f)){l=54;break t}}if(7==(0|(c=0|V(s,h)))&&E(22925,22949,393,23134),n=0|i[(l=r)>>2],l=0|i[l+4>>2],(0|f)>0){u=0;do{n=0|Ne(n,l),l=0|w(),i[(b=r)>>2]=n,i[b+4>>2]=l,u=u+1|0}while((0|u)!=(0|f))}if(n=0|je(n,l),b=0|N(s),(0|(n=0|i[(b?21824:21616)+(28*c|0)+(n<<2)>>2]))<=-1&&E(23030,22949,412,23134),n){l=0,u=0|i[(c=r)>>2],c=0|i[c+4>>2];do{u=0|Ie(u,c),c=0|w(),i[(b=r)>>2]=u,i[b+4>>2]=c,l=l+1|0}while((0|l)<(0|n));l=54}else l=54}else if(0!=(0|o)&0!=(0|d))if(l=21408+(28*(b=0|je(e,t))|0)+((0|je(0|i[(l=r)>>2],0|i[l+4>>2]))<<2)|0,(0|(l=0|i[l>>2]))<=-1&&E(23201,22949,433,23134),l){s=0,n=0|i[(u=r)>>2],u=0|i[u+4>>2];do{n=0|Ne(n,u),u=0|w(),i[(b=r)>>2]=n,i[b+4>>2]=u,s=s+1|0}while((0|s)<(0|l));s=c,l=54}else s=c,l=55;else s=c,l=54}while(0);if(54==(0|l)&&d&&(l=55),55==(0|l)&&1==(0|je(0|i[(b=r)>>2],0|i[b+4>>2]))){s=4;break}y=0|i[(b=r)>>2],b=-1040385&i[b+4>>2],v=0|Ot(0|s,0,45),b=0|b|w(),i[(s=r)>>2]=y|v,i[s+4>>2]=b,s=0}else s=2}while(0);return P=a,0|(b=s)}function tt(e,t){var n=0;if(!(t|=0))return 0|(n=1);n=e|=0,e=1;do{e=0|b(0==(1&t|0)?1:n,e),t>>=1,n=0|b(n,n)}while(0!=(0|t));return 0|e}function nt(e,t,n){e|=0;var r,a,s=0,l=0,u=0,c=0,f=0,d=0,p=0,h=0;if(!(0|W(t|=0,n|=0)))return 0|(h=0);if(t=0|H(t),a=+o[n>>3],s=t&(s=+o[n+8>>3])<0?s+6.283185307179586:s,(0|(h=0|i[e>>2]))<=0)return 0|(h=0);if(r=0|i[e+4>>2],t){t=0,n=-1,e=0;e:for(;;){for(p=e;c=+o[r+(p<<4)>>3],d=+o[r+(p<<4)+8>>3],u=+o[r+((e=(n+2|0)%(0|h)|0)<<4)>>3],l=+o[r+(e<<4)+8>>3],c>u?(f=c,c=d):(f=u,u=c,c=l,l=d),af;){if(!((0|(n=p+1|0))<(0|h))){n=22;break e}e=p,p=n,n=e}if(s=(c=c<0?c+6.283185307179586:c)==s|(d=l<0?l+6.283185307179586:l)==s?s+-2220446049250313e-31:s,((d+=(a-u)/(f-u)*(c-d))<0?d+6.283185307179586:d)>s&&(t^=1),(0|(e=p+1|0))>=(0|h)){n=22;break}n=p}if(22==(0|n))return 0|t}else{t=0,n=-1,e=0;e:for(;;){for(p=e;c=+o[r+(p<<4)>>3],d=+o[r+(p<<4)+8>>3],u=+o[r+((e=(n+2|0)%(0|h)|0)<<4)>>3],l=+o[r+(e<<4)+8>>3],c>u?(f=c,c=d):(f=u,u=c,c=l,l=d),af;){if(!((0|(n=p+1|0))<(0|h))){n=22;break e}e=p,p=n,n=e}if(l+(a-u)/(f-u)*(c-l)>(s=c==s|l==s?s+-2220446049250313e-31:s)&&(t^=1),(0|(e=p+1|0))>=(0|h)){n=22;break}n=p}if(22==(0|n))return 0|t}return 0}function rt(e,t){t|=0;var n,r,a,s,u,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0,A=0;if(!(r=0|i[(e|=0)>>2]))return i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,void(i[t+28>>2]=0);if(o[(a=t+8|0)>>3]=17976931348623157e292,o[(s=t+24|0)>>3]=17976931348623157e292,o[t>>3]=-17976931348623157e292,o[(u=t+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[e+4>>2],y=17976931348623157e292,v=-17976931348623157e292,b=0,e=-1,p=17976931348623157e292,h=17976931348623157e292,m=-17976931348623157e292,f=-17976931348623157e292,_=0;c=+o[n+(_<<4)>>3],g=+o[n+(_<<4)+8>>3],d=+o[n+(((0|(e=e+2|0))==(0|r)?0:e)<<4)+8>>3],c>3]=c,p=c),g>3]=g,h=g),c>m?o[t>>3]=c:c=m,g>f&&(o[u>>3]=g,f=g),y=g>0&gv?g:v,b|=+l(+(g-d))>3.141592653589793,(0|(e=_+1|0))!=(0|r);)A=_,m=c,_=e,e=A;b&&(o[u>>3]=v,o[s>>3]=y)}}function it(e,t){t|=0;var n,r=0,a=0,s=0,u=0,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0,A=0,x=0,w=0,E=0,O=0,M=0;if(v=0|i[(e|=0)>>2]){if(o[(b=t+8|0)>>3]=17976931348623157e292,o[(_=t+24|0)>>3]=17976931348623157e292,o[t>>3]=-17976931348623157e292,o[(A=t+16|0)>>3]=-17976931348623157e292,(0|v)>0){for(s=0|i[e+4>>2],m=17976931348623157e292,y=-17976931348623157e292,a=0,r=-1,d=17976931348623157e292,p=17976931348623157e292,g=-17976931348623157e292,c=-17976931348623157e292,x=0;u=+o[s+(x<<4)>>3],h=+o[s+(x<<4)+8>>3],f=+o[s+(((0|(O=r+2|0))==(0|v)?0:O)<<4)+8>>3],u>3]=u,d=u),h>3]=h,p=h),u>g?o[t>>3]=u:u=g,h>c&&(o[A>>3]=h,c=h),m=h>0&hy?h:y,a|=+l(+(h-f))>3.141592653589793,(0|(r=x+1|0))!=(0|v);)O=x,g=u,x=r,r=O;a&&(o[A>>3]=y,o[_>>3]=m)}}else i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,i[t+28>>2]=0;if(!((0|(r=0|i[(O=e+8|0)>>2]))<=0)){n=e+12|0,E=0;do{if(s=0|i[n>>2],a=E,_=t+((E=E+1|0)<<5)|0,A=0|i[s+(a<<3)>>2]){if(o[(x=t+(E<<5)+8|0)>>3]=17976931348623157e292,o[(e=t+(E<<5)+24|0)>>3]=17976931348623157e292,o[_>>3]=-17976931348623157e292,o[(w=t+(E<<5)+16|0)>>3]=-17976931348623157e292,(0|A)>0){for(v=0|i[s+(a<<3)+4>>2],m=17976931348623157e292,y=-17976931348623157e292,s=0,a=-1,b=0,d=17976931348623157e292,p=17976931348623157e292,h=-17976931348623157e292,c=-17976931348623157e292;u=+o[v+(b<<4)>>3],g=+o[v+(b<<4)+8>>3],f=+o[v+(((0|(a=a+2|0))==(0|A)?0:a)<<4)+8>>3],u>3]=u,d=u),g>3]=g,p=g),u>h?o[_>>3]=u:u=h,g>c&&(o[w>>3]=g,c=g),m=g>0&gy?g:y,s|=+l(+(g-f))>3.141592653589793,(0|(a=b+1|0))!=(0|A);)M=b,b=a,h=u,a=M;s&&(o[w>>3]=y,o[e>>3]=m)}}else i[_>>2]=0,i[_+4>>2]=0,i[_+8>>2]=0,i[_+12>>2]=0,i[_+16>>2]=0,i[_+20>>2]=0,i[_+24>>2]=0,i[_+28>>2]=0,r=0|i[O>>2]}while((0|E)<(0|r))}}function ot(e,t,n){var r=0,o=0,a=0;if(!(0|nt(e|=0,t|=0,n|=0)))return 0|(o=0);if((0|i[(o=e+8|0)>>2])<=0)return 0|(o=1);for(r=e+12|0,e=0;;){if(a=e,e=e+1|0,0|nt((0|i[r>>2])+(a<<3)|0,t+(e<<5)|0,n)){e=0,r=6;break}if((0|e)>=(0|i[o>>2])){e=1,r=6;break}}return 6==(0|r)?0|e:0}function at(e,t,n,r,i){t|=0,n|=0,r|=0,i|=0;var a,s,l,u,c,f,d,p=0;u=+o[(e|=0)>>3],l=+o[t>>3]-u,s=+o[e+8>>3],a=+o[t+8>>3]-s,f=+o[n>>3],p=((p=+o[r>>3]-f)*(s-(d=+o[n+8>>3]))-(u-f)*(c=+o[r+8>>3]-d))/(l*c-a*p),o[i>>3]=u+l*p,o[i+8>>3]=s+a*p}function st(e,t){return t|=0,+o[(e|=0)>>3]!=+o[t>>3]?0|(t=0):0|(t=+o[e+8>>3]==+o[t+8>>3])}function lt(e,t){t|=0;var n,r,i;return+((i=+o[(e|=0)>>3]-+o[t>>3])*i+(r=+o[e+8>>3]-+o[t+8>>3])*r+(n=+o[e+16>>3]-+o[t+16>>3])*n)}function ut(e,t,n){e|=0,n|=0;var r=0;(0|(t|=0))>0?(r=0|bt(t,4),i[e>>2]=r,r||E(23230,23253,40,23267)):i[e>>2]=0,i[e+4>>2]=t,i[e+8>>2]=0,i[e+12>>2]=n}function ct(e){var t,n,r,a=0,s=0,u=0,f=0;t=(e|=0)+4|0,n=e+12|0,r=e+8|0;e:for(;;){for(s=0|i[t>>2],a=0;;){if((0|a)>=(0|s))break e;if(u=0|i[e>>2],f=0|i[u+(a<<2)>>2])break;a=a+1|0}a=u+(~~(+l(+ +c(10,+ +(15-(0|i[n>>2])|0))*(+o[f>>3]+ +o[f+8>>3]))%+(0|s))>>>0<<2)|0,s=0|i[a>>2];t:do{if(0|s){if(u=f+32|0,(0|s)==(0|f))i[a>>2]=i[u>>2];else{if(!(a=0|i[(s=s+32|0)>>2]))break;for(;(0|a)!=(0|f);)if(!(a=0|i[(s=a+32|0)>>2]))break t;i[s>>2]=i[u>>2]}vt(f),i[r>>2]=(0|i[r>>2])-1}}while(0)}vt(0|i[e>>2])}function ft(e){var t,n=0,r=0;for(t=0|i[(e|=0)+4>>2],r=0;;){if((0|r)>=(0|t)){n=0,r=4;break}if(n=0|i[(0|i[e>>2])+(r<<2)>>2]){r=4;break}r=r+1|0}return 4==(0|r)?0|n:0}function dt(e,t){t|=0;var n=0,r=0,a=0,s=0;if(n=~~(+l(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,n=(0|i[e>>2])+(n<<2)|0,!(r=0|i[n>>2]))return 0|(s=1);s=t+32|0;do{if((0|r)!=(0|t)){if(!(n=0|i[r+32>>2]))return 0|(s=1);for(a=n;;){if((0|a)==(0|t)){a=8;break}if(!(n=0|i[a+32>>2])){n=1,a=10;break}r=a,a=n}if(8==(0|a)){i[r+32>>2]=i[s>>2];break}if(10==(0|a))return 0|n}else i[n>>2]=i[s>>2]}while(0);return vt(t),i[(s=e+8|0)>>2]=(0|i[s>>2])-1,0|(s=0)}function pt(e,t,n){e|=0,t|=0,n|=0;var r,a=0,s=0,u=0;(r=0|yt(40))||E(23283,23253,98,23296),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[(s=r+16|0)>>2]=i[n>>2],i[s+4>>2]=i[n+4>>2],i[s+8>>2]=i[n+8>>2],i[s+12>>2]=i[n+12>>2],i[r+32>>2]=0,s=~~(+l(+ +c(10,+ +(15-(0|i[e+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,s=(0|i[e>>2])+(s<<2)|0,a=0|i[s>>2];do{if(a){for(;!(0|Se(a,t)&&0|Se(a+16|0,n));)if(s=0|i[a+32>>2],!(0|i[(a=0==(0|s)?a:s)+32>>2])){u=10;break}if(10==(0|u)){i[a+32>>2]=r;break}return vt(r),0|(u=a)}i[s>>2]=r}while(0);return i[(u=e+8|0)>>2]=1+(0|i[u>>2]),0|(u=r)}function ht(e,t,n){t|=0,n|=0;var r=0,a=0;if(a=~~(+l(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(a=0|i[(0|i[e>>2])+(a<<2)>>2]))return 0|(n=0);if(!n){for(e=a;;){if(0|Se(e,t)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}if(10==(0|r))return 0|e}for(e=a;;){if(0|Se(e,t)&&0|Se(e+16|0,n)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}return 10==(0|r)?0|e:0}function gt(e,t){t|=0;var n=0;if(n=~~(+l(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(e=0|i[(0|i[e>>2])+(n<<2)>>2]))return 0|(n=0);for(;;){if(0|Se(e,t)){t=5;break}if(!(e=0|i[e+32>>2])){e=0,t=5;break}}return 5==(0|t)?0|e:0}function mt(e){return 0|~~+function(e){return+ +Pt(+(e=+e))}(e=+e)}function yt(e){e|=0;var t,n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0,A=0,x=0;t=P,P=P+16|0,h=t;do{if(e>>>0<245){if(e=(f=e>>>0<11?16:e+11&-8)>>>3,3&(r=(p=0|i[5829])>>>e)|0)return o=0|i[(r=(e=23356+((n=(1&r^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|(s=0|i[(a=o+8|0)>>2]))==(0|e)?i[5829]=p&~(1<>2]=e,i[r>>2]=s),x=n<<3,i[o+4>>2]=3|x,i[(x=o+x+4|0)>>2]=1|i[x>>2],P=t,0|(x=a);if(f>>>0>(d=0|i[5831])>>>0){if(0|r)return n=((n=r<>>=u=n>>>12&16)>>>5&8)|u|(s=(n>>>=r)>>>2&4)|(e=(n>>>=s)>>>1&2)|(o=(n>>>=e)>>>1&1))+(n>>>o)|0)<<1<<2)|0)+8|0)>>2],(0|(r=0|i[(u=s+8|0)>>2]))==(0|n)?(e=p&~(1<>2]=n,i[e>>2]=r,e=p),l=(x=o<<3)-f|0,i[s+4>>2]=3|f,i[(a=s+f|0)+4>>2]=1|l,i[s+x>>2]=l,0|d&&(o=0|i[5834],r=23356+((n=d>>>3)<<1<<2)|0,e&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=l,i[5834]=a,P=t,0|(x=u);if(s=0|i[5830]){for(r=(s&0-s)-1|0,r=c=0|i[23620+(((o=(r>>>=a=r>>>12&16)>>>5&8)|a|(l=(r>>>=o)>>>2&4)|(u=(r>>>=l)>>>1&2)|(c=(r>>>=u)>>>1&1))+(r>>>c)<<2)>>2],u=c,c=(-8&i[c+4>>2])-f|0;(e=0|i[r+16>>2])||(e=0|i[r+20>>2]);)r=e,u=(a=(l=(-8&i[e+4>>2])-f|0)>>>0>>0)?e:u,c=a?l:c;if((l=u+f|0)>>>0>u>>>0){a=0|i[u+24>>2],n=0|i[u+12>>2];do{if((0|n)==(0|u)){if(!(n=0|i[(e=u+20|0)>>2])&&!(n=0|i[(e=u+16|0)>>2])){r=0;break}for(;;)if(r=0|i[(o=n+20|0)>>2])n=r,e=o;else{if(!(r=0|i[(o=n+16|0)>>2]))break;n=r,e=o}i[e>>2]=0,r=n}else r=0|i[u+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|a){if(n=0|i[u+28>>2],(0|u)==(0|i[(e=23620+(n<<2)|0)>>2])){if(i[e>>2]=r,!r){i[5830]=s&~(1<>2])==(0|u)?x:a+20|0)>>2]=r,!r)break;i[r+24>>2]=a,0|(n=0|i[u+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[u+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return c>>>0<16?(x=c+f|0,i[u+4>>2]=3|x,i[(x=u+x+4|0)>>2]=1|i[x>>2]):(i[u+4>>2]=3|f,i[l+4>>2]=1|c,i[l+c>>2]=c,0|d&&(o=0|i[5834],r=23356+((n=d>>>3)<<1<<2)|0,(n=1<>2]:(i[5829]=n|p,n=r,e=r+8|0),i[e>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=c,i[5834]=l),P=t,0|(x=u+8|0)}p=f}else p=f}else p=f}else if(e>>>0<=4294967231)if(f=-8&(e=e+11|0),o=0|i[5830]){a=0-f|0,c=(e>>>=8)?f>>>0>16777215?31:f>>>((c=14-((u=((y=e<<(p=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|p|(c=((y<<=u)+245760|0)>>>16&2))+(y<>>15)|0)+7|0)&1|c<<1:0,r=0|i[23620+(c<<2)>>2];e:do{if(r)for(e=0,u=f<<(31==(0|c)?0:25-(c>>>1)|0),s=0;;){if((l=(-8&i[r+4>>2])-f|0)>>>0>>0){if(!l){e=r,a=0,y=65;break e}e=r,a=l}if(s=0==(0|(y=0|i[r+20>>2]))|(0|y)==(0|(r=0|i[r+16+(u>>>31<<2)>>2]))?s:y,!r){r=s,y=61;break}u<<=1}else r=0,e=0,y=61}while(0);if(61==(0|y)){if(0==(0|r)&0==(0|e)){if(!(e=((e=2<>>=l=p>>>12&16)>>>5&8)|l|(u=(p>>>=s)>>>2&4)|(c=(p>>>=u)>>>1&2)|(r=(p>>>=c)>>>1&1))+(p>>>r)<<2)>>2]}r?y=65:(u=e,l=a)}if(65==(0|y))for(s=r;;){if(a=(r=(p=(-8&i[s+4>>2])-f|0)>>>0>>0)?p:a,e=r?s:e,(r=0|i[s+16>>2])||(r=0|i[s+20>>2]),!r){u=e,l=a;break}s=r}if(0!=(0|u)&&l>>>0<((0|i[5831])-f|0)>>>0&&(d=u+f|0)>>>0>u>>>0){s=0|i[u+24>>2],n=0|i[u+12>>2];do{if((0|n)==(0|u)){if(!(n=0|i[(e=u+20|0)>>2])&&!(n=0|i[(e=u+16|0)>>2])){n=0;break}for(;;)if(r=0|i[(a=n+20|0)>>2])n=r,e=a;else{if(!(r=0|i[(a=n+16|0)>>2]))break;n=r,e=a}i[e>>2]=0}else x=0|i[u+8>>2],i[x+12>>2]=n,i[n+8>>2]=x}while(0);do{if(s){if(e=0|i[u+28>>2],(0|u)==(0|i[(r=23620+(e<<2)|0)>>2])){if(i[r>>2]=n,!n){o&=~(1<>2])==(0|u)?x:s+20|0)>>2]=n,!n)break;i[n+24>>2]=s,0|(e=0|i[u+16>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),(e=0|i[u+20>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);e:do{if(l>>>0<16)x=l+f|0,i[u+4>>2]=3|x,i[(x=u+x+4|0)>>2]=1|i[x>>2];else{if(i[u+4>>2]=3|f,i[d+4>>2]=1|l,i[d+l>>2]=l,n=l>>>3,l>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=d,i[n+12>>2]=d,i[d+8>>2]=n,i[d+12>>2]=r;break}if(n=23620+((r=(n=l>>>8)?l>>>0>16777215?31:l>>>((r=14-((_=((x=n<<(A=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|A|(r=((x<<=_)+245760|0)>>>16&2))+(x<>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[d+28>>2]=r,i[(e=d+16|0)+4>>2]=0,i[e>>2]=0,!(o&(e=1<>2]=d,i[d+24>>2]=n,i[d+12>>2]=d,i[d+8>>2]=d;break}n=0|i[n>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|l)){for(o=l<<(31==(0|r)?0:25-(r>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|l)){n=e;break t}o<<=1,n=e}i[r>>2]=d,i[d+24>>2]=n,i[d+12>>2]=d,i[d+8>>2]=d;break e}}while(0);x=0|i[(A=n+8|0)>>2],i[x+12>>2]=d,i[A>>2]=d,i[d+8>>2]=x,i[d+12>>2]=n,i[d+24>>2]=0}}while(0);return P=t,0|(x=u+8|0)}p=f}else p=f;else p=-1}while(0);if((r=0|i[5831])>>>0>=p>>>0)return n=r-p|0,e=0|i[5834],n>>>0>15?(x=e+p|0,i[5834]=x,i[5831]=n,i[x+4>>2]=1|n,i[e+r>>2]=n,i[e+4>>2]=3|p):(i[5831]=0,i[5834]=0,i[e+4>>2]=3|r,i[(x=e+r+4|0)>>2]=1|i[x>>2]),P=t,0|(x=e+8|0);if((l=0|i[5832])>>>0>p>>>0)return _=l-p|0,i[5832]=_,A=(x=0|i[5835])+p|0,i[5835]=A,i[A+4>>2]=1|_,i[x+4>>2]=3|p,P=t,0|(x=x+8|0);if(0|i[5947]?e=0|i[5949]:(i[5949]=4096,i[5948]=4096,i[5950]=-1,i[5951]=-1,i[5952]=0,i[5940]=0,i[5947]=-16&h^1431655768,e=4096),u=p+48|0,(f=(s=e+(c=p+47|0)|0)&(a=0-e|0))>>>0<=p>>>0)return P=t,0|(x=0);if(0|(e=0|i[5939])&&(h=(d=0|i[5937])+f|0)>>>0<=d>>>0|h>>>0>e>>>0)return P=t,0|(x=0);e:do{if(4&i[5940])n=0,y=143;else{r=0|i[5835];t:do{if(r){for(o=23764;!((h=0|i[o>>2])>>>0<=r>>>0&&(h+(0|i[o+4>>2])|0)>>>0>r>>>0);){if(!(e=0|i[o+8>>2])){y=128;break t}o=e}if((n=s-l&a)>>>0<2147483647)if((0|(e=0|kt(0|n)))==((0|i[o>>2])+(0|i[o+4>>2])|0)){if(-1!=(0|e)){l=n,s=e,y=145;break e}}else o=e,y=136;else n=0}else y=128}while(0);do{if(128==(0|y))if(-1!=(0|(r=0|kt(0)))&&(n=r,m=(n=(0==((m=(g=0|i[5948])+-1|0)&n|0)?0:(m+n&0-g)-n|0)+f|0)+(g=0|i[5937])|0,n>>>0>p>>>0&n>>>0<2147483647)){if(0|(h=0|i[5939])&&m>>>0<=g>>>0|m>>>0>h>>>0){n=0;break}if((0|(e=0|kt(0|n)))==(0|r)){l=n,s=r,y=145;break e}o=e,y=136}else n=0}while(0);do{if(136==(0|y)){if(r=0-n|0,!(u>>>0>n>>>0&n>>>0<2147483647&-1!=(0|o))){if(-1==(0|o)){n=0;break}l=n,s=o,y=145;break e}if((e=c-n+(e=0|i[5949])&0-e)>>>0>=2147483647){l=n,s=o,y=145;break e}if(-1==(0|kt(0|e))){kt(0|r),n=0;break}l=e+n|0,s=o,y=145;break e}}while(0);i[5940]=4|i[5940],y=143}}while(0);if(143==(0|y)&&f>>>0<2147483647&&!(-1==(0|(_=0|kt(0|f)))|1^(b=(v=(m=0|kt(0))-_|0)>>>0>(p+40|0)>>>0)|_>>>0>>0&-1!=(0|_)&-1!=(0|m)^1)&&(l=b?v:n,s=_,y=145),145==(0|y)){n=(0|i[5937])+l|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),c=0|i[5835];e:do{if(c){for(n=23764;;){if((0|s)==((e=0|i[n>>2])+(r=0|i[n+4>>2])|0)){y=154;break}if(!(o=0|i[n+8>>2]))break;n=o}if(154==(0|y)&&(A=n+4|0,0==(8&i[n+12>>2]|0))&&s>>>0>c>>>0&e>>>0<=c>>>0){i[A>>2]=r+l,A=c+(_=0==(7&(_=c+8|0)|0)?0:0-_&7)|0,_=(x=(0|i[5832])+l|0)-_|0,i[5835]=A,i[5832]=_,i[A+4>>2]=1|_,i[c+x+4>>2]=40,i[5836]=i[5951];break}for(s>>>0<(0|i[5833])>>>0&&(i[5833]=s),r=s+l|0,n=23764;;){if((0|i[n>>2])==(0|r)){y=162;break}if(!(e=0|i[n+8>>2]))break;n=e}if(162==(0|y)&&0==(8&i[n+12>>2]|0)){i[n>>2]=s,i[(d=n+4|0)>>2]=(0|i[d>>2])+l,f=(d=s+(0==(7&(d=s+8|0)|0)?0:0-d&7)|0)+p|0,u=(n=r+(0==(7&(n=r+8|0)|0)?0:0-n&7)|0)-d-p|0,i[d+4>>2]=3|p;t:do{if((0|c)==(0|n))x=(0|i[5832])+u|0,i[5832]=x,i[5835]=f,i[f+4>>2]=1|x;else{if((0|i[5834])==(0|n)){x=(0|i[5831])+u|0,i[5831]=x,i[5834]=f,i[f+4>>2]=1|x,i[f+x>>2]=x;break}if(1==(3&(e=0|i[n+4>>2])|0)){l=-8&e,o=e>>>3;n:do{if(e>>>0<256){if(e=0|i[n+8>>2],(0|(r=0|i[n+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<>2]=r,i[r+8>>2]=e;break}s=0|i[n+24>>2],e=0|i[n+12>>2];do{if((0|e)==(0|n)){if(e=0|i[(o=(r=n+16|0)+4|0)>>2])r=o;else if(!(e=0|i[r>>2])){e=0;break}for(;;)if(o=0|i[(a=e+20|0)>>2])e=o,r=a;else{if(!(o=0|i[(a=e+16|0)>>2]))break;e=o,r=a}i[r>>2]=0}else x=0|i[n+8>>2],i[x+12>>2]=e,i[e+8>>2]=x}while(0);if(!s)break;o=23620+((r=0|i[n+28>>2])<<2)|0;do{if((0|i[o>>2])==(0|n)){if(i[o>>2]=e,0|e)break;i[5830]=i[5830]&~(1<>2])==(0|n)?x:s+20|0)>>2]=e,!e)break n}while(0);if(i[e+24>>2]=s,0|(o=0|i[(r=n+16|0)>>2])&&(i[e+16>>2]=o,i[o+24>>2]=e),!(r=0|i[r+4>>2]))break;i[e+20>>2]=r,i[r+24>>2]=e}while(0);n=n+l|0,a=l+u|0}else a=u;if(i[(n=n+4|0)>>2]=-2&i[n>>2],i[f+4>>2]=1|a,i[f+a>>2]=a,n=a>>>3,a>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=f,i[n+12>>2]=f,i[f+8>>2]=n,i[f+12>>2]=r;break}n=a>>>8;do{if(n){if(a>>>0>16777215){o=31;break}o=a>>>((o=14-((_=((x=n<<(A=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|A|(o=((x<<=_)+245760|0)>>>16&2))+(x<>>15)|0)+7|0)&1|o<<1}else o=0}while(0);if(n=23620+(o<<2)|0,i[f+28>>2]=o,i[(e=f+16|0)+4>>2]=0,i[e>>2]=0,!((e=0|i[5830])&(r=1<>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break}n=0|i[n>>2];n:do{if((-8&i[n+4>>2]|0)!=(0|a)){for(o=a<<(31==(0|o)?0:25-(o>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|a)){n=e;break n}o<<=1,n=e}i[r>>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break t}}while(0);x=0|i[(A=n+8|0)>>2],i[x+12>>2]=f,i[A>>2]=f,i[f+8>>2]=x,i[f+12>>2]=n,i[f+24>>2]=0}}while(0);return P=t,0|(x=d+8|0)}for(n=23764;!((e=0|i[n>>2])>>>0<=c>>>0&&(x=e+(0|i[n+4>>2])|0)>>>0>c>>>0);)n=0|i[n+8>>2];n=(e=(e=(a=x+-47|0)+(0==(7&(e=a+8|0)|0)?0:0-e&7)|0)>>>0<(a=c+16|0)>>>0?c:e)+8|0,A=s+(_=0==(7&(_=s+8|0)|0)?0:0-_&7)|0,_=(r=l+-40|0)-_|0,i[5835]=A,i[5832]=_,i[A+4>>2]=1|_,i[s+r+4>>2]=40,i[5836]=i[5951],i[(r=e+4|0)>>2]=27,i[n>>2]=i[5941],i[n+4>>2]=i[5942],i[n+8>>2]=i[5943],i[n+12>>2]=i[5944],i[5941]=s,i[5942]=l,i[5944]=0,i[5943]=n,n=e+24|0;do{A=n,i[(n=n+4|0)>>2]=7}while((A+8|0)>>>0>>0);if((0|e)!=(0|c)){if(s=e-c|0,i[r>>2]=-2&i[r>>2],i[c+4>>2]=1|s,i[e>>2]=s,n=s>>>3,s>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=c,i[n+12>>2]=c,i[c+8>>2]=n,i[c+12>>2]=r;break}if(r=23620+((o=(n=s>>>8)?s>>>0>16777215?31:s>>>((o=14-((_=((x=n<<(A=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|A|(o=((x<<=_)+245760|0)>>>16&2))+(x<>>15)|0)+7|0)&1|o<<1:0)<<2)|0,i[c+28>>2]=o,i[c+20>>2]=0,i[a>>2]=0,!((n=0|i[5830])&(e=1<>2]=c,i[c+24>>2]=r,i[c+12>>2]=c,i[c+8>>2]=c;break}n=0|i[r>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|s)){for(o=s<<(31==(0|o)?0:25-(o>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|s)){n=e;break t}o<<=1,n=e}i[r>>2]=c,i[c+24>>2]=n,i[c+12>>2]=c,i[c+8>>2]=c;break e}}while(0);x=0|i[(A=n+8|0)>>2],i[x+12>>2]=c,i[A>>2]=c,i[c+8>>2]=x,i[c+12>>2]=n,i[c+24>>2]=0}}else 0==(0|(x=0|i[5833]))|s>>>0>>0&&(i[5833]=s),i[5941]=s,i[5942]=l,i[5944]=0,i[5838]=i[5947],i[5837]=-1,i[5842]=23356,i[5841]=23356,i[5844]=23364,i[5843]=23364,i[5846]=23372,i[5845]=23372,i[5848]=23380,i[5847]=23380,i[5850]=23388,i[5849]=23388,i[5852]=23396,i[5851]=23396,i[5854]=23404,i[5853]=23404,i[5856]=23412,i[5855]=23412,i[5858]=23420,i[5857]=23420,i[5860]=23428,i[5859]=23428,i[5862]=23436,i[5861]=23436,i[5864]=23444,i[5863]=23444,i[5866]=23452,i[5865]=23452,i[5868]=23460,i[5867]=23460,i[5870]=23468,i[5869]=23468,i[5872]=23476,i[5871]=23476,i[5874]=23484,i[5873]=23484,i[5876]=23492,i[5875]=23492,i[5878]=23500,i[5877]=23500,i[5880]=23508,i[5879]=23508,i[5882]=23516,i[5881]=23516,i[5884]=23524,i[5883]=23524,i[5886]=23532,i[5885]=23532,i[5888]=23540,i[5887]=23540,i[5890]=23548,i[5889]=23548,i[5892]=23556,i[5891]=23556,i[5894]=23564,i[5893]=23564,i[5896]=23572,i[5895]=23572,i[5898]=23580,i[5897]=23580,i[5900]=23588,i[5899]=23588,i[5902]=23596,i[5901]=23596,i[5904]=23604,i[5903]=23604,A=s+(_=0==(7&(_=s+8|0)|0)?0:0-_&7)|0,_=(x=l+-40|0)-_|0,i[5835]=A,i[5832]=_,i[A+4>>2]=1|_,i[s+x+4>>2]=40,i[5836]=i[5951]}while(0);if((n=0|i[5832])>>>0>p>>>0)return _=n-p|0,i[5832]=_,A=(x=0|i[5835])+p|0,i[5835]=A,i[A+4>>2]=1|_,i[x+4>>2]=3|p,P=t,0|(x=x+8|0)}return i[(x=23312)>>2]=12,P=t,0|(x=0)}function vt(e){var t=0,n=0,r=0,o=0,a=0,s=0,l=0,u=0;if(e|=0){n=e+-8|0,o=0|i[5833],u=n+(t=-8&(e=0|i[e+-4>>2]))|0;do{if(1&e)l=n,s=n;else{if(r=0|i[n>>2],!(3&e))return;if(a=r+t|0,(s=n+(0-r)|0)>>>0>>0)return;if((0|i[5834])==(0|s)){if(3!=(3&(t=0|i[(e=u+4|0)>>2])|0)){l=s,t=a;break}return i[5831]=a,i[e>>2]=-2&t,i[s+4>>2]=1|a,void(i[s+a>>2]=a)}if(n=r>>>3,r>>>0<256){if(e=0|i[s+8>>2],(0|(t=0|i[s+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<>2]=t,i[t+8>>2]=e,l=s,t=a;break}o=0|i[s+24>>2],e=0|i[s+12>>2];do{if((0|e)==(0|s)){if(e=0|i[(n=(t=s+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){e=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0}else l=0|i[s+8>>2],i[l+12>>2]=e,i[e+8>>2]=l}while(0);if(o){if(t=0|i[s+28>>2],(0|i[(n=23620+(t<<2)|0)>>2])==(0|s)){if(i[n>>2]=e,!e){i[5830]=i[5830]&~(1<>2])==(0|s)?l:o+20|0)>>2]=e,!e){l=s,t=a;break}i[e+24>>2]=o,0|(n=0|i[(t=s+16|0)>>2])&&(i[e+16>>2]=n,i[n+24>>2]=e),(t=0|i[t+4>>2])?(i[e+20>>2]=t,i[t+24>>2]=e,l=s,t=a):(l=s,t=a)}else l=s,t=a}}while(0);if(!(s>>>0>=u>>>0)&&1&(r=0|i[(e=u+4|0)>>2])){if(2&r)i[e>>2]=-2&r,i[l+4>>2]=1|t,i[s+t>>2]=t,o=t;else{if((0|i[5835])==(0|u)){if(u=(0|i[5832])+t|0,i[5832]=u,i[5835]=l,i[l+4>>2]=1|u,(0|l)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|u))return u=(0|i[5831])+t|0,i[5831]=u,i[5834]=s,i[l+4>>2]=1|u,void(i[s+u>>2]=u);o=(-8&r)+t|0,n=r>>>3;do{if(r>>>0<256){if(t=0|i[u+8>>2],(0|(e=0|i[u+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<>2]=e,i[e+8>>2]=t;break}a=0|i[u+24>>2],e=0|i[u+12>>2];do{if((0|e)==(0|u)){if(e=0|i[(n=(t=u+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){n=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0,n=e}else n=0|i[u+8>>2],i[n+12>>2]=e,i[e+8>>2]=n,n=e}while(0);if(0|a){if(e=0|i[u+28>>2],(0|i[(t=23620+(e<<2)|0)>>2])==(0|u)){if(i[t>>2]=n,!n){i[5830]=i[5830]&~(1<>2])==(0|u)?r:a+20|0)>>2]=n,!n)break;i[n+24>>2]=a,0|(t=0|i[(e=u+16|0)>>2])&&(i[n+16>>2]=t,i[t+24>>2]=n),0|(e=0|i[e+4>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);if(i[l+4>>2]=1|o,i[s+o>>2]=o,(0|l)==(0|i[5834]))return void(i[5831]=o)}if(e=o>>>3,o>>>0<256)return n=23356+(e<<1<<2)|0,(t=0|i[5829])&(e=1<>2]:(i[5829]=t|e,e=n,t=n+8|0),i[t>>2]=l,i[e+12>>2]=l,i[l+8>>2]=e,void(i[l+12>>2]=n);e=23620+((r=(e=o>>>8)?o>>>0>16777215?31:o>>>((r=14-((a=((u=e<<(s=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|s|(r=((u<<=a)+245760|0)>>>16&2))+(u<>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[l+28>>2]=r,i[l+20>>2]=0,i[l+16>>2]=0,t=0|i[5830],n=1<>2];t:do{if((-8&i[e+4>>2]|0)!=(0|o)){for(r=o<<(31==(0|r)?0:25-(r>>>1)|0);t=0|i[(n=e+16+(r>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|o)){e=t;break t}r<<=1,e=t}i[n>>2]=l,i[l+24>>2]=e,i[l+12>>2]=l,i[l+8>>2]=l;break e}}while(0);u=0|i[(s=e+8|0)>>2],i[u+12>>2]=l,i[s>>2]=l,i[l+8>>2]=u,i[l+12>>2]=e,i[l+24>>2]=0}else i[5830]=t|n,i[e>>2]=l,i[l+24>>2]=e,i[l+12>>2]=l,i[l+8>>2]=l}while(0);if(u=(0|i[5837])-1|0,i[5837]=u,!(0|u)){for(e=23772;e=0|i[e>>2];)e=e+8|0;i[5837]=-1}}}}function bt(e,t){t|=0;var n=0;return(e|=0)?(n=0|b(t,e),(t|e)>>>0>65535&&(n=(0|(n>>>0)/(e>>>0))==(0|t)?n:-1)):n=0,(e=0|yt(n))&&3&i[e+-4>>2]?(Ct(0|e,0,0|n),0|e):0|e}function _t(e,t,n,r){return 0|(x(0|(r=(t|=0)-(r|=0)-((n|=0)>>>0>(e|=0)>>>0|0)>>>0)),e-n>>>0|0)}function At(e){return 0|((e|=0)?31-(0|A(e^e-1))|0:32)}function xt(e,t,n,r,o){o|=0;var a=0,s=0,l=0,u=0,c=0,f=0,d=0,p=0,h=0,g=0;if(f=e|=0,s=n|=0,l=p=r|=0,!(c=u=t|=0))return a=0!=(0|o),l?a?(i[o>>2]=0|e,i[o+4>>2]=0&t,o=0,0|(x(0|(p=0)),o)):(o=0,0|(x(0|(p=0)),o)):(a&&(i[o>>2]=(f>>>0)%(s>>>0),i[o+4>>2]=0),o=(f>>>0)/(s>>>0)>>>0,0|(x(0|(p=0)),o));a=0==(0|l);do{if(s){if(!a){if((a=(0|A(0|l))-(0|A(0|c))|0)>>>0<=31){s=d=a+1|0,e=f>>>(d>>>0)&(t=a-31>>31)|c<<(l=31-a|0),t&=c>>>(d>>>0),a=0,l=f<>2]=0|e,i[o+4>>2]=u|0&t,o=0,0|(x(0|(p=0)),o)):(o=0,0|(x(0|(p=0)),o))}if((a=s-1|0)&s|0){s=l=33+(0|A(0|s))-(0|A(0|c))|0,e=(d=32-l|0)-1>>31&c>>>((h=l-32|0)>>>0)|(c<>>(l>>>0))&(t=h>>31),t&=c>>>(l>>>0),a=f<<(g=64-l|0)&(u=d>>31),l=(c<>>(h>>>0))&u|f<>31;break}return 0|o&&(i[o>>2]=a&f,i[o+4>>2]=0),1==(0|s)?(g=0|e,0|(x(0|(h=u|0&t)),g)):(h=c>>>((g=0|At(0|s))>>>0)|0,g=c<<32-g|f>>>(g>>>0)|0,0|(x(0|h),g))}if(a)return 0|o&&(i[o>>2]=(c>>>0)%(s>>>0),i[o+4>>2]=0),g=(c>>>0)/(s>>>0)>>>0,0|(x(0|(h=0)),g);if(!f)return 0|o&&(i[o>>2]=0,i[o+4>>2]=(c>>>0)%(l>>>0)),g=(c>>>0)/(l>>>0)>>>0,0|(x(0|(h=0)),g);if(!((a=l-1|0)&l))return 0|o&&(i[o>>2]=0|e,i[o+4>>2]=a&c|0&t),h=0,g=c>>>((0|At(0|l))>>>0),0|(x(0|h),g);if((a=(0|A(0|l))-(0|A(0|c))|0)>>>0<=30){s=t=a+1|0,e=c<<(l=31-a|0)|f>>>(t>>>0),t=c>>>(t>>>0),a=0,l=f<>2]=0|e,i[o+4>>2]=u|0&t,g=0,0|(x(0|(h=0)),g)):(g=0,0|(x(0|(h=0)),g))}while(0);if(s){c=0|function(e,t,n,r){return 0|(x((t|=0)+(r|=0)+((n=(e|=0)+(n|=0)>>>0)>>>0>>0|0)>>>0|0),0|n)}(0|(d=0|n),0|(f=p|0&r),-1,-1),n=0|w(),u=l,l=0;do{r=u,u=a>>>31|u<<1,a=l|a<<1,_t(0|c,0|n,0|(r=e<<1|r>>>31|0),0|(p=e>>>31|t<<1|0)),l=1&(h=(g=0|w())>>31|((0|g)<0?-1:0)<<1),e=0|_t(0|r,0|p,h&d|0,(((0|g)<0?-1:0)>>31|((0|g)<0?-1:0)<<1)&f|0),t=0|w(),s=s-1|0}while(0!=(0|s));c=u,u=0}else c=l,u=0,l=0;return s=0,0|o&&(i[o>>2]=e,i[o+4>>2]=t),g=-2&(a<<1|0)|l,0|(x(0|(h=(0|a)>>>31|(c|s)<<1|0&(s<<1|a>>>31)|u)),g)}function wt(e,t,n,r){var o,a;return a=P,P=P+16|0,xt(e|=0,t|=0,n|=0,r|=0,o=0|a),P=a,0|(x(0|i[o+4>>2]),0|i[o>>2])}function Et(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(x(t>>>n|0),e>>>n|(t&(1<>>n-32|0)}function Ot(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(x(t<>>32-n|0),e<=0?+s(e+.5):+v(e-.5)}function Tt(e,t,n){e|=0,t|=0;var o,a,s=0;if((0|(n|=0))>=8192)return S(0|e,0|t,0|n),0|e;if(a=0|e,o=e+n|0,(3&e)==(3&t)){for(;3&e;){if(!n)return 0|a;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,n=n-1|0}for(s=(n=-4&o|0)-64|0;(0|e)<=(0|s);)i[e>>2]=i[t>>2],i[e+4>>2]=i[t+4>>2],i[e+8>>2]=i[t+8>>2],i[e+12>>2]=i[t+12>>2],i[e+16>>2]=i[t+16>>2],i[e+20>>2]=i[t+20>>2],i[e+24>>2]=i[t+24>>2],i[e+28>>2]=i[t+28>>2],i[e+32>>2]=i[t+32>>2],i[e+36>>2]=i[t+36>>2],i[e+40>>2]=i[t+40>>2],i[e+44>>2]=i[t+44>>2],i[e+48>>2]=i[t+48>>2],i[e+52>>2]=i[t+52>>2],i[e+56>>2]=i[t+56>>2],i[e+60>>2]=i[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|n);)i[e>>2]=i[t>>2],e=e+4|0,t=t+4|0}else for(n=o-4|0;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|o);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|a}function Ct(e,t,n){t|=0;var o,a=0,s=0,l=0;if(o=(e|=0)+(n|=0)|0,t&=255,(0|n)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(l=t|t<<8|t<<16|t<<24,s=(a=-4&o|0)-64|0;(0|e)<=(0|s);)i[e>>2]=l,i[e+4>>2]=l,i[e+8>>2]=l,i[e+12>>2]=l,i[e+16>>2]=l,i[e+20>>2]=l,i[e+24>>2]=l,i[e+28>>2]=l,i[e+32>>2]=l,i[e+36>>2]=l,i[e+40>>2]=l,i[e+44>>2]=l,i[e+48>>2]=l,i[e+52>>2]=l,i[e+56>>2]=l,i[e+60>>2]=l,e=e+64|0;for(;(0|e)<(0|a);)i[e>>2]=l,e=e+4|0}for(;(0|e)<(0|o);)r[e>>0]=t,e=e+1|0;return o-n|0}function Pt(e){return(e=+e)>=0?+s(e+.5):+v(e-.5)}function kt(e){e|=0;var t,n,r;return r=0|M(),(0|e)>0&(0|(t=(n=0|i[a>>2])+e|0))<(0|n)|(0|t)<0?(C(0|t),O(12),-1):(0|t)>(0|r)&&!(0|T(0|t))?(O(12),-1):(i[a>>2]=t,0|n)}return{___uremdi3:wt,_bitshift64Lshr:Et,_bitshift64Shl:Ot,_calloc:bt,_cellAreaKm2:function(e,t){var n,r,o,a=0;if(o=P,P=P+192|0,r=o,We(e|=0,t|=0,n=o+168|0),qe(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+Ce(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+Ce(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else a=0;return P=o,6371.007180918475*a*6371.007180918475},_cellAreaM2:function(e,t){var n,r,o,a=0;if(o=P,P=P+192|0,r=o,We(e|=0,t|=0,n=o+168|0),qe(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+Ce(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+Ce(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else a=0;return P=o,6371.007180918475*a*6371.007180918475*1e3*1e3},_cellAreaRads2:function(e,t){var n,r,o,a=0;if(o=P,P=P+192|0,r=o,We(e|=0,t|=0,n=o+168|0),qe(e,t,r),(0|(t=0|i[r>>2]))<=0)return P=o,+(a=0);if(a=+Ce(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1==(0|t))return P=o,+a;e=1;do{a+=+Ce(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t));return P=o,+a},_compact:function(e,t,n){t|=0;var r,o=0,a=0,s=0,l=0,u=0,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0,A=0,x=0,E=0,O=0,M=0;if(!(n|=0))return 0|(O=0);if(o=0|i[(a=e|=0)>>2],!0&0==(15728640&(a=0|i[a+4>>2])|0)){if((0|n)<=0)return 0|(O=0);if(i[(O=t)>>2]=o,i[O+4>>2]=a,1==(0|n))return 0|(O=0);o=1;do{E=0|i[(x=e+(o<<3)|0)+4>>2],i[(O=t+(o<<3)|0)>>2]=i[x>>2],i[O+4>>2]=E,o=o+1|0}while((0|o)!=(0|n));return 0|(o=0)}if(!(E=0|yt(x=n<<3)))return 0|(O=-3);if(Tt(0|E,0|e,0|x),!(r=0|bt(n,8)))return vt(E),0|(O=-3);o=n;e:for(;;){_=0|Et(0|(d=0|i[(l=E)>>2]),0|(l=0|i[l+4>>2]),52),w(),A=(_&=15)+-1|0,b=(0|o)>0;t:do{if(b){if(v=((0|o)<0)<<31>>31,m=0|Ot(0|A,0,52),y=0|w(),A>>>0>15)for(a=0,e=d,n=l;;){if(!(0==(0|e)&0==(0|n))){if(s=0|Et(0|e,0|n,52),w(),u=(0|(s&=15))<(0|A),s=(0|s)==(0|A),n=0|wt(0|(f=u?0:s?e:0),0|(e=u?0:s?n:0),0|o,0|v),w(),0==(0|(c=0|i[(u=s=r+(n<<3)|0)>>2]))&0==(0|(u=0|i[u+4>>2])))n=f;else for(m=0,g=n,h=u,n=f;;){if((0|m)>(0|o)){O=41;break e}if((0|c)==(0|n)&(-117440513&h|0)==(0|e)){f=0|Et(0|c,0|h,56),w(),p=(f&=7)+1|0,y=0|Et(0|c,0|h,45),w();n:do{if(0|I(127&y)){if(c=0|Et(0|c,0|h,52),w(),!(c&=15)){u=6;break}for(u=1;;){if(!(0==((y=0|Ot(7,0,3*(15-u|0)|0))&n|0)&0==((0|w())&e|0))){u=7;break n}if(!(u>>>0>>0)){u=6;break}u=u+1|0}}else u=7}while(0);if((f+2|0)>>>0>u>>>0){O=51;break e}y=0|Ot(0|p,0,56),e=0|w()|-117440513&e,i[(u=s)>>2]=0,i[u+4>>2]=0,u=g,n|=y}else u=(g+1|0)%(0|o)|0;if(0==(0|(c=0|i[(h=s=r+(u<<3)|0)>>2]))&0==(0|(h=0|i[h+4>>2])))break;m=m+1|0,g=u}i[(y=s)>>2]=n,i[y+4>>2]=e}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=E+(a<<3)|0)>>2],n=0|i[n+4>>2]}for(a=0,e=d,n=l;;){if(!(0==(0|e)&0==(0|n))){if(u=0|Et(0|e,0|n,52),w(),(0|(u&=15))>=(0|A)){if((0|u)!=(0|A)&&(e|=m,n=-15728641&n|y,u>>>0>=_>>>0)){s=A;do{g=0|Ot(7,0,3*(14-s|0)|0),s=s+1|0,e|=g,n=0|w()|n}while(s>>>0>>0)}}else e=0,n=0;if(u=0|wt(0|e,0|n,0|o,0|v),w(),!(0==(0|(f=0|i[(c=s=r+(u<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2]))))for(g=0;;){if((0|g)>(0|o)){O=41;break e}if((0|f)==(0|e)&(-117440513&c|0)==(0|n)){p=0|Et(0|f,0|c,56),w(),h=(p&=7)+1|0,M=0|Et(0|f,0|c,45),w();n:do{if(0|I(127&M)){if(f=0|Et(0|f,0|c,52),w(),!(f&=15)){c=6;break}for(c=1;;){if(!(0==((M=0|Ot(7,0,3*(15-c|0)|0))&e|0)&0==((0|w())&n|0))){c=7;break n}if(!(c>>>0>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((p+2|0)>>>0>c>>>0){O=51;break e}M=0|Ot(0|h,0,56),n=0|w()|-117440513&n,i[(h=s)>>2]=0,i[h+4>>2]=0,e|=M}else u=(u+1|0)%(0|o)|0;if(0==(0|(f=0|i[(c=s=r+(u<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2])))break;g=g+1|0}i[(M=s)>>2]=e,i[M+4>>2]=n}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=E+(a<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((o+5|0)>>>0<11){O=99;break}if(!(y=0|bt((0|o)/6|0,8))){O=58;break}t:do{if(b){g=0,h=0;do{if(!(0==(0|(a=0|i[(e=u=r+(g<<3)|0)>>2]))&0==(0|(e=0|i[e+4>>2])))){c=0|Et(0|a,0|e,56),w(),n=(c&=7)+1|0,f=-117440513&e,M=0|Et(0|a,0|e,45),w();n:do{if(0|I(127&M)){if(p=0|Et(0|a,0|e,52),w(),0|(p&=15))for(s=1;;){if(!(0==(a&(M=0|Ot(7,0,3*(15-s|0)|0))|0)&0==(f&(0|w())|0)))break n;if(!(s>>>0

>>0))break;s=s+1|0}a|=e=0|Ot(0|n,0,56),e=0|w()|f,i[(n=u)>>2]=a,i[n+4>>2]=e,n=c+2|0}}while(0);7==(0|n)&&(i[(M=y+(h<<3)|0)>>2]=a,i[M+4>>2]=-117440513&e,h=h+1|0)}g=g+1|0}while((0|g)!=(0|o));if(b){if(m=((0|o)<0)<<31>>31,p=0|Ot(0|A,0,52),g=0|w(),A>>>0>15)for(e=0,a=0;;){do{if(!(0==(0|d)&0==(0|l))){for(c=0|Et(0|d,0|l,52),w(),s=(0|(c&=15))<(0|A),c=(0|c)==(0|A),s=0|wt(0|(u=s?0:c?d:0),0|(c=s?0:c?l:0),0|o,0|m),w(),n=0;;){if((0|n)>(0|o)){O=98;break e}if((-117440513&(f=0|i[(M=r+(s<<3)|0)+4>>2])|0)==(0|c)&&(0|i[M>>2])==(0|u)){O=70;break}if((0|i[(M=r+((s=(s+1|0)%(0|o)|0)<<3)|0)>>2])==(0|u)&&(0|i[M+4>>2])==(0|c))break;n=n+1|0}if(70==(0|O)&&(O=0,!0&100663296==(117440512&f|0)))break;i[(M=t+(a<<3)|0)>>2]=d,i[M+4>>2]=l,a=a+1|0}}while(0);if((0|(e=e+1|0))>=(0|o)){o=h;break t}d=0|i[(l=E+(e<<3)|0)>>2],l=0|i[l+4>>2]}for(e=0,a=0;;){do{if(!(0==(0|d)&0==(0|l))){if(c=0|Et(0|d,0|l,52),w(),(0|(c&=15))>=(0|A))if((0|c)!=(0|A))if(n=d|p,s=-15728641&l|g,c>>>0<_>>>0)c=s;else{u=A;do{M=0|Ot(7,0,3*(14-u|0)|0),u=u+1|0,n|=M,s=0|w()|s}while(u>>>0>>0);c=s}else n=d,c=l;else n=0,c=0;for(u=0|wt(0|n,0|c,0|o,0|m),w(),s=0;;){if((0|s)>(0|o)){O=98;break e}if((-117440513&(f=0|i[(M=r+(u<<3)|0)+4>>2])|0)==(0|c)&&(0|i[M>>2])==(0|n)){O=93;break}if((0|i[(M=r+((u=(u+1|0)%(0|o)|0)<<3)|0)>>2])==(0|n)&&(0|i[M+4>>2])==(0|c))break;s=s+1|0}if(93==(0|O)&&(O=0,!0&100663296==(117440512&f|0)))break;i[(M=t+(a<<3)|0)>>2]=d,i[M+4>>2]=l,a=a+1|0}}while(0);if((0|(e=e+1|0))>=(0|o)){o=h;break t}d=0|i[(l=E+(e<<3)|0)>>2],l=0|i[l+4>>2]}}else a=0,o=h}else a=0,o=0}while(0);if(Ct(0|r,0,0|x),Tt(0|E,0|y,o<<3|0),vt(y),!o)break;t=t+(a<<3)|0}return 41==(0|O)?(vt(E),vt(r),0|(M=-1)):51==(0|O)?(vt(E),vt(r),0|(M=-2)):58==(0|O)?(vt(E),vt(r),0|(M=-3)):98==(0|O)?(vt(y),vt(E),vt(r),0|(M=-1)):(99==(0|O)&&Tt(0|t,0|E,o<<3|0),vt(E),vt(r),0|(M=0))},_destroyLinkedPolygon:function(e){var t=0,n=0,r=0,o=0;if(e|=0)for(r=1;;){if(0|(t=0|i[e>>2]))do{if(0|(n=0|i[t>>2]))do{o=n,n=0|i[n+16>>2],vt(o)}while(0!=(0|n));o=t,t=0|i[t+8>>2],vt(o)}while(0!=(0|t));if(t=e,e=0|i[e+8>>2],r||vt(t),!e)break;r=0}},_edgeLengthKm:function(e){return+ +o[20752+((e|=0)<<3)>>3]},_edgeLengthM:function(e){return+ +o[20880+((e|=0)<<3)>>3]},_emscripten_replace_memory:function(e){return r=new Int8Array(e),new Uint8Array(e),i=new Int32Array(e),new Float32Array(e),o=new Float64Array(e),n=e,!0},_exactEdgeLengthKm:function(e,t){var n,r,a=0,s=0,l=0,c=0,p=0,h=0;if(r=P,P=P+176|0,Xe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(l=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],l=+o[n+16>>3];do{p=s,s=+o[n+8+((e=e+1|0)<<4)>>3],h=+d(.5*(s-p)),c=l,l=+o[n+8+(e<<4)+8>>3],c=h*h+(c=+d(.5*(l-c)))*(+f(+p)*+f(+s)*c),a+=2*+y(+ +u(+c),+ +u(+(1-c)))}while((0|e)!=(0|t));return P=r,+(h=6371.007180918475*a)},_exactEdgeLengthM:function(e,t){var n,r,a=0,s=0,l=0,c=0,p=0,h=0;if(r=P,P=P+176|0,Xe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(l=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],l=+o[n+16>>3];do{p=s,s=+o[n+8+((e=e+1|0)<<4)>>3],h=+d(.5*(s-p)),c=l,l=+o[n+8+(e<<4)+8>>3],c=h*h+(c=+d(.5*(l-c)))*(+f(+p)*+f(+s)*c),a+=2*+y(+ +u(+c),+ +u(+(1-c)))}while((0|e)!=(0|t));return P=r,+(h=6371.007180918475*a*1e3)},_exactEdgeLengthRads:function(e,t){var n,r,a=0,s=0,l=0,c=0,p=0,h=0;if(r=P,P=P+176|0,Xe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(l=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],l=+o[n+16>>3];do{p=s,s=+o[n+8+((e=e+1|0)<<4)>>3],h=+d(.5*(s-p)),c=l,l=+o[n+8+(e<<4)+8>>3],c=h*h+(c=+d(.5*(l-c)))*(+f(+s)*+f(+p)*c),a+=2*+y(+ +u(+c),+ +u(+(1-c)))}while((0|e)<(0|t));return P=r,+a},_experimentalH3ToLocalIj:function(e,t,n,r,i){var o,a;return i|=0,a=P,P=P+16|0,(e=0|Qe(e|=0,t|=0,n|=0,r|=0,o=a))||(pe(o,i),e=0),P=a,0|e},_experimentalLocalIjToH3:function(e,t,n,r){var i,o;return e|=0,t|=0,r|=0,i=P,P=P+16|0,he(n|=0,o=i),r=0|et(e,t,o,r),P=i,0|r},_free:vt,_geoToH3:Ue,_getDestinationH3IndexFromUnidirectionalEdge:function(e,t){e|=0;var n,r,o=0;return n=P,P=P+16|0,o=n,!0&268435456==(2013265920&(t|=0)|0)?(r=0|Et(0|e,0|t,56),w(),i[o>>2]=0,o=0|D(e,-2130706433&t|134217728,7&r,o),t=0|w(),x(0|t),P=n,0|o):(o=0,x(0|(t=0)),P=n,0|o)},_getH3IndexesFromUnidirectionalEdge:function(e,t,n){e|=0;var r,o,a,s,l=0;a=P,P=P+16|0,r=a,s=!0&268435456==(2013265920&(t|=0)|0),o=-2130706433&t|134217728,i[(l=n|=0)>>2]=s?e:0,i[l+4>>2]=s?o:0,s?(t=0|Et(0|e,0|t,56),w(),i[r>>2]=0,e=0|D(e,o,7&t,r),t=0|w()):(e=0,t=0),i[(l=n+8|0)>>2]=e,i[l+4>>2]=t,P=a},_getH3UnidirectionalEdge:function(e,t,n,r){var o,a,s=0,l=0,u=0,c=0,f=0;if(a=P,P=P+16|0,o=a,!(0|Ge(e|=0,t|=0,n|=0,r|=0)))return c=0,x(0|(u=0)),P=a,0|c;for(u=-2130706433&t,s=(s=0==(0|De(e,t)))?1:2;i[o>>2]=0,l=s+1|0,!((0|(f=0|D(e,t,s,o)))==(0|n)&(0|w())==(0|r));){if(!(l>>>0<7)){s=0,e=0,c=6;break}s=l}return 6==(0|c)?(x(0|s),P=a,0|e):(f=0|Ot(0|s,0,56),c=0|u|w()|268435456,f|=e,x(0|c),P=a,0|f)},_getH3UnidirectionalEdgeBoundary:Xe,_getH3UnidirectionalEdgesFromHexagon:function(e,t,n){n|=0;var r,o=0;r=0==(0|De(e|=0,t|=0)),t&=-2130706433,i[(o=n)>>2]=r?e:0,i[o+4>>2]=r?285212672|t:0,i[(o=n+8|0)>>2]=e,i[o+4>>2]=301989888|t,i[(o=n+16|0)>>2]=e,i[o+4>>2]=318767104|t,i[(o=n+24|0)>>2]=e,i[o+4>>2]=335544320|t,i[(o=n+32|0)>>2]=e,i[o+4>>2]=352321536|t,i[(n=n+40|0)>>2]=e,i[n+4>>2]=369098752|t},_getOriginH3IndexFromUnidirectionalEdge:function(e,t){var n;return e|=0,x(0|((n=!0&268435456==(2013265920&(t|=0)|0))?-2130706433&t|134217728:0)),0|(n?e:0)},_getPentagonIndexes:Ye,_getRes0Indexes:function(e){e|=0;var t=0,n=0,r=0;t=0;do{Ot(0|t,0,45),r=134225919|w(),i[(n=e+(t<<3)|0)>>2]=-1,i[n+4>>2]=r,t=t+1|0}while(122!=(0|t))},_h3Distance:function(e,t,n,r){var i,o,a;return n|=0,r|=0,a=P,P=P+32|0,o=a,e=0==(0|Qe(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|Qe(e,t,n,r,o))?0|de(i,o):-1,P=a,0|e},_h3GetBaseCell:Pe,_h3GetFaces:function e(t,n,r){r|=0;var o,a=0,s=0,l=0,u=0,c=0,f=0,d=0,p=0;o=P,P=P+128|0,d=o+112|0,l=o+96|0,p=o,s=0|Et(0|(t|=0),0|(n|=0),52),w(),c=15&s,i[d>>2]=c,u=0|Et(0|t,0|n,45),w(),u&=127;e:do{if(0|I(u)){if(0|c)for(a=1;;){if(!(0==((f=0|Ot(7,0,3*(15-a|0)|0))&t|0)&0==((0|w())&n|0))){s=0;break e}if(!(a>>>0>>0))break;a=a+1|0}if(!(1&s))return f=0|Ot(c+1|0,0,52),p=0|w()|-15728641&n,e((f|t)&~(d=0|Ot(7,0,3*(14-c|0)|0)),p&~(0|w()),r),void(P=o);s=1}else s=0}while(0);He(t,n,l),s?(Ae(l,d,p),f=5):(Oe(l,d,p),f=6);e:do{if(0|I(u))if(c)for(a=1;;){if(!(0==((u=0|Ot(7,0,3*(15-a|0)|0))&t|0)&0==((0|w())&n|0))){a=8;break e}if(!(a>>>0>>0)){a=20;break}a=a+1|0}else a=20;else a=8}while(0);if(Ct(0|r,-1,0|a),s){s=0;do{for(we(l=p+(s<<4)|0,0|i[d>>2]),l=0|i[l>>2],a=0;!(-1==(0|(c=0|i[(u=r+(a<<2)|0)>>2]))|(0|c)==(0|l));)a=a+1|0;i[u>>2]=l,s=s+1|0}while((0|s)!=(0|f))}else{s=0;do{for(xe(l=p+(s<<4)|0,0|i[d>>2],0,1),l=0|i[l>>2],a=0;!(-1==(0|(c=0|i[(u=r+(a<<2)|0)>>2]))|(0|c)==(0|l));)a=a+1|0;i[u>>2]=l,s=s+1|0}while((0|s)!=(0|f))}P=o},_h3GetResolution:function(e,t){return t=0|Et(0|(e|=0),0|(t|=0),52),w(),15&t|0},_h3IndexesAreNeighbors:Ge,_h3IsPentagon:De,_h3IsResClassIII:function(e,t){return t=0|Et(0|(e|=0),0|(t|=0),52),w(),1&t|0},_h3IsValid:ke,_h3Line:function(e,t,n,r,o){n|=0,r|=0,o|=0;var a,s=0,u=0,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0,A=0,x=0,w=0,E=0;if(a=P,P=P+48|0,u=a+12|0,w=a,0==(0|Qe(e|=0,t|=0,e,t,s=a+24|0))&&0==(0|Qe(e,t,n,r,u))){if((0|(x=0|de(s,u)))<0)return P=a,0|(w=x);for(i[s>>2]=0,i[s+4>>2]=0,i[s+8>>2]=0,i[u>>2]=0,i[u+4>>2]=0,i[u+8>>2]=0,Qe(e,t,e,t,s),Qe(e,t,n,r,u),ge(s),ge(u),x?(m=+(0|x),A=s,n=p=0|i[s>>2],r=h=0|i[(b=s+4|0)>>2],s=g=0|i[(_=s+8|0)>>2],y=+((0|i[u>>2])-p|0)/m,v=+((0|i[u+4>>2])-h|0)/m,m=+((0|i[u+8>>2])-g|0)/m):(b=r=s+4|0,_=g=s+8|0,A=s,n=0|i[s>>2],r=0|i[r>>2],s=0|i[g>>2],y=0,v=0,m=0),i[w>>2]=n,i[(g=w+4|0)>>2]=r,i[(h=w+8|0)>>2]=s,p=0;;){E=y*(f=+(0|p))+ +(0|n),c=v*f+ +(0|i[b>>2]),f=m*f+ +(0|i[_>>2]),r=~~+St(+E),u=~~+St(+c),n=~~+St(+f),E=+l(+(+(0|r)-E)),c=+l(+(+(0|u)-c)),f=+l(+(+(0|n)-f));do{if(!(E>c&E>f)){if(d=0-r|0,c>f){s=d-n|0;break}s=u,n=d-u|0;break}r=0-(u+n)|0,s=u}while(0);if(i[w>>2]=r,i[g>>2]=s,i[h>>2]=n,me(w),et(e,t,w,o+(p<<3)|0),(0|p)==(0|x))break;p=p+1|0,n=0|i[A>>2]}return P=a,0|(w=0)}return P=a,0|(w=-1)},_h3LineSize:function(e,t,n,r){var i,o,a;return n|=0,r|=0,a=P,P=P+32|0,o=a,e=0==(0|Qe(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|Qe(e,t,n,r,o))?0|de(i,o):-1,P=a,(e>>>31^1)+e|0},_h3SetToLinkedGeo:function(e,t,n){n|=0;var r,o,a,s=0;if(a=P,P=P+32|0,r=a,function(e,t,n){e|=0,n|=0;var r,o,a=0,s=0,l=0,u=0,c=0;if(o=P,P=P+176|0,r=o,(0|(t|=0))<1)return ut(n,0,0),void(P=o);u=0|Et(0|i[(u=e)>>2],0|i[u+4>>2],52),w(),ut(n,(0|t)>6?t:6,15&u),u=0;do{if(qe(0|i[(a=e+(u<<3)|0)>>2],0|i[a+4>>2],r),(0|(a=0|i[r>>2]))>0){c=0;do{l=r+8+(c<<4)|0,(s=0|ht(n,a=r+8+(((0|(c=c+1|0))%(0|a)|0)<<4)|0,l))?dt(n,s):pt(n,l,a),a=0|i[r>>2]}while((0|c)<(0|a))}u=u+1|0}while((0|u)!=(0|t));P=o}(e|=0,t|=0,o=a+16|0),i[n>>2]=0,i[n+4>>2]=0,i[n+8>>2]=0,!(e=0|ft(o)))return $e(n),ct(o),void(P=a);do{t=0|Ze(n);do{Ke(t,e),s=e+16|0,i[r>>2]=i[s>>2],i[r+4>>2]=i[s+4>>2],i[r+8>>2]=i[s+8>>2],i[r+12>>2]=i[s+12>>2],dt(o,e),e=0|gt(o,r)}while(0!=(0|e));e=0|ft(o)}while(0!=(0|e));$e(n),ct(o),P=a},_h3ToCenterChild:function(e,t,n){n|=0;var r=0,i=0;if(r=0|Et(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(e|=i=0|Ot(0|n,0,52),t=0|w()|-15728641&t,(0|r)<(0|n)))do{i=0|Ot(7,0,3*(14-r|0)|0),r=r+1|0,e&=~i,t&=~(0|w())}while((0|r)<(0|n))}else t=0,e=0;return x(0|t),0|e},_h3ToChildren:Re,_h3ToGeo:We,_h3ToGeoBoundary:qe,_h3ToParent:Le,_h3UnidirectionalEdgeIsValid:function(e,t){var n=0;if(!(!0&268435456==(2013265920&(t|=0)|0)))return 0|(n=0);switch(n=0|Et(0|(e|=0),0|t,56),w(),7&n){case 0:case 7:return 0|(n=0)}return!0&16777216==(117440512&t|0)&0!=(0|De(e,n=-2130706433&t|134217728))?0|(n=0):0|(n=0|ke(e,n))},_hexAreaKm2:function(e){return+ +o[20496+((e|=0)<<3)>>3]},_hexAreaM2:function(e){return+ +o[20624+((e|=0)<<3)>>3]},_hexRing:function(e,t,n,r){e|=0,t|=0,r|=0;var o,a=0,s=0,l=0,u=0,c=0,f=0,d=0;if(o=P,P=P+16|0,d=o,!(n|=0))return i[(d=r)>>2]=e,i[d+4>>2]=t,P=o,0|(d=0);i[d>>2]=0;e:do{if(0|De(e,t))e=1;else{if(s=(0|n)>0){a=0,f=e;do{if(0==(0|(f=0|D(f,t,4,d)))&0==(0|(t=0|w()))){e=2;break e}if(a=a+1|0,0|De(f,t)){e=1;break e}}while((0|a)<(0|n));if(i[(c=r)>>2]=f,i[c+4>>2]=t,c=n+-1|0,s){s=0,l=1,a=f,e=t;do{if(0==(0|(a=0|D(a,e,2,d)))&0==(0|(e=0|w()))){e=2;break e}if(i[(u=r+(l<<3)|0)>>2]=a,i[u+4>>2]=e,l=l+1|0,0|De(a,e)){e=1;break e}s=s+1|0}while((0|s)<(0|n));u=0,s=l;do{if(0==(0|(a=0|D(a,e,3,d)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=e,s=s+1|0,0|De(a,e)){e=1;break e}u=u+1|0}while((0|u)<(0|n));l=0;do{if(0==(0|(a=0|D(a,e,1,d)))&0==(0|(e=0|w()))){e=2;break e}if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,s=s+1|0,0|De(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));l=0;do{if(0==(0|(a=0|D(a,e,5,d)))&0==(0|(e=0|w()))){e=2;break e}if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,s=s+1|0,0|De(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));l=0;do{if(0==(0|(a=0|D(a,e,4,d)))&0==(0|(e=0|w()))){e=2;break e}if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,s=s+1|0,0|De(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));for(l=0;;){if(0==(0|(a=0|D(a,e,6,d)))&0==(0|(e=0|w()))){e=2;break e}if((0|l)!=(0|c)){if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,0|De(a,e)){e=1;break e}s=s+1|0}if((0|(l=l+1|0))>=(0|n)){l=f,s=t;break}}}else l=f,a=f,s=t,e=t}else i[(l=r)>>2]=e,i[l+4>>2]=t,l=e,a=e,s=t,e=t;e=1&((0|l)!=(0|a)|(0|s)!=(0|e))}}while(0);return P=o,0|(d=e)},_i64Subtract:_t,_kRing:k,_kRingDistances:function(e,t,n,r,i){var o;if(0|L(e|=0,t|=0,n|=0,r|=0,i|=0)){if(Ct(0|r,0,(o=1+(0|b(3*n|0,n+1|0))|0)<<3|0),0|i)return Ct(0|i,0,o<<2|0),void R(e,t,n,r,i,o,0);(i=0|bt(o,4))&&(R(e,t,n,r,i,o,0),vt(i))}},_llvm_minnum_f64:Mt,_llvm_round_f64:St,_malloc:yt,_maxFaceCount:function(e,t){var n=0,r=0;if(r=0|Et(0|(e|=0),0|(t|=0),45),w(),!(0|I(127&r)))return 0|(r=2);if(r=0|Et(0|e,0|t,52),w(),!(r&=15))return 0|(r=5);for(n=1;;){if(!(0==((0|Ot(7,0,3*(15-n|0)|0))&e|0)&0==((0|w())&t|0))){n=2,e=6;break}if(!(n>>>0>>0)){n=5,e=6;break}n=n+1|0}return 6==(0|e)?0|n:0},_maxH3ToChildrenSize:function(e,t,n){return n|=0,e=0|Et(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(e&=15))<=(0|n)?0|(n=0|tt(7,n-e|0)):0|(n=0)},_maxKringSize:function(e){return 1+(0|b(3*(e|=0)|0,e+1|0))|0},_maxPolyfillSize:function(e,t){t|=0;var n,r=0,o=0,a=0,s=0,l=0;if(n=P,P=P+48|0,a=n+8|0,o=n,s=0|i[(l=e|=0)+4>>2],i[(r=o)>>2]=i[l>>2],i[r+4>>2]=s,rt(o,a),a=0|q(a,t),t=0|i[o>>2],(0|(o=0|i[e+8>>2]))<=0)return P=n,0|(l=(l=(s=(0|a)<(0|(l=t)))?l:a)+12|0);r=0|i[e+12>>2],e=0;do{t=(0|i[r+(e<<3)>>2])+t|0,e=e+1|0}while((0|e)<(0|o));return P=n,0|(l=(l=(l=(0|a)<(0|t))?t:a)+12|0)},_maxUncompactSize:function(e,t,n){e|=0,n|=0;var r=0,o=0,a=0,s=0;if((0|(t|=0))<=0)return 0|(n=0);if((0|n)>=16){for(r=0;;){if(!(0==(0|i[(s=e+(r<<3)|0)>>2])&0==(0|i[s+4>>2]))){r=-1,o=13;break}if((0|(r=r+1|0))>=(0|t)){r=0,o=13;break}}if(13==(0|o))return 0|r}r=0,s=0;e:for(;;){a=0|i[(o=e+(s<<3)|0)>>2],o=0|i[o+4>>2];do{if(!(0==(0|a)&0==(0|o))){if(o=0|Et(0|a,0|o,52),w(),(0|(o&=15))>(0|n)){r=-1,o=13;break e}if((0|o)==(0|n)){r=r+1|0;break}r=(0|tt(7,n-o|0))+r|0;break}}while(0);if((0|(s=s+1|0))>=(0|t)){o=13;break}}return 13==(0|o)?0|r:0},_memcpy:Tt,_memset:Ct,_numHexagons:function(e){var t;return e=0|i[(t=21008+((e|=0)<<3)|0)>>2],x(0|i[t+4>>2]),0|e},_pentagonIndexCount:function(){return 12},_pointDistKm:Te,_pointDistM:function(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+d(.5*(r-n)))*i+(a=+d(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+f(+r)*+f(+n)*a),2*+y(+ +u(+a),+ +u(+(1-a)))*6371.007180918475*1e3},_pointDistRads:function(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+d(.5*(r-n)))*i+(a=+d(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+f(+r)*+f(+n)*a),2*+y(+ +u(+a),+ +u(+(1-a)))},_polyfill:function(e,t,n){var r,o=0,a=0,s=0,l=0,u=0;if(r=P,P=P+48|0,o=r+8|0,a=r,0|function(e,t,n){t|=0,n|=0;var r,o,a,s,l,u=0,c=0,f=0,d=0,p=0,h=0,g=0,m=0,y=0,v=0,b=0,_=0,A=0,x=0,O=0,M=0,S=0,T=0,C=0,k=0,D=0,I=0,N=0,F=0,z=0;l=P,P=P+112|0,o=l+80|0,h=l+72|0,a=l,s=l+56|0,(z=0|yt(32+(i[(g=(e=e|0)+8|0)>>2]<<5)|0))||E(22848,22448,800,22456);if(it(e,z),u=0|i[(f=e)+4>>2],i[(p=h)>>2]=i[f>>2],i[p+4>>2]=u,rt(h,o),p=0|q(o,t),u=0|i[h>>2],(0|(f=0|i[g>>2]))>0){d=0|i[e+12>>2],c=0;do{u=(0|i[d+(c<<3)>>2])+u|0,c=c+1|0}while((0|c)!=(0|f))}if(c=0|bt(r=(p=(0|p)<(0|u)?u:p)+12|0,8),m=0|bt(r,8),i[o>>2]=0,F=0|i[(N=e)+4>>2],i[(u=h)>>2]=i[N>>2],i[u+4>>2]=F,0|(u=0|j(h,r,t,o,c,m)))return vt(c),vt(m),vt(z),P=l,0|(z=u);e:do{if((0|i[g>>2])>0){for(f=e+12|0,u=0;d=0|j((0|i[f>>2])+(u<<3)|0,r,t,o,c,m),u=u+1|0,!(0|d);)if((0|u)>=(0|i[g>>2]))break e;return vt(c),vt(m),vt(z),P=l,0|(z=d)}}while(0);(0|p)>-12&&Ct(0|m,0,((0|r)>1?r:1)<<3|0);e:do{if((0|i[o>>2])>0){F=((0|r)<0)<<31>>31,T=c,C=m,k=c,D=c,I=m,N=c,u=c,x=c,O=m,M=m,S=m,c=m;t:for(;;){for(A=0|i[o>>2],b=0,_=0,f=0;;){p=(d=a)+56|0;do{i[d>>2]=0,d=d+4|0}while((0|d)<(0|p));if(h=0|i[(t=T+(b<<3)|0)>>2],t=0|i[t+4>>2],0|L(h,t,1,a,0)){p=(d=a)+56|0;do{i[d>>2]=0,d=d+4|0}while((0|d)<(0|p));0|(d=0|bt(7,4))&&(R(h,t,1,a,d,7,0),vt(d))}v=0;do{m=0|i[(y=a+(v<<3)|0)>>2],y=0|i[y+4>>2];n:do{if(!(0==(0|m)&0==(0|y))){if(h=0|wt(0|m,0|y,0|r,0|F),w(),t=0|i[(p=d=n+(h<<3)|0)>>2],p=0|i[p+4>>2],!(0==(0|t)&0==(0|p)))for(g=0;;){if((0|g)>(0|r))break t;if((0|t)==(0|m)&(0|p)==(0|y))break n;if(t=0|i[(p=d=n+((h=(h+1|0)%(0|r)|0)<<3)|0)>>2],p=0|i[p+4>>2],0==(0|t)&0==(0|p))break;g=g+1|0}0==(0|m)&0==(0|y)||(We(m,y,s),0|ot(e,z,s)&&(i[(g=d)>>2]=m,i[g+4>>2]=y,i[(g=C+(f<<3)|0)>>2]=m,i[g+4>>2]=y,f=f+1|0))}}while(0);v=v+1|0}while(v>>>0<7);if((0|(_=_+1|0))>=(0|A))break;b=b+1|0}if((0|A)>0&&Ct(0|k,0,A<<3|0),i[o>>2]=f,!((0|f)>0))break e;m=c,y=S,v=N,b=M,_=O,A=C,c=x,S=u,M=D,O=k,x=m,u=y,N=I,I=v,D=b,k=_,C=T,T=A}return vt(D),vt(I),vt(z),P=l,0|(z=-1)}u=m}while(0);return vt(z),vt(c),vt(u),P=l,0|(z=0)}(e|=0,t|=0,n|=0)){if(s=0|i[(u=e)+4>>2],i[(l=a)>>2]=i[u>>2],i[l+4>>2]=s,rt(a,o),l=0|q(o,t),t=0|i[a>>2],(0|(s=0|i[e+8>>2]))>0){a=0|i[e+12>>2],o=0;do{t=(0|i[a+(o<<3)>>2])+t|0,o=o+1|0}while((0|o)!=(0|s))}(0|(t=(0|l)<(0|t)?t:l))<=-12||Ct(0|n,0,8+(((0|(u=t+11|0))>0?u:0)<<3)|0),P=r}else P=r},_res0IndexCount:function(){return 122},_round:Pt,_sbrk:kt,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(e,t,n,r,o){e|=0,n|=0,r|=0,o|=0;var a=0,s=0,l=0,u=0,c=0,f=0;if((0|(t|=0))<=0)return 0|(o=0);if((0|o)>=16){for(a=0;;){if(!(0==(0|i[(f=e+(a<<3)|0)>>2])&0==(0|i[f+4>>2]))){a=14;break}if((0|(a=a+1|0))>=(0|t)){s=0,a=16;break}}if(14==(0|a))return 0|((0|r)>0?-2:-1);if(16==(0|a))return 0|s}a=0,f=0;e:for(;;){s=0|i[(l=c=e+(f<<3)|0)>>2],l=0|i[l+4>>2];do{if(!(0==(0|s)&0==(0|l))){if((0|a)>=(0|r)){s=-1,a=16;break e}if(u=0|Et(0|s,0|l,52),w(),(0|(u&=15))>(0|o)){s=-2,a=16;break e}if((0|u)==(0|o)){i[(c=n+(a<<3)|0)>>2]=s,i[c+4>>2]=l,a=a+1|0;break}if((0|(s=(0|tt(7,o-u|0))+a|0))>(0|r)){s=-1,a=16;break e}Re(0|i[c>>2],0|i[c+4>>2],o,n+(a<<3)|0),a=s}}while(0);if((0|(f=f+1|0))>=(0|t)){s=0,a=16;break}}return 16==(0|a)?0|s:0},establishStackSpace:function(e,t){P=e|=0},stackAlloc:function(e){var t;return t=P,P=(P=P+(e|=0)|0)+15&-16,0|t},stackRestore:function(e){P=e|=0},stackSave:function(){return 0|P}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:le,b:function(e){u=e},c:c,d:function(e,t,n,r){le("Assertion failed: "+g(e)+", at: "+[t?g(t):"unknown filename",n,r?g(r):"unknown function"])},e:function(e){return n.___errno_location&&(_[n.___errno_location()>>2]=e),e},f:Y,g:function(e,t,n){v.set(v.subarray(t,t+n),e)},h:function(e){var t=Y();if(e>2130706432)return!1;for(var n=Math.max(t,16777216);n>0]=t;break;case"i16":b[e>>1]=t;break;case"i32":_[e>>2]=t;break;case"i64":z=[t>>>0,(F=t,+k(F)>=1?F>0?(0|D(+R(F/4294967296),4294967295))>>>0:~~+L((F-+(~~F>>>0))/4294967296)>>>0:0)],_[e>>2]=z[0],_[e+4>>2]=z[1];break;case"float":A[e>>2]=t;break;case"double":x[e>>3]=t;break;default:le("invalid type for setValue: "+n)}},n.getValue=function(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return y[e>>0];case"i16":return b[e>>1];case"i32":case"i64":return _[e>>2];case"float":return A[e>>2];case"double":return x[e>>3];default:le("invalid type for getValue: "+t)}return null},n.getTempRet0=c,B){V(B)||(K=B,B=n.locateFile?n.locateFile(K,a):a+K),j++,n.monitorRunDependencies&&n.monitorRunDependencies(j);var re=function(e){e.byteLength&&(e=new Uint8Array(e)),v.set(e,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(e){if(j--,n.monitorRunDependencies&&n.monitorRunDependencies(j),0==j&&(null!==I&&(clearInterval(I),I=null),N)){var t=N;N=null,t()}}()},ie=function(){i(B,re,(function(){throw"could not load memory initializer "+B}))},oe=Z(B);if(oe)re(oe.buffer);else if(n.memoryInitializerRequest){var ae=function(){var e=n.memoryInitializerRequest,t=e.response;if(200!==e.status&&0!==e.status){var r=Z(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+e.status+", retrying "+B),void ie();t=r.buffer}re(t)};n.memoryInitializerRequest.response?setTimeout(ae,0):n.memoryInitializerRequest.addEventListener("load",ae)}else ie()}function se(e){function t(){$||($=!0,f||(M(T),M(C),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),P.unshift(e);var e;M(P)}()))}e=e||o,j>0||(!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),S.unshift(e);var e;M(S)}(),j>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}function le(e){throw n.onAbort&&n.onAbort(e),s(e+=""),l(e),f=!0,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}if(N=function e(){$||se(),$||(N=e)},n.run=se,n.abort=le,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return se(),e}("object"==typeof r?r:{}),i="number",o={};[["sizeOfH3Index",i],["sizeOfGeoCoord",i],["sizeOfGeoBoundary",i],["sizeOfGeoPolygon",i],["sizeOfGeofence",i],["sizeOfLinkedGeoPolygon",i],["sizeOfCoordIJ",i],["h3IsValid","number",["number","number"]],["geoToH3","number",[i,i,"number"]],["h3ToGeo",null,["number","number",i]],["h3ToGeoBoundary",null,["number","number",i]],["maxKringSize",i,[i]],["kRing",null,["number","number",i,i]],["kRingDistances",null,["number","number",i,i,i]],["hexRing",null,["number","number",i,i]],["maxPolyfillSize",i,[i,"number"]],["polyfill",null,[i,"number",i]],["h3SetToLinkedGeo",null,[i,i,i]],["destroyLinkedPolygon",null,[i]],["compact",i,[i,i,i]],["uncompact",i,[i,i,i,i,"number"]],["maxUncompactSize",i,[i,i,"number"]],["h3IsPentagon","number",["number","number"]],["h3IsResClassIII","number",["number","number"]],["h3GetBaseCell",i,["number","number"]],["h3GetResolution",i,["number","number"]],["maxFaceCount",i,["number","number"]],["h3GetFaces",null,["number","number",i]],["h3ToParent","number",["number","number","number"]],["h3ToChildren",null,["number","number","number",i]],["h3ToCenterChild","number",["number","number","number"]],["maxH3ToChildrenSize",i,["number","number","number"]],["h3IndexesAreNeighbors","number",["number","number","number","number"]],["getH3UnidirectionalEdge","number",["number","number","number","number"]],["getOriginH3IndexFromUnidirectionalEdge","number",["number","number"]],["getDestinationH3IndexFromUnidirectionalEdge","number",["number","number"]],["h3UnidirectionalEdgeIsValid","number",["number","number"]],["getH3IndexesFromUnidirectionalEdge",null,["number","number",i]],["getH3UnidirectionalEdgesFromHexagon",null,["number","number",i]],["getH3UnidirectionalEdgeBoundary",null,["number","number",i]],["h3Distance",i,["number","number","number","number"]],["h3Line",i,["number","number","number","number",i]],["h3LineSize",i,["number","number","number","number"]],["experimentalH3ToLocalIj",i,["number","number","number","number",i]],["experimentalLocalIjToH3",i,["number","number",i,i]],["hexAreaM2",i,["number"]],["hexAreaKm2",i,["number"]],["edgeLengthM",i,["number"]],["edgeLengthKm",i,["number"]],["pointDistM",i,[i,i]],["pointDistKm",i,[i,i]],["pointDistRads",i,[i,i]],["cellAreaM2",i,["number","number"]],["cellAreaKm2",i,["number","number"]],["cellAreaRads2",i,["number","number"]],["exactEdgeLengthM",i,["number","number"]],["exactEdgeLengthKm",i,["number","number"]],["exactEdgeLengthRads",i,["number","number"]],["numHexagons",i,["number"]],["getRes0Indexes",null,[i]],["res0IndexCount",i],["getPentagonIndexes",null,[i,i]],["pentagonIndexCount",i]].forEach((function(e){o[e[0]]=r.cwrap.apply(r,e)}));var a=o.sizeOfH3Index(),s=o.sizeOfGeoCoord(),l=o.sizeOfGeoBoundary(),u=o.sizeOfGeoPolygon(),c=o.sizeOfGeofence(),f=o.sizeOfLinkedGeoPolygon(),d=o.sizeOfCoordIJ(),p={m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"};function h(e){if("number"!=typeof e||e<0||e>15||Math.floor(e)!==e)throw new Error("Invalid resolution: "+e)}var g=/[^0-9a-fA-F]/;function m(e){if(Array.isArray(e)&&2===e.length&&Number.isInteger(e[0])&&Number.isInteger(e[1]))return e;if("string"!=typeof e||g.test(e))return[0,0];var t=parseInt(e.substring(0,e.length-8),16);return[parseInt(e.substring(e.length-8),16),t]}function y(e){if(e>=0)return e.toString(16);var t=b(8,(e&=2147483647).toString(16));return t=(parseInt(t[0],16)+8).toString(16)+t.substring(1)}function v(e,t){return y(t)+b(8,y(e))}function b(e,t){for(var n=e-t.length,r="",i=0;i=0&&n.push(o)}return n}(s,a);return r._free(s),l}function N(e){var t=m(e),n=t[0],r=t[1];return o.h3IsValid(n,r)?o.h3GetResolution(n,r):-1}function F(e,t,n){var i=r._malloc(s);r.HEAPF64.set([e,t].map(ye),i/8);var a=x(o.geoToH3(i,n));return r._free(i),a}function z(e){var t=r._malloc(s),n=m(e),i=n[0],a=n[1];o.h3ToGeo(i,a,t);var l=C(t);return r._free(t),l}function B(e,t){var n=r._malloc(l),i=m(e),a=i[0],s=i[1];o.h3ToGeoBoundary(a,s,n);var u=k(n,t,t);return r._free(n),u}function U(e,t){var n=m(e),r=n[0],i=n[1];return x(o.h3ToParent(r,i,t))}function V(e,t){if(!L(e))return[];var n=m(e),i=n[0],s=n[1],l=o.maxH3ToChildrenSize(i,s,t),u=r._calloc(l,a);o.h3ToChildren(i,s,t,u);var c=O(u,l);return r._free(u),c}function H(e,t){var n=m(e),r=n[0],i=n[1];return x(o.h3ToCenterChild(r,i,t))}function W(e,t){var n=m(e),i=n[0],s=n[1],l=o.maxKringSize(t),u=r._calloc(l,a);o.kRing(i,s,t,u);var c=O(u,l);return r._free(u),c}function q(e,t){var n=m(e),i=n[0],s=n[1],l=o.maxKringSize(t),u=r._calloc(l,a),c=r._calloc(l,4);o.kRingDistances(i,s,t,u,c);for(var f=[],d=0;d0){n=r._calloc(i,c);for(var l=0;l0){for(var o=r.getValue(e+n,"i32"),a=0;a"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n2)throw new d(e);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e}function n(e){return new t(e)}return t.prototype.transform=e,n.Format=t,n}},function(e,t,n){(function(t){var n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/,i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=/^\[object .+?Constructor\]$/,l="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")();var f,d=Array.prototype,p=Function.prototype,h=Object.prototype,g=c["__core-js_shared__"],m=(f=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",y=p.toString,v=h.hasOwnProperty,b=h.toString,_=RegExp("^"+y.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=c.Symbol,x=d.splice,w=D(c,"Map"),E=D(Object,"create"),O=A?A.prototype:void 0,M=O?O.toString:void 0;function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},T.prototype.set=function(e,t){var n=this.__data__,r=P(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},C.prototype.clear=function(){this.__data__={hash:new S,map:new(w||T),string:new S}},C.prototype.delete=function(e){return R(this,e).delete(e)},C.prototype.get=function(e){return R(this,e).get(e)},C.prototype.has=function(e){return R(this,e).has(e)},C.prototype.set=function(e,t){return R(this,e).set(e,t),this};var j=N((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(U(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return i.test(e)&&t.push(""),e.replace(o,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));function I(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function N(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(N.Cache||C),n}function F(e,t){return e===t||e!=e&&t!=t}N.Cache=C;var z=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==b.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:k(e,t);return void 0===r?n:r}}).call(this,n(50))},function(e,t,n){"use strict";var r=n(5);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.colorMaker=t.layerColors=t.OVERLAY_TYPE=t.LAYER_ID_LENGTH=void 0;var i=r(n(69)),o=r(n(90)),a=r(n(4)),s=r(n(13)),l=r(n(14)),u=r(n(9)),c=n(93),f=r(n(386)),d=n(480),p=n(41),h=n(105),g=r(n(2142)),m=n(2143),y=n(37),v=n(472),b=n(749),_=n(235),A=n(88),x=n(73),w=n(392),E=n(198);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(this,e),this.id=t.id||(0,A.generateHashId)(6),this.meta={},this.visConfigSettings={},this.config=this.getDefaultLayerConfig(M({columns:this.getLayerColumns()},t))}return(0,l.default)(e,[{key:"layerIcon",get:function(){return g.default}},{key:"overlayType",get:function(){return L.deckgl}},{key:"type",get:function(){return null}},{key:"name",get:function(){return this.type}},{key:"isAggregated",get:function(){return!1}},{key:"requiredLayerColumns",get:function(){return[]}},{key:"optionalColumns",get:function(){return[]}},{key:"noneLayerDataAffectingProps",get:function(){return["label","opacity","thickness","isVisible","hidden"]}},{key:"visualChannels",get:function(){return{color:{property:"color",field:"colorField",scale:"colorScale",domain:"colorDomain",range:"colorRange",key:"color",channelScaleType:y.CHANNEL_SCALES.color,nullValue:y.NO_VALUE_COLOR,defaultValue:function(e){return e.color}},size:{property:"size",field:"sizeField",scale:"sizeScale",domain:"sizeDomain",range:"sizeRange",key:"size",channelScaleType:y.CHANNEL_SCALES.size,nullValue:0,defaultValue:1}}}},{key:"columnPairs",get:function(){return null}},{key:"defaultPointColumnPairs",get:function(){return{lat:{pair:"lng",fieldPairKey:"lat"},lng:{pair:"lat",fieldPairKey:"lng"}}}},{key:"defaultLinkColumnPairs",get:function(){return{lat0:{pair:"lng0",fieldPairKey:"lat"},lng0:{pair:"lat0",fieldPairKey:"lng"},lat1:{pair:"lng1",fieldPairKey:"lat"},lng1:{pair:"lat1",fieldPairKey:"lng"}}}},{key:"layerInfoModal",get:function(){return null}},{key:"getDefaultLayerConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{dataId:e.dataId||null,label:e.label||_.DEFAULT_LAYER_LABEL,color:e.color||j.next().value,columns:e.columns||null,isVisible:e.isVisible||!1,isConfigActive:e.isConfigActive||!1,highlightColor:e.highlightColor||_.DEFAULT_HIGHLIGHT_COLOR,hidden:e.hidden||!1,colorField:null,colorDomain:[0,1],colorScale:y.SCALE_TYPES.quantile,sizeDomain:[0,1],sizeScale:y.SCALE_TYPES.linear,sizeField:null,visConfig:{},textLabel:[_.DEFAULT_TEXT_LABEL],colorUI:{color:_.DEFAULT_COLOR_UI,colorRange:_.DEFAULT_COLOR_UI},animation:{enabled:!1}}}},{key:"getVisualChannelDescription",value:function(e){return{label:this.visConfigSettings[this.visualChannels[e].range].label,measure:this.config[this.visualChannels[e].field]?this.config[this.visualChannels[e].field].displayName||this.config[this.visualChannels[e].field].name:this.visualChannels[e].defaultMeasure}}},{key:"assignColumn",value:function(e,t){var n=t?{value:t.name,fieldIdx:t.fieldIdx}:{value:null,fieldIdx:-1};return M(M({},this.config.columns),{},(0,a.default)({},e,M(M({},this.config.columns[e]),n)))}},{key:"assignColumnPairs",value:function(e,t){var n,r,i,o;if(!this.columnPairs||null===(n=this.columnPairs)||void 0===n||!n[e])return this.config.columns;var s=null===(r=this.columnPairs)||void 0===r?void 0:r[e],l=s.pair,u=s.fieldPairKey,c=(null===(i=this.columnPairs)||void 0===i?void 0:i[l]).fieldPairKey;return M(M({},this.config.columns),{},(o={},(0,a.default)(o,e,t[u]),(0,a.default)(o,l,t[c]),o))}},{key:"getZoomFactor",value:function(e){var t=e.zoom,n=e.zoomOffset,r=void 0===n?0:n;return Math.pow(2,Math.max(14-t+r,0))}},{key:"getElevationZoomFactor",value:function(e){var t=e.zoom,n=e.zoomOffset,r=void 0===n?0:n;return this.config.visConfig.enableElevationZoomFactor?Math.pow(2,Math.max(8-t+r,0)):1}},{key:"formatLayerData",value:function(e,t){return{}}},{key:"renderLayer",value:function(){return[]}},{key:"getHoverData",value:function(e,t){return e?t.row(e.index):null}},{key:"assignConfigToLayer",value:function(e,t){var n=this,r=["colorRange","strokeColorRange"].concat(Object.values(this.visualChannels).map((function(e){return e.field}))),i=["animation"].concat(Object.values(this.visualChannels).map((function(e){return e.domain})));Object.values(this.visualChannels).forEach((function(r){e.visConfig[r.range]&&n.visConfigSettings[r.range]&&t[r.range].group!==n.visConfigSettings[r.range].group&&i.push(r.range)}));var o=this.config,a=this.copyLayerConfig(o,e,{shallowCopy:r,notToCopy:i});this.updateLayerConfig(a),Object.keys(this.visualChannels).forEach((function(e){n.validateVisualChannel(e)}))}},{key:"copyLayerConfig",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.shallowCopy,o=void 0===i?[]:i,a=r.notToCopy,s=void 0===a?[]:a,l={};return Object.keys(e).forEach((function(r){(0,A.isPlainObject)(e[r])&&(0,A.isPlainObject)(t[r])&&!o.includes(r)&&!s.includes(r)?l[r]=n.copyLayerConfig(e[r],t[r],{shallowCopy:o,notToCopy:s}):(0,x.notNullorUndefined)(t[r])&&!s.includes(r)?l[r]=t[r]:l[r]=e[r]})),l}},{key:"registerVisConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){"string"==typeof n&&_.LAYER_VIS_CONFIGS[e[n]]?(t.config.visConfig[n]=_.LAYER_VIS_CONFIGS[e[n]].defaultValue,t.visConfigSettings[n]=_.LAYER_VIS_CONFIGS[e[n]]):["type","defaultValue"].every((function(t){return e[n].hasOwnProperty(t)}))&&(t.config.visConfig[n]=e[n].defaultValue,t.visConfigSettings[n]=e[n])}))}},{key:"getLayerColumns",value:function(){var e=this.columnValidators||{},t=this.requiredLayerColumns.reduce((function(t,n){return M(M({},t),{},(0,a.default)({},n,e[n]?{value:null,fieldIdx:-1,validator:e[n]}:{value:null,fieldIdx:-1}))}),{}),n=this.optionalColumns.reduce((function(e,t){return M(M({},e),{},(0,a.default)({},t,{value:null,fieldIdx:-1,optional:!0}))}),{});return M(M({},t),n)}},{key:"updateLayerConfig",value:function(e){return this.config=M(M({},this.config),e),this}},{key:"updateLayerVisConfig",value:function(e){return this.config.visConfig=M(M({},this.config.visConfig),e),this}},{key:"updateLayerColorUI",value:function(e,t){var n=this.config,r=n.colorUI,i=n.visConfig;if(!(0,A.isPlainObject)(t)||"string"!=typeof e)return this;var s=Object.entries(t).reduce((function(e,t){var n=(0,o.default)(t,2),r=n[0],i=n[1];return M(M({},e),{},(0,a.default)({},r,(0,A.isPlainObject)(e[r])&&(0,A.isPlainObject)(i)?M(M({},e[r]),i):i))}),r[e]||_.DEFAULT_COLOR_UI),l=M(M({},r),{},(0,a.default)({},e,s));return this.updateLayerConfig({colorUI:l}),i[e]&&i[e].colors&&(this.updateColorUIByColorRange(t,e),this.updateColorRangeByColorUI(t,r,e),this.updateCustomPalette(t,r,e)),this}},{key:"updateCustomPalette",value:function(e,t,n){if(e.colorRangeConfig&&e.colorRangeConfig.custom){var r=this.config,o=r.colorUI,s=r.visConfig;if(s[n]){var l=s[n].colors,u=M(M({},o[n].customPalette),{},{name:"Custom Palette",colors:(0,i.default)(l)});this.updateLayerConfig({colorUI:M(M({},o),{},(0,a.default)({},n,M(M({},o[n]),{},{customPalette:u})))})}}}},{key:"updateColorUIByColorRange",value:function(e,t){if("number"==typeof e.showDropdown){var n=this.config,r=n.colorUI,i=n.visConfig;this.updateLayerConfig({colorUI:M(M({},r),{},(0,a.default)({},t,M(M({},r[t]),{},{colorRangeConfig:M(M({},r[t].colorRangeConfig),{},{steps:i[t].colors.length,reversed:Boolean(i[t].reversed)})})))})}}},{key:"updateColorRangeByColorUI",value:function(e,t,n){if(e.colorRangeConfig&&["reversed","steps"].some((function(r){return e.colorRangeConfig.hasOwnProperty(r)&&e.colorRangeConfig[r]!==(t[n]||_.DEFAULT_COLOR_UI).colorRangeConfig[r]}))){var r,i=this.config,o=i.colorUI,s=i.visConfig,l=o[n].colorRangeConfig,u=l.steps,c=l.reversed,f=s[n];if(e.colorRangeConfig.hasOwnProperty("steps")){var d=(0,E.getColorGroupByName)(f);if(d)(r=v.COLOR_RANGES.filter((function(e){return(0,E.getColorGroupByName)(e)===d})).find((function(e){return e.colors.length===u})))&&f.reversed&&(r=(0,E.reverseColorRange)(!0,r))}e.colorRangeConfig.hasOwnProperty("reversed")&&(r=(0,E.reverseColorRange)(c,r||f)),r&&this.updateLayerVisConfig((0,a.default)({},n,r))}}},{key:"hasAllColumns",value:function(){var e=this.config.columns;return e&&Object.values(e).every((function(e){return Boolean(e.optional||e.value&&e.fieldIdx>-1)}))}},{key:"hasLayerData",value:function(e){return!!e&&Boolean(e.data&&e.data.length)}},{key:"isValidToSave",value:function(){return this.type&&this.hasAllColumns()}},{key:"shouldRenderLayer",value:function(e){return this.type&&this.hasAllColumns()&&this.hasLayerData(e)&&"function"==typeof this.renderLayer}},{key:"getColorScale",value:function(e,t,n){if(Array.isArray(n.colorMap)){var r=new Map;return n.colorMap.forEach((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];r.set(n,"string"==typeof i?(0,E.hexToRgb)(i):i)})),y.SCALE_FUNC[y.SCALE_TYPES.ordinal]().domain(r.keys()).range(r.values()).unknown(r.get(_.UNKNOWN_COLOR_KEY)||y.NO_VALUE_COLOR)}return this.getVisChannelScale(e,t,n.colors.map(E.hexToRgb))}},{key:"getAttributeAccessors",value:function(e){var t=this,n=e.dataAccessor,r=void 0===n?P:n,i=e.dataContainer,o={};return Object.keys(this.visualChannels).forEach((function(e){var n=t.visualChannels[e],a=n.field,s=n.fixed,l=n.scale,u=n.domain,f=n.range,d=n.accessor,p=n.defaultValue,h=n.getAttributeValue,g=n.nullValue,m=n.channelScaleType;if(t.config[a]){var v=[t.config[l],t.config[u],t.config.visConfig[f]],b=s&&t.config.visConfig[s],_=m===y.CHANNEL_SCALES.color?t.getColorScale.apply(t,v):t.getVisChannelScale.apply(t,v.concat([b]));o[d]=function(e){return t.getEncodedChannelValue(_,r(i)(e),t.config[a],g)}}else o[d]="function"==typeof h?h(t.config):"function"==typeof p?p(t.config):p;o[d]||c.console.warn("Failed to provide accessor function for ".concat(d||e))})),o}},{key:"getVisChannelScale",value:function(e,t,n,r){return y.SCALE_FUNC[r?"linear":e]().domain(t).range(r?t:n)}},{key:"getPointsBounds",value:function(e,t){var n=(e.numRows()>5e3?(0,w.getSampleData)(e,5e3):e).mapIndex(t),r=(0,x.getLatLngBounds)(n,1,[-90,90]),i=(0,x.getLatLngBounds)(n,0,[-180,180]);return r&&i?[i[0],r[0],i[1],r[1]]:null}},{key:"getChangedTriggers",value:function(e){var t=(0,m.diffUpdateTriggers)(e,this._oldDataUpdateTriggers);return this._oldDataUpdateTriggers=e,t}},{key:"getEncodedChannelValue",value:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:y.NO_VALUE_COLOR,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:k,a=n.type,s=o(n,t);return(0,x.notNullorUndefined)(s)?(r=a===y.ALL_FIELD_TYPES.timestamp?e(new Date(s)):e(s),(0,x.notNullorUndefined)(r)||(r=i),r):i}},{key:"updateMeta",value:function(e){this.meta=M(M({},this.meta),e)}},{key:"getDataUpdateTriggers",value:function(e){var t=e.filteredIndex,n=e.id,r=e.allData,i=this.config.columns;return M({getData:{datasetId:n,allData:r,columns:i,filteredIndex:t},getMeta:{datasetId:n,allData:r,columns:i}},(this.config.textLabel||[]).reduce((function(e,t,n){return M(M({},e),{},(0,a.default)({},"getLabelCharacterSet-".concat(n),t.field?t.field.name:null))}),{}))}},{key:"updateData",value:function(e,t){if(!this.config.dataId)return{};var n=e[this.config.dataId],r=n.dataContainer,i=this.getPositionAccessor(r),o=this.getDataUpdateTriggers(n),a=this.getChangedTriggers(o);a.getMeta&&this.updateLayerMeta(r,i);return{data:!a.getData&&t&&t.data?t.data:this.calculateDataAttribute(n,i),triggerChanged:a}}},{key:"updateLayerDomain",value:function(e,t){var n=this,r=this.getDataset(e);return r?(Object.values(this.visualChannels).forEach((function(e){var i=e.scale,o=n.config[i];if(!t||o!==y.SCALE_TYPES.ordinal){var s=e.domain,l=n.calculateLayerDomain(r,e);n.updateLayerConfig((0,a.default)({},s,l))}})),this):this}},{key:"getDataset",value:function(e){return this.config.dataId?e[this.config.dataId]:null}},{key:"validateVisualChannel",value:function(e){this.validateFieldType(e),this.validateScale(e)}},{key:"validateFieldType",value:function(e){var t=this.visualChannels[e],n=t.field,r=t.channelScaleType,i=t.supportedFieldTypes;this.config[n]&&((i||y.CHANNEL_SCALE_SUPPORTED_FIELDS[r]).includes(this.config[n].type)||this.updateLayerConfig((0,a.default)({},n,null)))}},{key:"validateScale",value:function(e){var t=this.visualChannels[e].scale;if(t){var n=this.getScaleOptions(e);n.includes(this.config[t])||this.updateLayerConfig((0,a.default)({},t,n[0]))}}},{key:"getScaleOptions",value:function(e){var t=this.visualChannels[e],n=t.field,r=t.scale,i=t.channelScaleType;return this.config[n]?y.FIELD_OPTS[this.config[n].type].scale[i]:[this.getDefaultLayerConfig()[r]]}},{key:"updateLayerVisualChannel",value:function(e,t){var n=this.visualChannels[t];this.validateVisualChannel(t);var r=this.calculateLayerDomain(e,n);this.updateLayerConfig((0,a.default)({},n.domain,r))}},{key:"getVisualChannelUpdateTriggers",value:function(){var e=this,t={};return Object.values(this.visualChannels).forEach((function(n){var r,i=n.accessor,o=n.field,s=n.scale,l=n.domain,u=n.range,c=n.defaultValue,f=n.fixed;t[i]=M((r={},(0,a.default)(r,o,e.config[o]),(0,a.default)(r,s,e.config[s]),(0,a.default)(r,l,e.config[l]),(0,a.default)(r,u,e.config.visConfig[u]),(0,a.default)(r,"defaultValue","function"==typeof c?c(e.config):c),r),f?(0,a.default)({},f,e.config.visConfig[f]):{})})),t}},{key:"calculateLayerDomain",value:function(e,t){var n=t.scale,r=this.config[n],i=this.config[t.field];return i&&e.getColumnLayerDomain(i,r)||T}},{key:"hasHoveredObject",value:function(e){return this.isLayerHovered(e)&&e.object?e.object:null}},{key:"isLayerHovered",value:function(e){var t,n;return(null==e?void 0:e.picked)&&(null==e||null===(t=e.layer)||void 0===t||null===(n=t.props)||void 0===n?void 0:n.id)===this.id}},{key:"getRadiusScaleByZoom",value:function(e,t){var n=Object.values(this.visualChannels).find((function(e){return"radius"===e.property}));if(!n)return 1;var r=n.field,i=void 0===t?this.config.visConfig.fixedRadius:t,o=this.config.visConfig.radius;return i?1:(this.config[r]?1:o)*this.getZoomFactor(e)}},{key:"shouldCalculateLayerData",value:function(e){var t=this;return e.some((function(e){return!t.noneLayerDataAffectingProps.includes(e)}))}},{key:"getBrushingExtensionProps",value:function(e,t){var n=e.brush;return{autoHighlight:!n.enabled,brushingRadius:1e3*n.config.size,brushingTarget:t||"source",brushingEnabled:n.enabled}}},{key:"getDefaultDeckLayerProps",value:function(e){var t=e.idx,n=e.gpuFilter,r=e.mapState,i=e.visible;return{id:this.id,idx:t,coordinateSystem:p.COORDINATE_SYSTEM.LNGLAT,pickable:!0,wrapLongitude:!0,parameters:{depthTest:Boolean(r.dragRotate||this.config.visConfig.enable3d)},hidden:this.config.hidden,opacity:this.config.visConfig.opacity,highlightColor:this.config.highlightColor,extensions:[C],filterRange:n?n.filterRange:void 0,visible:this.config.isVisible&&i}}},{key:"getDefaultHoverLayerProps",value:function(){return{id:"".concat(this.id,"-hovered"),pickable:!1,wrapLongitude:!0,coordinateSystem:p.COORDINATE_SYSTEM.LNGLAT}}},{key:"renderTextLabelLayer",value:function(e,t){var n=this,r=e.getPosition,i=e.getPixelOffset,o=e.updateTriggers,a=e.sharedProps,s=t.data,l=t.mapState,u=this.config.textLabel;return s.textLabels.reduce((function(e,t,c){var f,d;t.getText&&e.push(new h.TextLayer(M(M({},a),{},{id:"".concat(n.id,"-label-").concat(null===(f=u[c].field)||void 0===f?void 0:f.name),data:s.data,getText:t.getText,getPosition:r,characterSet:t.characterSet,getPixelOffset:i(u[c]),getSize:1,sizeScale:u[c].size,getTextAnchor:u[c].anchor,getAlignmentBaseline:u[c].alignment,getColor:u[c].color,parameters:{depthTest:!1},getFilterValue:s.getFilterValue,updateTriggers:M(M({},o),{},{getText:null===(d=u[c].field)||void 0===d?void 0:d.name,getPixelOffset:M(M({},o.getRadius),{},{mapState:l,anchor:u[c].anchor,alignment:u[c].alignment}),getTextAnchor:u[c].anchor,getAlignmentBaseline:u[c].alignment,getColor:u[c].color})})));return e}),[])}},{key:"calculateDataAttribute",value:function(e,t){return[]}},{key:"updateLayerMeta",value:function(e,t){}},{key:"getPositionAccessor",value:function(e){return function(){return null}}}],[{key:"findDefaultLayerProps",value:function(e,t){return{props:[],foundLayers:t}}},{key:"findDefaultColumnField",value:function(e,t){var n=Object.keys(e).reduce((function(n,r){var i=t.filter((function(t){return t.name===e[r]||e[r].includes(t.name)}));return n[r]=i.length?i.map((function(e){return{value:e.name,fieldIdx:e.fieldIdx}})):null,n}),{});return Object.values(n).every(Boolean)?this.getAllPossibleColumnParis(n):null}},{key:"getAllPossibleColumnParis",value:function(e){for(var t=Object.keys(e),n=t.map((function(e,n){return n===t.length-1?-1:0})),r=t.map((function(t){return e[t].length})),i=[];a(n,r,n.length-1);){var o=n.reduce((function(n,r,i){return n[t[i]]=e[t[i]][r],n}),{});i.push(o)}function a(e,t,n){return(0!==n||e[0]!==t[0]-1)&&(e[n]+1Object(d.a)(e,t))},g=n(430),m=n(250),y=function(e){return"string"==typeof e?new m.a([document.querySelectorAll(e)],[document.documentElement]):new m.a([null==e?[]:Object(g.a)(e)],m.c)},v=n(404),b=n(605),_=n(606),A=n(406)},function(e,t,n){"use strict";n.r(t),n.d(t,"arc",(function(){return r.a})),n.d(t,"area",(function(){return i.a})),n.d(t,"line",(function(){return o.a})),n.d(t,"pie",(function(){return a.a})),n.d(t,"areaRadial",(function(){return p})),n.d(t,"radialArea",(function(){return p})),n.d(t,"lineRadial",(function(){return d})),n.d(t,"radialLine",(function(){return d})),n.d(t,"pointRadial",(function(){return h.a})),n.d(t,"linkHorizontal",(function(){return g.a})),n.d(t,"linkVertical",(function(){return g.c})),n.d(t,"linkRadial",(function(){return g.b})),n.d(t,"symbol",(function(){return I})),n.d(t,"symbols",(function(){return j})),n.d(t,"symbolCircle",(function(){return v})),n.d(t,"symbolCross",(function(){return b})),n.d(t,"symbolDiamond",(function(){return x})),n.d(t,"symbolSquare",(function(){return S})),n.d(t,"symbolStar",(function(){return M})),n.d(t,"symbolTriangle",(function(){return C})),n.d(t,"symbolWye",(function(){return R})),n.d(t,"curveBasisClosed",(function(){return V})),n.d(t,"curveBasisOpen",(function(){return W})),n.d(t,"curveBasis",(function(){return B})),n.d(t,"curveBundle",(function(){return Y})),n.d(t,"curveCardinalClosed",(function(){return $})),n.d(t,"curveCardinalOpen",(function(){return Q})),n.d(t,"curveCardinal",(function(){return Z})),n.d(t,"curveCatmullRomClosed",(function(){return ie})),n.d(t,"curveCatmullRomOpen",(function(){return ae})),n.d(t,"curveCatmullRom",(function(){return ne})),n.d(t,"curveLinearClosed",(function(){return le})),n.d(t,"curveLinear",(function(){return s.a})),n.d(t,"curveMonotoneX",(function(){return me})),n.d(t,"curveMonotoneY",(function(){return ye})),n.d(t,"curveNatural",(function(){return _e})),n.d(t,"curveStep",(function(){return xe})),n.d(t,"curveStepAfter",(function(){return Ee})),n.d(t,"curveStepBefore",(function(){return we})),n.d(t,"stack",(function(){return Ce})),n.d(t,"stackOffsetExpand",(function(){return Pe})),n.d(t,"stackOffsetDiverging",(function(){return ke})),n.d(t,"stackOffsetNone",(function(){return Me})),n.d(t,"stackOffsetSilhouette",(function(){return Le})),n.d(t,"stackOffsetWiggle",(function(){return Re})),n.d(t,"stackOrderAppearance",(function(){return De})),n.d(t,"stackOrderAscending",(function(){return Ie})),n.d(t,"stackOrderDescending",(function(){return Fe})),n.d(t,"stackOrderInsideOut",(function(){return ze})),n.d(t,"stackOrderNone",(function(){return Se})),n.d(t,"stackOrderReverse",(function(){return Be}));var r=n(1210),i=n(601),o=n(403),a=n(1372),s=n(302),l=c(s.a);function u(e){this._curve=e}function c(e){function t(t){return new u(e(t))}return t._curve=e,t}function f(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(c(e)):t()._curve},e}u.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var d=function(){return f(Object(o.a)().curve(l))},p=function(){var e=Object(i.a)().curve(l),t=e.curve,n=e.lineX0,r=e.lineX1,o=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return f(n())},delete e.lineX0,e.lineEndAngle=function(){return f(r())},delete e.lineX1,e.lineInnerRadius=function(){return f(o())},delete e.lineY0,e.lineOuterRadius=function(){return f(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(c(e)):t()._curve},e},h=n(357),g=n(567),m=n(655),y=n(32),v={draw:function(e,t){var n=Math.sqrt(t/y.j);e.moveTo(n,0),e.arc(0,0,n,0,y.m)}},b={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},_=Math.sqrt(1/3),A=2*_,x={draw:function(e,t){var n=Math.sqrt(t/A),r=n*_;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},w=Math.sin(y.j/10)/Math.sin(7*y.j/10),E=Math.sin(y.m/10)*w,O=-Math.cos(y.m/10)*w,M={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=E*n,i=O*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=y.m*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},S={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},T=Math.sqrt(3),C={draw:function(e,t){var n=-Math.sqrt(t/(3*T));e.moveTo(0,2*n),e.lineTo(-T*n,-n),e.lineTo(T*n,-n),e.closePath()}},P=Math.sqrt(3)/2,k=1/Math.sqrt(12),L=3*(k/2+1),R={draw:function(e,t){var n=Math.sqrt(t/L),r=n/2,i=n*k,o=r,a=n*k+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(-.5*r-P*i,P*r+-.5*i),e.lineTo(-.5*o-P*a,P*o+-.5*a),e.lineTo(-.5*s-P*l,P*s+-.5*l),e.lineTo(-.5*r+P*i,-.5*i-P*r),e.lineTo(-.5*o+P*a,-.5*a-P*o),e.lineTo(-.5*s+P*l,-.5*l-P*s),e.closePath()}},D=n(60),j=[v,b,x,S,M,C,R],I=function(){var e=Object(D.a)(v),t=Object(D.a)(64),n=null;function r(){var r;if(n||(n=r=Object(m.a)()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(t){return arguments.length?(e="function"==typeof t?t:Object(D.a)(t),r):e},r.size=function(e){return arguments.length?(t="function"==typeof e?e:Object(D.a)(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r},N=function(){};function F(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function z(e){this._context=e}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:F(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:F(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var B=function(e){return new z(e)};function U(e){this._context=e}U.prototype={areaStart:N,areaEnd:N,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:F(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var V=function(e){return new U(e)};function H(e){this._context=e}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:F(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var W=function(e){return new H(e)};function q(e,t){this._basis=new z(e),this._beta=t}q.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Y=function e(t){function n(e){return 1===t?new z(e):new q(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function G(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function X(e,t){this._context=e,this._k=(1-t)/6}X.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:G(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Z=function e(t){function n(e){return new X(e,t)}return n.tension=function(t){return e(+t)},n}(0);function K(e,t){this._context=e,this._k=(1-t)/6}K.prototype={areaStart:N,areaEnd:N,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:G(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var $=function e(t){function n(e){return new K(e,t)}return n.tension=function(t){return e(+t)},n}(0);function J(e,t){this._context=e,this._k=(1-t)/6}J.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Q=function e(t){function n(e){return new J(e,t)}return n.tension=function(t){return e(+t)},n}(0);function ee(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>y.f){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>y.f){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function te(e,t){this._context=e,this._alpha=t}te.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ee(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ne=function e(t){function n(e){return t?new te(e,t):new X(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function re(e,t){this._context=e,this._alpha=t}re.prototype={areaStart:N,areaEnd:N,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ee(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ie=function e(t){function n(e){return t?new re(e,t):new K(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function oe(e,t){this._context=e,this._alpha=t}oe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ee(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ae=function e(t){function n(e){return t?new oe(e,t):new J(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function se(e){this._context=e}se.prototype={areaStart:N,areaEnd:N,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var le=function(e){return new se(e)};function ue(e){return e<0?-1:1}function ce(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(ue(o)+ue(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function fe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function de(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function pe(e){this._context=e}function he(e){this._context=new ge(e)}function ge(e){this._context=e}function me(e){return new pe(e)}function ye(e){return new he(e)}function ve(e){this._context=e}function be(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var xe=function(e){return new Ae(e,.5)};function we(e){return new Ae(e,0)}function Ee(e){return new Ae(e,1)}var Oe=n(496),Me=function(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n};function Te(e,t){return e[t]}var Ce=function(){var e=Object(D.a)([]),t=Se,n=Me,r=Te;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,u=s.length,c=new Array(u);for(o=0;o0){for(var n,r,i,o=0,a=e[0].length;o0)for(var n,r,i,o,a,s,l=0,u=e[t[0]].length;l0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},Le=function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;ao&&(o=t,r=n);return r}var Ie=function(e){var t=e.map(Ne);return Se(e).sort((function(e,n){return t[e]-t[n]}))};function Ne(e){for(var t,n=0,r=-1,i=e.length;++r * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Function]",h="[object GeneratorFunction]",g="[object Map]",m="[object Number]",y="[object Object]",v="[object RegExp]",b="[object Set]",_="[object String]",A="[object Symbol]",x="[object WeakMap]",w="[object ArrayBuffer]",E="[object DataView]",O="[object Float32Array]",M="[object Float64Array]",S="[object Int8Array]",T="[object Int16Array]",C="[object Int32Array]",P="[object Uint8Array]",k="[object Uint16Array]",L="[object Uint32Array]",R=/\b__p \+= '';/g,D=/\b(__p \+=) '' \+/g,j=/(__e\(.*?\)|\b__t\)) \+\n'';/g,I=/&(?:amp|lt|gt|quot|#39);/g,N=/[&<>"']/g,F=RegExp(I.source),z=RegExp(N.source),B=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,V=/<%=([\s\S]+?)%>/g,H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Y=/[\\^$.*+?()[\]{}|]/g,G=RegExp(Y.source),X=/^\s+/,Z=/\s/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="[\\ud800-\\udfff]",ge="["+pe+"]",me="["+de+"]",ye="\\d+",ve="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",_e="[^\\ud800-\\udfff"+pe+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ae="\\ud83c[\\udffb-\\udfff]",xe="[^\\ud800-\\udfff]",we="(?:\\ud83c[\\udde6-\\uddff]){2}",Ee="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Me="(?:"+be+"|"+_e+")",Se="(?:"+Oe+"|"+_e+")",Te="(?:"+me+"|"+Ae+")"+"?",Ce="[\\ufe0e\\ufe0f]?"+Te+("(?:\\u200d(?:"+[xe,we,Ee].join("|")+")[\\ufe0e\\ufe0f]?"+Te+")*"),Pe="(?:"+[ve,we,Ee].join("|")+")"+Ce,ke="(?:"+[xe+me+"?",me,we,Ee,he].join("|")+")",Le=RegExp("['’]","g"),Re=RegExp(me,"g"),De=RegExp(Ae+"(?="+Ae+")|"+ke+Ce,"g"),je=RegExp([Oe+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ge,Oe,"$"].join("|")+")",Se+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ge,Oe+Me,"$"].join("|")+")",Oe+"?"+Me+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Oe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,Pe].join("|"),"g"),Ie=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ze=-1,Be={};Be[O]=Be[M]=Be[S]=Be[T]=Be[C]=Be[P]=Be["[object Uint8ClampedArray]"]=Be[k]=Be[L]=!0,Be[l]=Be[u]=Be[w]=Be[c]=Be[E]=Be[f]=Be[d]=Be[p]=Be[g]=Be[m]=Be[y]=Be[v]=Be[b]=Be[_]=Be[x]=!1;var Ue={};Ue[l]=Ue[u]=Ue[w]=Ue[E]=Ue[c]=Ue[f]=Ue[O]=Ue[M]=Ue[S]=Ue[T]=Ue[C]=Ue[g]=Ue[m]=Ue[y]=Ue[v]=Ue[b]=Ue[_]=Ue[A]=Ue[P]=Ue["[object Uint8ClampedArray]"]=Ue[k]=Ue[L]=!0,Ue[d]=Ue[p]=Ue[x]=!1;var Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,We=parseInt,qe="object"==typeof e&&e&&e.Object===Object&&e,Ye="object"==typeof self&&self&&self.Object===Object&&self,Ge=qe||Ye||Function("return this")(),Xe=t&&!t.nodeType&&t,Ze=Xe&&"object"==typeof r&&r&&!r.nodeType&&r,Ke=Ze&&Ze.exports===Xe,$e=Ke&&qe.process,Je=function(){try{var e=Ze&&Ze.require&&Ze.require("util").types;return e||$e&&$e.binding&&$e.binding("util")}catch(e){}}(),Qe=Je&&Je.isArrayBuffer,et=Je&&Je.isDate,tt=Je&&Je.isMap,nt=Je&&Je.isRegExp,rt=Je&&Je.isSet,it=Je&&Je.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function jt(e,t){for(var n=e.length;n--&&At(t,e[n],0)>-1;);return n}function It(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Nt=Mt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ft=Mt({"&":"&","<":"<",">":">",'"':""","'":"'"});function zt(e){return"\\"+Ve[e]}function Bt(e){return Ie.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Vt(e,t){return function(n){return e(t(n))}}function Ht(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Kt=function e(t){var n,r=(t=null==t?Ge:Kt.defaults(Ge.Object(),t,Kt.pick(Ge,Fe))).Array,i=t.Date,Z=t.Error,de=t.Function,pe=t.Math,he=t.Object,ge=t.RegExp,me=t.String,ye=t.TypeError,ve=r.prototype,be=de.prototype,_e=he.prototype,Ae=t["__core-js_shared__"],xe=be.toString,we=_e.hasOwnProperty,Ee=0,Oe=(n=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Me=_e.toString,Se=xe.call(he),Te=Ge._,Ce=ge("^"+xe.call(we).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=Ke?t.Buffer:void 0,ke=t.Symbol,De=t.Uint8Array,Ie=Pe?Pe.allocUnsafe:void 0,Ve=Vt(he.getPrototypeOf,he),qe=he.create,Ye=_e.propertyIsEnumerable,Xe=ve.splice,Ze=ke?ke.isConcatSpreadable:void 0,$e=ke?ke.iterator:void 0,Je=ke?ke.toStringTag:void 0,vt=function(){try{var e=eo(he,"defineProperty");return e({},"",{}),e}catch(e){}}(),Mt=t.clearTimeout!==Ge.clearTimeout&&t.clearTimeout,$t=i&&i.now!==Ge.Date.now&&i.now,Jt=t.setTimeout!==Ge.setTimeout&&t.setTimeout,Qt=pe.ceil,en=pe.floor,tn=he.getOwnPropertySymbols,nn=Pe?Pe.isBuffer:void 0,rn=t.isFinite,on=ve.join,an=Vt(he.keys,he),sn=pe.max,ln=pe.min,un=i.now,cn=t.parseInt,fn=pe.random,dn=ve.reverse,pn=eo(t,"DataView"),hn=eo(t,"Map"),gn=eo(t,"Promise"),mn=eo(t,"Set"),yn=eo(t,"WeakMap"),vn=eo(he,"create"),bn=yn&&new yn,_n={},An=To(pn),xn=To(hn),wn=To(gn),En=To(mn),On=To(yn),Mn=ke?ke.prototype:void 0,Sn=Mn?Mn.valueOf:void 0,Tn=Mn?Mn.toString:void 0;function Cn(e){if(qa(e)&&!Da(e)&&!(e instanceof Rn)){if(e instanceof Ln)return e;if(we.call(e,"__wrapped__"))return Co(e)}return new Ln(e)}var Pn=function(){function e(){}return function(t){if(!Wa(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function kn(){}function Ln(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function $n(e,t,n,r,i,o){var a,s=1&t,u=2&t,d=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Wa(e))return e;var x=Da(e);if(x){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&we.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return vi(e,a)}else{var R=ro(e),D=R==p||R==h;if(Fa(e))return di(e,s);if(R==y||R==l||D&&!i){if(a=u||D?{}:oo(e),!s)return u?function(e,t){return bi(e,no(e),t)}(e,function(e,t){return e&&bi(t,xs(t),e)}(a,e)):function(e,t){return bi(e,to(e),t)}(e,Gn(a,e))}else{if(!Ue[R])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case w:return pi(e);case c:case f:return new r(+e);case E:return function(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case O:case M:case S:case T:case C:case P:case"[object Uint8ClampedArray]":case k:case L:return hi(e,n);case g:return new r;case m:case _:return new r(e);case v:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case A:return i=e,Sn?he(Sn.call(i)):{}}var i}(e,R,s)}}o||(o=new Fn);var j=o.get(e);if(j)return j;o.set(e,a),Ka(e)?e.forEach((function(r){a.add($n(r,t,n,r,e,o))})):Ya(e)&&e.forEach((function(r,i){a.set(i,$n(r,t,n,i,e,o))}));var I=x?void 0:(d?u?Gi:Yi:u?xs:As)(e);return st(I||e,(function(r,i){I&&(r=e[i=r]),Wn(a,i,$n(r,t,n,i,e,o))})),a}function Jn(e,t,n){var r=n.length;if(null==e)return!r;for(e=he(e);r--;){var i=n[r],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new ye(o);return Ao((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var i=-1,o=ft,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=pt(t,kt(n))),r?(o=dt,a=!1):t.length>=200&&(o=Rt,a=!1,t=new Nn(t));e:for(;++i-1},jn.prototype.set=function(e,t){var n=this.__data__,r=qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},In.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(hn||jn),string:new Dn}},In.prototype.delete=function(e){var t=Ji(this,e).delete(e);return this.size-=t?1:0,t},In.prototype.get=function(e){return Ji(this,e).get(e)},In.prototype.has=function(e){return Ji(this,e).has(e)},In.prototype.set=function(e,t){var n=Ji(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Nn.prototype.add=Nn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.clear=function(){this.__data__=new jn,this.size=0},Fn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Fn.prototype.get=function(e){return this.__data__.get(e)},Fn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof jn){var r=n.__data__;if(!hn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new In(r)}return n.set(e,t),this.size=n.size,this};var tr=xi(ur),nr=xi(cr,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function ir(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?ar(s,t-1,n,r,i):ht(i,s):r||(i[i.length]=s)}return i}var sr=wi(),lr=wi(!0);function ur(e,t){return e&&sr(e,t,As)}function cr(e,t){return e&&lr(e,t,As)}function fr(e,t){return ct(t,(function(t){return Ua(e[t])}))}function dr(e,t){for(var n=0,r=(t=li(t,e)).length;null!=e&&nt}function mr(e,t){return null!=e&&we.call(e,t)}function yr(e,t){return null!=e&&t in he(e)}function vr(e,t,n){for(var i=n?dt:ft,o=e[0].length,a=e.length,s=a,l=r(a),u=1/0,c=[];s--;){var f=e[s];s&&t&&(f=pt(f,kt(t))),u=ln(f.length,u),l[s]=!n&&(t||o>=120&&f.length>=120)?new Nn(s&&f):void 0}f=e[0];var d=-1,p=l[0];e:for(;++d=s)return l;var u=n[r];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Xe.call(s,l,1),Xe.call(e,l,1);return e}function Ir(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;so(i)?Xe.call(e,i,1):ei(e,i)}}return e}function Nr(e,t){return e+en(fn()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function zr(e,t){return xo(mo(e,t,Gs),e+"")}function Br(e){return Bn(Ps(e))}function Ur(e,t){var n=Ps(e);return Oo(n,Kn(t,0,n.length))}function Vr(e,t,n,r){if(!Wa(e))return e;for(var i=-1,o=(t=li(t,e)).length,a=o-1,s=e;null!=s&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!Ja(a)&&(n?a<=t:a=200){var u=t?null:Fi(e);if(u)return Wt(u);a=!1,i=Rt,l=new Nn}else l=t?[]:s;e:for(;++r=r?e:Yr(e,t,n)}var fi=Mt||function(e){return Ge.clearTimeout(e)};function di(e,t){if(t)return e.slice();var n=e.length,r=Ie?Ie(n):new e.constructor(n);return e.copy(r),r}function pi(e){var t=new e.constructor(e.byteLength);return new De(t).set(new De(e)),t}function hi(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function gi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ja(e),a=void 0!==t,s=null===t,l=t==t,u=Ja(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&lo(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=he(t);++r-1?i[o?t[a]:a]:void 0}}function Ti(e){return qi((function(t){var n=t.length,r=n,i=Ln.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new ye(o);if(i&&!s&&"wrapper"==Zi(a))var s=new Ln([],!0)}for(r=s?r:n;++r1&&b.reverse(),f&&us))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=2&n?new Nn:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(K,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match($);return t?t[1].split(J):[]}(r),n)))}function Eo(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Oo(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Zo(e,n)}));function na(e){var t=Cn(e);return t.__chain__=!0,t}function ra(e,t){return t(e)}var ia=qi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Zn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&so(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ra,args:[i],thisArg:void 0}),new Ln(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var oa=_i((function(e,t,n){we.call(e,n)?++e[n]:Xn(e,n,1)}));var aa=Si(Ro),sa=Si(Do);function la(e,t){return(Da(e)?st:tr)(e,$i(t,3))}function ua(e,t){return(Da(e)?lt:nr)(e,$i(t,3))}var ca=_i((function(e,t,n){we.call(e,n)?e[n].push(t):Xn(e,n,[t])}));var fa=zr((function(e,t,n){var i=-1,o="function"==typeof t,a=Ia(e)?r(e.length):[];return tr(e,(function(e){a[++i]=o?ot(t,e,n):br(e,t,n)})),a})),da=_i((function(e,t,n){Xn(e,n,t)}));function pa(e,t){return(Da(e)?pt:Tr)(e,$i(t,3))}var ha=_i((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ga=zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&lo(e,t[0],t[1])?t=[]:n>2&&lo(t[0],t[1],t[2])&&(t=[t[0]]),Rr(e,ar(t,1),[])})),ma=$t||function(){return Ge.Date.now()};function ya(e,t,n){return t=n?void 0:t,Bi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function va(e,t){var n;if("function"!=typeof t)throw new ye(o);return e=is(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ba=zr((function(e,t,n){var r=1;if(n.length){var i=Ht(n,Ki(ba));r|=32}return Bi(e,r,t,n,i)})),_a=zr((function(e,t,n){var r=3;if(n.length){var i=Ht(n,Ki(_a));r|=32}return Bi(t,r,e,n,i)}));function Aa(e,t,n){var r,i,a,s,l,u,c=0,f=!1,d=!1,p=!0;if("function"!=typeof e)throw new ye(o);function h(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function g(e){return c=e,l=Ao(y,t),f?h(e):s}function m(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-c>=a}function y(){var e=ma();if(m(e))return v(e);l=Ao(y,function(e){var n=t-(e-u);return d?ln(n,a-(e-c)):n}(e))}function v(e){return l=void 0,p&&r?h(e):(r=i=void 0,s)}function b(){var e=ma(),n=m(e);if(r=arguments,i=this,u=e,n){if(void 0===l)return g(u);if(d)return fi(l),l=Ao(y,t),h(u)}return void 0===l&&(l=Ao(y,t)),s}return t=as(t)||0,Wa(n)&&(f=!!n.leading,a=(d="maxWait"in n)?sn(as(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==l&&fi(l),c=0,r=u=i=l=void 0},b.flush=function(){return void 0===l?s:v(ma())},b}var xa=zr((function(e,t){return Qn(e,1,t)})),wa=zr((function(e,t,n){return Qn(e,as(t)||0,n)}));function Ea(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ye(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ea.Cache||In),n}function Oa(e){if("function"!=typeof e)throw new ye(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ea.Cache=In;var Ma=ui((function(e,t){var n=(t=1==t.length&&Da(t[0])?pt(t[0],kt($i())):pt(ar(t,1),kt($i()))).length;return zr((function(r){for(var i=-1,o=ln(r.length,n);++i=t})),Ra=_r(function(){return arguments}())?_r:function(e){return qa(e)&&we.call(e,"callee")&&!Ye.call(e,"callee")},Da=r.isArray,ja=Qe?kt(Qe):function(e){return qa(e)&&hr(e)==w};function Ia(e){return null!=e&&Ha(e.length)&&!Ua(e)}function Na(e){return qa(e)&&Ia(e)}var Fa=nn||al,za=et?kt(et):function(e){return qa(e)&&hr(e)==f};function Ba(e){if(!qa(e))return!1;var t=hr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Xa(e)}function Ua(e){if(!Wa(e))return!1;var t=hr(e);return t==p||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Va(e){return"number"==typeof e&&e==is(e)}function Ha(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Wa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function qa(e){return null!=e&&"object"==typeof e}var Ya=tt?kt(tt):function(e){return qa(e)&&ro(e)==g};function Ga(e){return"number"==typeof e||qa(e)&&hr(e)==m}function Xa(e){if(!qa(e)||hr(e)!=y)return!1;var t=Ve(e);if(null===t)return!0;var n=we.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xe.call(n)==Se}var Za=nt?kt(nt):function(e){return qa(e)&&hr(e)==v};var Ka=rt?kt(rt):function(e){return qa(e)&&ro(e)==b};function $a(e){return"string"==typeof e||!Da(e)&&qa(e)&&hr(e)==_}function Ja(e){return"symbol"==typeof e||qa(e)&&hr(e)==A}var Qa=it?kt(it):function(e){return qa(e)&&Ha(e.length)&&!!Be[hr(e)]};var es=ji(Sr),ts=ji((function(e,t){return e<=t}));function ns(e){if(!e)return[];if(Ia(e))return $a(e)?Gt(e):vi(e);if($e&&e[$e])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[$e]());var t=ro(e);return(t==g?Ut:t==b?Wt:Ps)(e)}function rs(e){return e?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function is(e){var t=rs(e),n=t%1;return t==t?n?t-n:t:0}function os(e){return e?Kn(is(e),0,4294967295):0}function as(e){if("number"==typeof e)return e;if(Ja(e))return NaN;if(Wa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Wa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pt(e);var n=oe.test(e);return n||se.test(e)?We(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function ss(e){return bi(e,xs(e))}function ls(e){return null==e?"":Jr(e)}var us=Ai((function(e,t){if(po(t)||Ia(t))bi(t,As(t),e);else for(var n in t)we.call(t,n)&&Wn(e,n,t[n])})),cs=Ai((function(e,t){bi(t,xs(t),e)})),fs=Ai((function(e,t,n,r){bi(t,xs(t),e,r)})),ds=Ai((function(e,t,n,r){bi(t,As(t),e,r)})),ps=qi(Zn);var hs=zr((function(e,t){e=he(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&lo(t[0],t[1],i)&&(r=1);++n1),t})),bi(e,Gi(e),n),r&&(n=$n(n,7,Hi));for(var i=t.length;i--;)ei(n,t[i]);return n}));var Ms=qi((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return ys(e,n)}))}(e,t)}));function Ss(e,t){if(null==e)return{};var n=pt(Gi(e),(function(e){return[e]}));return t=$i(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var Ts=zi(As),Cs=zi(xs);function Ps(e){return null==e?[]:Lt(e,As(e))}var ks=Oi((function(e,t,n){return t=t.toLowerCase(),e+(n?Ls(t):t)}));function Ls(e){return Bs(ls(e).toLowerCase())}function Rs(e){return(e=ls(e))&&e.replace(ue,Nt).replace(Re,"")}var Ds=Oi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),js=Oi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Is=Ei("toLowerCase");var Ns=Oi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Fs=Oi((function(e,t,n){return e+(n?" ":"")+Bs(t)}));var zs=Oi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Bs=Ei("toUpperCase");function Us(e,t,n){return e=ls(e),void 0===(t=n?void 0:t)?function(e){return Ne.test(e)}(e)?function(e){return e.match(je)||[]}(e):function(e){return e.match(Q)||[]}(e):e.match(t)||[]}var Vs=zr((function(e,t){try{return ot(e,void 0,t)}catch(e){return Ba(e)?e:new Z(e)}})),Hs=qi((function(e,t){return st(t,(function(t){t=So(t),Xn(e,t,ba(e[t],e))})),e}));function Ws(e){return function(){return e}}var qs=Ti(),Ys=Ti(!0);function Gs(e){return e}function Xs(e){return Er("function"==typeof e?e:$n(e,1))}var Zs=zr((function(e,t){return function(n){return br(n,e,t)}})),Ks=zr((function(e,t){return function(n){return br(e,n,t)}}));function $s(e,t,n){var r=As(t),i=fr(t,r);null!=n||Wa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=fr(t,As(t)));var o=!(Wa(n)&&"chain"in n&&!n.chain),a=Ua(e);return st(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=vi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,ht([this.value()],arguments))})})),e}function Js(){}var Qs=Li(pt),el=Li(ut),tl=Li(yt);function nl(e){return uo(e)?Ot(So(e)):function(e){return function(t){return dr(t,e)}}(e)}var rl=Di(),il=Di(!0);function ol(){return[]}function al(){return!1}var sl=ki((function(e,t){return e+t}),0),ll=Ni("ceil"),ul=ki((function(e,t){return e/t}),1),cl=Ni("floor");var fl,dl=ki((function(e,t){return e*t}),1),pl=Ni("round"),hl=ki((function(e,t){return e-t}),0);return Cn.after=function(e,t){if("function"!=typeof t)throw new ye(o);return e=is(e),function(){if(--e<1)return t.apply(this,arguments)}},Cn.ary=ya,Cn.assign=us,Cn.assignIn=cs,Cn.assignInWith=fs,Cn.assignWith=ds,Cn.at=ps,Cn.before=va,Cn.bind=ba,Cn.bindAll=Hs,Cn.bindKey=_a,Cn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Da(e)?e:[e]},Cn.chain=na,Cn.chunk=function(e,t,n){t=(n?lo(e,t,n):void 0===t)?1:sn(is(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=r(Qt(i/t));oi?0:i+n),(r=void 0===r||r>i?i:is(r))<0&&(r+=i),r=n>r?0:os(r);n>>0)?(e=ls(e))&&("string"==typeof t||null!=t&&!Za(t))&&!(t=Jr(t))&&Bt(e)?ci(Gt(e),0,n):e.split(t,n):[]},Cn.spread=function(e,t){if("function"!=typeof e)throw new ye(o);return t=null==t?0:sn(is(t),0),zr((function(n){var r=n[t],i=ci(n,0,t);return r&&ht(i,r),ot(e,this,i)}))},Cn.tail=function(e){var t=null==e?0:e.length;return t?Yr(e,1,t):[]},Cn.take=function(e,t,n){return e&&e.length?Yr(e,0,(t=n||void 0===t?1:is(t))<0?0:t):[]},Cn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Yr(e,(t=r-(t=n||void 0===t?1:is(t)))<0?0:t,r):[]},Cn.takeRightWhile=function(e,t){return e&&e.length?ni(e,$i(t,3),!1,!0):[]},Cn.takeWhile=function(e,t){return e&&e.length?ni(e,$i(t,3)):[]},Cn.tap=function(e,t){return t(e),e},Cn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ye(o);return Wa(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Aa(e,t,{leading:r,maxWait:t,trailing:i})},Cn.thru=ra,Cn.toArray=ns,Cn.toPairs=Ts,Cn.toPairsIn=Cs,Cn.toPath=function(e){return Da(e)?pt(e,So):Ja(e)?[e]:vi(Mo(ls(e)))},Cn.toPlainObject=ss,Cn.transform=function(e,t,n){var r=Da(e),i=r||Fa(e)||Qa(e);if(t=$i(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Wa(e)&&Ua(o)?Pn(Ve(e)):{}}return(i?st:ur)(e,(function(e,r,i){return t(n,e,r,i)})),n},Cn.unary=function(e){return ya(e,1)},Cn.union=qo,Cn.unionBy=Yo,Cn.unionWith=Go,Cn.uniq=function(e){return e&&e.length?Qr(e):[]},Cn.uniqBy=function(e,t){return e&&e.length?Qr(e,$i(t,2)):[]},Cn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Qr(e,void 0,t):[]},Cn.unset=function(e,t){return null==e||ei(e,t)},Cn.unzip=Xo,Cn.unzipWith=Zo,Cn.update=function(e,t,n){return null==e?e:ti(e,t,si(n))},Cn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ti(e,t,si(n),r)},Cn.values=Ps,Cn.valuesIn=function(e){return null==e?[]:Lt(e,xs(e))},Cn.without=Ko,Cn.words=Us,Cn.wrap=function(e,t){return Sa(si(t),e)},Cn.xor=$o,Cn.xorBy=Jo,Cn.xorWith=Qo,Cn.zip=ea,Cn.zipObject=function(e,t){return oi(e||[],t||[],Wn)},Cn.zipObjectDeep=function(e,t){return oi(e||[],t||[],Vr)},Cn.zipWith=ta,Cn.entries=Ts,Cn.entriesIn=Cs,Cn.extend=cs,Cn.extendWith=fs,$s(Cn,Cn),Cn.add=sl,Cn.attempt=Vs,Cn.camelCase=ks,Cn.capitalize=Ls,Cn.ceil=ll,Cn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==t&&(t=(t=as(t))==t?t:0),Kn(as(e),t,n)},Cn.clone=function(e){return $n(e,4)},Cn.cloneDeep=function(e){return $n(e,5)},Cn.cloneDeepWith=function(e,t){return $n(e,5,t="function"==typeof t?t:void 0)},Cn.cloneWith=function(e,t){return $n(e,4,t="function"==typeof t?t:void 0)},Cn.conformsTo=function(e,t){return null==t||Jn(e,t,As(t))},Cn.deburr=Rs,Cn.defaultTo=function(e,t){return null==e||e!=e?t:e},Cn.divide=ul,Cn.endsWith=function(e,t,n){e=ls(e),t=Jr(t);var r=e.length,i=n=void 0===n?r:Kn(is(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Cn.eq=Pa,Cn.escape=function(e){return(e=ls(e))&&z.test(e)?e.replace(N,Ft):e},Cn.escapeRegExp=function(e){return(e=ls(e))&&G.test(e)?e.replace(Y,"\\$&"):e},Cn.every=function(e,t,n){var r=Da(e)?ut:rr;return n&&lo(e,t,n)&&(t=void 0),r(e,$i(t,3))},Cn.find=aa,Cn.findIndex=Ro,Cn.findKey=function(e,t){return bt(e,$i(t,3),ur)},Cn.findLast=sa,Cn.findLastIndex=Do,Cn.findLastKey=function(e,t){return bt(e,$i(t,3),cr)},Cn.floor=cl,Cn.forEach=la,Cn.forEachRight=ua,Cn.forIn=function(e,t){return null==e?e:sr(e,$i(t,3),xs)},Cn.forInRight=function(e,t){return null==e?e:lr(e,$i(t,3),xs)},Cn.forOwn=function(e,t){return e&&ur(e,$i(t,3))},Cn.forOwnRight=function(e,t){return e&&cr(e,$i(t,3))},Cn.get=ms,Cn.gt=ka,Cn.gte=La,Cn.has=function(e,t){return null!=e&&io(e,t,mr)},Cn.hasIn=ys,Cn.head=Io,Cn.identity=Gs,Cn.includes=function(e,t,n,r){e=Ia(e)?e:Ps(e),n=n&&!r?is(n):0;var i=e.length;return n<0&&(n=sn(i+n,0)),$a(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&At(e,t,n)>-1},Cn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:is(n);return i<0&&(i=sn(r+i,0)),At(e,t,i)},Cn.inRange=function(e,t,n){return t=rs(t),void 0===n?(n=t,t=0):n=rs(n),function(e,t,n){return e>=ln(t,n)&&e=-9007199254740991&&e<=9007199254740991},Cn.isSet=Ka,Cn.isString=$a,Cn.isSymbol=Ja,Cn.isTypedArray=Qa,Cn.isUndefined=function(e){return void 0===e},Cn.isWeakMap=function(e){return qa(e)&&ro(e)==x},Cn.isWeakSet=function(e){return qa(e)&&"[object WeakSet]"==hr(e)},Cn.join=function(e,t){return null==e?"":on.call(e,t)},Cn.kebabCase=Ds,Cn.last=Bo,Cn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=is(n))<0?sn(r+i,0):ln(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):_t(e,wt,i,!0)},Cn.lowerCase=js,Cn.lowerFirst=Is,Cn.lt=es,Cn.lte=ts,Cn.max=function(e){return e&&e.length?ir(e,Gs,gr):void 0},Cn.maxBy=function(e,t){return e&&e.length?ir(e,$i(t,2),gr):void 0},Cn.mean=function(e){return Et(e,Gs)},Cn.meanBy=function(e,t){return Et(e,$i(t,2))},Cn.min=function(e){return e&&e.length?ir(e,Gs,Sr):void 0},Cn.minBy=function(e,t){return e&&e.length?ir(e,$i(t,2),Sr):void 0},Cn.stubArray=ol,Cn.stubFalse=al,Cn.stubObject=function(){return{}},Cn.stubString=function(){return""},Cn.stubTrue=function(){return!0},Cn.multiply=dl,Cn.nth=function(e,t){return e&&e.length?Lr(e,is(t)):void 0},Cn.noConflict=function(){return Ge._===this&&(Ge._=Te),this},Cn.noop=Js,Cn.now=ma,Cn.pad=function(e,t,n){e=ls(e);var r=(t=is(t))?Yt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ri(en(i),n)+e+Ri(Qt(i),n)},Cn.padEnd=function(e,t,n){e=ls(e);var r=(t=is(t))?Yt(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=fn();return ln(e+i*(t-e+He("1e-"+((i+"").length-1))),t)}return Nr(e,t)},Cn.reduce=function(e,t,n){var r=Da(e)?gt:St,i=arguments.length<3;return r(e,$i(t,4),n,i,tr)},Cn.reduceRight=function(e,t,n){var r=Da(e)?mt:St,i=arguments.length<3;return r(e,$i(t,4),n,i,nr)},Cn.repeat=function(e,t,n){return t=(n?lo(e,t,n):void 0===t)?1:is(t),Fr(ls(e),t)},Cn.replace=function(){var e=arguments,t=ls(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Cn.result=function(e,t,n){var r=-1,i=(t=li(t,e)).length;for(i||(i=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=ln(e,4294967295);e-=4294967295;for(var i=Ct(r,t=$i(t));++n=o)return e;var s=n-Yt(r);if(s<1)return r;var l=a?ci(a,0,s).join(""):e.slice(0,s);if(void 0===i)return l+r;if(a&&(s+=l.length-s),Za(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=ge(i.source,ls(re.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var f=u.index;l=l.slice(0,void 0===f?s:f)}}else if(e.indexOf(Jr(i),s)!=s){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Cn.unescape=function(e){return(e=ls(e))&&F.test(e)?e.replace(I,Zt):e},Cn.uniqueId=function(e){var t=++Ee;return ls(e)+t},Cn.upperCase=zs,Cn.upperFirst=Bs,Cn.each=la,Cn.eachRight=ua,Cn.first=Io,$s(Cn,(fl={},ur(Cn,(function(e,t){we.call(Cn.prototype,t)||(fl[t]=e)})),fl),{chain:!1}),Cn.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Cn[e].placeholder=Cn})),st(["drop","take"],(function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:sn(is(n),0);var r=this.__filtered__&&!t?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Rn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Rn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:$i(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}})),Rn.prototype.compact=function(){return this.filter(Gs)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=zr((function(e,t){return"function"==typeof e?new Rn(this):this.map((function(n){return br(n,e,t)}))})),Rn.prototype.reject=function(e){return this.filter(Oa($i(e)))},Rn.prototype.slice=function(e,t){e=is(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=is(t))<0?n.dropRight(-t):n.take(t-e)),n)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},ur(Rn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Cn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Cn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Rn,l=a[0],u=s||Da(t),c=function(e){var t=i.apply(Cn,ht([e],a));return r&&f?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(s=u=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,h=s&&!d;if(!o&&u){t=h?t:new Rn(this);var g=e.apply(t,a);return g.__actions__.push({func:ra,args:[c],thisArg:void 0}),new Ln(g,f)}return p&&h?e.apply(this,a):(g=this.thru(c),p?r?g.value()[0]:g.value():g)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ve[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Cn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Da(i)?i:[],e)}return this[n]((function(n){return t.apply(Da(n)?n:[],e)}))}})),ur(Rn.prototype,(function(e,t){var n=Cn[t];if(n){var r=n.name+"";we.call(_n,r)||(_n[r]=[]),_n[r].push({name:t,func:n})}})),_n[Ci(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vi(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Da(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Cn.prototype.plant=function(e){for(var t,n=this;n instanceof kn;){var r=Co(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Cn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:ra,args:[Wo],thisArg:void 0}),new Ln(t,this.__chain__)}return this.thru(Wo)},Cn.prototype.toJSON=Cn.prototype.valueOf=Cn.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Cn.prototype.first=Cn.prototype.head,$e&&(Cn.prototype[$e]=function(){return this}),Cn}();Ge._=Kt,void 0===(i=function(){return Kt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(50),n(219)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(25),i=n(136),o=n(111),a=n(277),s=n(30),l=n(160);const u=[9729,9728],c=globalThis.WebGLBuffer||function(){};class f extends i.a{get[Symbol.toStringTag](){return"Texture"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{format:n,linearFiltering:r}=t;let i=!0;return n&&(i=i&&Object(a.d)(e,n),i=i&&(!r||Object(a.e)(e,n))),i}constructor(e,t){const{id:n=Object(l.c)("texture"),handle:r,target:i}=t;super(e,{id:n,handle:r}),this.target=i,this.textureUnit=void 0,this.loaded=!1,this.width=void 0,this.height=void 0,this.depth=void 0,this.format=void 0,this.type=void 0,this.dataFormat=void 0,this.border=void 0,this.textureUnit=void 0,this.mipmaps=void 0}toString(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data;if(t instanceof Promise)return t.then(t=>this.initialize(Object.assign({},e,{pixels:t,data:t}))),this;const n="undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement;if(n&&t.readyStatethis.initialize(e)),this;const{pixels:i=null,format:o=6408,border:a=0,recreate:s=!1,parameters:l={},pixelStore:u={},textureUnit:c}=e;t||(t=i);let{width:f,height:d,dataFormat:p,type:h,compressed:g=!1,mipmaps:m=!0}=e;const{depth:y=0}=e;return({width:f,height:d,compressed:g,dataFormat:p,type:h}=this._deduceParameters({format:o,type:h,dataFormat:p,compressed:g,data:t,width:f,height:d})),this.width=f,this.height=d,this.depth=y,this.format=o,this.type=h,this.dataFormat=p,this.border=a,this.textureUnit=c,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),m&&this._isNPOT()&&(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),m=!1,this._updateForNPOT(l)),this.mipmaps=m,this.setImageData({data:t,width:f,height:d,depth:y,format:o,type:h,dataFormat:p,border:a,mipmaps:m,parameters:u,compressed:g}),m&&this.generateMipmap(),this.setParameters(l),s&&(this.data=t),n&&(this._video={video:t,parameters:l,lastTime:t.readyState>=HTMLVideoElement.HAVE_CURRENT_DATA?t.currentTime:-1}),this}update(){if(this._video){const{video:e,parameters:t,lastTime:n}=this._video;if(n===e.currentTime||e.readyState0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,e,()=>{this.gl.generateMipmap(this.target)}),this.gl.bindTexture(this.target,null),this)}setImageData(e){this._trackDeallocatedMemory("Texture");const{target:t=this.target,pixels:n=null,level:i=0,format:o=this.format,border:l=this.border,offset:u=0,parameters:c={}}=e;let{data:f=null,type:d=this.type,width:p=this.width,height:h=this.height,dataFormat:g=this.dataFormat,compressed:m=!1}=e;f||(f=n),({type:d,dataFormat:g,compressed:m,width:p,height:h}=this._deduceParameters({format:o,type:d,dataFormat:g,compressed:m,data:f,width:p,height:h}));const{gl:y}=this;y.bindTexture(this.target,this.handle);let v,b=null;({data:f,dataType:b}=this._getDataType({data:f,compressed:m}));let _=0;if(Object(r.o)(this.gl,c,()=>{switch(b){case"null":y.texImage2D(t,i,o,p,h,l,g,d,f);break;case"typed-array":y.texImage2D(t,i,o,p,h,l,g,d,f,u);break;case"buffer":v=Object(r.a)(y),v.bindBuffer(35052,f.handle||f),v.texImage2D(t,i,o,p,h,l,g,d,u),v.bindBuffer(35052,null);break;case"browser-object":Object(r.j)(y)?y.texImage2D(t,i,o,p,h,l,g,d,f):y.texImage2D(t,i,o,g,d,f);break;case"compressed":for(const[e,n]of f.entries())y.compressedTexImage2D(t,e,n.format,n.width,n.height,l,n.data),_+=n.levelSize;break;default:Object(s.a)(!1,"Unknown image data type")}}),"compressed"===b)this._trackAllocatedMemory(_,"Texture");else if(f&&f.byteLength)this._trackAllocatedMemory(f.byteLength,"Texture");else{const e=a.a[this.dataFormat]||4,t=a.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*e*t,"Texture")}return this.loaded=!0,this}setSubImageData(e){let{target:t=this.target,pixels:n=null,data:i=null,x:a=0,y:l=0,width:u=this.width,height:f=this.height,level:d=0,format:p=this.format,type:h=this.type,dataFormat:g=this.dataFormat,compressed:m=!1,offset:y=0,border:v=this.border,parameters:b={}}=e;if(({type:h,dataFormat:g,compressed:m,width:u,height:f}=this._deduceParameters({format:p,type:h,dataFormat:g,compressed:m,data:i,width:u,height:f})),Object(s.a)(0===this.depth,"texSubImage not supported for 3D textures"),i||(i=n),i&&i.data){const e=i;i=e.data,u=e.shape[0],f=e.shape[1]}i instanceof o.a&&(i=i.handle),this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,b,()=>{if(m)this.gl.compressedTexSubImage2D(t,d,a,l,u,f,p,i);else if(null===i)this.gl.texSubImage2D(t,d,a,l,u,f,g,h,null);else if(ArrayBuffer.isView(i))this.gl.texSubImage2D(t,d,a,l,u,f,g,h,i,y);else if(i instanceof c){const e=Object(r.a)(this.gl);e.bindBuffer(35052,i),e.texSubImage2D(t,d,a,l,u,f,g,h,y),e.bindBuffer(35052,null)}else if(Object(r.j)(this.gl)){Object(r.a)(this.gl).texSubImage2D(t,d,a,l,u,f,g,h,i)}else this.gl.texSubImage2D(t,d,a,l,g,h,i)}),this.gl.bindTexture(this.target,null)}copyFramebuffer(){return r.k.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:t}=this;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,this.handle),e}unbind(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:t}=this;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,null),e}_getDataType(e){let{data:t,compressed:n=!1}=e;return n?{data:t,dataType:"compressed"}:null===t?{data:t,dataType:"null"}:ArrayBuffer.isView(t)?{data:t,dataType:"typed-array"}:t instanceof o.a?{data:t.handle,dataType:"buffer"}:t instanceof c?{data:t,dataType:"buffer"}:{data:t,dataType:"browser-object"}}_deduceParameters(e){const{format:t,data:n}=e;let{width:r,height:i,dataFormat:o,type:s,compressed:l}=e;const u=a.b[t];return o=o||u&&u.dataFormat,s=s||u&&u.types[0],l=l||u&&u.compressed,({width:r,height:i}=this._deduceImageSize(n,r,i)),{dataFormat:o,type:s,compressed:l,width:r,height:i,format:t,data:n}}_deduceImageSize(e,t,n){let r;return r="undefined"!=typeof ImageData&&e instanceof ImageData?{width:e.width,height:e.height}:"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?{width:e.width,height:e.height}:"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e?{width:t,height:n}:{width:t>=0?t:1,height:n>=0?n:1},Object(s.a)(r,"Could not deduced texture size"),Object(s.a)(void 0===t||r.width===t,"Deduced texture width does not match supplied width"),Object(s.a)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}_createHandle(){return this.gl.createTexture()}_deleteHandle(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}_getParameter(e){switch(e){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);const t=this.gl.getTexParameter(this.target,e);return this.gl.bindTexture(this.target,null),t}}_setParameter(e,t){switch(this.gl.bindTexture(this.target,this.handle),t=this._getNPOTParam(e,t),e){case 33082:case 33083:this.gl.texParameterf(this.handle,e,t);break;case 4096:case 4097:Object(s.a)(!1);break;default:this.gl.texParameteri(this.target,e,t)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!Object(r.j)(this.gl)&&(!(!this.width||!this.height)&&(!Object(l.b)(this.width)||!Object(l.b)(this.height)))}_updateForNPOT(e){void 0===e[this.gl.TEXTURE_MIN_FILTER]&&(e[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===e[this.gl.TEXTURE_WRAP_S]&&(e[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===e[this.gl.TEXTURE_WRAP_T]&&(e[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}_getNPOTParam(e,t){if(this._isNPOT())switch(e){case 10241:-1===u.indexOf(t)&&(t=9729);break;case 10242:case 10243:33071!==t&&(t=33071)}return t}}},function(e,t,n){"use strict";var r=n(159),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r.a?r.a.toStringTag:void 0;var l=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i},u=Object.prototype.toString;var c=function(e){return u.call(e)},f=r.a?r.a.toStringTag:void 0;t.a=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":f&&f in Object(e)?l(e):c(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return f}));var r,i=n(8);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var o=function(e){return e};function a(e){void 0===e&&(e={});var t=e,n=t.initialEntries,a=void 0===n?["/"]:n,d=t.initialIndex,p=a.map((function(e){return o(Object(i.a)({pathname:"/",search:"",hash:"",state:null,key:u()},"string"==typeof e?f(e):e))})),h=s(null==d?p.length-1:d,0,p.length-1),g=r.Pop,m=p[h],y=l(),v=l();function b(e,t){return void 0===t&&(t=null),o(Object(i.a)({pathname:m.pathname,search:"",hash:""},"string"==typeof e?f(e):e,{state:t,key:u()}))}function _(e,t,n){return!v.length||(v.call({action:e,location:t,retry:n}),!1)}function A(e,t){g=e,m=t,y.call({action:g,location:m})}function x(e){var t=s(h+e,0,p.length-1),n=r.Pop,i=p[t];_(n,i,(function(){x(e)}))&&(h=t,A(n,i))}return{get index(){return h},get action(){return g},get location(){return m},createHref:function(e){return"string"==typeof e?e:c(e)},push:function e(t,n){var i=r.Push,o=b(t,n);_(i,o,(function(){e(t,n)}))&&(h+=1,p.splice(h,p.length,o),A(i,o))},replace:function e(t,n){var i=r.Replace,o=b(t,n);_(i,o,(function(){e(t,n)}))&&(p[h]=o,A(i,o))},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(e){return y.push(e)},block:function(e){return v.push(e)}}}function s(e,t,n){return Math.min(Math.max(e,t),n)}function l(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function u(){return Math.random().toString(36).substr(2,8)}function c(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function f(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}},function(e,t,n){"use strict";function r(e,t,n){const r=t[0],i=t[1],o=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/o,e[1]=(n[1]*r+n[5]*i)/o,e}function i(e,t,n){const r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o||1;return e[0]=(n[0]*r+n[4]*i+n[8]*o)/a,e[1]=(n[1]*r+n[5]*i+n[9]*o)/a,e[2]=(n[2]*r+n[6]*i+n[10]*o)/a,e}function o(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}function a(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e[3]=t[3],e}function s(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*o,e[1]=n[1]*r+n[4]*i+n[7]*o,e[2]=n[2]*r+n[5]*i+n[8]*o,e[3]=t[3],e}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"i",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"h",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return f})),n.d(t,"c",(function(){return d}));var r=n(34);function i(){var e=new r.a(9);return r.a!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function o(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function a(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=c*a-s*u,d=-c*o+s*l,p=u*o-a*l,h=n*f+r*d+i*p;return h?(h=1/h,e[0]=f*h,e[1]=(-c*r+i*u)*h,e[2]=(s*r-i*a)*h,e[3]=d*h,e[4]=(c*n-i*l)*h,e[5]=(-s*n+i*o)*h,e[6]=p*h,e[7]=(-u*n+r*l)*h,e[8]=(a*n-r*o)*h,e):null}function s(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+n*(-u*i+a*s)+r*(l*i-o*s)}function l(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=n[0],p=n[1],h=n[2],g=n[3],m=n[4],y=n[5],v=n[6],b=n[7],_=n[8];return e[0]=d*r+p*a+h*u,e[1]=d*i+p*s+h*c,e[2]=d*o+p*l+h*f,e[3]=g*r+m*a+y*u,e[4]=g*i+m*s+y*c,e[5]=g*o+m*l+y*f,e[6]=v*r+b*a+_*u,e[7]=v*i+b*s+_*c,e[8]=v*o+b*l+_*f,e}function u(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=n[0],p=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=d*r+p*a+u,e[7]=d*i+p*s+c,e[8]=d*o+p*l+f,e}function c(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=Math.sin(n),p=Math.cos(n);return e[0]=p*r+d*a,e[1]=p*i+d*s,e[2]=p*o+d*l,e[3]=p*a-d*r,e[4]=p*s-d*i,e[5]=p*l-d*o,e[6]=u,e[7]=c,e[8]=f,e}function f(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function d(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,f=r*s,d=i*a,p=i*s,h=i*l,g=o*a,m=o*s,y=o*l;return e[0]=1-f-h,e[3]=c-y,e[6]=d+m,e[1]=c+y,e[4]=1-u-h,e[7]=p-g,e[2]=d-m,e[5]=p+g,e[8]=1-u-f,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(453),i=n(229);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(454),i=n(322),o=n(193),a=n(228),s=n(192),l=n(865),u=Object.getOwnPropertyDescriptor;t.f=n(104)?u:function(e,t){if(e=o(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(192),i=n(120),o=n(665)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=console},function(e,t,n){"use strict";var r=n(5);Object.defineProperty(t,"__esModule",{value:!0}),t.hexToRgb=function(e){var t=l(e);if(!t)return[0,0,0];var n=parseInt(t[1],16),r=parseInt(t[2],16),i=parseInt(t[3],16);return[n,r,i]},t.isHexColor=l,t.rgbToHex=function(e){var t=(0,o.default)(e,3),n=t[0],r=t[1],i=t[2];return"#".concat([n,r,i].map((function(e){return 1===(t=e.toString(16)).length?"0".concat(t):t;var t})).join("")).toUpperCase()},t.getColorGroupByName=function(e){if(!e||"string"!=typeof e.name)return null;return e.name.replace(/\b[^a-zA-Z]+$/,"")},t.reverseColorRange=function(e,t){return t?s(s({},t),{},{reversed:e,colors:t.colors.slice().reverse()}):null},t.createLinearGradient=function(e,t){var n=parseFloat((100/t.length).toFixed(2)),r=t.map((function(e,t){return"rgba(".concat(e.join(","),", 1) ").concat(n*t,"%, rgba(").concat(e.join(","),", 1) ").concat(n*(t+1),"%")}));return"linear-gradient(to ".concat(e,", ").concat(r.join(","),")")};var i=r(n(4)),o=r(n(90));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t1?n-1:0),i=1;i1?t-1:0),r=1;r2?n-2:0),a=2;a1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.ControllerState=t,this.props=Object.assign({},u,n),this.propsInTransition=null,this.transition=new a.a(n.timeline),this.onViewStateChange=n.onViewStateChange,this._onTransitionUpdate=this._onTransitionUpdate.bind(this)}return Object(i.a)(e,[{key:"finalize",value:function(){this.transition.cancel()}},{key:"getViewportInTransition",value:function(){return this.propsInTransition}},{key:"processViewStateChange",value:function(e){var t=!1,n=this.props;if(e=Object.assign({},u,e),this.props=e,this._shouldIgnoreViewportChange(n,e))return t;if(this._isTransitionEnabled(e)){var r=this.transition.settings,i=r.interruption,o=r.endProps,a=Object.assign({},n,i===l.SNAP_TO_END?o:this.propsInTransition||n);this._triggerTransition(a,e),t=!0}else this.transition.cancel();return t}},{key:"updateTransition",value:function(){this.transition.update()}},{key:"_isTransitionEnabled",value:function(e){var t=e.transitionDuration,n=e.transitionInterpolator;return(t>0||"auto"===t)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(e){return!!this.transition.inProgress&&this.transition.settings.interpolator.arePropsEqual(e,this.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(e,t){return this.transition.inProgress?this.transition.settings.interruption===l.IGNORE||this._isUpdateDueToCurrentTransition(t):!this._isTransitionEnabled(t)||t.transitionInterpolator.arePropsEqual(e,t)}},{key:"_triggerTransition",value:function(e,t){var n=new this.ControllerState(e),r=new this.ControllerState(t).shortestPathFrom(n),i=t.transitionInterpolator,o=i.getDuration?i.getDuration(e,t):t.transitionDuration;if(0!==o){var a=t.transitionInterpolator.initializeProps(e,r);this.propsInTransition={},this.duration=o,this.transition.start({duration:o,easing:t.transitionEasing,interpolator:t.transitionInterpolator,interruption:t.transitionInterruption,startProps:a.start,endProps:a.end,onStart:t.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(t.onTransitionInterrupt),onEnd:this._onTransitionEnd(t.onTransitionEnd)}),this.updateTransition()}}},{key:"_onTransitionEnd",value:function(e){var t=this;return function(n){t.propsInTransition=null,e(n)}}},{key:"_onTransitionUpdate",value:function(e){var t=e.time,n=e.settings,r=n.interpolator,i=n.startProps,o=n.endProps,a=n.duration,s=(0,n.easing)(t/a),l=r.interpolateProps(i,o,s);this.propsInTransition=new this.ControllerState(Object.assign({},this.props,l)).getViewportProps(),this.onViewStateChange&&this.onViewStateChange({viewState:this.propsInTransition,interactionState:{inTransition:!0},oldViewState:this.props})}}]),e}();c.defaultProps=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(3),i=n(6),o=n(7),a=n(202),s=n(79);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u={transitionDuration:0},c=["wheel"],f=["panstart","panmove","panend"],d=["pinchstart","pinchmove","pinchend"],p=["doubletap"],h=["keydown"],g=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e),Object(s.a)(t),this.ControllerState=t,this.controllerState=null,this.controllerStateProps=null,this.eventManager=null,this.transitionManager=new a.b(t,n),this._events=null,this._state={isDragging:!1},this._customEvents=[],this.onViewStateChange=null,this.onStateChange=null,this.invertPan=!1,this.handleEvent=this.handleEvent.bind(this),this.setProps(n)}return Object(o.a)(e,[{key:"finalize",value:function(){for(var e in this._events)this._events[e]&&this.eventManager.off(e,this.handleEvent);this.transitionManager.finalize()}},{key:"handleEvent",value:function(e){var t=this.ControllerState;switch(this.controllerState=new t(function(e){for(var t=1;t=0&&e[0]<=r&&e[1]>=0&&e[1]<=i;return o&&t&&t.stopPropagation(),o}},{key:"isFunctionKeyPressed",value:function(e){var t=e.srcEvent;return Boolean(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}},{key:"isDragging",value:function(){return this._state.isDragging}},{key:"setProps",value:function(e){"onViewStateChange"in e&&(this.onViewStateChange=e.onViewStateChange),"onStateChange"in e&&(this.onStateChange=e.onStateChange),"makeViewport"in e&&(this.makeViewport=e.makeViewport),this.controllerStateProps=e,"eventManager"in e&&this.eventManager!==e.eventManager&&(this.eventManager=e.eventManager,this._events={},this.toggleEvents(this._customEvents,!0)),this.transitionManager.processViewStateChange(this.controllerStateProps);var t=e.scrollZoom,n=void 0===t||t,r=e.dragPan,i=void 0===r||r,o=e.dragRotate,a=void 0===o||o,s=e.doubleClickZoom,l=void 0===s||s,u=e.touchZoom,g=void 0===u||u,m=e.touchRotate,y=void 0!==m&&m,v=e.keyboard,b=void 0===v||v,_=Boolean(this.onViewStateChange);this.toggleEvents(c,_&&n),this.toggleEvents(f,_&&(i||a)),this.toggleEvents(d,_&&(g||y)),this.toggleEvents(p,_&&l),this.toggleEvents(h,_&&b),this.scrollZoom=n,this.dragPan=i,this.dragRotate=a,this.doubleClickZoom=l,this.touchZoom=g,this.touchRotate=y,this.keyboard=b}},{key:"updateTransition",value:function(){this.transitionManager.updateTransition()}},{key:"toggleEvents",value:function(e,t){var n=this;this.eventManager&&e.forEach((function(e){n._events[e]!==t&&(n._events[e]=t,t?n.eventManager.on(e,n.handleEvent):n.eventManager.off(e,n.handleEvent))}))}},{key:"updateViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.assign({},e.getViewportProps(),t),i=this.controllerState!==e;if(i){var o=this.controllerState?this.controllerState.getViewportProps():null;this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:n,oldViewState:o})}Object.assign(this._state,e.getInteractiveState(),n),this.onStateChange&&this.onStateChange(this._state)}},{key:"_onPanStart",value:function(e){var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=this.controllerState.panStart({pos:t}).rotateStart({pos:t});return this.updateViewport(n,u,{isDragging:!0}),!0}},{key:"_onPan",value:function(e){if(!this.isDragging())return!1;var t=this.isFunctionKeyPressed(e)||e.rightButton;return(t=this.invertPan?!t:t)?this._onPanMove(e):this._onPanRotate(e)}},{key:"_onPanEnd",value:function(e){var t=this.controllerState.panEnd().rotateEnd();return this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isRotating:!1}),!0}},{key:"_onPanMove",value:function(e){if(!this.dragPan)return!1;var t=this.getCenter(e),n=this.controllerState.pan({pos:t});return this.updateViewport(n,u,{isDragging:!0,isPanning:!0}),!0}},{key:"_onPanRotate",value:function(e){if(!this.dragRotate)return!1;var t=e.deltaX,n=e.deltaY,r=this.controllerState.getViewportProps(),i=t/r.width,o=n/r.height,a=this.controllerState.rotate({deltaScaleX:i,deltaScaleY:o});return this.updateViewport(a,u,{isDragging:!0,isRotating:!0}),!0}},{key:"_onWheel",value:function(e){if(!this.scrollZoom)return!1;e.preventDefault();var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=e.delta,r=2/(1+Math.exp(-Math.abs(.01*n)));n<0&&0!==r&&(r=1/r);var i=this.controllerState.zoom({pos:t,scale:r});return this.updateViewport(i,u,{isZooming:!0,isPanning:!0}),!0}},{key:"_onPinchStart",value:function(e){var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=this.controllerState.zoomStart({pos:t}).rotateStart({pos:t});return this._state.startPinchRotation=e.rotation,this.updateViewport(n,u,{isDragging:!0}),!0}},{key:"_onPinch",value:function(e){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;var t=this.controllerState;if(this.touchZoom){var n=e.scale,r=this.getCenter(e);t=t.zoom({pos:r,scale:n})}if(this.touchRotate){var i=e.rotation,o=this._state.startPinchRotation;t=t.rotate({deltaScaleX:-(i-o)/180})}return this.updateViewport(t,u,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),!0}},{key:"_onPinchEnd",value:function(e){var t=this.controllerState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(e){if(!this.doubleClickZoom)return!1;var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=this.isFunctionKeyPressed(e),r=this.controllerState.zoom({pos:t,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps(),{isZooming:!0,isPanning:!0}),!0}},{key:"_onKeyDown",value:function(e){if(!this.keyboard)return!1;var t,n=this.isFunctionKeyPressed(e),r=this.controllerState,i={};switch(e.srcEvent.keyCode){case 189:t=n?r.zoomOut().zoomOut():r.zoomOut(),i.isZooming=!0;break;case 187:t=n?r.zoomIn().zoomIn():r.zoomIn(),i.isZooming=!0;break;case 37:n?(t=r.rotateLeft(),i.isRotating=!0):(t=r.moveLeft(),i.isPanning=!0);break;case 39:n?(t=r.rotateRight(),i.isRotating=!0):(t=r.moveRight(),i.isPanning=!0);break;case 38:n?(t=r.rotateUp(),i.isRotating=!0):(t=r.moveUp(),i.isPanning=!0);break;case 40:n?(t=r.rotateDown(),i.isRotating=!0):(t=r.moveDown(),i.isPanning=!0);break;default:return!1}return this.updateViewport(t,this._getTransitionProps(),i),!0}},{key:"_getTransitionProps",value:function(){return u}},{key:"events",set:function(e){this.toggleEvents(this._customEvents,!1),this.toggleEvents(e,!0),this._customEvents=e,this.setProps(this.controllerStateProps)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(36),i=n(3),o=n(6),a=n(7),s=n(137),l=/([0-9]+\.?[0-9]*)(%|px)/;function u(e){switch(Object(r.a)(e)){case"number":return{position:e,relative:!1};case"string":var t=e.match(l);if(t&&t.length>=3){var n="%"===t[2],i=parseFloat(t[1]);return{position:n?i/100:i,relative:n}}default:throw new Error("Could not parse position string ".concat(e))}}function c(e,t){return e.relative?Math.round(e.position*t):e.position}var f=n(243),d=n(79);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(o.a)(this,e);var n=t.id,r=void 0===n?null:n,i=t.x,a=void 0===i?0:i,l=t.y,u=void 0===l?0:l,c=t.width,f=void 0===c?"100%":c,p=t.height,h=void 0===p?"100%":p,g=t.projectionMatrix,m=void 0===g?null:g,y=t.fovy,v=void 0===y?50:y,b=t.near,_=void 0===b?.1:b,A=t.far,x=void 0===A?1e3:A,w=t.modelMatrix,E=void 0===w?null:w,O=t.viewportInstance,M=void 0===O?null:O,S=t.type,T=void 0===S?s.a:S;Object(d.a)(!M||M instanceof s.a),this.viewportInstance=M,this.id=r||this.constructor.displayName||"view",this.type=T,this.props=Object.assign({},t,{id:this.id,projectionMatrix:m,fovy:v,near:_,far:x,modelMatrix:E}),this._parseDimensions({x:a,y:u,width:f,height:h}),this.equals=this.equals.bind(this),Object.seal(this)}return Object(a.a)(e,[{key:"equals",value:function(e){return this===e||(this.viewportInstance?e.viewportInstance&&this.viewportInstance.equals(e.viewportInstance):Object(f.a)(this.props,e.props))}},{key:"makeViewport",value:function(e){var t=e.width,n=e.height,r=e.viewState;if(this.viewportInstance)return this.viewportInstance;r=this.filterViewState(r);var o=this.getDimensions({width:t,height:n}),a=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(r.c)("geometry"),drawMode:n=o.TRIANGLES,attributes:i={},indices:a=null,vertexCount:s=null}=e;this.id=t,this.drawMode=0|n,this.attributes={},this.userData={},this._setAttributes(i,a),this.vertexCount=s||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(e){return"Geometry ".concat(this.id," attribute ").concat(e)}_setAttributes(e,t){t&&(this.indices=ArrayBuffer.isView(t)?{value:t,size:1}:t);for(const t in e){let n=e[t];n=ArrayBuffer.isView(n)?{value:n}:n,Object(i.a)(ArrayBuffer.isView(n.value),"".concat(this._print(t),": must be typed array or object with value as typed array")),"POSITION"!==t&&"positions"!==t||n.size||(n.size=3),"indices"===t?(Object(i.a)(!this.indices),this.indices=n):this.attributes[t]=n}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(e,t){if(t)return t.value.length;let n=1/0;for(const t in e){const r=e[t],{value:i,size:o,constant:a}=r;!a&&i&&o>=1&&(n=Math.min(n,i.length/o))}return Object(i.a)(Number.isFinite(n)),n}}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n(62),i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function a(e){if("string"!=typeof e)return"";var t=e.match(i);return t?t[1]:""}var s=/\?.*/;function l(e){if(Object(r.j)(e)){var t=function(e){if("string"!=typeof e)return"";var t=e.match(o);return t?t[1]:e}(e.headers.get("content-type")),n=a(e.url);return{url:c(e.url||""),type:t||n||null}}return Object(r.b)(e)?{url:c(e.name||""),type:e.type||""}:"string"==typeof e?{url:c(e),type:a(e)}:{url:"",type:""}}function u(e){return Object(r.j)(e)?e.headers["content-length"]||-1:Object(r.b)(e)?e.size:"string"==typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}function c(e){return e.replace(s,"")}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return f}));var r=n(118),i=["SCALAR","VEC2","VEC3","VEC4"],o=new Map([[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126]]),a={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},s={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},l={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function u(e){return i[e-1]||i[0]}function c(e){var t=o.get(e.constructor);if(!t)throw new Error("Illegal typed array");return t}function f(e,t){var n=l[e.componentType],i=a[e.type],o=s[e.componentType],u=e.count*i,c=e.count*i*o;return Object(r.a)(c>=0&&c<=t.byteLength),{ArrayType:n,length:u,byteLength:c}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));"undefined"!=typeof window&&window,void 0!==e||window;var r="undefined"!=typeof document?document:{}}).call(this,n(50))},function(e,t,n){"use strict";t.a=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(172),i=n(30),o=n(492);const a={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},s={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}};class l{static getBytesPerElement(e){return Object(r.c)(e.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(e){Object(i.a)(e.size);return Object(r.c)(e.type||5126).BYTES_PER_ELEMENT*e.size}static resolve(){for(var e=arguments.length,t=new Array(e),n=0;nthis._assign(e)),Object.freeze(this)}toString(){return JSON.stringify(this)}get BYTES_PER_ELEMENT(){return l.getBytesPerElement(this)}get BYTES_PER_VERTEX(){return l.getBytesPerVertex(this)}_assign(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=Object(o.a)("Accessor",e,s),void 0!==e.type&&(this.type=e.type,5124!==e.type&&5125!==e.type||(this.integer=!0)),void 0!==e.size&&(this.size=e.size),void 0!==e.offset&&(this.offset=e.offset),void 0!==e.stride&&(this.stride=e.stride),void 0!==e.normalized&&(this.normalized=e.normalized),void 0!==e.integer&&(this.integer=e.integer),void 0!==e.divisor&&(this.divisor=e.divisor),void 0!==e.buffer&&(this.buffer=e.buffer),void 0!==e.index&&("boolean"==typeof e.index?this.index=e.index?1:0:this.index=e.index),void 0!==e.instanced&&(this.divisor=e.instanced?1:0),void 0!==e.isInstanced&&(this.divisor=e.isInstanced?1:0),this}}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(153);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){"use strict";var r=n(83);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";n.r(t),n.d(t,"fetchFile",(function(){return r.a})),n.d(t,"readFileSync",(function(){return c})),n.d(t,"writeFile",(function(){return d})),n.d(t,"writeFileSync",(function(){return p})),n.d(t,"setLoaderOptions",(function(){return g})),n.d(t,"registerLoaders",(function(){return m.c})),n.d(t,"parse",(function(){return y.a})),n.d(t,"parseSync",(function(){return w})),n.d(t,"parseInBatches",(function(){return j})),n.d(t,"selectLoader",(function(){return v.a})),n.d(t,"selectLoaderSync",(function(){return v.b})),n.d(t,"load",(function(){return V.a})),n.d(t,"loadInBatches",(function(){return H})),n.d(t,"encode",(function(){return X})),n.d(t,"encodeSync",(function(){return K})),n.d(t,"encodeInBatches",(function(){return Q})),n.d(t,"encodeText",(function(){return $})),n.d(t,"encodeURLtoURL",(function(){return ee})),n.d(t,"save",(function(){return ne})),n.d(t,"saveSync",(function(){return re})),n.d(t,"makeIterator",(function(){return ae.a})),n.d(t,"NullLoader",(function(){return se})),n.d(t,"setPathPrefix",(function(){return i.c})),n.d(t,"getPathPrefix",(function(){return i.a})),n.d(t,"resolvePath",(function(){return i.b})),n.d(t,"RequestScheduler",(function(){return le.a})),n.d(t,"_fetchProgress",(function(){return ue})),n.d(t,"_BrowserFileSystem",(function(){return ge})),n.d(t,"_unregisterLoaders",(function(){return m.a})),n.d(t,"isBrowser",(function(){return o.c})),n.d(t,"isWorker",(function(){return o.d})),n.d(t,"self",(function(){return o.f})),n.d(t,"window",(function(){return o.g})),n.d(t,"global",(function(){return o.b})),n.d(t,"document",(function(){return o.a})),n.d(t,"assert",(function(){return s.a})),n.d(t,"forEach",(function(){return k.b})),n.d(t,"concatenateChunksAsync",(function(){return k.a})),n.d(t,"makeTextDecoderIterator",(function(){return ve.c})),n.d(t,"makeTextEncoderIterator",(function(){return ve.d})),n.d(t,"makeLineIterator",(function(){return ve.a})),n.d(t,"makeNumberedLineIterator",(function(){return ve.b})),n.d(t,"isPromise",(function(){return be.g})),n.d(t,"isIterable",(function(){return be.d})),n.d(t,"isAsyncIterable",(function(){return be.a})),n.d(t,"isIterator",(function(){return be.e})),n.d(t,"isResponse",(function(){return be.j})),n.d(t,"isReadableStream",(function(){return be.i})),n.d(t,"isWritableStream",(function(){return be.k}));var r=n(355),i=n(388),o=n(150),a=n(848),s=n(139),l={dataType:"arraybuffer",nothrow:!0};function u(e,t){return t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e=Object.assign({},l,e)).responseType=e.responseType||e.dataType,e}(t),e.startsWith("data:"),t.nothrow||Object(s.a)(!1),null}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=Object(i.b)(e),!o.c&&a.readFileSync?a.readFileSync(e,t):u(e,t)}var f=n(501);function d(e,t,n){return e=Object(i.b)(e),!o.c&&f.writeFile?f.writeFile(e,t,n):Object(s.a)(!1)}function p(e,t,n){return e=Object(i.b)(e),!o.c&&f.writeFileSync?f.writeFileSync(e,t,n):Object(s.a)(!1)}var h=n(147);function g(e){Object(h.d)(e)}var m=n(396),y=n(409),v=n(261),b=n(157),_=n(314),A=n(313),x=n(209);function w(e,t,n,r){Object(s.a)(!r||"string"!=typeof r,"parseSync no longer accepts final url"),Array.isArray(t)||Object(b.a)(t)||(r=n,n=t,t=null),n=n||{};var i=Object(A.b)(t,r),o=Object(v.b)(e,i,n);if(!o)return null;n=Object(h.c)(n,o,i);var a=Object(x.b)(e).url;return function(e,t,n,r){if(t=Object(_.b)(t,e),e.parseTextSync&&"string"==typeof t)return e.parseTextSync(t,n,r,e);if(e.parseSync)return e.parseSync(t,n,r,e);throw new Error("".concat(e.name," loader: 'parseSync' not supported by this loader, use 'parse' instead. ").concat(r.url||""))}(o,e,n,r=Object(A.a)({url:a,parseSync:w,loaders:t},n))}var E=n(9),O=n.n(E),M=n(23),S=n(110),T=n(65),C=n(98);function P(e,t){var n={},r=!1;function i(n,i){return r=!0,i=new Promise((function(t){t(e[n](i))})),{done:!1,value:t(i)}}return n["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},n.next=function(e){return r?(r=!1,e):i("next",e)},"function"==typeof e.throw&&(n.throw=function(e){if(r)throw r=!1,e;return i("throw",e)}),"function"==typeof e.return&&(n.return=function(e){return r?(r=!1,e):i("return",e)}),n}var k=n(593),L=n(1181);function R(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==u[2]?u[2]:function(){},i=u.length>3&&void 0!==u[3]?u[3]:function(){},e.next=4,t;case 4:if((t=e.sent).ok){e.next=7;break}return e.abrupt("return",t);case 7:if(o=t.body){e.next=10;break}return e.abrupt("return",t);case 10:if(a=t.headers.get("content-length"),s=a&&parseInt(a,10),a>0){e.next=14;break}return e.abrupt("return",t);case 14:if("undefined"!=typeof ReadableStream&&o.getReader){e.next=16;break}return e.abrupt("return",t);case 16:return l=new ReadableStream({start:function(e){fe(e,o.getReader(),0,s,n,r,i)}}),e.abrupt("return",new Response(l));case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e,t,n,r,i,o,a){return de.apply(this,arguments)}function de(){return(de=Object(M.a)(O.a.mark((function e(t,n,r,i,o,a,s){var l,u,c,f;return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.read();case 3:if(l=e.sent,u=l.done,c=l.value,!u){e.next=10;break}return a(),t.close(),e.abrupt("return");case 10:return r+=c.byteLength,f=Math.round(r/i*100),o(f,{loadedBytes:r,totalBytes:i}),t.enqueue(c),e.next=16,fe(t,n,r,i,o,a,s);case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(0),t.error(e.t0),s(e.t0);case 22:case"end":return e.stop()}}),e,null,[[0,18]])})))).apply(this,arguments)}var pe=n(6),he=n(7),ge=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(pe.a)(this,e),this._fetch=n.fetch||fetch,this.files={};for(var r=0;r1&&void 0!==o[1]?o[1]:{},!t.includes("://")){e.next=4;break}return r=n.fetch||this._fetch,e.abrupt("return",r(t,n));case 4:if(!this.files[t]){e.next=9;break}return i=new Response(this.files[t]),Object.defineProperty(i,"url",{value:t}),e.abrupt("return",i);case 9:return e.abrupt("return",new Response(t,{status:400,statusText:"NOT FOUND"}));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"readdir",value:(a=Object(M.a)(O.a.mark((function e(){var t,n;return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n in t=[],this.files)t.push(n);return e.abrupt("return",t);case 3:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"stat",value:(o=Object(M.a)(O.a.mark((function e(t,n){var r;return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.files[t]){e.next=3;break}throw new Error("No such file: ".concat(t));case 3:return e.abrupt("return",{size:r.size});case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"unlink",value:(i=Object(M.a)(O.a.mark((function e(t){return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:delete this.files[t];case 1:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"open",value:(r=Object(M.a)(O.a.mark((function e(t){return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.files[t]);case 1:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"read",value:(n=Object(M.a)(O.a.mark((function e(t,n){var r,i,o,a,s,l,u,c;return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.buffer,i=void 0===r?null:r,n.offset,o=n.length,a=void 0===o?i.byteLength:o,s=n.position,l=void 0===s?null:s,u=t,e.next=4,me(u,l,l+a);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"close",value:(t=Object(M.a)(O.a.mark((function e(t){return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}();function me(e,t,n){return ye.apply(this,arguments)}function ye(){return(ye=Object(M.a)(O.a.mark((function e(t,n,r){var i;return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.slice(n,r),e.next=3,new Promise((function(e,t){var n=new FileReader;n.onload=function(t){return e(t.target&&t.target.result)},n.onerror=function(e){return t(e)},n.readAsArrayBuffer(i)}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ve=n(471),be=n(62)},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};return Array.isArray(e)?i(e,t,[]):t(e)?[e]:[]}function i(e,t,n){for(var r=-1;++r=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function _(e,t){void 0===t&&(t="kilometers");var n=r[t];if(!n)throw new Error(t+" units is invalid");return e*n}function A(e,t){void 0===t&&(t="kilometers");var n=r[t];if(!n)throw new Error(t+" units is invalid");return e/n}function x(e,t){return E(A(e,t))}function w(e){var t=e%360;return t<0&&(t+=360),t}function E(e){return e%(2*Math.PI)*180/Math.PI}function O(e){return e%360*Math.PI/180}function M(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return _(A(e,t),n)}function S(e,t,n){if(void 0===t&&(t="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var r=o[t];if(!r)throw new Error("invalid original units");var i=o[n];if(!i)throw new Error("invalid final units");return e/r*i}function T(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function C(e){return!!e&&e.constructor===Object}function P(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!T(e))throw new Error("bbox must only contain numbers")}))}function k(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}var L=Object.freeze({__proto__:null,earthRadius:n,factors:r,unitsFactors:i,areaFactors:o,feature:a,geometry:s,point:l,points:u,polygon:c,polygons:f,lineString:d,lineStrings:p,featureCollection:h,multiLineString:g,multiPoint:m,multiPolygon:y,geometryCollection:v,round:b,radiansToLength:_,lengthToRadians:A,lengthToDegrees:x,bearingToAzimuth:w,radiansToDegrees:E,degreesToRadians:O,convertLength:M,convertArea:S,isNumber:T,isObject:C,validateBBox:P,validateId:k});function R(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,f=0,d=0,p=e.type,h="FeatureCollection"===p,g="Feature"===p,m=h?e.features.length:1,y=0;ys||p>l||h>u)return a=o,s=n,l=p,u=h,void(i=0);var g=d([a,o],e.properties);if(!1===t(g,n,r,h,i))return!1;i++,a=o}))&&void 0}}}))}function q(e,t,n){var r=n,i=!1;return W(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r}function Y(e,t){if(!e)throw new Error("geojson is required");V(e,(function(e,n,r){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,n,r,0,0))return!1;break;case"Polygon":for(var a=0;ae[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Q(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ee(e){if(e.length>1&&T(e[0])&&T(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return ee(e[0]);throw new Error("coordinates must only contain numbers")}function te(e,t,n){if(!t||!n)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.type)}function ne(e,t,n){if(!e)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.geometry.type)}function re(e,t,n){if(!e)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=e.features;r * v. 1.2.0 * https://github.com/RaumZeit/MarchingSquares.js * * MarchingSquaresJS is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MarchingSquaresJS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * As additional permission under GNU Affero General Public License version 3 * section 7, third-party projects (personal or commercial) may distribute, * include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the * requirement that said third-party project for that reason alone becomes * subject to any requirement of the GNU Affero General Public License version 3. * Any modifications to MarchingSquaresJS, however, must be shared with the public * and made available. * * In summary this: * - allows you to use MarchingSquaresJS at no cost * - allows you to use MarchingSquaresJS for both personal and commercial purposes * - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any * license as long as this license notice is included * - enables you to keep the source code of your program that uses MarchingSquaresJS * undisclosed * - forces you to share any modifications you have made to MarchingSquaresJS, * e.g. bug-fixes * * You should have received a copy of the GNU Affero General Public License * along with MarchingSquaresJS. If not, see . */function he(e,t,n){n=n||{};for(var r=Object.keys(de),i=0;i=0&&g>=0&&g=0;c--)if(Math.abs(t[c][0][0]-l)<=1e-7&&Math.abs(t[c][0][1]-u)<=1e-7){for(var f=a.path.length-2;f>=0;--f)t[c].unshift(a.path[f]);s=!0;break}s||(t[n++]=a.path)}var d}))})),t}(function(e,t){for(var n=e.length-1,r=e[0].length-1,i={rows:n,cols:r,cells:[]},o=0;o=t?8:0,s|=u>=t?4:0,s|=c>=t?2:0;var d,p,h,g,m=!1;if(5==(s|=f>=t?1:0)||10===s){var y=(l+u+c+f)/4;5===s&&yr;){if(i-r>600){var a=i-r+1,s=n-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);e(t,n,Math.max(r,Math.floor(n-s*u/a+c)),Math.min(i,Math.floor(n+(a-s)*u/a+c)),o)}var f=t[n],d=r,p=i;for(xe(t,r,n),o(t[i],f)>0&&xe(t,r,i);d0;)p--}0===o(t[r],f)?xe(t,r,p):xe(t,++p,i),p<=n&&(r=p+1),n<=p&&(i=p-1)}}(e,t,n||0,r||e.length-1,i||we)}function xe(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function we(e,t){return et?1:0}be.default=_e;var Ee=Me,Oe=Me;function Me(e,t){if(!(this instanceof Me))return new Me(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function Se(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r=e.minX&&t.maxY>=e.minY}function Ne(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Fe(e,t,n,r,i){for(var o,a=[t,n];a.length;)(n=a.pop())-(t=a.pop())<=r||(o=t+Math.ceil((n-t)/r/2)*r,be(e,o,t,n,i),a.push(t,o,o,n))}function ze(e){var t={exports:{}};return e(t,t.exports),t.exports}Me.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],r=this.toBBox;if(!Ie(e,t))return n;for(var i,o,a,s,l=[];t;){for(i=0,o=t.children.length;i=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)},_split:function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),a=Ne(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Te(n,this.toBBox),Te(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(e,t){this.data=Ne([e,t]),this.data.height=e.height+1,this.data.leaf=!1,Te(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var r,i,o,a,s,l,u,c,f,d,p,h,g,m;for(l=u=1/0,r=t;r<=n-t;r++)f=i=Ce(e,0,r,this.toBBox),d=o=Ce(e,r,n,this.toBBox),p=Math.max(f.minX,d.minX),h=Math.max(f.minY,d.minY),g=Math.min(f.maxX,d.maxX),m=Math.min(f.maxY,d.maxY),a=Math.max(0,g-p)*Math.max(0,m-h),s=Re(i)+Re(o),a=t;i--)o=e.children[i],Pe(l,e.leaf?a(o):o),u+=De(l);return u},_adjustParentBBoxes:function(e,t,n){for(var r=n;r>=0;r--)Pe(t[r],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():Te(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},Ee.default=Oe;var Be=function(e,t,n){var r=e*t,i=Ue*e,o=i-(i-e),a=e-o,s=Ue*t,l=s-(s-t),u=t-l,c=a*u-(r-o*l-a*l-o*u);return n?(n[0]=c,n[1]=r,n):[c,r]},Ue=+(Math.pow(2,27)+1),Ve=function(e,t){var n=0|e.length,r=0|t.length;if(1===n&&1===r)return function(e,t){var n=e+t,r=n-e,i=e-(n-r)+(t-r);return i?[i,n]:[n]}(e[0],t[0]);var i,o,a=new Array(n+r),s=0,l=0,u=0,c=Math.abs,f=e[l],d=c(f),p=t[u],h=c(p);d=r?(i=f,(l+=1)=r?(i=f,(l+=1)>1;return["sum(",n(e.slice(0,t)),",",n(e.slice(t)),")"].join("")}function r(e){if(2===e.length)return[["sum(prod(",e[0][0],",",e[1][1],"),prod(-",e[0][1],",",e[1][0],"))"].join("")];for(var i=[],o=0;o0){if(a<=0)return s;r=i+a}else{if(!(i<0))return s;if(a>=0)return s;r=-(i+a)}var l=33306690738754716e-32*r;return s>=l||s<=-l?s:o(e,t,n)},function(e,t,n,r){var i=e[0]-r[0],o=t[0]-r[0],s=n[0]-r[0],l=e[1]-r[1],u=t[1]-r[1],c=n[1]-r[1],f=e[2]-r[2],d=t[2]-r[2],p=n[2]-r[2],h=o*c,g=s*u,m=s*l,y=i*c,v=i*u,b=o*l,_=f*(h-g)+d*(m-y)+p*(v-b),A=7771561172376103e-31*((Math.abs(h)+Math.abs(g))*Math.abs(f)+(Math.abs(m)+Math.abs(y))*Math.abs(d)+(Math.abs(v)+Math.abs(b))*Math.abs(p));return _>A||-_>A?_:a(e,t,n,r)}];function l(e){var t=s[e.length];return t||(t=s[e.length]=i(e.length)),t.apply(void 0,e)}!function(){for(;s.length<=5;)s.push(i(s.length));for(var t=[],n=["slow"],r=0;r<=5;++r)t.push("a"+r),n.push("o"+r);var o=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(r=2;r<=5;++r)o.push("case ",r,":return o",r,"(",t.slice(0,r).join(),");");o.push("}var s=new Array(arguments.length);for(var i=0;i0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function $e(e,t){return et?1:0}Ke.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){for(var t=this.data,n=this.compare,r=t[e];e>0;){var i=e-1>>1,o=t[i];if(n(r,o)>=0)break;t[e]=o,e=i}t[e]=r},_down:function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e];e=0)break;t[e]=s,e=o}t[e]=i}},Xe.default=Ze;var Je=function(e,t){for(var n=e[0],r=e[1],i=!1,o=0,a=t.length-1;or!=c>r&&n<(u-s)*(r-l)/(c-l)+s&&(i=!i)}return i},Qe=Ye[3],et=nt,tt=nt;function nt(e,t,n){t=Math.max(0,void 0===t?2:t),n=n||0;for(var r,i=function(e){for(var t=e[0],n=e[0],r=e[0],i=e[0],o=0;or[0]&&(r=a),a[1]i[1]&&(i=a)}var s=[t,n,r,i],l=s.slice();for(o=0;o1&&Ge(e[o[u-2]],e[o[u-1]],l)<=0;)u-=1,o.pop();for(o.push(s),u=a.length;u>1&&Ge(e[a[u-2]],e[a[u-1]],l)>=0;)u-=1,a.pop();a.push(s)}n=new Array(a.length+o.length-2);for(var c=0,f=(r=0,o.length);r0;--d)n[c++]=a[d];return n}(l),c=[];for(o=0;oo||s.push({node:c,dist:f})}for(;s.length&&!s.peek().node.children;){var d=s.pop(),p=d.node,h=ft(p,t,n),g=ft(p,r,i);if(d.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function st(e,t,n){for(var r,i,o,a,s=Math.min(e[0],t[0]),l=Math.min(e[1],t[1]),u=Math.max(e[0],t[0]),c=Math.max(e[1],t[1]),f=n.search({minX:s,minY:l,maxX:u,maxY:c}),d=0;d0!=Qe(r,i,a)>0&&Qe(o,a,r)>0!=Qe(o,a,i)>0)return!1;return!0}function lt(e){var t=e.p,n=e.next.p;return e.minX=Math.min(t[0],n[0]),e.minY=Math.min(t[1],n[1]),e.maxX=Math.max(t[0],n[0]),e.maxY=Math.max(t[1],n[1]),e}function ut(e,t){var n={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(n.next=t.next,n.prev=t,t.next.prev=n,t.next=n):(n.prev=n,n.next=n),n}function ct(e,t){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function ft(e,t,n){var r=t[0],i=t[1],o=n[0]-r,a=n[1]-i;if(0!==o||0!==a){var s=((e[0]-r)*o+(e[1]-i)*a)/(o*o+a*a);s>1?(r=n[0],i=n[1]):s>0&&(r+=o*s,i+=a*s)}return(o=e[0]-r)*o+(a=e[1]-i)*a}function dt(e,t,n,r,i,o,a,s){var l,u,c,f,d=n-e,p=r-t,h=a-i,g=s-o,m=e-i,y=t-o,v=d*d+p*p,b=d*h+p*g,_=h*h+g*g,A=d*m+p*y,x=h*m+g*y,w=v*_-b*b,E=w,O=w;0===w?(u=0,E=1,f=x,O=_):(f=v*x-b*A,(u=b*x-_*A)<0?(u=0,f=x,O=_):u>E&&(u=E,f=x+b,O=_)),f<0?(f=0,-A<0?u=0:-A>v?u=E:(u=-A,E=v)):f>O&&(f=O,-A+b<0?u=0:-A+b>v?u=E:(u=-A+b,E=v));var M=(1-(c=0===f?0:f/O))*i+c*a-((1-(l=0===u?0:u/E))*e+l*n),S=(1-c)*o+c*s-((1-l)*t+l*r);return M*M+S*S}function pt(e,t){void 0===t&&(t={}),t.concavity=t.concavity||1/0;var n=[];if(R(e,(function(e){n.push([e[0],e[1]])})),!n.length)return null;var r=et(n,t.concavity);return r.length>3?c([r]):null}function ht(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=J(e),i=ie(t),o=i.type,a=t.bbox,s=i.coordinates;if(a&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(r,a))return!1;"Polygon"===o&&(s=[s]);for(var l=!1,u=0;ue[1]!=u>e[1]&&e[0]<(l-a)*(e[1]-s)/(u-s)+a&&(r=!r)}return r}function mt(e,t){var n=[];return N(e,(function(e){var r=!1;if("Point"===e.geometry.type)B(t,(function(t){ht(e,t)&&(r=!0)})),r&&n.push(e);else{if("MultiPoint"!==e.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var i=[];B(t,(function(t){R(e,(function(e){ht(e,t)&&(r=!0,i.push(e))}))})),r&&n.push(m(i))}})),h(n)}function yt(e,t,n){void 0===n&&(n={});var r=J(e),i=J(t),o=O(i[1]-r[1]),a=O(i[0]-r[0]),s=O(r[1]),l=O(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return _(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}function vt(e,t){var n=!1;return h(function(e){if(e.length<3)return[];e.sort(_t);for(var t,n,r,i,o,a,s=e.length-1,l=e[s].x,u=e[0].x,c=e[s].y,f=c;s--;)e[s].yf&&(f=e[s].y);var d,p=u-l,h=f-c,g=p>h?p:h,m=.5*(u+l),y=.5*(f+c),v=[new bt({__sentinel:!0,x:m-20*g,y:y-g},{__sentinel:!0,x:m,y:y+20*g},{__sentinel:!0,x:m+20*g,y:y-g})],b=[],_=[];for(s=e.length;s--;){for(_.length=0,d=v.length;d--;)(p=e[s].x-v[d].x)>0&&p*p>v[d].r?(b.push(v[d]),v.splice(d,1)):p*p+(h=e[s].y-v[d].y)*h>v[d].r||(_.push(v[d].a,v[d].b,v[d].b,v[d].c,v[d].c,v[d].a),v.splice(d,1));for(At(_),d=_.length;d;)n=_[--d],t=_[--d],r=e[s],i=n.x-t.x,o=n.y-t.y,a=2*(i*(r.y-n.y)-o*(r.x-n.x)),Math.abs(a)>1e-12&&v.push(new bt(t,n,r))}for(Array.prototype.push.apply(b,v),s=b.length;s--;)(b[s].a.__sentinel||b[s].b.__sentinel||b[s].c.__sentinel)&&b.splice(s,1);return b}(e.features.map((function(e){var r={x:e.geometry.coordinates[0],y:e.geometry.coordinates[1]};return t?r.z=e.properties[t]:3===e.geometry.coordinates.length&&(n=!0,r.z=e.geometry.coordinates[2]),r}))).map((function(e){var t=[e.a.x,e.a.y],r=[e.b.x,e.b.y],i=[e.c.x,e.c.y],o={};return n?(t.push(e.a.z),r.push(e.b.z),i.push(e.c.z)):o={a:e.a.z,b:e.b.z,c:e.c.z},c([[t,r,i,t]],o)})))}et.default=tt;var bt=function(e,t,n){this.a=e,this.b=t,this.c=n;var r,i,o=t.x-e.x,a=t.y-e.y,s=n.x-e.x,l=n.y-e.y,u=o*(e.x+t.x)+a*(e.y+t.y),c=s*(e.x+n.x)+l*(e.y+n.y),f=2*(o*(n.y-t.y)-a*(n.x-t.x));this.x=(l*u-a*c)/f,this.y=(o*c-s*u)/f,r=this.x-e.x,i=this.y-e.y,this.r=r*r+i*i};function _t(e,t){return t.x-e.x}function At(e){var t,n,r,i,o,a=e.length;e:for(;a;)for(n=e[--a],t=e[--a],r=a;r;)if(o=e[--r],t===(i=e[--r])&&n===o||t===o&&n===i){e.splice(a,2),e.splice(r,2),a-=2;continue e}}function xt(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return wt(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"features":return;default:t[n]=e[n]}})),t.features=e.features.map((function(e){return wt(e)})),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Et(e);default:throw new Error("unknown GeoJSON type")}}function wt(e){var t={type:"Feature"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:t[n]=e[n]}})),t.properties=function e(t){var n={};return t?(Object.keys(t).forEach((function(r){var i=t[r];"object"==typeof i?null===i?n[r]=null:Array.isArray(i)?n[r]=i.map((function(e){return e})):n[r]=e(i):n[r]=i})),n):n}(e.properties),t.geometry=Et(e.geometry),t}function Et(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map((function(e){return Et(e)})),t):(t.coordinates=function e(t){var n=t;return"object"!=typeof n[0]?n.slice():n.map((function(t){return e(t)}))}(e.coordinates),t)}function Ot(e){return e[0].toString()+","+e[1].toString()}function Mt(e){return e}function St(e,t){var n=function(e){if(null==e)return Mt;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(e,s){s||(t=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(t+=e[0])*r+o,c[1]=(n+=e[1])*i+a;l1)for(var o,s,l=1,u=a(i[0]);lu&&(s=i[0],i[0]=i[l],i[l]=s,u=o);return i})).filter((function(e){return e.length>0}))}}var Ct=Object.prototype.hasOwnProperty;function Pt(e,t,n,r,i,o){3===arguments.length&&(r=o=Array,i=null);for(var a=new r(e=1<=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=r,s[u]=o,o}function f(r,o){for(var u=t(r)&l,c=a[u],f=0;c!=i;){if(n(c,r))return s[u];if(++f>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=r,s[u]=o,o}function d(r,o){for(var u=t(r)&l,c=a[u],f=0;c!=i;){if(n(c,r))return s[u];if(++f>=e)break;c=a[u=u+1&l]}return o}function p(){for(var e=[],t=0,n=a.length;t>7^Dt[2]^Dt[3])}function It(e,t,n,r){Nt(e,t,n),Nt(e,t,t+r),Nt(e,t+r,n)}function Nt(e,t,n){for(var r,i=t+(n---t>>1);tr&&(r=o),ai&&(i=a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}for(var c in e)o(e[c]);return r>=t&&i>=n?[t,n,r,i]:void 0}(e=function(e){var t,n,r={};for(t in e)r[t]=null==(n=e[t])?{type:null}:("FeatureCollection"===n.type?Ft:"Feature"===n.type?zt:Bt)(n);return r}(e)),r=t>0&&n&&function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=o-r?(n-1)/(o-r):1,l=a-i?(n-1)/(a-i):1;function u(e){return[Math.round((e[0]-r)*s),Math.round((e[1]-i)*l)]}function c(e,t){for(var n,o,a,u,c,f=-1,d=0,p=e.length,h=new Array(p);++f=0){var o=f[n];i===t&&o===r||i===r&&o===t||(++p,d[n]=1)}else c[n]=t,f[n]=r}}function A(e){return jt(o[e])}function x(e,t){return kt(o[e],o[t])}u=c=f=null;var w,E=function(e,t,n,r,i){3===arguments.length&&(r=Array,i=null);for(var o=new r(e=1<=e)throw new Error("full hashset");l=o[s=s+1&a]}return o[s]=r,!0}function u(r){for(var s=t(r)&a,l=o[s],u=0;l!=i;){if(n(l,r))return!0;if(++u>=e)break;l=o[s=s+1&a]}return!1}function c(){for(var e=[],t=0,n=o.length;t2&&Xt(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1))}if(n.push(t[t.length-1]),i=n.length,Gt(t[0],t[t.length-1])&&i<4)throw new Error("invalid polygon");return Xt(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1),n}function Gt(e,t){return e[0]===t[0]&&e[1]===t[1]}function Xt(e,t,n){var r=n[0],i=n[1],o=e[0],a=e[1],s=t[0],l=t[1],u=s-o,c=l-a;return 0==(r-o)*c-(i-a)*u&&(Math.abs(u)>=Math.abs(c)?u>0?o<=r&&r<=s:s<=r&&r<=o:c>0?a<=i&&i<=l:l<=i&&i<=a)}function Zt(e,t,n){var r=t.x,i=t.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((e.x-r)*o+(e.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=e.x-r)*o+(a=e.y-i)*a}function Kt(e,t){var n=e.length-1,r=[e[0]];return function e(t,n,r,i,o){for(var a,s=i,l=n+1;ls&&(a=l,s=u)}s>i&&(a-n>1&&e(t,n,a,i,o),o.push(t[a]),r-a>1&&e(t,a,r,i,o))}(e,0,n,t,r),r.push(e[n]),r}function $t(e,t,n){if(e.length<=2)return e;var r=void 0!==t?t*t:1;return Kt(e=n?e:function(e,t){for(var n,r,i,o,a,s=e[0],l=[s],u=1,c=e.length;ut&&(l.push(n),s=n);return s!==n&&l.push(n),l}(e,r),r)}function Jt(e,t,n){return $t(e.map((function(e){return{x:e[0],y:e[1],z:e[2]}})),t,n).map((function(e){return e.z?[e.x,e.y,e.z]:[e.x,e.y]}))}function Qt(e,t,n){return e.map((function(e){var r=e.map((function(e){return{x:e[0],y:e[1]}}));if(r.length<4)throw new Error("invalid polygon");for(var i=$t(r,t,n).map((function(e){return[e.x,e.y]}));!en(i);)i=$t(r,t-=.01*t,n).map((function(e){return[e.x,e.y]}));return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i}))}function en(e){return!(e.length<3||3===e.length&&e[2][0]===e[0][0]&&e[2][1]===e[0][1])}var tn=function(){function e(e){this.points=e.points||[],this.duration=e.duration||1e4,this.sharpness=e.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=e.stepLength||60,this.length=this.points.length,this.delay=0;for(var t=0;te&&(t.push(r),n=i)}return t},e.prototype.vector=function(e){var t=this.pos(e+10),n=this.pos(e-10);return{angle:180*Math.atan2(t.y-n.y,t.x-n.x)/3.14,speed:Math.sqrt((n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y)+(n.z-t.z)*(n.z-t.z))}},e.prototype.pos=function(e){var t=e-this.delay;t<0&&(t=0),t>this.duration&&(t=this.duration-1);var n=t/this.duration;if(n>=1)return this.points[this.length-1];var r=Math.floor((this.points.length-1)*n);return function(e,t,n,r,i){var o=function(e){var t=e*e;return[t*e,3*t*(1-e),3*e*(1-e)*(1-e),(1-e)*(1-e)*(1-e)]}(e);return{x:i.x*o[0]+r.x*o[1]+n.x*o[2]+t.x*o[3],y:i.y*o[0]+r.y*o[1]+n.y*o[2]+t.y*o[3],z:i.z*o[0]+r.z*o[1]+n.z*o[2]+t.z*o[3]}}((this.length-1)*n-r,this.points[r],this.controls[r][1],this.controls[r+1][0],this.points[r+1])},e}();function nn(e,t){void 0===t&&(t={});for(var n=t.resolution||1e4,r=t.sharpness||.85,i=[],o=ie(e).coordinates.map((function(e){return{x:e[0],y:e[1]}})),a=new tn({duration:n,points:o,sharpness:r}),s=function(e){var t=a.pos(e);Math.floor(e/100)%2==0&&i.push([t.x,t.y])},l=0;l=yt(e.slice(0,2),[t,i])){var o=(n+i)/2;return[t,o-(r-t)/2,r,o+(r-t)/2]}var a=(t+r)/2;return[a-(i-n)/2,n,a+(i-n)/2,i]}function sn(e,t,n,r){void 0===r&&(r={});var i=J(e),o=O(i[0]),a=O(i[1]),s=O(n),u=A(t,r.units),c=Math.asin(Math.sin(a)*Math.cos(u)+Math.cos(a)*Math.sin(u)*Math.cos(s));return l([E(o+Math.atan2(Math.sin(s)*Math.sin(u)*Math.cos(a),Math.cos(u)-Math.sin(a)*Math.sin(c))),E(c)],r.properties)}function ln(e,t,n){void 0===n&&(n={});for(var r=n.steps||64,i=n.properties?n.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},o=[],a=0;a80*n){r=o=e[0],i=a=e[1];for(var h=n;ho&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return vn(d,p,n,r,i,u),p}function mn(e,t,n,r,i){var o,a;if(i===Nn(e,t,n,r)>0)for(o=t;o=t;o-=r)a=Dn(o,e[o],e[o+1],a);return a&&Pn(a,a.next)&&(jn(a),a=a.next),a}function yn(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Pn(r,r.next)&&0!==Cn(r.prev,r,r.next))r=r.next;else{if(jn(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function vn(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=On(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,u=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?_n(e,r,i,o):bn(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),jn(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?vn(e=An(e,t,n),t,n,r,i,o,2):2===a&&xn(e,t,n,r,i,o):vn(yn(e),t,n,r,i,o,1);break}}}function bn(e){var t=e.prev,n=e,r=e.next;if(Cn(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Sn(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Cn(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function _n(e,t,n,r){var i=e.prev,o=e,a=e.next;if(Cn(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=On(s,l,t,n,r),d=On(u,c,t,n,r),p=e.prevZ,h=e.nextZ;p&&p.z>=f&&h&&h.z<=d;){if(p!==e.prev&&p!==e.next&&Sn(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Cn(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,h!==e.prev&&h!==e.next&&Sn(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Cn(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;p&&p.z>=f;){if(p!==e.prev&&p!==e.next&&Sn(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Cn(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;h&&h.z<=d;){if(h!==e.prev&&h!==e.next&&Sn(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Cn(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function An(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Pn(i,o)&&kn(i,r,r.next,o)&&Ln(i,o)&&Ln(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),jn(r),jn(r.next),r=e=o),r=r.next}while(r!==e);return r}function xn(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Tn(a,s)){var l=Rn(a,s);return a=yn(a,a.next),l=yn(l,l.next),vn(a,t,n,r,i,o),void vn(l,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function wn(e,t){return e.x-t.x}function En(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&Sn(on.x)&&Ln(r,e)&&(n=r,d=l),r=r.next;return n}(e,t)){var n=Rn(t,e);yn(n,n.next)}}function On(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Mn(e){var t=e,n=e;do{t.x=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Tn(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&kn(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&Ln(e,t)&&Ln(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)}function Cn(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Pn(e,t){return e.x===t.x&&e.y===t.y}function kn(e,t,n,r){return!!(Pn(e,t)&&Pn(n,r)||Pn(e,r)&&Pn(n,t))||Cn(e,t,n)>0!=Cn(e,t,r)>0&&Cn(n,r,e)>0!=Cn(n,r,t)>0}function Ln(e,t){return Cn(e.prev,e,e.next)<0?Cn(e,t,e.next)>=0&&Cn(e,e.prev,t)>=0:Cn(e,t,e.prev)<0||Cn(e,e.next,t)<0}function Rn(e,t){var n=new In(e.i,e.x,e.y),r=new In(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Dn(e,t,n,r){var i=new In(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function jn(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function In(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Nn(e,t,n,r){for(var i=0,o=t,a=n-r;o0&&(r+=e[i-1].length,n.holes.push(r))}return n}(e),n=pn(t.vertices,t.holes,2),r=[],i=[];n.forEach((function(e,r){var o=n[r];i.push([t.vertices[2*o],t.vertices[2*o+1]])}));for(var o=0;oi?n:i,r>o?r:o]}(e,r),n.push(i),r})),n})(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}(e,t)})),h(t)}gn.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(Nn(e,0,o,n));if(i)for(var s=0,l=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n},pn.default=hn;var Un=ze((function(e,t){function n(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function r(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:e},t,r)}function i(e,t,r){void 0===r&&(r={});for(var i=0,o=e;i=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=c,t.lengthToRadians=f,t.lengthToDegrees=function(e,t){return d(f(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=d,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return c(f(e,t),n)},t.convertArea=function(e,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[n];if(!i)throw new Error("invalid original units");var o=t.areaFactors[r];if(!o)throw new Error("invalid final units");return e/i*o},t.isNumber=p,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!p(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}));function Vn(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,f=0,d=0,p=e.type,h="FeatureCollection"===p,g="Feature"===p,m=h?e.features.length:1,y=0;ys||d>l||p>u)return a=o,s=n,l=d,u=p,void(i=0);var h=Un.lineString([a,o],e.properties);if(!1===t(h,n,r,p,i))return!1;i++,a=o}))&&void 0}}}))}function Xn(e,t){if(!e)throw new Error("geojson is required");Yn(e,(function(e,n,r){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,n,r,0,0))return!1;break;case"Polygon":for(var a=0;ae[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2] line1 must only contain 2 coordinates");if(2!==r.length)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],a=n[1][0],s=n[1][1],u=r[0][0],c=r[0][1],f=r[1][0],d=r[1][1],p=(d-c)*(a-i)-(f-u)*(s-o);if(0===p)return null;var h=((f-u)*(o-c)-(d-c)*(i-u))/p,g=((a-i)*(o-c)-(s-o)*(i-u))/p;return h>=0&&h<=1&&g>=0&&g<=1?l([i+h*(a-i),o+h*(s-o)]):null}function pr(e,t,n){void 0===n&&(n={});var r=l([1/0,1/0],{dist:1/0}),i=0;return V(e,(function(e){for(var o=Q(e),a=0;a0&&((y=m.features[0]).properties.dist=yt(t,y,n),y.properties.location=i+yt(s,y,n)),s.properties.dist180?-360:i[0]-o[0]>180?360:0,M(function(e,t,r){var i=r=void 0===r?n:Number(r),o=e[1]*Math.PI/180,a=t[1]*Math.PI/180,s=a-o,l=Math.abs(t[0]-e[0])*Math.PI/180;l>Math.PI&&(l-=2*Math.PI);var u=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(u)>1e-11?s/u:Math.cos(o);return Math.sqrt(s*s+c*c*l*l)*i}(i,o),"meters",r.units)}function gr(e,t,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!e)throw new Error("pt is required");if(Array.isArray(e)?e=l(e):"Point"===e.type?e=a(e):ne(e,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=d(t):"LineString"===t.type?t=a(t):ne(t,"LineString","line");var r=1/0,i=e.geometry.coordinates;return W(t,(function(e){var t=e.geometry.coordinates[0],o=e.geometry.coordinates[1],a=function(e,t,n,r){var i=[n[0]-t[0],n[1]-t[1]],o=mr([e[0]-t[0],e[1]-t[1]],i);if(o<=0)return yr(e,t,{method:r.method,units:"degrees"});var a=mr(i,i);if(a<=o)return yr(e,n,{method:r.method,units:"degrees"});var s=o/a;return yr(e,[t[0]+s*i[0],t[1]+s*i[1]],{method:r.method,units:"degrees"})}(i,t,o,n);a=0&&u<=1&&(d.onLine1=!0),c>=0&&c<=1&&(d.onLine2=!0),!(!d.onLine1||!d.onLine2)&&[d.x,d.y])}function br(e){for(var t=function(e){return"FeatureCollection"!==e.type?"Feature"!==e.type?h([a(e)]):h([e]):e}(e),n=cn(t),r=!1,i=0;!r&&i0){t+=Math.abs(wr(e[0]));for(var n=1;n2){for(a=0;a=c&&f===i.length-1);f++){if(c>t&&0===o.length){if(!(a=t-c))return o.push(i[f]),d(o);s=un(i[f],i[f-1])-180,l=sn(i[f],a,s,r),o.push(l.geometry.coordinates)}if(c>=n)return(a=n-c)?(s=un(i[f],i[f-1])-180,l=sn(i[f],a,s,r),o.push(l.geometry.coordinates),d(o)):(o.push(i[f]),d(o));if(c>=t&&o.push(i[f]),f===i.length-1)return d(o);c+=yt(i[f],i[f+1],r)}if(ci)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(f)>=Math.abs(d)?f>0?s0?l=Math.abs(d)?f>0?s<=o&&o0?l<=a&&a=Math.abs(d)?f>0?s0?l=Math.abs(d)?f>0?s<=o&&o<=u:u<=o&&o<=s:d>0?l<=a&&a<=c:c<=a&&a<=l}function Cr(e,t){var n=ie(e),r=ie(t),i=n.type,o=r.type;switch(i){case"Point":switch(o){case"MultiPoint":return function(e,t){var n,r=!1;for(n=0;nt[0]||e[2]t[1]||e[3] is required");if("number"!=typeof n)throw new Error(" must be a number");if("number"!=typeof r)throw new Error(" must be a number");!1!==i&&void 0!==i||(e=JSON.parse(JSON.stringify(e)));var o=Math.pow(10,n);return R(e,(function(e){!function(e,t,n){e.length>n&&e.splice(n,e.length);for(var r=0;r=1||l<=0||u>=1||u<=0))){var g=h,m=!o[g];m&&(o[g]=!0),t?i.push(t(h,e,n,c,f,l,a,s,d,p,u,m)):i.push(h)}}function g(e,t){var n,i,o,a,s=r[e][t],l=r[e][t+1];return s[0]d[t.isect].coord?-1:1})),l=[];x.length>0;){var S=x.pop(),T=S.isect,C=S.parent,P=S.winding,k=l.length,L=[d[T].coord],R=T;if(d[T].ringAndEdge1Walkable)var D=d[T].ringAndEdge1,j=d[T].nxtIsectAlongRingAndEdge1;else D=d[T].ringAndEdge2,j=d[T].nxtIsectAlongRingAndEdge2;for(;!Vr(d[T].coord,d[j].coord);){L.push(d[j].coord);var I=void 0;for(r=0;r1)for(t=0;t=0==t}function Ur(e){for(var t=0,n=0;n1&&n.push(d(u)),h(n)}function Jr(e,t){if(!t.features.length)throw new Error("lines must contain features");if(1===t.features.length)return t.features[0];var n,r=1/0;return N(t,(function(t){var i=pr(t,e).properties.dist;ic&&p.push(sn(e,t,c,i).geometry.coordinates),d(p,l)}function ti(e){var t=e%360;return t<0&&(t+=360),t}function ni(e,t){void 0===t&&(t={});var n=ie(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),n.type){case"Polygon":return ri(n,t);case"MultiPolygon":return function(e,t){void 0===t&&(t={});var n=ie(e).coordinates,r=t.properties?t.properties:"Feature"===e.type?e.properties:{},i=[];return n.forEach((function(e){i.push(ii(e,r))})),h(i)}(n,t);default:throw new Error("invalid poly")}}function ri(e,t){return void 0===t&&(t={}),ii(ie(e).coordinates,t.properties?t.properties:"Feature"===e.type?e.properties:{})}function ii(e,t){return e.length>1?g(e,t):d(e[0],t)}function oi(e,t){var n,r,i;void 0===t&&(t={});var o=t.properties,a=null===(n=t.autoComplete)||void 0===n||n,s=null===(r=t.orderCoords)||void 0===r||r;switch(null!==(i=t.mutate)&&void 0!==i&&i||(e=xt(e)),e.type){case"FeatureCollection":var l=[];return e.features.forEach((function(e){l.push(Q(ai(e,{},a,s)))})),y(l,o);default:return ai(e,o,a,s)}}function ai(e,t,n,r){t=t||("Feature"===e.type?e.properties:{});var i=ie(e),o=i.coordinates,a=i.type;if(!o.length)throw new Error("line must contain coordinates");switch(a){case"LineString":return n&&(o=si(o)),c([o],t);case"MultiLineString":var s=[],l=0;return o.forEach((function(e){if(n&&(e=si(e)),r){var t=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.abs(t-r)*Math.abs(n-i)}($(d(e)));t>l?(s.unshift(e),l=t):s.push(e)}else s.push(e)})),c(s,t);default:throw new Error("geometry type "+a+" is not supported")}}function si(e){var t=e[0],n=t[0],r=t[1],i=e[e.length-1],o=i[0],a=i[1];return n===o&&r===a||e.push(t),e}function li(e,t){var n,r,i,o,a,s,l;for(r=1;r<=8;r*=2){for(n=[],o=!(ci(i=e[e.length-1],t)&r),a=0;at[2]&&(n|=2),e[1]t[3]&&(n|=8),n}function fi(e,t){for(var n=[],r=0,i=e;r0&&(o[0][0]===o[o.length-1][0]&&o[0][1]===o[o.length-1][1]||o.push(o[0]),o.length>=4&&n.push(o))}return n}Zr.prototype.interpolate=function(e){var t=Math.sin((1-e)*this.g)/Math.sin(this.g),n=Math.sin(e*this.g)/Math.sin(this.g),r=t*Math.cos(this.start.y)*Math.cos(this.start.x)+n*Math.cos(this.end.y)*Math.cos(this.end.x),i=t*Math.cos(this.start.y)*Math.sin(this.start.x)+n*Math.cos(this.end.y)*Math.sin(this.end.x),o=t*Math.sin(this.start.y)+n*Math.sin(this.end.y),a=qr*Math.atan2(o,Math.sqrt(Math.pow(r,2)+Math.pow(i,2)));return[qr*Math.atan2(i,r),a]},Zr.prototype.Arc=function(e,t){var n=[];if(!e||e<=2)n.push([this.start.lon,this.start.lat]),n.push([this.end.lon,this.end.lat]);else for(var r=1/(e-1),i=0;id&&(g>c&&hc&&gl&&(l=m)}var y=[];if(s&&l0&&Math.abs(_-n[b-1][0])>d){var A=parseFloat(n[b-1][0]),x=parseFloat(n[b-1][1]),w=parseFloat(n[b][0]),E=parseFloat(n[b][1]);if(A>-180&&A-180&&n[b-1][0]c&&A<180&&-180===w&&b+1c&&n[b-1][0]<180){v.push([180,n[b][1]]),b++,v.push([n[b][0],n[b][1]]);continue}if(Ac){var O=A;A=w,w=O;var M=x;x=E,E=M}if(A>c&&w=180&&Ac?180:-180,T]),(v=[]).push([n[b-1][0]>c?-180:180,T]),y.push(v)}else v=[],y.push(v);v.push([_,n[b][1]])}else v.push([n[b][0],n[b][1]])}}else{var C=[];y.push(C);for(var P=0;P=0;s--)if(u[s]!=c[s])return!1;for(s=u.length-1;s>=0;s--)if(l=u[s],!n(e[l],o[l],a))return!1;return typeof e==typeof o}(e,o,a))};function r(e){return null==e}function i(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}}));function gi(e,t,n){if(void 0===n&&(n={}),!C(n=n||{}))throw new Error("options is invalid");var r,i=n.tolerance||0,o=[],a=ur(),s=Bn(e);return a.load(s),W(t,(function(e){var t=!1;e&&(N(a.search(e),(function(n){if(!1===t){var o=Q(e).sort(),a=Q(n).sort();hi(o,a)||(0===i?Sr(o[0],n)&&Sr(o[1],n):pr(n,o[0]).properties.dist<=i&&pr(n,o[1]).properties.dist<=i)?(t=!0,r=r?mi(r,e):e):(0===i?Sr(a[0],e)&&Sr(a[1],e):pr(e,a[0]).properties.dist<=i&&pr(e,a[1]).properties.dist<=i)&&(r=r?mi(r,n):n)}})),!1===t&&r&&(o.push(r),r=void 0))})),r&&o.push(r),h(o)}function mi(e,t){var n=Q(t),r=Q(e),i=r[0],o=r[r.length-1],a=e.geometry.coordinates;return hi(n[0],i)?a.unshift(n[1]):hi(n[0],o)?a.push(n[1]):hi(n[1],i)?a.unshift(n[0]):hi(n[1],o)&&a.push(n[0]),e}function yi(e){var t=e%360;return t<0&&(t+=360),t}function vi(e,t,n){var r;return void 0===n&&(n={}),(r=n.final?bi(J(t),J(e)):bi(J(e),J(t)))>180?-(360-r):r}function bi(e,t){var n=O(e[1]),r=O(t[1]),i=O(t[0]-e[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(E(Math.atan2(i,o))+360)%360}function _i(e,t,r,i){void 0===i&&(i={});var o=t<0,a=M(Math.abs(t),i.units,"meters");o&&(a=-Math.abs(a));var s=J(e),u=function(e,t,r,i){var o=t/(i=void 0===i?n:Number(i)),a=e[0]*Math.PI/180,s=O(e[1]),l=O(r),u=o*Math.cos(l),c=s+u;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var f=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),d=Math.abs(f)>1e-11?u/f:Math.cos(s);return[(180*(a+o*Math.sin(l)/d)/Math.PI+540)%360-180,180*c/Math.PI]}(s,a,r);return u[0]+=u[0]-s[0]>180?-360:s[0]-u[0]>180?360:0,l(u,i.properties)}function Ai(e,t,n,r,i,o){for(var a=0;a0?wi(t,s,i)<0||(i=s):n>0&&r<=0&&(xi(t,s,o)||(o=s)),n=r}return[i,o]}function xi(e,t,n){return wi(e,t,n)>0}function wi(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])}function Ei(e){for(var t,n,r=Q(e),i=0,o=1;o0}function Oi(e,t){switch("Feature"===e.type?e.geometry.type:e.type){case"GeometryCollection":return B(e,(function(e){Oi(e,t)})),e;case"LineString":return Mi(Q(e),t),e;case"Polygon":return Si(Q(e),t),e;case"MultiLineString":return Q(e).forEach((function(e){Mi(e,t)})),e;case"MultiPolygon":return Q(e).forEach((function(e){Si(e,t)})),e;case"Point":case"MultiPoint":return e}}function Mi(e,t){Ei(e)===t&&e.reverse()}function Si(e,t){Ei(e[0])!==t&&e[0].reverse();for(var n=1;na?128:64,u|=fa?32:16,u|=da?8:4;var h=+(u|=pa?2:1),g=0;if(17===u||18===u||33===u||34===u||38===u||68===u||72===u||98===u||102===u||132===u||136===u||137===u||152===u||153===u){var m=(c+f+d+p)/4;g=m>a?2:m0?(u=156,g=4):u=152:33===u?g>0?(u=139,g=4):u=137:72===u?g>0?(u=99,g=4):u=98:132===u&&(g>0?(u=39,g=4):u=38)}if(0!=u&&170!=u){var y,v,b,_,A,x,w,E;y=v=b=_=A=x=w=E=.5;var O=[];1===u?(b=1-bo(t,d,p),E=1-bo(t,c,p),O.push(po[u])):169===u?(b=bo(a,p,d),E=bo(a,p,c),O.push(po[u])):4===u?(x=1-bo(t,f,d),_=bo(t,p,d),O.push(co[u])):166===u?(x=bo(a,d,f),_=1-bo(a,d,p),O.push(co[u])):16===u?(A=bo(t,d,f),v=bo(t,c,f),O.push(uo[u])):154===u?(A=1-bo(a,f,d),v=1-bo(a,f,c),O.push(uo[u])):64===u?(w=bo(t,p,c),y=1-bo(t,f,c),O.push(go[u])):106===u?(w=1-bo(a,c,p),y=bo(a,c,f),O.push(go[u])):168===u?(_=bo(a,p,d),b=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),O.push(fo[u]),O.push(po[u])):2===u?(_=1-bo(t,d,p),b=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),O.push(fo[u]),O.push(po[u])):162===u?(A=bo(a,d,f),x=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),O.push(fo[u]),O.push(po[u])):8===u?(A=1-bo(t,f,d),x=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),O.push(uo[u]),O.push(co[u])):138===u?(A=1-bo(t,f,d),x=1-bo(a,f,d),y=1-bo(a,f,c),v=1-bo(t,f,c),O.push(uo[u]),O.push(co[u])):32===u?(A=bo(a,d,f),x=bo(t,d,f),y=bo(t,c,f),v=bo(a,c,f),O.push(uo[u]),O.push(co[u])):42===u?(E=1-bo(a,c,p),w=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f),O.push(ho[u]),O.push(go[u])):128===u&&(E=bo(t,p,c),w=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c),O.push(ho[u]),O.push(go[u])),5===u?(x=1-bo(t,f,d),E=1-bo(t,c,p),O.push(co[u])):165===u?(x=bo(a,d,f),E=bo(a,p,c),O.push(co[u])):20===u?(_=bo(t,p,d),v=bo(t,c,f),O.push(fo[u])):150===u?(_=1-bo(a,d,p),v=1-bo(a,f,c),O.push(fo[u])):80===u?(A=bo(t,d,f),w=bo(t,p,c),O.push(uo[u])):90===u?(A=1-bo(a,f,d),w=1-bo(a,c,p),O.push(uo[u])):65===u?(b=1-bo(t,d,p),y=1-bo(t,f,c),O.push(po[u])):105===u?(b=bo(a,p,d),y=bo(a,c,f),O.push(po[u])):160===u?(A=bo(a,d,f),x=bo(t,d,f),E=bo(t,p,c),w=bo(a,p,c),O.push(uo[u]),O.push(co[u])):10===u?(A=1-bo(t,f,d),x=1-bo(a,f,d),E=1-bo(a,c,p),w=1-bo(t,c,p),O.push(uo[u]),O.push(co[u])):130===u?(_=1-bo(t,d,p),b=1-bo(a,d,p),y=1-bo(a,f,c),v=1-bo(t,f,c),O.push(fo[u]),O.push(po[u])):40===u?(_=bo(a,p,d),b=bo(t,p,d),y=bo(t,c,f),v=bo(a,c,f),O.push(fo[u]),O.push(po[u])):101===u?(x=bo(a,d,f),y=bo(a,c,f),O.push(co[u])):69===u?(x=1-bo(t,f,d),y=1-bo(t,f,c),O.push(co[u])):149===u?(E=bo(a,p,c),v=1-bo(a,f,c),O.push(ho[u])):21===u?(E=1-bo(t,c,p),v=bo(t,c,f),O.push(ho[u])):86===u?(_=1-bo(a,d,p),w=1-bo(a,c,p),O.push(fo[u])):84===u?(_=bo(t,p,d),w=bo(t,p,c),O.push(fo[u])):89===u?(A=1-bo(a,f,d),b=bo(a,p,d),O.push(po[u])):81===u?(A=bo(t,d,f),b=1-bo(t,d,p),O.push(po[u])):96===u?(A=bo(a,d,f),x=bo(t,d,f),w=bo(t,p,c),y=bo(a,c,f),O.push(uo[u]),O.push(co[u])):74===u?(A=1-bo(t,f,d),x=1-bo(a,f,d),w=1-bo(a,c,p),y=1-bo(t,f,c),O.push(uo[u]),O.push(co[u])):24===u?(A=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),v=bo(t,c,f),O.push(uo[u]),O.push(po[u])):146===u?(A=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),v=1-bo(a,f,c),O.push(uo[u]),O.push(po[u])):6===u?(x=1-bo(t,f,d),_=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),O.push(co[u]),O.push(fo[u])):164===u?(x=bo(a,d,f),_=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),O.push(co[u]),O.push(fo[u])):129===u?(b=1-bo(t,d,p),E=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c),O.push(po[u]),O.push(ho[u])):41===u?(b=bo(a,p,d),E=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f),O.push(po[u]),O.push(ho[u])):66===u?(_=1-bo(t,d,p),b=1-bo(a,d,p),w=1-bo(a,c,p),y=1-bo(t,f,c),O.push(fo[u]),O.push(po[u])):104===u?(_=bo(a,p,d),b=bo(t,p,d),w=bo(t,p,c),y=bo(a,c,f),O.push(po[u]),O.push(mo[u])):144===u?(A=bo(t,d,f),E=bo(t,p,c),w=bo(a,p,c),v=1-bo(a,f,c),O.push(uo[u]),O.push(go[u])):26===u?(A=1-bo(a,f,d),E=1-bo(a,c,p),w=1-bo(t,c,p),v=bo(t,c,f),O.push(uo[u]),O.push(go[u])):36===u?(x=bo(a,d,f),_=bo(t,p,d),y=bo(t,c,f),v=bo(a,c,f),O.push(co[u]),O.push(fo[u])):134===u?(x=1-bo(t,f,d),_=1-bo(a,d,p),y=1-bo(a,f,c),v=1-bo(t,f,c),O.push(co[u]),O.push(fo[u])):9===u?(A=1-bo(t,f,d),x=1-bo(a,f,d),b=bo(a,p,d),E=1-bo(t,c,p),O.push(uo[u]),O.push(co[u])):161===u?(A=bo(a,d,f),x=bo(t,d,f),b=1-bo(t,d,p),E=bo(a,p,c),O.push(uo[u]),O.push(co[u])):37===u?(x=bo(a,d,f),E=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f),O.push(co[u]),O.push(ho[u])):133===u?(x=1-bo(t,f,d),E=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c),O.push(co[u]),O.push(ho[u])):148===u?(_=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),v=1-bo(a,f,c),O.push(fo[u]),O.push(go[u])):22===u?(_=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),v=bo(t,c,f),O.push(fo[u]),O.push(go[u])):82===u?(A=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),w=1-bo(a,c,p),O.push(uo[u]),O.push(po[u])):88===u?(A=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),w=bo(t,p,c),O.push(uo[u]),O.push(po[u])):73===u?(A=1-bo(t,f,d),x=1-bo(a,f,d),b=bo(a,p,d),y=1-bo(t,f,c),O.push(uo[u]),O.push(co[u])):97===u?(A=bo(a,d,f),x=bo(t,d,f),b=1-bo(t,d,p),y=bo(a,c,f),O.push(uo[u]),O.push(co[u])):145===u?(A=bo(t,d,f),b=1-bo(t,d,p),E=bo(a,p,c),v=1-bo(a,f,c),O.push(uo[u]),O.push(ho[u])):25===u?(A=1-bo(a,f,d),b=bo(a,p,d),E=1-bo(t,c,p),v=bo(t,c,f),O.push(uo[u]),O.push(ho[u])):70===u?(x=1-bo(t,f,d),_=1-bo(a,d,p),w=1-bo(a,c,p),y=1-bo(t,f,c),O.push(co[u]),O.push(fo[u])):100===u?(x=bo(a,d,f),_=bo(t,p,d),w=bo(t,p,c),y=bo(a,c,f),O.push(co[u]),O.push(fo[u])):34===u?(0===g?(A=1-bo(t,f,d),x=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c)):(A=bo(a,d,f),x=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f)),O.push(uo[u]),O.push(co[u]),O.push(ho[u]),O.push(go[u])):35===u?(4===g?(A=1-bo(t,f,d),x=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c)):(A=bo(a,d,f),x=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f)),O.push(uo[u]),O.push(co[u]),O.push(po[u]),O.push(go[u])):136===u?(0===g?(A=bo(a,d,f),x=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f)):(A=1-bo(t,f,d),x=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c)),O.push(uo[u]),O.push(co[u]),O.push(ho[u]),O.push(go[u])):153===u?(0===g?(A=bo(t,d,f),b=1-bo(t,d,p),E=1-bo(t,c,p),v=bo(t,c,f)):(A=1-bo(a,f,d),b=bo(a,p,d),E=bo(a,p,c),v=1-bo(a,f,c)),O.push(uo[u]),O.push(po[u])):102===u?(0===g?(x=1-bo(t,f,d),_=bo(t,p,d),w=bo(t,p,c),y=1-bo(t,f,c)):(x=bo(a,d,f),_=1-bo(a,d,p),w=1-bo(a,c,p),y=bo(a,c,f)),O.push(co[u]),O.push(go[u])):155===u?(4===g?(A=bo(t,d,f),b=1-bo(t,d,p),E=1-bo(t,c,p),v=bo(t,c,f)):(A=1-bo(a,f,d),b=bo(a,p,d),E=bo(a,p,c),v=1-bo(a,f,c)),O.push(uo[u]),O.push(ho[u])):103===u?(4===g?(x=1-bo(t,f,d),_=bo(t,p,d),w=bo(t,p,c),y=1-bo(t,f,c)):(x=bo(a,d,f),_=1-bo(a,d,p),w=1-bo(a,c,p),y=bo(a,c,f)),O.push(co[u]),O.push(fo[u])):152===u?(0===g?(A=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),v=bo(t,c,f)):(A=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),v=1-bo(a,f,c)),O.push(uo[u]),O.push(fo[u]),O.push(po[u])):156===u?(4===g?(A=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),v=bo(t,c,f)):(A=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),v=1-bo(a,f,c)),O.push(uo[u]),O.push(po[u]),O.push(go[u])):137===u?(0===g?(A=bo(a,d,f),x=bo(t,d,f),b=1-bo(t,d,p),E=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f)):(A=1-bo(t,f,d),x=1-bo(a,f,d),b=bo(a,p,d),E=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c)),O.push(uo[u]),O.push(co[u]),O.push(po[u])):139===u?(4===g?(A=bo(a,d,f),x=bo(t,d,f),b=1-bo(t,d,p),E=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f)):(A=1-bo(t,f,d),x=1-bo(a,f,d),b=bo(a,p,d),E=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c)),O.push(uo[u]),O.push(co[u]),O.push(ho[u])):98===u?(0===g?(A=1-bo(t,f,d),x=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),w=bo(t,p,c),y=1-bo(t,f,c)):(A=bo(a,d,f),x=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),w=1-bo(a,c,p),y=bo(a,c,f)),O.push(uo[u]),O.push(co[u]),O.push(go[u])):99===u?(4===g?(A=1-bo(t,f,d),x=1-bo(a,f,d),_=bo(a,p,d),b=bo(t,p,d),w=bo(t,p,c),y=1-bo(t,f,c)):(A=bo(a,d,f),x=bo(t,d,f),_=1-bo(t,d,p),b=1-bo(a,d,p),w=1-bo(a,c,p),y=bo(a,c,f)),O.push(uo[u]),O.push(co[u]),O.push(po[u])):38===u?(0===g?(x=1-bo(t,f,d),_=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c)):(x=bo(a,d,f),_=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f)),O.push(co[u]),O.push(ho[u]),O.push(go[u])):39===u?(4===g?(x=1-bo(t,f,d),_=bo(t,p,d),E=bo(t,p,c),w=bo(a,p,c),y=1-bo(a,f,c),v=1-bo(t,f,c)):(x=bo(a,d,f),_=1-bo(a,d,p),E=1-bo(a,c,p),w=1-bo(t,c,p),y=bo(t,c,f),v=bo(a,c,f)),O.push(co[u]),O.push(fo[u]),O.push(go[u])):85===u&&(A=1,x=0,_=1,b=0,E=0,w=1,y=0,v=1),(y<0||y>1||v<0||v>1||A<0||A>1||_<0||_>1||E<0||E>1||w<0||w>1)&&console.log("MarchingSquaresJS-isoBands: "+u+" "+h+" "+c+","+f+","+d+","+p+" "+g+" "+y+" "+v+" "+A+" "+x+" "+_+" "+b+" "+E+" "+w),o.cells[s][l]={cval:u,cval_real:h,flipped:g,topleft:y,topright:v,righttop:A,rightbottom:x,bottomright:_,bottomleft:b,leftbottom:E,lefttop:w,edges:O}}}}}return o}(e,t,n);return Ci.polygons?(Ci.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),l=function(e){var t=[],n=0;return e.cells.forEach((function(e,r){e.forEach((function(e,i){if(void 0!==e){var o=vo[e.cval](e);"object"==typeof o&&_o(o)?"object"==typeof o[0]&&_o(o[0])?"object"==typeof o[0][0]&&_o(o[0][0])?o.forEach((function(e){e.forEach((function(e){e[0]+=i,e[1]+=r})),t[n++]=e})):(o.forEach((function(e){e[0]+=i,e[1]+=r})),t[n++]=o):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}}))})),t}(u)):(Ci.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),l=function(e){for(var t=[],n=e.rows,r=e.cols,i=[],o=0;o0){var s=xo(e.cells[o][a]),l=null,u=a,c=o;null!==s&&i.push([s.p[0]+u,s.p[1]+c]);do{if(null===(l=wo(e.cells[c][u],s.x,s.y,s.o)))break;if(i.push([l.p[0]+u,l.p[1]+c]),u+=l.x,s=l,(c+=l.y)<0||c>=n||u<0||u>=r||void 0===e.cells[c][u]){var f=Ao(e,u-=l.x,c-=l.y,l.x,l.y,l.o);if(null===f)break;f.path.forEach((function(e){i.push(e)})),u=f.i,c=f.j,s=f}}while(void 0!==e.cells[c][u]&&e.cells[c][u].edges.length>0);t.push(i),i=[],e.cells[o][a].edges.length>0&&a--}return t}(u)),"function"==typeof Ci.successCallback&&Ci.successCallback(l),l}var ki=[],Li=[],Ri=[],Di=[],ji=[],Ii=[],Ni=[],Fi=[],zi=[],Bi=[],Ui=[],Vi=[],Hi=[],Wi=[],qi=[],Yi=[],Gi=[],Xi=[],Zi=[],Ki=[],$i=[],Ji=[],Qi=[],eo=[];Ni[85]=Bi[85]=-1,Fi[85]=Ui[85]=0,zi[85]=Vi[85]=1,Zi[85]=Ji[85]=1,Ki[85]=Qi[85]=0,$i[85]=eo[85]=1,ki[85]=Di[85]=0,Li[85]=ji[85]=-1,Ri[85]=qi[85]=0,Yi[85]=Hi[85]=0,Gi[85]=Wi[85]=1,Ii[85]=Xi[85]=1,Ji[1]=Ji[169]=0,Qi[1]=Qi[169]=-1,eo[1]=eo[169]=0,Hi[1]=Hi[169]=-1,Wi[1]=Wi[169]=0,qi[1]=qi[169]=0,Bi[4]=Bi[166]=0,Ui[4]=Ui[166]=-1,Vi[4]=Vi[166]=1,Yi[4]=Yi[166]=1,Gi[4]=Gi[166]=0,Xi[4]=Xi[166]=0,Ni[16]=Ni[154]=0,Fi[16]=Fi[154]=1,zi[16]=zi[154]=1,Di[16]=Di[154]=1,ji[16]=ji[154]=0,Ii[16]=Ii[154]=1,Zi[64]=Zi[106]=0,Ki[64]=Ki[106]=1,$i[64]=$i[106]=0,ki[64]=ki[106]=-1,Li[64]=Li[106]=0,Ri[64]=Ri[106]=1,Zi[2]=Zi[168]=0,Ki[2]=Ki[168]=-1,$i[2]=$i[168]=1,Ji[2]=Ji[168]=0,Qi[2]=Qi[168]=-1,eo[2]=eo[168]=0,Hi[2]=Hi[168]=-1,Wi[2]=Wi[168]=0,qi[2]=qi[168]=0,Yi[2]=Yi[168]=-1,Gi[2]=Gi[168]=0,Xi[2]=Xi[168]=1,Ni[8]=Ni[162]=0,Fi[8]=Fi[162]=-1,zi[8]=zi[162]=0,Bi[8]=Bi[162]=0,Ui[8]=Ui[162]=-1,Vi[8]=Vi[162]=1,Hi[8]=Hi[162]=1,Wi[8]=Wi[162]=0,qi[8]=qi[162]=1,Yi[8]=Yi[162]=1,Gi[8]=Gi[162]=0,Xi[8]=Xi[162]=0,Ni[32]=Ni[138]=0,Fi[32]=Fi[138]=1,zi[32]=zi[138]=1,Bi[32]=Bi[138]=0,Ui[32]=Ui[138]=1,Vi[32]=Vi[138]=0,ki[32]=ki[138]=1,Li[32]=Li[138]=0,Ri[32]=Ri[138]=0,Di[32]=Di[138]=1,ji[32]=ji[138]=0,Ii[32]=Ii[138]=1,Ji[128]=Ji[42]=0,Qi[128]=Qi[42]=1,eo[128]=eo[42]=1,Zi[128]=Zi[42]=0,Ki[128]=Ki[42]=1,$i[128]=$i[42]=0,ki[128]=ki[42]=-1,Li[128]=Li[42]=0,Ri[128]=Ri[42]=1,Di[128]=Di[42]=-1,ji[128]=ji[42]=0,Ii[128]=Ii[42]=0,Bi[5]=Bi[165]=-1,Ui[5]=Ui[165]=0,Vi[5]=Vi[165]=0,Ji[5]=Ji[165]=1,Qi[5]=Qi[165]=0,eo[5]=eo[165]=0,Yi[20]=Yi[150]=0,Gi[20]=Gi[150]=1,Xi[20]=Xi[150]=1,Di[20]=Di[150]=0,ji[20]=ji[150]=-1,Ii[20]=Ii[150]=1,Ni[80]=Ni[90]=-1,Fi[80]=Fi[90]=0,zi[80]=zi[90]=1,Zi[80]=Zi[90]=1,Ki[80]=Ki[90]=0,$i[80]=$i[90]=1,Hi[65]=Hi[105]=0,Wi[65]=Wi[105]=1,qi[65]=qi[105]=0,ki[65]=ki[105]=0,Li[65]=Li[105]=-1,Ri[65]=Ri[105]=0,Ni[160]=Ni[10]=-1,Fi[160]=Fi[10]=0,zi[160]=zi[10]=1,Bi[160]=Bi[10]=-1,Ui[160]=Ui[10]=0,Vi[160]=Vi[10]=0,Ji[160]=Ji[10]=1,Qi[160]=Qi[10]=0,eo[160]=eo[10]=0,Zi[160]=Zi[10]=1,Ki[160]=Ki[10]=0,$i[160]=$i[10]=1,Yi[130]=Yi[40]=0,Gi[130]=Gi[40]=1,Xi[130]=Xi[40]=1,Hi[130]=Hi[40]=0,Wi[130]=Wi[40]=1,qi[130]=qi[40]=0,ki[130]=ki[40]=0,Li[130]=Li[40]=-1,Ri[130]=Ri[40]=0,Di[130]=Di[40]=0,ji[130]=ji[40]=-1,Ii[130]=Ii[40]=1,Bi[37]=Bi[133]=0,Ui[37]=Ui[133]=1,Vi[37]=Vi[133]=1,Ji[37]=Ji[133]=0,Qi[37]=Qi[133]=1,eo[37]=eo[133]=0,ki[37]=ki[133]=-1,Li[37]=Li[133]=0,Ri[37]=Ri[133]=0,Di[37]=Di[133]=1,ji[37]=ji[133]=0,Ii[37]=Ii[133]=0,Yi[148]=Yi[22]=-1,Gi[148]=Gi[22]=0,Xi[148]=Xi[22]=0,Ji[148]=Ji[22]=0,Qi[148]=Qi[22]=-1,eo[148]=eo[22]=1,Zi[148]=Zi[22]=0,Ki[148]=Ki[22]=1,$i[148]=$i[22]=1,Di[148]=Di[22]=-1,ji[148]=ji[22]=0,Ii[148]=Ii[22]=1,Ni[82]=Ni[88]=0,Fi[82]=Fi[88]=-1,zi[82]=zi[88]=1,Yi[82]=Yi[88]=1,Gi[82]=Gi[88]=0,Xi[82]=Xi[88]=1,Hi[82]=Hi[88]=-1,Wi[82]=Wi[88]=0,qi[82]=qi[88]=1,Zi[82]=Zi[88]=0,Ki[82]=Ki[88]=-1,$i[82]=$i[88]=0,Ni[73]=Ni[97]=0,Fi[73]=Fi[97]=1,zi[73]=zi[97]=0,Bi[73]=Bi[97]=0,Ui[73]=Ui[97]=-1,Vi[73]=Vi[97]=0,Hi[73]=Hi[97]=1,Wi[73]=Wi[97]=0,qi[73]=qi[97]=0,ki[73]=ki[97]=1,Li[73]=Li[97]=0,Ri[73]=Ri[97]=1,Ni[145]=Ni[25]=0,Fi[145]=Fi[25]=-1,zi[145]=zi[25]=0,Hi[145]=Hi[25]=1,Wi[145]=Wi[25]=0,qi[145]=qi[25]=1,Ji[145]=Ji[25]=0,Qi[145]=Qi[25]=1,eo[145]=eo[25]=1,Di[145]=Di[25]=-1,ji[145]=ji[25]=0,Ii[145]=Ii[25]=0,Bi[70]=Bi[100]=0,Ui[70]=Ui[100]=1,Vi[70]=Vi[100]=0,Yi[70]=Yi[100]=-1,Gi[70]=Gi[100]=0,Xi[70]=Xi[100]=1,Zi[70]=Zi[100]=0,Ki[70]=Ki[100]=-1,$i[70]=$i[100]=1,ki[70]=ki[100]=1,Li[70]=Li[100]=0,Ri[70]=Ri[100]=0,Bi[101]=Bi[69]=0,Ui[101]=Ui[69]=1,Vi[101]=Vi[69]=0,ki[101]=ki[69]=1,Li[101]=Li[69]=0,Ri[101]=Ri[69]=0,Ji[149]=Ji[21]=0,Qi[149]=Qi[21]=1,eo[149]=eo[21]=1,Di[149]=Di[21]=-1,ji[149]=ji[21]=0,Ii[149]=Ii[21]=0,Yi[86]=Yi[84]=-1,Gi[86]=Gi[84]=0,Xi[86]=Xi[84]=1,Zi[86]=Zi[84]=0,Ki[86]=Ki[84]=-1,$i[86]=$i[84]=1,Ni[89]=Ni[81]=0,Fi[89]=Fi[81]=-1,zi[89]=zi[81]=0,Hi[89]=Hi[81]=1,Wi[89]=Wi[81]=0,qi[89]=qi[81]=1,Ni[96]=Ni[74]=0,Fi[96]=Fi[74]=1,zi[96]=zi[74]=0,Bi[96]=Bi[74]=-1,Ui[96]=Ui[74]=0,Vi[96]=Vi[74]=1,Zi[96]=Zi[74]=1,Ki[96]=Ki[74]=0,$i[96]=$i[74]=0,ki[96]=ki[74]=1,Li[96]=Li[74]=0,Ri[96]=Ri[74]=1,Ni[24]=Ni[146]=0,Fi[24]=Fi[146]=-1,zi[24]=zi[146]=1,Yi[24]=Yi[146]=1,Gi[24]=Gi[146]=0,Xi[24]=Xi[146]=1,Hi[24]=Hi[146]=0,Wi[24]=Wi[146]=1,qi[24]=qi[146]=1,Di[24]=Di[146]=0,ji[24]=ji[146]=-1,Ii[24]=Ii[146]=0,Bi[6]=Bi[164]=-1,Ui[6]=Ui[164]=0,Vi[6]=Vi[164]=1,Yi[6]=Yi[164]=-1,Gi[6]=Gi[164]=0,Xi[6]=Xi[164]=0,Ji[6]=Ji[164]=0,Qi[6]=Qi[164]=-1,eo[6]=eo[164]=1,Zi[6]=Zi[164]=1,Ki[6]=Ki[164]=0,$i[6]=$i[164]=0,Hi[129]=Hi[41]=0,Wi[129]=Wi[41]=1,qi[129]=qi[41]=1,Ji[129]=Ji[41]=0,Qi[129]=Qi[41]=1,eo[129]=eo[41]=0,ki[129]=ki[41]=-1,Li[129]=Li[41]=0,Ri[129]=Ri[41]=0,Di[129]=Di[41]=0,ji[129]=ji[41]=-1,Ii[129]=Ii[41]=0,Yi[66]=Yi[104]=0,Gi[66]=Gi[104]=1,Xi[66]=Xi[104]=0,Hi[66]=Hi[104]=-1,Wi[66]=Wi[104]=0,qi[66]=qi[104]=1,Zi[66]=Zi[104]=0,Ki[66]=Ki[104]=-1,$i[66]=$i[104]=0,ki[66]=ki[104]=0,Li[66]=Li[104]=-1,Ri[66]=Ri[104]=1,Ni[144]=Ni[26]=-1,Fi[144]=Fi[26]=0,zi[144]=zi[26]=0,Ji[144]=Ji[26]=1,Qi[144]=Qi[26]=0,eo[144]=eo[26]=1,Zi[144]=Zi[26]=0,Ki[144]=Ki[26]=1,$i[144]=$i[26]=1,Di[144]=Di[26]=-1,ji[144]=ji[26]=0,Ii[144]=Ii[26]=1,Bi[36]=Bi[134]=0,Ui[36]=Ui[134]=1,Vi[36]=Vi[134]=1,Yi[36]=Yi[134]=0,Gi[36]=Gi[134]=1,Xi[36]=Xi[134]=0,ki[36]=ki[134]=0,Li[36]=Li[134]=-1,Ri[36]=Ri[134]=1,Di[36]=Di[134]=1,ji[36]=ji[134]=0,Ii[36]=Ii[134]=0,Ni[9]=Ni[161]=-1,Fi[9]=Fi[161]=0,zi[9]=zi[161]=0,Bi[9]=Bi[161]=0,Ui[9]=Ui[161]=-1,Vi[9]=Vi[161]=0,Hi[9]=Hi[161]=1,Wi[9]=Wi[161]=0,qi[9]=qi[161]=0,Ji[9]=Ji[161]=1,Qi[9]=Qi[161]=0,eo[9]=eo[161]=1,Ni[136]=0,Fi[136]=1,zi[136]=1,Bi[136]=0,Ui[136]=1,Vi[136]=0,Yi[136]=-1,Gi[136]=0,Xi[136]=1,Hi[136]=-1,Wi[136]=0,qi[136]=0,Ji[136]=0,Qi[136]=-1,eo[136]=0,Zi[136]=0,Ki[136]=-1,$i[136]=1,ki[136]=1,Li[136]=0,Ri[136]=0,Di[136]=1,ji[136]=0,Ii[136]=1,Ni[34]=0,Fi[34]=-1,zi[34]=0,Bi[34]=0,Ui[34]=-1,Vi[34]=1,Yi[34]=1,Gi[34]=0,Xi[34]=0,Hi[34]=1,Wi[34]=0,qi[34]=1,Ji[34]=0,Qi[34]=1,eo[34]=1,Zi[34]=0,Ki[34]=1,$i[34]=0,ki[34]=-1,Li[34]=0,Ri[34]=1,Di[34]=-1,ji[34]=0,Ii[34]=0,Ni[35]=0,Fi[35]=1,zi[35]=1,Bi[35]=0,Ui[35]=-1,Vi[35]=1,Yi[35]=1,Gi[35]=0,Xi[35]=0,Hi[35]=-1,Wi[35]=0,qi[35]=0,Ji[35]=0,Qi[35]=-1,eo[35]=0,Zi[35]=0,Ki[35]=1,$i[35]=0,ki[35]=-1,Li[35]=0,Ri[35]=1,Di[35]=1,ji[35]=0,Ii[35]=1,Ni[153]=0,Fi[153]=1,zi[153]=1,Hi[153]=-1,Wi[153]=0,qi[153]=0,Ji[153]=0,Qi[153]=-1,eo[153]=0,Di[153]=1,ji[153]=0,Ii[153]=1,Bi[102]=0,Ui[102]=-1,Vi[102]=1,Yi[102]=1,Gi[102]=0,Xi[102]=0,Zi[102]=0,Ki[102]=1,$i[102]=0,ki[102]=-1,Li[102]=0,Ri[102]=1,Ni[155]=0,Fi[155]=-1,zi[155]=0,Hi[155]=1,Wi[155]=0,qi[155]=1,Ji[155]=0,Qi[155]=1,eo[155]=1,Di[155]=-1,ji[155]=0,Ii[155]=0,Bi[103]=0,Ui[103]=1,Vi[103]=0,Yi[103]=-1,Gi[103]=0,Xi[103]=1,Zi[103]=0,Ki[103]=-1,$i[103]=1,ki[103]=1,Li[103]=0,Ri[103]=0,Ni[152]=0,Fi[152]=1,zi[152]=1,Yi[152]=-1,Gi[152]=0,Xi[152]=1,Hi[152]=-1,Wi[152]=0,qi[152]=0,Ji[152]=0,Qi[152]=-1,eo[152]=0,Zi[152]=0,Ki[152]=-1,$i[152]=1,Di[152]=1,ji[152]=0,Ii[152]=1,Ni[156]=0,Fi[156]=-1,zi[156]=1,Yi[156]=1,Gi[156]=0,Xi[156]=1,Hi[156]=-1,Wi[156]=0,qi[156]=0,Ji[156]=0,Qi[156]=-1,eo[156]=0,Zi[156]=0,Ki[156]=1,$i[156]=1,Di[156]=-1,ji[156]=0,Ii[156]=1,Ni[137]=0,Fi[137]=1,zi[137]=1,Bi[137]=0,Ui[137]=1,Vi[137]=0,Hi[137]=-1,Wi[137]=0,qi[137]=0,Ji[137]=0,Qi[137]=-1,eo[137]=0,ki[137]=1,Li[137]=0,Ri[137]=0,Di[137]=1,ji[137]=0,Ii[137]=1,Ni[139]=0,Fi[139]=1,zi[139]=1,Bi[139]=0,Ui[139]=-1,Vi[139]=0,Hi[139]=1,Wi[139]=0,qi[139]=0,Ji[139]=0,Qi[139]=1,eo[139]=0,ki[139]=-1,Li[139]=0,Ri[139]=0,Di[139]=1,ji[139]=0,Ii[139]=1,Ni[98]=0,Fi[98]=-1,zi[98]=0,Bi[98]=0,Ui[98]=-1,Vi[98]=1,Yi[98]=1,Gi[98]=0,Xi[98]=0,Hi[98]=1,Wi[98]=0,qi[98]=1,Zi[98]=0,Ki[98]=1,$i[98]=0,ki[98]=-1,Li[98]=0,Ri[98]=1,Ni[99]=0,Fi[99]=1,zi[99]=0,Bi[99]=0,Ui[99]=-1,Vi[99]=1,Yi[99]=1,Gi[99]=0,Xi[99]=0,Hi[99]=-1,Wi[99]=0,qi[99]=1,Zi[99]=0,Ki[99]=-1,$i[99]=0,ki[99]=1,Li[99]=0,Ri[99]=1,Bi[38]=0,Ui[38]=-1,Vi[38]=1,Yi[38]=1,Gi[38]=0,Xi[38]=0,Ji[38]=0,Qi[38]=1,eo[38]=1,Zi[38]=0,Ki[38]=1,$i[38]=0,ki[38]=-1,Li[38]=0,Ri[38]=1,Di[38]=-1,ji[38]=0,Ii[38]=0,Bi[39]=0,Ui[39]=1,Vi[39]=1,Yi[39]=-1,Gi[39]=0,Xi[39]=0,Ji[39]=0,Qi[39]=-1,eo[39]=1,Zi[39]=0,Ki[39]=1,$i[39]=0,ki[39]=-1,Li[39]=0,Ri[39]=1,Di[39]=1,ji[39]=0,Ii[39]=0;var to=function(e){return[[e.bottomleft,0],[0,0],[0,e.leftbottom]]},no=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0]]},ro=function(e){return[[e.topright,1],[1,1],[1,e.righttop]]},io=function(e){return[[0,e.lefttop],[0,1],[e.topleft,1]]},oo=function(e){return[[e.bottomright,0],[e.bottomleft,0],[0,e.leftbottom],[0,e.lefttop]]},ao=function(e){return[[e.bottomright,0],[e.bottomleft,0],[1,e.righttop],[1,e.rightbottom]]},so=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.topleft,1],[e.topright,1]]},lo=function(e){return[[0,e.leftbottom],[0,e.lefttop],[e.topleft,1],[e.topright,1]]},uo=[],co=[],fo=[],po=[],ho=[],go=[],mo=[],yo=[];po[1]=ho[1]=18,po[169]=ho[169]=18,fo[4]=co[4]=12,fo[166]=co[166]=12,uo[16]=yo[16]=4,uo[154]=yo[154]=4,go[64]=mo[64]=22,go[106]=mo[106]=22,fo[2]=go[2]=17,po[2]=ho[2]=18,fo[168]=go[168]=17,po[168]=ho[168]=18,uo[8]=po[8]=9,co[8]=fo[8]=12,uo[162]=po[162]=9,co[162]=fo[162]=12,uo[32]=yo[32]=4,co[32]=mo[32]=1,uo[138]=yo[138]=4,co[138]=mo[138]=1,ho[128]=yo[128]=21,go[128]=mo[128]=22,ho[42]=yo[42]=21,go[42]=mo[42]=22,co[5]=ho[5]=14,co[165]=ho[165]=14,fo[20]=yo[20]=6,fo[150]=yo[150]=6,uo[80]=go[80]=11,uo[90]=go[90]=11,po[65]=mo[65]=3,po[105]=mo[105]=3,uo[160]=go[160]=11,co[160]=ho[160]=14,uo[10]=go[10]=11,co[10]=ho[10]=14,fo[130]=yo[130]=6,po[130]=mo[130]=3,fo[40]=yo[40]=6,po[40]=mo[40]=3,co[101]=mo[101]=1,co[69]=mo[69]=1,ho[149]=yo[149]=21,ho[21]=yo[21]=21,fo[86]=go[86]=17,fo[84]=go[84]=17,uo[89]=po[89]=9,uo[81]=po[81]=9,uo[96]=mo[96]=0,co[96]=go[96]=15,uo[74]=mo[74]=0,co[74]=go[74]=15,uo[24]=fo[24]=8,po[24]=yo[24]=7,uo[146]=fo[146]=8,po[146]=yo[146]=7,co[6]=go[6]=15,fo[6]=ho[6]=16,co[164]=go[164]=15,fo[164]=ho[164]=16,po[129]=yo[129]=7,ho[129]=mo[129]=20,po[41]=yo[41]=7,ho[41]=mo[41]=20,fo[66]=mo[66]=2,po[66]=go[66]=19,fo[104]=mo[104]=2,po[104]=go[104]=19,uo[144]=ho[144]=10,go[144]=yo[144]=23,uo[26]=ho[26]=10,go[26]=yo[26]=23,co[36]=yo[36]=5,fo[36]=mo[36]=2,co[134]=yo[134]=5,fo[134]=mo[134]=2,uo[9]=ho[9]=10,co[9]=po[9]=13,uo[161]=ho[161]=10,co[161]=po[161]=13,co[37]=yo[37]=5,ho[37]=mo[37]=20,co[133]=yo[133]=5,ho[133]=mo[133]=20,fo[148]=ho[148]=16,go[148]=yo[148]=23,fo[22]=ho[22]=16,go[22]=yo[22]=23,uo[82]=fo[82]=8,po[82]=go[82]=19,uo[88]=fo[88]=8,po[88]=go[88]=19,uo[73]=mo[73]=0,co[73]=po[73]=13,uo[97]=mo[97]=0,co[97]=po[97]=13,uo[145]=po[145]=9,ho[145]=yo[145]=21,uo[25]=po[25]=9,ho[25]=yo[25]=21,co[70]=mo[70]=1,fo[70]=go[70]=17,co[100]=mo[100]=1,fo[100]=go[100]=17,uo[34]=po[34]=9,co[34]=fo[34]=12,ho[34]=yo[34]=21,go[34]=mo[34]=22,uo[136]=yo[136]=4,co[136]=mo[136]=1,fo[136]=go[136]=17,po[136]=ho[136]=18,uo[35]=yo[35]=4,co[35]=fo[35]=12,po[35]=ho[35]=18,go[35]=mo[35]=22,uo[153]=yo[153]=4,po[153]=ho[153]=18,co[102]=fo[102]=12,go[102]=mo[102]=22,uo[155]=po[155]=9,ho[155]=yo[155]=23,co[103]=mo[103]=1,fo[103]=go[103]=17,uo[152]=yo[152]=4,fo[152]=go[152]=17,po[152]=ho[152]=18,uo[156]=fo[156]=8,po[156]=ho[156]=18,go[156]=yo[156]=23,uo[137]=yo[137]=4,co[137]=mo[137]=1,po[137]=ho[137]=18,uo[139]=yo[139]=4,co[139]=po[139]=13,ho[139]=mo[139]=20,uo[98]=po[98]=9,co[98]=fo[98]=12,go[98]=mo[98]=22,uo[99]=mo[99]=0,co[99]=fo[99]=12,po[99]=go[99]=19,co[38]=fo[38]=12,ho[38]=yo[38]=21,go[38]=mo[38]=22,co[39]=yo[39]=5,fo[39]=ho[39]=16,go[39]=mo[39]=22;var vo=[];function bo(e,t,n){return(e-t)/(n-t)}function _o(e){return e.constructor.toString().indexOf("Array")>-1}function Ao(e,t,n,r,i,o){for(var a=e.cells[n][t],s=a.cval_real,l=t+r,u=n+i,c=[],f=!1;!f;){if(void 0===e.cells[u]||void 0===e.cells[u][l])if(u-=i,l-=r,s=(a=e.cells[u][l]).cval_real,-1===i)if(0===o)if(1&s)c.push([l,u]),r=-1,i=0,o=0;else{if(!(4&s)){c.push([l+a.bottomright,u]),r=0,i=1,o=1,f=!0;break}c.push([l+1,u]),r=1,i=0,o=0}else{if(!(1&s)){if(4&s){c.push([l+a.bottomright,u]),r=0,i=1,o=1,f=!0;break}c.push([l+a.bottomleft,u]),r=0,i=1,o=0,f=!0;break}c.push([l,u]),r=-1,i=0,o=0}else if(1===i)if(0===o){if(!(16&s)){if(64&s){c.push([l+a.topleft,u+1]),r=0,i=-1,o=0,f=!0;break}c.push([l+a.topright,u+1]),r=0,i=-1,o=1,f=!0;break}c.push([l+1,u+1]),r=1,i=0,o=1}else c.push([l+1,u+1]),r=1,i=0,o=1;else if(-1===r)if(0===o){if(!(64&s)){if(1&s){c.push([l,u+a.leftbottom]),r=1,i=0,o=0,f=!0;break}c.push([l,u+a.lefttop]),r=1,i=0,o=1,f=!0;break}c.push([l,u+1]),r=0,i=1,o=0}else{if(!(64&s)){console.log("MarchingSquaresJS-isoBands: wtf");break}c.push([l,u+1]),r=0,i=1,o=0}else{if(1!==r){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(0===o){if(!(4&s)){c.push([l+1,u+a.rightbottom]),r=-1,i=0,o=0,f=!0;break}c.push([l+1,u]),r=0,i=-1,o=1}else{if(!(4&s)){if(16&s){c.push([l+1,u+a.righttop]),r=-1,i=0,o=1;break}c.push([l+1,u+a.rightbottom]),r=-1,i=0,o=0,f=!0;break}c.push([l+1,u]),r=0,i=-1,o=1}}else if(s=(a=e.cells[u][l]).cval_real,-1===r)if(0===o)if(void 0!==e.cells[u-1]&&void 0!==e.cells[u-1][l])r=0,i=-1,o=1;else{if(!(1&s)){c.push([l+a.bottomright,u]),r=0,i=1,o=1,f=!0;break}c.push([l,u])}else{if(!(64&s)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+l+","+u);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(1===r){if(0===o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==e.cells[u+1]&&void 0!==e.cells[u+1][l])r=0,i=1,o=0;else{if(!(16&s)){c.push([l+a.topleft,u+1]),r=0,i=-1,o=0,f=!0;break}c.push([l+1,u+1]),r=1,i=0,o=1}}else if(-1===i){if(1!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==e.cells[u][l+1])r=1,i=0,o=1;else{if(!(4&s)){c.push([l+1,u+a.righttop]),r=-1,i=0,o=1,f=!0;break}c.push([l+1,u]),r=0,i=-1,o=1}}else{if(1!==i){console.log("MarchingSquaresJS-isoBands: where did we came from???");break}if(0!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==e.cells[u][l-1])r=-1,i=0,o=0;else{if(!(64&s)){c.push([l,u+a.leftbottom]),r=1,i=0,o=0,f=!0;break}c.push([l,u+1]),r=0,i=1,o=0}}if(u+=i,(l+=r)===t&&u===n)break}return{path:c,i:l,j:u,x:r,y:i,o:o}}function xo(e){if(e.edges.length>0){var t=e.edges[e.edges.length-1],n=e.cval_real;switch(t){case 0:return 16&n?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 1:return 4&n?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 2:return 4&n?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 3:return 1&n?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 4:return 16&n?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 5:return 4&n?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 6:return 4&n?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 7:return 1&n?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 8:return 4&n?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[1,e.righttop],x:-1,y:0,o:1};case 9:return 1&n?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 10:return 1&n?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.righttop],x:-1,y:0,o:1};case 11:return 64&n?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 12:return 4&n?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 13:return 1&n?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 14:return 1&n?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 15:return 64&n?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 16:return 4&n?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 17:return 64&n?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 18:return 1&n?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 19:return 64&n?{p:[e.bottomleft,0],x:0,y:1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 20:return 64&n?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 21:return 16&n?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.topright,1],x:0,y:-1,o:1};case 22:return 64&n?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 23:return 16&n?{p:[0,e.lefttop],x:1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(e)}}return null}function wo(e,t,n,r){var i,o,a,s,l,u=e.cval;switch(t){case-1:switch(r){case 0:i=co[u],a=Bi[u],s=Ui[u],l=Vi[u];break;default:i=uo[u],a=Ni[u],s=Fi[u],l=zi[u]}break;case 1:switch(r){case 0:i=ho[u],a=Ji[u],s=Qi[u],l=eo[u];break;default:i=go[u],a=Zi[u],s=Ki[u],l=$i[u]}break;default:switch(n){case-1:switch(r){case 0:i=mo[u],a=ki[u],s=Li[u],l=Ri[u];break;default:i=yo[u],a=Di[u],s=ji[u],l=Ii[u]}break;case 1:switch(r){case 0:i=po[u],a=Hi[u],s=Wi[u],l=qi[u];break;default:i=fo[u],a=Yi[u],s=Gi[u],l=Xi[u]}}}if(o=e.edges.indexOf(i),void 0===e.edges[o])return null;switch(function(e,t){delete e.edges[t];for(var n=t+1;n0){var s=r[t-1],l=function(e,t){return!function(e,t){return 0===Lo(ko(e),ko(t))}(e,t)&&function(e,t){var n,r,i=e[0],o=ko(e),a=t[0],s=ko(t),l=Lo(o,s);return function(e,t){return[e[0]+t[0],e[1]+t[1]]}(i,function(e,t){return[e*t[0],e*t[1]]}(Lo((r=i,[(n=a)[0]-r[0],n[1]-r[1]]),s)/l,o))}(e,t)}(n,s);!1!==l&&(s[1]=l,n[0]=l),a.push(s[0]),t===o.length-2&&(a.push(n[0]),a.push(n[1]))}2===o.length&&(a.push(n[0]),a.push(n[1]))}var u,c,f,d,p,h})),d(a,e.properties)}function Do(e,t,n){var r=t[0]-e[0],i=t[1]-e[1],o=n[0]-t[0];return function(e){return(e>0)-(e<0)||+e}(r*(n[1]-t[1])-o*i)}function jo(e,t){return t.geometry.coordinates[0].every((function(t){return ht(l(t),e)}))}vo[1]=vo[169]=to,vo[4]=vo[166]=no,vo[16]=vo[154]=ro,vo[64]=vo[106]=io,vo[168]=vo[2]=oo,vo[162]=vo[8]=ao,vo[138]=vo[32]=so,vo[42]=vo[128]=lo,vo[5]=vo[165]=function(e){return[[0,0],[0,e.leftbottom],[1,e.rightbottom],[1,0]]},vo[20]=vo[150]=function(e){return[[1,0],[e.bottomright,0],[e.topright,1],[1,1]]},vo[80]=vo[90]=function(e){return[[1,1],[1,e.righttop],[0,e.lefttop],[0,1]]},vo[65]=vo[105]=function(e){return[[e.bottomleft,0],[0,0],[0,1],[e.topleft,1]]},vo[160]=vo[10]=function(e){return[[1,e.righttop],[1,e.rightbottom],[0,e.leftbottom],[0,e.lefttop]]},vo[130]=vo[40]=function(e){return[[e.topleft,1],[e.topright,1],[e.bottomright,0],[e.bottomleft,0]]},vo[85]=function(){return[[0,0],[0,1],[1,1],[1,0]]},vo[101]=vo[69]=function(e){return[[1,e.rightbottom],[1,0],[0,0],[0,1],[e.topleft,1]]},vo[149]=vo[21]=function(e){return[[e.topright,1],[1,1],[1,0],[0,0],[0,e.leftbottom]]},vo[86]=vo[84]=function(e){return[[1,0],[e.bottomright,0],[0,e.lefttop],[0,1],[1,1]]},vo[89]=vo[81]=function(e){return[[1,1],[1,e.righttop],[e.bottomleft,0],[0,0],[0,1]]},vo[96]=vo[74]=function(e){return[[1,e.righttop],[1,e.rightbottom],[0,e.lefttop],[0,1],[e.topleft,1]]},vo[24]=vo[146]=function(e){return[[1,1],[1,e.righttop],[e.bottomright,0],[e.bottomleft,0],[e.topright,1]]},vo[6]=vo[164]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.leftbottom],[0,e.lefttop]]},vo[129]=vo[41]=function(e){return[[e.topright,1],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topleft,1]]},vo[66]=vo[104]=function(e){return[[e.bottomright,0],[e.bottomleft,0],[0,e.lefttop],[0,1],[e.topleft,1]]},vo[144]=vo[26]=function(e){return[[1,1],[1,e.righttop],[0,e.leftbottom],[0,e.lefttop],[e.topright,1]]},vo[36]=vo[134]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[e.topleft,1],[e.topright,1]]},vo[9]=vo[161]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomleft,0],[0,0],[0,e.leftbottom]]},vo[37]=vo[133]=function(e){return[[1,e.rightbottom],[1,0],[0,0],[0,e.leftbottom],[e.topleft,1],[e.topright,1]]},vo[148]=vo[22]=function(e){return[[1,1],[1,0],[e.bottomright,0],[0,e.leftbottom],[0,e.lefttop],[e.topright,1]]},vo[82]=vo[88]=function(e){return[[1,1],[1,e.righttop],[e.bottomright,0],[e.bottomleft,0],[0,e.lefttop],[0,1]]},vo[73]=vo[97]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomleft,0],[0,0],[0,1],[e.topleft,1]]},vo[145]=vo[25]=function(e){return[[1,1],[1,e.righttop],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topright,1]]},vo[70]=vo[100]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.lefttop],[0,1],[e.topleft,1]]},vo[34]=function(e){return[lo(e),ao(e)]},vo[35]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomright,0],[e.bottomleft,0],[0,e.leftbottom],[0,e.lefttop],[e.topleft,1],[e.topright,1]]},vo[136]=function(e){return[so(e),oo(e)]},vo[153]=function(e){return[ro(e),to(e)]},vo[102]=function(e){return[no(e),io(e)]},vo[155]=function(e){return[[1,1],[1,e.righttop],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topright,1]]},vo[103]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.lefttop],[0,1],[e.topleft,1]]},vo[152]=function(e){return[ro(e),oo(e)]},vo[156]=function(e){return[[1,1],[1,e.righttop],[e.bottomright,0],[e.bottomleft,0],[0,e.leftbottom],[0,e.lefttop],[e.topright,1]]},vo[137]=function(e){return[so(e),to(e)]},vo[139]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topleft,1],[e.topright,1]]},vo[98]=function(e){return[ao(e),io(e)]},vo[99]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomright,0],[e.bottomleft,0],[0,e.lefttop],[0,1],[e.topleft,1]]},vo[38]=function(e){return[no(e),lo(e)]},vo[39]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.leftbottom],[0,e.lefttop],[e.topleft,1],[e.topright,1]]};var Io=function(){function e(t){this.id=e.buildId(t),this.coordinates=t,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return e.buildId=function(e){return e.join(",")},e.prototype.removeInnerEdge=function(e){this.innerEdges=this.innerEdges.filter((function(t){return t.from.id!==e.from.id}))},e.prototype.removeOuterEdge=function(e){this.outerEdges=this.outerEdges.filter((function(t){return t.to.id!==e.to.id}))},e.prototype.addOuterEdge=function(e){this.outerEdges.push(e),this.outerEdgesSorted=!1},e.prototype.sortOuterEdges=function(){var e=this;this.outerEdgesSorted||(this.outerEdges.sort((function(t,n){var r=t.to,i=n.to;if(r.coordinates[0]-e.coordinates[0]>=0&&i.coordinates[0]-e.coordinates[0]<0)return 1;if(r.coordinates[0]-e.coordinates[0]<0&&i.coordinates[0]-e.coordinates[0]>=0)return-1;if(r.coordinates[0]-e.coordinates[0]==0&&i.coordinates[0]-e.coordinates[0]==0)return r.coordinates[1]-e.coordinates[1]>=0||i.coordinates[1]-e.coordinates[1]>=0?r.coordinates[1]-i.coordinates[1]:i.coordinates[1]-r.coordinates[1];var o=Do(e.coordinates,r.coordinates,i.coordinates);return o<0?1:o>0?-1:Math.pow(r.coordinates[0]-e.coordinates[0],2)+Math.pow(r.coordinates[1]-e.coordinates[1],2)-(Math.pow(i.coordinates[0]-e.coordinates[0],2)+Math.pow(i.coordinates[1]-e.coordinates[1],2))})),this.outerEdgesSorted=!0)},e.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},e.prototype.getOuterEdge=function(e){return this.sortOuterEdges(),this.outerEdges[e]},e.prototype.addInnerEdge=function(e){this.innerEdges.push(e)},e}(),No=function(){function e(e,t){this.from=e,this.to=t,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return e.prototype.getSymetric=function(){return this.symetric||(this.symetric=new e(this.to,this.from),this.symetric.symetric=this),this.symetric},e.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},e.prototype.isEqual=function(e){return this.from.id===e.from.id&&this.to.id===e.to.id},e.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},e.prototype.toLineString=function(){return d([this.from.coordinates,this.to.coordinates])},e.prototype.compareTo=function(e){return Do(e.from.coordinates,e.to.coordinates,this.to.coordinates)},e}(),Fo=function(){function e(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return e.prototype.push=function(e){this.edges.push(e),this.polygon=this.envelope=void 0},e.prototype.get=function(e){return this.edges[e]},Object.defineProperty(e.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e){this.edges.forEach(e)},e.prototype.map=function(e){return this.edges.map(e)},e.prototype.some=function(e){return this.edges.some(e)},e.prototype.isValid=function(){return!0},e.prototype.isHole=function(){var e=this,t=this.edges.reduce((function(t,n,r){return n.from.coordinates[1]>e.edges[t].from.coordinates[1]&&(t=r),t}),0),n=(0===t?this.length:t)-1,r=(t+1)%this.length,i=Do(this.edges[n].from.coordinates,this.edges[t].from.coordinates,this.edges[r].from.coordinates);return 0===i?this.edges[n].from.coordinates[0]>this.edges[r].from.coordinates[0]:i>0},e.prototype.toMultiPoint=function(){return m(this.edges.map((function(e){return e.from.coordinates})))},e.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var e=this.edges.map((function(e){return e.from.coordinates}));return e.push(this.edges[0].from.coordinates),this.polygon=c([e])},e.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=on(this.toPolygon())},e.findEdgeRingContaining=function(e,t){var n,r,i=e.getEnvelope();return t.forEach((function(t){var o,a,s,u,c,f,d=t.getEnvelope();if(r&&(n=r.getEnvelope()),a=i,s=(o=d).geometry.coordinates[0].map((function(e){return e[0]})),u=o.geometry.coordinates[0].map((function(e){return e[1]})),c=a.geometry.coordinates[0].map((function(e){return e[0]})),f=a.geometry.coordinates[0].map((function(e){return e[1]})),(Math.max.apply(null,s)!==Math.max.apply(null,c)||Math.max.apply(null,u)!==Math.max.apply(null,f)||Math.min.apply(null,s)!==Math.min.apply(null,c)||Math.min.apply(null,u)!==Math.min.apply(null,f))&&jo(d,i)){for(var p=e.map((function(e){return e.from.coordinates})),h=void 0,g=function(e){t.some((function(t){return n=e,r=t.from.coordinates,n[0]===r[0]&&n[1]===r[1];var n,r}))||(h=e)},m=0,y=p;m=0;--o){var a=i[o],s=a.symetric,l=void 0,u=void 0;a.label===t&&(l=a),s.label===t&&(u=s),l&&u&&(u&&(r=u),l&&(r&&(r.next=l,r=void 0),n||(n=l)))}r&&(r.next=n)},e.prototype._findLabeledEdgeRings=function(){var e=[],t=0;return this.edges.forEach((function(n){if(!(n.label>=0)){e.push(n);var r=n;do{r.label=t,r=r.next}while(!n.isEqual(r));t++}})),e},e.prototype.getEdgeRings=function(){var e=this;this._computeNextCWEdges(),this.edges.forEach((function(e){e.label=void 0})),this._findLabeledEdgeRings().forEach((function(t){e._findIntersectionNodes(t).forEach((function(n){e._computeNextCCWEdges(n,t.label)}))}));var t=[];return this.edges.forEach((function(n){n.ring||t.push(e._findEdgeRing(n))})),t},e.prototype._findIntersectionNodes=function(e){var t=[],n=e,r=function(){var r=0;n.from.getOuterEdges().forEach((function(t){t.label===e.label&&++r})),r>1&&t.push(n.from),n=n.next};do{r()}while(!e.isEqual(n));return t},e.prototype._findEdgeRing=function(e){var t=e,n=new Fo;do{n.push(t),t.ring=n,t=t.next}while(!e.isEqual(t));return n},e.prototype.removeNode=function(e){var t=this;e.getOuterEdges().forEach((function(e){return t.removeEdge(e)})),e.innerEdges.forEach((function(e){return t.removeEdge(e)})),delete this.nodes[e.id]},e.prototype.removeEdge=function(e){this.edges=this.edges.filter((function(t){return!t.isEqual(e)})),e.deleteEdge()},e}();function Bo(e,t){var n=!0;return V(e,(function(e){V(t,(function(t){if(!1===n)return!1;n=function(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return n=e.coordinates,r=t.coordinates,!(n[0]===r[0]&&n[1]===r[1]);case"LineString":return!Uo(t,e);case"Polygon":return!ht(e,t)}break;case"LineString":switch(t.type){case"Point":return!Uo(e,t);case"LineString":return!function(e,t){return fr(e,t).features.length>0}(e,t);case"Polygon":return!Vo(t,e)}break;case"Polygon":switch(t.type){case"Point":return!ht(t,e);case"LineString":return!Vo(e,t);case"Polygon":return!function(e,t){for(var n=0,r=e.coordinates[0];n0}(t,e)}}var n,r;return!1}(e.geometry,t.geometry)}))})),n}function Uo(e,t){for(var n=0;n0}function Ho(e,t,n){var r=n[0]-e[0],i=n[1]-e[1],o=t[0]-e[0],a=t[1]-e[1];return 0==r*a-i*o&&(Math.abs(o)>=Math.abs(a)?o>0?e[0]<=n[0]&&n[0]<=t[0]:t[0]<=n[0]&&n[0]<=e[0]:a>0?e[1]<=n[1]&&n[1]<=t[1]:t[1]<=n[1]&&n[1]<=e[1])}function Wo(e,t){return!(e[0]>t[0]||e[2]t[1]||e[3]0}function Zo(e,t){for(var n=!1,r=!1,i=e.coordinates.length,o=0;o=Math.abs(s)?a>0?e[0]<=n[0]&&n[0]<=t[0]:t[0]<=n[0]&&n[0]<=e[0]:s>0?e[1]<=n[1]&&n[1]<=t[1]:t[1]<=n[1]&&n[1]<=e[1]:Math.abs(a)>=Math.abs(s)?a>0?e[0]0?e[1]=0&&(n=[].concat(e.slice(r,e.length),e.slice(1,r+1))),n},$o.prototype.comparePath=function(e,t){var n=this;return e.every((function(e,t){return n.compareCoord(e,this[t])}),t)},$o.prototype.comparePolygon=function(e,t){if(this.compareLine(e.coordinates[0],t.coordinates[0],1,!0)){var n=e.coordinates.slice(1,e.coordinates.length),r=t.coordinates.slice(1,t.coordinates.length),i=this;return n.every((function(e){return this.some((function(t){return i.compareLine(e,t,1,!0)}))}),r)}return!1},$o.prototype.compareFeature=function(e,t){return!(e.id!==t.id||!this.objectComparator(e.properties,t.properties)||!this.compareBBox(e,t))&&this.compare(e.geometry,t.geometry)},$o.prototype.compareBBox=function(e,t){return!!(!e.bbox&&!t.bbox||e.bbox&&t.bbox&&this.compareCoord(e.bbox,t.bbox))},$o.prototype.removePseudo=function(e){return e};var ta=$o;function na(e,t){var n=!1;return V(e,(function(e){V(t,(function(t){if(!0===n)return!0;n=!Bo(e.geometry,t.geometry)}))})),n}var ra=ze((function(e){function t(e,t,n,r){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(e,t,n,r)}t.prototype.run=function(e,t,n,r){this._init(e,t,n,r);for(var i=0;i=this.minPts&&(t=this._mergeArrays(t,i))}1!==this._assigned[r]&&this._addToCluster(r,e)}},t.prototype._addToCluster=function(e,t){this.clusters[t].push(e),this._assigned[e]=1},t.prototype._regionQuery=function(e){for(var t=[],n=0;n0){for(l=0;l=0);return e},t.prototype.assign=function(){for(var e,t=!1,n=this.dataset.length,r=0;ri&&(n=r):t=this.minPts)return n},n.prototype._regionQuery=function(e,t){t=t||this.epsilon;for(var n=[],r=0,i=this.dataset.length;r0,p=[];if(n)i="kmrand"==n?function(e,t){for(var n={},r=[],i=t<<2,o=e.length,a=e[0].length>0;r.length0;){var s=e[Math.floor(Math.random()*o)],l=a?s.join("_"):""+s;n[l]||(n[l]=!0,r.push(s))}if(r.length0,a=e[Math.floor(Math.random()*i)];for(o&&a.join("_"),r.push(a);r.length0;){var l=a.pop();if(l===n)return ma(l);l.closed=!0;for(var u=e.neighbors(l),c=0,f=u.length;c0)){if(o/=d,d<0){if(o0){if(o>f)return;o>c&&(c=o)}if(o=r-l,d||!(o<0)){if(o/=d,d<0){if(o>f)return;o>c&&(c=o)}else if(d>0){if(o0)){if(o/=p,p<0){if(o0){if(o>f)return;o>c&&(c=o)}if(o=i-u,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>c&&(c=o)}else if(p>0){if(o0||f<1)||(c>0&&(e[0]=[l+c*d,u+c*p]),f<1&&(e[1]=[l+f*d,u+f*p]),!0)}}}}}function Da(e,t,n,r,i){var o=e[1];if(o)return!0;var a,s,l=e[0],u=e.left,c=e.right,f=u[0],d=u[1],p=c[0],h=c[1],g=(f+p)/2,m=(d+h)/2;if(h===d){if(g=r)return;if(f>p){if(l){if(l[1]>=i)return}else l=[g,n];o=[g,i]}else{if(l){if(l[1]1)if(f>p){if(l){if(l[1]>=i)return}else l=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(l){if(l[1]=r)return}else l=[t,a*t+s];o=[r,a*r+s]}else{if(l){if(l[0]0&&(this.content[0]=t,this.bubbleUp(0)),e},remove:function(e){var t=this.content.indexOf(e),n=this.content.pop();t!==this.content.length-1&&(this.content[t]=n,this.scoreFunction(n)0;){var n=(e+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(t)=-ns)){var p=l*l+u*u,h=c*c+f*f,g=(f*p-u*h)/d,m=(l*h-c*p)/d,y=za.pop()||new Ba;y.arc=e,y.site=i,y.x=g+a,y.y=(y.cy=m+s)+Math.sqrt(g*g+m*m),e.circle=y;for(var v=null,b=Qa._;b;)if(y.yts)s=s.L;else{if(!((i=o-Ka(s,a))>ts)){r>-ts?(t=s.P,n=s):i>-ts?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}!function(e){Ja[e.index]={site:e,halfedges:[]}}(e);var l=qa(e);if($a.insert(t,l),t||n){if(t===n)return Va(t),n=qa(t.site),$a.insert(l,n),l.edge=n.edge=Pa(t.site,l.site),Ua(t),void Ua(n);if(n){Va(t),Va(n);var u=t.site,c=u[0],f=u[1],d=e[0]-c,p=e[1]-f,h=n.site,g=h[0]-c,m=h[1]-f,y=2*(d*m-p*g),v=d*d+p*p,b=g*g+m*m,_=[(m*v-p*b)/y+c,(d*b-g*v)/y+f];La(n.edge,u,h,_),l.edge=Pa(u,e,null,_),n.edge=Pa(e,h,null,_),Ua(t),Ua(n)}else l.edge=Pa(t.site,l.site)}}function Za(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;var s=(n=a.site)[0],l=n[1],u=l-t;if(!u)return s;var c=s-r,f=1/o-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-l+u/2+i-o/2)))/f+r:(r+s)/2}function Ka(e,t){var n=e.N;if(n)return Za(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var $a,Ja,Qa,es,ts=1e-6,ns=1e-12;function rs(e,t){return t[1]-e[1]||t[0]-e[0]}function is(e,t){var n,r,i,o=e.sort(rs).pop();for(es=[],Ja=new Array(e.length),$a=new Oa,Qa=new Oa;;)if(i=Fa,o&&(!i||o[1]ts||Math.abs(i[0][1]-i[1][1])>ts)||delete es[o]}(a,s,l,u),function(e,t,n,r){var i,o,a,s,l,u,c,f,d,p,h,g,m=Ja.length,y=!0;for(i=0;its||Math.abs(g-d)>ts)&&(l.splice(s,0,es.push(ka(a,p,Math.abs(h-e)ts?[e,Math.abs(f-e)ts?[Math.abs(d-r)ts?[n,Math.abs(f-n)ts?[Math.abs(d-t)=-270&&(g=-g),h<-180&&h>=-360&&(m=-m),"degrees"===o){var y=g*Math.cos(f)+m*Math.sin(f),v=m*Math.cos(f)-g*Math.sin(f);g=y,m=v}d.push([g+u[0],m+u[1]])}return d.push(d[0]),"degrees"===o?c([d],l):To(c([d],l),a,{pivot:s})}function ss(e){var t=e*Math.PI/180;return Math.tan(t)}function ls(e,t){void 0===t&&(t={});var n=0,r=0,i=0;return B(e,(function(e,o,a){var s=t.weight?null==a?void 0:a[t.weight]:void 0;if(!T(s=null==s?1:s))throw new Error("weight value must be a number for feature index "+o);(s=Number(s))>0&&R(e,(function(e){n+=e[0]*s,r+=e[1]*s,i+=s}))})),l([n/i,r/i],t.properties,t)}function us(e,t){return{x:e[0]-t[0],y:e[1]-t[1]}}function cs(e,t){var n=0,r=0;R(e,(function(i,o,a,s,l){l>n&&(n=l,r=o,t.push([]));var u=o-r,c=e.coordinates[l][u+1],f=i[0],d=i[1],p=c[0],h=c[1];t[l].push([.75*f+.25*p,.75*d+.25*h]),t[l].push([.25*f+.75*p,.25*d+.75*h])}),!0),t.forEach((function(e){e.push(e[0])}))}function fs(e,t){var n=0,r=0,i=0;R(e,(function(o,a,s,l,u){l>i&&(i=l,r=a,t.push([[]])),u>n&&(n=u,r=a,t[l].push([]));var c=a-r,f=e.coordinates[l][u][c+1],d=o[0],p=o[1],h=f[0],g=f[1];t[l][u].push([.75*d+.25*h,.75*p+.25*g]),t[l][u].push([.25*d+.75*h,.25*p+.75*g])}),!0),t.forEach((function(e){e.forEach((function(e){e.push(e[0])}))}))}function ds(e,t,n){void 0===n&&(n=2);var r=J(e),i=J(t),o=r[0]-i[0],a=r[1]-i[1];return 1===n?Math.abs(o)+Math.abs(a):Math.pow(Math.pow(o,n)+Math.pow(a,n),1/n)}function ps(e,t){var n=(t=t||{}).threshold||1e4,r=t.p||2,i=t.binary||!1,o=t.alpha||-1,a=t.standardization||!1,s=[];N(e,(function(e){s.push(fn(e))}));for(var l=[],u=0;u0?1:0}(e[0]))*t,n*Math.log(Math.tan(.25*Math.PI+.5*e[1]*t))];return i[0]>r&&(i[0]=r),i[0]<-r&&(i[0]=-r),i[1]>r&&(i[1]=r),i[1]<-r&&(i[1]=-r),i}function bs(e){var t=180/Math.PI,n=6378137;return[e[0]*t/n,(.5*Math.PI-2*Math.atan(Math.exp(-e[1]/n)))*t]}is.prototype={constructor:is,polygons:function(){var e=this.edges;return this.cells.map((function(t){var n=t.halfedges.map((function(n){return Ia(t,e[n])}));return n.data=t.site.data,n}))},triangles:function(){var e=[],t=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,s,l,u,c=n.site,f=-1,d=t[i[o-1]],p=d.left===c?d.right:d.left;++f=s)return null;var l=e-i.site[0],u=t-i.site[1],c=l*l+u*u;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var l=e-s[0],u=t-s[1],f=l*l+u*u;f0?e+n[t-1]:e})),o.forEach((function(e){e=2*e*Math.PI/o[o.length-1];var n=Math.random();i.push([n*(t.max_radial_length||10)*Math.sin(e),n*(t.max_radial_length||10)*Math.cos(e)])})),i[i.length-1]=i[0],i=i.map((r=As(t.bbox),function(e){return[e[0]+r[0],e[1]+r[1]]})),n.push(c([i]))},i=0;i * @license MIT * @preserve */};function Ns(e,t){return e>t?1:e0))break;if(null===t.right)break;if(n(e,t.right.key)>0&&(s=t.right,t.right=s.left,s.left=t,null===(t=s).right))break;i.right=t,i=t,t=t.right}}return i.right=t.left,o.left=t.right,t.left=r.right,t.right=r.left,t}function zs(e,t,n,r){var i=new Is(e,t);if(null===n)return i.left=i.right=null,i;var o=r(e,(n=Fs(e,n,r)).key);return o<0?(i.left=n.left,i.right=n,n.left=null):o>=0&&(i.right=n.right,i.left=n,n.right=null),i}function Bs(e,t,n){var r=null,i=null;if(t){var o=n((t=Fs(e,t,n)).key,e);0===o?(r=t.left,i=t.right):o<0?(i=t.right,t.right=null,r=t):(r=t.left,t.left=null,i=t)}return{left:r,right:i}}var Us=function(){function e(e){void 0===e&&(e=Ns),this._root=null,this._size=0,this._comparator=e}return e.prototype.insert=function(e,t){return this._size++,this._root=zs(e,t,this._root,this._comparator)},e.prototype.add=function(e,t){var n=new Is(e,t);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,i=Fs(e,this._root,r),o=r(e,i.key);return 0===o?this._root=i:(o<0?(n.left=i.left,n.right=i,i.left=null):o>0&&(n.right=i.right,n.left=i,i.right=null),this._size++,this._root=n),this._root},e.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},e.prototype._remove=function(e,t,n){var r;return null===t?null:0===n(e,(t=Fs(e,t,n)).key)?(null===t.left?r=t.right:(r=Fs(e,t.left,n)).right=t.right,this._size--,r):t},e.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Fs(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},e.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(0===r)return t;t=r<0?t.left:t.right}return null},e.prototype.find=function(e){return this._root&&(this._root=Fs(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},e.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(0===r)return!0;t=r<0?t.left:t.right}return!1},e.prototype.forEach=function(e,t){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),e.call(t,n),n=n.right):i=!0;return this},e.prototype.range=function(e,t,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.left;else{if(o((a=i.pop()).key,t)>0)break;if(o(a.key,e)>=0&&n.call(r,a))return this;a=a.right}return this},e.prototype.keys=function(){var e=[];return this.forEach((function(t){var n=t.key;return e.push(n)})),e},e.prototype.values=function(){var e=[];return this.forEach((function(t){var n=t.data;return e.push(n)})),e},e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},e.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},e.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},e.prototype.at=function(e){for(var t=this._root,n=!1,r=0,i=[];!n;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),r===e)return t;r++,t=t.right}else n=!0;return null},e.prototype.next=function(e){var t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var r=this._comparator;t;){var i=r(e.key,t.key);if(0===i)break;i<0?(n=t,t=t.left):t=t.right}return n},e.prototype.prev=function(e){var t=this._root,n=null;if(null!==e.left){for(n=e.left;n.right;)n=n.right;return n}for(var r=this._comparator;t;){var i=r(e.key,t.key);if(0===i)break;i<0?t=t.left:(n=t,t=t.right)}return n},e.prototype.clear=function(){return this._root=null,this._size=0,this},e.prototype.toList=function(){return function(e){for(var t=e,n=[],r=!1,i=new Is(null,null),o=i;!r;)t?(n.push(t),t=t.left):n.length>0?t=(t=o=o.next=n.pop()).right:r=!0;return o.next=null,i.next}(this._root)},e.prototype.load=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1);var r=e.length,i=this._comparator;if(n&&function e(t,n,r,i,o){if(!(r>=i)){for(var a=t[r+i>>1],s=r-1,l=i+1;;){do{s++}while(o(t[s],a)<0);do{l--}while(o(t[l],a)>0);if(s>=l)break;var u=t[s];t[s]=t[l],t[l]=u,u=n[s],n[s]=n[l],n[l]=u}e(t,n,r,l,o),e(t,n,l+1,i,o)}}(e,t,0,r-1,i),null===this._root)this._root=function e(t,n,r,i){var o=i-r;if(o>0){var a=r+Math.floor(o/2),s=t[a],l=n[a],u=new Is(s,l);return u.left=e(t,n,r,a),u.right=e(t,n,a+1,i),u}return null}(e,t,0,r),this._size=r;else{var o=function(e,t,n){for(var r=new Is(null,null),i=r,o=e,a=t;null!==o&&null!==a;)n(o.key,a.key)<0?(i.next=o,o=o.next):(i.next=a,a=a.next),i=i.next;return null!==o?i.next=o:null!==a&&(i.next=a),r.next}(this.toList(),function(e,t){for(var n=new Is(null,null),r=n,i=0;i0){var o=n+Math.floor(i/2),a=e(t,n,o),s=t.head;return s.left=a,t.head=t.head.next,s.right=e(t,o+1,r),s}return null}({head:o},0,r)}return this},e.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){void 0===e&&(e=function(e){return String(e.key)});var t=[];return function e(t,n,r,i,o){if(t){i(n+(r?"└── ":"├── ")+o(t)+"\n");var a=n+(r?" ":"│ ");t.left&&e(t.left,a,!1,i,o),t.right&&e(t.right,a,!0,i,o)}}(this._root,"",!0,(function(e){return t.push(e)}),e),t.join("")},e.prototype.update=function(e,t,n){var r=this._comparator,i=Bs(e,this._root,r),o=i.left,a=i.right;r(e,t)<0?a=zs(t,n,a,r):o=zs(t,n,o,r),this._root=function(e,t,n){return null===t?e:(null===e||((t=Fs(e.key,t,n)).left=e),t)}(o,a,r)},e.prototype.split=function(e){return Bs(e,this._root,this._comparator)},e}();function Vs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hs(e,t){for(var n=0;nt.x?1:e.yt.y?1:0}}]),Ws(e,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var t=e.point.events,n=0,r=t.length;n=0&&l>=0?au?-1:0:o<0&&l<0?au?1:0:lo?1:0}}}]),e}(),sl=0,ll=function(){function e(t,n,r,i){Vs(this,e),this.id=++sl,this.leftSE=t,t.segment=this,t.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=t,this.rings=r,this.windings=i}return Ws(e,null,[{key:"compare",value:function(e,t){var n=e.leftSE.point.x,r=t.leftSE.point.x,i=e.rightSE.point.x,o=t.rightSE.point.x;if(oa&&s>l)return-1;var c=e.comparePoint(t.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=t.comparePoint(e.rightSE.point);return 0!==f?f:-1}if(n>r){if(as&&a>u)return 1;var d=t.comparePoint(e.leftSE.point);if(0!==d)return d;var p=e.comparePoint(t.rightSE.point);return p<0?1:p>0?-1:1}if(as)return 1;if(io){var g=e.comparePoint(t.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==o){var m=l-a,y=i-n,v=u-s,b=o-r;if(m>y&&vb)return-1}return i>o?1:iu?1:e.idt.id?1:0}}]),Ws(e,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:et?e:t}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var t=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(t.x===n.x)return e.x===t.x?0:e.x0&&s.swapEvents(),al.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var t=0,n=this.windings.length;t0){var o=n;n=r,r=o}if(n.prev===r){var a=n;n=r,r=a}for(var s=0,l=r.rings.length;s0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=n,o=t,a=-1}return new e(new al(i,!0),new al(o,!1),[r],[a])}}]),e}(),ul=function(){function e(t,n,r){if(Vs(this,e),!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=Js.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var o=i,a=1,s=t.length;athis.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}i.x===o.x&&i.y===o.y||this.segments.push(ll.fromRing(o,i,this))}return Ws(e,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,n=this.segments.length;tthis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=n}return Ws(e,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),t=0,n=this.interiorRings.length;tthis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=n}return Ws(e,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,n=this.polys.length;t0&&(e=r)}for(var i=e.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),e}(),pl=function(){function e(t){Vs(this,e),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ws(e,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(var t=0,n=this.interiorRings.length;t1&&void 0!==arguments[1]?arguments[1]:ll.compare;Vs(this,e),this.queue=t,this.tree=new Us(n),this.segments=[]}return Ws(e,[{key:"process",value:function(e){var t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),n;var r=e.isLeft?this.tree.insert(t):this.tree.find(t);if(!r)throw new Error("Unable to find segment #".concat(t.id," ")+"[".concat(t.leftSE.point.x,", ").concat(t.leftSE.point.y,"] -> ")+"[".concat(t.rightSE.point.x,", ").concat(t.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,a=void 0,s=void 0;void 0===a;)null===(i=this.tree.prev(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);for(;void 0===s;)null===(o=this.tree.next(o))?s=null:void 0===o.key.consumedBy&&(s=o.key);if(e.isLeft){var l=null;if(a){var u=a.getIntersection(t);if(null!==u&&(t.isAnEndpoint(u)||(l=u),!a.isAnEndpoint(u)))for(var c=this._splitSafely(a,u),f=0,d=c.length;f0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&s){var x=a.getIntersection(s);if(null!==x){if(!a.isAnEndpoint(x))for(var w=this._splitSafely(a,x),E=0,O=w.length;Eml)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var b=new gl(p),_=p.size,A=p.pop();A;){var x=A.key;if(p.size===_){var w=x.segment;throw new Error("Unable to pop() ".concat(x.isLeft?"left":"right"," SweepEvent ")+"[".concat(x.point.x,", ").concat(x.point.y,"] from segment #").concat(w.id," ")+"[".concat(w.leftSE.point.x,", ").concat(w.leftSE.point.y,"] -> ")+"[".concat(w.rightSE.point.x,", ").concat(w.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(p.size>ml)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(b.segments.length>yl)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var E=b.process(x),O=0,M=E.length;O1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;rt.x?1:this.yt.y?1:0},Tl.prototype.clone=function(){},Tl.prototype.copy=function(){return new Tl(this)},Tl.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},Tl.prototype.distance3D=function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return Math.sqrt(t*t+n*n+r*r)},Tl.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},Tl.prototype.hashCode=function(){var e=17;return 37*(e=37*e+Tl.hashCode(this.x))+Tl.hashCode(this.y)},Tl.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},Tl.prototype.interfaces_=function(){return[El,Ol,Sl]},Tl.prototype.getClass=function(){return Tl},Tl.hashCode=function(){if(1===arguments.length){var e=arguments[0],t=xl.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},Cl.DimensionalComparator.get=function(){return Pl},Cl.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},Cl.NULL_ORDINATE.get=function(){return xl.NaN},Cl.X.get=function(){return 0},Cl.Y.get=function(){return 1},Cl.Z.get=function(){return 2},Object.defineProperties(Tl,Cl);var Pl=function(e){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(2!==t&&3!==t)throw new Al("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}};Pl.prototype.compare=function(e,t){var n=e,r=t,i=Pl.compare(n.x,r.x);if(0!==i)return i;var o=Pl.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:Pl.compare(n.z,r.z)},Pl.prototype.interfaces_=function(){return[Ml]},Pl.prototype.getClass=function(){return Pl},Pl.compare=function(e,t){return et?1:xl.isNaN(e)?xl.isNaN(t)?0:-1:xl.isNaN(t)?1:0};var kl=function(){};kl.prototype.create=function(){},kl.prototype.interfaces_=function(){return[]},kl.prototype.getClass=function(){return kl};var Ll=function(){},Rl={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Ll.prototype.interfaces_=function(){return[]},Ll.prototype.getClass=function(){return Ll},Ll.toLocationSymbol=function(e){switch(e){case Ll.EXTERIOR:return"e";case Ll.BOUNDARY:return"b";case Ll.INTERIOR:return"i";case Ll.NONE:return"-"}throw new Al("Unknown location value: "+e)},Rl.INTERIOR.get=function(){return 0},Rl.BOUNDARY.get=function(){return 1},Rl.EXTERIOR.get=function(){return 2},Rl.NONE.get=function(){return-1},Object.defineProperties(Ll,Rl);var Dl=function(e,t){return e.interfaces_&&e.interfaces_().indexOf(t)>-1},jl=function(){},Il={LOG_10:{configurable:!0}};jl.prototype.interfaces_=function(){return[]},jl.prototype.getClass=function(){return jl},jl.log10=function(e){var t=Math.log(e);return xl.isInfinite(t)||xl.isNaN(t)?t:t/jl.LOG_10},jl.min=function(e,t,n,r){var i=e;return tn?n:e}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return ro?o:r}},jl.wrap=function(e,t){return e<0?t- -e%t:e%t},jl.max=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2],r=e;return t>r&&(r=t),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],l=i;return o>l&&(l=o),a>l&&(l=a),s>l&&(l=s),l}},jl.average=function(e,t){return(e+t)/2},Il.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(jl,Il);var Nl=function(e){this.str=e};Nl.prototype.append=function(e){this.str+=e},Nl.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},Nl.prototype.toString=function(e){return this.str};var Fl=function(e){this.value=e};Fl.prototype.intValue=function(){return this.value},Fl.prototype.compareTo=function(e){return this.valuee?1:0},Fl.isNaN=function(e){return Number.isNaN(e)};var zl=function(){};zl.isWhitespace=function(e){return e<=32&&e>=0||127===e},zl.toUpperCase=function(e){return e.toUpperCase()};var Bl=function e(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof e){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];e.call(this,e.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},Ul={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};Bl.prototype.le=function(e){return(this._hi9?(c=!0,f="9"):f="0"+u,a.append(f),n=n.subtract(Bl.valueOf(u)).multiply(Bl.TEN),c&&n.selfAdd(Bl.TEN);var d=!0,p=Bl.magnitude(n._hi);if(p<0&&Math.abs(p)>=s-l&&(d=!1),!d)break}return t[0]=r,a.toString()},Bl.prototype.sqr=function(){return this.multiply(this)},Bl.prototype.doubleValue=function(){return this._hi+this._lo},Bl.prototype.subtract=function(){if(arguments[0]instanceof Bl){var e=arguments[0];return this.add(e.negate())}if("number"==typeof arguments[0]){var t=arguments[0];return this.add(-t)}},Bl.prototype.equals=function(){if(1===arguments.length){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},Bl.prototype.isZero=function(){return 0===this._hi&&0===this._lo},Bl.prototype.selfSubtract=function(){if(arguments[0]instanceof Bl){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t,0)}},Bl.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},Bl.prototype.min=function(e){return this.le(e)?this:e},Bl.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof Bl){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfDivide(t,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,l=null,u=null,c=null,f=null;return l=this._hi/n,f=(i=(u=Bl.SPLIT*l)-(i=u-l))*(a=(f=Bl.SPLIT*n)-(a=f-n))-(c=l*n)+i*(s=n-a)+(o=l-i)*a+o*s,f=l+(u=(this._hi-c-f+this._lo-l*r)/n),this._hi=f,this._lo=l-f+u,this}},Bl.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},Bl.prototype.divide=function(){if(arguments[0]instanceof Bl){var e=arguments[0],t=null,n=null,r=null,i=null,o=null,a=null,s=null,l=null;n=(o=this._hi/e._hi)-(t=(a=Bl.SPLIT*o)-(t=a-o)),l=t*(r=(l=Bl.SPLIT*e._hi)-(r=l-e._hi))-(s=o*e._hi)+t*(i=e._hi-r)+n*r+n*i;var u=l=o+(a=(this._hi-s-l+this._lo-o*e._lo)/e._hi),c=o-l+a;return new Bl(u,c)}if("number"==typeof arguments[0]){var f=arguments[0];return xl.isNaN(f)?Bl.createNaN():Bl.copy(this).selfDivide(f,0)}},Bl.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},Bl.prototype.pow=function(e){if(0===e)return Bl.valueOf(1);var t=new Bl(this),n=Bl.valueOf(1),r=Math.abs(e);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(t),(r/=2)>0&&(t=t.sqr());else n=t;return e<0?n.reciprocal():n},Bl.prototype.ceil=function(){if(this.isNaN())return Bl.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new Bl(e,t)},Bl.prototype.compareTo=function(e){var t=e;return this._hit._hi?1:this._lot._lo?1:0},Bl.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},Bl.prototype.setValue=function(){if(arguments[0]instanceof Bl){var e=arguments[0];return this.init(e),this}if("number"==typeof arguments[0]){var t=arguments[0];return this.init(t),this}},Bl.prototype.max=function(e){return this.ge(e)?this:e},Bl.prototype.sqrt=function(){if(this.isZero())return Bl.valueOf(0);if(this.isNegative())return Bl.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,n=Bl.valueOf(t),r=this.subtract(n.sqr())._hi*(.5*e);return n.add(r)},Bl.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof Bl){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0],n=null,r=null,i=null,o=null,a=null,s=null;return o=(i=this._hi+t)-(a=i-this._hi),r=(s=(o=t-a+(this._hi-o))+this._lo)+(i-(n=i+s)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var l=arguments[0],u=arguments[1],c=null,f=null,d=null,p=null,h=null,g=null,m=null;p=this._hi+l,f=this._lo+u,h=p-(g=p-this._hi),d=f-(m=f-this._lo);var y=(c=p+(g=(h=l-g+(this._hi-h))+f))+(g=(d=u-m+(this._lo-d))+(g+(p-c))),v=g+(c-y);return this._hi=y,this._lo=v,this}},Bl.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof Bl){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfMultiply(t,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,l=null,u=null;i=(l=Bl.SPLIT*this._hi)-this._hi,u=Bl.SPLIT*n,i=l-i,o=this._hi-i,a=u-n;var c=(l=this._hi*n)+(u=i*(a=u-a)-l+i*(s=n-a)+o*a+o*s+(this._hi*r+this._lo*n)),f=u+(i=l-c);return this._hi=c,this._lo=f,this}},Bl.prototype.selfSqr=function(){return this.selfMultiply(this)},Bl.prototype.floor=function(){if(this.isNaN())return Bl.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new Bl(e,t)},Bl.prototype.negate=function(){return this.isNaN()?this:new Bl(-this._hi,-this._lo)},Bl.prototype.clone=function(){},Bl.prototype.multiply=function(){if(arguments[0]instanceof Bl){var e=arguments[0];return e.isNaN()?Bl.createNaN():Bl.copy(this).selfMultiply(e)}if("number"==typeof arguments[0]){var t=arguments[0];return xl.isNaN(t)?Bl.createNaN():Bl.copy(this).selfMultiply(t,0)}},Bl.prototype.isNaN=function(){return xl.isNaN(this._hi)},Bl.prototype.intValue=function(){return Math.trunc(this._hi)},Bl.prototype.toString=function(){var e=Bl.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},Bl.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!0,t),r=t[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+Bl.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+Bl.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},Bl.prototype.reciprocal=function(){var e,t,n,r,i=null,o=null,a=null,s=null;e=(n=1/this._hi)-(i=(a=Bl.SPLIT*n)-(i=a-n)),o=(s=Bl.SPLIT*this._hi)-this._hi;var l=n+(a=(1-(r=n*this._hi)-(s=i*(o=s-o)-r+i*(t=this._hi-o)+e*o+e*t)-n*this._lo)/this._hi);return new Bl(l,n-l+a)},Bl.prototype.toSciNotation=function(){if(this.isZero())return Bl.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!1,t),r=Bl.SCI_NOT_EXPONENT_CHAR+t[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},Bl.prototype.abs=function(){return this.isNaN()?Bl.NaN:this.isNegative()?this.negate():new Bl(this)},Bl.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},Bl.prototype.lt=function(e){return(this._hie._hi||this._hi===e._hi)&&this._lo>e._lo},Bl.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},Bl.prototype.trunc=function(){return this.isNaN()?Bl.NaN:this.isPositive()?this.floor():this.ceil()},Bl.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},Bl.prototype.interfaces_=function(){return[Sl,El,Ol]},Bl.prototype.getClass=function(){return Bl},Bl.sqr=function(e){return Bl.valueOf(e).selfMultiply(e)},Bl.valueOf=function(){if("string"==typeof arguments[0]){var e=arguments[0];return Bl.parse(e)}if("number"==typeof arguments[0]){var t=arguments[0];return new Bl(t)}},Bl.sqrt=function(e){return Bl.valueOf(e).sqrt()},Bl.parse=function(e){for(var t=0,n=e.length;zl.isWhitespace(e.charAt(t));)t++;var r=!1;if(t=n);){var u=e.charAt(t);if(t++,zl.isDigit(u)){var c=u-"0";o.selfMultiply(Bl.TEN),o.selfAdd(c),a++}else{if("."!==u){if("e"===u||"E"===u){var f=e.substring(t);try{l=Fl.parseInt(f)}catch(t){throw t instanceof Error?new Error("Invalid exponent "+f+" in string "+e):t}break}throw new Error("Unexpected character '"+u+"' at position "+t+" in string "+e)}s=a}}var d=o,p=a-s-l;if(0===p)d=o;else if(p>0){var h=Bl.TEN.pow(p);d=o.divide(h)}else if(p<0){var g=Bl.TEN.pow(-p);d=o.multiply(g)}return r?d.negate():d},Bl.createNaN=function(){return new Bl(xl.NaN,xl.NaN)},Bl.copy=function(e){return new Bl(e)},Bl.magnitude=function(e){var t=Math.abs(e),n=Math.log(t)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=t&&(r+=1),r},Bl.stringOfChar=function(e,t){for(var n=new Nl,r=0;r0){if(o<=0)return Vl.signum(a);r=i+o}else{if(!(i<0))return Vl.signum(a);if(o>=0)return Vl.signum(a);r=-i-o}var s=Vl.DP_SAFE_EPSILON*r;return a>=s||-a>=s?Vl.signum(a):2},Vl.signum=function(e){return e>0?1:e<0?-1:0},Hl.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Vl,Hl);var Wl=function(){},ql={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};ql.X.get=function(){return 0},ql.Y.get=function(){return 1},ql.Z.get=function(){return 2},ql.M.get=function(){return 3},Wl.prototype.setOrdinate=function(e,t,n){},Wl.prototype.size=function(){},Wl.prototype.getOrdinate=function(e,t){},Wl.prototype.getCoordinate=function(){},Wl.prototype.getCoordinateCopy=function(e){},Wl.prototype.getDimension=function(){},Wl.prototype.getX=function(e){},Wl.prototype.clone=function(){},Wl.prototype.expandEnvelope=function(e){},Wl.prototype.copy=function(){},Wl.prototype.getY=function(e){},Wl.prototype.toCoordinateArray=function(){},Wl.prototype.interfaces_=function(){return[Ol]},Wl.prototype.getClass=function(){return Wl},Object.defineProperties(Wl,ql);var Yl=function(){},Gl=function(e){function t(){e.call(this,"Projective point not representable on the Cartesian plane.")}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Yl),Xl=function(){};Xl.arraycopy=function(e,t,n,r,i){for(var o=0,a=t;ae._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,r=this._maxx=this._minx&&t.getMaxX()<=this._maxx&&t.getMinY()>=this._miny&&t.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},Kl.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Kl){var e=arguments[0];return!this.isNull()&&!e.isNull()&&!(e._minx>this._maxx||e._maxxthis._maxy||e._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=t._maxx),t._minythis._maxy&&(this._maxy=t._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}},Kl.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return et._minx?1:this._minyt._miny?1:this._maxxt._maxx?1:this._maxyt._maxy?1:0},Kl.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},Kl.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Kl.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Kl.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Kl.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},Kl.prototype.expandBy=function(){if(1===arguments.length){var e=arguments[0];this.expandBy(e,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=t,this._maxx+=t,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Kl.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Kl){var e=arguments[0];return this.covers(e)}if(arguments[0]instanceof Tl){var t=arguments[0];return this.covers(t)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},Kl.prototype.centre=function(){return this.isNull()?null:new Tl((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Kl.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof Tl){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof Kl){var t=arguments[0];this._minx=t._minx,this._maxx=t._maxx,this._miny=t._miny,this._maxy=t._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];ie._maxx&&(t=this._minx-e._maxx);var n=0;return this._maxye._maxy&&(n=this._miny-e._maxy),0===t?n:0===n?t:Math.sqrt(t*t+n*n)},Kl.prototype.hashCode=function(){var e=17;return 37*(e=37*(e=37*(e=37*e+Tl.hashCode(this._minx))+Tl.hashCode(this._maxx))+Tl.hashCode(this._miny))+Tl.hashCode(this._maxy)},Kl.prototype.interfaces_=function(){return[El,Sl]},Kl.prototype.getClass=function(){return Kl},Kl.intersects=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2];return n.x>=(e.xt.x?e.x:t.x)&&n.y>=(e.yt.y?e.y:t.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),l=Math.max(o.x,a.x),u=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(u>l||cl||cn?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}},au.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},au.prototype.setPrecisionModel=function(e){this._precisionModel=e},au.prototype.isInteriorIntersection=function(){var e=this;if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],n=0;ni?r:i;else{var a=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);0!==(o=r>i?a:s)||e.equals(t)||(o=Math.max(a,s))}return ou.isTrue(!(0===o&&!e.equals(t)),"Bad distance calculation"),o},au.nonRobustComputeEdgeDistance=function(e,t,n){var r=e.x-t.x,i=e.y-t.y,o=Math.sqrt(r*r+i*i);return ou.isTrue(!(0===o&&!e.equals(t)),"Invalid distance calculation"),o},su.DONT_INTERSECT.get=function(){return 0},su.DO_INTERSECT.get=function(){return 1},su.COLLINEAR.get=function(){return 2},su.NO_INTERSECTION.get=function(){return 0},su.POINT_INTERSECTION.get=function(){return 1},su.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(au,su);var lu=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(e){var t=new Kl(this._inputLines[0][0],this._inputLines[0][1]),n=new Kl(this._inputLines[1][0],this._inputLines[1][1]);return t.contains(e)&&n.contains(e)},t.prototype.computeIntersection=function(){if(3!==arguments.length)return e.prototype.computeIntersection.apply(this,arguments);var t=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,Kl.intersects(n,r,t)&&0===fu.orientationIndex(n,r,t)&&0===fu.orientationIndex(r,n,t))return this._isProper=!0,(t.equals(n)||t.equals(r))&&(this._isProper=!1),this._result=e.POINT_INTERSECTION,null;this._result=e.NO_INTERSECTION},t.prototype.normalizeToMinimum=function(e,t,n,r,i){i.x=this.smallestInAbsValue(e.x,t.x,n.x,r.x),i.y=this.smallestInAbsValue(e.y,t.y,n.y,r.y),e.x-=i.x,e.y-=i.y,t.x-=i.x,t.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},t.prototype.safeHCoordinateIntersection=function(e,n,r,i){var o=null;try{o=Zl.intersection(e,n,r,i)}catch(a){if(!(a instanceof Gl))throw a;o=t.nearestEndpoint(e,n,r,i)}return o},t.prototype.intersection=function(e,n,r,i){var o=this.intersectionWithNormalization(e,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new Tl(t.nearestEndpoint(e,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},t.prototype.smallestInAbsValue=function(e,t,n,r){var i=e,o=Math.abs(i);return Math.abs(t)1e-4&&Xl.out.println("Distance = "+i.distance(o))},t.prototype.intersectionWithNormalization=function(e,t,n,r){var i=new Tl(e),o=new Tl(t),a=new Tl(n),s=new Tl(r),l=new Tl;this.normalizeToEnvCentre(i,o,a,s,l);var u=this.safeHCoordinateIntersection(i,o,a,s);return u.x+=l.x,u.y+=l.y,u},t.prototype.computeCollinearIntersection=function(t,n,r,i){var o=Kl.intersects(t,n,r),a=Kl.intersects(t,n,i),s=Kl.intersects(r,i,t),l=Kl.intersects(r,i,n);return o&&a?(this._intPt[0]=r,this._intPt[1]=i,e.COLLINEAR_INTERSECTION):s&&l?(this._intPt[0]=t,this._intPt[1]=n,e.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=t,!r.equals(t)||a||l?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):o&&l?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||a||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=t,!i.equals(t)||o||l?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):a&&l?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):e.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(e,t,n,r,i){var o=e.xt.x?e.x:t.x,l=e.y>t.y?e.y:t.y,u=n.xr.x?n.x:r.x,d=n.y>r.y?n.y:r.y,p=((o>u?o:u)+(sc?a:c)+(l0&&a>0||o<0&&a<0)return e.NO_INTERSECTION;var s=fu.orientationIndex(r,i,t),l=fu.orientationIndex(r,i,n);return s>0&&l>0||s<0&&l<0?e.NO_INTERSECTION:0===o&&0===a&&0===s&&0===l?this.computeCollinearIntersection(t,n,r,i):(0===o||0===a||0===s||0===l?(this._isProper=!1,t.equals2D(r)||t.equals2D(i)?this._intPt[0]=t:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new Tl(r):0===a?this._intPt[0]=new Tl(i):0===s?this._intPt[0]=new Tl(t):0===l&&(this._intPt[0]=new Tl(n))):(this._isProper=!0,this._intPt[0]=this.intersection(t,n,r,i)),e.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(e,t,n,r){var i=e,o=fu.distancePointLine(e,n,r),a=fu.distancePointLine(t,n,r);return a0?n>0?-i:i:n>0?i:-i;if(0===t||0===n)return r>0?e>0?i:-i:e>0?-i:i;if(t>0?r>0?t<=r||(i=-i,o=e,e=n,n=o,o=t,t=r,r=o):t<=-r?(i=-i,n=-n,r=-r):(o=e,e=-n,n=o,o=t,t=-r,r=o):r>0?-t<=r?(i=-i,e=-e,t=-t):(o=-e,e=n,n=o,o=-t,t=r,r=o):t>=r?(e=-e,t=-t,n=-n,r=-r):(i=-i,o=-e,e=-n,n=o,o=-t,t=-r,r=o),e>0){if(!(n>0))return i;if(!(e<=n))return i}else{if(n>0)return-i;if(!(e>=n))return-i;i=-i,e=-e,n=-n}for(;;){if((r-=(a=Math.floor(n/e))*t)<0)return-i;if(r>t)return i;if(e>(n-=a*e)+n){if(tr+r)return-i;n=e-n,r=t-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if((t-=(a=Math.floor(e/n))*r)<0)return i;if(t>r)return-i;if(n>(e-=a*n)+e){if(rt+t)return i;e=n-e,t=r-t,i=-i}if(0===t)return 0===e?0:i;if(0===e)return-i}};var cu=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};cu.prototype.countSegment=function(e,t){if(e.xr&&(n=t.x,r=e.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){var i=e.x-this._p.x,o=e.y-this._p.y,a=t.x-this._p.x,s=t.y-this._p.y,l=uu.signOfDet2x2(i,o,a,s);if(0===l)return this._isPointOnSegment=!0,null;s0&&this._crossingCount++}},cu.prototype.isPointInPolygon=function(){return this.getLocation()!==Ll.EXTERIOR},cu.prototype.getLocation=function(){return this._isPointOnSegment?Ll.BOUNDARY:this._crossingCount%2==1?Ll.INTERIOR:Ll.EXTERIOR},cu.prototype.isOnSegment=function(){return this._isPointOnSegment},cu.prototype.interfaces_=function(){return[]},cu.prototype.getClass=function(){return cu},cu.locatePointInRing=function(){if(arguments[0]instanceof Tl&&Dl(arguments[1],Wl)){for(var e=arguments[0],t=arguments[1],n=new cu(e),r=new Tl,i=new Tl,o=1;o1||s<0||s>1)&&(i=!0)}}else i=!0;return i?jl.min(fu.distancePointLine(e,n,r),fu.distancePointLine(t,n,r),fu.distancePointLine(n,e,t),fu.distancePointLine(r,e,t)):0},fu.isPointInRing=function(e,t){return fu.locatePointInRing(e,t)!==Ll.EXTERIOR},fu.computeLength=function(e){var t=e.size();if(t<=1)return 0;var n=0,r=new Tl;e.getCoordinate(0,r);for(var i=r.x,o=r.y,a=1;an.y&&(n=o,r=i)}var a=r;do{(a-=1)<0&&(a=t)}while(e[a].equals2D(n)&&a!==r);var s=r;do{s=(s+1)%t}while(e[s].equals2D(n)&&s!==r);var l=e[a],u=e[s];if(l.equals2D(n)||u.equals2D(n)||l.equals2D(u))return!1;var c=fu.computeOrientation(l,n,u);return 0===c?l.x>u.x:c>0},fu.locatePointInRing=function(e,t){return cu.locatePointInRing(e,t)},fu.distancePointLinePerpendicular=function(e,t,n){var r=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),i=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/r;return Math.abs(i)*Math.sqrt(r)},fu.computeOrientation=function(e,t,n){return fu.orientationIndex(e,t,n)},fu.distancePointLine=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];if(0===t.length)throw new Al("Line array must contain at least one vertex");for(var n=e.distance(t[0]),r=0;r=1)return o.distance(s);var c=((a.y-o.y)*(s.x-a.x)-(a.x-o.x)*(s.y-a.y))/l;return Math.abs(c)*Math.sqrt(l)}},fu.isOnLine=function(e,t){for(var n=new lu,r=1;r0},Au.prototype.interfaces_=function(){return[vu]},Au.prototype.getClass=function(){return Au};var xu=function(){};xu.prototype.isInBoundary=function(e){return e>1},xu.prototype.interfaces_=function(){return[vu]},xu.prototype.getClass=function(){return xu};var wu=function(){};wu.prototype.isInBoundary=function(e){return 1===e},wu.prototype.interfaces_=function(){return[vu]},wu.prototype.getClass=function(){return wu};var Eu=function(){};function Ou(e){this.message=e||""}Eu.prototype.add=function(){},Eu.prototype.addAll=function(){},Eu.prototype.isEmpty=function(){},Eu.prototype.iterator=function(){},Eu.prototype.size=function(){},Eu.prototype.toArray=function(){},Eu.prototype.remove=function(){},Ou.prototype=new Error,Ou.prototype.name="IndexOutOfBoundsException";var Mu=function(){};Mu.prototype.hasNext=function(){},Mu.prototype.next=function(){},Mu.prototype.remove=function(){};var Su=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Eu);function Tu(e){this.message=e||""}Tu.prototype=new Error,Tu.prototype.name="NoSuchElementException";var Cu=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof Eu&&this.addAll(arguments[0])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[e,Eu]},t.prototype.add=function(e){return 1===arguments.length?this.array_.push(e):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},t.prototype.set=function(e,t){var n=this.array_[e];return this.array_[e]=t,n},t.prototype.iterator=function(){return new Pu(this)},t.prototype.get=function(e){if(e<0||e>=this.size())throw new Ou;return this.array_[e]},t.prototype.isEmpty=function(){return 0===this.array_.length},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t=1){var s=this.get(this.size()-1);if(s.equals2D(o))return null}e.prototype.add.call(this,o)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var l=arguments[0],u=arguments[1];return this.add(l,u),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var c=arguments[0],f=arguments[1],d=arguments[2];if(d)for(var p=0;p=0;h--)t.add(c[h],f);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof Tl){var g=arguments[0],m=arguments[1],y=arguments[2];if(!y){var v=this.size();if(v>0){if(g>0){var b=this.get(g-1);if(b.equals2D(m))return null}if(gE&&(O=-1);for(var M=w;M!==E;M+=O)t.add(A[M],x);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new Tl(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,n),t}(Cu),Lu=function(){},Ru={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Ru.ForwardComparator.get=function(){return Du},Ru.BidirectionalComparator.get=function(){return ju},Ru.coordArrayType.get=function(){return new Array(0).fill(null)},Lu.prototype.interfaces_=function(){return[]},Lu.prototype.getClass=function(){return Lu},Lu.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))},Lu.ptNotInList=function(e,t){for(var n=0;n=e?t:[]},Lu.indexOf=function(e,t){for(var n=0;n0)&&(t=e[n]);return t},Lu.extract=function(e,t,n){t=jl.clamp(t,0,e.length);var r=(n=jl.clamp(n,-1,e.length))-t+1;n<0&&(r=0),t>=e.length&&(r=0),nr.length)return 1;if(0===n.length)return 0;var i=Lu.compare(n,r);return Lu.isEqualReversed(n,r)?0:i},ju.prototype.OLDcompare=function(e,t){var n=e,r=t;if(n.lengthr.length)return 1;if(0===n.length)return 0;for(var i=Lu.increasingDirection(n),o=Lu.increasingDirection(r),a=i>0?0:n.length-1,s=o>0?0:n.length-1,l=0;l0))return t.value;t=t.right}}return null},Gu.prototype.put=function(e,t){if(null===this.root_)return this.root_={key:e,value:t,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=e.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=t,o}i=i.right}}while(null!==i);var a={key:e,left:null,right:null,value:t,parent:n,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},Gu.prototype.fixAfterInsertion=function(e){var t=this;for(e.color=1;null!=e&&e!==this.root_&&1===e.parent.color;)if(Hu(e)===qu(Hu(Hu(e)))){var n=Yu(Hu(Hu(e)));1===Vu(n)?(Wu(Hu(e),0),Wu(n,0),Wu(Hu(Hu(e)),1),e=Hu(Hu(e))):(e===Yu(Hu(e))&&(e=Hu(e),t.rotateLeft(e)),Wu(Hu(e),0),Wu(Hu(Hu(e)),1),t.rotateRight(Hu(Hu(e))))}else{var r=qu(Hu(Hu(e)));1===Vu(r)?(Wu(Hu(e),0),Wu(r,0),Wu(Hu(Hu(e)),1),e=Hu(Hu(e))):(e===qu(Hu(e))&&(e=Hu(e),t.rotateRight(e)),Wu(Hu(e),0),Wu(Hu(Hu(e)),1),t.rotateLeft(Hu(Hu(e))))}this.root_.color=0},Gu.prototype.values=function(){var e=new Cu,t=this.getFirstEntry();if(null!==t)for(e.add(t.value);null!==(t=Gu.successor(t));)e.add(t.value);return e},Gu.prototype.entrySet=function(){var e=new Bu,t=this.getFirstEntry();if(null!==t)for(e.add(t);null!==(t=Gu.successor(t));)e.add(t);return e},Gu.prototype.rotateLeft=function(e){if(null!=e){var t=e.right;e.right=t.left,null!=t.left&&(t.left.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}},Gu.prototype.rotateRight=function(e){if(null!=e){var t=e.left;e.left=t.right,null!=t.right&&(t.right.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.right===e?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}},Gu.prototype.getFirstEntry=function(){var e=this.root_;if(null!=e)for(;null!=e.left;)e=e.left;return e},Gu.successor=function(e){if(null===e)return null;if(null!==e.right){for(var t=e.right;null!==t.left;)t=t.left;return t}for(var n=e.parent,r=e;null!==n&&r===n.right;)r=n,n=n.parent;return n},Gu.prototype.size=function(){return this.size_};var Xu=function(){};function Zu(){}function Ku(){this.array_=[],arguments[0]instanceof Eu&&this.addAll(arguments[0])}Xu.prototype.interfaces_=function(){return[]},Xu.prototype.getClass=function(){return Xu},Zu.prototype=new zu,Ku.prototype=new Zu,Ku.prototype.contains=function(e){for(var t=0,n=this.array_.length;t=0;){var a=i.substring(0,o);r.add(a),o=(i=i.substring(o+n)).indexOf(t)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),l=0;l0)for(var o=i;o0&&r.append(" ");for(var o=0;o0&&r.append(","),r.append(pc.toString(e.getOrdinate(i,o)))}return r.append(")"),r.toString()}},gc.ensureValidRing=function(e,t){var n=t.size();return 0===n?t:n<=3?gc.createClosedRing(e,t,4):t.getOrdinate(0,Wl.X)===t.getOrdinate(n-1,Wl.X)&&t.getOrdinate(0,Wl.Y)===t.getOrdinate(n-1,Wl.Y)?t:gc.createClosedRing(e,t,n+1)},gc.createClosedRing=function(e,t,n){var r=e.create(n,t.getDimension()),i=t.size();gc.copy(t,0,r,0,i);for(var o=i;o0&&gc.reverse(e._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Qu.FALSE:0},t.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return fu.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var e=this._points.copy();return gc.reverse(e),this.getFactory().createLineString(e)},t.prototype.compareToSameClass=function(){var e=this;if(1===arguments.length){for(var t=arguments[0],n=t,r=0,i=0;r= 2)");this._points=e},t.prototype.isCoordinate=function(e){for(var t=0;t=1&&this.getCoordinateSequence().size()= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,n),t}(mc),wc=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return hu.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,n)}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var e=this._geometries.length,t=new Array(e).fill(null),n=0;n0?t.createPoint(n[0]):t.createPoint():e},Sc.prototype.interfaces_=function(){return[Ec.GeometryEditorOperation]},Sc.prototype.getClass=function(){return Sc};var Tc=function(){};Tc.prototype.edit=function(e,t){return e instanceof xc?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof mc?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof vc?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},Tc.prototype.interfaces_=function(){return[Ec.GeometryEditorOperation]},Tc.prototype.getClass=function(){return Tc};var Cc=function(){var e=this;if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var n=0;n0){var e=new Nl(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var t=1;t3&&(r=3),r<2?new Cc(n):new Cc(n,r)}},kc.prototype.interfaces_=function(){return[kl,Sl]},kc.prototype.getClass=function(){return kc},kc.instance=function(){return kc.instanceObject},Lc.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Lc.instanceObject.get=function(){return new kc},Object.defineProperties(kc,Lc);var Rc=function(e){function t(){e.call(this),this.map_=new Map}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return this.map_.get(e)||null},t.prototype.put=function(e,t){return this.map_.set(e,t),t},t.prototype.values=function(){for(var e=new Cu,t=this.map_.values(),n=t.next();!n.done;)e.add(n.value),n=t.next();return e},t.prototype.entrySet=function(){var e=new Bu;return this.map_.entries().forEach((function(t){return e.add(t)})),e},t.prototype.size=function(){return this.map_.size()},t}(Iu),Dc=function e(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=e.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof Ic){var t=arguments[0];this._modelType=t,t===e.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=e.FIXED,this.setScale(n)}else if(arguments[0]instanceof e){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},jc={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Dc.prototype.equals=function(e){if(!(e instanceof Dc))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},Dc.prototype.compareTo=function(e){var t=e,n=this.getMaximumSignificantDigits(),r=t.getMaximumSignificantDigits();return new Fl(n).compareTo(new Fl(r))},Dc.prototype.getScale=function(){return this._scale},Dc.prototype.isFloating=function(){return this._modelType===Dc.FLOATING||this._modelType===Dc.FLOATING_SINGLE},Dc.prototype.getType=function(){return this._modelType},Dc.prototype.toString=function(){var e="UNKNOWN";return this._modelType===Dc.FLOATING?e="Floating":this._modelType===Dc.FLOATING_SINGLE?e="Floating-Single":this._modelType===Dc.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},Dc.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var e=arguments[0];return xl.isNaN(e)||this._modelType===Dc.FLOATING_SINGLE?e:this._modelType===Dc.FIXED?Math.round(e*this._scale)/this._scale:e}if(arguments[0]instanceof Tl){var t=arguments[0];if(this._modelType===Dc.FLOATING)return null;t.x=this.makePrecise(t.x),t.y=this.makePrecise(t.y)}},Dc.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===Dc.FLOATING?e=16:this._modelType===Dc.FLOATING_SINGLE?e=6:this._modelType===Dc.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},Dc.prototype.setScale=function(e){this._scale=Math.abs(e)},Dc.prototype.interfaces_=function(){return[Sl,El]},Dc.prototype.getClass=function(){return Dc},Dc.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},jc.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},jc.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Dc,jc);var Ic=function e(t){this._name=t||null,e.nameToTypeMap.put(t,this)},Nc={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Ic.prototype.readResolve=function(){return Ic.nameToTypeMap.get(this._name)},Ic.prototype.toString=function(){return this._name},Ic.prototype.interfaces_=function(){return[Sl]},Ic.prototype.getClass=function(){return Ic},Nc.serialVersionUID.get=function(){return-552860263173159e4},Nc.nameToTypeMap.get=function(){return new Rc},Object.defineProperties(Ic,Nc),Dc.Type=Ic,Dc.FIXED=new Ic("FIXED"),Dc.FLOATING=new Ic("FLOATING"),Dc.FLOATING_SINGLE=new Ic("FLOATING SINGLE");var Fc=function e(){this._precisionModel=new Dc,this._SRID=0,this._coordinateSequenceFactory=e.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?Dl(arguments[0],kl)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Dc&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},zc={serialVersionUID:{configurable:!0}};Fc.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new Tl(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new Tl(e.getMinX(),e.getMinY()),new Tl(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new Tl(e.getMinX(),e.getMinY()),new Tl(e.getMinX(),e.getMaxY()),new Tl(e.getMaxX(),e.getMaxY()),new Tl(e.getMaxX(),e.getMinY()),new Tl(e.getMinX(),e.getMinY())]),null)},Fc.prototype.createLineString=function(e){return e?e instanceof Array?new mc(this.getCoordinateSequenceFactory().create(e),this):Dl(e,Wl)?new mc(e,this):void 0:new mc(this.getCoordinateSequenceFactory().create([]),this)},Fc.prototype.createMultiLineString=function(){if(0===arguments.length)return new ic(null,this);if(1===arguments.length){var e=arguments[0];return new ic(e,this)}},Fc.prototype.buildGeometry=function(e){for(var t=null,n=!1,r=!1,i=e.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===t&&(t=a),a!==t&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===t)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(Fc.toGeometryArray(e));var s=e.iterator().next();if(e.size()>1){if(s instanceof _c)return this.createMultiPolygon(Fc.toPolygonArray(e));if(s instanceof mc)return this.createMultiLineString(Fc.toLineStringArray(e));if(s instanceof vc)return this.createMultiPoint(Fc.toPointArray(e));ou.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},Fc.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)},Fc.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Tl){var e=arguments[0];return this.createPoint(null!==e?this.getCoordinateSequenceFactory().create([e]):null)}if(Dl(arguments[0],Wl)){var t=arguments[0];return new vc(t,this)}}},Fc.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},Fc.prototype.createPolygon=function(){if(0===arguments.length)return new _c(null,null,this);if(1===arguments.length){if(Dl(arguments[0],Wl)){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Array){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof xc){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return new _c(r,i,this)}},Fc.prototype.getSRID=function(){return this._SRID},Fc.prototype.createGeometryCollection=function(){if(0===arguments.length)return new rc(null,this);if(1===arguments.length){var e=arguments[0];return new rc(e,this)}},Fc.prototype.createGeometry=function(e){return new Ec(this).edit(e,{edit:function(){if(2===arguments.length){var e=arguments[0];return this._coordinateSequenceFactory.create(e)}}})},Fc.prototype.getPrecisionModel=function(){return this._precisionModel},Fc.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return this.createLinearRing(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(Dl(arguments[0],Wl)){var t=arguments[0];return new xc(t,this)}}},Fc.prototype.createMultiPolygon=function(){if(0===arguments.length)return new wc(null,this);if(1===arguments.length){var e=arguments[0];return new wc(e,this)}},Fc.prototype.createMultiPoint=function(){var e=this;if(0===arguments.length)return new Ac(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new Ac(t,this)}if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(null!==n?this.getCoordinateSequenceFactory().create(n):null)}if(Dl(arguments[0],Wl)){var r=arguments[0];if(null===r)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(r.size()).fill(null),o=0;o=this.size())throw new Error;return this.array_[e]},Zc.prototype.push=function(e){return this.array_.push(e),e},Zc.prototype.pop=function(e){if(0===this.array_.length)throw new Xc;return this.array_.pop()},Zc.prototype.peek=function(){if(0===this.array_.length)throw new Xc;return this.array_[this.array_.length-1]},Zc.prototype.empty=function(){return 0===this.array_.length},Zc.prototype.isEmpty=function(){return this.empty()},Zc.prototype.search=function(e){return this.array_.indexOf(e)},Zc.prototype.size=function(){return this.array_.length},Zc.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===fu.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Kc.prototype.getRightmostSideOfSegment=function(e,t){var n=e.getEdge().getCoordinates();if(t<0||t+1>=n.length)return-1;if(n[t].y===n[t+1].y)return-1;var r=Yc.LEFT;return n[t].yt._minCoord.x)&&(t._minDe=e,t._minIndex=r,t._minCoord=n[r])},Kc.prototype.findRightmostEdgeAtNode=function(){var e=this._minDe.getNode().getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Kc.prototype.findEdge=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();n.isForward()&&this.checkForRightmostCoordinate(n)}ou.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Yc.LEFT&&(this._orientedDe=this._minDe.getSym())},Kc.prototype.interfaces_=function(){return[]},Kc.prototype.getClass=function(){return Kc};var $c=function(e){function t(n,r){e.call(this,t.msgWithCoord(n,r)),this.pt=r?new Tl(r):null,this.name="TopologyException"}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(e,t){return t?e:e+" [ "+t+" ]"},t}(ru),Jc=function(){this.array_=[]};Jc.prototype.addLast=function(e){this.array_.push(e)},Jc.prototype.removeFirst=function(){return this.array_.shift()},Jc.prototype.isEmpty=function(){return 0===this.array_.length};var Qc=function(){this._finder=null,this._dirEdgeList=new Cu,this._nodes=new Cu,this._rightMostCoord=null,this._env=null,this._finder=new Kc};Qc.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();)e.next().setVisited(!1)},Qc.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Qc.prototype.computeNodeDepth=function(e){for(var t=null,n=e.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){t=r;break}}if(null===t)throw new $c("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(t);for(var i=e.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Qc.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(Yc.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},Qc.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Qc.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(Yc.RIGHT)>=1&&t.getDepth(Yc.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},Qc.prototype.computeDepths=function(e){var t=new Bu,n=new Jc,r=e.getNode();for(n.addLast(r),t.add(r),e.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();t.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();t.contains(s)||(n.addLast(s),t.add(s))}}}},Qc.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.xt._rightMostCoord.x?1:0},Qc.prototype.getEnvelope=function(){if(null===this._env){for(var e=new Kl,t=this._dirEdgeList.iterator();t.hasNext();)for(var n=t.next().getEdge().getCoordinates(),r=0;rthis.location.length){var t=new Array(3).fill(null);t[Yc.ON]=this.location[Yc.ON],t[Yc.LEFT]=Ll.NONE,t[Yc.RIGHT]=Ll.NONE,this.location=t}for(var n=0;n1&&e.append(Ll.toLocationSymbol(this.location[Yc.LEFT])),e.append(Ll.toLocationSymbol(this.location[Yc.ON])),this.location.length>1&&e.append(Ll.toLocationSymbol(this.location[Yc.RIGHT])),e.toString()},ef.prototype.setLocations=function(e,t,n){this.location[Yc.ON]=e,this.location[Yc.LEFT]=t,this.location[Yc.RIGHT]=n},ef.prototype.get=function(e){return e1},ef.prototype.isAnyNull=function(){for(var e=0;ee._maxNodeDegree&&(e._maxNodeDegree=n),t=e.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},nf.prototype.addPoints=function(e,t,n){var r=e.getCoordinates();if(t){var i=1;n&&(i=0);for(var o=i;o=0;s--)this._pts.add(r[s])}},nf.prototype.isHole=function(){return this._isHole},nf.prototype.setInResult=function(){var e=this._startDe;do{e.getEdge().setInResult(!0),e=e.getNext()}while(e!==this._startDe)},nf.prototype.containsPoint=function(e){var t=this.getLinearRing();if(!t.getEnvelopeInternal().contains(e))return!1;if(!fu.isPointInRing(e,t.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(e))return!1;return!0},nf.prototype.addHole=function(e){this._holes.add(e)},nf.prototype.isShell=function(){return null===this._shell},nf.prototype.getLabel=function(){return this._label},nf.prototype.getEdges=function(){return this._edges},nf.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},nf.prototype.getShell=function(){return this._shell},nf.prototype.mergeLabel=function(){if(1===arguments.length){var e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=t.getLocation(n,Yc.RIGHT);if(r===Ll.NONE)return null;if(this._label.getLocation(n)===Ll.NONE)return this._label.setLocation(n,r),null}},nf.prototype.setShell=function(e){this._shell=e,null!==e&&e.addHole(this)},nf.prototype.toPolygon=function(e){for(var t=new Array(this._holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(e)},af.prototype.isInResult=function(){return this._isInResult},af.prototype.isVisited=function(){return this._isVisited},af.prototype.interfaces_=function(){return[]},af.prototype.getClass=function(){return af};var sf=function(e){function t(){e.call(this),this._coord=null,this._edges=null;var t=arguments[0],n=arguments[1];this._coord=t,this._edges=n,this._label=new tf(0,Ll.NONE)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var e=this.getEdges().getEdges().iterator();e.hasNext();)if(e.next().getEdge().isInResult())return!0;return!1},t.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(e){e.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(e){},t.prototype.computeMergedLocation=function(e,t){var n=Ll.NONE;if(n=this._label.getLocation(t),!e.isNull(t)){var r=e.getLocation(t);n!==Ll.BOUNDARY&&(n=r)}return n},t.prototype.setLabel=function(){if(2!==arguments.length)return e.prototype.setLabel.apply(this,arguments);var t=arguments[0],n=arguments[1];null===this._label?this._label=new tf(t,n):this._label.setLocation(t,n)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var e=this;if(arguments[0]instanceof t){var n=arguments[0];this.mergeLabel(n._label)}else if(arguments[0]instanceof tf)for(var r=arguments[0],i=0;i<2;i++){var o=e.computeMergedLocation(r,i),a=e._label.getLocation(i);a===Ll.NONE&&e._label.setLocation(i,o)}},t.prototype.add=function(e){this._edges.insert(e),e.setNode(this)},t.prototype.setLabelBoundary=function(e){if(null===this._label)return null;var t=Ll.NONE;null!==this._label&&(t=this._label.getLocation(e));var n=null;switch(t){case Ll.BOUNDARY:n=Ll.INTERIOR;break;case Ll.INTERIOR:default:n=Ll.BOUNDARY}this._label.setLocation(e,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(af),lf=function(){this.nodeMap=new Gu,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};lf.prototype.find=function(e){return this.nodeMap.get(e)},lf.prototype.addNode=function(){if(arguments[0]instanceof Tl){var e=arguments[0],t=this.nodeMap.get(e);return null===t&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}if(arguments[0]instanceof sf){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},lf.prototype.print=function(e){for(var t=this.iterator();t.hasNext();)t.next().print(e)},lf.prototype.iterator=function(){return this.nodeMap.values().iterator()},lf.prototype.values=function(){return this.nodeMap.values()},lf.prototype.getBoundaryNodes=function(e){for(var t=new Cu,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(e)===Ll.BOUNDARY&&t.add(r)}return t},lf.prototype.add=function(e){var t=e.getCoordinate();this.addNode(t).add(e)},lf.prototype.interfaces_=function(){return[]},lf.prototype.getClass=function(){return lf};var uf=function(){},cf={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};uf.prototype.interfaces_=function(){return[]},uf.prototype.getClass=function(){return uf},uf.isNorthern=function(e){return e===uf.NE||e===uf.NW},uf.isOpposite=function(e,t){return e!==t&&2==(e-t+4)%4},uf.commonHalfPlane=function(e,t){if(e===t)return e;if(2==(e-t+4)%4)return-1;var n=et?e:t)?3:n},uf.isInHalfPlane=function(e,t){return t===uf.SE?e===uf.SE||e===uf.SW:e===t||e===t+1},uf.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new Al("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?uf.NE:uf.SE:t>=0?uf.NW:uf.SW}if(arguments[0]instanceof Tl&&arguments[1]instanceof Tl){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new Al("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?uf.NE:uf.SE:r.y>=n.y?uf.NW:uf.SW}},cf.NE.get=function(){return 0},cf.NW.get=function(){return 1},cf.SW.get=function(){return 2},cf.SE.get=function(){return 3},Object.defineProperties(uf,cf);var ff=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var e=arguments[0];this._edge=e}else if(3===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=t,this.init(n,r),this._label=i}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],l=arguments[3];this._edge=o,this.init(a,s),this._label=l}};ff.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),t.add(s)):n.addAll(a)}else r.add(o)}return r},gf.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();)if(t.next().containsPoint(e))return!0;return!1},gf.prototype.buildMaximalEdgeRings=function(e){for(var t=new Cu,n=e.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new of(r,this._geometryFactory);t.add(i),i.setInResult()}}return t},gf.prototype.placePolygonHoles=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(e)}},gf.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},gf.prototype.findEdgeRingContaining=function(e,t){for(var n=e.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,a=null,s=t.iterator();s.hasNext();){var l=s.next(),u=l.getLinearRing(),c=u.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;c.contains(r)&&fu.isPointInRing(i,u.getCoordinates())&&(f=!0),f&&(null===o||a.contains(c))&&(o=l)}return o},gf.prototype.findShell=function(e){for(var t=0,n=null,r=e.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,t++)}return ou.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n},gf.prototype.add=function(){if(1===arguments.length){var e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(2===arguments.length){var t=arguments[0],n=arguments[1];hf.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(t),i=new Cu,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},gf.prototype.interfaces_=function(){return[]},gf.prototype.getClass=function(){return gf};var mf=function(){};mf.prototype.getBounds=function(){},mf.prototype.interfaces_=function(){return[]},mf.prototype.getClass=function(){return mf};var yf=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};yf.prototype.getItem=function(){return this._item},yf.prototype.getBounds=function(){return this._bounds},yf.prototype.interfaces_=function(){return[mf,Sl]},yf.prototype.getClass=function(){return yf};var vf=function(){this._size=null,this._items=null,this._size=0,this._items=new Cu,this._items.add(null)};vf.prototype.poll=function(){if(this.isEmpty())return null;var e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e},vf.prototype.size=function(){return this._size},vf.prototype.reorder=function(e){for(var t=this,n=null,r=this._items.get(e);2*e<=this._size&&((n=2*e)!==t._size&&t._items.get(n+1).compareTo(t._items.get(n))<0&&n++,t._items.get(n).compareTo(r)<0);e=n)t._items.set(e,t._items.get(n));this._items.set(e,r)},vf.prototype.clear=function(){this._size=0,this._items.clear()},vf.prototype.isEmpty=function(){return 0===this._size},vf.prototype.add=function(e){this._items.add(null),this._size+=1;var t=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(t/2)))<0;t/=2)this._items.set(t,this._items.get(Math.trunc(t/2)));this._items.set(t,e)},vf.prototype.interfaces_=function(){return[]},vf.prototype.getClass=function(){return vf};var bf=function(){};bf.prototype.visitItem=function(e){},bf.prototype.interfaces_=function(){return[]},bf.prototype.getClass=function(){return bf};var _f=function(){};_f.prototype.insert=function(e,t){},_f.prototype.remove=function(e,t){},_f.prototype.query=function(){},_f.prototype.interfaces_=function(){return[]},_f.prototype.getClass=function(){return _f};var Af=function(){if(this._childBoundables=new Cu,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this._level=e}},xf={serialVersionUID:{configurable:!0}};Af.prototype.getLevel=function(){return this._level},Af.prototype.size=function(){return this._childBoundables.size()},Af.prototype.getChildBoundables=function(){return this._childBoundables},Af.prototype.addChildBoundable=function(e){ou.isTrue(null===this._bounds),this._childBoundables.add(e)},Af.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Af.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Af.prototype.interfaces_=function(){return[mf,Sl]},Af.prototype.getClass=function(){return Af},xf.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Af,xf);var wf=function(){};wf.reverseOrder=function(){return{compare:function(e,t){return t.compareTo(e)}}},wf.min=function(e){return wf.sort(e),e.get(0)},wf.sort=function(e,t){var n=e.toArray();t?Ju.sort(n,t):Ju.sort(n);for(var r=e.iterator(),i=0,o=n.length;iEf.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,t),null):(this.expand(this._boundable2,this._boundable1,e,t),null);if(n)return this.expand(this._boundable1,this._boundable2,e,t),null;if(r)return this.expand(this._boundable2,this._boundable1,e,t),null;throw new Al("neither boundable is composite")},Ef.prototype.isLeaves=function(){return!(Ef.isComposite(this._boundable1)||Ef.isComposite(this._boundable2))},Ef.prototype.compareTo=function(e){var t=e;return this._distancet._distance?1:0},Ef.prototype.expand=function(e,t,n,r){for(var i=e.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new Ef(o,t,this._itemDistance);a.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},Mf={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Of.prototype.getNodeCapacity=function(){return this._nodeCapacity},Of.prototype.lastNode=function(e){return e.get(e.size()-1)},Of.prototype.size=function(){var e=this;if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=arguments[0],n=0,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Af?n+=e.size(i):i instanceof yf&&(n+=1)}return n}},Of.prototype.removeItem=function(e,t){for(var n=null,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof yf&&i.getItem()===t&&(n=i)}return null!==n&&(e.getChildBoundables().remove(n),!0)},Of.prototype.itemsTree=function(){var e=this;if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new Cu:t}if(1===arguments.length){for(var n=arguments[0],r=new Cu,i=n.getChildBoundables().iterator();i.hasNext();){var o=i.next();if(o instanceof Af){var a=e.itemsTree(o);null!==a&&r.add(a)}else o instanceof yf?r.add(o.getItem()):ou.shouldNeverReachHere()}return r.size()<=0?null:r}},Of.prototype.insert=function(e,t){ou.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new yf(e,t))},Of.prototype.boundablesAtLevel=function(){var e=this;if(1===arguments.length){var t=arguments[0],n=new Cu;return this.boundablesAtLevel(t,this._root,n),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(ou.isTrue(r>-2),i.getLevel()===r)return o.add(i),null;for(var a=i.getChildBoundables().iterator();a.hasNext();){var s=a.next();s instanceof Af?e.boundablesAtLevel(r,s,o):(ou.isTrue(s instanceof yf),-1===r&&o.add(s))}return null}},Of.prototype.query=function(){var e=this;if(1===arguments.length){var t=arguments[0];this.build();var n=new Cu;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,n),n}if(2===arguments.length){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(3===arguments.length)if(Dl(arguments[2],bf)&&arguments[0]instanceof Object&&arguments[1]instanceof Af)for(var o=arguments[0],a=arguments[1],s=arguments[2],l=a.getChildBoundables(),u=0;un&&(n=o)}}return n+1}},Of.prototype.createParentBoundables=function(e,t){var n=this;ou.isTrue(!e.isEmpty());var r=new Cu;r.add(this.createNode(t));var i=new Cu(e);wf.sort(i,this.getComparator());for(var o=i.iterator();o.hasNext();){var a=o.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(t)),n.lastNode(r).addChildBoundable(a)}return r},Of.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Of.prototype.interfaces_=function(){return[Sl]},Of.prototype.getClass=function(){return Of},Of.compareDoubles=function(e,t){return e>t?1:e0);for(var n=new Cu,r=0;r0;){var d=f.poll(),p=d.getDistance();if(p>=u)break;d.isLeaves()?(u=p,c=d):d.expandToQueue(f,u)}return[c.getBoundable(0).getItem(),c.getBoundable(1).getItem()]}}else if(3===arguments.length){var h=arguments[0],g=arguments[1],m=arguments[2],y=new yf(h,g),v=new Ef(this.getRoot(),y,m);return this.nearestNeighbour(v)[0]}},t.prototype.interfaces_=function(){return[_f,Sl]},t.prototype.getClass=function(){return t},t.centreX=function(e){return t.avg(e.getMinX(),e.getMaxX())},t.avg=function(e,t){return(e+t)/2},t.centreY=function(e){return t.avg(e.getMinY(),e.getMaxY())},n.STRtreeNode.get=function(){return Pf},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[Ml]},compare:function(n,r){return e.compareDoubles(t.centreX(n.getBounds()),t.centreX(r.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[Ml]},compare:function(n,r){return e.compareDoubles(t.centreY(n.getBounds()),t.centreY(r.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[e.IntersectsOp]},intersects:function(e,t){return e.intersects(t)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,n),t}(Of),Pf=function(e){function t(){var t=arguments[0];e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var e=null,t=this.getChildBoundables().iterator();t.hasNext();){var n=t.next();null===e?e=new Kl(n.getBounds()):e.expandToInclude(n.getBounds())}return e},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Af),kf=function(){};kf.prototype.interfaces_=function(){return[]},kf.prototype.getClass=function(){return kf},kf.relativeSign=function(e,t){return et?1:0},kf.compare=function(e,t,n){if(t.equals2D(n))return 0;var r=kf.relativeSign(t.x,n.x),i=kf.relativeSign(t.y,n.y);switch(e){case 0:return kf.compareValue(r,i);case 1:return kf.compareValue(i,r);case 2:return kf.compareValue(i,-r);case 3:return kf.compareValue(-r,i);case 4:return kf.compareValue(-r,-i);case 5:return kf.compareValue(-i,-r);case 6:return kf.compareValue(-i,r);case 7:return kf.compareValue(r,-i)}return ou.shouldNeverReachHere("invalid octant value"),0},kf.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var Lf=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];this._segString=e,this.coord=new Tl(t),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!t.equals2D(e.getCoordinate(n))};Lf.prototype.getCoordinate=function(){return this.coord},Lf.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},Lf.prototype.compareTo=function(e){var t=e;return this.segmentIndext.segmentIndex?1:this.coord.equals2D(t.coord)?0:kf.compare(this._segmentOctant,this.coord,t.coord)},Lf.prototype.isEndPoint=function(e){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===e},Lf.prototype.isInterior=function(){return this._isInterior},Lf.prototype.interfaces_=function(){return[El]},Lf.prototype.getClass=function(){return Lf};var Rf=function(){this._nodeMap=new Gu,this._edge=null;var e=arguments[0];this._edge=e};Rf.prototype.getSplitCoordinates=function(){var e=new ku;this.addEndpoints();for(var t=this.iterator(),n=t.next();t.hasNext();){var r=t.next();this.addEdgeCoordinates(n,r,e),n=r}return e.toCoordinateArray()},Rf.prototype.addCollapsedNodes=function(){var e=new Cu;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var t=e.iterator();t.hasNext();){var n=t.next().intValue();this.add(this._edge.getCoordinate(n),n)}},Rf.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();)t.next().print(e)},Rf.prototype.findCollapsesFromExistingVertices=function(e){for(var t=0;t=0?t>=0?n>=r?0:1:n>=r?7:6:t>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof Tl&&arguments[1]instanceof Tl){var i=arguments[0],o=arguments[1],a=o.x-i.x,s=o.y-i.y;if(0===a&&0===s)throw new Al("Cannot compute the octant for two identical points "+i);return Df.octant(a,s)}};var jf=function(){};jf.prototype.getCoordinates=function(){},jf.prototype.size=function(){},jf.prototype.getCoordinate=function(e){},jf.prototype.isClosed=function(){},jf.prototype.setData=function(e){},jf.prototype.getData=function(){},jf.prototype.interfaces_=function(){return[]},jf.prototype.getClass=function(){return jf};var If=function(){};If.prototype.addIntersection=function(e,t){},If.prototype.interfaces_=function(){return[jf]},If.prototype.getClass=function(){return If};var Nf=function(){this._nodeList=new Rf(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};Nf.prototype.getCoordinates=function(){return this._pts},Nf.prototype.size=function(){return this._pts.length},Nf.prototype.getCoordinate=function(e){return this._pts[e]},Nf.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Nf.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},Nf.prototype.setData=function(e){this._data=e},Nf.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:Df.octant(e,t)},Nf.prototype.getData=function(){return this._data},Nf.prototype.addIntersection=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[3],o=new Tl(n.getIntersection(i));this.addIntersection(o,r)}},Nf.prototype.toString=function(){return nu.toLineString(new Cc(this._pts))},Nf.prototype.getNodeList=function(){return this._nodeList},Nf.prototype.addIntersectionNode=function(e,t){var n=t,r=n+1;if(r=0&&n>=0||t<=0&&n<=0?Math.max(t,n):0}if(arguments[0]instanceof Tl){var r=arguments[0];return fu.orientationIndex(this.p0,this.p1,r)}},Ff.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},Ff.prototype.isVertical=function(){return this.p0.x===this.p1.x},Ff.prototype.equals=function(e){if(!(e instanceof Ff))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},Ff.prototype.intersection=function(e){var t=new lu;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},Ff.prototype.project=function(){if(arguments[0]instanceof Tl){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new Tl(e);var t=this.projectionFactor(e),n=new Tl;return n.x=this.p0.x+t*(this.p1.x-this.p0.x),n.y=this.p0.y+t*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof Ff){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(r.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(r.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new Ff(a,s)}},Ff.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Ff.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Ff.prototype.getCoordinate=function(e){return 0===e?this.p0:this.p1},Ff.prototype.distancePerpendicular=function(e){return fu.distancePointLinePerpendicular(e,this.p0,this.p1)},Ff.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Ff.prototype.midPoint=function(){return Ff.midPoint(this.p0,this.p1)},Ff.prototype.projectionFactor=function(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;var t=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=t*t+n*n;return r<=0?xl.NaN:((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/r},Ff.prototype.closestPoints=function(e){var t=this.intersection(e);if(null!==t)return[t,t];var n=new Array(2).fill(null),r=xl.MAX_VALUE,i=null,o=this.closestPoint(e.p0);r=o.distance(e.p0),n[0]=o,n[1]=e.p0;var a=this.closestPoint(e.p1);(i=a.distance(e.p1))0&&t<1?this.project(e):this.p0.distance(e)1||xl.isNaN(t))&&(t=1),t},Ff.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Ff.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Ff.prototype.distance=function(){if(arguments[0]instanceof Ff){var e=arguments[0];return fu.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}if(arguments[0]instanceof Tl){var t=arguments[0];return fu.distancePointLine(t,this.p0,this.p1)}},Ff.prototype.pointAlong=function(e){var t=new Tl;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t},Ff.prototype.hashCode=function(){var e=xl.doubleToLongBits(this.p0.x);e^=31*xl.doubleToLongBits(this.p0.y);var t=Math.trunc(e)^Math.trunc(e>>32),n=xl.doubleToLongBits(this.p1.x);return n^=31*xl.doubleToLongBits(this.p1.y),t^Math.trunc(n)^Math.trunc(n>>32)},Ff.prototype.interfaces_=function(){return[El,Sl]},Ff.prototype.getClass=function(){return Ff},Ff.midPoint=function(e,t){return new Tl((e.x+t.x)/2,(e.y+t.y)/2)},zf.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Ff,zf);var Bf=function(){this.tempEnv1=new Kl,this.tempEnv2=new Kl,this._overlapSeg1=new Ff,this._overlapSeg2=new Ff};Bf.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];e.getLineSegment(t,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},Bf.prototype.interfaces_=function(){return[]},Bf.prototype.getClass=function(){return Bf};var Uf=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];this._pts=e,this._start=t,this._end=n,this._context=r};Uf.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},Uf.prototype.computeSelect=function(e,t,n,r){var i=this._pts[t],o=this._pts[n];if(r.tempEnv1.init(i,o),n-t==1)return r.select(this,t),null;if(!e.intersects(r.tempEnv1))return null;var a=Math.trunc((t+n)/2);t=e.length-1)return e.length-1;for(var r=uf.quadrant(e[n],e[n+1]),i=t+1;ir.getId()&&(r.computeOverlaps(o,t),e._nOverlaps++),e._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.SegmentOverlapAction.get=function(){return Yf},Object.defineProperties(t,n),t}(Wf),Yf=function(e){function t(){e.call(this),this._si=null;var t=arguments[0];this._si=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(4!==arguments.length)return e.prototype.overlap.apply(this,arguments);var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3],o=t.getContext(),a=r.getContext();this._si.processIntersections(o,n,a,i)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Bf),Gf=function e(){if(this._quadrantSegments=e.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=e.CAP_ROUND,this._joinStyle=e.JOIN_ROUND,this._mitreLimit=e.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=e.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setQuadrantSegments(t)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}},Xf={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Gf.prototype.getEndCapStyle=function(){return this._endCapStyle},Gf.prototype.isSingleSided=function(){return this._isSingleSided},Gf.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,0===this._quadrantSegments&&(this._joinStyle=Gf.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Gf.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==Gf.JOIN_ROUND&&(this._quadrantSegments=Gf.DEFAULT_QUADRANT_SEGMENTS)},Gf.prototype.getJoinStyle=function(){return this._joinStyle},Gf.prototype.setJoinStyle=function(e){this._joinStyle=e},Gf.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},Gf.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Gf.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Gf.prototype.setEndCapStyle=function(e){this._endCapStyle=e},Gf.prototype.getMitreLimit=function(){return this._mitreLimit},Gf.prototype.setMitreLimit=function(e){this._mitreLimit=e},Gf.prototype.setSingleSided=function(e){this._isSingleSided=e},Gf.prototype.interfaces_=function(){return[]},Gf.prototype.getClass=function(){return Gf},Gf.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},Xf.CAP_ROUND.get=function(){return 1},Xf.CAP_FLAT.get=function(){return 2},Xf.CAP_SQUARE.get=function(){return 3},Xf.JOIN_ROUND.get=function(){return 1},Xf.JOIN_MITRE.get=function(){return 2},Xf.JOIN_BEVEL.get=function(){return 3},Xf.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Xf.DEFAULT_MITRE_LIMIT.get=function(){return 5},Xf.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Gf,Xf);var Zf=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=fu.COUNTERCLOCKWISE,this._inputLine=e||null},Kf={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Zf.prototype.isDeletable=function(e,t,n,r){var i=this._inputLine[e],o=this._inputLine[t],a=this._inputLine[n];return!!this.isConcave(i,o,a)&&!!this.isShallow(i,o,a,r)&&this.isShallowSampled(i,o,e,n,r)},Zf.prototype.deleteShallowConcavities=function(){for(var e=this,t=1,n=this.findNextNonDeletedIndex(t),r=this.findNextNonDeletedIndex(n),i=!1;r=0;r--)this.addPt(e[r])},$f.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var t=this._ptList.get(this._ptList.size()-1);return e.distance(t)Math.PI;)e-=Qf.PI_TIMES_2;for(;e<=-Math.PI;)e+=Qf.PI_TIMES_2;return e},Qf.angle=function(){if(1===arguments.length){var e=arguments[0];return Math.atan2(e.y,e.x)}if(2===arguments.length){var t=arguments[0],n=arguments[1],r=n.x-t.x,i=n.y-t.y;return Math.atan2(i,r)}},Qf.isAcute=function(e,t,n){var r=e.x-t.x,i=e.y-t.y;return r*(n.x-t.x)+i*(n.y-t.y)>0},Qf.isObtuse=function(e,t,n){var r=e.x-t.x,i=e.y-t.y;return r*(n.x-t.x)+i*(n.y-t.y)<0},Qf.interiorAngle=function(e,t,n){var r=Qf.angle(t,e),i=Qf.angle(t,n);return Math.abs(i-r)},Qf.normalizePositive=function(e){if(e<0){for(;e<0;)e+=Qf.PI_TIMES_2;e>=Qf.PI_TIMES_2&&(e=0)}else{for(;e>=Qf.PI_TIMES_2;)e-=Qf.PI_TIMES_2;e<0&&(e=0)}return e},Qf.angleBetween=function(e,t,n){var r=Qf.angle(t,e),i=Qf.angle(t,n);return Qf.diff(r,i)},Qf.diff=function(e,t){var n=null;return(n=eMath.PI&&(n=2*Math.PI-n),n},Qf.toRadians=function(e){return e*Math.PI/180},Qf.getTurn=function(e,t){var n=Math.sin(t-e);return n>0?Qf.COUNTERCLOCKWISE:n<0?Qf.CLOCKWISE:Qf.NONE},Qf.angleBetweenOriented=function(e,t,n){var r=Qf.angle(t,e),i=Qf.angle(t,n)-r;return i<=-Math.PI?i+Qf.PI_TIMES_2:i>Math.PI?i-Qf.PI_TIMES_2:i},ed.PI_TIMES_2.get=function(){return 2*Math.PI},ed.PI_OVER_2.get=function(){return Math.PI/2},ed.PI_OVER_4.get=function(){return Math.PI/4},ed.COUNTERCLOCKWISE.get=function(){return fu.COUNTERCLOCKWISE},ed.CLOCKWISE.get=function(){return fu.CLOCKWISE},ed.NONE.get=function(){return fu.COLLINEAR},Object.defineProperties(Qf,ed);var td=function e(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Ff,this._seg1=new Ff,this._offset0=new Ff,this._offset1=new Ff,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=n,this._li=new lu,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Gf.JOIN_ROUND&&(this._closingSegLengthFactor=e.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},nd={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};td.prototype.addNextSegment=function(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=fu.computeOrientation(this._s0,this._s1,this._s2),r=n===fu.CLOCKWISE&&this._side===Yc.LEFT||n===fu.COUNTERCLOCKWISE&&this._side===Yc.RIGHT;0===n?this.addCollinear(t):r?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)},td.prototype.addLineEndCap=function(e,t){var n=new Ff(e,t),r=new Ff;this.computeOffsetSegment(n,Yc.LEFT,this._distance,r);var i=new Ff;this.computeOffsetSegment(n,Yc.RIGHT,this._distance,i);var o=t.x-e.x,a=t.y-e.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Gf.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(t,s+Math.PI/2,s-Math.PI/2,fu.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Gf.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Gf.CAP_SQUARE:var l=new Tl;l.x=Math.abs(this._distance)*Math.cos(s),l.y=Math.abs(this._distance)*Math.sin(s);var u=new Tl(r.p1.x+l.x,r.p1.y+l.y),c=new Tl(i.p1.x+l.x,i.p1.y+l.y);this._segList.addPt(u),this._segList.addPt(c)}},td.prototype.getCoordinates=function(){return this._segList.getCoordinates()},td.prototype.addMitreJoin=function(e,t,n,r){var i=!0,o=null;try{o=Zl.intersection(t.p0,t.p1,n.p0,n.p1),(r<=0?1:o.distance(e)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(e){if(!(e instanceof Gl))throw e;o=new Tl(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(t,n,r,this._bufParams.getMitreLimit())},td.prototype.addFilletCorner=function(e,t,n,r,i){var o=t.x-e.x,a=t.y-e.y,s=Math.atan2(a,o),l=n.x-e.x,u=n.y-e.y,c=Math.atan2(u,l);r===fu.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,s,c,r,i),this._segList.addPt(n)},td.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new Tl((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new Tl((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},td.prototype.createCircle=function(e){var t=new Tl(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},td.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},td.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new $f,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*td.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},td.prototype.addCollinear=function(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Gf.JOIN_BEVEL||this._bufParams.getJoinStyle()===Gf.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,fu.CLOCKWISE,this._distance))},td.prototype.closeRing=function(){this._segList.closeRing()},td.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},td.prototype.interfaces_=function(){return[]},td.prototype.getClass=function(){return td},nd.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},nd.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},nd.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},nd.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(td,nd);var rd=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};rd.prototype.getOffsetCurve=function(e,t){if(this._distance=t,0===t)return null;var n=t<0,r=Math.abs(t),i=this.getSegGen(r);e.length<=1?this.computePointCurve(e[0],i):this.computeOffsetCurve(e,n,i);var o=i.getCoordinates();return n&&Lu.reverse(o),o},rd.prototype.computeSingleSidedBufferCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);if(t){n.addSegments(e,!0);var i=Zf.simplify(e,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Yc.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{n.addSegments(e,!1);var s=Zf.simplify(e,r),l=s.length-1;n.initSideSegments(s[0],s[1],Yc.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(s[u],!0)}n.addLastSegment(),n.closeRing()},rd.prototype.computeRingBufferCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);t===Yc.RIGHT&&(r=-r);var i=Zf.simplify(e,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],t);for(var a=1;a<=o;a++){var s=1!==a;n.addNextSegment(i[a],s)}n.closeRing()},rd.prototype.computeLineBufferCurve=function(e,t){var n=this.simplifyTolerance(this._distance),r=Zf.simplify(e,n),i=r.length-1;t.initSideSegments(r[0],r[1],Yc.LEFT);for(var o=2;o<=i;o++)t.addNextSegment(r[o],!0);t.addLastSegment(),t.addLineEndCap(r[i-1],r[i]);var a=Zf.simplify(e,-n),s=a.length-1;t.initSideSegments(a[s],a[s-1],Yc.LEFT);for(var l=s-2;l>=0;l--)t.addNextSegment(a[l],!0);t.addLastSegment(),t.addLineEndCap(a[1],a[0]),t.closeRing()},rd.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case Gf.CAP_ROUND:t.createCircle(e);break;case Gf.CAP_SQUARE:t.createSquare(e)}},rd.prototype.getLineCurve=function(e,t){if(this._distance=t,t<0&&!this._bufParams.isSingleSided())return null;if(0===t)return null;var n=Math.abs(t),r=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],r);else if(this._bufParams.isSingleSided()){var i=t<0;this.computeSingleSidedBufferCurve(e,i,r)}else this.computeLineBufferCurve(e,r);return r.getCoordinates()},rd.prototype.getBufferParameters=function(){return this._bufParams},rd.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},rd.prototype.getRingCurve=function(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(0===n)return rd.copyCoordinates(e);var r=this.getSegGen(n);return this.computeRingBufferCurve(e,t,r),r.getCoordinates()},rd.prototype.computeOffsetCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);if(t){var i=Zf.simplify(e,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Yc.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{var s=Zf.simplify(e,r),l=s.length-1;n.initSideSegments(s[0],s[1],Yc.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(s[u],!0)}n.addLastSegment()},rd.prototype.getSegGen=function(e){return new td(this._precisionModel,this._bufParams,e)},rd.prototype.interfaces_=function(){return[]},rd.prototype.getClass=function(){return rd},rd.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),n=0;no.getMaxY()||e.findStabbedSegments(t,i.getDirectedEdges(),n)}return n}if(3===arguments.length)if(Dl(arguments[2],Su)&&arguments[0]instanceof Tl&&arguments[1]instanceof df)for(var a=arguments[0],s=arguments[1],l=arguments[2],u=s.getEdge().getCoordinates(),c=0;ce._seg.p1.y&&e._seg.reverse();var f=Math.max(e._seg.p0.x,e._seg.p1.x);if(!(fe._seg.p1.y||fu.computeOrientation(e._seg.p0,e._seg.p1,a)===fu.RIGHT)){var d=s.getDepth(Yc.LEFT);e._seg.p0.equals(u[c])||(d=s.getDepth(Yc.RIGHT));var p=new ad(e._seg,d);l.add(p)}}else if(Dl(arguments[2],Su)&&arguments[0]instanceof Tl&&Dl(arguments[1],Su))for(var h=arguments[0],g=arguments[1],m=arguments[2],y=g.iterator();y.hasNext();){var v=y.next();v.isForward()&&e.findStabbedSegments(h,v,m)}},id.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);return 0===t.size()?0:wf.min(t)._leftDepth},id.prototype.interfaces_=function(){return[]},id.prototype.getClass=function(){return id},od.DepthSegment.get=function(){return ad},Object.defineProperties(id,od);var ad=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new Ff(e),this._leftDepth=t};ad.prototype.compareTo=function(e){var t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(t._upwardSeg);return 0!==n||0!=(n=-1*t._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(t._upwardSeg)},ad.prototype.compareX=function(e,t){var n=e.p0.compareTo(t.p0);return 0!==n?n:e.p1.compareTo(t.p1)},ad.prototype.toString=function(){return this._upwardSeg.toString()},ad.prototype.interfaces_=function(){return[El]},ad.prototype.getClass=function(){return ad};var sd=function(e,t,n){this.p0=e||null,this.p1=t||null,this.p2=n||null};sd.prototype.area=function(){return sd.area(this.p0,this.p1,this.p2)},sd.prototype.signedArea=function(){return sd.signedArea(this.p0,this.p1,this.p2)},sd.prototype.interpolateZ=function(e){if(null===e)throw new Al("Supplied point is null.");return sd.interpolateZ(e,this.p0,this.p1,this.p2)},sd.prototype.longestSideLength=function(){return sd.longestSideLength(this.p0,this.p1,this.p2)},sd.prototype.isAcute=function(){return sd.isAcute(this.p0,this.p1,this.p2)},sd.prototype.circumcentre=function(){return sd.circumcentre(this.p0,this.p1,this.p2)},sd.prototype.area3D=function(){return sd.area3D(this.p0,this.p1,this.p2)},sd.prototype.centroid=function(){return sd.centroid(this.p0,this.p1,this.p2)},sd.prototype.inCentre=function(){return sd.inCentre(this.p0,this.p1,this.p2)},sd.prototype.interfaces_=function(){return[]},sd.prototype.getClass=function(){return sd},sd.area=function(e,t,n){return Math.abs(((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2)},sd.signedArea=function(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2},sd.det=function(e,t,n,r){return e*r-t*n},sd.interpolateZ=function(e,t,n,r){var i=t.x,o=t.y,a=n.x-i,s=r.x-i,l=n.y-o,u=r.y-o,c=a*u-s*l,f=e.x-i,d=e.y-o,p=(u*f-s*d)/c,h=(-l*f+a*d)/c;return t.z+p*(n.z-t.z)+h*(r.z-t.z)},sd.longestSideLength=function(e,t,n){var r=e.distance(t),i=t.distance(n),o=n.distance(e),a=r;return i>a&&(a=i),o>a&&(a=o),a},sd.isAcute=function(e,t,n){return!!Qf.isAcute(e,t,n)&&!!Qf.isAcute(t,n,e)&&!!Qf.isAcute(n,e,t)},sd.circumcentre=function(e,t,n){var r=n.x,i=n.y,o=e.x-r,a=e.y-i,s=t.x-r,l=t.y-i,u=2*sd.det(o,a,s,l),c=sd.det(a,o*o+a*a,l,s*s+l*l),f=sd.det(o,o*o+a*a,s,s*s+l*l);return new Tl(r-c/u,i+f/u)},sd.perpendicularBisector=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=new Zl(e.x+n/2,e.y+r/2,1),o=new Zl(e.x-r+n/2,e.y+n+r/2,1);return new Zl(i,o)},sd.angleBisector=function(e,t,n){var r=t.distance(e),i=r/(r+t.distance(n)),o=n.x-e.x,a=n.y-e.y;return new Tl(e.x+i*o,e.y+i*a)},sd.area3D=function(e,t,n){var r=t.x-e.x,i=t.y-e.y,o=t.z-e.z,a=n.x-e.x,s=n.y-e.y,l=n.z-e.z,u=i*l-o*s,c=o*a-r*l,f=r*s-i*a,d=u*u+c*c+f*f;return Math.sqrt(d)/2},sd.centroid=function(e,t,n){var r=(e.x+t.x+n.x)/3,i=(e.y+t.y+n.y)/3;return new Tl(r,i)},sd.inCentre=function(e,t,n){var r=t.distance(n),i=e.distance(n),o=e.distance(t),a=r+i+o,s=(r*e.x+i*t.x+o*n.x)/a,l=(r*e.y+i*t.y+o*n.y)/a;return new Tl(s,l)};var ld=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Cu;var e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n};ld.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,Ll.EXTERIOR,Ll.INTERIOR)},ld.prototype.addPolygon=function(e){var t=this,n=this._distance,r=Yc.LEFT;this._distance<0&&(n=-this._distance,r=Yc.RIGHT);var i=e.getExteriorRing(),o=Lu.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,n,r,Ll.EXTERIOR,Ll.INTERIOR);for(var a=0;a0&&t.isErodedCompletely(s,-t._distance)||t.addPolygonRing(l,n,Yc.opposite(r),Ll.INTERIOR,Ll.EXTERIOR)}},ld.prototype.isTriangleErodedCompletely=function(e,t){var n=new sd(e[0],e[1],e[2]),r=n.inCentre();return fu.distancePointLine(r,n.p0,n.p1)=xc.MINIMUM_VALID_SIZE&&fu.isCCW(e)&&(o=i,a=r,n=Yc.opposite(n));var s=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(s,o,a)},ld.prototype.add=function(e){if(e.isEmpty())return null;e instanceof _c?this.addPolygon(e):e instanceof mc?this.addLineString(e):e instanceof vc?this.addPoint(e):(e instanceof Ac||e instanceof ic||e instanceof wc||e instanceof rc)&&this.addCollection(e)},ld.prototype.isErodedCompletely=function(e,t){var n=e.getCoordinates();if(n.length<4)return t<0;if(4===n.length)return this.isTriangleErodedCompletely(n,t);var r=e.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return t<0&&2*Math.abs(t)>i},ld.prototype.addCollection=function(e){for(var t=0;t=this._max)throw new Tu;var e=this._parent.getGeometryN(this._index++);return e instanceof rc?(this._subcollectionIterator=new cd(e),this._subcollectionIterator.next()):e},cd.prototype.remove=function(){throw new Error(this.getClass().getName())},cd.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},cd.prototype.interfaces_=function(){return[Mu]},cd.prototype.getClass=function(){return cd},cd.isAtomic=function(e){return!(e instanceof rc)};var fd=function(){this._geom=null;var e=arguments[0];this._geom=e};fd.prototype.locate=function(e){return fd.locate(e,this._geom)},fd.prototype.interfaces_=function(){return[ud]},fd.prototype.getClass=function(){return fd},fd.isPointInRing=function(e,t){return!!t.getEnvelopeInternal().intersects(e)&&fu.isPointInRing(e,t.getCoordinates())},fd.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var n=t.getExteriorRing();if(!fd.isPointInRing(e,n))return!1;for(var r=0;r=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===t&&(t=i),null!==e&&i.setNext(e),e=r}t.setNext(e)},t.prototype.computeDepths=function(){var e=this;if(1===arguments.length){var t=arguments[0],n=this.findIndex(t),r=t.getDepth(Yc.LEFT),i=t.getDepth(Yc.RIGHT),o=this.computeDepths(n+1,this._edgeList.size(),r),a=this.computeDepths(0,n,o);if(a!==i)throw new $c("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var s=arguments[0],l=arguments[1],u=arguments[2],c=u,f=s;f=0;o--){var a=t._resultAreaEdgeList.get(o),s=a.getSym();switch(null===n&&a.getEdgeRing()===e&&(n=a),i){case t._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==e)continue;r=s,i=t._LINKING_TO_OUTGOING;break;case t._LINKING_TO_OUTGOING:if(a.getEdgeRing()!==e)continue;r.setNextMin(a),i=t._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(ou.isTrue(null!==n,"found null for first outgoing dirEdge"),ou.isTrue(n.getEdgeRing()===e,"unable to link last incoming dirEdge"),r.setNextMin(n))},t.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var e=0,t=this.iterator();t.hasNext();){var n=t.next();n.isInResult()&&e++}return e}if(1===arguments.length){for(var r=arguments[0],i=0,o=this.iterator();o.hasNext();){var a=o.next();a.getEdgeRing()===r&&i++}return i}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var e=Ll.NONE,t=this.iterator();t.hasNext();){var n=t.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){e=Ll.INTERIOR;break}if(r.isInResult()){e=Ll.EXTERIOR;break}}}if(e===Ll.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===Ll.INTERIOR):(a.isInResult()&&(i=Ll.EXTERIOR),s.isInResult()&&(i=Ll.INTERIOR))}},t.prototype.computeLabelling=function(t){e.prototype.computeLabelling.call(this,t),this._label=new tf(Ll.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==Ll.INTERIOR&&o!==Ll.BOUNDARY||this._label.setLocation(i,Ll.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(dd),hd=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createNode=function(e){return new sf(e,new pd)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(pf),gd=function e(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=e.orientation(t)};gd.prototype.compareTo=function(e){var t=e;return gd.compareOriented(this._pts,this._orientation,t._pts,t._orientation)},gd.prototype.interfaces_=function(){return[El]},gd.prototype.getClass=function(){return gd},gd.orientation=function(e){return 1===Lu.increasingDirection(e)},gd.compareOriented=function(e,t,n,r){for(var i=t?1:-1,o=r?1:-1,a=t?e.length:-1,s=r?n.length:-1,l=t?0:e.length-1,u=r?0:n.length-1;;){var c=e[l].compareTo(n[u]);if(0!==c)return c;var f=(l+=i)===a,d=(u+=o)===s;if(f&&!d)return-1;if(!f&&d)return 1;if(f&&d)return 0}};var md=function(){this._edges=new Cu,this._ocaMap=new Gu};md.prototype.print=function(e){e.print("MULTILINESTRING ( ");for(var t=0;t0&&e.print(","),e.print("(");for(var r=n.getCoordinates(),i=0;i0&&e.print(","),e.print(r[i].x+" "+r[i].y);e.println(")")}e.print(") ")},md.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next())},md.prototype.findEdgeIndex=function(e){for(var t=0;t0||!t.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new Tl(e.coord);for(var s=e.segmentIndex+1;s<=t.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=t.coord),new Od(o,new tf(this.edge._label))},_d.prototype.add=function(e,t,n){var r=new bd(e,t,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},_d.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();)if(t.next().coord.equals(e))return!0;return!1},_d.prototype.interfaces_=function(){return[]},_d.prototype.getClass=function(){return _d};var Ad=function(){};Ad.prototype.getChainStartIndices=function(e){var t=0,n=new Cu;n.add(new Fl(t));do{var r=this.findChainEnd(e,t);n.add(new Fl(r)),t=r}while(tn?t:n},xd.prototype.getMinX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return tn&&(i=1),e._depth[t][r]=i}}},wd.prototype.getDelta=function(e){return this._depth[e][Yc.RIGHT]-this._depth[e][Yc.LEFT]},wd.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?Ll.EXTERIOR:Ll.INTERIOR},wd.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},wd.prototype.add=function(){var e=this;if(1===arguments.length)for(var t=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=t.getLocation(n,r);i!==Ll.EXTERIOR&&i!==Ll.INTERIOR||(e.isNull(n,r)?e._depth[n][r]=wd.depthAtLocation(i):e._depth[n][r]+=wd.depthAtLocation(i))}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];s===Ll.INTERIOR&&this._depth[o][a]++}},wd.prototype.interfaces_=function(){return[]},wd.prototype.getClass=function(){return wd},wd.depthAtLocation=function(e){return e===Ll.EXTERIOR?0:e===Ll.INTERIOR?1:wd.NULL_VALUE},Ed.NULL_VALUE.get=function(){return-1},Object.defineProperties(wd,Ed);var Od=function(e){function t(){if(e.call(this),this.pts=null,this._env=null,this.eiList=new _d(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new wd,this._depthDelta=0,1===arguments.length){var n=arguments[0];t.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var e=new Array(2).fill(null);return e[0]=this.pts[0],e[1]=this.pts[1],new t(e,tf.toLineLabel(this._label))},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(e){this._isIsolated=e},t.prototype.setName=function(e){this._name=e},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,a=0;a0?this.pts[0]:null;if(1===arguments.length){var e=arguments[0];return this.pts[e]}},t.prototype.print=function(e){e.print("edge "+this._name+": "),e.print("LINESTRING (");for(var t=0;t0&&e.print(","),e.print(this.pts[t].x+" "+this.pts[t].y);e.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(e){t.updateIM(this._label,e)},t.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(e){e.print("edge "+this._name+": ");for(var t=this.pts.length-1;t>=0;t--)e.print(this.pts[t]+" ");e.println("")},t.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new xd(this)),this._mce},t.prototype.getEnvelope=function(){if(null===this._env){this._env=new Kl;for(var e=0;e0&&e.append(","),e.append(this.pts[t].x+" "+this.pts[t].y);return e.append(") "+this._label+" "+this._depthDelta),e.toString()},t.prototype.isPointwiseEqual=function(e){if(this.pts.length!==e.pts.length)return!1;for(var t=0;tr||this._maxyo;if(a)return!1;var s=this.intersectsToleranceSquare(e,t);return ou.isTrue(!(a&&s),"Found bad envelope test"),s},Pd.prototype.initCorners=function(e){var t=.5;this._minx=e.x-t,this._maxx=e.x+t,this._miny=e.y-t,this._maxy=e.y+t,this._corner[0]=new Tl(this._maxx,this._maxy),this._corner[1]=new Tl(this._minx,this._maxy),this._corner[2]=new Tl(this._minx,this._miny),this._corner[3]=new Tl(this._maxx,this._miny)},Pd.prototype.intersects=function(e,t){return 1===this._scaleFactor?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Pd.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},Pd.prototype.getCoordinate=function(){return this._originalPt},Pd.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},Pd.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var e=Pd.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Kl(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},Pd.prototype.intersectsPixelClosure=function(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.hasIntersection()))))},Pd.prototype.intersectsToleranceSquare=function(e,t){var n=!1,r=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.isProper()||n&&r||e.equals(this._pt)||t.equals(this._pt)))))},Pd.prototype.addSnappedNode=function(e,t){var n=e.getCoordinate(t),r=e.getCoordinate(t+1);return!!this.intersects(n,r)&&(e.addIntersection(this.getCoordinate(),t),!0)},Pd.prototype.interfaces_=function(){return[]},Pd.prototype.getClass=function(){return Pd},kd.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(Pd,kd);var Ld=function(){this.tempEnv1=new Kl,this.selectedSegment=new Ff};Ld.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var e=arguments[0],t=arguments[1];e.getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},Ld.prototype.interfaces_=function(){return[]},Ld.prototype.getClass=function(){return Ld};var Rd=function(){this._index=null;var e=arguments[0];this._index=e},Dd={HotPixelSnapAction:{configurable:!0}};Rd.prototype.snap=function(){if(1===arguments.length){var e=arguments[0];return this.snap(e,null,-1)}if(3===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2],i=t.getSafeEnvelope(),o=new jd(t,n,r);return this._index.query(i,{interfaces_:function(){return[bf]},visitItem:function(e){e.select(i,o)}}),o.isNodeAdded()}},Rd.prototype.interfaces_=function(){return[]},Rd.prototype.getClass=function(){return Rd},Dd.HotPixelSnapAction.get=function(){return jd},Object.defineProperties(Rd,Dd);var jd=function(e){function t(){e.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=t,this._parentEdge=n,this._hotPixelVertexIndex=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(2!==arguments.length)return e.prototype.select.apply(this,arguments);var t=arguments[0],n=arguments[1],r=t.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ld),Id=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new Cu};Id.prototype.processIntersections=function(e,t,n,r){if(e===n&&t===r)return null;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l=0;t--){try{e.bufferReducedPrecision(t)}catch(t){if(!(t instanceof $c))throw t;e._saveException=t}if(null!==e._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=Fd.precisionScaleFactor(this._argGeom,this._distance,n),i=new Dc(r);this.bufferFixedPrecision(i)}},Fd.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Dc.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},Fd.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},Fd.prototype.bufferOriginalPrecision=function(){try{var e=new Md(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(e){if(!(e instanceof ru))throw e;this._saveException=e}},Fd.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},Fd.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},Fd.prototype.interfaces_=function(){return[]},Fd.prototype.getClass=function(){return Fd},Fd.bufferOp=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],n=new Fd(e),r=n.getResultGeometry(t);return r}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof hu&&"number"==typeof arguments[1]){var i=arguments[0],o=arguments[1],a=arguments[2],s=new Fd(i);s.setQuadrantSegments(a);var l=s.getResultGeometry(o);return l}if(arguments[2]instanceof Gf&&arguments[0]instanceof hu&&"number"==typeof arguments[1]){var u=arguments[0],c=arguments[1],f=arguments[2],d=new Fd(u,f),p=d.getResultGeometry(c);return p}}else if(4===arguments.length){var h=arguments[0],g=arguments[1],m=arguments[2],y=arguments[3],v=new Fd(h);v.setQuadrantSegments(m),v.setEndCapStyle(y);var b=v.getResultGeometry(g);return b}},Fd.precisionScaleFactor=function(e,t,n){var r=e.getEnvelopeInternal(),i=jl.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(t>0?t:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},zd.CAP_ROUND.get=function(){return Gf.CAP_ROUND},zd.CAP_BUTT.get=function(){return Gf.CAP_FLAT},zd.CAP_FLAT.get=function(){return Gf.CAP_FLAT},zd.CAP_SQUARE.get=function(){return Gf.CAP_SQUARE},zd.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Fd,zd);var Bd=function(){this._pt=[new Tl,new Tl],this._distance=xl.NaN,this._isNull=!0};Bd.prototype.getCoordinates=function(){return this._pt},Bd.prototype.getCoordinate=function(e){return this._pt[e]},Bd.prototype.setMinimum=function(){if(1===arguments.length){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var r=t.distance(n);rthis._distance&&this.initialize(t,n,r)}},Bd.prototype.interfaces_=function(){return[]},Bd.prototype.getClass=function(){return Bd};var Ud=function(){};Ud.prototype.interfaces_=function(){return[]},Ud.prototype.getClass=function(){return Ud},Ud.computeDistance=function(){if(arguments[2]instanceof Bd&&arguments[0]instanceof mc&&arguments[1]instanceof Tl)for(var e=arguments[0],t=arguments[1],n=arguments[2],r=e.getCoordinates(),i=new Ff,o=0;o0||this._isIn?Ll.INTERIOR:Ll.EXTERIOR)},Xd.prototype.interfaces_=function(){return[]},Xd.prototype.getClass=function(){return Xd};var Zd=function e(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var t=arguments[0],n=arguments[1];e.call(this,t,e.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}},Kd={INSIDE_AREA:{configurable:!0}};Zd.prototype.isInsideArea=function(){return this._segIndex===Zd.INSIDE_AREA},Zd.prototype.getCoordinate=function(){return this._pt},Zd.prototype.getGeometryComponent=function(){return this._component},Zd.prototype.getSegmentIndex=function(){return this._segIndex},Zd.prototype.interfaces_=function(){return[]},Zd.prototype.getClass=function(){return Zd},Kd.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Zd,Kd);var $d=function(e){this._pts=e||null};$d.prototype.filter=function(e){e instanceof vc&&this._pts.add(e)},$d.prototype.interfaces_=function(){return[tc]},$d.prototype.getClass=function(){return $d},$d.getPoints=function(){if(1===arguments.length){var e=arguments[0];return e instanceof vc?wf.singletonList(e):$d.getPoints(e,new Cu)}if(2===arguments.length){var t=arguments[0],n=arguments[1];return t instanceof vc?n.add(t):t instanceof rc&&t.apply(new $d(n)),n}};var Jd=function(){this._locations=null;var e=arguments[0];this._locations=e};Jd.prototype.filter=function(e){(e instanceof vc||e instanceof mc||e instanceof _c)&&this._locations.add(new Zd(e,0,e.getCoordinate()))},Jd.prototype.interfaces_=function(){return[tc]},Jd.prototype.getClass=function(){return Jd},Jd.getLocations=function(e){var t=new Cu;return e.apply(new Jd(t)),t};var Qd=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Xd,this._minDistanceLocation=null,this._minDistance=xl.MAX_VALUE,2===arguments.length){var e=arguments[0],t=arguments[1];this._geom=[e,t],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Qd.prototype.computeContainmentDistance=function(){var e=this;if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=1-n,o=Yd.getPolygons(this._geom[n]);if(o.size()>0){var a=Jd.getLocations(this._geom[i]);if(this.computeContainmentDistance(a,o,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&Dl(arguments[0],Su)&&Dl(arguments[1],Su)){for(var s=arguments[0],l=arguments[1],u=arguments[2],c=0;cthis._minDistance)return null;for(var i=t.getCoordinates(),o=n.getCoordinate(),a=0;athis._minDistance)return null;for(var p=c.getCoordinates(),h=f.getCoordinates(),g=0;gthis._distance&&this.initialize(t,n,r)}},ep.prototype.interfaces_=function(){return[]},ep.prototype.getClass=function(){return ep};var tp=function(){};tp.prototype.interfaces_=function(){return[]},tp.prototype.getClass=function(){return tp},tp.computeDistance=function(){if(arguments[2]instanceof ep&&arguments[0]instanceof mc&&arguments[1]instanceof Tl)for(var e=arguments[0],t=arguments[1],n=arguments[2],r=new Ff,i=e.getCoordinates(),o=0;o1||e<=0)throw new Al("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},np.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},np.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},np.prototype.computeOrientedDistance=function(e,t,n){var r=new ip(t);if(e.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new op(t,this._densifyFrac);e.apply(i),n.setMaximum(i.getMaxPointDistance())}},np.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},np.prototype.interfaces_=function(){return[]},np.prototype.getClass=function(){return np},np.distance=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],n=new np(e,t);return n.distance()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=new np(r,i);return a.setDensifyFraction(o),a.distance()}},rp.MaxPointDistanceFilter.get=function(){return ip},rp.MaxDensifiedByFractionDistanceFilter.get=function(){return op},Object.defineProperties(np,rp);var ip=function(){this._maxPtDist=new ep,this._minPtDist=new ep,this._euclideanDist=new tp,this._geom=null;var e=arguments[0];this._geom=e};ip.prototype.filter=function(e){this._minPtDist.initialize(),tp.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},ip.prototype.getMaxPointDistance=function(){return this._maxPtDist},ip.prototype.interfaces_=function(){return[yu]},ip.prototype.getClass=function(){return ip};var op=function(){this._maxPtDist=new ep,this._minPtDist=new ep,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};op.prototype.filter=function(e,t){var n=this;if(0===t)return null;for(var r=e.getCoordinate(t-1),i=e.getCoordinate(t),o=(i.x-r.x)/this._numSubSegs,a=(i.y-r.y)/this._numSubSegs,s=0;sn){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=e.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+nu.toLineString(i[0],i[1])+")"}},ap.prototype.isValid=function(){var e=Math.abs(this._bufDistance),t=ap.MAX_DISTANCE_DIFF_FRAC*e;return this._minValidDistance=e-t,this._maxValidDistance=e+t,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),ap.VERBOSE&&Xl.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},ap.prototype.checkNegativeValid=function(){if(!(this._input instanceof _c||this._input instanceof wc||this._input instanceof rc))return null;var e=this.getPolygonLines(this._input);if(this.checkMinimumDistance(e,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(e,this._result,this._maxValidDistance)},ap.prototype.getErrorIndicator=function(){return this._errorIndicator},ap.prototype.checkMinimumDistance=function(e,t,n){var r=new Qd(e,t,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&e>t&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&e=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},lp.prototype.report=function(e){if(!lp.VERBOSE)return null;Xl.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},lp.prototype.getErrorMessage=function(){return this._errorMsg},lp.prototype.interfaces_=function(){return[]},lp.prototype.getClass=function(){return lp},lp.isValidMsg=function(e,t,n){var r=new lp(e,t,n);return r.isValid()?null:r.getErrorMessage()},lp.isValid=function(e,t,n){return!!new lp(e,t,n).isValid()},up.VERBOSE.get=function(){return!1},up.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(lp,up);var cp=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};cp.prototype.getCoordinates=function(){return this._pts},cp.prototype.size=function(){return this._pts.length},cp.prototype.getCoordinate=function(e){return this._pts[e]},cp.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},cp.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:Df.octant(this.getCoordinate(e),this.getCoordinate(e+1))},cp.prototype.setData=function(e){this._data=e},cp.prototype.getData=function(){return this._data},cp.prototype.toString=function(){return nu.toLineString(new Cc(this._pts))},cp.prototype.interfaces_=function(){return[jf]},cp.prototype.getClass=function(){return cp};var fp=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Cu,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};fp.prototype.getInteriorIntersection=function(){return this._interiorIntersection},fp.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},fp.prototype.getIntersectionSegments=function(){return this._intSegments},fp.prototype.count=function(){return this._intersectionCount},fp.prototype.getIntersections=function(){return this._intersections},fp.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},fp.prototype.setKeepIntersections=function(e){this._keepIntersections=e},fp.prototype.processIntersections=function(e,t,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(e===n&&t===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(e,t)&&!this.isEndSegment(n,r))return null;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=a,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},fp.prototype.isEndSegment=function(e,t){return 0===t||t>=e.size()-2},fp.prototype.hasIntersection=function(){return null!==this._interiorIntersection},fp.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},fp.prototype.interfaces_=function(){return[yd]},fp.prototype.getClass=function(){return fp},fp.createAllIntersectionsFinder=function(e){var t=new fp(e);return t.setFindAllIntersections(!0),t},fp.createAnyIntersectionFinder=function(e){return new fp(e)},fp.createIntersectionCounter=function(e){var t=new fp(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var dp=function(){this._li=new lu,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};dp.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},dp.prototype.getIntersections=function(){return this._segInt.getIntersections()},dp.prototype.isValid=function(){return this.execute(),this._isValid},dp.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},dp.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new fp(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new qf;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},dp.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new $c(this.getErrorMessage(),this._segInt.getInteriorIntersection())},dp.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+nu.toLineString(e[0],e[1])+" and "+nu.toLineString(e[2],e[3])},dp.prototype.interfaces_=function(){return[]},dp.prototype.getClass=function(){return dp},dp.computeIntersections=function(e){var t=new dp(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var pp=function e(){this._nv=null;var t=arguments[0];this._nv=new dp(e.toSegmentStrings(t))};pp.prototype.checkValid=function(){this._nv.checkValid()},pp.prototype.interfaces_=function(){return[]},pp.prototype.getClass=function(){return pp},pp.toSegmentStrings=function(e){for(var t=new Cu,n=e.iterator();n.hasNext();){var r=n.next();t.add(new cp(r.getCoordinates(),r))}return t},pp.checkValid=function(e){new pp(e).checkValid()};var hp=function(e){this._mapOp=e};hp.prototype.map=function(e){for(var t=new Cu,n=0;n0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},yp.prototype.interfaces_=function(){return[]},yp.prototype.getClass=function(){return yp};var vp=function e(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Ff,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof mc&&"number"==typeof arguments[1]){var t=arguments[0],n=arguments[1];e.call(this,t.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=e.isClosed(r),this._snapTolerance=i}};vp.prototype.snapVertices=function(e,t){for(var n=this._isClosed?e.size()-1:e.size(),r=0;r=0&&e.add(o+1,new Tl(i),!1)}},vp.prototype.findSegmentIndexToSnap=function(e,t){for(var n=this,r=xl.MAX_VALUE,i=-1,o=0;ot&&(t=r)}return t}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(bp.computeOverlaySnapTolerance(i),bp.computeOverlaySnapTolerance(o))}},bp.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal();return Math.min(t.getHeight(),t.getWidth())*bp.SNAP_PRECISION_FACTOR},bp.snapToSelf=function(e,t,n){return new bp(e).snapToSelf(t,n)},_p.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(bp,_p);var Ap=function(e){function t(t,n,r){e.call(this),this._snapTolerance=t||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(e,t){var n=new vp(e,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(t)},t.prototype.transformCoordinates=function(e,t){var n=e.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(yp),xp=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};xp.prototype.getCommon=function(){return xl.longBitsToDouble(this._commonBits)},xp.prototype.add=function(e){var t=xl.doubleToLongBits(e);return this._isFirst?(this._commonBits=t,this._commonSignExp=xp.signExpBits(this._commonBits),this._isFirst=!1,null):xp.signExpBits(t)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=xp.numCommonMostSigMantissaBits(this._commonBits,t),void(this._commonBits=xp.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},xp.prototype.toString=function(){if(1===arguments.length){var e=arguments[0],t=xl.longBitsToDouble(e),n=xl.toBinaryString(e),r="0000000000000000000000000000000000000000000000000000000000000000"+n,i=r.substring(r.length-64),o=i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+t+" ]";return o}},xp.prototype.interfaces_=function(){return[]},xp.prototype.getClass=function(){return xp},xp.getBit=function(e,t){return 0!=(e&1<>52},xp.zeroLowerBits=function(e,t){return e&~((1<=0;r--){if(xp.getBit(e,r)!==xp.getBit(t,r))return n;n++}return 52};var wp=function(){this._commonCoord=null,this._ccFilter=new Op},Ep={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};wp.prototype.addCommonBits=function(e){var t=new Mp(this._commonCoord);e.apply(t),e.geometryChanged()},wp.prototype.removeCommonBits=function(e){if(0===this._commonCoord.x&&0===this._commonCoord.y)return e;var t=new Tl(this._commonCoord);t.x=-t.x,t.y=-t.y;var n=new Mp(t);return e.apply(n),e.geometryChanged(),e},wp.prototype.getCommonCoordinate=function(){return this._commonCoord},wp.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},wp.prototype.interfaces_=function(){return[]},wp.prototype.getClass=function(){return wp},Ep.CommonCoordinateFilter.get=function(){return Op},Ep.Translater.get=function(){return Mp},Object.defineProperties(wp,Ep);var Op=function(){this._commonBitsX=new xp,this._commonBitsY=new xp};Op.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},Op.prototype.getCommonCoordinate=function(){return new Tl(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Op.prototype.interfaces_=function(){return[yu]},Op.prototype.getClass=function(){return Op};var Mp=function(){this.trans=null;var e=arguments[0];this.trans=e};Mp.prototype.filter=function(e,t){var n=e.getOrdinate(t,0)+this.trans.x,r=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,n),e.setOrdinate(t,1,r)},Mp.prototype.isDone=function(){return!1},Mp.prototype.isGeometryChanged=function(){return!0},Mp.prototype.interfaces_=function(){return[nc]},Mp.prototype.getClass=function(){return Mp};var Sp=function(e,t){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()};Sp.prototype.selfSnap=function(e){return new bp(e).snapTo(e,this._snapTolerance)},Sp.prototype.removeCommonBits=function(e){this._cbr=new wp,this._cbr.add(e[0]),this._cbr.add(e[1]);var t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t},Sp.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},Sp.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),n=Zp.overlayOp(t[0],t[1],e);return this.prepareResult(n)},Sp.prototype.checkValid=function(e){e.isValid()||Xl.out.println("Snapped geometry is invalid")},Sp.prototype.computeSnapTolerance=function(){this._snapTolerance=bp.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Sp.prototype.snap=function(e){var t=this.removeCommonBits(e);return bp.snap(t[0],t[1],this._snapTolerance)},Sp.prototype.interfaces_=function(){return[]},Sp.prototype.getClass=function(){return Sp},Sp.overlayOp=function(e,t,n){return new Sp(e,t).getResultGeometry(n)},Sp.union=function(e,t){return Sp.overlayOp(e,t,Zp.UNION)},Sp.intersection=function(e,t){return Sp.overlayOp(e,t,Zp.INTERSECTION)},Sp.symDifference=function(e,t){return Sp.overlayOp(e,t,Zp.SYMDIFFERENCE)},Sp.difference=function(e,t){return Sp.overlayOp(e,t,Zp.DIFFERENCE)};var Tp=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};Tp.prototype.getResultGeometry=function(e){var t=null,n=!1,r=null;try{t=Zp.overlayOp(this._geom[0],this._geom[1],e),n=!0}catch(e){if(!(e instanceof ru))throw e;r=e}if(!n)try{t=Sp.overlayOp(this._geom[0],this._geom[1],e)}catch(e){throw e instanceof ru?r:e}return t},Tp.prototype.interfaces_=function(){return[]},Tp.prototype.getClass=function(){return Tp},Tp.overlayOp=function(e,t,n){return new Tp(e,t).getResultGeometry(n)},Tp.union=function(e,t){return Tp.overlayOp(e,t,Zp.UNION)},Tp.intersection=function(e,t){return Tp.overlayOp(e,t,Zp.INTERSECTION)},Tp.symDifference=function(e,t){return Tp.overlayOp(e,t,Zp.SYMDIFFERENCE)},Tp.difference=function(e,t){return Tp.overlayOp(e,t,Zp.DIFFERENCE)};var Cp=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};Cp.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},Cp.prototype.interfaces_=function(){return[]},Cp.prototype.getClass=function(){return Cp};var Pp=function e(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var t=arguments[0],n=arguments[1];this._eventType=e.DELETE,this._xValue=t,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=e.INSERT,this._label=r,this._xValue=i,this._obj=o}},kp={INSERT:{configurable:!0},DELETE:{configurable:!0}};Pp.prototype.isDelete=function(){return this._eventType===Pp.DELETE},Pp.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},Pp.prototype.getObject=function(){return this._obj},Pp.prototype.compareTo=function(e){var t=e;return this._xValuet._xValue?1:this._eventTypet._eventType?1:0},Pp.prototype.getInsertEvent=function(){return this._insertEvent},Pp.prototype.isInsert=function(){return this._eventType===Pp.INSERT},Pp.prototype.isSameLabel=function(e){return null!==this._label&&this._label===e._label},Pp.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Pp.prototype.interfaces_=function(){return[El]},Pp.prototype.getClass=function(){return Pp},kp.INSERT.get=function(){return 1},kp.DELETE.get=function(){return 2},Object.defineProperties(Pp,kp);var Lp=function(){};Lp.prototype.interfaces_=function(){return[]},Lp.prototype.getClass=function(){return Lp};var Rp=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var e=arguments[0],t=arguments[1],n=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=n};Rp.prototype.isTrivialIntersection=function(e,t,n,r){if(e===n&&1===this._li.getIntersectionNum()){if(Rp.isAdjacentSegments(t,r))return!0;if(e.isClosed()){var i=e.getNumPoints()-1;if(0===t&&r===i||0===r&&t===i)return!0}}return!1},Rp.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Rp.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},Rp.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Rp.prototype.isBoundaryPointInternal=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next().getCoordinate();if(e.isIntersection(r))return!0}return!1},Rp.prototype.hasProperIntersection=function(){return this._hasProper},Rp.prototype.hasIntersection=function(){return this._hasIntersection},Rp.prototype.isDone=function(){return this._isDone},Rp.prototype.isBoundaryPoint=function(e,t){return!(null===t||!this.isBoundaryPointInternal(e,t[0])&&!this.isBoundaryPointInternal(e,t[1]))},Rp.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},Rp.prototype.addIntersections=function(e,t,n,r){if(e===n&&t===r)return null;this.numTests++;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(e.addIntersections(this._li,t,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Rp.prototype.interfaces_=function(){return[]},Rp.prototype.getClass=function(){return Rp},Rp.isAdjacentSegments=function(e,t){return 1===Math.abs(e-t)};var Dp=function(e){function t(){e.call(this),this.events=new Cu,this.nOverlaps=null}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){wf.sort(this.events);for(var e=0;et||this._maxo?1:0},Np.prototype.interfaces_=function(){return[Ml]},Np.prototype.getClass=function(){return Np};var Fp=function(e){function t(){e.call(this),this._item=null;var t=arguments[0],n=arguments[1],r=arguments[2];this._min=t,this._max=n,this._item=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.query=function(e,t,n){if(!this.intersects(e,t))return null;n.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jp),zp=function(e){function t(){e.call(this),this._node1=null,this._node2=null;var t=arguments[0],n=arguments[1];this._node1=t,this._node2=n,this.buildExtent(this._node1,this._node2)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(e,t){this._min=Math.min(e._min,t._min),this._max=Math.max(e._max,t._max)},t.prototype.query=function(e,t,n){if(!this.intersects(e,t))return null;null!==this._node1&&this._node1.query(e,t,n),null!==this._node2&&this._node2.query(e,t,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jp),Bp=function(){this._leaves=new Cu,this._root=null,this._level=0};Bp.prototype.buildTree=function(){wf.sort(this._leaves,new jp.NodeComparator);for(var e=this._leaves,t=null,n=new Cu;;){if(this.buildLevel(e,n),1===n.size())return n.get(0);t=e,e=n,n=t}},Bp.prototype.insert=function(e,t,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Fp(e,t,n))},Bp.prototype.query=function(e,t,n){this.init(),this._root.query(e,t,n)},Bp.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},Bp.prototype.printNode=function(e){Xl.out.println(nu.toLineString(new Tl(e._min,this._level),new Tl(e._max,this._level)))},Bp.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},Bp.prototype.buildLevel=function(e,t){this._level++,t.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,t[0]),this.insertBoundaryPoint(this._argIndex,t[t.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var e=this.getBoundaryNodes(),t=new Array(e.size()).fill(null),n=0,r=e.iterator();r.hasNext();){var i=r.next();t[n++]=i.getCoordinate().copy()}return t},t.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(e,t,n){if(this.isBoundaryNode(e,t))return null;n===Ll.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(e,t):this.insertPoint(e,t,n)},t.prototype.addPolygonRing=function(e,t,n){if(e.isEmpty())return null;var r=Lu.removeRepeatedPoints(e.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=t,o=n;fu.isCCW(r)&&(i=n,o=t);var a=new Od(r,new tf(this._argIndex,Ll.BOUNDARY,i,o));this._lineEdgeMap.put(e,a),this.insertEdge(a),this.insertPoint(this._argIndex,r[0],Ll.BOUNDARY)},t.prototype.insertPoint=function(e,t,n){var r=this._nodes.addNode(t),i=r.getLabel();null===i?r._label=new tf(e,n):i.setLocation(e,n)},t.prototype.createEdgeSetIntersector=function(){return new Dp},t.prototype.addSelfIntersectionNodes=function(e){for(var t=this._edges.iterator();t.hasNext();)for(var n=t.next(),r=n.getLabel().getLocation(e),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(e,o.coord,r)}},t.prototype.add=function(){if(1!==arguments.length)return e.prototype.add.apply(this,arguments);var t=arguments[0];if(t.isEmpty())return null;if(t instanceof wc&&(this._useBoundaryDeterminationRule=!1),t instanceof _c)this.addPolygon(t);else if(t instanceof mc)this.addLineString(t);else if(t instanceof vc)this.addPoint(t);else if(t instanceof Ac)this.addCollection(t);else if(t instanceof ic)this.addCollection(t);else if(t instanceof wc)this.addCollection(t);else{if(!(t instanceof rc))throw new Error(t.getClass().getName());this.addCollection(t)}},t.prototype.addCollection=function(e){for(var t=0;t50?(null===this._areaPtLocator&&(this._areaPtLocator=new Vp(this._parentGeom)),this._areaPtLocator.locate(e)):this._ptLocator.locate(e,this._parentGeom)},t.prototype.findEdge=function(){if(1===arguments.length){var t=arguments[0];return this._lineEdgeMap.get(t)}return e.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(e,t){return e.isInBoundary(t)?Ll.BOUNDARY:Ll.INTERIOR},t}(hf),Gp=function(){if(this._li=new lu,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Yp(0,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=vu.OGC_SFS_BOUNDARY_RULE;t.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(t.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Yp(0,t,r),this._arg[1]=new Yp(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Yp(0,i,a),this._arg[1]=new Yp(1,o,a)}};Gp.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},Gp.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},Gp.prototype.interfaces_=function(){return[]},Gp.prototype.getClass=function(){return Gp};var Xp=function(){};Xp.prototype.interfaces_=function(){return[]},Xp.prototype.getClass=function(){return Xp},Xp.map=function(){if(arguments[0]instanceof hu&&Dl(arguments[1],Xp.MapOp)){for(var e=arguments[0],t=arguments[1],n=new Cu,r=0;r=e.size()?null:e.get(t)},nh.union=function(e){return new nh(e).union()},rh.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(nh,rh);var ih=function(){};function oh(){return new ah}function ah(){this.reset()}ih.prototype.interfaces_=function(){return[]},ih.prototype.getClass=function(){return ih},ih.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Zp.createEmptyResult(Zp.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),Tp.overlayOp(e,t,Zp.UNION)},ah.prototype={constructor:ah,reset:function(){this.s=this.t=0},add:function(e){lh(sh,e,this.t),lh(this,sh.s,this.s),this.s?this.t+=sh.t:this.s=sh.t},valueOf:function(){return this.s}};var sh=new ah;function lh(e,t,n){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}var uh=1e-6,ch=Math.PI,fh=ch/2,dh=ch/4,ph=2*ch,hh=180/ch,gh=ch/180,mh=Math.abs,yh=Math.atan,vh=Math.atan2,bh=Math.cos,_h=Math.sin,Ah=Math.sqrt;function xh(e){return e>1?0:e<-1?ch:Math.acos(e)}function wh(e){return e>1?fh:e<-1?-fh:Math.asin(e)}function Eh(){}function Oh(e,t){e&&Ch.hasOwnProperty(e.type)&&Ch[e.type](e,t)}var Mh,Sh,Th={Feature:function(e,t){Oh(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rch?e-ph:e<-ch?e+ph:e,t]}function Uh(e){return function(t,n){return[(t+=e)>ch?t-ph:t<-ch?t+ph:t,n]}}function Vh(e){var t=Uh(e);return t.invert=Uh(-e),t}function Hh(e,t){var n=bh(e),r=_h(e),i=bh(t),o=_h(t);function a(e,t){var a=bh(t),s=bh(e)*a,l=_h(e)*a,u=_h(t),c=u*n+s*r;return[vh(l*i-c*o,s*n-u*r),wh(c*i+l*o)]}return a.invert=function(e,t){var a=bh(t),s=bh(e)*a,l=_h(e)*a,u=_h(t),c=u*i-l*o;return[vh(l*i+u*o,s*n+c*r),wh(c*n-s*r)]},a}function Wh(e,t){(t=Rh(t))[0]-=e,Fh(t);var n=xh(-t[1]);return((-t[2]<0?-n:n)+ph-uh)%ph}function qh(){var e,t=[];return{point:function(t,n){e.push([t,n])},lineStart:function(){t.push(e=[])},lineEnd:Eh,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Yh(e,t){return mh(e[0]-t[0])=0;--o)i.point((c=u[o])[0],c[1]);else r(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function Zh(e){if(t=e.length){for(var t,n,r=0,i=e[0];++rt?1:e>=t?0:NaN}function $h(e){for(var t,n,r,i=e.length,o=-1,a=0;++o=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n}oh(),oh(),oh(),Bh.invert=Bh,1===(Mh=Kh).length&&(Sh=Mh,Mh=function(e,t){return Kh(Sh(e),t)});var Jh=1e9,Qh=-Jh;function eg(e,t,n,r){function i(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function o(i,o,s,u){var c=0,f=0;if(null==i||(c=a(i,s))!==(f=a(o,s))||l(i,o)<0^s>0)do{u.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return mh(r[0]-e)0?0:3:mh(r[0]-n)0?2:1:mh(r[1]-t)0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var l,u,c,f,d,p,h,g,m,y,v,b=a,_=qh(),A={point:x,lineStart:function(){A.point=w,u&&u.push(c=[]),y=!0,m=!1,h=g=NaN},lineEnd:function(){l&&(w(f,d),p&&m&&_.rejoin(),l.push(_.result())),A.point=x,m&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],v=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=u.length;nr&&(d-o)*(r-a)>(p-a)*(e-o)&&++t:p<=r&&(d-o)*(r-a)<(p-a)*(e-o)&&--t;return t}(),n=v&&t,i=(l=$h(l)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&Xh(l,s,t,o,a),a.polygonEnd()),b=a,l=u=c=null}};function x(e,t){i(e,t)&&b.point(e,t)}function w(o,a){var s=i(o,a);if(u&&c.push([o,a]),y)f=o,d=a,p=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&m)b.point(o,a);else{var l=[h=Math.max(Qh,Math.min(Jh,h)),g=Math.max(Qh,Math.min(Jh,g))],_=[o=Math.max(Qh,Math.min(Jh,o)),a=Math.max(Qh,Math.min(Jh,a))];!function(e,t,n,r,i,o){var a,s=e[0],l=e[1],u=0,c=1,f=t[0]-s,d=t[1]-l;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>u&&(u=a)}else if(f>0){if(a0)){if(a/=d,d<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=o-l,d||!(a<0)){if(a/=d,d<0){if(a>c)return;a>u&&(u=a)}else if(d>0){if(a0&&(e[0]=s+u*f,e[1]=l+u*d),c<1&&(t[0]=s+c*f,t[1]=l+c*d),!0}}}}}(l,_,e,t,n,r)?s&&(b.lineStart(),b.point(o,a),v=!1):(m||(b.lineStart(),b.point(l[0],l[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}h=o,g=a,m=s}return A}}var tg=oh();function ng(e){return e}oh(),oh(),oh();var rg=1/0,ig=rg,og=-rg,ag=og,sg={point:function(e,t){eog&&(og=e),tag&&(ag=t)},lineStart:Eh,lineEnd:Eh,polygonStart:Eh,polygonEnd:Eh,result:function(){var e=[[rg,ig],[og,ag]];return og=ag=-(ig=rg=1/0),e}};function lg(e,t,n,r){return function(i,o){var a,s,l,u=t(o),c=i.invert(r[0],r[1]),f=qh(),d=t(f),p=!1,h={point:g,lineStart:y,lineEnd:v,polygonStart:function(){h.point=b,h.lineStart=_,h.lineEnd=A,s=[],a=[]},polygonEnd:function(){h.point=g,h.lineStart=y,h.lineEnd=v,s=$h(s);var e=function(e,t){var n=t[0],r=t[1],i=[_h(n),-bh(n),0],o=0,a=0;tg.reset();for(var s=0,l=e.length;s=0?1:-1,E=w*x,O=E>ch,M=h*_;if(tg.add(vh(M*w*_h(E),g*A+M*bh(E))),o+=O?x+w*ph:x,O^d>=n^v>=n){var S=jh(Rh(f),Rh(y));Fh(S);var T=jh(i,S);Fh(T);var C=(O^x>=0?-1:1)*wh(T[2]);(r>C||r===C&&(S[0]||S[1]))&&(a+=O^x>=0?1:-1)}}return(o<-1e-6||o0){for(p||(o.polygonStart(),p=!0),o.lineStart(),e=0;e1&&2&i&&u.push(u.pop().concat(u.shift())),s.push(u.filter(ug))}return h}}function ug(e){return e.length>1}function cg(e,t){return((e=e.x)[0]<0?e[1]-fh-uh:fh-e[1])-((t=t.x)[0]<0?t[1]-fh-uh:fh-t[1])}oh();var fg=lg((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?ch:-ch,l=mh(o-n);mh(l-ch)0?fh:-fh),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=ch&&(mh(n-i)uh?yh((_h(t)*(o=bh(r))*_h(n)-_h(r)*(i=bh(t))*_h(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*fh,r.point(-ch,i),r.point(0,i),r.point(ch,i),r.point(ch,0),r.point(ch,-i),r.point(0,-i),r.point(-ch,-i),r.point(-ch,0),r.point(-ch,i);else if(mh(e[0]-t[0])>uh){var o=e[0]0,i=mh(n)>uh;function o(e,t){return bh(e)*bh(t)>n}function a(e,t,r){var i=[1,0,0],o=jh(Rh(e),Rh(t)),a=Dh(o,o),s=o[0],l=a-s*s;if(!l)return!r&&e;var u=n*a/l,c=-n*s/l,f=jh(i,o),d=Nh(i,u);Ih(d,Nh(o,c));var p=f,h=Dh(d,p),g=Dh(p,p),m=h*h-g*(Dh(d,d)-1);if(!(m<0)){var y=Ah(m),v=Nh(p,(-h-y)/g);if(Ih(v,d),v=Lh(v),!r)return v;var b,_=e[0],A=t[0],x=e[1],w=t[1];A<_&&(b=_,_=A,A=b);var E=A-_,O=mh(E-ch)0^v[1]<(mh(v[0]-_)ch^(_<=v[0]&&v[0]<=A)){var M=Nh(p,(-h+y)/g);return Ih(M,d),[v,Lh(M)]}}}function s(t,n){var i=r?e:ch-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return lg(o,(function(e){var t,n,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(f,d){var p,h=[f,d],g=o(f,d),m=r?g?0:s(f,d):g?s(f+(f<0?ch:-ch),d):0;if(!t&&(u=l=g)&&e.lineStart(),g!==l&&(!(p=a(t,h))||Yh(t,p)||Yh(h,p))&&(h[0]+=uh,h[1]+=uh,g=o(h[0],h[1])),g!==l)c=0,g?(e.lineStart(),p=a(h,t),e.point(p[0],p[1])):(p=a(t,h),e.point(p[0],p[1]),e.lineEnd()),t=p;else if(i&&t&&r^g){var y;m&n||!(y=a(h,t,!0))||(c=0,r?(e.lineStart(),e.point(y[0][0],y[0][1]),e.point(y[1][0],y[1][1]),e.lineEnd()):(e.point(y[1][0],y[1][1]),e.lineEnd(),e.lineStart(),e.point(y[0][0],y[0][1])))}!g||t&&Yh(t,h)||e.point(h[0],h[1]),t=h,l=g,n=m},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return c|(u&&l)<<1}}}),(function(n,r,i,o){!function(e,t,n,r,i,o){if(n){var a=bh(t),s=_h(t),l=r*n;null==i?(i=t+r*ph,o=t-l/2):(i=Wh(a,i),o=Wh(a,o),(r>0?io)&&(i+=r*ph));for(var u,c=i;r>0?c>o:c4*t&&g--){var _=a+d,A=s+p,x=l+h,w=Ah(_*_+A*A+x*x),E=wh(x/=w),O=mh(mh(x)-1)t||mh((y*C+v*P)/b-.5)>.3||a*d+s*p+l*h2?e[2]%360*gh:0,T()):[m*hh,y*hh,v*hh]},O.precision=function(e){return arguments.length?(E=yg(S,w=e*e),C()):Ah(w)},O.fitExtent=function(e,t){return gg(O,e,t)},O.fitSize=function(e,t){return function(e,t,n){return gg(e,[[0,0],t],n)}(O,e,t)},function(){return t=e.apply(this,arguments),O.invert=t.invert&&M,T()}}((function(){return e}))()}(bg).scale(79.4188).clipAngle(179.999)}function Ag(e,t,r,i){var o=e.properties||{},s="Feature"===e.type?e.geometry:e;if("GeometryCollection"===s.type){var l=[];return B(e,(function(e){var n=Ag(e,t,r,i);n&&l.push(n)})),h(l)}var u=function(e){var t=cn(e).geometry.coordinates,r=[-t[0],-t[1]];return _g().rotate(r).scale(n)}(s),c={type:s.type,coordinates:xg(s.coordinates,u)},f=(new Wc).read(c),d=_(A(t,r),"meters"),p=Fd.bufferOp(f,d,i);if(!function e(t){return Array.isArray(t[0])?e(t[0]):isNaN(t[0])}((p=(new qc).write(p)).coordinates))return a({type:p.type,coordinates:wg(p.coordinates,u)},o)}function xg(e,t){return"object"!=typeof e[0]?t(e):e.map((function(e){return xg(e,t)}))}function wg(e,t){return"object"!=typeof e[0]?t.invert(e):e.map((function(e){return wg(e,t)}))}function Eg(e,t,n){void 0===n&&(n={});var r=ie(e),i=ie(t),o=bl.intersection(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?c(o[0],n.properties):y(o,n.properties)}function Og(e,t,n){void 0===n&&(n={});var r=JSON.stringify(n.properties||{}),i=e[0],o=e[1],a=e[2],s=e[3],l=(o+s)/2,u=(i+a)/2,c=2*t/yt([i,l],[a,l],n)*(a-i),f=2*t/yt([u,o],[u,s],n)*(s-o),d=c/2,p=2*d,g=Math.sqrt(3)/2*f,m=a-i,y=s-o,v=3/4*p,b=g,_=(m-p)/(p-d/2),A=Math.floor(_),x=(A*v-d/2-m)/2-d/2+v/2,w=Math.floor((y-g)/g),E=(y-w*g)/2,O=w*g-y>g/2;O&&(E-=g/4);for(var M=[],S=[],T=0;T<6;T++){var C=2*Math.PI/6*T;M.push(Math.cos(C)),S.push(Math.sin(C))}for(var P=[],k=0;k<=A;k++)for(var L=0;L<=w;L++){var R=k%2==1;if(!(0===L&&R||0===L&&O)){var D=k*v+i-x,j=L*b+o+E;if(R&&(j-=g/2),!0===n.triangles)Sg([D,j],c/2,f/2,JSON.parse(r),M,S).forEach((function(e){n.mask?Eg(n.mask,e)&&P.push(e):P.push(e)}));else{var I=Mg([D,j],c/2,f/2,JSON.parse(r),M,S);n.mask?Eg(n.mask,I)&&P.push(I):P.push(I)}}}return h(P)}function Mg(e,t,n,r,i,o){for(var a=[],s=0;s<6;s++){var l=e[0]+t*i[s],u=e[1]+n*o[s];a.push([l,u])}return a.push(a[0].slice()),c([a],r)}function Sg(e,t,n,r,i,o){for(var a=[],s=0;s<6;s++){var l=[];l.push(e),l.push([e[0]+t*i[s],e[1]+n*o[s]]),l.push([e[0]+t*i[(s+1)%6],e[1]+n*o[(s+1)%6]]),l.push(e),a.push(c([l],r))}return a}function Tg(e){return y(e)}function Cg(e,t,n){return void 0===n&&(n={}),function(e,t,n,r){void 0===r&&(r={});for(var i=[],o=e[0],a=e[1],s=e[2],l=e[3],u=t/yt([o,a],[s,a],r)*(s-o),f=n/yt([o,a],[o,l],r)*(l-a),d=s-o,p=l-a,g=Math.floor(d/u),m=Math.floor(p/f),y=(p-m*f)/2,v=o+(d-g*u)/2,b=0;b=i&&o===r.length-1);o++){if(i>=t){var a=t-i;if(a){var s=un(r[o],r[o-1])-180;return sn(r[o],a,s,n)}return l(r[o])}i+=yt(r[o],r[o+1],n)}return l(r[r.length-1])},t.angle=function(e,t,n,r){if(void 0===r&&(r={}),!C(r))throw new Error("options is invalid");if(!e)throw new Error("startPoint is required");if(!t)throw new Error("midPoint is required");if(!n)throw new Error("endPoint is required");var i=e,o=t,a=n,s=w(!0!==r.mercator?un(i,o):vi(i,o)),l=w(!0!==r.mercator?un(a,o):vi(a,o)),u=Math.abs(s-l);return!0===r.explementary?360-u:u},t.applyFilter=Ls,t.area=Ar,t.areaFactors=o,t.bbox=$,t.bboxClip=function(e,t){var n=ie(e),r=n.type,i="Feature"===e.type?e.properties:{},o=n.coordinates;switch(r){case"LineString":case"MultiLineString":var a=[];return"LineString"===r&&(o=[o]),o.forEach((function(e){!function(e,t,n){var r,i,o,a,s,l=e.length,u=ci(e[0],t),c=[];for(n||(n=[]),r=1;r0)for(var n=0;n0},t.booleanParallel=function(e,t){if(!e)throw new Error("line1 is required");if(!t)throw new Error("line2 is required");if("LineString"!==ga(e,"line1"))throw new Error("line1 must be a LineString");if("LineString"!==ga(t,"line2"))throw new Error("line2 must be a LineString");for(var n=Bn(qt(e)).features,r=Bn(qt(t)).features,i=0;i0){f+=1;var o=i*yt(e,t);0===o&&(o=1);var a=i/o;s+=e.geometry.coordinates[0]*a,u+=e.geometry.coordinates[1]*a,c+=a}})),f<1)throw new Error("no features to measure");var d=s/c,p=u/c;return 1===f||0===o||Math.abs(d-n[0])n&&(t.numberOfClusters=n),!0!==t.mutate&&(e=xt(e));var r=z(e),i=r.slice(0,t.numberOfClusters),o=pa(r,t.numberOfClusters,i),a={};return o.centroids.forEach((function(e,t){a[t]=e})),N(e,(function(e,t){var n=o.idxs[t];e.properties.cluster=n,e.properties.centroid=a[n]})),e},t.collect=function(e,t,n,r){var i=Ee(6),o=t.features.map((function(e){var t;return{minX:e.geometry.coordinates[0],minY:e.geometry.coordinates[1],maxX:e.geometry.coordinates[0],maxY:e.geometry.coordinates[1],property:null===(t=e.properties)||void 0===t?void 0:t[n]}}));return i.load(o),e.features.forEach((function(e){e.properties||(e.properties={});var t=$(e),n=i.search({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}),o=[];n.forEach((function(t){ht([t.minX,t.minY],e)&&o.push(t.property)})),e.properties[r]=o})),e},t.collectionOf=re,t.combine=function(e){var t={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return N(e,(function(e){var n,r,i,o;switch(null===(o=e.geometry)||void 0===o?void 0:o.type){case"Point":t.MultiPoint.coordinates.push(e.geometry.coordinates),t.MultiPoint.properties.push(e.properties);break;case"MultiPoint":(n=t.MultiPoint.coordinates).push.apply(n,e.geometry.coordinates),t.MultiPoint.properties.push(e.properties);break;case"LineString":t.MultiLineString.coordinates.push(e.geometry.coordinates),t.MultiLineString.properties.push(e.properties);break;case"MultiLineString":(r=t.MultiLineString.coordinates).push.apply(r,e.geometry.coordinates),t.MultiLineString.properties.push(e.properties);break;case"Polygon":t.MultiPolygon.coordinates.push(e.geometry.coordinates),t.MultiPolygon.properties.push(e.properties);break;case"MultiPolygon":(i=t.MultiPolygon.coordinates).push.apply(i,e.geometry.coordinates),t.MultiPolygon.properties.push(e.properties)}})),h(Object.keys(t).filter((function(e){return t[e].coordinates.length})).sort().map((function(e){return a({type:e,coordinates:t[e].coordinates},{collectedProperties:t[e].properties})})))},t.concave=function(e,t){void 0===t&&(t={});var n=t.maxEdge||1/0,r=vt(function(e){var t=[],n={};return N(e,(function(e){if(e.geometry){var r=e.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(n,r)||(t.push(e),n[r]=!0)}})),h(t)}(e));if(r.features=r.features.filter((function(e){var r=e.geometry.coordinates[0][0],i=e.geometry.coordinates[0][1],o=e.geometry.coordinates[0][2],a=yt(r,i,t),s=yt(i,o,t),l=yt(r,o,t);return a<=n&&s<=n&&l<=n})),r.features.length<1)return null;var i=Wt(r);return 1===i.coordinates.length&&(i.coordinates=i.coordinates[0],i.type="Polygon"),a(i)},t.containsNumber=ee,t.convertArea=S,t.convertDistance=M,t.convertLength=M,t.convex=pt,t.coordAll=z,t.coordEach=R,t.coordReduce=D,t.createBins=ks,t.degrees2radians=O,t.degreesToRadians=O,t.destination=sn,t.difference=function(e,t){var n=ie(e),r=ie(t),i=e.properties||{},o=bl.difference(n.coordinates,r.coordinates);return 0===o.length?null:1===o.length?c(o[0],i):y(o,i)},t.dissolve=function(e,t){if(!C(t=t||{}))throw new Error("options is invalid");var n=t.propertyName;re(e,"Polygon","dissolve");var r=[];if(!t.propertyName)return jr(y(bl.union.apply(null,e.features.map((function(e){return e.geometry.coordinates})))));var i={};N(e,(function(e){Object.prototype.hasOwnProperty.call(i,e.properties[n])||(i[e.properties[n]]=[]),i[e.properties[n]].push(e)}));for(var o=Object.keys(i),a=0;a * v. 1.2.0 * https://github.com/RaumZeit/MarchingSquares.js * * MarchingSquaresJS is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MarchingSquaresJS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * As additional permission under GNU Affero General Public License version 3 * section 7, third-party projects (personal or commercial) may distribute, * include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the * requirement that said third-party project for that reason alone becomes * subject to any requirement of the GNU Affero General Public License version 3. * Any modifications to MarchingSquaresJS, however, must be shared with the public * and made available. * * In summary this: * - allows you to use MarchingSquaresJS at no cost * - allows you to use MarchingSquaresJS for both personal and commercial purposes * - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any * license as long as this license notice is included * - enables you to keep the source code of your program that uses MarchingSquaresJS * undisclosed * - forces you to share any modifications you have made to MarchingSquaresJS, * e.g. bug-fixes * * You should have received a copy of the GNU Affero General Public License * along with MarchingSquaresJS. If not, see . */(e,r),a=[],s=0;s0&&(a=c(o).geometry),cs(a,s),o=s.slice(0);n.push(c(o,i));break;case"MultiPolygon":o=[[[]]];for(var u=0;u0&&(a=y(o).geometry),fs(a,s),o=s.slice(0);n.push(y(o,i));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}})),h(n)},t.polygonTangents=function(e,t){var n,r,i,o,a=Q(e),s=Q(t),u=$(t),c=0,f=null;switch(a[0]>u[0]&&a[0]u[1]&&a[1] is required");if("boolean"!=typeof n)throw new Error(" must be a boolean");if("boolean"!=typeof r)throw new Error(" must be a boolean");!1===r&&(e=xt(e));var i=[];switch(e.type){case"GeometryCollection":return B(e,(function(e){Oi(e,n)})),e;case"FeatureCollection":return N(e,(function(e){N(Oi(e,n),(function(e){i.push(e)}))})),h(i)}return Oi(e,n)},t.rhumbBearing=vi,t.rhumbDestination=_i,t.rhumbDistance=hr,t.round=b,t.sample=function(e,t){if(!e)throw new Error("featurecollection is required");if(null==t)throw new Error("num is required");if("number"!=typeof t)throw new Error("num must be a number");return h(function(e,t){for(var n,r,i=e.slice(0),o=e.length,a=o-t;o-- >a;)n=i[r=Math.floor((o+1)*Math.random())],i[r]=i[o],i[o]=n;return i.slice(a)}(e.features,t))},t.sector=function(e,t,n,r,i){if(!C(i=i||{}))throw new Error("options is invalid");var o=i.properties;if(!e)throw new Error("center is required");if(null==n)throw new Error("bearing1 is required");if(null==r)throw new Error("bearing2 is required");if(!t)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");if(yi(n)===yi(r))return ln(e,t,i);var a=Q(e),s=ei(e,t,n,r,i),l=[[a]];return R(s,(function(e){l[0].push(e)})),l[0].push(a),c(l,o)},t.segmentEach=W,t.segmentReduce=q,t.shortestPath=function(e,t,n){if(!C(n=n||{}))throw new Error("options is invalid");var r=n.resolution,i=n.minDistance,o=n.obstacles||h([]);if(!e)throw new Error("start is required");if(!t)throw new Error("end is required");if(r&&!T(r)||r<=0)throw new Error("options.resolution must be a number, greater than 0");if(i)throw new Error("options.minDistance is not yet implemented");var s=J(e),u=J(t);switch(e=l(s),t=l(u),oe(o)){case"FeatureCollection":if(0===o.features.length)return d([s,u]);break;case"Polygon":o=h([a(ie(o))]);break;default:throw new Error("invalid obstacles")}var c=o;c.features.push(e),c.features.push(t);var f=$(Co(rn($(c)),1.15));r||(r=yt([f[0],f[1]],[f[2],f[1]],n)/100),c.features.pop(),c.features.pop();for(var p=f[0],g=f[1],m=f[2],y=f[3],v=r/yt([p,g],[m,g],n)*(m-p),b=r/yt([p,g],[p,y],n)*(y-g),_=m-p,A=y-g,x=Math.floor(_/v),w=Math.floor(A/b),E=(_-x*v)/2,O=[],M=[],S=[],P=[],k=1/0,L=1/0,R=y-(A-w*b)/2,D=0;R>=g;){for(var j=[],I=[],N=p+E,F=0;N<=m;){var z=l([N,R]),B=Aa(z,o);j.push(B?0:1),I.push(N+"|"+R);var U=yt(z,e);!B&&UA;A++)if((d||A in v)&&(m=b(g=v[A],A,y),e))if(n)x[A]=m;else if(m)switch(e){case 3:return!0;case 5:return g;case 6:return A;case 2:x.push(g)}else if(c)return!1;return f?-1:u||c?c:x}}},function(e,t,n){var r=n(698)("wks"),i=n(530),o=n(285).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(131).Buffer)},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(5);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DEFAULT_COLOR_RANGE",{enumerable:!0,get:function(){return a.DEFAULT_COLOR_RANGE}}),t.LAYER_TEXT_CONFIGS=t.LAYER_VIS_CONFIGS=t.DEFAULT_COLOR_UI=t.UNKNOWN_COLOR_KEY=t.DEFAULT_CUSTOM_PALETTE=t.DEFAULT_TEXT_LABEL=t.DEFAULT_LAYER_LABEL=t.DEFAULT_HIGHLIGHT_COLOR=t.DEFAULT_LAYER_OPACITY=t.PROPERTY_GROUPS=void 0;var i=r(n(386)),o=n(37),a=n(472),s=(0,i.default)({color:null,stroke:null,radius:null,height:null,angle:null,cell:null,precision:null});t.PROPERTY_GROUPS=s;t.DEFAULT_LAYER_OPACITY=.8;t.DEFAULT_HIGHLIGHT_COLOR=[252,242,26,255];t.DEFAULT_LAYER_LABEL="new layer";t.DEFAULT_TEXT_LABEL={field:null,color:[255,255,255],size:18,offset:[0,0],anchor:"start",alignment:"center"};var l={name:"color.customPalette",type:"custom",category:"Custom",colors:[]};t.DEFAULT_CUSTOM_PALETTE=l;t.UNKNOWN_COLOR_KEY="__unknownColor__";var u={customPalette:l,showSketcher:!1,showDropdown:!1,colorRangeConfig:{type:"all",steps:6,reversed:!1,custom:!1}};t.DEFAULT_COLOR_UI=u;var c={thickness:{type:"number",defaultValue:2,label:"layerVisConfigs.strokeWidth",isRanged:!1,range:[0,100],step:.1,group:s.stroke,property:"thickness"},strokeWidthRange:{type:"number",defaultValue:[0,10],label:"layerVisConfigs.strokeWidthRange",isRanged:!0,range:[0,200],step:.1,group:s.stroke,property:"sizeRange"},trailLength:{type:"number",defaultValue:180,label:"layerVisConfigs.strokeWidth",isRanged:!1,range:[1,1e3],step:1,group:s.stroke,property:"trailLength"},radius:{type:"number",defaultValue:10,label:"layerVisConfigs.radius",isRanged:!1,range:[0,100],step:.1,group:s.radius,property:"radius"},fixedRadius:{defaultValue:!1,type:"boolean",label:"layerVisConfigs.fixedRadius",description:"layerVisConfigs.fixedRadiusDescription",group:s.radius,property:"fixedRadius"},radiusRange:{type:"number",defaultValue:[0,50],isRanged:!0,range:[0,500],step:.1,label:"layerVisConfigs.radiusRange",group:s.radius,property:"radiusRange"},clusterRadius:{type:"number",label:"layerVisConfigs.clusterRadius",defaultValue:40,isRanged:!1,range:[1,500],step:.1,group:s.radius,property:"clusterRadius"},clusterRadiusRange:{type:"number",label:"layerVisConfigs.radiusRangePixels",defaultValue:[1,40],isRanged:!0,range:[1,150],step:.1,group:s.radius,property:"radiusRange"},opacity:{type:"number",defaultValue:.8,label:"layerVisConfigs.opacity",isRanged:!1,range:[0,1],step:.01,group:s.color,property:"opacity"},coverage:{type:"number",defaultValue:1,label:"layerVisConfigs.coverage",isRanged:!1,range:[0,1],step:.01,group:s.cell,property:"coverage"},outline:{type:"boolean",defaultValue:!1,label:"layer.outline",group:s.display,property:"outline"},colorRange:{type:"color-range-select",defaultValue:a.DEFAULT_COLOR_RANGE,label:"layerVisConfigs.colorRange",group:s.color,property:"colorRange"},strokeColorRange:{type:"color-range-select",defaultValue:a.DEFAULT_COLOR_RANGE,label:"layerVisConfigs.strokeColorRange",group:s.color,property:"strokeColorRange"},targetColor:{type:"color-select",label:"layerVisConfigs.targetColor",defaultValue:null,group:s.color,property:"targetColor"},strokeColor:{type:"color-select",label:"layerVisConfigs.strokeColor",defaultValue:null,group:s.color,property:"strokeColor"},aggregation:{type:"select",defaultValue:o.AGGREGATION_TYPES.average,label:"layerVisConfigs.colorAggregation",options:Object.keys(o.AGGREGATION_TYPES),group:s.color,property:"colorAggregation",condition:function(e){return e.colorField}},sizeAggregation:{type:"select",defaultValue:o.AGGREGATION_TYPES.average,label:"layerVisConfigs.heightAggregation",options:Object.keys(o.AGGREGATION_TYPES),group:s.height,property:"sizeAggregation",condition:function(e){return e.sizeField}},percentile:{type:"number",defaultValue:[0,100],label:function(e){return"Filter by ".concat(e.colorField?"".concat(e.visConfig.colorAggregation," ").concat(e.colorField.name):"count"," percentile")},isRanged:!0,range:[0,100],step:.01,group:s.color,property:"percentile",condition:function(e){return"ordinal"!==e.colorScale}},elevationPercentile:{type:"number",defaultValue:[0,100],label:function(e){return"Filter by ".concat(e.sizeField?"".concat(e.visConfig.sizeAggregation," ").concat(e.sizeField.name):"count"," percentile")},isRanged:!0,range:[0,100],step:.01,group:s.height,property:"elevationPercentile",condition:function(e){return e.visConfig.enable3d&&(e.colorField||e.sizeField)}},resolution:{type:"number",defaultValue:8,label:"layerVisConfigs.resolution",isRanged:!1,range:[0,13],step:1,group:s.cell,property:"resolution"},sizeScale:{type:"number",defaultValue:10,label:"layerVisConfigs.sizeScale",isRanged:!1,range:[1,1e3],step:1,group:s.stroke,property:"sizeScale"},angle:{type:"number",label:"layerVisConfigs.angle",defaultValue:0,isRanged:!1,range:[0,360],group:s.angle,step:1,property:"angle"},worldUnitSize:{type:"number",defaultValue:1,label:"layerVisConfigs.worldUnitSize",isRanged:!1,range:[0,500],step:1e-4,group:s.cell,property:"worldUnitSize"},elevationScale:{type:"number",defaultValue:5,label:"layerVisConfigs.elevationScale",isRanged:!1,range:[0,100],step:.1,group:s.height,property:"elevationScale"},enableElevationZoomFactor:{type:"boolean",defaultValue:!0,label:"layerVisConfigs.enableElevationZoomFactor",group:s.height,property:"enableElevationZoomFactor",description:"layerVisConfigs.enableElevationZoomFactorDescription"},elevationRange:{type:"number",defaultValue:[0,500],label:"layerVisConfigs.heightScale",isRanged:!0,range:[0,1e3],step:.01,group:s.height,property:"sizeRange"},heightRange:{type:"number",defaultValue:[0,500],label:"Height Scale",isRanged:!0,range:[0,1e3],step:.01,group:s.height,property:"heightRange"},coverageRange:{type:"number",defaultValue:[0,1],label:"layerVisConfigs.coverageRange",isRanged:!0,range:[0,1],step:.01,group:s.radius,property:"coverageRange"},"hi-precision":{type:"boolean",defaultValue:!1,label:"layerVisConfigs.highPrecisionRendering",group:s.precision,property:"hi-precision",description:"layerVisConfigs.highPrecisionRenderingDescription"},enable3d:{type:"boolean",defaultValue:!1,label:"layerVisConfigs.height",group:s.height,property:"enable3d",description:"layerVisConfigs.heightDescription"},stroked:{type:"boolean",label:"layerVisConfigs.stroke",defaultValue:!0,group:s.display,property:"stroked"},filled:{type:"boolean",label:"layerVisConfigs.fill",defaultValue:!1,group:s.display,property:"filled"},extruded:{type:"boolean",defaultValue:!1,label:"layerVisConfigs.enablePolygonHeight",group:s.display,property:"extruded"},wireframe:{type:"boolean",defaultValue:!1,label:"layerVisConfigs.showWireframe",group:s.display,property:"wireframe"},weight:{type:"number",defaultValue:1,label:"layerVisConfigs.weightIntensity",isRanged:!1,range:[.01,500],step:.01,group:s.cell,property:"weight",condition:function(e){return e.weightField}},heatmapRadius:{type:"number",defaultValue:20,label:"layerVisConfigs.radius",isRanged:!1,range:[0,100],step:.1,group:s.cell,property:"radius"}};t.LAYER_VIS_CONFIGS=c;t.LAYER_TEXT_CONFIGS={fontSize:{type:"number",range:[1,100],value0:1,step:1,isRanged:!1,label:"Font size",showInput:!0},textAnchor:{type:"select",options:["start","middle","end"],multiSelect:!1,searchable:!1},textAlignment:{type:"select",options:["top","center","bottom"],multiSelect:!1,searchable:!1}}},function(e,t,n){"use strict";n.r(t),n.d(t,"bisect",(function(){return c})),n.d(t,"bisectRight",(function(){return s})),n.d(t,"bisectLeft",(function(){return l})),n.d(t,"bisectCenter",(function(){return u})),n.d(t,"ascending",(function(){return r})),n.d(t,"bisector",(function(){return i})),n.d(t,"count",(function(){return f})),n.d(t,"cross",(function(){return g})),n.d(t,"cumsum",(function(){return m})),n.d(t,"descending",(function(){return y})),n.d(t,"deviation",(function(){return b})),n.d(t,"extent",(function(){return _})),n.d(t,"Adder",(function(){return A})),n.d(t,"fsum",(function(){return x})),n.d(t,"fcumsum",(function(){return w})),n.d(t,"group",(function(){return k})),n.d(t,"groups",(function(){return L})),n.d(t,"index",(function(){return j})),n.d(t,"indexes",(function(){return I})),n.d(t,"rollup",(function(){return R})),n.d(t,"rollups",(function(){return D})),n.d(t,"groupSort",(function(){return U})),n.d(t,"bin",(function(){return Q})),n.d(t,"histogram",(function(){return Q})),n.d(t,"thresholdFreedmanDiaconis",(function(){return ae})),n.d(t,"thresholdScott",(function(){return se})),n.d(t,"thresholdSturges",(function(){return J})),n.d(t,"max",(function(){return ee})),n.d(t,"maxIndex",(function(){return le})),n.d(t,"mean",(function(){return ue})),n.d(t,"median",(function(){return ce})),n.d(t,"merge",(function(){return fe})),n.d(t,"min",(function(){return te})),n.d(t,"minIndex",(function(){return de})),n.d(t,"nice",(function(){return $})),n.d(t,"pairs",(function(){return pe})),n.d(t,"permute",(function(){return z})),n.d(t,"quantile",(function(){return ie})),n.d(t,"quantileSorted",(function(){return oe})),n.d(t,"quickselect",(function(){return ne})),n.d(t,"range",(function(){return ge})),n.d(t,"least",(function(){return me})),n.d(t,"leastIndex",(function(){return ye})),n.d(t,"greatest",(function(){return ve})),n.d(t,"greatestIndex",(function(){return be})),n.d(t,"scan",(function(){return _e})),n.d(t,"shuffle",(function(){return Ae})),n.d(t,"shuffler",(function(){return xe})),n.d(t,"sum",(function(){return we})),n.d(t,"ticks",(function(){return X})),n.d(t,"tickIncrement",(function(){return Z})),n.d(t,"tickStep",(function(){return K})),n.d(t,"transpose",(function(){return Ee})),n.d(t,"variance",(function(){return v})),n.d(t,"zip",(function(){return Me})),n.d(t,"every",(function(){return Se})),n.d(t,"some",(function(){return Te})),n.d(t,"filter",(function(){return Ce})),n.d(t,"map",(function(){return Pe})),n.d(t,"reduce",(function(){return ke})),n.d(t,"reverse",(function(){return Le})),n.d(t,"sort",(function(){return B})),n.d(t,"difference",(function(){return Re})),n.d(t,"disjoint",(function(){return De})),n.d(t,"intersection",(function(){return Ie})),n.d(t,"subset",(function(){return Fe})),n.d(t,"superset",(function(){return Ne})),n.d(t,"union",(function(){return ze})),n.d(t,"InternMap",(function(){return E})),n.d(t,"InternSet",(function(){return O}));var r=function(e,t){return et?1:e>=t?0:NaN},i=function(e){let t=e,n=e;function i(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>r(e(t),n)}(e)),{left:i,center:function(e,n,r,o){null==r&&(r=0),null==o&&(o=e.length);const a=i(e,n,r,o-1);return a>r&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}};var o=function(e){return null===e?NaN:+e};const a=i(r),s=a.right,l=a.left,u=i(o).center;var c=s;function f(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}function d(e){return 0|e.length}function p(e){return!(e>0)}function h(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function g(...e){const t="function"==typeof e[e.length-1]&&function(e){return t=>e(...t)}(e.pop()),n=(e=e.map(h)).map(d),r=e.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(p))return o;for(;;){o.push(i.map((t,n)=>e[n][t]));let a=r;for(;++i[a]===n[a];){if(0===a)return t?o.map(t):o;i[a--]=0}}}function m(e,t){var n=0,r=0;return Float64Array.from(e,void 0===t?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)}var y=function(e,t){return te?1:t>=e?0:NaN};function v(e,t){let n,r=0,i=0,o=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,o+=n*(t-i));else{let a=-1;for(let s of e)null!=(s=t(s,++a,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,o+=n*(s-i))}if(r>1)return o/(r-1)}function b(e,t){const n=v(e,t);return n?Math.sqrt(n):n}var _=function(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}function x(e,t){const n=new A;if(void 0===t)for(let t of e)(t=+t)&&n.add(t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function w(e,t){const n=new A;let r=-1;return Float64Array.from(e,void 0===t?e=>n.add(+e||0):i=>n.add(+t(i,++r,e)||0))}class E extends Map{constructor(e,t=C){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(M(this,e))}has(e){return super.has(M(this,e))}set(e,t){return super.set(S(this,e),t)}delete(e){return super.delete(T(this,e))}}class O extends Set{constructor(e,t=C){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const t of e)this.add(t)}has(e){return super.has(M(this,e))}add(e){return super.add(S(this,e))}delete(e){return super.delete(T(this,e))}}function M({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function S({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function T({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function C(e){return null!==e&&"object"==typeof e?e.valueOf():e}var P=function(e){return e};function k(e,...t){return F(e,P,P,t)}function L(e,...t){return F(e,Array.from,P,t)}function R(e,t,...n){return F(e,P,t,n)}function D(e,t,...n){return F(e,Array.from,t,n)}function j(e,...t){return F(e,P,N,t)}function I(e,...t){return F(e,Array.from,N,t)}function N(e){if(1!==e.length)throw new Error("duplicate key");return e[0]}function F(e,t,n,r){return function e(i,o){if(o>=r.length)return n(i);const a=new E,s=r[o++];let l=-1;for(const e of i){const t=s(e,++l,i),n=a.get(t);n?n.push(e):a.set(t,[e])}for(const[t,n]of a)a.set(t,e(n,o));return t(a)}(e,0)}var z=function(e,t){return Array.from(t,t=>e[t])};function B(e,...t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n=r]=t;if(1===n.length||t.length>1){const i=Uint32Array.from(e,(e,t)=>t);return t.length>1?(t=t.map(t=>e.map(t)),i.sort((e,n)=>{for(const i of t){const t=r(i[e],i[n]);if(t)return t}})):(n=e.map(n),i.sort((e,t)=>r(n[e],n[t]))),z(e,i)}return e.sort(n)}function U(e,t,n){return(1===t.length?B(R(e,t,n),([e,t],[n,i])=>r(t,i)||r(e,n)):B(k(e,n),([e,n],[i,o])=>t(n,o)||r(e,i))).map(([e])=>e)}var V=Array.prototype,H=V.slice,W=(V.map,function(e){return function(){return e}}),q=Math.sqrt(50),Y=Math.sqrt(10),G=Math.sqrt(2),X=function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t0){let n=Math.round(e/a),r=Math.round(t/a);for(n*at&&--r,o=new Array(i=r-n+1);++st&&--r,o=new Array(i=r-n+1);++s=0?(o>=q?10:o>=Y?5:o>=G?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=q?10:o>=Y?5:o>=G?2:1)}function K(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=q?i*=10:o>=Y?i*=5:o>=G&&(i*=2),t0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}var J=function(e){return Math.ceil(Math.log(f(e))/Math.LN2)+1},Q=function(){var e=P,t=_,n=J;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,s=new Array(a);for(i=0;i=f)if(e>=f&&t===_){const e=Z(u,f,n);isFinite(e)&&(e>0?f=(Math.floor(f/e)+1)*e:e<0&&(f=(Math.ceil(f*-e)+1)/-e))}else d.pop()}for(var p=d.length;d[0]<=u;)d.shift(),--p;for(;d[p-1]>f;)d.pop(),--p;var h,g=new Array(p+1);for(i=0;i<=p;++i)(h=g[i]=[]).x0=i>0?d[i-1]:u,h.x1=i=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function te(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function ne(e,t,n=0,i=e.length-1,o=r){for(;i>n;){if(i-n>600){const r=i-n+1,a=t-n+1,s=Math.log(r),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(r-l)/r)*(a-r/2<0?-1:1);ne(e,t,Math.max(n,Math.floor(t-a*l/r+u)),Math.min(i,Math.floor(t+(r-a)*l/r+u)),o)}const r=e[t];let a=n,s=i;for(re(e,n,t),o(e[i],r)>0&&re(e,n,i);a0;)--s}0===o(e[n],r)?re(e,n,s):(++s,re(e,s,i)),s<=t&&(n=s+1),t<=s&&(i=s-1)}return e}function re(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ie(e,t,n){if(r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n))).length){if((t=+t)<=0||r<2)return te(e);if(t>=1)return ee(e);var r,i=(r-1)*t,o=Math.floor(i),a=ee(ne(e,o).subarray(0,o+1));return a+(te(e.subarray(o+1))-a)*(i-o)}}function oe(e,t,n=o){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),s=+n(e[a],a,e);return s+(+n(e[a+1],a+1,e)-s)*(i-a)}}var ae=function(e,t,n){return Math.ceil((n-t)/(2*(ie(e,.75)-ie(e,.25))*Math.pow(f(e),-1/3)))},se=function(e,t,n){return Math.ceil((n-t)/(3.5*b(e)*Math.pow(f(e),-1/3)))};function le(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n=o)&&(n=o,r=i);return r}function ue(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}var ce=function(e,t){return ie(e,.5,t)};function fe(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function de(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n>t||void 0===n&&t>=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function pe(e,t=he){const n=[];let r,i=!1;for(const o of e)i&&n.push(t(r,o)),r=o,i=!0;return n}function he(e,t){return[e,t]}var ge=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r0:0===r(e,e))&&(n=a,o=e,i=!0)}}else for(const r of e)(i?t(r,n)>0:0===t(r,r))&&(n=r,i=!0);return n}function be(e,t=r){if(1===t.length)return le(e,t);let n,i=-1,o=-1;for(const r of e)++o,(i<0?0===t(r,r):t(r,n)>0)&&(n=r,i=o);return i}function _e(e,t){const n=ye(e,t);return n<0?void 0:n}var Ae=xe(Math.random);function xe(e){return function(t,n=0,r=t.length){let i=r-(n=+n);for(;i;){const r=e()*i--|0,o=t[i+n];t[i+n]=t[r+n],t[r+n]=o}return t}}function we(e,t){let n=0;if(void 0===t)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}var Ee=function(e){if(!(i=e.length))return[];for(var t=-1,n=te(e,Oe),r=new Array(n);++tt(n,r,e))}function ke(e,t,n){if("function"!=typeof t)throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)n=t(n,o,++a,e);return n}function Le(e){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(e).reverse()}function Re(e,...t){e=new Set(e);for(const n of t)for(const t of n)e.delete(t);return e}function De(e,t){const n=t[Symbol.iterator](),r=new Set;for(const t of e){if(r.has(t))return!1;let e,i;for(;({value:e,done:i}=n.next())&&!i;){if(Object.is(t,e))return!1;r.add(e)}}return!0}function je(e){return e instanceof Set?e:new Set(e)}function Ie(e,...t){e=new Set(e),t=t.map(je);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e}function Ne(e,t){const n=e[Symbol.iterator](),r=new Set;for(const e of t){if(r.has(e))continue;let t,i;for(;({value:t,done:i}=n.next());){if(i)return!1;if(r.add(t),Object.is(e,t))break}}return!0}function Fe(e,t){return Ne(t,e)}function ze(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return t}},function(e,t,n){"use strict";n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return f}));var r=n(36),i=n(139),o=n(849);function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nt(e[n],n))}(e,(e,o)=>{const a=n[o];a!==t[o]&&(i[o]=a,e(r,a))}),i}function x(e,t,n){return function(e,t,n){return Object.keys(e).reduce((function(n,r){return t(n,e[r],r)}),n)}(n,(function(n,r,i){return"function"==typeof e[i]&&n.push(google.maps.event.addListener(t,r,e[i])),n}),[])}function w(e){google.maps.event.removeListener(e)}function E(e=[]){e.forEach(w)}function O({updaterMap:e,eventMap:t,prevProps:n,nextProps:r,instance:i}){const o=x(r,i,t);return A(e,n,r,i),o}const M={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},S={extraMapTypes(e,t){t.forEach((function(t,n){e.mapTypes.set(String(n),t)}))},center(e,t){e.setCenter(t)},clickableIcons(e,t){e.setClickableIcons(t)},heading(e,t){e.setHeading(t)},mapTypeId(e,t){e.setMapTypeId(t)},options(e,t){e.setOptions(t)},streetView(e,t){e.setStreetView(t)},tilt(e,t){e.setTilt(t)},zoom(e,t){e.setZoom(t)}};class T extends r.PureComponent{constructor(){super(...arguments),this.state={map:null},this.registeredEvents=[],this.mapRef=null,this.getInstance=()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options),this.panTo=e=>{const t=this.getInstance();t&&t.panTo(e)},this.setMapCallback=()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)},this.getRef=e=>{this.mapRef=e}}componentDidMount(){const e=this.getInstance();this.registeredEvents=O({updaterMap:S,eventMap:M,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)}componentDidUpdate(e){null!==this.state.map&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:S,eventMap:M,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),E(this.registeredEvents))}render(){return a.exports.jsx("div",Object.assign({id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},{children:a.exports.jsx(_.Provider,Object.assign({value:this.state.map},{children:null!==this.state.map?this.props.children:a.exports.jsx(a.exports.Fragment,{})}))}))}} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function C(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{throw console.error("injectScript error: ",e),e}):Promise.reject(new Error("document is undefined"))}function R(e){return!(!e.href||0!==e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))||("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",!0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",!0):"style"===e.tagName.toLowerCase()&&!e.styleSheet&&!e.innerHTML)}function D(){const e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(n,r){R(n)||Reflect.apply(t,e,[n,r])};const n=e.appendChild.bind(e);e.appendChild=function(t){R(t)||Reflect.apply(n,e,[t])}}function j({googleMapsApiKey:e,googleMapsClientId:t,version:n="weekly",language:r,region:i,libraries:o,channel:a,mapIds:s}){const l=[];return b(e&&t||!(e&&t),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?l.push("key="+e):t&&l.push("client="+t),n&&l.push("v="+n),r&&l.push("language="+r),i&&l.push("region="+i),o&&o.length&&l.push("libraries="+o.sort().join(",")),a&&l.push("channel="+a),s&&s.length&&l.push("map_ids="+s.join(",")),l.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+l.join("&")}let I=!1;function N(){return a.exports.jsx("div",{children:"Loading..."})}const F={id:"script-loader",version:"weekly"};class z extends r.PureComponent{constructor(){super(...arguments),this.check=Object(r.createRef)(),this.state={loaded:!1},this.cleanupCallback=()=>{delete window.google.maps,this.injectScript()},this.isCleaningUp=()=>P(this,void 0,void 0,(function*(){return new Promise((function(e){if(I){if(k){const t=window.setInterval((function(){I||(window.clearInterval(t),e())}),1)}}else e()}))})),this.cleanup=()=>{I=!0;const e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"==typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},this.injectScript=()=>{this.props.preventGoogleFontsLoading&&D(),b(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);L({id:this.props.id,nonce:this.props.nonce,url:j(this.props)}).then(()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))}).catch(e=>{this.props.onError&&this.props.onError(e),console.error(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this.props.googleMapsApiKey||"-"}) or Client ID (${this.props.googleMapsClientId||"-"}) to \n Otherwise it is a Network issue.\n `)})}}componentDidMount(){if(k){if(window.google&&window.google.maps&&!I)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}}componentDidUpdate(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),k&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(k){this.cleanup();const e=()=>{this.check.current||(delete window.google,I=!1)};window.setTimeout(e,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return a.exports.jsxs(a.exports.Fragment,{children:[a.exports.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||a.exports.jsx(N,{})]})}}let B;z.defaultProps=F;const U=a.exports.jsx(N,{});Object(r.memo)((function(e){var{loadingElement:t,onLoad:n,onError:i,onUnmount:o,children:a}=e,s=C(e,["loadingElement","onLoad","onError","onUnmount","children"]);const{isLoaded:l,loadError:u}=function({id:e=F.id,version:t=F.version,nonce:n,googleMapsApiKey:i,googleMapsClientId:o,language:a,region:s,libraries:l,preventGoogleFontsLoading:u,channel:c,mapIds:f}){const d=Object(r.useRef)(!1),[p,h]=Object(r.useState)(!1),[g,m]=Object(r.useState)(void 0);Object(r.useEffect)((function(){return d.current=!0,()=>{d.current=!1}}),[]),Object(r.useEffect)((function(){k&&u&&D()}),[u]),Object(r.useEffect)((function(){p&&b(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[p]);const y=j({version:t,googleMapsApiKey:i,googleMapsClientId:o,language:a,region:s,libraries:l,channel:c,mapIds:f});Object(r.useEffect)((function(){function t(){d.current&&(h(!0),B=y)}k&&(window.google&&window.google.maps&&B===y?t():L({id:e,url:y,nonce:n}).then(t).catch((function(e){d.current&&m(e),console.warn(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${i||"-"}) or Client ID (${o||"-"})\n Otherwise it is a Network issue.\n `),console.error(e)})))}),[e,y,n]);const v=Object(r.useRef)();return Object(r.useEffect)((function(){v.current&&l!==v.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),v.current=l}),[l]),{isLoaded:p,loadError:g,url:y}}(s);return Object(r.useEffect)((function(){l&&"function"==typeof n&&n()}),[l,n]),Object(r.useEffect)((function(){u&&"function"==typeof i&&i(u)}),[u,i]),Object(r.useEffect)((function(){return()=>{o&&o()}}),[o]),l?a:t||U}));var V;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(V||(V={}));const H={},W={options(e,t){e.setOptions(t)}};class q extends r.PureComponent{constructor(){super(...arguments),this.state={trafficLayer:null},this.setTrafficLayerCallback=()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)},this.registeredEvents=[]}componentDidMount(){const e=new google.maps.TrafficLayer(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=O({updaterMap:W,eventMap:H,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)}componentDidUpdate(e){null!==this.state.trafficLayer&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:W,eventMap:H,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),E(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}q.contextType=_;class Y extends r.PureComponent{constructor(){super(...arguments),this.state={bicyclingLayer:null},this.setBicyclingLayerCallback=()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}}componentDidMount(){const e=new google.maps.BicyclingLayer;this.setState(()=>({bicyclingLayer:e}),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}Y.contextType=_;class G extends r.PureComponent{constructor(){super(...arguments),this.state={transitLayer:null},this.setTransitLayerCallback=()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}}componentDidMount(){const e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}G.contextType=_;const X={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Z={drawingMode(e,t){e.setDrawingMode(t)},options(e,t){e.setOptions(t)}};class K extends r.PureComponent{constructor(e){super(e),this.registeredEvents=[],this.state={drawingManager:null},this.setDrawingManagerCallback=()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)},b(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){const e=new google.maps.drawing.DrawingManager(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=O({updaterMap:Z,eventMap:X,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)}componentDidUpdate(e){null!==this.state.drawingManager&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:Z,eventMap:X,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),E(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}K.contextType=_;const $={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},J={animation(e,t){e.setAnimation(t)},clickable(e,t){e.setClickable(t)},cursor(e,t){e.setCursor(t)},draggable(e,t){e.setDraggable(t)},icon(e,t){e.setIcon(t)},label(e,t){e.setLabel(t)},map(e,t){e.setMap(t)},opacity(e,t){e.setOpacity(t)},options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},shape(e,t){e.setShape(t)},title(e,t){e.setTitle(t)},visible(e,t){e.setVisible(t)},zIndex(e,t){e.setZIndex(t)}};class Q extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[]}componentDidMount(){const e=Object.assign(Object.assign(Object.assign({},this.props.options||{}),this.props.clusterer?{}:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(e),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=O({updaterMap:J,eventMap:$,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)}componentDidUpdate(e){this.marker&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:J,eventMap:$,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),E(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){let e=null;return this.props.children&&(e=r.Children.map(this.props.children,e=>{if(!Object(r.isValidElement)(e))return e;let t=e;return Object(r.cloneElement)(t,{anchor:this.marker})})),e||null}}Q.contextType=_;var ee=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(t.getMap())}return e.prototype.onAdd=function(){var e,t,n=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){t=e})),google.maps.event.addDomListener(this.div,"mousedown",(function(){e=!0,t=!1})),google.maps.event.addDomListener(this.div,"click",(function(r){if(e=!1,!t){var i=n.cluster.getClusterer();if(google.maps.event.trigger(i,"click",n.cluster),google.maps.event.trigger(i,"clusterclick",n.cluster),i.getZoomOnClick()){var o=i.getMaxZoom(),a=n.cluster.getBounds();i.getMap().fitBounds(a),setTimeout((function(){i.getMap().fitBounds(a),null!==o&&i.getMap().getZoom()>o&&i.getMap().setZoom(o+1)}),100)}r.cancelBubble=!0,r.stopPropagation&&r.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(n.cluster.getClusterer(),"mouseover",n.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(n.cluster.getClusterer(),"mouseout",n.cluster)}))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var e=this.getPosFromLatLng(this.center),t=e.x,n=e.y;this.div.style.top=n+"px",this.div.style.left=t+"px"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var e;if(this.div&&this.center){var t="",n=this.backgroundPosition.split(" "),r=parseInt(n[0].replace(/^\s+|\s+$/g,""),10),i=parseInt(n[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng(this.center);t=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(o.y,"px"),this.div.style.left="".concat(o.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var a=document.createElement("img");a.alt=t,a.src=this.url,a.style.position="absolute",a.style.top="".concat(i,"px"),a.style.left="".concat(r,"px"),this.cluster.getClusterer().enableRetinaIcons||(a.style.clip="rect(-".concat(i,"px, -").concat(r+this.width,"px, -").concat(i+this.height,", -").concat(r,")"));var s=document.createElement("div");s.style.position="absolute",s.style.top="".concat(this.anchorText[0],"px"),s.style.left="".concat(this.anchorText[1],"px"),s.style.color=this.textColor,s.style.fontSize="".concat(this.textSize,"px"),s.style.fontFamily=this.fontFamily,s.style.fontWeight=this.fontWeight,s.style.fontStyle=this.fontStyle,s.style.textDecoration=this.textDecoration,s.style.textAlign="center",s.style.width="".concat(this.width,"px"),s.style.lineHeight="".concat(this.height,"px"),s.innerText="".concat(null===(e=this.sums)||void 0===e?void 0:e.text),this.div.innerHTML="",this.div.appendChild(a),this.div.appendChild(s),this.div.title=t,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(e){this.sums=e;var t=this.cluster.getClusterer().getStyles(),n=t[Math.min(t.length-1,Math.max(0,e.index-1))];this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0"},e.prototype.setCenter=function(e){this.center=e},e.prototype.getPosFromLatLng=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return t.x-=this.anchorIcon[1],t.y-=this.anchorIcon[0],t},e}(),te=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new ee(this,this.markerClusterer.getStyles())}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),t=this.getMarkers(),n=0;ni)e.getMap()!==this.map&&e.setMap(this.map);else if(rt||e0))for(var e=0;e3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),r=this.getExtendedBounds(n),i=Math.min(e+this.batchSize,this.markers.length),o=e;o{null!==this.state.markerClusterer&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)}}componentDidMount(){if(this.context){const e=new ie(this.context,[],this.props.options);this.registeredEvents=O({updaterMap:ae,eventMap:oe,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{markerClusterer:e}}),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:ae,eventMap:oe,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),E(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null}}se.contextType=_;var le=function(){function e(t){void 0===t&&(t={}),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),void 0===t.visible&&(void 0===t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var e=this;function t(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}if(!this.div){if(this.div=document.createElement("div"),this.setBoxStyle(),"string"==typeof this.content?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content)),this.getPanes()[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(0!==this.maxWidth&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var n=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-n.left-n.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var r=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],i=0;ia&&(n=h.x+c+l+d-a),this.alignBottom?h.y<-u+p+f?r=h.y+u-p-f:h.y+u+p>s&&(r=h.y+u+p-s):h.y<-u+p?r=h.y+u-p:h.y+f+u+p>s&&(r=h.y+f+u+p-s)),0===n&&0===r||t.panBy(n,r)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var t in e)e.hasOwnProperty(t)&&(this.div.style[t]=e[t]);if(this.div.style.webkitTransform="translateZ(0)",void 0!==this.div.style.opacity&&""!==this.div.style.opacity){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"',this.div.style.filter="alpha(opacity="+100*n+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",null!==this.zIndex&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},e.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var t=this.div.ownerDocument,n=t&&t.defaultView?t.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var r=this.div.currentStyle;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}return e},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection().fromLatLngToDivPixel(this.position);null!==e&&(this.div.style.left=e.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(e.y+this.pixelOffset.height)+"px":this.div.style.top=e.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},e.prototype.setOptions=function(e){void 0===e&&(e={}),void 0!==e.boxClass&&(this.boxClass=e.boxClass,this.setBoxStyle()),void 0!==e.boxStyle&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),void 0!==e.content&&this.setContent(e.content),void 0!==e.disableAutoPan&&(this.disableAutoPan=e.disableAutoPan),void 0!==e.maxWidth&&(this.maxWidth=e.maxWidth),void 0!==e.pixelOffset&&(this.pixelOffset=e.pixelOffset),void 0!==e.alignBottom&&(this.alignBottom=e.alignBottom),void 0!==e.position&&this.setPosition(e.position),void 0!==e.zIndex&&this.setZIndex(e.zIndex),void 0!==e.closeBoxMargin&&(this.closeBoxMargin=e.closeBoxMargin),void 0!==e.closeBoxURL&&(this.closeBoxURL=e.closeBoxURL),void 0!==e.infoBoxClearance&&(this.infoBoxClearance=e.infoBoxClearance),void 0!==e.isHidden&&(this.isHidden=e.isHidden),void 0!==e.visible&&(this.isHidden=!e.visible),void 0!==e.enableEventPropagation&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"==typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"==typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var e=this.getMap();return null!=e&&!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(e,t){var n=this;t&&(this.position=t.getPosition(),this.moveListener=google.maps.event.addListener(t,"position_changed",(function(){var e=t.getPosition();n.setPosition(e)})),this.mapListener=google.maps.event.addListener(t,"map_changed",(function(){n.setMap(t.map)}))),this.setMap(e),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0;e{t?e.open(this.context,t):e.getPosition()?e.open(this.context):b(!1,"You must provide either an anchor or a position prop for .")},this.setInfoBoxCallback=()=>{const{anchor:e,onLoad:t}=this.props,{infoBox:n}=this.state;null!==n&&null!==this.containerElement&&(n.setContent(this.containerElement),this.open(n,e),t&&t(n))}}componentDidMount(){const{options:e}=this.props,t=e||{},{position:n}=t,r=C(t,["position"]);let i;!n||n instanceof google.maps.LatLng||(i=new google.maps.LatLng(n.lat,n.lng));const o=new le(Object.assign(Object.assign({},r),i?{position:i}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=O({updaterMap:ce,eventMap:ue,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)}componentDidUpdate(e){const{infoBox:t}=this.state;null!==t&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:ce,eventMap:ue,prevProps:e,nextProps:this.props,instance:t}))}componentWillUnmount(){const{onUnmount:e}=this.props,{infoBox:t}=this.state;null!==t&&(e&&e(t),E(this.registeredEvents),t.close())}render(){return this.containerElement?Object(o.createPortal)(r.Children.only(this.props.children),this.containerElement):null}}fe.contextType=_;var de={exports:{}};!function(e,t){e.exports=function(){function e(n,r,i,o,a,s){if(!(a-o<=i)){var l=o+a>>1;!function e(n,r,i,o,a,s){for(;a>o;){if(a-o>600){var l=a-o+1,u=i-o+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(o,Math.floor(i-u*f/l+d)),h=Math.min(a,Math.floor(i+(l-u)*f/l+d));e(n,r,i,p,h,s)}var g=r[2*i+s],m=o,y=a;for(t(n,r,o,i),r[2*a+s]>g&&t(n,r,o,a);mg;)y--}r[2*o+s]===g?t(n,r,o,y):(y++,t(n,r,y,a)),y<=i&&(o=y+1),i<=y&&(a=y-1)}}(n,r,l,o,a,s%2),e(n,r,i,o,l-1,s+1),e(n,r,i,l+1,a,s+1)}}function t(e,t,r,i){n(e,r,i),n(t,2*r,2*i),n(t,2*r+1,2*i+1)}function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,n,r){var i=e-n,o=t-r;return i*i+o*o}var i=function(e){return e[0]},o=function(e){return e[1]},a=function(t,n,r,a,s){void 0===n&&(n=i),void 0===r&&(r=o),void 0===a&&(a=64),void 0===s&&(s=Float64Array),this.nodeSize=a,this.points=t;for(var l=t.length<65536?Uint16Array:Uint32Array,u=this.ids=new l(t.length),c=this.coords=new s(2*t.length),f=0;f=n&&s<=i&&l>=r&&l<=o&&c.push(e[h]);else{var g=Math.floor((p+d)/2);s=t[2*g],l=t[2*g+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[g]);var m=(f+1)%2;(0===f?n<=s:r<=l)&&(u.push(p),u.push(g-1),u.push(m)),(0===f?i>=s:o>=l)&&(u.push(g+1),u.push(d),u.push(m))}}return c}(this.ids,this.coords,e,t,n,r,this.nodeSize)},a.prototype.within=function(e,t,n){return function(e,t,n,i,o,a){for(var s=[0,e.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),f=s.pop(),d=s.pop();if(f-d<=a)for(var p=d;p<=f;p++)r(t[2*p],t[2*p+1],n,i)<=u&&l.push(e[p]);else{var h=Math.floor((d+f)/2),g=t[2*h],m=t[2*h+1];r(g,m,n,i)<=u&&l.push(e[h]);var y=(c+1)%2;(0===c?n-o<=g:i-o<=m)&&(s.push(d),s.push(h-1),s.push(y)),(0===c?n+o>=g:i+o>=m)&&(s.push(h+1),s.push(f),s.push(y))}}return l}(this.ids,this.coords,e,t,n,this.nodeSize)},a}()}(de);var pe=de.exports;const he={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},ge=Math.fround||(me=new Float32Array(1),e=>(me[0]=+e,me[0]));var me;class ye{constructor(e){this.options=Oe(Object.create(he),e),this.trees=new Array(this.options.maxZoom+1)}load(e){const{log:t,minZoom:n,maxZoom:r,nodeSize:i}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;let a=[];for(let t=0;t=n;e--){const n=+Date.now();a=this._cluster(a,e),this.trees[e]=new pe(a,Me,Se,i,Float32Array),t&&console.log("z%d: %d clusters in %dms",e,a.length,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,e[1]));let i=180===e[2]?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){const e=this.getClusters([n,r,180,o],t),a=this.getClusters([-180,r,i,o],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],s=a.range(xe(n),we(o),xe(i),we(r)),l=[];for(const e of s){const t=a.points[e];l.push(t.numPoints?_e(t):this.points[t.index])}return l}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.points[t];if(!o)throw new Error(r);const a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i.within(o.x,o.y,a),l=[];for(const t of s){const n=i.points[t];n.parentId===e&&l.push(n.numPoints?_e(n):this.points[n.index])}if(0===l.length)throw new Error(r);return l}getLeaves(e,t,n){t=t||10,n=n||0;const r=[];return this._appendLeaves(r,e,t,n,0),r}getTile(e,t,n){const r=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:o,radius:a}=this.options,s=a/o,l=(n-s)/i,u=(n+1+s)/i,c={features:[]};return this._addTileFeatures(r.range((t-s)/i,l,(t+1+s)/i,u),r.points,t,n,i,c),0===t&&this._addTileFeatures(r.range(1-s/i,l,1,u),r.points,i,n,i,c),t===i-1&&this._addTileFeatures(r.range(0,l,s/i,u),r.points,-1,n,i,c),c.features.length?c:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,r,i){const o=this.getChildren(t);for(const t of o){const o=t.properties;if(o&&o.cluster?i+o.point_count<=r?i+=o.point_count:i=this._appendLeaves(e,o.cluster_id,n,r,i):it&&(f+=n.numPoints||1)}if(f>c&&f>=a){let e=i.x*c,a=i.y*c,s=o&&c>1?this._map(i,!0):null;const d=(r<<5)+(t+1)+this.points.length;for(const n of u){const r=l.points[n];if(r.zoom<=t)continue;r.zoom=t;const u=r.numPoints||1;e+=r.x*u,a+=r.y*u,r.parentId=d,o&&(s||(s=this._map(i,!0)),o(s,this._map(r)))}i.parentId=d,n.push(ve(e/f,a/f,d,f,s))}else if(n.push(i),f>1)for(const e of u){const r=l.points[e];r.zoom<=t||(r.zoom=t,n.push(r))}}return n}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t){if(e.numPoints)return t?Oe({},e.properties):e.properties;const n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?Oe({},r):r}}function ve(e,t,n,r,i){return{x:ge(e),y:ge(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function be(e,t){const[n,r]=e.geometry.coordinates;return{x:ge(xe(n)),y:ge(we(r)),zoom:1/0,index:t,parentId:-1}}function _e(e){return{type:"Feature",id:e.id,properties:Ae(e),geometry:{type:"Point",coordinates:[(t=e.x,360*(t-.5)),Ee(e.y)]}};var t}function Ae(e){const t=e.numPoints,n=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return Oe(Oe({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function xe(e){return e/360+.5}function we(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Ee(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Oe(e,t){for(const n in t)e[n]=t[n];return e}function Me(e){return e.x}function Se(e){return e.y}var Te="function"==typeof WeakSet,Ce=Object.keys;function Pe(e,t){return e===t||e!=e&&t!=t}function ke(e){return e.constructor===Object||null==e.constructor}function Le(e){return!!e&&"function"==typeof e.then}function Re(e){return!(!e||!e.$$typeof)}function De(){var e=[];return{add:function(t){e.push(t)},has:function(t){return-1!==e.indexOf(t)}}}var je=Te?function(){return new WeakSet}:De;function Ie(e){return function(t){var n=e||t;return function(e,t,r,i,o,a,s){void 0===s&&(s=je());var l=!!e&&"object"==typeof e,u=!!t&&"object"==typeof t;if(l||u){var c=l&&s.has(e),f=u&&s.has(t);if(c||f)return c&&f;l&&s.add(e),u&&s.add(t)}return n(e,t,s)}}}var Ne=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function Fe(e,t,n,r){var i=Ce(e),o=i.length;if(Ce(t).length!==o)return!1;if(o)for(var a=void 0;o-- >0;){if("_owner"===(a=i[o])){var s=Re(e),l=Re(t);if((s||l)&&s!==l)return!1}if(!Ne(t,a)||!n(e[a],t[a],a,a,e,t,r))return!1}return!0}var ze="function"==typeof Map,Be="function"==typeof Set;function Ue(e){var t="function"==typeof e?e(n):function(e,t,r,i,o,a,s){return n(e,t,s)};function n(e,n,r){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(ke(e)&&ke(n))return Fe(e,n,t,r);var i=Array.isArray(e),o=Array.isArray(n);return i||o?i===o&&function(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-- >0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}(e,n,t,r):(i=e instanceof Date,o=n instanceof Date,i||o?i===o&&Pe(e.getTime(),n.getTime()):(i=e instanceof RegExp,o=n instanceof RegExp,i||o?i===o&&function(e,t){return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.sticky===t.sticky&&e.lastIndex===t.lastIndex}(e,n):Le(e)||Le(n)?e===n:ze&&(i=e instanceof Map,o=n instanceof Map,i||o)?i===o&&function(e,t,n,r){var i=e.size===t.size;if(i&&e.size){var o={},a=0;e.forEach((function(s,l){if(i){var u=!1,c=0;t.forEach((function(i,f){u||o[c]||(u=n(l,f,a,c,e,t,r)&&n(s,i,l,f,e,t,r))&&(o[c]=!0),c++})),a++,i=u}}))}return i}(e,n,t,r):Be&&(i=e instanceof Set,o=n instanceof Set,i||o)?i===o&&function(e,t,n,r){var i=e.size===t.size;if(i&&e.size){var o={};e.forEach((function(a,s){if(i){var l=!1,u=0;t.forEach((function(i,c){l||o[u]||(l=n(a,i,s,c,e,t,r))&&(o[u]=!0),u++})),i=l}}))}return i}(e,n,t,r):Fe(e,n,t,r)))}return e!=e&&n!=n}return n}var Ve=Ue(); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function He(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);ie.extend(t.getPosition()),new google.maps.LatLngBounds(this._position,this._position))}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>e.getVisible()).length}push(e){this.markers.push(e)}delete(){this.marker&&(this.marker.setMap(null),delete this.marker),this.markers.length=0}}class qe{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Ye(e)}}const Ye=e=>e.map(e=>new We({position:e.getPosition(),markers:[e]}));class Ge extends qe{constructor(e){var{maxZoom:t,radius:n=60}=e,r=He(e,["maxZoom","radius"]);super({maxZoom:t}),this.superCluster=new ye(Object.assign({maxZoom:this.maxZoom,radius:n},r)),this.state={zoom:null}}calculate(e){let t=!1;if(!Ve(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map(e=>({type:"Feature",geometry:{type:"Point",coordinates:[e.getPosition().lng(),e.getPosition().lat()]},properties:{marker:e}}));this.superCluster.load(n)}const n={zoom:e.map.getZoom()};return t||this.state.zoom>this.maxZoom&&n.zoom>this.maxZoom||(t=t||!Ve(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(this.transformCluster.bind(this))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new We({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(e=>e.properties.marker),position:new google.maps.LatLng({lat:t,lng:e})});{const e=n.marker;return new We({markers:[e],position:e.getPosition()})}}}class Xe{constructor(e,t){this.markers={sum:e.length};const n=t.map(e=>e.count),r=n.reduce((e,t)=>e+t,0);this.clusters={count:t.length,markers:{mean:r/t.length,sum:r,min:Math.min(...n),max:Math.max(...n)}}}}class Ze{render({count:e,position:t},n){const r=e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff",i=window.btoa(`\n \n \n \n \n `);return new google.maps.Marker({position:t,icon:{url:"data:image/svg+xml;base64,"+i,scaledSize:new google.maps.Size(45,45)},label:{text:String(e),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:`Cluster of ${e} markers`,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+e})}}class Ke{constructor(){!function(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}(Ke,google.maps.OverlayView)}}var $e;!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"}($e||($e={}));const Je=(e,t,n)=>{n.fitBounds(t.bounds)};class Qe extends Ke{constructor({map:e,markers:t=[],algorithm:n=new Ge({}),renderer:r=new Ze,onClusterClick:i=Je}){super(),this.markers=[...t],this.clusters=[],this.algorithm=n,this.renderer=r,this.onClusterClick=i,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(e=>{this.addMarker(e,!0)}),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return-1!==n&&(e.setMap(null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach(e=>{n=this.removeMarker(e,!0)||n}),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,$e.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});(n||null==n)&&(this.reset(),this.clusters=t,this.renderClusters()),google.maps.event.trigger(this,$e.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>e.setMap(null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Xe(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e),this.onClusterClick&&n.marker.addListener("click",e=>{google.maps.event.trigger(this,$e.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)})),n.marker.setMap(t)})}}const et=e=>{const t=function(){b(!!r.useContext,"useGoogleMap is React hook and requires React version 16.8+");const e=Object(r.useContext)(_);return b(!!e,"useGoogleMap needs a GoogleMap available up in the tree"),e}(),[n,i]=Object(r.useState)(null);return Object(r.useEffect)(()=>{if(t&&null===n){const n=new Qe(Object.assign(Object.assign({},e),{map:t}));i(n)}},[t]),n};Object(r.memo)((function({children:e,options:t}){const n=et(t);return null!==n?e(n):null}));const tt={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},nt={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};class rt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=null,this.state={infoWindow:null},this.open=(e,t)=>{t?e.open(this.context,t):e.getPosition()?e.open(this.context):b(!1,"You must provide either an anchor (typically render it inside a ) or a position props for .")},this.setInfoWindowCallback=()=>{null!==this.state.infoWindow&&null!==this.containerElement&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))}}componentDidMount(){const e=new google.maps.InfoWindow(Object.assign({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=O({updaterMap:nt,eventMap:tt,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({infoWindow:e}),this.setInfoWindowCallback)}componentDidUpdate(e){null!==this.state.infoWindow&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:nt,eventMap:tt,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){null!==this.state.infoWindow&&(E(this.registeredEvents),this.state.infoWindow.close())}render(){return this.containerElement?o.createPortal(r.Children.only(this.props.children),this.containerElement):null}}rt.contextType=_;const it={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ot={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},visible(e,t){e.setVisible(t)}};class at extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={polyline:null},this.setPolylineCallback=()=>{null!==this.state.polyline&&this.props.onLoad&&this.props.onLoad(this.state.polyline)}}componentDidMount(){const e=new google.maps.Polyline(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=O({updaterMap:ot,eventMap:it,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polyline:e}}),this.setPolylineCallback)}componentDidUpdate(e){null!==this.state.polyline&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:ot,eventMap:it,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),E(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}at.contextType=_;const st={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},lt={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},paths(e,t){e.setPaths(t)},visible(e,t){e.setVisible(t)}};class ut extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={polygon:null},this.setPolygonCallback=()=>{null!==this.state.polygon&&this.props.onLoad&&this.props.onLoad(this.state.polygon)}}componentDidMount(){const e=new google.maps.Polygon(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=O({updaterMap:lt,eventMap:st,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polygon:e}}),this.setPolygonCallback)}componentDidUpdate(e){null!==this.state.polygon&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:lt,eventMap:st,prevProps:e,nextProps:this.props,instance:this.state.polygon}))}componentWillUnmount(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),E(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))}render(){return null}}ut.contextType=_;const ct={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ft={bounds(e,t){e.setBounds(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},visible(e,t){e.setVisible(t)}};class dt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={rectangle:null},this.setRectangleCallback=()=>{null!==this.state.rectangle&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)}}componentDidMount(){const e=new google.maps.Rectangle(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=O({updaterMap:ft,eventMap:ct,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{rectangle:e}}),this.setRectangleCallback)}componentDidUpdate(e){null!==this.state.rectangle&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:ft,eventMap:ct,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),E(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}dt.contextType=_;const pt={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},ht={center(e,t){e.setCenter(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},radius(e,t){e.setRadius(t)},visible(e,t){e.setVisible(t)}};class gt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={circle:null},this.setCircleCallback=()=>{null!==this.state.circle&&this.props.onLoad&&this.props.onLoad(this.state.circle)}}componentDidMount(){const e=new google.maps.Circle(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=O({updaterMap:ht,eventMap:pt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{circle:e}}),this.setCircleCallback)}componentDidUpdate(e){null!==this.state.circle&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:ht,eventMap:pt,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),E(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))}render(){return null}}gt.contextType=_;const mt={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},yt={add(e,t){e.add(t)},addgeojson(e,t,n){e.addGeoJson(t,n)},contains(e,t){e.contains(t)},foreach(e,t){e.forEach(t)},loadgeojson(e,t,n,r){e.loadGeoJson(t,n,r)},overridestyle(e,t,n){e.overrideStyle(t,n)},remove(e,t){e.remove(t)},revertstyle(e,t){e.revertStyle(t)},controlposition(e,t){e.setControlPosition(t)},controls(e,t){e.setControls(t)},drawingmode(e,t){e.setDrawingMode(t)},map(e,t){e.setMap(t)},style(e,t){e.setStyle(t)},togeojson(e,t){e.toGeoJson(t)}};class vt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={data:null},this.setDataCallback=()=>{null!==this.state.data&&this.props.onLoad&&this.props.onLoad(this.state.data)}}componentDidMount(){const e=new google.maps.Data(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=O({updaterMap:yt,eventMap:mt,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({data:e}),this.setDataCallback)}componentDidUpdate(e){null!==this.state.data&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:yt,eventMap:mt,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),E(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}vt.contextType=_;const bt={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},_t={options(e,t){e.setOptions(t)},url(e,t){e.setUrl(t)},zIndex(e,t){e.setZIndex(t)}};class At extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={kmlLayer:null},this.setKmlLayerCallback=()=>{null!==this.state.kmlLayer&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)}}componentDidMount(){const e=new google.maps.KmlLayer(Object.assign(Object.assign({},this.props.options),{map:this.context}));this.registeredEvents=O({updaterMap:_t,eventMap:bt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{kmlLayer:e}}),this.setKmlLayerCallback)}componentDidUpdate(e){null!==this.state.kmlLayer&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:_t,eventMap:bt,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),E(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}function xt(e,t){return new t(e.lat,e.lng)}function wt(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function Et(e){if(!e)return"";return(e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng))+""}function Ot(e){if(!e)return"";return(e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west)))+""}At.contextType=_;class Mt extends r.PureComponent{constructor(e){super(e),this.state={paneEl:null,containerStyle:{position:"absolute"}},this.updatePane=()=>{const e=this.props.mapPaneName,t=this.overlayView.getPanes();b(!!e,"OverlayView requires props.mapPaneName but got %s",e),t?this.setState({paneEl:t[e]}):this.setState({paneEl:null})},this.onAdd=()=>{var e,t;this.updatePane(),null===(t=(e=this.props).onLoad)||void 0===t||t.call(e,this.overlayView)},this.onPositionElement=()=>{var e,t;const n=function(e,t,n,r){return void 0!==n?function(e,t,n){const r=e&&e.fromLatLngToDivPixel(n.getNorthEast()),i=e&&e.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:i.x+t.x+"px",top:r.y+t.y+"px",width:r.x-i.x-t.x+"px",height:i.y-r.y-t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,(i=n,o=google.maps.LatLngBounds,a=wt,i instanceof o?i:a(i,o))):function(e,t,n){const r=e&&e.fromLatLngToDivPixel(n);if(r){const{x:e,y:n}=r;return{left:e+t.x+"px",top:n+t.y+"px"}}return{left:"-9999px",top:"-9999px"}}(e,t,function(e,t,n){return e instanceof t?e:n(e,t)}(r,google.maps.LatLng,xt));var i,o,a}(this.overlayView.getProjection(),Object.assign({x:0,y:0},this.containerRef.current?(e=this.containerRef.current,"function"==typeof(t=this.props.getPixelPositionOffset)?t(e.offsetWidth,e.offsetHeight):{}):{}),this.props.bounds,this.props.position),{left:r,top:i,width:o,height:a}=this.state.containerStyle;var s,l;l={left:r,top:i,width:o,height:a},((s=n).left!==l.left||s.top!==l.top||s.width!==l.height||s.height!==l.height)&&this.setState({containerStyle:Object.assign(Object.assign({},n),{position:"absolute"})})},this.draw=()=>{this.onPositionElement()},this.onRemove=()=>{var e,t;this.setState(()=>({paneEl:null})),null===(t=(e=this.props).onUnmount)||void 0===t||t.call(e,this.overlayView)},this.containerRef=r.createRef();const t=new google.maps.OverlayView;t.onAdd=this.onAdd,t.draw=this.draw,t.onRemove=this.onRemove,this.overlayView=t}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){const t=Et(e.position),n=Et(this.props.position),r=Ot(e.bounds),i=Ot(this.props.bounds);t===n&&r===i||this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){const e=this.state.paneEl;return e?o.createPortal(a.exports.jsx("div",Object.assign({ref:this.containerRef,style:this.state.containerStyle},{children:r.Children.only(this.props.children)})),e):null}}Mt.FLOAT_PANE="floatPane",Mt.MAP_PANE="mapPane",Mt.MARKER_LAYER="markerLayer",Mt.OVERLAY_LAYER="overlayLayer",Mt.OVERLAY_MOUSE_TARGET="overlayMouseTarget",Mt.contextType=_;const St={onDblClick:"dblclick",onClick:"click"},Tt={opacity(e,t){e.setOpacity(t)}};class Ct extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={groundOverlay:null},this.setGroundOverlayCallback=()=>{null!==this.state.groundOverlay&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)}}componentDidMount(){b(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");const e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Object.assign(Object.assign({},this.props.options),{map:this.context}));this.registeredEvents=O({updaterMap:Tt,eventMap:St,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{groundOverlay:e}}),this.setGroundOverlayCallback)}componentDidUpdate(e){null!==this.state.groundOverlay&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:Tt,eventMap:St,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}Ct.defaultProps={onLoad:function(){}},Ct.contextType=_;const Pt={},kt={data(e,t){e.setData(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)}};class Lt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={heatmapLayer:null},this.setHeatmapLayerCallback=()=>{null!==this.state.heatmapLayer&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)}}componentDidMount(){b(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to ? %s',google.maps.visualization),b(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);const e=new google.maps.visualization.HeatmapLayer(Object.assign(Object.assign({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=O({updaterMap:kt,eventMap:Pt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{heatmapLayer:e}}),this.setHeatmapLayerCallback)}componentDidUpdate(e){E(this.registeredEvents),this.registeredEvents=O({updaterMap:kt,eventMap:Pt,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),E(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}Lt.contextType=_;const Rt={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Dt={register(e,t,n){e.registerPanoProvider(t,n)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class jt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={streetViewPanorama:null},this.setStreetViewPanoramaCallback=()=>{null!==this.state.streetViewPanorama&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)}}componentDidMount(){const e=this.context.getStreetView();this.registeredEvents=O({updaterMap:Dt,eventMap:Rt,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({streetViewPanorama:e}),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){null!==this.state.streetViewPanorama&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:Dt,eventMap:Rt,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),E(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}jt.contextType=_;class It extends r.PureComponent{constructor(){super(...arguments),this.state={streetViewService:null},this.setStreetViewServiceCallback=()=>{null!==this.state.streetViewService&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)}}componentDidMount(){const e=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:e}}),this.setStreetViewServiceCallback)}componentWillUnmount(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}It.contextType=_;r.PureComponent;const Nt={onDirectionsChanged:"directions_changed"},Ft={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class zt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={directionsRenderer:null},this.setDirectionsRendererCallback=()=>{null!==this.state.directionsRenderer&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))}}componentDidMount(){const e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=O({updaterMap:Ft,eventMap:Nt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{directionsRenderer:e}}),this.setDirectionsRendererCallback)}componentDidUpdate(e){null!==this.state.directionsRenderer&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:Ft,eventMap:Nt,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),E(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return a.exports.jsx(a.exports.Fragment,{})}}zt.contextType=_;r.PureComponent;const Bt={onPlacesChanged:"places_changed"},Ut={bounds(e,t){e.setBounds(t)}};class Vt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=Object(r.createRef)(),this.state={searchBox:null},this.setSearchBoxCallback=()=>{null!==this.state.searchBox&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)}}componentDidMount(){if(b(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){const e=this.containerElement.current.querySelector("input");if(null!==e){const t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=O({updaterMap:Ut,eventMap:Bt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{searchBox:t}}),this.setSearchBoxCallback)}}}componentDidUpdate(e){null!==this.state.searchBox&&(E(this.registeredEvents),this.registeredEvents=O({updaterMap:Ut,eventMap:Bt,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),E(this.registeredEvents))}render(){return a.exports.jsx("div",Object.assign({ref:this.containerElement},{children:r.Children.only(this.props.children)}))}}Vt.contextType=_;const Ht={onPlaceChanged:"place_changed"},Wt={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class qt extends r.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=Object(r.createRef)(),this.state={autocomplete:null},this.setAutocompleteCallback=()=>{null!==this.state.autocomplete&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)}}componentDidMount(){b(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places);const e=this.containerElement.current.querySelector("input");if(e){const t=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=O({updaterMap:Wt,eventMap:Ht,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{autocomplete:t}}),this.setAutocompleteCallback)}}componentDidUpdate(e){E(this.registeredEvents),this.registeredEvents=O({updaterMap:Wt,eventMap:Ht,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){null!==this.state.autocomplete&&E(this.registeredEvents)}render(){return a.exports.jsx("div",Object.assign({ref:this.containerElement,className:this.props.className||""},{children:r.Children.only(this.props.children)}))}}qt.contextType=_}).call(this,n(50))},function(e,t,n){"use strict";var r=n(240);t.a=function(e){if("string"==typeof e||Object(r.a)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";var r=n(188),i=n(128);t.a=function(e){return"symbol"==typeof e||Object(i.a)(e)&&"[object Symbol]"==Object(r.a)(e)}},function(e,t,n){"use strict";t.a=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(627),i=n(419);t.a=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s1&&void 0!==arguments[1]?arguments[1]:{};const{colorBufferFloat:n,colorBufferHalfFloat:r}=t;let i=!0;return n&&(i=Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("WEBGL_color_buffer_float")||e.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("EXT_color_buffer_half_float"))),i}static getDefaultFramebuffer(e){return e.luma=e.luma||{},e.luma.defaultFramebuffer=e.luma.defaultFramebuffer||new d(e,{id:"default-framebuffer",handle:null,attachments:{}}),e.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const e=Object(r.a)(this.gl);return e.getParameter(e.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const e=Object(r.a)(this.gl);return e.getParameter(e.MAX_DRAW_BUFFERS)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.width=null,this.height=null,this.attachments={},this.readBuffer=36064,this.drawBuffers=[36064],this.ownResources=[],this.initialize(t),Object.seal(this)}get color(){return this.attachments[36064]||null}get texture(){return this.attachments[36064]||null}get depth(){return this.attachments[36096]||this.attachments[33306]||null}get stencil(){return this.attachments[36128]||this.attachments[33306]||null}initialize(e){let{width:t=1,height:n=1,attachments:r=null,color:i=!0,depth:o=!0,stencil:a=!1,check:s=!0,readBuffer:l,drawBuffers:u}=e;if(Object(f.a)(t>=0&&n>=0,"Width and height need to be integers"),this.width=t,this.height=n,r)for(const e in r){const i=r[e];(Array.isArray(i)?i[0]:i).resize({width:t,height:n})}else r=this._createDefaultAttachments(i,o,a,t,n);this.update({clearAttachments:!0,attachments:r,readBuffer:l,drawBuffers:u}),r&&s&&this.checkStatus()}delete(){for(const e of this.ownResources)e.delete();return super.delete(),this}update(e){let{attachments:t={},readBuffer:n,drawBuffers:r,clearAttachments:i=!1,resizeAttachments:o=!0}=e;this.attach(t,{clearAttachments:i,resizeAttachments:o});const{gl:a}=this,s=a.bindFramebuffer(36160,this.handle);return n&&this._setReadBuffer(n),r&&this._setDrawBuffers(r),a.bindFramebuffer(36160,s||null),this}resize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{width:t,height:n}=e;if(null===this.handle)return Object(f.a)(void 0===t&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;void 0===t&&(t=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),t!==this.width&&n!==this.height&&r.k.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(t,"x").concat(n))();for(const e in this.attachments)this.attachments[e].resize({width:t,height:n});return this.width=t,this.height=n,this}attach(e){let{clearAttachments:t=!1,resizeAttachments:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};t&&Object.keys(this.attachments).forEach(e=>{r[e]=null}),Object.assign(r,e);const i=this.gl.bindFramebuffer(36160,this.handle);for(const e in r){Object(f.a)(void 0!==e,"Misspelled framebuffer binding point?");const t=Number(e),i=r[t];let o=i;if(o)if(o instanceof a.a)this._attachRenderbuffer({attachment:t,renderbuffer:o});else if(Array.isArray(i)){const[e,n=0,r=0]=i;o=e,this._attachTexture({attachment:t,texture:e,layer:n,level:r})}else this._attachTexture({attachment:t,texture:o,layer:0,level:0});else this._unattach(t);n&&o&&o.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,i||null),Object.assign(this.attachments,e),Object.keys(this.attachments).filter(e=>!this.attachments[e]).forEach(e=>{delete this.attachments[e]})}checkStatus(){const{gl:e}=this,t=this.getStatus();if(36053!==t)throw new Error(function(e){return(d.STATUS||{})[e]||"Framebuffer error ".concat(e)}(t));return this}getStatus(){const{gl:e}=this,t=e.bindFramebuffer(36160,this.handle),n=e.checkFramebufferStatus(36160);return e.bindFramebuffer(36160,t||null),n}clear(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:t,depth:n,stencil:r,drawBuffers:i=[]}=e,o=this.gl.bindFramebuffer(36160,this.handle);return(t||n||r)&&Object(s.a)(this.gl,{color:t,depth:n,stencil:r}),i.forEach((e,t)=>{Object(s.b)(this.gl,{drawBuffer:t,value:e})}),this.gl.bindFramebuffer(36160,o||null),this}readPixels(){return r.k.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(){return r.k.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(){return r.k.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(){return r.k.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(){return r.k.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(){return r.k.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}invalidate(e){let{attachments:t=[],x:n=0,y:i=0,width:o,height:a}=e;const s=Object(r.a)(this.gl),l=s.bindFramebuffer(36008,this.handle);return 0===n&&0===i&&void 0===o&&void 0===a?s.invalidateFramebuffer(36008,t):s.invalidateFramebuffer(36008,t,n,i,o,a),s.bindFramebuffer(36008,l),this}getAttachmentParameter(e,t,n){let r=this._getAttachmentParameterFallback(t);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,e,t),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=Object(c.a)(this.gl,r)),r}getAttachmentParameters(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[];const r={};for(const i of n){r[t?Object(c.a)(this.gl,i):i]=this.getAttachmentParameter(e,i,t)}return r}getParameters(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=Object.keys(this.attachments),n={};for(const r of t){const t=Number(r);n[e?Object(c.a)(this.gl,t):t]=this.getAttachmentParameters(t,e)}return n}show(){return"undefined"!=typeof window&&window.open(Object(l.a)(this),"luma-debug-texture"),this}log(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e>r.k.level||"undefined"==typeof window)return this;t=t||"Framebuffer ".concat(this.id);const n=Object(l.a)(this,{targetMaxHeight:100});return r.k.image({logLevel:e,message:t,image:n},t)(),this}bind(){let{target:e=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(e,this.handle),this}unbind(){let{target:e=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(e,null),this}_createDefaultAttachments(e,t,n,r,i){let s=null;return e&&(s=s||{},s[36064]=new o.a(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:r,height:i,mipmaps:!1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.ownResources.push(s[36064])),t&&n?(s=s||{},s[33306]=new a.a(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:r,height:111}),this.ownResources.push(s[33306])):t?(s=s||{},s[36096]=new a.a(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(s[36096])):n&&Object(f.a)(!1),s}_unattach(e){const t=this.attachments[e];t&&(t instanceof a.a?this.gl.framebufferRenderbuffer(36160,e,36161,null):this.gl.framebufferTexture2D(36160,e,3553,null,0),delete this.attachments[e])}_attachRenderbuffer(e){let{attachment:t=36064,renderbuffer:n}=e;const{gl:r}=this;r.framebufferRenderbuffer(36160,t,36161,n.handle),this.attachments[t]=n}_attachTexture(e){let{attachment:t=36064,texture:n,layer:i,level:o}=e;const{gl:a}=this;switch(a.bindTexture(n.target,n.handle),n.target){case 35866:case 32879:Object(r.a)(a).framebufferTextureLayer(36160,t,n.target,o,i);break;case 34067:const e=function(e){return e<34069?e+34069:e}(i);a.framebufferTexture2D(36160,t,e,n.handle,o);break;case 3553:a.framebufferTexture2D(36160,t,3553,n.handle,o);break;default:Object(f.a)(!1,"Illegal texture type")}a.bindTexture(n.target,null),this.attachments[t]=n}_setReadBuffer(e){const t=Object(r.g)(this.gl);t?t.readBuffer(e):Object(f.a)(36064===e||1029===e,"Multiple render targets not supported"),this.readBuffer=e}_setDrawBuffers(e){const{gl:t}=this,n=Object(r.a)(t);if(n)n.drawBuffers(e);else{const n=t.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(e):Object(f.a)(1===e.length&&(36064===e[0]||1029===e[0]),"Multiple render targets not supported")}this.drawBuffers=e}_getAttachmentParameterFallback(e){const t=Object(u.a)(this.gl);switch(e){case 36052:return t.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return t.WEBGL2?null:8;case 33297:return t.WEBGL2?null:5125;case 33296:return t.WEBGL2||t.EXT_sRGB?null:9729;default:return null}}_createHandle(){return this.gl.createFramebuffer()}_deleteHandle(){this.gl.deleteFramebuffer(this.handle)}_bindHandle(e){return this.gl.bindFramebuffer(36160,e)}}d.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(7);function o(){}var a={onStart:o,onUpdate:o,onInterrupt:o,onEnd:o},s=function(){function e(t){Object(r.a)(this,e),this._inProgress=!1,this._handle=null,this.timeline=t,this.settings={}}return Object(i.a)(e,[{key:"start",value:function(e){this.cancel(),this.settings=Object.assign({},a,e),this._inProgress=!0,this.settings.onStart(this)}},{key:"end",value:function(){this._inProgress&&(this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,this.settings.onEnd(this))}},{key:"cancel",value:function(){this._inProgress&&(this.settings.onInterrupt(this),this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}},{key:"update",value:function(){if(!this._inProgress)return!1;if(null===this._handle){var e=this.timeline,t=this.settings;this._handle=e.addChannel({delay:e.getTime(),duration:t.duration})}return this.time=this.timeline.getTime(this._handle),this._onUpdate(),this.settings.onUpdate(this),this.timeline.isFinished(this._handle)&&this.end(),!0}},{key:"_onUpdate",value:function(){}},{key:"inProgress",get:function(){return this._inProgress}}]),e}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(0),i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(n.n(r).a.version.split("."),2),o=i[0],a=i[1],s=Number(a)>13||Number(o)>13,l=function(e){return s?e:e&&e.getDOMNode()},u={},c=!0;function f(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.process&&c||n&&u[t]||(console.warn(t),u[t]=!0)}}).call(this,n(50))},function(e,t,n){"use strict";var r=n(647),i=n(97),o=n(417);var a=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},s=Object.prototype.hasOwnProperty;var l=function(e){if(!Object(i.a)(e))return a(e);var t=Object(o.a)(e),n=[];for(var r in e)("constructor"!=r||!t&&s.call(e,r))&&n.push(r);return n},u=n(206);t.a=function(e){return Object(u.a)(e)?Object(r.a)(e,!0):l(e)}},function(e,t,n){"use strict";var r=n(647),i=n(417),o=n(626),a=Object(o.a)(Object.keys,Object),s=Object.prototype.hasOwnProperty;var l=function(e){if(!Object(i.a)(e))return a(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t},u=n(206);t.a=function(e){return Object(u.a)(e)?Object(r.a)(e):l(e)}},function(e,t,n){"use strict";var r=n(267);t.a=function(e){return(e=Object(r.b)(Math.abs(e)))?e[1]:NaN}},function(e,t,n){"use strict";n.d(t,"c",(function(){return re})),n.d(t,"a",(function(){return ie}));var r=n(404),i=n(430),o=n(605);var a=n(303),s=Array.prototype.find;function l(){return this.firstElementChild}var u=Array.prototype.filter;function c(){return this.children}var f=function(e){return new Array(e.length)};function d(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}d.prototype={constructor:d,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var p=function(e){return function(){return e}};function h(e,t,n,r,i,o){for(var a,s=0,l=t.length,u=o.length;st?1:e>=t?0:NaN}var v=n(405);function b(e){return function(){this.removeAttribute(e)}}function _(e){return function(){this.removeAttributeNS(e.space,e.local)}}function A(e,t){return function(){this.setAttribute(e,t)}}function x(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function w(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function E(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var O=n(606);function M(e){return function(){delete this[e]}}function S(e,t){return function(){this[e]=t}}function T(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function C(e){return e.trim().split(/^|\s+/)}function P(e){return e.classList||new k(e)}function k(e){this._node=e,this._names=C(e.getAttribute("class")||"")}function L(e,t){for(var n=P(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function N(){this.textContent=""}function F(e){return function(){this.textContent=e}}function z(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function B(){this.innerHTML=""}function U(e){return function(){this.innerHTML=e}}function V(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function H(){this.nextSibling&&this.parentNode.appendChild(this)}function W(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var q=n(304);function Y(){return null}function G(){var e=this.parentNode;e&&e.removeChild(this)}function X(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function K(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function $(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r=M&&(M=O+1);!(E=A[M])&&++M=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=y);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==t?M:"function"==typeof t?T:S)(e,t)):this.node()[e]},classed:function(e,t){var n=C(e+"");if(arguments.length<2){for(var r=P(this.node()),i=-1,o=n.length;++i=r.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var u,c,f,d=-1,p=n.length,h=r[i++],g=o(),m=s();++dr.length)return n;var a,s=i[o-1];return null!=t&&o>=r.length?a=n.entries():(a=[],n.each((function(t,n){a.push({key:n,values:e(t,o)})}))),null!=s?a.sort((function(e,t){return s(e.key,t.key)})):a}(a(e,0,u,c),0)},key:function(e){return r.push(e),n},sortKeys:function(e){return i[r.length-1]=e,n},sortValues:function(t){return e=t,n},rollup:function(e){return t=e,n}}};function s(){return{}}function l(e,t,n){e[t]=n}function u(){return o()}function c(e,t,n){e.set(t,n)}function f(){}var d=o.prototype;function p(e,t){var n=new f;if(e instanceof f)e.each((function(e){n.add(e)}));else if(e){var r=-1,i=e.length;if(null==t)for(;++rn;)i[n]=t[n++];return i},Ce=function(e,t,n){U(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,o,a,s=x(e),l=arguments.length,c=l>1?arguments[1]:void 0,f=void 0!==c,d=S(s);if(null!=d&&!w(d)){for(a=d.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(f&&l>2&&(c=u(c,arguments[2],2)),t=0,n=g(s.length),i=Me(this,n);n>t;t++)i[t]=f?c(s[t],t):s[t];return i},ke=function(){for(var e=0,t=arguments.length,n=Me(this,t);t>e;)n[e]=arguments[e++];return n},Le=!!q&&o((function(){pe.call(new q(1))})),Re=function(){return pe.apply(Le?fe.call(Oe(this)):Oe(this),arguments)},De={copyWithin:function(e,t){return F.call(Oe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return J(Oe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return N.apply(Oe(this),arguments)},filter:function(e){return Se(this,K(Oe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Oe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Oe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Z(Oe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Oe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Oe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(Oe(this),arguments)},lastIndexOf:function(e){return ae.apply(Oe(this),arguments)},map:function(e){return Ae(Oe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Oe(this),arguments)},reduceRight:function(e){return le.apply(Oe(this),arguments)},reverse:function(){for(var e,t=Oe(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return ce.call(Oe(this),e)},subarray:function(e,t){var n=Oe(this),r=n.length,i=y(e,r);return new(L(n,n[ye]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===t?r:y(t,r))-i))}},je=function(e,t){return Se(this,fe.call(Oe(this),e,t))},Ie=function(e){Oe(this);var t=Ee(arguments[1],1),n=this.length,r=x(e),i=g(r.length),o=0;if(i+t>n)throw H("Wrong length!");for(;o255?255:255&r),i.v[p](n*t+i.o,r,xe)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,r,i){c(e,h,u,"_d");var o,a,s,l,f=0,p=0;if(A(n)){if(!(n instanceof G||"ArrayBuffer"==(l=_(n))||"SharedArrayBuffer"==l))return be in n?Te(h,n):Pe.call(h,n);o=n,p=Ee(r,t);var y=n.byteLength;if(void 0===i){if(y%t)throw H("Wrong length!");if((a=y-p)<0)throw H("Wrong length!")}else if((a=g(i)*t)+p>y)throw H("Wrong length!");s=a/t}else s=m(n),o=new G(a=s*t);for(d(e,"_d",{b:o,o:p,l:a,e:s,v:new X(o)});f=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),l=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),c(r,e,r.depth)}function l(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&w(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return y(i)||(i=c(e,i,r)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(m(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),x(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(w(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(A(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var u,_="",E=!1,O=["{","}"];(p(n)&&(E=!0,O=["[","]"]),w(n))&&(_=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(_=" "+RegExp.prototype.toString.call(n)),A(n)&&(_=" "+Date.prototype.toUTCString.call(n)),x(n)&&(_=" "+f(n)),0!==a.length||E&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=E?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,_,O)):O[0]+_+O[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?c(e,l.value,null):c(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return _(e)&&"[object RegExp]"===E(e)}function _(e){return"object"==typeof e&&null!==e}function A(e){return _(e)&&"[object Date]"===E(e)}function x(e){return _(e)&&("[object Error]"===E(e)||e instanceof Error)}function w(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(v(o)&&(o=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=h,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=_,t.isDate=A,t.isError=x,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(1734);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",S(),t.format.apply(t,arguments))},t.inherits=n(1735),t._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var C="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(C&&e[C]){var t;if("function"!=typeof(t=e[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,C,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==s[1]?s[1]:[],r=s.length>2&&void 0!==s[2]?s[2]:{},o=s.length>3&&void 0!==s[3]?s[3]:{},!(a=x(t,n,m(m({},r),{},{nothrow:!0}),o))){e.next=6;break}return e.abrupt("return",a);case 6:if(!Object(h.b)(t)){e.next=11;break}return e.next=9,Object(p.b)(t,0,10);case 9:t=e.sent,a=x(t,n,r,o);case 11:if(a||r.nothrow){e.next=13;break}throw new Error(w(t));case 13:return e.abrupt("return",a);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&!Array.isArray(t))return Object(c.b)(t);E(t=[].concat(Object(s.a)(t||[]),Object(s.a)(Object(d.b)())));var i=Object(f.b)(e),o=i.url,a=i.type,l=O(t,o||r.url);if(!(l=(l=l||M(t,a))||S(t,e))&&!n.nothrow)throw new Error(w(e));return l}function w(e){var t=Object(f.b)(e),n=t.url,r=t.type,i="No valid loader found";return e&&(i+=' data: "'.concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return P(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){var n=0;return P(e,n,t)}return""}(e),'", contentType: "').concat(r,'"')),n&&(i+=" url: ".concat(n)),i}function E(e){var t,n=y(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;Object(c.b)(r)}}catch(e){n.e(e)}finally{n.f()}}function O(e,t){var n=t&&t.match(b),r=n&&n[1];return r&&function(e,t){t=t.toLowerCase();var n,r=y(e);try{for(r.s();!(n=r.n()).done;){var i,o=n.value,a=y(o.extensions);try{for(a.s();!(i=a.n()).done;){if(i.value.toLowerCase()===t)return o}}catch(e){a.e(e)}finally{a.f()}}}catch(e){r.e(e)}finally{r.f()}return null}(e,r)}function M(e,t){var n,r=y(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.mimeTypes&&i.mimeTypes.includes(t))return i;if(t==="application/x.".concat(i.id))return i}}catch(e){r.e(e)}finally{r.f()}return null}function S(e,t){if(!t)return null;var n,r=y(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if("string"==typeof t){if(T(t,i))return i}else if(ArrayBuffer.isView(t)){if(C(t.buffer,t.byteOffset,i))return i}else if(t instanceof ArrayBuffer){if(C(t,0,i))return i}}}catch(e){r.e(e)}finally{r.f()}return null}function T(e,t){return t.testText&&t.testText(e)}function C(e,t,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some((function(r){return function(e,t,n,r){if(r instanceof ArrayBuffer)return Object(u.a)(r,e,r.byteLength);switch(Object(a.a)(r)){case"function":return r(e,n);case"string":var i=P(e,t,r.length);return r===i;default:return!1}}(e,t,n,r)}))}function P(e,t,n){if(e.byteLength1?r[0]+r.slice(2):r,+e.slice(n+1)]}n.d(t,"b",(function(){return r})),t.a=function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(30);const i={5126:[5126,1,"float"],35664:[5126,2,"vec2"],35665:[5126,3,"vec3"],35666:[5126,4,"vec4"],5124:[5124,1,"int"],35667:[5124,2,"ivec2"],35668:[5124,3,"ivec3"],35669:[5124,4,"ivec4"],5125:[5125,1,"uint"],36294:[5125,2,"uvec2"],36295:[5125,3,"uvec3"],36296:[5125,4,"uvec4"],35670:[5126,1,"bool"],35671:[5126,2,"bvec2"],35672:[5126,3,"bvec3"],35673:[5126,4,"bvec4"],35674:[5126,8,"mat2"],35685:[5126,8,"mat2x3"],35686:[5126,8,"mat2x4"],35675:[5126,12,"mat3"],35687:[5126,12,"mat3x2"],35688:[5126,12,"mat3x4"],35676:[5126,16,"mat4"],35689:[5126,16,"mat4x2"],35690:[5126,16,"mat4x3"]};function o(e){switch(e){case 0:return 0;case 1:case 3:case 2:return 1;case 4:case 5:case 6:return 4;default:return Object(r.a)(!1),0}}function a(e){const t=i[e];if(!t)return null;const[n,r]=t;return{type:n,components:r}}function s(e,t){switch(e){case 5120:case 5121:case 5122:case 5123:e=5126}for(const n in i){const[r,o,a]=i[n];if(r===e&&o===t)return{glType:n,name:a}}return null}},function(e,t,n){"use strict";var r=n(6),i=n(7),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.overAlloc,i=void 0===n?2:n,o=t.poolSize,a=void 0===o?100:o;Object(r.a)(this,e),this.overAlloc=i,this.poolSize=a,this._pool=[]}return Object(i.a)(e,[{key:"allocate",value:function(e,t,n){var r=n.size,i=void 0===r?1:r,o=n.type,a=n.padding,s=void 0===a?0:a,l=n.copy,u=void 0!==l&&l,c=n.initialize,f=void 0!==c&&c,d=o||e&&e.constructor||Float32Array,p=t*i+s;if(ArrayBuffer.isView(e)){if(p<=e.length)return e;if(p*e.BYTES_PER_ELEMENT<=e.buffer.byteLength)return new d(e.buffer,0,p)}var h=this._allocate(d,p,f);return e&&u?h.set(e):f||h.fill(0,0,4),this._release(e),h}},{key:"release",value:function(e){this._release(e)}},{key:"_allocate",value:function(e,t,n){t=Math.max(Math.ceil(t*this.overAlloc),1);var r=this._pool,i=e.BYTES_PER_ELEMENT*t,o=r.findIndex((function(e){return e.byteLength>=i}));if(o>=0){var a=new e(r.splice(o,1)[0],0,t);return n&&a.fill(0),a}return new e(t)}},{key:"_release",value:function(e){if(ArrayBuffer.isView(e)){var t=this._pool,n=e.buffer,r=n.byteLength,i=t.findIndex((function(e){return e.byteLength>=r}));i<0?t.push(n):(i>0||t.lengththis.poolSize&&t.shift()}}}]),e}();t.a=new o},function(e,t,n){"use strict";var r=n(169),i=n(109),o=Object(r.a)(i.a,"DataView"),a=n(312),s=Object(r.a)(i.a,"Promise"),l=Object(r.a)(i.a,"Set"),u=Object(r.a)(i.a,"WeakMap"),c=n(188),f=n(276),d=Object(f.a)(o),p=Object(f.a)(a.a),h=Object(f.a)(s),g=Object(f.a)(l),m=Object(f.a)(u),y=c.a;(o&&"[object DataView]"!=y(new o(new ArrayBuffer(1)))||a.a&&"[object Map]"!=y(new a.a)||s&&"[object Promise]"!=y(s.resolve())||l&&"[object Set]"!=y(new l)||u&&"[object WeakMap]"!=y(new u))&&(y=function(e){var t=Object(c.a)(e),n="[object Object]"==t?e.constructor:void 0,r=n?Object(f.a)(n):"";if(r)switch(r){case d:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case g:return"[object Set]";case m:return"[object WeakMap]"}return t});t.a=y},,function(e,t,n){"use strict";(function(e){var r=n(624),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.a.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.a=s}).call(this,n(536)(e))},function(e,t,n){"use strict";function r(e){return e[0]}function i(e){return e[1]}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return We})),n.d(t,"b",(function(){return qe})),n.d(t,"c",(function(){return Be}));var r=n(0),i=n(279),o=n.n(i),a=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===s}(e)}(e)};var s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function l(e,t){return!1!==t.clone&&t.isMergeableObject(e)?c((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function u(e,t,n){return e.concat(t).map((function(e){return l(e,n)}))}function c(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||u,n.isMergeableObject=n.isMergeableObject||a;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=l(e[t],n)})),Object.keys(t).forEach((function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=c(e[i],t[i],n):r[i]=l(t[i],n)})),r}(e,t,n):l(t,n)}c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return c(e,n,t)}),{})};var f=c,d=n(491),p=n(252),h=n(632),g=n(627),m=n(242),y=n(248);var v=function(e,t){return e&&Object(m.a)(t,Object(y.a)(t),e)},b=n(247);var _=function(e,t){return e&&Object(m.a)(t,Object(b.a)(t),e)},A=n(625),x=n(415),w=n(433);var E=function(e,t){return Object(m.a)(e,Object(w.a)(e),t)},O=n(629),M=n(418),S=n(628),T=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Object(O.a)(t,Object(w.a)(e)),e=Object(M.a)(e);return t}:S.a;var C=function(e,t){return Object(m.a)(e,T(e),t)},P=n(490),k=n(631);var L=function(e){return Object(k.a)(e,b.a,T)},R=n(270),D=Object.prototype.hasOwnProperty;var j=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&D.call(e,"index")&&(n.index=e.index,n.input=e.input),n},I=n(423);var N=function(e,t){var n=t?Object(I.a)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},F=/\w*$/;var z=function(e){var t=new e.constructor(e.source,F.exec(e));return t.lastIndex=e.lastIndex,t},B=n(159),U=B.a?B.a.prototype:void 0,V=U?U.valueOf:void 0;var H=function(e){return V?Object(V.call(e)):{}},W=n(630);var q=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Object(I.a)(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return N(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Object(W.a)(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return z(e);case"[object Set]":return new r;case"[object Symbol]":return H(e)}},Y=n(646),G=n(91),X=n(266),Z=n(128);var K=function(e){return Object(Z.a)(e)&&"[object Map]"==Object(R.a)(e)},$=n(421),J=n(272),Q=J.a&&J.a.isMap,ee=Q?Object($.a)(Q):K,te=n(97);var ne=function(e){return Object(Z.a)(e)&&"[object Set]"==Object(R.a)(e)},re=J.a&&J.a.isSet,ie=re?Object($.a)(re):ne,oe={};oe["[object Arguments]"]=oe["[object Array]"]=oe["[object ArrayBuffer]"]=oe["[object DataView]"]=oe["[object Boolean]"]=oe["[object Date]"]=oe["[object Float32Array]"]=oe["[object Float64Array]"]=oe["[object Int8Array]"]=oe["[object Int16Array]"]=oe["[object Int32Array]"]=oe["[object Map]"]=oe["[object Number]"]=oe["[object Object]"]=oe["[object RegExp]"]=oe["[object Set]"]=oe["[object String]"]=oe["[object Symbol]"]=oe["[object Uint8Array]"]=oe["[object Uint8ClampedArray]"]=oe["[object Uint16Array]"]=oe["[object Uint32Array]"]=!0,oe["[object Error]"]=oe["[object Function]"]=oe["[object WeakMap]"]=!1;var ae=function e(t,n,r,i,o,a){var s,l=1&n,u=2&n,c=4&n;if(r&&(s=o?r(t,i,o,a):r(t)),void 0!==s)return s;if(!Object(te.a)(t))return t;var f=Object(G.a)(t);if(f){if(s=j(t),!l)return Object(x.a)(t,s)}else{var d=Object(R.a)(t),m="[object Function]"==d||"[object GeneratorFunction]"==d;if(Object(X.a)(t))return Object(A.a)(t,l);if("[object Object]"==d||"[object Arguments]"==d||m&&!o){if(s=u||m?{}:Object(Y.a)(t),!l)return u?C(t,_(s,t)):E(t,v(s,t))}else{if(!oe[d])return o?t:{};s=q(t,d,l)}}a||(a=new p.a);var w=a.get(t);if(w)return w;a.set(t,s),ie(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,a))})):ee(t)&&t.forEach((function(i,o){s.set(o,e(i,n,r,o,t,a))}));var O=c?u?L:P.a:u?b.a:y.a,M=f?void 0:O(t);return Object(h.a)(M||t,(function(i,o){M&&(i=t[o=i]),Object(g.a)(s,o,e(i,n,r,o,t,a))})),s};var se=function(e){return ae(e,4)},le=n(414),ue=n(240),ce=n(644),fe=n(239),de=n(645);var pe=function(e){return Object(G.a)(e)?Object(le.a)(e,fe.a):Object(ue.a)(e)?[e]:Object(x.a)(Object(ce.a)(Object(de.a)(e)))},he=n(171),ge=n(122),me=n.n(ge);var ye=function(e){return ae(e,5)};function ve(){return(ve=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function Ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var xe=function(e){return Array.isArray(e)&&0===e.length},we=function(e){return"function"==typeof e},Ee=function(e){return null!==e&&"object"==typeof e},Oe=function(e){return String(Math.floor(Number(e)))===e},Me=function(e){return"[object String]"===Object.prototype.toString.call(e)},Se=function(e){return 0===r.Children.count(e)},Te=function(e){return Ee(e)&&we(e.then)};function Ce(e,t,n,r){void 0===r&&(r=0);for(var i=pe(t);e&&r=0?[]:{}}}return(0===o?e:i)[a[o]]===n?e:(void 0===n?delete i[a[o]]:i[a[o]]=n,0===o&&void 0===n&&delete r[a[o]],r)}function ke(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,o=Object.keys(e);i=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;Ce(t,a.path)||(t=Pe(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[m.validationSchema]),T=Object(r.useCallback)((function(e,t){return new Promise((function(n){return n(x.current[e].validate(t))}))}),[]),C=Object(r.useCallback)((function(e){var t=Object.keys(x.current).filter((function(e){return we(x.current[e].validate)})),n=t.length>0?t.map((function(t){return T(t,Ce(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Pe(e,t[r],n)),e}),{})}))}),[T]),P=Object(r.useCallback)((function(e){return Promise.all([C(e),m.validationSchema?S(e):{},m.validate?M(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return f.all([t,n,r],{arrayMerge:Ue})}))}),[m.validate,m.validationSchema,C,M,S]),k=He((function(e){return void 0===e&&(e=E.values),O({type:"SET_ISVALIDATING",payload:!0}),P(e).then((function(e){return A.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:e})),e}))}));Object(r.useEffect)((function(){l&&!0===A.current&&o()(y.current,m.initialValues)&&k(y.current)}),[l,k]);var L=Object(r.useCallback)((function(e){var t=e&&e.values?e.values:y.current,n=e&&e.errors?e.errors:v.current?v.current:m.initialErrors||{},r=e&&e.touched?e.touched:b.current?b.current:m.initialTouched||{},i=e&&e.status?e.status:_.current?_.current:m.initialStatus;y.current=t,v.current=n,b.current=r,_.current=i;var o=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(m.onReset){var a=m.onReset(E.values,$);Te(a)?a.then(o):o()}else o()}),[m.initialErrors,m.initialStatus,m.initialTouched]);Object(r.useEffect)((function(){!0!==A.current||o()(y.current,m.initialValues)||(p&&(y.current=m.initialValues,L()),l&&k(y.current))}),[p,m.initialValues,L,l,k]),Object(r.useEffect)((function(){p&&!0===A.current&&!o()(v.current,m.initialErrors)&&(v.current=m.initialErrors||Ne,O({type:"SET_ERRORS",payload:m.initialErrors||Ne}))}),[p,m.initialErrors]),Object(r.useEffect)((function(){p&&!0===A.current&&!o()(b.current,m.initialTouched)&&(b.current=m.initialTouched||Fe,O({type:"SET_TOUCHED",payload:m.initialTouched||Fe}))}),[p,m.initialTouched]),Object(r.useEffect)((function(){p&&!0===A.current&&!o()(_.current,m.initialStatus)&&(_.current=m.initialStatus,O({type:"SET_STATUS",payload:m.initialStatus}))}),[p,m.initialStatus,m.initialTouched]);var R=He((function(e){if(x.current[e]&&we(x.current[e].validate)){var t=Ce(E.values,e),n=x.current[e].validate(t);return Te(n)?(O({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){O({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),O({type:"SET_ISVALIDATING",payload:!1})}))):(O({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return m.validationSchema?(O({type:"SET_ISVALIDATING",payload:!0}),S(E.values,e).then((function(e){return e})).then((function(t){O({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),O({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),D=Object(r.useCallback)((function(e,t){var n=t.validate;x.current[e]={validate:n}}),[]),j=Object(r.useCallback)((function(e){delete x.current[e]}),[]),I=He((function(e,t){return O({type:"SET_TOUCHED",payload:e}),(void 0===t?a:t)?k(E.values):Promise.resolve()})),N=Object(r.useCallback)((function(e){O({type:"SET_ERRORS",payload:e})}),[]),F=He((function(e,t){var r=we(e)?e(E.values):e;return O({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?k(r):Promise.resolve()})),z=Object(r.useCallback)((function(e,t){O({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),B=He((function(e,t,r){return O({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?k(Pe(E.values,e,t)):Promise.resolve()})),U=Object(r.useCallback)((function(e,t){var n,r=t,i=e;if(!Me(e)){e.persist&&e.persist();var o=e.target?e.target:e.currentTarget,a=o.type,s=o.name,l=o.id,u=o.value,c=o.checked,f=(o.outerHTML,o.options),d=o.multiple;r=t||(s||l),i=/number|range/.test(a)?(n=parseFloat(u),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,o=e.indexOf(n),i=o>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!i)return r.concat(n);if(!i)return r;return r.slice(0,o).concat(r.slice(o+1))}(Ce(E.values,r),c,u):f&&d?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):u}r&&B(r,i)}),[B,E.values]),V=He((function(e){if(Me(e))return function(t){return U(t,e)};U(e)})),H=He((function(e,t,n){return void 0===t&&(t=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?a:n)?k(E.values):Promise.resolve()})),W=Object(r.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,o=(n.outerHTML,t||(r||i));H(o,!0)}),[H]),q=He((function(e){if(Me(e))return function(t){return W(t,e)};W(e)})),Y=Object(r.useCallback)((function(e){we(e)?O({type:"SET_FORMIK_STATE",payload:e}):O({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),G=Object(r.useCallback)((function(e){O({type:"SET_STATUS",payload:e})}),[]),X=Object(r.useCallback)((function(e){O({type:"SET_ISSUBMITTING",payload:e})}),[]),Z=He((function(){return O({type:"SUBMIT_ATTEMPT"}),k().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=J()))return}catch(e){throw e}return Promise.resolve(n).then((function(e){return A.current&&O({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(A.current)throw O({type:"SUBMIT_FAILURE"}),e}))}if(A.current&&(O({type:"SUBMIT_FAILURE"}),t))throw e}))})),K=He((function(e){e&&e.preventDefault&&we(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&we(e.stopPropagation)&&e.stopPropagation(),Z().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),$={resetForm:L,validateForm:k,validateField:R,setErrors:N,setFieldError:z,setFieldTouched:H,setFieldValue:B,setStatus:G,setSubmitting:X,setTouched:I,setValues:F,setFormikState:Y,submitForm:Z},J=He((function(){return h(E.values,$)})),Q=He((function(e){e&&e.preventDefault&&we(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&we(e.stopPropagation)&&e.stopPropagation(),L()})),ee=Object(r.useCallback)((function(e){return{value:Ce(E.values,e),error:Ce(E.errors,e),touched:!!Ce(E.touched,e),initialValue:Ce(y.current,e),initialTouched:!!Ce(b.current,e),initialError:Ce(v.current,e)}}),[E.errors,E.touched,E.values]),te=Object(r.useCallback)((function(e){return{setValue:function(t,n){return B(e,t,n)},setTouched:function(t,n){return H(e,t,n)},setError:function(t){return z(e,t)}}}),[B,H,z]),ne=Object(r.useCallback)((function(e){var t=Ee(e),n=t?e.name:e,r=Ce(E.values,n),i={name:n,value:r,onChange:V,onBlur:q};if(t){var o=e.type,a=e.value,s=e.as,l=e.multiple;"checkbox"===o?void 0===a?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(a)),i.value=a):"radio"===o?(i.checked=r===a,i.value=a):"select"===s&&l&&(i.value=i.value||[],i.multiple=!0)}return i}),[q,V,E.values]),re=Object(r.useMemo)((function(){return!o()(y.current,E.values)}),[y.current,E.values]),ie=Object(r.useMemo)((function(){return void 0!==u?re?E.errors&&0===Object.keys(E.errors).length:!1!==u&&we(u)?u(m):u:E.errors&&0===Object.keys(E.errors).length}),[u,re,E.errors,m]);return ve({},E,{initialValues:y.current,initialErrors:v.current,initialTouched:b.current,initialStatus:_.current,handleBlur:q,handleChange:V,handleReset:Q,handleSubmit:K,resetForm:L,setErrors:N,setFormikState:Y,setFieldTouched:H,setFieldValue:B,setFieldError:z,setStatus:G,setSubmitting:X,setTouched:I,setValues:F,submitForm:Z,validateForm:k,validateField:R,isValid:ie,dirty:re,unregisterField:j,registerField:D,getFieldProps:ne,getFieldMeta:ee,getFieldHelpers:te,validateOnBlur:a,validateOnChange:n,validateOnMount:l})}function Be(e){var t=ze(e),n=e.component,i=e.children,o=e.render,a=e.innerRef;return Object(r.useImperativeHandle)(a,(function(){return t})),Object(r.createElement)(Re,{value:t},n?Object(r.createElement)(n,t):o?o(t):i?we(i)?i(t):Se(i)?null:r.Children.only(i):null)}function Ue(e,t,n){var r=e.slice();return t.forEach((function(t,i){if(void 0===r[i]){var o=!1!==n.clone&&n.isMergeableObject(t);r[i]=o?f(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=f(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var Ve="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function He(e){var t=Object(r.useRef)(e);return Ve((function(){t.current=e})),Object(r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;re?t:e}),0);return Array.from(ve({},e,{length:t+1}))}return[]},Ze=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,o=i.name;(0,i.formik.setFormikState)((function(n){var i="function"==typeof r?r:e,a="function"==typeof t?t:e,s=Pe(n.values,o,e(Ce(n.values,o))),l=r?i(Ce(n.errors,o)):void 0,u=t?a(Ce(n.touched,o)):void 0;return xe(l)&&(l=void 0),xe(u)&&(u=void 0),ve({},n,{values:s,errors:r?Pe(n.errors,o,l):n.errors,touched:t?Pe(n.touched,o,u):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(Xe(t),[ye(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Xe(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Xe(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return Ge(n,e,t)}),(function(t){return Ge(t,e,null)}),(function(t){return Ge(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Xe(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(Ae(n)),n.pop=n.pop.bind(Ae(n)),n}be(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!o()(Ce(e.formik.values,e.name),Ce(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?Xe(n):[];return t||(t=r[e]),we(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,i=t.render,o=t.children,a=t.name,s=ve({},e,{form:_e(t.formik,["validate","validationSchema"]),name:a});return n?Object(r.createElement)(n,s):i?i(s):o?"function"==typeof o?o(s):Se(o)?null:r.Children.only(o):null},t}(r.Component);Ze.defaultProps={validateOnChange:!0};r.Component,r.Component},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0);o=o.next}while(void 0!==o)}}},function(e,t,n){"use strict";var r=Function.prototype.toString;t.a=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return l}));var r=n(25);const i={6407:{dataFormat:6407,types:[5121,33635]},6408:{dataFormat:6408,types:[5121,32819,32820]},6406:{dataFormat:6406,types:[5121]},6409:{dataFormat:6409,types:[5121]},6410:{dataFormat:6410,types:[5121]},33326:{dataFormat:6403,types:[5126],gl2:!0},33328:{dataFormat:33319,types:[5126],gl2:!0},34837:{dataFormat:6407,types:[5126],gl2:!0},34836:{dataFormat:6408,types:[5126],gl2:!0}},o={6403:1,36244:1,33319:2,33320:2,6407:3,36248:3,6408:4,36249:4,6402:1,34041:1,6406:1,6409:1,6410:2},a={5126:4,5125:4,5124:4,5123:2,5122:2,5131:2,5120:1,5121:1};function s(e,t){const n=i[t];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;const o=Object(r.j)(e)&&n.gl2||n.gl1;return"string"==typeof o?e.getExtension(o):o}function l(e,t){const n=i[t];switch(n&&n.types[0]){case 5126:return e.getExtension("OES_texture_float_linear");case 5131:return e.getExtension("OES_texture_half_float_linear");default:return!0}}},function(e,t,n){"use strict";var r,i={DEBUG:!1,LIB_VERSION:"2.45.0"};if("undefined"==typeof window){var o={hostname:""};r={navigator:{userAgent:""},document:{location:o,referrer:""},screen:{width:0,height:0},location:o}}else r=window;var a,s=Array.prototype,l=Function.prototype,u=Object.prototype,c=s.slice,f=u.toString,d=u.hasOwnProperty,p=r.console,h=r.navigator,g=r.document,m=r.opera,y=r.screen,v=h.userAgent,b=l.bind,_=s.forEach,A=s.indexOf,x=s.map,w=Array.isArray,E={},O={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},M={log:function(){if(i.DEBUG&&!O.isUndefined(p)&&p)try{p.log.apply(p,arguments)}catch(e){O.each(arguments,(function(e){p.log(e)}))}},warn:function(){if(i.DEBUG&&!O.isUndefined(p)&&p){var e=["Mixpanel warning:"].concat(O.toArray(arguments));try{p.warn.apply(p,e)}catch(t){O.each(e,(function(e){p.warn(e)}))}}},error:function(){if(i.DEBUG&&!O.isUndefined(p)&&p){var e=["Mixpanel error:"].concat(O.toArray(arguments));try{p.error.apply(p,e)}catch(t){O.each(e,(function(e){p.error(e)}))}}},critical:function(){if(!O.isUndefined(p)&&p){var e=["Mixpanel error:"].concat(O.toArray(arguments));try{p.error.apply(p,e)}catch(t){O.each(e,(function(e){p.error(e)}))}}}},S=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(M,arguments)}},T=function(e){return{log:S(M.log,e),error:S(M.error,e),critical:S(M.critical,e)}};O.bind=function(e,t){var n,r;if(b&&e.bind===b)return b.apply(e,c.call(arguments,1));if(!O.isFunction(e))throw new TypeError;return n=c.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(c.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var a=e.apply(o,n.concat(c.call(arguments)));return Object(a)===a?a:o}},O.each=function(e,t,n){if(null!=e)if(_&&e.forEach===_)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r0&&(t[n]=e)})),t},O.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):O.isArray(e)?(n=[],O.each(e,(function(e){n.push(O.truncate(e,t))}))):O.isObject(e)?(n={},O.each(e,(function(e,r){n[r]=O.truncate(e,t)}))):n=e,n},O.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},n=function(e,r){var i="",o=0,a="",s="",l=0,u=i,c=[],p=r[e];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),typeof p){case"string":return t(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=" ",c=[],"[object Array]"===f.apply(p)){for(l=p.length,o=0;o="0"&&t<="9";)n+=t,a();if("."===t)for(n+=".";a()&&t>="0"&&t<="9";)n+=t;if("e"===t||"E"===t)for(n+=t,a(),"-"!==t&&"+"!==t||(n+=t,a());t>="0"&&t<="9";)n+=t,a();if(e=+n,isFinite(e))return e;o("Bad number")},l=function(){var e,n,r,s="";if('"'===t)for(;a();){if('"'===t)return a(),s;if("\\"===t)if(a(),"u"===t){for(r=0,n=0;n<4&&(e=parseInt(a(),16),isFinite(e));n+=1)r=16*r+e;s+=String.fromCharCode(r)}else{if("string"!=typeof i[t])break;s+=i[t]}else s+=t}o("Bad string")},u=function(){for(;t&&t<=" ";)a()};return r=function(){switch(u(),t){case"{":return function(){var e,n={};if("{"===t){if(a("{"),u(),"}"===t)return a("}"),n;for(;t;){if(e=l(),u(),a(":"),Object.hasOwnProperty.call(n,e)&&o('Duplicate key "'+e+'"'),n[e]=r(),u(),"}"===t)return a("}"),n;a(","),u()}}o("Bad object")}();case"[":return function(){var e=[];if("["===t){if(a("["),u(),"]"===t)return a("]"),e;for(;t;){if(e.push(r()),u(),"]"===t)return a("]"),e;a(","),u()}}o("Bad array")}();case'"':return l();case"-":return s();default:return t>="0"&&t<="9"?s():function(){switch(t){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}o('Unexpected "'+t+'"')}()}},function(i){var a;return n=i,e=0,t=" ",a=r(),u(),t&&o("Syntax error"),a}}(),O.base64Encode=function(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,l=0,u="",c=[];if(!e)return e;e=O.utf8Encode(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[l++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},O.UUID=(a=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)},function(){var e=(y.height*y.width).toString(16);return a()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=v,r=[],i=0;function o(e,t){var n,i=0;for(n=0;n=4&&(i=o(i,r),r=[]);return r.length>0&&(i=o(i,r)),i.toString(16)}()+"-"+e+"-"+a()});var C=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];O.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(t){if(!g.getElementsByTagName)return[];var r,i,o,a,s,l,u,c,f,d,p=t.split(" "),h=[g];for(l=0;l-1){o=(i=r.split("#"))[0];var m=i[1],y=g.getElementById(m);if(!y||o&&y.nodeName.toLowerCase()!=o)return[];h=[y]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var v=i[1];for(o||(o="*"),a=[],s=0,u=0;u-1};break;default:_=function(e){return e.getAttribute(A)}}for(h=[],d=0,u=0;u=3?t[2]:""},properties:function(){return O.extend(O.strip_empty_properties({$os:O.info.os(),$browser:O.info.browser(v,h.vendor,m),$referrer:g.referrer,$referring_domain:O.info.referringDomain(g.referrer),$device:O.info.device(v)}),{$current_url:r.location.href,$browser_version:O.info.browserVersion(v,h.vendor,m),$screen_height:y.height,$screen_width:y.width,mp_lib:"web",$lib_version:i.LIB_VERSION,$insert_id:R(),time:O.timestamp()/1e3})},people_properties:function(){return O.extend(O.strip_empty_properties({$os:O.info.os(),$browser:O.info.browser(v,h.vendor,m)}),{$browser_version:O.info.browserVersion(v,h.vendor,m)})},pageviewInfo:function(e){return O.strip_empty_properties({mp_page:e,mp_referrer:g.referrer,mp_browser:O.info.browser(v,h.vendor,m),mp_platform:O.info.os()})}};var R=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},D=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,j=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,I=function(e){var t=j,n=e.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(t=D);var i=e.match(t);return i?i[0]:""},N=null,F=null;"undefined"!=typeof JSON&&(N=JSON.stringify,F=JSON.parse),N=N||O.JSONEncode,F=F||O.JSONDecode,O.toArray=O.toArray,O.isObject=O.isObject,O.JSONEncode=O.JSONEncode,O.JSONDecode=O.JSONDecode,O.isBlockedUA=O.isBlockedUA,O.isEmptyObject=O.isEmptyObject,O.info=O.info,O.info.device=O.info.device,O.info.browser=O.info.browser,O.info.browserVersion=O.info.browserVersion,O.info.properties=O.info.properties;var z=function(){};z.prototype.create_properties=function(){},z.prototype.event_handler=function(){},z.prototype.after_track_handler=function(){},z.prototype.init=function(e){return this.mp=e,this},z.prototype.track=function(e,t,n,r){var i=this,o=O.dom_query(e);if(0!==o.length)return O.each(o,(function(e){O.register_event(e,this.override_event,(function(e){var o={},a=i.create_properties(n,this),s=i.mp.get_config("track_links_timeout");i.event_handler(e,this,o),window.setTimeout(i.track_callback(r,a,o,!0),s),i.mp.track(t,a,i.track_callback(r,a,o))}))}),this),!0;M.error("The DOM query ("+e+") returned 0 elements")},z.prototype.track_callback=function(e,t,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,e&&!1===e(r,t)||i.after_track_handler(t,n,r))}},z.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):O.extend({},e)};var B=function(){this.override_event="click"};O.inherit(B,z),B.prototype.create_properties=function(e,t){var n=B.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n},B.prototype.event_handler=function(e,t,n){n.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,n.href=t.href,n.new_tab||e.preventDefault()},B.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var U=function(){this.override_event="submit"};O.inherit(U,z),U.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()},U.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var V=T("lock"),H=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};H.prototype.withLock=function(e,t,n){n||"function"==typeof t||(n=t,t=null);var r=n||(new Date).getTime()+"|"+Math.random(),i=(new Date).getTime(),o=this.storageKey,a=this.pollIntervalMS,s=this.timeoutMS,l=this.storage,u=o+":X",c=o+":Y",f=o+":Z",d=function(e){t&&t(e)},p=function(e){if((new Date).getTime()-i>s)return V.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+r+"]"),l.removeItem(f),l.removeItem(c),void m();setTimeout((function(){try{e()}catch(e){d(e)}}),a*(Math.random()+.1))},h=function(e,t){e()?t():p((function(){h(e,t)}))},g=function(){var e=l.getItem(c);if(e&&e!==r)return!1;if(l.setItem(c,r),l.getItem(c)===r)return!0;if(!k(l,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},m=function(){l.setItem(u,r),h(g,(function(){l.getItem(u)!==r?p((function(){l.getItem(c)===r?h((function(){return!l.getItem(f)}),y):m()})):y()}))},y=function(){l.setItem(f,"1");try{e()}finally{l.removeItem(f),l.getItem(c)===r&&l.removeItem(c),l.getItem(u)===r&&l.removeItem(u)}};try{if(!k(l,!0))throw new Error("localStorage support check failed");m()}catch(e){d(e)}};var W=T("batch"),q=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||O.bind(W.error,W),this.lock=new H(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};q.prototype.enqueue=function(e,t,n){var r={id:R(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(O.bind((function(){var t;try{var i=this.readFromStorage();i.push(r),(t=this.saveToStorage(i))&&this.memQueue.push(r)}catch(n){this.reportError("Error enqueueing item",e),t=!1}n&&n(t)}),this),O.bind((function(e){this.reportError("Error acquiring storage lock",e),n&&n(!1)}),this),this.pid)},q.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengtho.flushAfter&&!r[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var Y=function(e,t){var n=[];return O.each(e,(function(e){e.id&&!t[e.id]&&n.push(e)})),n};q.prototype.removeItemsByID=function(e,t){var n={};O.each(e,(function(e){n[e]=!0})),this.memQueue=Y(this.memQueue,n);var r=O.bind((function(){var t;try{var r=this.readFromStorage();if(r=Y(r,n),t=this.saveToStorage(r)){r=this.readFromStorage();for(var i=0;i=t)this.reportError("Network timeout; retrying"),this.flush();else if(O.isObject(o)&&o.xhr_req&&(o.xhr_req.status>=500||429===o.xhr_req.status||"timeout"===o.error)){var l=2*this.flushInterval,u=o.xhr_req.responseHeaders;if(u){var c=u["Retry-After"];c&&(l=1e3*parseInt(c,10)||l)}l=Math.min(6e5,l),this.reportError("Error; retry in "+l+" ms"),this.scheduleFlush(l)}else if(O.isObject(o)&&o.xhr_req&&413===o.xhr_req.status)if(i.length>1){var f=Math.max(1,Math.floor(r/2));this.batchSize=Math.min(this.batchSize,f,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),s=!0;else s=!0;s&&this.queue.removeItemsByID(O.map(i,(function(e){return e.id})),O.bind((function(e){e?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}}),this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(l.transport="sendBeacon"),X.log("MIXPANEL REQUEST:",o),this.sendRequest(o,l,s)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},Z.prototype.reportError=function(e,t){if(X.error.apply(X.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){X.error(t)}};function K(e,t){se(!0,e,t)}function $(e,t){se(!1,e,t)}function J(e,t){return"1"===ae(e,t)}function Q(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||r,n=t.navigator||{},i=!1;return O.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],(function(e){O.includes([!0,1,"1","yes"],e)&&(i=!0)})),i}(t))return M.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===ae(e,t);return n&&M.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function ee(e){return le(e,(function(e){return this.get_config(e)}))}function te(e){return le(e,(function(e){return this._get_config(e)}))}function ne(e){return le(e,(function(e){return this._get_config(e)}))}function re(e,t){ie(t=t||{}).remove(oe(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function ie(e){return"localStorage"===(e=e||{}).persistenceType?O.localStorage:O.cookie}function oe(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function ae(e,t){return ie(t).get(oe(e,t))}function se(e,t,n){O.isString(t)&&t.length?(ie(n=n||{}).set(oe(t,n),e?1:0,O.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):M.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function le(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),a=t.call(this,"opt_out_tracking_cookie_prefix"),s=t.call(this,"window");r&&(n=Q(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:a,window:s}))}catch(e){M.error("Unexpected error when checking tracking opt-out status: "+e)}if(!n)return e.apply(this,arguments);var l=arguments[arguments.length-1];"function"==typeof l&&l(0)}}var ue={set_action:function(e,t){var n={},r={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$set=r,n},unset_action:function(e){var t={},n=[];return O.isArray(e)||(e=[e]),O.each(e,(function(e){this._is_reserved_property(e)||n.push(e)}),this),t.$unset=n,t},set_once_action:function(e,t){var n={},r={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$set_once=r,n},union_action:function(e,t){var n={},r={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=O.isArray(e)?e:[e])}),this):r[e]=O.isArray(t)?t:[t],n.$union=r,n},append_action:function(e,t){var n={},r={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$append=r,n},remove_action:function(e,t){var n={},r={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$remove=r,n},delete_action:function(){var e={$delete:""};return e}},ce=function(){};O.extend(ce.prototype,ue),ce.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n},ce.prototype.set=ne((function(e,t,n){var r=this.set_action(e,t);return O.isObject(e)&&(n=t),this._send_request(r,n)})),ce.prototype.set_once=ne((function(e,t,n){var r=this.set_once_action(e,t);return O.isObject(e)&&(n=t),this._send_request(r,n)})),ce.prototype.unset=ne((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),ce.prototype.union=ne((function(e,t,n){O.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)})),ce.prototype.delete=ne((function(e){var t=this.delete_action();return this._send_request(t,e)})),ce.prototype.remove=ne((function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)})),ce.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=O.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)},ce.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},ce.prototype._get_config=function(e){return this._mixpanel.get_config(e)},ce.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},ce.prototype.remove=ce.prototype.remove,ce.prototype.set=ce.prototype.set,ce.prototype.set_once=ce.prototype.set_once,ce.prototype.union=ce.prototype.union,ce.prototype.unset=ce.prototype.unset,ce.prototype.toString=ce.prototype.toString;var fe=function(){};O.extend(fe.prototype,ue),fe.prototype._init=function(e){this._mixpanel=e},fe.prototype.set=te((function(e,t,n){var r=this.set_action(e,t);return O.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r.$set=O.extend({},O.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),r.$set),this._send_request(r,n)})),fe.prototype.set_once=te((function(e,t,n){var r=this.set_once_action(e,t);return O.isObject(e)&&(n=t),this._send_request(r,n)})),fe.prototype.unset=te((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),fe.prototype.increment=te((function(e,t,n){var r={},i={};return O.isObject(e)?(O.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void M.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[t]=e}}),this),n=t):(O.isUndefined(t)&&(t=1),i[e]=t),r.$add=i,this._send_request(r,n)})),fe.prototype.append=te((function(e,t,n){O.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)})),fe.prototype.remove=te((function(e,t,n){O.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)})),fe.prototype.union=te((function(e,t,n){O.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)})),fe.prototype.track_charge=te((function(e,t,n){if(O.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",O.extend({$amount:e},t),n);M.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),fe.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},fe.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}M.error("mixpanel.people.delete_user() requires you to call identify() first")},fe.prototype.toString=function(){return this._mixpanel.toString()+".people"},fe.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=O.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),O.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),O.truncate(o,255))},fe.prototype._get_config=function(e){return this._mixpanel.get_config(e)},fe.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},fe.prototype._enqueue=function(e){"$set"in e?this._mixpanel.persistence._add_to_people_queue("$set",e):"$set_once"in e?this._mixpanel.persistence._add_to_people_queue("$set_once",e):"$unset"in e?this._mixpanel.persistence._add_to_people_queue("$unset",e):"$add"in e?this._mixpanel.persistence._add_to_people_queue("$add",e):"$append"in e?this._mixpanel.persistence._add_to_people_queue("$append",e):"$remove"in e?this._mixpanel.persistence._add_to_people_queue("$remove",e):"$union"in e?this._mixpanel.persistence._add_to_people_queue("$union",e):M.error("Invalid call to _enqueue():",e)},fe.prototype._flush_one_queue=function(e,t,n,r){var i=this,o=O.extend({},this._mixpanel.persistence._get_queue(e)),a=o;O.isUndefined(o)||!O.isObject(o)||O.isEmptyObject(o)||(i._mixpanel.persistence._pop_from_people_queue(e,o),r&&(a=r(o)),t.call(i,a,(function(t,r){0===t&&i._mixpanel.persistence._add_to_people_queue(e,o),O.isUndefined(n)||n(t,r)})))},fe.prototype._flush=function(e,t,n,r,i,o,a){var s=this,l=this._mixpanel.persistence._get_queue("$append"),u=this._mixpanel.persistence._get_queue("$remove");if(this._flush_one_queue("$set",this.set,e),this._flush_one_queue("$set_once",this.set_once,r),this._flush_one_queue("$unset",this.unset,o,(function(e){return O.keys(e)})),this._flush_one_queue("$add",this.increment,t),this._flush_one_queue("$union",this.union,i),!O.isUndefined(l)&&O.isArray(l)&&l.length){for(var c,f=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue("$append",c),O.isUndefined(n)||n(e,t)},d=l.length-1;d>=0;d--)c=l.pop(),O.isEmptyObject(c)||s.append(c,f);s._mixpanel.persistence.save()}if(!O.isUndefined(u)&&O.isArray(u)&&u.length){for(var p,h=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue("$remove",p),O.isUndefined(a)||a(e,t)},g=u.length-1;g>=0;g--)p=u.pop(),O.isEmptyObject(p)||s.remove(p,h);s._mixpanel.persistence.save()}},fe.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},fe.prototype.set=fe.prototype.set,fe.prototype.set_once=fe.prototype.set_once,fe.prototype.unset=fe.prototype.unset,fe.prototype.increment=fe.prototype.increment,fe.prototype.append=fe.prototype.append,fe.prototype.remove=fe.prototype.remove,fe.prototype.union=fe.prototype.union,fe.prototype.track_charge=fe.prototype.track_charge,fe.prototype.clear_charges=fe.prototype.clear_charges,fe.prototype.delete_user=fe.prototype.delete_user,fe.prototype.toString=fe.prototype.toString;var de,pe,he=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu","$people_distinct_id","__alias","__timers"],ge=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(M.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&O.localStorage.is_supported()?this.storage=O.localStorage:this.storage=O.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};ge.prototype.properties=function(){var e={};return O.each(this.props,(function(t,n){O.include(he,n)||(e[n]=t)})),e},ge.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=O.extend({},e))}},ge.prototype.upgrade=function(e){var t,n,r=e.upgrade;r&&(t="mp_super_properties","string"==typeof r&&(t=r),n=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),n&&(this.props=O.extend(this.props,n.all,n.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(n=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(n))),this.storage===O.localStorage&&(n=O.cookie.parse(this.name),O.cookie.remove(this.name),O.cookie.remove(this.name,!0),n&&this.register_once(n))},ge.prototype.save=function(){this.disabled||this.storage.set(this.name,O.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},ge.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},ge.prototype.clear=function(){this.remove(),this.props={}},ge.prototype.register_once=function(e,t,n){return!!O.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,O.each(e,(function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)}),this),this.save(),!0)},ge.prototype.register=function(e,t){return!!O.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,O.extend(this.props,e),this.save(),!0)},ge.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},ge.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(O.info.campaignParams()),this.campaign_params_saved=!0)},ge.prototype.update_search_keyword=function(e){this.register(O.info.searchInfo(e))},ge.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:O.info.referringDomain(e)||"$direct"},"")},ge.prototype.get_referrer_info=function(){return O.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},ge.prototype.safe_merge=function(e){return O.each(this.props,(function(t,n){n in e||(e[n]=t)})),e},ge.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},ge.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},ge.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},ge.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},ge.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},ge.prototype.get_cross_subdomain=function(){return this.cross_subdomain},ge.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},ge.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue("$set"),o=this._get_or_create_queue("$set_once"),a=this._get_or_create_queue("$unset"),s=this._get_or_create_queue("$add"),l=this._get_or_create_queue("$union"),u=this._get_or_create_queue("$remove",[]),c=this._get_or_create_queue("$append",[]);"__mps"===n?(O.extend(i,r),this._pop_from_people_queue("$add",r),this._pop_from_people_queue("$union",r),this._pop_from_people_queue("$unset",r)):"__mpso"===n?(O.each(r,(function(e,t){t in o||(o[t]=e)})),this._pop_from_people_queue("$unset",r)):"__mpus"===n?O.each(r,(function(e){O.each([i,o,s,l],(function(t){e in t&&delete t[e]})),O.each(c,(function(t){e in t&&delete t[e]})),a[e]=!0})):"__mpa"===n?(O.each(r,(function(e,t){t in i?i[t]+=e:(t in s||(s[t]=0),s[t]+=e)}),this),this._pop_from_people_queue("$unset",r)):"__mpu"===n?(O.each(r,(function(e,t){O.isArray(e)&&(t in l||(l[t]=[]),l[t]=l[t].concat(e))})),this._pop_from_people_queue("$unset",r)):"__mpr"===n?(u.push(r),this._pop_from_people_queue("$append",r)):"__mpap"===n&&(c.push(r),this._pop_from_people_queue("$unset",r)),M.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),M.log(t),this.save()},ge.prototype._pop_from_people_queue=function(e,t){var n=this._get_queue(e);O.isUndefined(n)||(O.each(t,(function(t,r){"$append"===e||"$remove"===e?O.each(n,(function(e){e[r]===t&&delete e[r]})):delete n[r]}),this),this.save())},ge.prototype._get_queue_key=function(e){return"$set"===e?"__mps":"$set_once"===e?"__mpso":"$unset"===e?"__mpus":"$add"===e?"__mpa":"$append"===e?"__mpap":"$remove"===e?"__mpr":"$union"===e?"__mpu":void M.error("Invalid queue:",e)},ge.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},ge.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=O.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},ge.prototype.set_event_timer=function(e,t){var n=this.props.__timers||{};n[e]=t,this.props.__timers=n,this.save()},ge.prototype.remove_event_timer=function(e){var t=(this.props.__timers||{})[e];return O.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var me=function(e){return e},ye=function(){},ve=r.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,be=!ve&&-1===v.indexOf("MSIE")&&-1===v.indexOf("Mozilla"),_e=null;h.sendBeacon&&(_e=function(){return h.sendBeacon.apply(h,arguments)});var Ae={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:ye,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:ye,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},xe=!1,we=function(){},Ee=function(e,t,n){var r,o="mixpanel"===n?pe:pe[n];if(o&&0===de)r=o;else{if(o&&!O.isArray(o))return void M.error("You have already initialized "+n);r=new we}return r._cached_groups={},r._init(e,t,n),r.people=new fe,r.people._init(r),i.DEBUG=i.DEBUG||r.get_config("debug"),!O.isUndefined(o)&&O.isArray(o)&&(r._execute_array.call(r.people,o.people),r._execute_array(o)),r};we.prototype.init=function(e,t,n){if(O.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if("mixpanel"!==n){var r=Ee(e,t,n);return pe[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},we.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var i={};"api_payload_format"in t||(t.api_host||Ae.api_host).match(/\.mixpanel\.com$/)&&(i.api_payload_format="json");if(this.set_config(O.extend({},Ae,i,t,{name:n,token:e,callback_fn:("mixpanel"===n?n:"mixpanel."+n)+"._jsc"})),this._jsc=ye,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(O.localStorage.is_supported(!0)&&ve){if(this.init_batchers(),_e&&r.addEventListener){var o=O.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);r.addEventListener("pagehide",(function(e){e.persisted&&o()})),r.addEventListener("visibilitychange",(function(){"hidden"===g.visibilityState&&o()}))}}else this._batch_requests=!1,M.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");this.persistence=this.cookie=new ge(this.config),this.unpersisted_superprops={},this._gdpr_init();var a=O.UUID();this.get_distinct_id()||this.register_once({distinct_id:a,$device_id:a},"")},we.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},we.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(g.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(g.referrer)},we.prototype._dom_loaded=function(){O.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||O.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},we.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!xe)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},we.prototype._prepare_callback=function(e,t){if(O.isUndefined(e))return null;if(ve){return function(n){e(n,t)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},we.prototype._send_request=function(e,t,n,r){var i=!0;if(be)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},a=null;r||!O.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=O.extend(o,n||{}),ve||(n.method="GET");var s="POST"===n.method,l=_e&&s&&"sendbeacon"===n.transport.toLowerCase(),u=n.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),ve||(r?t.callback=r:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),s&&(a="data="+encodeURIComponent(t.data),delete t.data),e+="?"+O.HTTPBuildQuery(t);var c=this;if("img"in t){var f=g.createElement("img");f.src=e,g.body.appendChild(f)}else if(l){try{i=_e(e,a)}catch(e){c.report_error(e),i=!1}try{r&&r(i?1:0)}catch(e){c.report_error(e)}}else if(ve)try{var d=new XMLHttpRequest;d.open(n.method,e,!0);var p=this.get_config("xhr_headers");if(s&&(p["Content-Type"]="application/x-www-form-urlencoded"),O.each(p,(function(e,t){d.setRequestHeader(t,e)})),n.timeout_ms&&void 0!==d.timeout){d.timeout=n.timeout_ms;var h=(new Date).getTime()}d.withCredentials=!0,d.onreadystatechange=function(){var e;if(4===d.readyState)if(200===d.status){if(r)if(u){var t;try{t=O.JSONDecode(d.responseText)}catch(e){if(c.report_error(e),!n.ignore_json_errors)return;t=d.responseText}r(t)}else r(Number(d.responseText))}else e=d.timeout&&!d.status&&(new Date).getTime()-h>=d.timeout?"timeout":"Bad HTTP status: "+d.status+" "+d.statusText,c.report_error(e),r&&r(u?{status:0,error:e,xhr_req:d}:0)},d.send(a)}catch(e){c.report_error(e),i=!1}else{var m=g.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var y=g.getElementsByTagName("script")[0];y.parentNode.insertBefore(m,y)}return i},we.prototype._execute_array=function(e){var t,n=[],r=[],i=[];O.each(e,(function(e){e&&(t=e[0],O.isArray(t)?i.push(e):"function"==typeof e?e.call(this):O.isArray(e)&&"alias"===t?n.push(e):O.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):r.push(e))}),this);var o=function(e,t){O.each(e,(function(e){if(O.isArray(e[0])){var n=t;O.each(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};o(n,this),o(r,this),o(i,this)},we.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},we.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=O.bind((function(t){return new Z("__mpq_"+e+t.queue_suffix,{libConfig:this.config,sendRequestFunc:O.bind((function(e,n,r){this._send_request(this.get_config("api_host")+t.endpoint,this._encode_data_for_request(e),n,this._prepare_callback(r,e))}),this),beforeSendHook:O.bind((function(e){return this._run_hook("before_send_"+t.type,e)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:O.bind(this.stop_batch_senders,this)})}),this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},we.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,O.each(this.request_batchers,(function(e){e.start()})))},we.prototype.stop_batch_senders=function(){this._batch_requests=!1,O.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},we.prototype.push=function(e){this._execute_array([e])},we.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},we.prototype._encode_data_for_request=function(e){var t=O.JSONEncode(e);return"base64"===this.get_config("api_payload_format")&&(t=O.base64Encode(t)),{data:t}},we.prototype._track_or_batch=function(e,t){var n=O.truncate(e.data,255),r=e.endpoint,i=e.batcher,o=e.should_send_immediately,a=e.send_request_options||{};t=t||ye;var s=!0,l=O.bind((function(){return a.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(M.log("MIXPANEL REQUEST:"),M.log(n),this._send_request(r,this._encode_data_for_request(n),a,this._prepare_callback(t,n))):null}),this);return this._batch_requests&&!o?i.enqueue(n,(function(e){e?t(1,n):l()})):s=l(),s&&n},we.prototype.track=ee((function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var o=n.send_immediately;if("function"!=typeof r&&(r=ye),O.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=t||{}).token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!O.isUndefined(a)){var s=(new Date).getTime()-a;t.$duration=parseFloat((s/1e3).toFixed(3))}this._set_default_superprops(),t=O.extend({},O.info.properties(),this.persistence.properties(),this.unpersisted_superprops,t);var l=this.get_config("property_blacklist");O.isArray(l)?O.each(l,(function(e){delete t[e]})):this.report_error("Invalid value for property_blacklist config: "+l);var u={event:e,properties:t};return this._track_or_batch({type:"events",data:u,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r)}r(0)}})),we.prototype.set_group=ee((function(e,t,n){O.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)})),we.prototype.add_group=ee((function(e,t,n){var r=this.get_property(e);if(void 0===r){var i={};i[e]=[t],this.register(i)}else-1===r.indexOf(t)&&(r.push(t),this.register(i));return this.people.union(e,t,n)})),we.prototype.remove_group=ee((function(e,t,n){var r=this.get_property(e);if(void 0!==r){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,n)})),we.prototype.track_with_groups=ee((function(e,t,n,r){var i=O.extend({},t||{});return O.each(n,(function(e,t){null!=e&&(i[t]=e)})),this.track(e,i,r)})),we.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},we.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},we.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new ce)._init(this,e,t),this._cached_groups[n]=r),r},we.prototype.track_pageview=function(e){O.isUndefined(e)&&(e=g.location.href),this.track("mp_page_view",O.info.pageviewInfo(e))},we.prototype.track_links=function(){return this._track_dom.call(this,B,arguments)},we.prototype.track_forms=function(){return this._track_dom.call(this,U,arguments)},we.prototype.time_event=function(e){O.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var Oe={persistent:!0},Me=function(e){var t;return t=O.isObject(e)?e:O.isUndefined(e)?{}:{days:e},O.extend({},Oe,t)};we.prototype.register=function(e,t){var n=Me(t);n.persistent?this.persistence.register(e,n.days):O.extend(this.unpersisted_superprops,e)},we.prototype.register_once=function(e,t,n){var r=Me(n);r.persistent?this.persistence.register_once(e,t,r.days):(void 0===t&&(t="None"),O.each(e,(function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)}),this))},we.prototype.unregister=function(e,t){(t=Me(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},we.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},we.prototype.identify=function(e,t,n,r,i,o,a,s){var l=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var u=l;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==l&&e!==this.get_property("__alias")&&(this.unregister("__alias"),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,o,a,s),e!==l&&this.track("$identify",{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0})},we.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=O.UUID();this.register_once({distinct_id:e,$device_id:e},"")},we.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},we.prototype.alias=function(e,t){if(e===this.get_property("$people_distinct_id"))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return O.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single("__alias",e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){n.identify(e)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},we.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},we.prototype.set_config=function(e){O.isObject(e)&&(O.extend(this.config,e),e.batch_size&&O.each(this.request_batchers,(function(e){e.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),i.DEBUG=i.DEBUG||this.get_config("debug"))},we.prototype.get_config=function(e){return this.config[e]},we.prototype._run_hook=function(e){var t=(this.config.hooks[e]||me).apply(this,c.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},we.prototype.get_property=function(e){return this.persistence.props[e]},we.prototype.toString=function(){var e=this.get_config("name");return"mixpanel"!==e&&(e="mixpanel."+e),e},we.prototype._event_is_disabled=function(e){return O.isBlockedUA(v)||this._flags.disable_all_events||O.include(this.__disabled_events,e)},we.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&O.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!O.cookie.get("mp_optout")||(O.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},we.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t&&O.each(this.request_batchers,(function(e){e.clear()}))},we.prototype._gdpr_call_func=function(e,t){return t=O.extend({track:O.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),O.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},we.prototype.opt_in_tracking=function(e){e=O.extend({enable_persistence:!0},e),this._gdpr_call_func(K,e),this._gdpr_update_persistence(e)},we.prototype.opt_out_tracking=function(e){(e=O.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func($,e),this._gdpr_update_persistence(e)},we.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(J,e)},we.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(Q,e)},we.prototype.clear_opt_in_out_tracking=function(e){e=O.extend({enable_persistence:!0},e),this._gdpr_call_func(re,e),this._gdpr_update_persistence(e)},we.prototype.report_error=function(e,t){M.error.apply(M.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){M.error(t)}},we.prototype.init=we.prototype.init,we.prototype.reset=we.prototype.reset,we.prototype.disable=we.prototype.disable,we.prototype.time_event=we.prototype.time_event,we.prototype.track=we.prototype.track,we.prototype.track_links=we.prototype.track_links,we.prototype.track_forms=we.prototype.track_forms,we.prototype.track_pageview=we.prototype.track_pageview,we.prototype.register=we.prototype.register,we.prototype.register_once=we.prototype.register_once,we.prototype.unregister=we.prototype.unregister,we.prototype.identify=we.prototype.identify,we.prototype.alias=we.prototype.alias,we.prototype.name_tag=we.prototype.name_tag,we.prototype.set_config=we.prototype.set_config,we.prototype.get_config=we.prototype.get_config,we.prototype.get_property=we.prototype.get_property,we.prototype.get_distinct_id=we.prototype.get_distinct_id,we.prototype.toString=we.prototype.toString,we.prototype.opt_out_tracking=we.prototype.opt_out_tracking,we.prototype.opt_in_tracking=we.prototype.opt_in_tracking,we.prototype.has_opted_out_tracking=we.prototype.has_opted_out_tracking,we.prototype.has_opted_in_tracking=we.prototype.has_opted_in_tracking,we.prototype.clear_opt_in_out_tracking=we.prototype.clear_opt_in_out_tracking,we.prototype.get_group=we.prototype.get_group,we.prototype.set_group=we.prototype.set_group,we.prototype.add_group=we.prototype.add_group,we.prototype.remove_group=we.prototype.remove_group,we.prototype.track_with_groups=we.prototype.track_with_groups,we.prototype.start_batch_senders=we.prototype.start_batch_senders,we.prototype.stop_batch_senders=we.prototype.stop_batch_senders,ge.prototype.properties=ge.prototype.properties,ge.prototype.update_search_keyword=ge.prototype.update_search_keyword,ge.prototype.update_referrer_info=ge.prototype.update_referrer_info,ge.prototype.get_cross_subdomain=ge.prototype.get_cross_subdomain,ge.prototype.clear=ge.prototype.clear;var Se={},Te=function(){pe.init=function(e,t,n){if(n)return pe[n]||(pe[n]=Se[n]=Ee(e,t,n),pe[n]._loaded()),pe[n];var i=pe;Se.mixpanel?i=Se.mixpanel:e&&((i=Ee(e,t,"mixpanel"))._loaded(),Se.mixpanel=i),pe=i,1===de&&(r.mixpanel=pe),O.each(Se,(function(e,t){"mixpanel"!==t&&(pe[t]=e)})),pe._=O}};var Ce=(de=0,pe=new we,Te(),pe.init(),function(){function e(){e.done||(e.done=!0,xe=!0,be=!1,O.each(Se,(function(e){e._dom_loaded()})))}if(g.addEventListener)"complete"===g.readyState?e():g.addEventListener("DOMContentLoaded",e,!1);else if(g.attachEvent){g.attachEvent("onreadystatechange",e);var t=!1;try{t=null===r.frameElement}catch(e){}g.documentElement.doScroll&&t&&function t(){try{g.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}O.register_event(r,"load",e,!0)}(),pe);e.exports=Ce},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var s,l,u,c=r(t),f=r(n);if(c&&f){if((l=t.length)!=n.length)return!1;for(s=l;0!=s--;)if(!e(t[s],n[s]))return!1;return!0}if(c!=f)return!1;var d=t instanceof Date,p=n instanceof Date;if(d!=p)return!1;if(d&&p)return t.getTime()==n.getTime();var h=t instanceof RegExp,g=n instanceof RegExp;if(h!=g)return!1;if(h&&g)return t.toString()==n.toString();var m=i(t);if((l=m.length)!==i(n).length)return!1;for(s=l;0!=s--;)if(!o.call(n,m[s]))return!1;if(a&&t instanceof Element&&n instanceof Element)return t===n;for(s=l;0!=s--;)if(!("_owner"===(u=m[s])&&t.$$typeof||e(t[u],n[u])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},,function(e,t){e.exports=!1},function(e,t,n){var r=n(323)("meta"),i=n(87),o=n(192),a=n(113).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(83)((function(){return l(Object.preventExtensions({}))})),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&f.NEED&&l(e)&&!o(e,r)&&c(e),e}}},function(e,t,n){var r=n(96)("unscopables"),i=Array.prototype;null==i[r]&&n(175)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(285),i=n(196),o=n(692),a=n(374),s=n(333),l=function(e,t,n){var u,c,f,d=e&l.F,p=e&l.G,h=e&l.S,g=e&l.P,m=e&l.B,y=e&l.W,v=p?i:i[t]||(i[t]={}),b=v.prototype,_=p?r:h?r[t]:(r[t]||{}).prototype;for(u in p&&(n=t),n)(c=!d&&_&&void 0!==_[u])&&s(v,u)||(f=c?_[u]:n[u],v[u]=p&&"function"!=typeof _[u]?n[u]:m&&c?o(f,r):y&&_[u]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):g&&"function"==typeof f?o(Function.call,f):f,g&&((v.virtual||(v.virtual={}))[u]=f,e&l.R&&b&&!b[u]&&a(b,u,f)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(375),i=n(1048),o=n(693),a=Object.defineProperty;t.f=n(287)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(377)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(1769),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(50))},function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a2&&void 0!==arguments[2]?arguments[2]:{},r={dynamicDomain:[],fixedDomain:[],cpu:[],gpu:[]};return t.forEach((function(t){Q(t.type,t.value)&&(0,E.toArray)(t.dataId).includes(e)&&((t.fixedDomain||n.ignoreDomain?r.fixedDomain:r.dynamicDomain).push(t),(t.gpu&&!n.cpuOnly?r.gpu:r.cpu).push(t))})),r},t.diffFilters=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};return Object.entries(e).forEach((function(e){var r=(0,c.default)(e,2),i=r[0],o=r[1];o.forEach((function(e){var r=(t[i]||[]).find((function(t){return t.id===e.id}));r?["name","value","dataId"].forEach((function(t){e[t]!==r[t]&&(n=(0,E.set)([i,e.id],"".concat(t,"_changed"),n))})):n=(0,E.set)([i,e.id],"added",n)})),(t[i]||[]).forEach((function(e){o.find((function(t){return t.id===e.id}))||(n=(0,E.set)([i,e.id],"deleted",n))})),n[i]||(n[i]=null)})),n},t.adjustValueToFilterDomain=W,t.getNumericFieldDomain=function(e,t){var n=[0,1],r=.1,i=e.mapIndex(t);if(e.numRows()>1){var o=(n=x.getLinearDomain(i))[1]-n[0];o||(n[1]=n[0]+1),r=q(o)||r,n[0]=X(n[0],r,"floor"),n[1]=X(n[1],r,"ceil")}var a=G(n,i),s=a.histogram,l=a.enlargedHistogram;return{domain:n,step:r,histogram:s,enlargedHistogram:l}},t.getNumericStepSize=q,t.getTimestampFieldDomain=function(e,t){var n=e.mapIndex(t),r=x.getLinearDomain(n),i=J(r),o=.01,a=r[1]-r[0],s=T.find((function(e){return e.max>=a}));s&&(o=s.step);var l=G(r,n),u=l.histogram,c=l.enlargedHistogram;return{domain:r,step:o,mappedValue:n,histogram:u,enlargedHistogram:c,defaultTimeFormat:i}},t.histogramConstruct=Y,t.getHistogram=G,t.formatNumberByStep=X,t.isInRange=Z,t.isInPolygon=K,t.isValidTimeDomain=$,t.getTimeWidgetTitleFormatter=J,t.getTimeWidgetHintFormatter=function(e){if(!$(e))return null;var t=e[1]-e[0];return t>6048e5?"L":t>864e5?"L LT":t>36e5?"LT":"LTS"},t.isValidFilterValue=Q,t.getFilterPlot=ee,t.getDefaultFilterPlotType=function(e){var t=L[e.type];if(!t)return null;if(!e.yAxis)return t.default;return t[e.yAxis.type]||null},t.applyFiltersToDatasets=function(e,t,n,r){return(0,E.toArray)(e).reduce((function(e,i){var o=(r||[]).filter((function(e){return e.config.dataId===i})),a=n.filter((function(e){return N(e,i)})),s=t[i];return S(S({},e),{},(0,f.default)({},i,s.filterTable(a,o,{})))}),t)},t.applyFilterFieldName=te,t.mergeFilterDomainStep=ne,t.generatePolygonFilter=function(e,t){var n=e.map((function(e){return e.config.dataId})).filter((function(e){return e})),r=e.map((function(e){return e.id})),i=e.map((function(e){return e.config.label})),o=I(n);return S(S({},o),{},{fixedDomain:!0,type:_.FILTER_TYPES.polygon,name:i,layerId:r,value:re(t,o.id,{isVisible:!0})})},t.filterDatasetCPU=function(e,t){var n=e.filters.filter((function(e){return e.dataId.includes(t)})),r=e.datasets[t];if(!r)return e;var i=r.filterTableCPU(n,e.layers);return(0,E.set)(["datasets",t],i,e)},t.validateFiltersUpdateDatasets=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=[],i=e.datasets,o=i;return t.forEach((function(t){var a=(0,E.toArray)(t.dataId);if(a.every((function(e){return i[e]}))){var s=a.reduce((function(n,r){var i=o[r],a=e.layers.filter((function(e){return e.config.dataId===i.id})),s=U(n.augmentedDatasets[r]||i,t,a),l=s.filter,c=s.dataset;return l?S(S({},n),{},{filter:n.filter?S(S({},n.filter),ne(n,l)):l,applyToDatasets:[].concat((0,u.default)(n.applyToDatasets),[r]),augmentedDatasets:S(S({},n.augmentedDatasets),{},(0,f.default)({},r,c))}):n}),{filter:null,applyToDatasets:[],augmentedDatasets:{}}),l=s.filter,c=s.applyToDatasets,d=s.augmentedDatasets;l&&(0,m.default)(a,c)&&(n.push(l),o=S(S({},o),d))}else r.push(t)})),{validated:n,failed:r,updatedDatasets:o}},t.getIntervalBins=function(e){var t,n=e.bins,r=null===(t=e.plotType)||void 0===t?void 0:t.interval;if(!r||!n||0===Object.keys(n).length)return null;var i=Object.values(n);return i[0]?i[0][r]:null},t.getFilterIdInFeature=t.featureToFilterValue=t.getPolygonFilterFunctor=t.LAYER_FILTERS=t.FILTER_ID_LENGTH=t.DEFAULT_FILTER_STRUCTURE=t.FILTER_COMPONENTS=t.LIMITED_FILTER_EFFECT_PROPS=t.FILTER_UPDATER_PROPS=t.PLOT_TYPES=t.enlargedHistogramBins=t.histogramBins=t.TimestampStepMap=void 0;var o,a,s,l,u=r(n(69)),c=r(n(90)),f=r(n(4)),d=n(236),p=r(n(386)),h=n(197),g=r(n(179)),m=r(n(747)),y=r(n(2452)),v=n(119),b=n(2138),_=n(37),A=n(73),x=i(n(1189)),w=n(387),E=n(88),O=n(748);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t100)return 1;if(e>3)return.01;if(e>1)return.001;var t=(e/1e3).toExponential(),n=parseFloat(t.split("e")[1]);return new b.Decimal(10).pow(n).toNumber()}function Y(e,t,n){return(0,d.histogram)().thresholds((0,d.ticks)(e[0],e[1],n)).domain(e)(t).map((function(e){return{count:e.length,x0:e.x0,x1:e.x1}}))}function G(e,t){return{histogram:Y(e,t,30),enlargedHistogram:Y(e,t,100)}}function X(e,t,n){return"floor"===n?Math.floor(e*(1/t))/(1/t):Math.ceil(e*(1/t))/(1/t)}function Z(e,t){return!!Array.isArray(t)&&(e>=t[0]&&e<=t[1])}function K(e,t){return(0,y.default)((0,v.point)(e),t)}function $(e){return Array.isArray(e)&&e.every(Number.isFinite)}function J(e){if(!$(e))return null;var t=e[1]-e[0];return t>31536e6?"L":t>864e5?"L LT":"L LTS"}function Q(e,t){if(!e)return!1;switch(e){case _.FILTER_TYPES.select:return!0===t||!1===t;case _.FILTER_TYPES.range:case _.FILTER_TYPES.timeRange:return Array.isArray(t)&&t.every((function(e){return null!==e&&!isNaN(e)}));case _.FILTER_TYPES.multiSelect:return Array.isArray(t)&&Boolean(t.length);case _.FILTER_TYPES.input:return Boolean(t.length);case _.FILTER_TYPES.polygon:var n=(0,g.default)(t,["geometry","coordinates"]);return Boolean(t&&t.id&&n);default:return!0}}function ee(e,t){if(e.plotType===C.histogram||!e.yAxis)return{};var n=e.mappedValue,r=void 0===n?[]:n,i=e.yAxis,o=t.getColumnFieldIdx(i.name);if(o<0)return h.console.warn("yAxis ".concat(i.name," does not exist in dataset")),{lineChart:{},yAxis:i};var a=t.dataContainer.map((function(e,t){return{x:r[t],y:e.valueAt(o)}}),!0).filter((function(e){var t=e.x,n=e.y;return Number.isFinite(t)&&Number.isFinite(n)})).sort((function(e,t){return(0,d.ascending)(e.x,t.x)}));return{lineChart:{series:a,yDomain:(0,d.extent)(a,(function(e){return e.y})),xDomain:[a[0].x,a[a.length-1].x]},yAxis:i}}function te(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,o=!(!i||!i.hasOwnProperty("mergeDomain"))&&i.mergeDomain,a=t.getColumnFieldIdx(n);if(-1===a)return{filter:null,dataset:t};var s=t.getColumnFilterProps(n),l=S(S({},o?ne(e,s):S(S({},e),s)),{},{name:Object.assign((0,u.default)((0,E.toArray)(e.name)),(0,f.default)({},r,n)),fieldIdx:Object.assign((0,u.default)((0,E.toArray)(e.fieldIdx)),(0,f.default)({},r,a)),freeze:!0});return{filter:l,dataset:t}}function ne(e,t){if(!e)return null;if(!t)return e;if(e.fieldType&&e.fieldType!==t.fieldType||!t.domain)return e;var n=e.domain?[].concat((0,u.default)(e.domain||[]),(0,u.default)(t.domain||[])).sort((function(e,t){return e-t})):t.domain,r=S(S(S({},e),t),{},{domain:[n[0],n[n.length-1]]});switch(t.fieldType){case _.ALL_FIELD_TYPES.string:case _.ALL_FIELD_TYPES.date:return S(S({},r),{},{domain:(0,A.unique)(n).sort()});case _.ALL_FIELD_TYPES.timestamp:var i=e.step2&&void 0!==arguments[2]?arguments[2]:{};return S(S({},e),{},{id:e.id,properties:S(S(S({},e.properties),n),{},{filterId:t})})};t.featureToFilterValue=re;t.getFilterIdInFeature=function(e){return(0,g.default)(e,["properties","filterId"])}},function(e,t,n){"use strict";var r=n(5);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(4)),o=r(n(0)),a=r(n(1)),s=r(n(790));function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],n=function(n){var r=n.value,i=n.displayOption,o=void 0===i?O:i;return g.default.createElement(T,{className:"field-selector_list-item"},t?g.default.createElement(S,null,g.default.createElement(e,{type:r.type})):null,g.default.createElement("span",{className:_.classList.listItemAnchor},o(r)))};return n}}C.deps=[w.default];var P=function(){return g.default.createElement("div",null,"Suggested Field")},k=y.default.oneOfType([y.default.string,y.default.arrayOf(y.default.string),y.default.arrayOf(y.default.shape({name:y.default.string,format:y.default.string})),y.default.shape({format:y.default.string,id:y.default.string,name:y.default.string,fieldIdx:y.default.number,type:y.default.number})]);function L(e){var t=function(t){(0,c.default)(r,t);var n=E(r);function r(){var t;(0,s.default)(this,r);for(var i=arguments.length,o=new Array(i),a=0;aa?0:a+t:t>a?a:t,n=n>0?n:0,i.length<1e4)(o=Array.from(i)).unshift(t,n),r.apply(e,o);else for(n&&r.apply(e,[t,n]);s0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={};return function(i,o){var a,s=i.props._offset,l=i.id,u=i.parent&&i.parent.id;if(u in r){var c=r[u]=r[u]||e(n[u],n);a=c(i,o),r[l]=c}else Number.isFinite(s)?(a=s+(n[u]||0),r[l]=null):a=t;return o&&a>=t&&(t=a+1),n[l]=a,a}}(),v=0;v0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e);var n=t.id,i=void 0===n?"effect":n;this.id=i,this.props={},Object.assign(this.props,t)}return Object(i.a)(e,[{key:"preRender",value:function(){}},{key:"getModuleParameters",value:function(){}},{key:"cleanup",value:function(){}}]),e}()},function(e,t,n){"use strict";function r(e){this._context=e}r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},t.a=function(e){return new r(e)}},function(e,t,n){"use strict";function r(e){return function(t){return t.matches(e)}}n.d(t,"a",(function(){return r})),t.b=function(e){return function(){return this.matches(e)}}},function(e,t,n){"use strict";var r=n(405),i=n(309);function o(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===i.b&&t.documentElement.namespaceURI===i.b?t.createElement(e):t.createElementNS(n,e)}}function a(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}t.a=function(e){var t=Object(r.a)(e);return(t.local?a:o)(t)}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},,function(e,t,n){var r=n(1960),i=n(1139);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){"use strict";function r(e){this._maxSize=e,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(e){return this._values[e]},r.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var i=/[^.^\]^[]+|(?=\[\]|\.\.)/g,o=/^\d+$/,a=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,l=/^\s*(['"]?)(.*?)(\1)\s*$/,u=new r(512),c=new r(512),f=new r(512);function d(e){return u.get(e)||u.set(e,p(e).map((function(e){return e.replace(l,"$2")})))}function p(e){return e.match(i)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function g(e){return!h(e)&&(function(e){return e.match(a)&&!e.match(o)}(e)||function(e){return s.test(e)}(e))}e.exports={Cache:r,split:p,normalizePath:d,setter:function(e){var t=d(e);return c.get(e)||c.set(e,(function(e,n){for(var r=0,i=t.length,o=e;r-1};var c=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function f(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t2&&void 0!==arguments[2]?arguments[2]:null;return n||(e=s({fetch:Object(o.a)(t||{},e)},e),Array.isArray(e.loaders)||(e.loaders=null),e)}function u(e,t){if(!t&&e&&!Array.isArray(e))return e;var n;if(e&&(n=Array.isArray(e)?e:[e]),t&&t.loaders){var i=Array.isArray(t.loaders)?t.loaders:[t.loaders];n=n?[].concat(Object(r.a)(n),Object(r.a)(i)):i}return n&&n.length?n:null}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return y}));var r=n(9),i=n.n(r),o=n(23),a=n(593),s=n(62),l=n(431),u=n(363),c="Cannot convert supplied data type";function f(e,t){if(t.text&&"string"==typeof e)return e;if(e instanceof ArrayBuffer){var n=e;return t.text&&!t.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)||Object(s.c)(e)){if(t.text&&!t.binary)return new TextDecoder("utf8").decode(e);var r=e.buffer,i=e.byteLength||e.length;return 0===e.byteOffset&&i===r.byteLength||(r=r.slice(e.byteOffset,e.byteOffset+i)),r}throw new Error(c)}function d(e,t){return p.apply(this,arguments)}function p(){return(p=Object(o.a)(i.a.mark((function e(t,n){var r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),"string"!=typeof t&&!r){e.next=3;break}return e.abrupt("return",f(t,n));case 3:if(!Object(s.b)(t)){e.next=7;break}return e.next=6,Object(u.b)(t);case 6:t=e.sent;case 7:if(!Object(s.j)(t)){e.next=21;break}return o=t,e.next=11,Object(u.a)(o);case 11:if(!n.binary){e.next=17;break}return e.next=14,o.arrayBuffer();case 14:e.t0=e.sent,e.next=20;break;case 17:return e.next=19,o.text();case 19:e.t0=e.sent;case 20:return e.abrupt("return",e.t0);case 21:if(Object(s.i)(t)&&(t=Object(l.a)(t)),!Object(s.d)(t)&&!Object(s.a)(t)){e.next=24;break}return e.abrupt("return",Object(a.a)(t));case 24:throw new Error(c);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return g.apply(this,arguments)}function g(){return(g=Object(o.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(s.e)(t)){e.next=2;break}return e.abrupt("return",t);case 2:if(!Object(s.j)(t)){e.next=6;break}return e.next=5,Object(u.a)(t);case 5:return e.abrupt("return",Object(l.a)(t.body));case 6:if(!Object(s.b)(t)&&!Object(s.i)(t)){e.next=8;break}return e.abrupt("return",Object(l.a)(t));case 8:if(!Object(s.a)(t)){e.next=10;break}return e.abrupt("return",t[Symbol.asyncIterator]());case 10:return e.abrupt("return",m(t));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){if(ArrayBuffer.isView(e))return i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.buffer;case 2:case"end":return t.stop()}}),t)}))();if(e instanceof ArrayBuffer)return i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:case"end":return t.stop()}}),t)}))();if(Object(s.e)(e))return e;if(Object(s.d)(e))return e[Symbol.iterator]();throw new Error(c)}function y(e){return v.apply(this,arguments)}function v(){return(v=Object(o.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(s.i)(t)){e.next=2;break}return e.abrupt("return",t);case 2:if(!Object(s.j)(t)){e.next=4;break}return e.abrupt("return",t.body);case 4:return e.next=6,Object(u.b)(t);case 6:return n=e.sent,e.abrupt("return",n.body);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e){var t=i(e);return function(e){var t=i(e);if(!(t.byteLength>=24&&2303741511===t.getUint32(0,!1)))return null;return{mimeType:"image/png",width:t.getUint32(16,!1),height:t.getUint32(20,!1)}}(t)||function(e){var t=i(e);if(!(t.byteLength>=3&&65496===t.getUint16(0,!1)&&255===t.getUint8(2)))return null;var n=function(){for(var e=new Set([65499,65476,65484,65501,65534]),t=65504;t<65520;++t)e.add(t);var n=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:n}}(),r=n.tableMarkers,o=n.sofMarkers,a=2;for(;a+9=10&&1195984440===t.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:t.getUint16(6,!0),height:t.getUint16(8,!0)}}(t)||function(e){var t=i(e);if(!(t.byteLength>=14&&16973===t.getUint16(0,!1)&&t.getUint32(2,!0)===t.byteLength))return null;return{mimeType:"image/bmp",width:t.getUint32(18,!0),height:t.getUint32(22,!0)}}(t)}function i(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r=function(e){return e.scrollTop};function i(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}},function(e,t,n){"use strict";(function(e,r){var i,o=n(1394);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var a=Object(o.a)(i);t.a=a}).call(this,n(50),n(536)(e))},function(e,t,n){e.exports=n(297)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var i=n(2205);t.Motion=r(i);var o=n(2207);t.StaggeredMotion=r(o);var a=n(2208);t.TransitionMotion=r(a);var s=n(2210);t.spring=r(s);var l=n(1237);t.presets=r(l);var u=n(572);t.stripStyle=r(u);var c=n(2211);t.reorderKeys=r(c)},,function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(867),i=n(666);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(217),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(68),i=n(868),o=n(666),a=n(665)("IE_PROTO"),s=function(){},l=function(){var e,t=n(663)("iframe"),r=o.length;for(t.style.display="none",n(667).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("