define(["@jupyter-widgets/base"],(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=165)}([function(e,t,r){"use strict";e.exports=r(176)},function(e,t,r){(function(e){e.exports=function(){"use strict";var t,n;function a(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var r,n=[];for(r=0;r>>0,n=0;n0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},V={};function U(e,t,r,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),e&&(V[e]=a),t&&(V[t[0]]=function(){return B(a.apply(this,arguments),t[1],t[2])}),r&&(V[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function W(e,t){return e.isValid()?(t=q(t,e.localeData()),H[t]=H[t]||function(e){var t,r,n,a=e.match(j);for(t=0,r=a.length;t=0&&Y.test(e);)e=e.replace(Y,n),Y.lastIndex=0,r-=1;return e}var G=/\d/,K=/\d\d/,Z=/\d{3}/,X=/\d{4}/,J=/[+-]?\d{6}/,$=/\d\d?/,Q=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,re=/\d{1,4}/,ne=/[+-]?\d{1,6}/,ae=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[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,ue={};function ce(e,t,r){ue[e]=E(t)?t:function(e,n){return e&&r?r:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,a){return t||r||n||a}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function fe(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),l(t)&&(n=function(e,r){r[t]=k(e)}),r=0;r68?1900:2e3)};var Le,Ae=Ee("FullYear",!0);function Ee(e,t){return function(r){return null!=r?(Pe(this,e,r),a.updateOffset(this,t),this):De(this,e)}}function De(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Pe(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&Ce(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Ie(r,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function Ie(e,t){if(isNaN(e)||isNaN(t))return NaN;var r,n=(t%(r=12)+r)%r;return e+=(t-n)/12,1===n?Ce(e)?29:28:31-n%7%2}Le=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(s=new Date(e+400,t,r,n,a,i,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,a,i,o),s}function Ue(e){var t;if(e<100&&e>=0){var r=Array.prototype.slice.call(arguments);r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function We(e,t,r){var n=7+t-r;return-(7+Ue(e,0,n).getUTCDay()-t)%7+n-1}function qe(e,t,r,n,a){var i,o,s=1+7*(t-1)+(7+r-n)%7+We(e,n,a);return s<=0?o=Se(i=e-1)+s:s>Se(e)?(i=e+1,o=s-Se(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Ge(e,t,r){var n,a,i=We(e.year(),t,r),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?n=o+Ke(a=e.year()-1,t,r):o>Ke(e.year(),t,r)?(n=o-Ke(e.year(),t,r),a=e.year()+1):(a=e.year(),n=o),{week:n,year:a}}function Ke(e,t,r){var n=We(e,t,r),a=We(e+1,t,r);return(Se(e)-n+a)/7}function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),N("week",5),N("isoWeek",5),ce("w",$),ce("ww",$,K),ce("W",$),ce("WW",$,K),me(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=k(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),ce("d",$),ce("e",$),ce("E",$),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,r,n){var a=r._locale.weekdaysParse(e,n,r._strict);null!=a?t.d=a:f(r).invalidWeekday=e})),me(["d","e","E"],(function(e,t,r,n){t[n]=k(e)}));var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,r){var n,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(a=Le.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Le.call(this._weekdaysParse,o))?a:-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:-1!==(a=Le.call(this._weekdaysParse,o))?a:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:-1!==(a=Le.call(this._weekdaysParse,o))?a:-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:null}var et=le,tt=le,rt=le;function nt(){function e(e,t){return t.length-e.length}var t,r,n,a,i,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)r=h([2e3,1]).day(t),n=this.weekdaysMin(r,""),a=this.weekdaysShort(r,""),i=this.weekdays(r,""),o.push(n),s.push(a),l.push(i),u.push(n),u.push(a),u.push(i);for(o.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),l[t]=pe(l[t]),u[t]=pe(u[t]);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("^("+o.join("|")+")","i")}function at(){return this.hours()%12||12}function it(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function ot(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,at),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+at.apply(this)+B(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+at.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+B(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)})),it("a",!0),it("A",!1),O("hour","h"),N("hour",13),ce("a",ot),ce("A",ot),ce("H",$),ce("h",$),ce("k",$),ce("HH",$,K),ce("hh",$,K),ce("kk",$,K),ce("hmm",Q),ce("hmmss",ee),ce("Hmm",Q),ce("Hmmss",ee),fe(["H","HH"],be),fe(["k","kk"],(function(e,t,r){var n=k(e);t[be]=24===n?0:n})),fe(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),fe(["h","hh"],(function(e,t,r){t[be]=k(e),f(r).bigHour=!0})),fe("hmm",(function(e,t,r){var n=e.length-2;t[be]=k(e.substr(0,n)),t[xe]=k(e.substr(n)),f(r).bigHour=!0})),fe("hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[be]=k(e.substr(0,n)),t[xe]=k(e.substr(n,2)),t[we]=k(e.substr(a)),f(r).bigHour=!0})),fe("Hmm",(function(e,t,r){var n=e.length-2;t[be]=k(e.substr(0,n)),t[xe]=k(e.substr(n))})),fe("Hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[be]=k(e.substr(0,n)),t[xe]=k(e.substr(n,2)),t[we]=k(e.substr(a))}));var st,lt=Ee("Hours",!0),ut={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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Fe,monthsShort:Re,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:$e,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},ct={},dt={};function pt(e){return e?e.toLowerCase().replace("_","-"):e}function ht(t){var n=null;if(!ct[t]&&void 0!==e&&e&&e.exports)try{n=st._abbr,r(180)("./"+t),ft(n)}catch(e){}return ct[t]}function ft(e,t){var r;return e&&((r=s(t)?gt(e):mt(e,t))?st=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),st._abbr}function mt(e,t){if(null!==t){var r,n=ut;if(t.abbr=e,null!=ct[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ct[e]._config;else if(null!=t.parentLocale)if(null!=ct[t.parentLocale])n=ct[t.parentLocale]._config;else{if(null==(r=ht(t.parentLocale)))return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;n=r._config}return ct[e]=new P(D(n,t)),dt[e]&&dt[e].forEach((function(e){mt(e.name,e.config)})),ft(e),ct[e]}return delete ct[e],null}function gt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return st;if(!i(e)){if(t=ht(e))return t;e=[e]}return function(e){for(var t,r,n,a,i=0;i0;){if(n=ht(a.slice(0,t).join("-")))return n;if(r&&r.length>=t&&M(a,r,!0)>=t-1)break;t--}i++}return st}(e)}function yt(e){var t,r=e._a;return r&&-2===f(e).overflow&&(t=r[ve]<0||r[ve]>11?ve:r[_e]<1||r[_e]>Ie(r[ye],r[ve])?_e:r[be]<0||r[be]>24||24===r[be]&&(0!==r[xe]||0!==r[we]||0!==r[ke])?be:r[xe]<0||r[xe]>59?xe:r[we]<0||r[we]>59?we:r[ke]<0||r[ke]>999?ke:-1,f(e)._overflowDayOfYear&&(t_e)&&(t=_e),f(e)._overflowWeeks&&-1===t&&(t=Me),f(e)._overflowWeekday&&-1===t&&(t=Te),f(e).overflow=t),e}function vt(e,t,r){return null!=e?e:null!=t?t:r}function _t(e){var t,r,n,i,o,s=[];if(!e._d){for(n=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[ve]&&function(e){var t,r,n,a,i,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,r=vt(t.GG,e._a[ye],Ge(Ot(),1,4).year),n=vt(t.W,1),((a=vt(t.E,1))<1||a>7)&&(l=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var u=Ge(Ot(),i,o);r=vt(t.gg,e._a[ye],u.year),n=vt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}n<1||n>Ke(r,i,o)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(s=qe(r,n,a,i,o),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=vt(e._a[ye],n[ye]),(e._dayOfYear>Se(o)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),r=Ue(o,0,e._dayOfYear),e._a[ve]=r.getUTCMonth(),e._a[_e]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=n[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[xe]&&0===e._a[we]&&0===e._a[ke]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?Ue:Ve).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(f(e).weekdayMismatch=!0)}}var bt=/^\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)?)?$/,xt=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["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}/]],Mt=[["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/]],Tt=/^\/?Date\((\-?\d+)/i;function St(e){var t,r,n,a,i,o,s=e._i,l=bt.exec(s)||xt.exec(s);if(l){for(f(e).iso=!0,t=0,r=kt.length;t0&&f(e).unusedInput.push(o),s=s.slice(s.indexOf(r)+r.length),u+=r.length),V[i]?(r?f(e).empty=!1:f(e).unusedTokens.push(i),ge(i,r,e)):e._strict&&!r&&f(e).unusedTokens.push(i);f(e).charsLeftOver=l-u,s.length>0&&f(e).unusedInput.push(s),e._a[be]<=12&&!0===f(e).bigHour&&e._a[be]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[be]=function(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),_t(e),yt(e)}else Et(e);else St(e)}function Pt(e){var t=e._i,r=e._f;return e._locale=e._locale||gt(e._l),null===t||void 0===r&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),x(t)?new b(yt(t)):(u(t)?e._d=t:i(r)?function(e){var t,r,n,a,i;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;athis?this:e:g()}));function zt(e,t){var r,n;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ot();for(r=t[0],n=1;n=0?new Date(e+400,t,r)-cr:new Date(e,t,r).valueOf()}function hr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-cr:Date.UTC(e,t,r)}function fr(e,t){U(0,[e,e.length],0,t)}function mr(e,t,r,n,a){var i;return null==e?Ge(this,n,a).year:(t>(i=Ke(e,n,a))&&(t=i),gr.call(this,e,t,r,n,a))}function gr(e,t,r,n,a){var i=qe(e,t,r,n,a),o=Ue(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),fr("gggg","weekYear"),fr("ggggg","weekYear"),fr("GGGG","isoWeekYear"),fr("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",$,K),ce("gg",$,K),ce("GGGG",re,X),ce("gggg",re,X),ce("GGGGG",ne,J),ce("ggggg",ne,J),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=k(e)})),me(["gg","GG"],(function(e,t,r,n){t[n]=a.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),O("quarter","Q"),N("quarter",7),ce("Q",G),fe("Q",(function(e,t){t[ve]=3*(k(e)-1)})),U("D",["DD",2],"Do","date"),O("date","D"),N("date",9),ce("D",$),ce("DD",$,K),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(["D","DD"],_e),fe("Do",(function(e,t){t[_e]=k(e.match($)[0])}));var yr=Ee("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),N("dayOfYear",4),ce("DDD",te),ce("DDDD",Z),fe(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=k(e)})),U("m",["mm",2],0,"minute"),O("minute","m"),N("minute",14),ce("m",$),ce("mm",$,K),fe(["m","mm"],xe);var vr=Ee("Minutes",!1);U("s",["ss",2],0,"second"),O("second","s"),N("second",15),ce("s",$),ce("ss",$,K),fe(["s","ss"],we);var _r,br=Ee("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),O("millisecond","ms"),N("millisecond",16),ce("S",te,G),ce("SS",te,K),ce("SSS",te,Z),_r="SSSS";_r.length<=9;_r+="S")ce(_r,ae);function xr(e,t){t[ke]=k(1e3*("0."+e))}for(_r="S";_r.length<=9;_r+="S")fe(_r,xr);var wr=Ee("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var kr=b.prototype;function Mr(e){return e}kr.add=tr,kr.calendar=function(e,t){var r=e||Ot(),n=Wt(r,this).startOf("day"),i=a.calendarFormat(this,n)||"sameElse",o=t&&(E(t[i])?t[i].call(this,r):t[i]);return this.format(o||this.localeData().calendar(i,this,Ot(r)))},kr.clone=function(){return new b(this)},kr.diff=function(e,t,r){var n,a,i;if(!this.isValid())return NaN;if(!(n=Wt(e,this)).isValid())return NaN;switch(a=6e4*(n.utcOffset()-this.utcOffset()),t=F(t)){case"year":i=nr(this,n)/12;break;case"month":i=nr(this,n);break;case"quarter":i=nr(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-a)/864e5;break;case"week":i=(this-n-a)/6048e5;break;default:i=this-n}return r?i:w(i)},kr.endOf=function(e){var t;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?hr:pr;switch(e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ur-dr(t+(this._isUTC?0:this.utcOffset()*lr),ur)-1;break;case"minute":t=this._d.valueOf(),t+=lr-dr(t,lr)-1;break;case"second":t=this._d.valueOf(),t+=sr-dr(t,sr)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},kr.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)},kr.from=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Ot(e).isValid())?Xt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kr.fromNow=function(e){return this.from(Ot(),e)},kr.to=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Ot(e).isValid())?Xt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kr.toNow=function(e){return this.to(Ot(),e)},kr.get=function(e){return E(this[e=F(e)])?this[e]():this},kr.invalidAt=function(){return f(this).overflow},kr.isAfter=function(e,t){var r=x(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()9999?W(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(r,"Z")):W(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},kr.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=t+'[")]';return this.format(r+n+"-MM-DD[T]HH:mm:ss.SSS"+a)},kr.toJSON=function(){return this.isValid()?this.toISOString():null},kr.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},kr.unix=function(){return Math.floor(this.valueOf()/1e3)},kr.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},kr.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},kr.year=Ae,kr.isLeapYear=function(){return Ce(this.year())},kr.weekYear=function(e){return mr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},kr.isoWeekYear=function(e){return mr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},kr.quarter=kr.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},kr.month=Be,kr.daysInMonth=function(){return Ie(this.year(),this.month())},kr.week=kr.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},kr.isoWeek=kr.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},kr.weeksInYear=function(){var e=this.localeData()._week;return Ke(this.year(),e.dow,e.doy)},kr.isoWeeksInYear=function(){return Ke(this.year(),1,4)},kr.date=yr,kr.day=kr.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},kr.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},kr.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},kr.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},kr.hour=kr.hours=lt,kr.minute=kr.minutes=vr,kr.second=kr.seconds=br,kr.millisecond=kr.milliseconds=wr,kr.utcOffset=function(e,t,r){var n,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(se,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(n=qt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?er(this,Xt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:qt(this)},kr.utc=function(e){return this.utcOffset(0,e)},kr.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qt(this),"m")),this},kr.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},kr.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},kr.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},kr.isLocal=function(){return!!this.isValid()&&!this._isUTC},kr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},kr.isUtc=Gt,kr.isUTC=Gt,kr.zoneAbbr=function(){return this._isUTC?"UTC":""},kr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},kr.dates=S("dates accessor is deprecated. Use date instead.",yr),kr.months=S("months accessor is deprecated. Use month instead",Be),kr.years=S("years accessor is deprecated. Use year instead",Ae),kr.zone=S("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()})),kr.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=Pt(e))._a){var t=e._isUTC?h(e._a):Ot(e._a);this._isDSTShifted=this.isValid()&&M(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var Tr=P.prototype;function Sr(e,t,r,n){var a=gt(),i=h().set(n,t);return a[r](i,e)}function Cr(e,t,r){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Sr(e,t,r,"month");var n,a=[];for(n=0;n<12;n++)a[n]=Sr(e,n,r,"month");return a}function Lr(e,t,r,n){"boolean"==typeof e?(l(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,l(t)&&(r=t,t=void 0),t=t||"");var a,i=gt(),o=e?i._week.dow:0;if(null!=r)return Sr(t,(r+o)%7,n,"day");var s=[];for(a=0;a<7;a++)s[a]=Sr(t,(a+o)%7,n,"day");return s}Tr.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return E(n)?n.call(t,r):n},Tr.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},Tr.invalidDate=function(){return this._invalidDate},Tr.ordinal=function(e){return this._ordinal.replace("%d",e)},Tr.preparse=Mr,Tr.postformat=Mr,Tr.relativeTime=function(e,t,r,n){var a=this._relativeTime[r];return E(a)?a(e,t,r,n):a.replace(/%d/i,e)},Tr.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return E(r)?r(t):r.replace(/%s/i,t)},Tr.set=function(e){var t,r;for(r in e)E(t=e[r])?this[r]=t:this["_"+r]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Tr.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Tr.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Tr.monthsParse=function(e,t,r){var n,a,i;if(this._monthsParseExact)return ze.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=h([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},Tr.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ye),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Tr.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=je),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Tr.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},Tr.firstDayOfYear=function(){return this._week.doy},Tr.firstDayOfWeek=function(){return this._week.dow},Tr.weekdays=function(e,t){var r=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ze(r,this._week.dow):e?r[e.day()]:r},Tr.weekdaysMin=function(e){return!0===e?Ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Tr.weekdaysShort=function(e){return!0===e?Ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Tr.weekdaysParse=function(e,t,r){var n,a,i;if(this._weekdaysParseExact)return Qe.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=h([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}},Tr.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Tr.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Tr.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=rt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Tr.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Tr.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},ft("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=S("moment.lang is deprecated. Use moment.locale instead.",ft),a.langData=S("moment.langData is deprecated. Use moment.localeData instead.",gt);var Ar=Math.abs;function Er(e,t,r,n){var a=Xt(t,r);return e._milliseconds+=n*a._milliseconds,e._days+=n*a._days,e._months+=n*a._months,e._bubble()}function Dr(e){return e<0?Math.floor(e):Math.ceil(e)}function Pr(e){return 4800*e/146097}function Ir(e){return 146097*e/4800}function Or(e){return function(){return this.as(e)}}var Fr=Or("ms"),Rr=Or("s"),zr=Or("m"),Nr=Or("h"),Br=Or("d"),jr=Or("w"),Yr=Or("M"),Hr=Or("Q"),Vr=Or("y");function Ur(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wr=Ur("milliseconds"),qr=Ur("seconds"),Gr=Ur("minutes"),Kr=Ur("hours"),Zr=Ur("days"),Xr=Ur("months"),Jr=Ur("years"),$r=Math.round,Qr={ss:44,s:45,m:45,h:22,d:26,M:11};function en(e,t,r,n,a){return a.relativeTime(t||1,!!r,e,n)}var tn=Math.abs;function rn(e){return(e>0)-(e<0)||+e}function nn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r=tn(this._milliseconds)/1e3,n=tn(this._days),a=tn(this._months);e=w(r/60),t=w(e/60),r%=60,e%=60;var i=w(a/12),o=a%=12,s=n,l=t,u=e,c=r?r.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",h=rn(this._months)!==rn(d)?"-":"",f=rn(this._days)!==rn(d)?"-":"",m=rn(this._milliseconds)!==rn(d)?"-":"";return p+"P"+(i?h+i+"Y":"")+(o?h+o+"M":"")+(s?f+s+"D":"")+(l||u||c?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(c?m+c+"S":"")}var an=Bt.prototype;return an.isValid=function(){return this._isValid},an.abs=function(){var e=this._data;return this._milliseconds=Ar(this._milliseconds),this._days=Ar(this._days),this._months=Ar(this._months),e.milliseconds=Ar(e.milliseconds),e.seconds=Ar(e.seconds),e.minutes=Ar(e.minutes),e.hours=Ar(e.hours),e.months=Ar(e.months),e.years=Ar(e.years),this},an.add=function(e,t){return Er(this,e,t,1)},an.subtract=function(e,t){return Er(this,e,t,-1)},an.as=function(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=F(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Pr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Ir(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},an.asMilliseconds=Fr,an.asSeconds=Rr,an.asMinutes=zr,an.asHours=Nr,an.asDays=Br,an.asWeeks=jr,an.asMonths=Yr,an.asQuarters=Hr,an.asYears=Vr,an.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},an._bubble=function(){var e,t,r,n,a,i=this._milliseconds,o=this._days,s=this._months,l=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*Dr(Ir(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=w(i/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,r=w(t/60),l.hours=r%24,o+=w(r/24),a=w(Pr(o)),s+=a,o-=Dr(Ir(a)),n=w(s/12),s%=12,l.days=o,l.months=s,l.years=n,this},an.clone=function(){return Xt(this)},an.get=function(e){return e=F(e),this.isValid()?this[e+"s"]():NaN},an.milliseconds=Wr,an.seconds=qr,an.minutes=Gr,an.hours=Kr,an.days=Zr,an.weeks=function(){return w(this.days()/7)},an.months=Xr,an.years=Jr,an.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),r=function(e,t,r){var n=Xt(e).abs(),a=$r(n.as("s")),i=$r(n.as("m")),o=$r(n.as("h")),s=$r(n.as("d")),l=$r(n.as("M")),u=$r(n.as("y")),c=a<=Qr.ss&&["s",a]||a0,c[4]=r,en.apply(null,c)}(this,!e,t);return e&&(r=t.pastFuture(+this,r)),t.postformat(r)},an.toISOString=nn,an.toString=nn,an.toJSON=nn,an.locale=ar,an.localeData=or,an.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nn),an.lang=ir,U("X",0,0,"unix"),U("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e,10))})),fe("x",(function(e,t,r){r._d=new Date(k(e))})),a.version="2.24.0",t=Ot,a.fn=kr,a.min=function(){return zt("isBefore",[].slice.call(arguments,0))},a.max=function(){return zt("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=h,a.unix=function(e){return Ot(1e3*e)},a.months=function(e,t){return Cr(e,t,"months")},a.isDate=u,a.locale=ft,a.invalid=g,a.duration=Xt,a.isMoment=x,a.weekdays=function(e,t,r){return Lr(e,t,r,"weekdays")},a.parseZone=function(){return Ot.apply(null,arguments).parseZone()},a.localeData=gt,a.isDuration=jt,a.monthsShort=function(e,t){return Cr(e,t,"monthsShort")},a.weekdaysMin=function(e,t,r){return Lr(e,t,r,"weekdaysMin")},a.defineLocale=mt,a.updateLocale=function(e,t){if(null!=t){var r,n,a=ut;null!=(n=ht(e))&&(a=n._config),t=D(a,t),(r=new P(t)).parentLocale=ct[e],ct[e]=r,ft(e)}else null!=ct[e]&&(null!=ct[e].parentLocale?ct[e]=ct[e].parentLocale:null!=ct[e]&&delete ct[e]);return ct[e]},a.locales=function(){return C(ct)},a.weekdaysShort=function(e,t,r){return Lr(e,t,r,"weekdaysShort")},a.normalizeUnits=F,a.relativeTimeRounding=function(e){return void 0===e?$r:"function"==typeof e&&($r=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Qr[e]&&(void 0===t?Qr[e]:(Qr[e]=t,"s"===e&&(Qr.ss=t-1),!0))},a.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},a.prototype=kr,a.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"},a}()}).call(this,r(32)(e))},function(e,t,r){(function(e,n){var a; /** * @license * Lodash * 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 i,o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",p=1,h=2,f=4,m=1,g=2,y=1,v=2,_=4,b=8,x=16,w=32,k=64,M=128,T=256,S=512,C=30,L="...",A=800,E=16,D=1,P=2,I=1/0,O=9007199254740991,F=17976931348623157e292,R=NaN,z=4294967295,N=z-1,B=z>>>1,j=[["ary",M],["bind",y],["bindKey",v],["curry",b],["curryRight",x],["flip",S],["partial",w],["partialRight",k],["rearg",T]],Y="[object Arguments]",H="[object Array]",V="[object AsyncFunction]",U="[object Boolean]",W="[object Date]",q="[object DOMException]",G="[object Error]",K="[object Function]",Z="[object GeneratorFunction]",X="[object Map]",J="[object Number]",$="[object Null]",Q="[object Object]",ee="[object Proxy]",te="[object RegExp]",re="[object Set]",ne="[object String]",ae="[object Symbol]",ie="[object Undefined]",oe="[object WeakMap]",se="[object WeakSet]",le="[object ArrayBuffer]",ue="[object DataView]",ce="[object Float32Array]",de="[object Float64Array]",pe="[object Int8Array]",he="[object Int16Array]",fe="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",ye="[object Uint16Array]",ve="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,we=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Me=RegExp(we.source),Te=RegExp(ke.source),Se=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,Le=/<%=([\s\S]+?)%>/g,Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/,De=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pe=/[\\^$.*+?()[\]{}|]/g,Ie=RegExp(Pe.source),Oe=/^\s+|\s+$/g,Fe=/^\s+/,Re=/\s+$/,ze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,Be=/,? & /,je=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ye=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ve=/\w*$/,Ue=/^[-+]0x[0-9a-f]+$/i,We=/^0b[01]+$/i,qe=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,Ke=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,$e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Qe="\\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",et="[\\ud800-\\udfff]",tt="["+Qe+"]",rt="["+$e+"]",nt="\\d+",at="[\\u2700-\\u27bf]",it="[a-z\\xdf-\\xf6\\xf8-\\xff]",ot="[^\\ud800-\\udfff"+Qe+nt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",st="\\ud83c[\\udffb-\\udfff]",lt="[^\\ud800-\\udfff]",ut="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",dt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pt="(?:"+it+"|"+ot+")",ht="(?:"+dt+"|"+ot+")",ft="(?:"+rt+"|"+st+")"+"?",mt="[\\ufe0e\\ufe0f]?"+ft+("(?:\\u200d(?:"+[lt,ut,ct].join("|")+")[\\ufe0e\\ufe0f]?"+ft+")*"),gt="(?:"+[at,ut,ct].join("|")+")"+mt,yt="(?:"+[lt+rt+"?",rt,ut,ct,et].join("|")+")",vt=RegExp("['’]","g"),_t=RegExp(rt,"g"),bt=RegExp(st+"(?="+st+")|"+yt+mt,"g"),xt=RegExp([dt+"?"+it+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,dt,"$"].join("|")+")",ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,dt+pt,"$"].join("|")+")",dt+"?"+pt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",dt+"+(?:['’](?: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_])",nt,gt].join("|"),"g"),wt=RegExp("[\\u200d\\ud800-\\udfff"+$e+"\\ufe0e\\ufe0f]"),kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mt=["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"],Tt=-1,St={};St[ce]=St[de]=St[pe]=St[he]=St[fe]=St[me]=St[ge]=St[ye]=St[ve]=!0,St[Y]=St[H]=St[le]=St[U]=St[ue]=St[W]=St[G]=St[K]=St[X]=St[J]=St[Q]=St[te]=St[re]=St[ne]=St[oe]=!1;var Ct={};Ct[Y]=Ct[H]=Ct[le]=Ct[ue]=Ct[U]=Ct[W]=Ct[ce]=Ct[de]=Ct[pe]=Ct[he]=Ct[fe]=Ct[X]=Ct[J]=Ct[Q]=Ct[te]=Ct[re]=Ct[ne]=Ct[ae]=Ct[me]=Ct[ge]=Ct[ye]=Ct[ve]=!0,Ct[G]=Ct[K]=Ct[oe]=!1;var Lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},At=parseFloat,Et=parseInt,Dt="object"==typeof e&&e&&e.Object===Object&&e,Pt="object"==typeof self&&self&&self.Object===Object&&self,It=Dt||Pt||Function("return this")(),Ot=t&&!t.nodeType&&t,Ft=Ot&&"object"==typeof n&&n&&!n.nodeType&&n,Rt=Ft&&Ft.exports===Ot,zt=Rt&&Dt.process,Nt=function(){try{var e=Ft&&Ft.require&&Ft.require("util").types;return e||zt&&zt.binding&&zt.binding("util")}catch(e){}}(),Bt=Nt&&Nt.isArrayBuffer,jt=Nt&&Nt.isDate,Yt=Nt&&Nt.isMap,Ht=Nt&&Nt.isRegExp,Vt=Nt&&Nt.isSet,Ut=Nt&&Nt.isTypedArray;function Wt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function qt(e,t,r,n){for(var a=-1,i=null==e?0:e.length;++a-1}function $t(e,t,r){for(var n=-1,a=null==e?0:e.length;++n-1;);return r}function br(e,t){for(var r=e.length;r--&&sr(t,e[r],0)>-1;);return r}var xr=pr({"À":"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"}),wr=pr({"&":"&","<":"<",">":">",'"':""","'":"'"});function kr(e){return"\\"+Lt[e]}function Mr(e){return wt.test(e)}function Tr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function Sr(e,t){return function(r){return e(t(r))}}function Cr(e,t){for(var r=-1,n=e.length,a=0,i=[];++r",""":'"',"'":"'"});var Ir=function e(t){var r,n=(t=null==t?It:Ir.defaults(It.Object(),t,Ir.pick(It,Mt))).Array,a=t.Date,$e=t.Error,Qe=t.Function,et=t.Math,tt=t.Object,rt=t.RegExp,nt=t.String,at=t.TypeError,it=n.prototype,ot=Qe.prototype,st=tt.prototype,lt=t["__core-js_shared__"],ut=ot.toString,ct=st.hasOwnProperty,dt=0,pt=(r=/[^.]+$/.exec(lt&<.keys&<.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ht=st.toString,ft=ut.call(tt),mt=It._,gt=rt("^"+ut.call(ct).replace(Pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=Rt?t.Buffer:i,bt=t.Symbol,wt=t.Uint8Array,Lt=yt?yt.allocUnsafe:i,Dt=Sr(tt.getPrototypeOf,tt),Pt=tt.create,Ot=st.propertyIsEnumerable,Ft=it.splice,zt=bt?bt.isConcatSpreadable:i,Nt=bt?bt.iterator:i,ar=bt?bt.toStringTag:i,pr=function(){try{var e=Ni(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),Or=t.clearTimeout!==It.clearTimeout&&t.clearTimeout,Fr=a&&a.now!==It.Date.now&&a.now,Rr=t.setTimeout!==It.setTimeout&&t.setTimeout,zr=et.ceil,Nr=et.floor,Br=tt.getOwnPropertySymbols,jr=yt?yt.isBuffer:i,Yr=t.isFinite,Hr=it.join,Vr=Sr(tt.keys,tt),Ur=et.max,Wr=et.min,qr=a.now,Gr=t.parseInt,Kr=et.random,Zr=it.reverse,Xr=Ni(t,"DataView"),Jr=Ni(t,"Map"),$r=Ni(t,"Promise"),Qr=Ni(t,"Set"),en=Ni(t,"WeakMap"),tn=Ni(tt,"create"),rn=en&&new en,nn={},an=co(Xr),on=co(Jr),sn=co($r),ln=co(Qr),un=co(en),cn=bt?bt.prototype:i,dn=cn?cn.valueOf:i,pn=cn?cn.toString:i;function hn(e){if(Ls(e)&&!ys(e)&&!(e instanceof yn)){if(e instanceof gn)return e;if(ct.call(e,"__wrapped__"))return po(e)}return new gn(e)}var fn=function(){function e(){}return function(t){if(!Cs(t))return{};if(Pt)return Pt(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function mn(){}function gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function yn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=z,this.__views__=[]}function vn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Fn(e,t,r,n,a,o){var s,l=t&p,u=t&h,c=t&f;if(r&&(s=a?r(e,n,a,o):r(e)),s!==i)return s;if(!Cs(e))return e;var d=ys(e);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&ct.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!l)return ri(e,s)}else{var m=Yi(e),g=m==K||m==Z;if(xs(e))return Xa(e,l);if(m==Q||m==Y||g&&!a){if(s=u||g?{}:Vi(e),!l)return u?function(e,t){return ni(e,ji(e),t)}(e,function(e,t){return e&&ni(t,il(t),e)}(s,e)):function(e,t){return ni(e,Bi(e),t)}(e,Dn(s,e))}else{if(!Ct[m])return a?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case le:return Ja(e);case U:case W:return new n(+e);case ue:return function(e,t){var r=t?Ja(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case ce:case de:case pe:case he:case fe:case me:case ge:case ye:case ve:return $a(e,r);case X:return new n;case J:case ne:return new n(e);case te:return function(e){var t=new e.constructor(e.source,Ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case re:return new n;case ae:return a=e,dn?tt(dn.call(a)):{}}var a}(e,m,l)}}o||(o=new wn);var y=o.get(e);if(y)return y;o.set(e,s),Is(e)?e.forEach((function(n){s.add(Fn(n,t,r,n,e,o))})):As(e)&&e.forEach((function(n,a){s.set(a,Fn(n,t,r,a,e,o))}));var v=d?i:(c?u?Di:Ei:u?il:al)(e);return Gt(v||e,(function(n,a){v&&(n=e[a=n]),Ln(s,a,Fn(n,t,r,a,e,o))})),s}function Rn(e,t,r){var n=r.length;if(null==e)return!n;for(e=tt(e);n--;){var a=r[n],o=t[a],s=e[a];if(s===i&&!(a in e)||!o(s))return!1}return!0}function zn(e,t,r){if("function"!=typeof e)throw new at(l);return no((function(){e.apply(i,r)}),t)}function Nn(e,t,r,n){var a=-1,i=Jt,s=!0,l=e.length,u=[],c=t.length;if(!l)return u;r&&(t=Qt(t,gr(r))),n?(i=$t,s=!1):t.length>=o&&(i=vr,s=!1,t=new xn(t));e:for(;++a-1},_n.prototype.set=function(e,t){var r=this.__data__,n=An(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},bn.prototype.clear=function(){this.size=0,this.__data__={hash:new vn,map:new(Jr||_n),string:new vn}},bn.prototype.delete=function(e){var t=Ri(this,e).delete(e);return this.size-=t?1:0,t},bn.prototype.get=function(e){return Ri(this,e).get(e)},bn.prototype.has=function(e){return Ri(this,e).has(e)},bn.prototype.set=function(e,t){var r=Ri(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},xn.prototype.add=xn.prototype.push=function(e){return this.__data__.set(e,u),this},xn.prototype.has=function(e){return this.__data__.has(e)},wn.prototype.clear=function(){this.__data__=new _n,this.size=0},wn.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},wn.prototype.get=function(e){return this.__data__.get(e)},wn.prototype.has=function(e){return this.__data__.has(e)},wn.prototype.set=function(e,t){var r=this.__data__;if(r instanceof _n){var n=r.__data__;if(!Jr||n.length0&&r(s)?t>1?Un(s,t-1,r,n,a):er(a,s):n||(a[a.length]=s)}return a}var Wn=si(),qn=si(!0);function Gn(e,t){return e&&Wn(e,t,al)}function Kn(e,t){return e&&qn(e,t,al)}function Zn(e,t){return Xt(t,(function(t){return Ms(e[t])}))}function Xn(e,t){for(var r=0,n=(t=qa(t,e)).length;null!=e&&rt}function ea(e,t){return null!=e&&ct.call(e,t)}function ta(e,t){return null!=e&&t in tt(e)}function ra(e,t,r){for(var a=r?$t:Jt,o=e[0].length,s=e.length,l=s,u=n(s),c=1/0,d=[];l--;){var p=e[l];l&&t&&(p=Qt(p,gr(t))),c=Wr(p.length,c),u[l]=!r&&(t||o>=120&&p.length>=120)?new xn(l&&p):i}p=e[0];var h=-1,f=u[0];e:for(;++h=s)return l;var u=r[n];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,r)}))}function va(e,t,r){for(var n=-1,a=t.length,i={};++n-1;)s!==e&&Ft.call(s,l,1),Ft.call(e,l,1);return e}function ba(e,t){for(var r=e?t.length:0,n=r-1;r--;){var a=t[r];if(r==n||a!==i){var i=a;Wi(a)?Ft.call(e,a,1):Na(e,a)}}return e}function xa(e,t){return e+Nr(Kr()*(t-e+1))}function wa(e,t){var r="";if(!e||t<1||t>O)return r;do{t%2&&(r+=e),(t=Nr(t/2))&&(e+=e)}while(t);return r}function ka(e,t){return ao(Qi(e,t,El),e+"")}function Ma(e){return Mn(hl(e))}function Ta(e,t){var r=hl(e);return so(r,On(t,0,r.length))}function Sa(e,t,r,n){if(!Cs(e))return e;for(var a=-1,o=(t=qa(t,e)).length,s=o-1,l=e;null!=l&&++ai?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=n(i);++a>>1,o=e[i];null!==o&&!Fs(o)&&(r?o<=t:o=o){var c=t?null:wi(e);if(c)return Lr(c);s=!1,a=vr,u=new xn}else u=t?[]:l;e:for(;++n=n?e:Ea(e,t,r)}var Za=Or||function(e){return It.clearTimeout(e)};function Xa(e,t){if(t)return e.slice();var r=e.length,n=Lt?Lt(r):new e.constructor(r);return e.copy(n),n}function Ja(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function $a(e,t){var r=t?Ja(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Qa(e,t){if(e!==t){var r=e!==i,n=null===e,a=e==e,o=Fs(e),s=t!==i,l=null===t,u=t==t,c=Fs(t);if(!l&&!c&&!o&&e>t||o&&s&&u&&!l&&!c||n&&s&&u||!r&&u||!a)return 1;if(!n&&!o&&!c&&e1?r[a-1]:i,s=a>2?r[2]:i;for(o=e.length>3&&"function"==typeof o?(a--,o):i,s&&qi(r[0],r[1],s)&&(o=a<3?i:o,a=1),t=tt(t);++n-1?a[o?t[s]:s]:i}}function pi(e){return Ai((function(t){var r=t.length,n=r,a=gn.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new at(l);if(a&&!s&&"wrapper"==Ii(o))var s=new gn([],!0)}for(n=s?n:r;++n1&&b.reverse(),p&&cl))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var d=-1,p=!0,h=r&g?new xn:i;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ze,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Gt(j,(function(r){var n="_."+r[0];t&r[1]&&!Jt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(Ne);return t?t[1].split(Be):[]}(n),r)))}function oo(e){var t=0,r=0;return function(){var n=qr(),a=E-(n-r);if(r=n,a>0){if(++t>=A)return arguments[0]}else t=0;return e.apply(i,arguments)}}function so(e,t){var r=-1,n=e.length,a=n-1;for(t=t===i?n:t;++r1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,Po(e,r)}));function Bo(e){var t=hn(e);return t.__chain__=!0,t}function jo(e,t){return t(e)}var Yo=Ai((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return In(t,e)};return!(t>1||this.__actions__.length)&&n instanceof yn&&Wi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:jo,args:[a],thisArg:i}),new gn(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(a)}));var Ho=ai((function(e,t,r){ct.call(e,r)?++e[r]:Pn(e,r,1)}));var Vo=di(go),Uo=di(yo);function Wo(e,t){return(ys(e)?Gt:Bn)(e,Fi(t,3))}function qo(e,t){return(ys(e)?Kt:jn)(e,Fi(t,3))}var Go=ai((function(e,t,r){ct.call(e,r)?e[r].push(t):Pn(e,r,[t])}));var Ko=ka((function(e,t,r){var a=-1,i="function"==typeof t,o=_s(e)?n(e.length):[];return Bn(e,(function(e){o[++a]=i?Wt(t,e,r):na(e,t,r)})),o})),Zo=ai((function(e,t,r){Pn(e,r,t)}));function Xo(e,t){return(ys(e)?Qt:pa)(e,Fi(t,3))}var Jo=ai((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var $o=ka((function(e,t){if(null==e)return[];var r=t.length;return r>1&&qi(e,t[0],t[1])?t=[]:r>2&&qi(t[0],t[1],t[2])&&(t=[t[0]]),ya(e,Un(t,1),[])})),Qo=Fr||function(){return It.Date.now()};function es(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Mi(e,M,i,i,i,i,t)}function ts(e,t){var r;if("function"!=typeof t)throw new at(l);return e=Ys(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var rs=ka((function(e,t,r){var n=y;if(r.length){var a=Cr(r,Oi(rs));n|=w}return Mi(e,n,t,r,a)})),ns=ka((function(e,t,r){var n=y|v;if(r.length){var a=Cr(r,Oi(ns));n|=w}return Mi(t,n,e,r,a)}));function as(e,t,r){var n,a,o,s,u,c,d=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new at(l);function m(t){var r=n,o=a;return n=a=i,d=t,s=e.apply(o,r)}function g(e){var r=e-c;return c===i||r>=t||r<0||h&&e-d>=o}function y(){var e=Qo();if(g(e))return v(e);u=no(y,function(e){var r=t-(e-c);return h?Wr(r,o-(e-d)):r}(e))}function v(e){return u=i,f&&n?m(e):(n=a=i,s)}function _(){var e=Qo(),r=g(e);if(n=arguments,a=this,c=e,r){if(u===i)return function(e){return d=e,u=no(y,t),p?m(e):s}(c);if(h)return Za(u),u=no(y,t),m(c)}return u===i&&(u=no(y,t)),s}return t=Vs(t)||0,Cs(r)&&(p=!!r.leading,o=(h="maxWait"in r)?Ur(Vs(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),_.cancel=function(){u!==i&&Za(u),d=0,n=c=a=u=i},_.flush=function(){return u===i?s:v(Qo())},_}var is=ka((function(e,t){return zn(e,1,t)})),os=ka((function(e,t,r){return zn(e,Vs(t)||0,r)}));function ss(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new at(l);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(ss.Cache||bn),r}function ls(e){if("function"!=typeof e)throw new at(l);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)}}ss.Cache=bn;var us=Ga((function(e,t){var r=(t=1==t.length&&ys(t[0])?Qt(t[0],gr(Fi())):Qt(Un(t,1),gr(Fi()))).length;return ka((function(n){for(var a=-1,i=Wr(n.length,r);++a=t})),gs=aa(function(){return arguments}())?aa:function(e){return Ls(e)&&ct.call(e,"callee")&&!Ot.call(e,"callee")},ys=n.isArray,vs=Bt?gr(Bt):function(e){return Ls(e)&&$n(e)==le};function _s(e){return null!=e&&Ss(e.length)&&!Ms(e)}function bs(e){return Ls(e)&&_s(e)}var xs=jr||Vl,ws=jt?gr(jt):function(e){return Ls(e)&&$n(e)==W};function ks(e){if(!Ls(e))return!1;var t=$n(e);return t==G||t==q||"string"==typeof e.message&&"string"==typeof e.name&&!Ds(e)}function Ms(e){if(!Cs(e))return!1;var t=$n(e);return t==K||t==Z||t==V||t==ee}function Ts(e){return"number"==typeof e&&e==Ys(e)}function Ss(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=O}function Cs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ls(e){return null!=e&&"object"==typeof e}var As=Yt?gr(Yt):function(e){return Ls(e)&&Yi(e)==X};function Es(e){return"number"==typeof e||Ls(e)&&$n(e)==J}function Ds(e){if(!Ls(e)||$n(e)!=Q)return!1;var t=Dt(e);if(null===t)return!0;var r=ct.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ut.call(r)==ft}var Ps=Ht?gr(Ht):function(e){return Ls(e)&&$n(e)==te};var Is=Vt?gr(Vt):function(e){return Ls(e)&&Yi(e)==re};function Os(e){return"string"==typeof e||!ys(e)&&Ls(e)&&$n(e)==ne}function Fs(e){return"symbol"==typeof e||Ls(e)&&$n(e)==ae}var Rs=Ut?gr(Ut):function(e){return Ls(e)&&Ss(e.length)&&!!St[$n(e)]};var zs=_i(da),Ns=_i((function(e,t){return e<=t}));function Bs(e){if(!e)return[];if(_s(e))return Os(e)?Dr(e):ri(e);if(Nt&&e[Nt])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Nt]());var t=Yi(e);return(t==X?Tr:t==re?Lr:hl)(e)}function js(e){return e?(e=Vs(e))===I||e===-I?(e<0?-1:1)*F:e==e?e:0:0===e?e:0}function Ys(e){var t=js(e),r=t%1;return t==t?r?t-r:t:0}function Hs(e){return e?On(Ys(e),0,z):0}function Vs(e){if("number"==typeof e)return e;if(Fs(e))return R;if(Cs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Cs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Oe,"");var r=We.test(e);return r||Ge.test(e)?Et(e.slice(2),r?2:8):Ue.test(e)?R:+e}function Us(e){return ni(e,il(e))}function Ws(e){return null==e?"":Ra(e)}var qs=ii((function(e,t){if(Xi(t)||_s(t))ni(t,al(t),e);else for(var r in t)ct.call(t,r)&&Ln(e,r,t[r])})),Gs=ii((function(e,t){ni(t,il(t),e)})),Ks=ii((function(e,t,r,n){ni(t,il(t),e,n)})),Zs=ii((function(e,t,r,n){ni(t,al(t),e,n)})),Xs=Ai(In);var Js=ka((function(e,t){e=tt(e);var r=-1,n=t.length,a=n>2?t[2]:i;for(a&&qi(t[0],t[1],a)&&(n=1);++r1),t})),ni(e,Di(e),r),n&&(r=Fn(r,p|h|f,Ci));for(var a=t.length;a--;)Na(r,t[a]);return r}));var ul=Ai((function(e,t){return null==e?{}:function(e,t){return va(e,t,(function(t,r){return el(e,r)}))}(e,t)}));function cl(e,t){if(null==e)return{};var r=Qt(Di(e),(function(e){return[e]}));return t=Fi(t),va(e,r,(function(e,r){return t(e,r[0])}))}var dl=ki(al),pl=ki(il);function hl(e){return null==e?[]:yr(e,al(e))}var fl=ui((function(e,t,r){return t=t.toLowerCase(),e+(r?ml(t):t)}));function ml(e){return kl(Ws(e).toLowerCase())}function gl(e){return(e=Ws(e))&&e.replace(Ze,xr).replace(_t,"")}var yl=ui((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),vl=ui((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),_l=li("toLowerCase");var bl=ui((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var xl=ui((function(e,t,r){return e+(r?" ":"")+kl(t)}));var wl=ui((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),kl=li("toUpperCase");function Ml(e,t,r){return e=Ws(e),(t=r?i:t)===i?function(e){return kt.test(e)}(e)?function(e){return e.match(xt)||[]}(e):function(e){return e.match(je)||[]}(e):e.match(t)||[]}var Tl=ka((function(e,t){try{return Wt(e,i,t)}catch(e){return ks(e)?e:new $e(e)}})),Sl=Ai((function(e,t){return Gt(t,(function(t){t=uo(t),Pn(e,t,rs(e[t],e))})),e}));function Cl(e){return function(){return e}}var Ll=pi(),Al=pi(!0);function El(e){return e}function Dl(e){return la("function"==typeof e?e:Fn(e,p))}var Pl=ka((function(e,t){return function(r){return na(r,e,t)}})),Il=ka((function(e,t){return function(r){return na(e,r,t)}}));function Ol(e,t,r){var n=al(t),a=Zn(t,n);null!=r||Cs(t)&&(a.length||!n.length)||(r=t,t=e,e=this,a=Zn(t,al(t)));var i=!(Cs(r)&&"chain"in r&&!r.chain),o=Ms(e);return Gt(a,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__),a=r.__actions__=ri(this.__actions__);return a.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,er([this.value()],arguments))})})),e}function Fl(){}var Rl=gi(Qt),zl=gi(Zt),Nl=gi(nr);function Bl(e){return Gi(e)?dr(uo(e)):function(e){return function(t){return Xn(t,e)}}(e)}var jl=vi(),Yl=vi(!0);function Hl(){return[]}function Vl(){return!1}var Ul=mi((function(e,t){return e+t}),0),Wl=xi("ceil"),ql=mi((function(e,t){return e/t}),1),Gl=xi("floor");var Kl,Zl=mi((function(e,t){return e*t}),1),Xl=xi("round"),Jl=mi((function(e,t){return e-t}),0);return hn.after=function(e,t){if("function"!=typeof t)throw new at(l);return e=Ys(e),function(){if(--e<1)return t.apply(this,arguments)}},hn.ary=es,hn.assign=qs,hn.assignIn=Gs,hn.assignInWith=Ks,hn.assignWith=Zs,hn.at=Xs,hn.before=ts,hn.bind=rs,hn.bindAll=Sl,hn.bindKey=ns,hn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ys(e)?e:[e]},hn.chain=Bo,hn.chunk=function(e,t,r){t=(r?qi(e,t,r):t===i)?1:Ur(Ys(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var o=0,s=0,l=n(zr(a/t));oa?0:a+r),(n=n===i||n>a?a:Ys(n))<0&&(n+=a),n=r>n?0:Hs(n);r>>0)?(e=Ws(e))&&("string"==typeof t||null!=t&&!Ps(t))&&!(t=Ra(t))&&Mr(e)?Ka(Dr(e),0,r):e.split(t,r):[]},hn.spread=function(e,t){if("function"!=typeof e)throw new at(l);return t=null==t?0:Ur(Ys(t),0),ka((function(r){var n=r[t],a=Ka(r,0,t);return n&&er(a,n),Wt(e,this,a)}))},hn.tail=function(e){var t=null==e?0:e.length;return t?Ea(e,1,t):[]},hn.take=function(e,t,r){return e&&e.length?Ea(e,0,(t=r||t===i?1:Ys(t))<0?0:t):[]},hn.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Ea(e,(t=n-(t=r||t===i?1:Ys(t)))<0?0:t,n):[]},hn.takeRightWhile=function(e,t){return e&&e.length?ja(e,Fi(t,3),!1,!0):[]},hn.takeWhile=function(e,t){return e&&e.length?ja(e,Fi(t,3)):[]},hn.tap=function(e,t){return t(e),e},hn.throttle=function(e,t,r){var n=!0,a=!0;if("function"!=typeof e)throw new at(l);return Cs(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),as(e,t,{leading:n,maxWait:t,trailing:a})},hn.thru=jo,hn.toArray=Bs,hn.toPairs=dl,hn.toPairsIn=pl,hn.toPath=function(e){return ys(e)?Qt(e,uo):Fs(e)?[e]:ri(lo(Ws(e)))},hn.toPlainObject=Us,hn.transform=function(e,t,r){var n=ys(e),a=n||xs(e)||Rs(e);if(t=Fi(t,4),null==r){var i=e&&e.constructor;r=a?n?new i:[]:Cs(e)&&Ms(i)?fn(Dt(e)):{}}return(a?Gt:Gn)(e,(function(e,n,a){return t(r,e,n,a)})),r},hn.unary=function(e){return es(e,1)},hn.union=Lo,hn.unionBy=Ao,hn.unionWith=Eo,hn.uniq=function(e){return e&&e.length?za(e):[]},hn.uniqBy=function(e,t){return e&&e.length?za(e,Fi(t,2)):[]},hn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?za(e,i,t):[]},hn.unset=function(e,t){return null==e||Na(e,t)},hn.unzip=Do,hn.unzipWith=Po,hn.update=function(e,t,r){return null==e?e:Ba(e,t,Wa(r))},hn.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Ba(e,t,Wa(r),n)},hn.values=hl,hn.valuesIn=function(e){return null==e?[]:yr(e,il(e))},hn.without=Io,hn.words=Ml,hn.wrap=function(e,t){return cs(Wa(t),e)},hn.xor=Oo,hn.xorBy=Fo,hn.xorWith=Ro,hn.zip=zo,hn.zipObject=function(e,t){return Va(e||[],t||[],Ln)},hn.zipObjectDeep=function(e,t){return Va(e||[],t||[],Sa)},hn.zipWith=No,hn.entries=dl,hn.entriesIn=pl,hn.extend=Gs,hn.extendWith=Ks,Ol(hn,hn),hn.add=Ul,hn.attempt=Tl,hn.camelCase=fl,hn.capitalize=ml,hn.ceil=Wl,hn.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=Vs(r))==r?r:0),t!==i&&(t=(t=Vs(t))==t?t:0),On(Vs(e),t,r)},hn.clone=function(e){return Fn(e,f)},hn.cloneDeep=function(e){return Fn(e,p|f)},hn.cloneDeepWith=function(e,t){return Fn(e,p|f,t="function"==typeof t?t:i)},hn.cloneWith=function(e,t){return Fn(e,f,t="function"==typeof t?t:i)},hn.conformsTo=function(e,t){return null==t||Rn(e,t,al(t))},hn.deburr=gl,hn.defaultTo=function(e,t){return null==e||e!=e?t:e},hn.divide=ql,hn.endsWith=function(e,t,r){e=Ws(e),t=Ra(t);var n=e.length,a=r=r===i?n:On(Ys(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},hn.eq=hs,hn.escape=function(e){return(e=Ws(e))&&Te.test(e)?e.replace(ke,wr):e},hn.escapeRegExp=function(e){return(e=Ws(e))&&Ie.test(e)?e.replace(Pe,"\\$&"):e},hn.every=function(e,t,r){var n=ys(e)?Zt:Yn;return r&&qi(e,t,r)&&(t=i),n(e,Fi(t,3))},hn.find=Vo,hn.findIndex=go,hn.findKey=function(e,t){return ir(e,Fi(t,3),Gn)},hn.findLast=Uo,hn.findLastIndex=yo,hn.findLastKey=function(e,t){return ir(e,Fi(t,3),Kn)},hn.floor=Gl,hn.forEach=Wo,hn.forEachRight=qo,hn.forIn=function(e,t){return null==e?e:Wn(e,Fi(t,3),il)},hn.forInRight=function(e,t){return null==e?e:qn(e,Fi(t,3),il)},hn.forOwn=function(e,t){return e&&Gn(e,Fi(t,3))},hn.forOwnRight=function(e,t){return e&&Kn(e,Fi(t,3))},hn.get=Qs,hn.gt=fs,hn.gte=ms,hn.has=function(e,t){return null!=e&&Hi(e,t,ea)},hn.hasIn=el,hn.head=_o,hn.identity=El,hn.includes=function(e,t,r,n){e=_s(e)?e:hl(e),r=r&&!n?Ys(r):0;var a=e.length;return r<0&&(r=Ur(a+r,0)),Os(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&sr(e,t,r)>-1},hn.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Ys(r);return a<0&&(a=Ur(n+a,0)),sr(e,t,a)},hn.inRange=function(e,t,r){return t=js(t),r===i?(r=t,t=0):r=js(r),function(e,t,r){return e>=Wr(t,r)&&e=-O&&e<=O},hn.isSet=Is,hn.isString=Os,hn.isSymbol=Fs,hn.isTypedArray=Rs,hn.isUndefined=function(e){return e===i},hn.isWeakMap=function(e){return Ls(e)&&Yi(e)==oe},hn.isWeakSet=function(e){return Ls(e)&&$n(e)==se},hn.join=function(e,t){return null==e?"":Hr.call(e,t)},hn.kebabCase=yl,hn.last=ko,hn.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==i&&(a=(a=Ys(r))<0?Ur(n+a,0):Wr(a,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,a):or(e,ur,a,!0)},hn.lowerCase=vl,hn.lowerFirst=_l,hn.lt=zs,hn.lte=Ns,hn.max=function(e){return e&&e.length?Hn(e,El,Qn):i},hn.maxBy=function(e,t){return e&&e.length?Hn(e,Fi(t,2),Qn):i},hn.mean=function(e){return cr(e,El)},hn.meanBy=function(e,t){return cr(e,Fi(t,2))},hn.min=function(e){return e&&e.length?Hn(e,El,da):i},hn.minBy=function(e,t){return e&&e.length?Hn(e,Fi(t,2),da):i},hn.stubArray=Hl,hn.stubFalse=Vl,hn.stubObject=function(){return{}},hn.stubString=function(){return""},hn.stubTrue=function(){return!0},hn.multiply=Zl,hn.nth=function(e,t){return e&&e.length?ga(e,Ys(t)):i},hn.noConflict=function(){return It._===this&&(It._=mt),this},hn.noop=Fl,hn.now=Qo,hn.pad=function(e,t,r){e=Ws(e);var n=(t=Ys(t))?Er(e):0;if(!t||n>=t)return e;var a=(t-n)/2;return yi(Nr(a),r)+e+yi(zr(a),r)},hn.padEnd=function(e,t,r){e=Ws(e);var n=(t=Ys(t))?Er(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var a=Kr();return Wr(e+a*(t-e+At("1e-"+((a+"").length-1))),t)}return xa(e,t)},hn.reduce=function(e,t,r){var n=ys(e)?tr:hr,a=arguments.length<3;return n(e,Fi(t,4),r,a,Bn)},hn.reduceRight=function(e,t,r){var n=ys(e)?rr:hr,a=arguments.length<3;return n(e,Fi(t,4),r,a,jn)},hn.repeat=function(e,t,r){return t=(r?qi(e,t,r):t===i)?1:Ys(t),wa(Ws(e),t)},hn.replace=function(){var e=arguments,t=Ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},hn.result=function(e,t,r){var n=-1,a=(t=qa(t,e)).length;for(a||(a=1,e=i);++nO)return[];var r=z,n=Wr(e,z);t=Fi(t),e-=z;for(var a=mr(n,t);++r=o)return e;var l=r-Er(n);if(l<1)return n;var u=s?Ka(s,0,l).join(""):e.slice(0,l);if(a===i)return u+n;if(s&&(l+=u.length-l),Ps(a)){if(e.slice(l).search(a)){var c,d=u;for(a.global||(a=rt(a.source,Ws(Ve.exec(a))+"g")),a.lastIndex=0;c=a.exec(d);)var p=c.index;u=u.slice(0,p===i?l:p)}}else if(e.indexOf(Ra(a),l)!=l){var h=u.lastIndexOf(a);h>-1&&(u=u.slice(0,h))}return u+n},hn.unescape=function(e){return(e=Ws(e))&&Me.test(e)?e.replace(we,Pr):e},hn.uniqueId=function(e){var t=++dt;return Ws(e)+t},hn.upperCase=wl,hn.upperFirst=kl,hn.each=Wo,hn.eachRight=qo,hn.first=_o,Ol(hn,(Kl={},Gn(hn,(function(e,t){ct.call(hn.prototype,t)||(Kl[t]=e)})),Kl),{chain:!1}),hn.VERSION="4.17.15",Gt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){hn[e].placeholder=hn})),Gt(["drop","take"],(function(e,t){yn.prototype[e]=function(r){r=r===i?1:Ur(Ys(r),0);var n=this.__filtered__&&!t?new yn(this):this.clone();return n.__filtered__?n.__takeCount__=Wr(r,n.__takeCount__):n.__views__.push({size:Wr(r,z),type:e+(n.__dir__<0?"Right":"")}),n},yn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Gt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=r==D||3==r;yn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Fi(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Gt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");yn.prototype[e]=function(){return this[r](1).value()[0]}})),Gt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");yn.prototype[e]=function(){return this.__filtered__?new yn(this):this[r](1)}})),yn.prototype.compact=function(){return this.filter(El)},yn.prototype.find=function(e){return this.filter(e).head()},yn.prototype.findLast=function(e){return this.reverse().find(e)},yn.prototype.invokeMap=ka((function(e,t){return"function"==typeof e?new yn(this):this.map((function(r){return na(r,e,t)}))})),yn.prototype.reject=function(e){return this.filter(ls(Fi(e)))},yn.prototype.slice=function(e,t){e=Ys(e);var r=this;return r.__filtered__&&(e>0||t<0)?new yn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=Ys(t))<0?r.dropRight(-t):r.take(t-e)),r)},yn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},yn.prototype.toArray=function(){return this.take(z)},Gn(yn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=hn[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);a&&(hn.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof yn,u=s[0],c=l||ys(t),d=function(e){var t=a.apply(hn,er([e],s));return n&&p?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var p=this.__chain__,h=!!this.__actions__.length,f=o&&!p,m=l&&!h;if(!o&&c){t=m?t:new yn(this);var g=e.apply(t,s);return g.__actions__.push({func:jo,args:[d],thisArg:i}),new gn(g,p)}return f&&m?e.apply(this,s):(g=this.thru(d),f?n?g.value()[0]:g.value():g)})})),Gt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=it[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);hn.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return t.apply(ys(a)?a:[],e)}return this[r]((function(r){return t.apply(ys(r)?r:[],e)}))}})),Gn(yn.prototype,(function(e,t){var r=hn[t];if(r){var n=r.name+"";ct.call(nn,n)||(nn[n]=[]),nn[n].push({name:t,func:r})}})),nn[hi(i,v).name]=[{name:"wrapper",func:i}],yn.prototype.clone=function(){var e=new yn(this.__wrapped__);return e.__actions__=ri(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ri(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ri(this.__views__),e},yn.prototype.reverse=function(){if(this.__filtered__){var e=new yn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},yn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=ys(e),n=t<0,a=r?e.length:0,i=function(e,t,r){var n=-1,a=r.length;for(;++n=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},hn.prototype.plant=function(e){for(var t,r=this;r instanceof mn;){var n=po(r);n.__index__=0,n.__values__=i,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},hn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof yn){var t=e;return this.__actions__.length&&(t=new yn(this)),(t=t.reverse()).__actions__.push({func:jo,args:[Co],thisArg:i}),new gn(t,this.__chain__)}return this.thru(Co)},hn.prototype.toJSON=hn.prototype.valueOf=hn.prototype.value=function(){return Ya(this.__wrapped__,this.__actions__)},hn.prototype.first=hn.prototype.head,Nt&&(hn.prototype[Nt]=function(){return this}),hn}();It._=Ir,(a=function(){return Ir}.call(t,r,t,n))===i||(n.exports=a)}).call(this)}).call(this,r(28),r(32)(e))},,,,,,function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map((function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"}));return[r].concat(i).concat([a]).join("\n")}var o;return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},a=0;a=0&&d.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return r.nc}();n&&(e.attrs.nonce=n)}return v(t,e.attrs),m(e,t),t}function v(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function _(e,t){var r,n,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=c++;r=u||(u=y(t)),n=w.bind(null,r,o,!1),a=w.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),m(e,t),t}(t),n=M.bind(null,r,t),a=function(){g(r),r.href&&URL.revokeObjectURL(r.href)}):(r=y(t),n=k.bind(null,r),a=function(){g(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=f(e,t);return h(r,t),function(e){for(var n=[],a=0;a:not(.watermark)":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},{"../src/lib":716}],2:[function(e,t,r){"use strict";t.exports=e("../src/transforms/aggregate")},{"../src/transforms/aggregate":1294}],3:[function(e,t,r){"use strict";t.exports=e("../src/traces/bar")},{"../src/traces/bar":863}],4:[function(e,t,r){"use strict";t.exports=e("../src/traces/barpolar")},{"../src/traces/barpolar":875}],5:[function(e,t,r){"use strict";t.exports=e("../src/traces/box")},{"../src/traces/box":885}],6:[function(e,t,r){"use strict";t.exports=e("../src/components/calendars")},{"../src/components/calendars":589}],7:[function(e,t,r){"use strict";t.exports=e("../src/traces/candlestick")},{"../src/traces/candlestick":894}],8:[function(e,t,r){"use strict";t.exports=e("../src/traces/carpet")},{"../src/traces/carpet":913}],9:[function(e,t,r){"use strict";t.exports=e("../src/traces/choropleth")},{"../src/traces/choropleth":927}],10:[function(e,t,r){"use strict";t.exports=e("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":934}],11:[function(e,t,r){"use strict";t.exports=e("../src/traces/cone")},{"../src/traces/cone":940}],12:[function(e,t,r){"use strict";t.exports=e("../src/traces/contour")},{"../src/traces/contour":955}],13:[function(e,t,r){"use strict";t.exports=e("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":966}],14:[function(e,t,r){"use strict";t.exports=e("../src/core")},{"../src/core":694}],15:[function(e,t,r){"use strict";t.exports=e("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":974}],16:[function(e,t,r){"use strict";t.exports=e("../src/transforms/filter")},{"../src/transforms/filter":1295}],17:[function(e,t,r){"use strict";t.exports=e("../src/traces/funnel")},{"../src/traces/funnel":984}],18:[function(e,t,r){"use strict";t.exports=e("../src/traces/funnelarea")},{"../src/traces/funnelarea":993}],19:[function(e,t,r){"use strict";t.exports=e("../src/transforms/groupby")},{"../src/transforms/groupby":1296}],20:[function(e,t,r){"use strict";t.exports=e("../src/traces/heatmap")},{"../src/traces/heatmap":1006}],21:[function(e,t,r){"use strict";t.exports=e("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1015}],22:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram")},{"../src/traces/histogram":1027}],23:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram2d")},{"../src/traces/histogram2d":1033}],24:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1037}],25:[function(e,t,r){"use strict";t.exports=e("../src/traces/image")},{"../src/traces/image":1044}],26:[function(e,t,r){"use strict";var n=e("./core");n.register([e("./bar"),e("./box"),e("./heatmap"),e("./histogram"),e("./histogram2d"),e("./histogram2dcontour"),e("./contour"),e("./scatterternary"),e("./violin"),e("./funnel"),e("./waterfall"),e("./image"),e("./pie"),e("./sunburst"),e("./treemap"),e("./funnelarea"),e("./scatter3d"),e("./surface"),e("./isosurface"),e("./volume"),e("./mesh3d"),e("./cone"),e("./streamtube"),e("./scattergeo"),e("./choropleth"),e("./scattergl"),e("./splom"),e("./pointcloud"),e("./heatmapgl"),e("./parcoords"),e("./parcats"),e("./scattermapbox"),e("./choroplethmapbox"),e("./densitymapbox"),e("./sankey"),e("./indicator"),e("./table"),e("./carpet"),e("./scattercarpet"),e("./contourcarpet"),e("./ohlc"),e("./candlestick"),e("./scatterpolar"),e("./scatterpolargl"),e("./barpolar")]),n.register([e("./aggregate"),e("./filter"),e("./groupby"),e("./sort")]),n.register([e("./calendars")]),t.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./image":25,"./indicator":27,"./isosurface":28,"./mesh3d":29,"./ohlc":30,"./parcats":31,"./parcoords":32,"./pie":33,"./pointcloud":34,"./sankey":35,"./scatter3d":36,"./scattercarpet":37,"./scattergeo":38,"./scattergl":39,"./scattermapbox":40,"./scatterpolar":41,"./scatterpolargl":42,"./scatterternary":43,"./sort":44,"./splom":45,"./streamtube":46,"./sunburst":47,"./surface":48,"./table":49,"./treemap":50,"./violin":51,"./volume":52,"./waterfall":53}],27:[function(e,t,r){"use strict";t.exports=e("../src/traces/indicator")},{"../src/traces/indicator":1052}],28:[function(e,t,r){"use strict";t.exports=e("../src/traces/isosurface")},{"../src/traces/isosurface":1058}],29:[function(e,t,r){"use strict";t.exports=e("../src/traces/mesh3d")},{"../src/traces/mesh3d":1063}],30:[function(e,t,r){"use strict";t.exports=e("../src/traces/ohlc")},{"../src/traces/ohlc":1068}],31:[function(e,t,r){"use strict";t.exports=e("../src/traces/parcats")},{"../src/traces/parcats":1077}],32:[function(e,t,r){"use strict";t.exports=e("../src/traces/parcoords")},{"../src/traces/parcoords":1087}],33:[function(e,t,r){"use strict";t.exports=e("../src/traces/pie")},{"../src/traces/pie":1098}],34:[function(e,t,r){"use strict";t.exports=e("../src/traces/pointcloud")},{"../src/traces/pointcloud":1107}],35:[function(e,t,r){"use strict";t.exports=e("../src/traces/sankey")},{"../src/traces/sankey":1113}],36:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatter3d")},{"../src/traces/scatter3d":1150}],37:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1157}],38:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattergeo")},{"../src/traces/scattergeo":1165}],39:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattergl")},{"../src/traces/scattergl":1177}],40:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1187}],41:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1195}],42:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1202}],43:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatterternary")},{"../src/traces/scatterternary":1210}],44:[function(e,t,r){"use strict";t.exports=e("../src/transforms/sort")},{"../src/transforms/sort":1298}],45:[function(e,t,r){"use strict";t.exports=e("../src/traces/splom")},{"../src/traces/splom":1219}],46:[function(e,t,r){"use strict";t.exports=e("../src/traces/streamtube")},{"../src/traces/streamtube":1227}],47:[function(e,t,r){"use strict";t.exports=e("../src/traces/sunburst")},{"../src/traces/sunburst":1235}],48:[function(e,t,r){"use strict";t.exports=e("../src/traces/surface")},{"../src/traces/surface":1244}],49:[function(e,t,r){"use strict";t.exports=e("../src/traces/table")},{"../src/traces/table":1252}],50:[function(e,t,r){"use strict";t.exports=e("../src/traces/treemap")},{"../src/traces/treemap":1261}],51:[function(e,t,r){"use strict";t.exports=e("../src/traces/violin")},{"../src/traces/violin":1273}],52:[function(e,t,r){"use strict";t.exports=e("../src/traces/volume")},{"../src/traces/volume":1281}],53:[function(e,t,r){"use strict";t.exports=e("../src/traces/waterfall")},{"../src/traces/waterfall":1289}],54:[function(e,t,r){"use strict";t.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],u=e.mode||"turntable",c=n(),d=a(),p=i();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),p.setDistanceLimits(l[0],l[1]),p.lookAt(0,t,r,s),new o({turntable:c,orbit:d,matrix:p},u)};var n=e("turntable-camera-controller"),a=e("orbit-camera-controller"),i=e("matrix-camera-controller");function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach((function(e){for(var t=e[0],r=[],n=0;n1||a>1)}function L(e,t,r){return e.sort(E),e.forEach((function(n,a){var i,o,s=0;if(W(n,r)&&C(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var u=e[l].circularPathData.verticalBuffer+e[l].width/2+t;s=u>s?u:s}n.circularPathData.verticalBuffer=s+n.width/2}})),e}function A(e,r,a,i){var o=t.min(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),L(e.links.filter((function(e){return"top"==e.circularLinkType})),r,i),L(e.links.filter((function(e){return"bottom"==e.circularLinkType})),r,i),e.links.forEach((function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+w,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,W(t,i)&&C(t))t.circularPathData.leftSmallArcRadius=w+t.width/2,t.circularPathData.leftLargeArcRadius=w+t.width/2,t.circularPathData.rightSmallArcRadius=w+t.width/2,t.circularPathData.rightLargeArcRadius=w+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+x+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-x-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s=t.source.column,l=t.circularLinkType,u=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==t.circularLinkType?u.sort(P):u.sort(D);var c=0;u.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=w+t.width/2+c,t.circularPathData.leftLargeArcRadius=w+t.width/2+n*r+c),c+=e.width})),s=t.target.column,u=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==t.circularLinkType?u.sort(O):u.sort(I),c=0,u.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=w+t.width/2+c,t.circularPathData.rightLargeArcRadius=w+t.width/2+n*r+c),c+=e.width})),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(a,t.source.y1,t.target.y1)+x+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-x-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}if(t.circular)t.path=function(e){return"top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY}(t);else{var d=n.linkHorizontal().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));t.path=d(t)}}))}function E(e,t){return F(e)==F(t)?"bottom"==e.circularLinkType?P(e,t):D(e,t):F(t)-F(e)}function D(e,t){return e.y0-t.y0}function P(e,t){return t.y0-e.y0}function I(e,t){return e.y1-t.y1}function O(e,t){return t.y1-e.y1}function F(e){return e.target.column-e.source.column}function R(e){return e.target.x0-e.source.x1}function z(e,t){var r=T(e),n=R(t)/Math.tan(r);return"up"==U(e)?e.y1+n:e.y1-n}function N(e,t){var r=T(e),n=R(t)/Math.tan(r);return"up"==U(e)?e.y1-n:e.y1+n}function B(e,t,r,n){e.links.forEach((function(a){if(!a.circular&&a.target.column-a.source.column>1){var i=a.source.column+1,o=a.target.column-1,s=1,l=o-i+1;for(s=1;i<=o;i++,s++)e.nodes.forEach((function(o){if(o.column==i){var u,c=s/(l+1),d=Math.pow(1-c,3),p=3*c*Math.pow(1-c,2),h=3*Math.pow(c,2)*(1-c),f=Math.pow(c,3),m=d*a.y0+p*a.y0+h*a.y1+f*a.y1,g=m-a.width/2,y=m+a.width/2;g>o.y0&&gi.y0&&a.y0i.y0&&a.y1i.y1)&&j(e,u,t,r)}))):y>o.y0&&yo.y1&&j(e,u,t,r)}))):go.y1&&(u=y-o.y0+10,o=j(o,u,t,r),e.nodes.forEach((function(e){b(e,n)!=b(o,n)&&e.column==o.column&&e.y0o.y1&&j(e,u,t,r)})))}}))}}))}function j(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function Y(e,t,r,n){e.nodes.forEach((function(a){n&&a.y+(a.y1-a.y0)>t&&(a.y=a.y-(a.y+(a.y1-a.y0)-t));var i=e.links.filter((function(e){return b(e.source,r)==b(a,r)})),o=i.length;o>1&&i.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!V(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var r=N(t,e);return e.y1-r}if(t.target.column>e.target.column)return N(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=a.y0;i.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),i.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r1&&n.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!V(e,t))return e.y0-t.y0;if(t.source.column0?"up":"down"}function W(e,t){return b(e.source,t)==b(e.target,t)}e.sankeyCircular=function(){var e,n,i=0,b=0,T=1,C=1,L=24,E=g,D=o,P=y,I=v,O=32,F=2,R=null;function z(){var o={nodes:P.apply(null,arguments),links:I.apply(null,arguments)};!function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=r.map(e.nodes,E);e.links.forEach((function(e,r){e.index=r;var n=e.source,a=e.target;"object"!==(void 0===n?"undefined":l(n))&&(n=e.source=_(t,n)),"object"!==(void 0===a?"undefined":l(a))&&(a=e.target=_(t,a)),n.sourceLinks.push(e),a.targetLinks.push(e)}))}(o),function(e,t,r){var n=0;if(null===r){for(var i=[],o=0;o0?r+x+w:r,bottom:n=n>0?n+x+w:n,left:i=i>0?i+x+w:i,right:a=a>0?a+x+w:a}}(a),c=function(e,r){var n=t.max(e.nodes,(function(e){return e.column})),a=T-i,o=C-b,s=a+r.right+r.left,l=o+r.top+r.bottom,u=a/s,c=o/l;return i=i*u+r.left,T=0==r.right?T:T*u,b=b*c+r.top,C*=c,e.nodes.forEach((function(e){e.x0=i+e.column*((T-i-L)/n),e.x1=e.x0+L})),c}(a,u);s*=c,a.links.forEach((function(e){e.width=e.value*s})),l.forEach((function(e){var t=e.length;e.forEach((function(e,n){e.depth==l.length-1&&1==t?(e.y0=C/2-e.value*s,e.y1=e.y0+e.value*s):0==e.depth&&1==t?(e.y0=C/2-e.value*s,e.y1=e.y0+e.value*s):e.partOfCycle?0==S(e,r)?(e.y0=C/2+n,e.y1=e.y0+e.value*s):"top"==e.circularLinkType?(e.y0=b+n,e.y1=e.y0+e.value*s):(e.y0=C-e.value*s-n,e.y1=e.y0+e.value*s):0==u.top||0==u.bottom?(e.y0=(C-b)/t*n,e.y1=e.y0+e.value*s):(e.y0=(C-b)/2-t/2+n,e.y1=e.y0+e.value*s)}))}))})(s),y();for(var u=1,c=o;c>0;--c)g(u*=.99,s),y();function g(e,r){var n=l.length;l.forEach((function(a){var i=a.length,o=a[0].depth;a.forEach((function(a){var s;if(a.sourceLinks.length||a.targetLinks.length)if(a.partOfCycle&&S(a,r)>0);else if(0==o&&1==i)s=a.y1-a.y0,a.y0=C/2-s/2,a.y1=C/2+s/2;else if(o==n-1&&1==i)s=a.y1-a.y0,a.y0=C/2-s/2,a.y1=C/2+s/2;else{var l=t.mean(a.sourceLinks,m),u=t.mean(a.targetLinks,f),c=((l&&u?(l+u)/2:l||u)-h(a))*e;a.y0+=c,a.y1+=c}}))}))}function y(){l.forEach((function(t){var r,n,a,i=b,o=t.length;for(t.sort(d),a=0;a0&&(r.y0+=n,r.y1+=n),i=r.y1+e;if((n=i-e-C)>0)for(i=r.y0-=n,r.y1-=n,a=o-2;a>=0;--a)(n=(r=t[a]).y1+e-i)>0&&(r.y0-=n,r.y1-=n),i=r.y0}))}}(o,O,E),N(o);for(var s=0;s<4;s++)Y(o,C,E),H(o,0,E),B(o,b,C,E),Y(o,C,E),H(o,0,E);return function(e,r,n){var a=e.nodes,i=e.links,o=!1,s=!1;if(i.forEach((function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==o||0==s){var l=t.min(a,(function(e){return e.y0})),u=t.max(a,(function(e){return e.y1})),c=(n-r)/(u-l);a.forEach((function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t})),i.forEach((function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c}))}}(o,b,C),A(o,F,C,E),o}function N(e){e.nodes.forEach((function(e){e.sourceLinks.sort(c),e.targetLinks.sort(u)})),e.nodes.forEach((function(e){var t=e.y0,r=t,n=e.y1,a=n;e.sourceLinks.forEach((function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=a-e.width/2,a-=e.width):(e.y1=r+e.width/2,r+=e.width)}))}))}return z.nodeId=function(e){return arguments.length?(E="function"==typeof e?e:s(e),z):E},z.nodeAlign=function(e){return arguments.length?(D="function"==typeof e?e:s(e),z):D},z.nodeWidth=function(e){return arguments.length?(L=+e,z):L},z.nodePadding=function(t){return arguments.length?(e=+t,z):e},z.nodes=function(e){return arguments.length?(P="function"==typeof e?e:s(e),z):P},z.links=function(e){return arguments.length?(I="function"==typeof e?e:s(e),z):I},z.size=function(e){return arguments.length?(i=b=0,T=+e[0],C=+e[1],z):[T-i,C-b]},z.extent=function(e){return arguments.length?(i=+e[0][0],T=+e[1][0],b=+e[0][1],C=+e[1][1],z):[[i,b],[T,C]]},z.iterations=function(e){return arguments.length?(O=+e,z):O},z.circularLinkGap=function(e){return arguments.length?(F=+e,z):F},z.nodePaddingRatio=function(e){return arguments.length?(n=+e,z):n},z.sortNodes=function(e){return arguments.length?(R=e,z):R},z.update=function(e){return M(e,E),N(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y1i&&(b=i);var o=t.min(a,(function(e){return(v-n-(e.length-1)*b)/t.sum(e,c)}));a.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*o}))})),e.links.forEach((function(e){e.width=e.value*o}))})(),f();for(var i=1,o=T;o>0;--o)l(i*=.99),f(),s(i),f();function s(e){a.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(t.sum(r.targetLinks,p)/t.sum(r.targetLinks,c)-d(r))*e;r.y0+=n,r.y1+=n}}))}))}function l(e){a.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(t.sum(r.sourceLinks,h)/t.sum(r.sourceLinks,c)-d(r))*e;r.y0+=n,r.y1+=n}}))}))}function f(){a.forEach((function(e){var t,r,a,i=n,o=e.length;for(e.sort(u),a=0;a0&&(t.y0+=r,t.y1+=r),i=t.y1+b;if((r=i-b-v)>0)for(i=t.y0-=r,t.y1-=r,a=o-2;a>=0;--a)(r=(t=e[a]).y1+b-i)>0&&(t.y0-=r,t.y1-=r),i=t.y0}))}}(i),L(i),i}function L(e){e.nodes.forEach((function(e){e.sourceLinks.sort(l),e.targetLinks.sort(s)})),e.nodes.forEach((function(e){var t=e.y0,r=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=r+e.width/2,r+=e.width}))}))}return C.update=function(e){return L(e),e},C.nodeId=function(e){return arguments.length?(x="function"==typeof e?e:o(e),C):x},C.nodeAlign=function(e){return arguments.length?(w="function"==typeof e?e:o(e),C):w},C.nodeWidth=function(e){return arguments.length?(_=+e,C):_},C.nodePadding=function(e){return arguments.length?(b=+e,C):b},C.nodes=function(e){return arguments.length?(k="function"==typeof e?e:o(e),C):k},C.links=function(e){return arguments.length?(M="function"==typeof e?e:o(e),C):M},C.size=function(t){return arguments.length?(e=n=0,a=+t[0],v=+t[1],C):[a-e,v-n]},C.extent=function(t){return arguments.length?(e=+t[0][0],a=+t[1][0],n=+t[0][1],v=+t[1][1],C):[[e,n],[a,v]]},C.iterations=function(e){return arguments.length?(T=+e,C):T},C},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,a)-1:0},e.sankeyLeft=function(e){return e.depth},e.sankeyRight=function(e,t){return t-1-e.height},e.sankeyJustify=i,e.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(v).target(_)},Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-array":153,"d3-collection":154,"d3-shape":162}],57:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("@turf/meta"),a=6378137;function i(e){var t=0;if(e&&e.length>0){t+=Math.abs(o(e[0]));for(var r=1;r2){for(l=0;l=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},r.radiansToLength=d,r.lengthToRadians=p,r.lengthToDegrees=function(e,t){return h(p(e,t))},r.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},r.radiansToDegrees=h,r.degreesToRadians=function(e){return e%360*Math.PI/180},r.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return d(p(e,t),r)},r.convertArea=function(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 a=r.areaFactors[t];if(!a)throw new Error("invalid original units");var i=r.areaFactors[n];if(!i)throw new Error("invalid final units");return e/a*i},r.isNumber=f,r.isObject=function(e){return!!e&&e.constructor===Object},r.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(!f(e))throw new Error("bbox must only contain numbers")}))},r.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")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],60:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("@turf/helpers");function a(e,t,r){if(null!==e)for(var n,i,o,s,l,u,c,d,p=0,h=0,f=e.type,m="FeatureCollection"===f,g="Feature"===f,y=m?e.features.length:1,v=0;vu||h>c||f>d)return l=a,u=r,c=h,d=f,void(o=0);var m=n.lineString([l,a],e.properties);if(!1===t(m,r,i,f,o))return!1;o++,l=a}))&&void 0}}}))}function c(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,a){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,a,0,0))return!1;break;case"Polygon":for(var s=0;sa&&(a=e[o]),e[o] * @license MIT */function a(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a=0;u--)if(c[u]!==d[u])return!1;for(u=c.length-1;u>=0;u--)if(s=c[u],!_(e[s],t[s],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,r,n){var a;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),a=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!a&&y(a,r,"Missing expected exception"+n);var i="string"==typeof n,s=!e&&a&&!r;if((!e&&o.isError(a)&&i&&x(a,r)||s)&&y(a,r,"Got unwanted exception"+n),e&&a&&r&&!x(a,r)||!e&&a)throw a}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,a=f(t),i=n.indexOf("\n"+a);if(i>=0){var o=n.indexOf("\n",i+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(p.AssertionError,Error),p.fail=y,p.ok=v,p.equal=function(e,t,r){e!=t&&y(e,t,r,"==",p.equal)},p.notEqual=function(e,t,r){e==t&&y(e,t,r,"!=",p.notEqual)},p.deepEqual=function(e,t,r){_(e,t,!1)||y(e,t,r,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,r){_(e,t,!0)||y(e,t,r,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,r){_(e,t,!1)&&y(e,t,r,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,r,n){_(t,r,!0)&&y(t,r,n,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,r){e!==t&&y(e,t,r,"===",p.strictEqual)},p.notStrictEqual=function(e,t,r){e===t&&y(e,t,r,"!==",p.notStrictEqual)},p.throws=function(e,t,r){w(!0,e,t,r)},p.doesNotThrow=function(e,t,r){w(!1,e,t,r)},p.ifError=function(e){if(e)throw e},p.strict=n((function e(t,r){t||y(t,!0,r,"==",e)}),p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var k=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":455,"util/":72}],70:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],71:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],72:[function(e,r,n){(function(t,r){var a=/%[sdj%]/g;n.format=function(e){if(!y(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),l=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(t)?r.showHidden=t:t&&n._extend(r,t),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 r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function u(e,t){return e}function c(e,t,r){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var a=t.inspect(r,e);return y(a)||(a=c(e,a,r)),a}var i=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),w(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return d(t);if(0===o.length){if(k(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return d(t)}var u,b="",M=!1,T=["{","}"];return h(t)&&(M=!0,T=["[","]"]),k(t)&&(b=" [Function"+(t.name?": "+t.name:"")+"]"),_(t)&&(b=" "+RegExp.prototype.toString.call(t)),x(t)&&(b=" "+Date.prototype.toUTCString.call(t)),w(t)&&(b=" "+d(t)),0!==o.length||M&&0!=t.length?r<0?_(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=M?function(e,t,r,n,a){for(var i=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(u,b,T)):T[0]+b+T[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,a,i){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),L(n,a)||(o="["+a+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?c(e,l.value,null):c(e,l.value,r-1)).indexOf("\n")>-1&&(s=i?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(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function _(e){return b(e)&&"[object RegExp]"===M(e)}function b(e){return"object"==typeof e&&null!==e}function x(e){return b(e)&&"[object Date]"===M(e)}function w(e){return b(e)&&("[object Error]"===M(e)||e instanceof Error)}function k(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(v(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=t.pid;o[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else o[e]=function(){};return o[e]},n.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"},n.isArray=h,n.isBoolean=f,n.isNull=m,n.isNullOrUndefined=function(e){return null==e},n.isNumber=g,n.isString=y,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=v,n.isRegExp=_,n.isObject=b,n.isDate=x,n.isError=w,n.isFunction=k,n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){console.log("%s - %s",C(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!b(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":71,_process:483,inherits:70}],73:[function(e,t,r){t.exports=function(e){return atob(e)}},{}],74:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=t.length,i=new Array(r+1),o=0;o0?o-4:o;for(r=0;r>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===s&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,l[c++]=255&t),1===s&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},r.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],o=0,s=r-a;os?s:o+16383));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var a,i,o=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],76:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},{"./lib/rationalize":86}],77:[function(e,t,r){"use strict";t.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},{}],78:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[1]),e[1].mul(t[0]))}},{"./lib/rationalize":86}],79:[function(e,t,r){"use strict";var n=e("./is-rat"),a=e("./lib/is-bn"),i=e("./lib/num-to-bn"),o=e("./lib/str-to-bn"),s=e("./lib/rationalize"),l=e("./div");t.exports=function e(t,r){if(n(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var u,c,d=0;if(a(t))u=t.clone();else if("string"==typeof t)u=o(t);else{if(0===t)return[i(0),i(1)];if(t===Math.floor(t))u=i(t);else{for(;t!==Math.floor(t);)t*=Math.pow(2,256),d-=256;u=i(t)}}if(n(r))u.mul(r[1]),c=r[0].clone();else if(a(r))c=r.clone();else if("string"==typeof r)c=o(r);else if(r)if(r===Math.floor(r))c=i(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),d+=256;c=i(r)}else c=i(1);return d>0?u=u.ushln(d):d<0&&(c=c.ushln(-d)),s(u,c)}},{"./div":78,"./is-rat":80,"./lib/is-bn":84,"./lib/num-to-bn":85,"./lib/rationalize":86,"./lib/str-to-bn":87}],80:[function(e,t,r){"use strict";var n=e("./lib/is-bn");t.exports=function(e){return Array.isArray(e)&&2===e.length&&n(e[0])&&n(e[1])}},{"./lib/is-bn":84}],81:[function(e,t,r){"use strict";var n=e("bn.js");t.exports=function(e){return e.cmp(new n(0))}},{"bn.js":95}],82:[function(e,t,r){"use strict";var n=e("./bn-sign");t.exports=function(e){var t=e.length,r=e.words,a=0;if(1===t)a=r[0];else if(2===t)a=r[0]+67108864*r[1];else for(var i=0;i20?52:r+32}},{"bit-twiddle":93,"double-bits":168}],84:[function(e,t,r){"use strict";e("bn.js"),t.exports=function(e){return e&&"object"==typeof e&&Boolean(e.words)}},{"bn.js":95}],85:[function(e,t,r){"use strict";var n=e("bn.js"),a=e("double-bits");t.exports=function(e){var t=a.exponent(e);return t<52?new n(e):new n(e*Math.pow(2,52-t)).ushln(t-52)}},{"bn.js":95,"double-bits":168}],86:[function(e,t,r){"use strict";var n=e("./num-to-bn"),a=e("./bn-sign");t.exports=function(e,t){var r=a(e),i=a(t);if(0===r)return[n(0),n(1)];if(0===i)return[n(0),n(0)];i<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},{"./bn-sign":81,"./num-to-bn":85}],87:[function(e,t,r){"use strict";var n=e("bn.js");t.exports=function(e){return new n(e)}},{"bn.js":95}],88:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[0]),e[1].mul(t[1]))}},{"./lib/rationalize":86}],89:[function(e,t,r){"use strict";var n=e("./lib/bn-sign");t.exports=function(e){return n(e[0])*n(e[1])}},{"./lib/bn-sign":81}],90:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},{"./lib/rationalize":86}],91:[function(e,t,r){"use strict";var n=e("./lib/bn-to-num"),a=e("./lib/ctz");t.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var i=t.abs().divmod(r.abs()),o=i.div,s=n(o),l=i.mod,u=t.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=a(s)+4,d=n(l.ushln(c).divRound(r));return u*(s+d*Math.pow(2,-c))}var p=r.bitLength()-l.bitLength()+53;return d=n(l.ushln(p).divRound(r)),p<1023?u*d*Math.pow(2,-p):(d*=Math.pow(2,-1023),u*d*Math.pow(2,1023-p))}},{"./lib/bn-to-num":82,"./lib/ctz":83}],92:[function(e,t,r){"use strict";function n(e,t,r,n,a,i){var o=["function ",e,"(a,l,h,",n.join(","),"){",i?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",a?".get(m)":"[m]"];return i?t.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",t,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),i?o.push("return -1};"):o.push("return i};"),o.join("")}function a(e,t,r,a){return new Function([n("A","x"+e+"y",t,["y"],!1,a),n("B","x"+e+"y",t,["y"],!0,a),n("P","c(x,y)"+e+"0",t,["y","c"],!1,a),n("Q","c(x,y)"+e+"0",t,["y","c"],!0,a),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}t.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],93:[function(e,t,r){"use strict";function n(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(e){return(e>0)-(e<0)},r.abs=function(e){var t=e>>31;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},r.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},r.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var a=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--a;e[t]=n<>>8&255]<<16|a[e>>>16&255]<<8|a[e>>>24&255]},r.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},r.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},r.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},r.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},{}],94:[function(e,t,r){"use strict";var n=e("clamp");t.exports=function(e,t){t||(t={});var r,o,s,l,u,c,d,p,h,f,m,g=null==t.cutoff?.25:t.cutoff,y=null==t.radius?8:t.radius,v=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,o=t.height,l=e,c=t.stride?t.stride:Math.floor(e.length/r/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(d=(p=e).getContext("2d"),r=p.width,o=p.height,h=d.getImageData(0,0,r,o),l=h.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,d=e,r=p.width,o=p.height,h=d.getImageData(0,0,r,o),l=h.data,c=4):window.ImageData&&e instanceof window.ImageData&&(h=e,r=e.width,o=e.height,l=h.data,c=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(r*o),f=0,m=u.length;f=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(e,t,r,n){for(var a=0,i=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)a=s(e,r,r+6),this.words[n]|=a<>>26-i&4194303,(i+=24)>=26&&(i-=26,n++);r+6!==t&&(a=s(e,t,r+6),this.words[n]|=a<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&l,p=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=p;h++){var f=u-h|0;c+=(o=(a=0|e.words[f])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215)||o!==this.length-1?u[6-l.length]+l+r:l+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var p=c[e],h=d[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:u[p-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===t,u=new e(i),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],f=8191&h,m=h>>>13,g=0|o[2],y=8191&g,v=g>>>13,_=0|o[3],b=8191&_,x=_>>>13,w=0|o[4],k=8191&w,M=w>>>13,T=0|o[5],S=8191&T,C=T>>>13,L=0|o[6],A=8191&L,E=L>>>13,D=0|o[7],P=8191&D,I=D>>>13,O=0|o[8],F=8191&O,R=O>>>13,z=0|o[9],N=8191&z,B=z>>>13,j=0|s[0],Y=8191&j,H=j>>>13,V=0|s[1],U=8191&V,W=V>>>13,q=0|s[2],G=8191&q,K=q>>>13,Z=0|s[3],X=8191&Z,J=Z>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],le=8191&se,ue=se>>>13,ce=0|s[8],de=8191&ce,pe=ce>>>13,he=0|s[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(u+(n=Math.imul(d,Y))|0)+((8191&(a=(a=Math.imul(d,H))+Math.imul(p,Y)|0))<<13)|0;u=((i=Math.imul(p,H))+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(f,Y),a=(a=Math.imul(f,H))+Math.imul(m,Y)|0,i=Math.imul(m,H);var ye=(u+(n=n+Math.imul(d,U)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(p,U)|0))<<13)|0;u=((i=i+Math.imul(p,W)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,Y),a=(a=Math.imul(y,H))+Math.imul(v,Y)|0,i=Math.imul(v,H),n=n+Math.imul(f,U)|0,a=(a=a+Math.imul(f,W)|0)+Math.imul(m,U)|0,i=i+Math.imul(m,W)|0;var ve=(u+(n=n+Math.imul(d,G)|0)|0)+((8191&(a=(a=a+Math.imul(d,K)|0)+Math.imul(p,G)|0))<<13)|0;u=((i=i+Math.imul(p,K)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(b,Y),a=(a=Math.imul(b,H))+Math.imul(x,Y)|0,i=Math.imul(x,H),n=n+Math.imul(y,U)|0,a=(a=a+Math.imul(y,W)|0)+Math.imul(v,U)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(f,G)|0,a=(a=a+Math.imul(f,K)|0)+Math.imul(m,G)|0,i=i+Math.imul(m,K)|0;var _e=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(a=(a=a+Math.imul(d,J)|0)+Math.imul(p,X)|0))<<13)|0;u=((i=i+Math.imul(p,J)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(k,Y),a=(a=Math.imul(k,H))+Math.imul(M,Y)|0,i=Math.imul(M,H),n=n+Math.imul(b,U)|0,a=(a=a+Math.imul(b,W)|0)+Math.imul(x,U)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(y,G)|0,a=(a=a+Math.imul(y,K)|0)+Math.imul(v,G)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(f,X)|0,a=(a=a+Math.imul(f,J)|0)+Math.imul(m,X)|0,i=i+Math.imul(m,J)|0;var be=(u+(n=n+Math.imul(d,Q)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(p,Q)|0))<<13)|0;u=((i=i+Math.imul(p,ee)|0)+(a>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(S,Y),a=(a=Math.imul(S,H))+Math.imul(C,Y)|0,i=Math.imul(C,H),n=n+Math.imul(k,U)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(M,U)|0,i=i+Math.imul(M,W)|0,n=n+Math.imul(b,G)|0,a=(a=a+Math.imul(b,K)|0)+Math.imul(x,G)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(y,X)|0,a=(a=a+Math.imul(y,J)|0)+Math.imul(v,X)|0,i=i+Math.imul(v,J)|0,n=n+Math.imul(f,Q)|0,a=(a=a+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,i=i+Math.imul(m,ee)|0;var xe=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(p,re)|0))<<13)|0;u=((i=i+Math.imul(p,ne)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,Y),a=(a=Math.imul(A,H))+Math.imul(E,Y)|0,i=Math.imul(E,H),n=n+Math.imul(S,U)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(C,U)|0,i=i+Math.imul(C,W)|0,n=n+Math.imul(k,G)|0,a=(a=a+Math.imul(k,K)|0)+Math.imul(M,G)|0,i=i+Math.imul(M,K)|0,n=n+Math.imul(b,X)|0,a=(a=a+Math.imul(b,J)|0)+Math.imul(x,X)|0,i=i+Math.imul(x,J)|0,n=n+Math.imul(y,Q)|0,a=(a=a+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(f,re)|0,a=(a=a+Math.imul(f,ne)|0)+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0;var we=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(p,ie)|0))<<13)|0;u=((i=i+Math.imul(p,oe)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,Y),a=(a=Math.imul(P,H))+Math.imul(I,Y)|0,i=Math.imul(I,H),n=n+Math.imul(A,U)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(E,U)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(S,G)|0,a=(a=a+Math.imul(S,K)|0)+Math.imul(C,G)|0,i=i+Math.imul(C,K)|0,n=n+Math.imul(k,X)|0,a=(a=a+Math.imul(k,J)|0)+Math.imul(M,X)|0,i=i+Math.imul(M,J)|0,n=n+Math.imul(b,Q)|0,a=(a=a+Math.imul(b,ee)|0)+Math.imul(x,Q)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(y,re)|0,a=(a=a+Math.imul(y,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(f,ie)|0,a=(a=a+Math.imul(f,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0;var ke=(u+(n=n+Math.imul(d,le)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(p,le)|0))<<13)|0;u=((i=i+Math.imul(p,ue)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(F,Y),a=(a=Math.imul(F,H))+Math.imul(R,Y)|0,i=Math.imul(R,H),n=n+Math.imul(P,U)|0,a=(a=a+Math.imul(P,W)|0)+Math.imul(I,U)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(A,G)|0,a=(a=a+Math.imul(A,K)|0)+Math.imul(E,G)|0,i=i+Math.imul(E,K)|0,n=n+Math.imul(S,X)|0,a=(a=a+Math.imul(S,J)|0)+Math.imul(C,X)|0,i=i+Math.imul(C,J)|0,n=n+Math.imul(k,Q)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(M,Q)|0,i=i+Math.imul(M,ee)|0,n=n+Math.imul(b,re)|0,a=(a=a+Math.imul(b,ne)|0)+Math.imul(x,re)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(y,ie)|0,a=(a=a+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(f,le)|0,a=(a=a+Math.imul(f,ue)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ue)|0;var Me=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;u=((i=i+Math.imul(p,pe)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(N,Y),a=(a=Math.imul(N,H))+Math.imul(B,Y)|0,i=Math.imul(B,H),n=n+Math.imul(F,U)|0,a=(a=a+Math.imul(F,W)|0)+Math.imul(R,U)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,G)|0,a=(a=a+Math.imul(P,K)|0)+Math.imul(I,G)|0,i=i+Math.imul(I,K)|0,n=n+Math.imul(A,X)|0,a=(a=a+Math.imul(A,J)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,J)|0,n=n+Math.imul(S,Q)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(C,Q)|0,i=i+Math.imul(C,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,n=n+Math.imul(b,ie)|0,a=(a=a+Math.imul(b,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(y,le)|0,a=(a=a+Math.imul(y,ue)|0)+Math.imul(v,le)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(f,de)|0,a=(a=a+Math.imul(f,pe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,pe)|0;var Te=(u+(n=n+Math.imul(d,fe)|0)|0)+((8191&(a=(a=a+Math.imul(d,me)|0)+Math.imul(p,fe)|0))<<13)|0;u=((i=i+Math.imul(p,me)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(N,U),a=(a=Math.imul(N,W))+Math.imul(B,U)|0,i=Math.imul(B,W),n=n+Math.imul(F,G)|0,a=(a=a+Math.imul(F,K)|0)+Math.imul(R,G)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(P,X)|0,a=(a=a+Math.imul(P,J)|0)+Math.imul(I,X)|0,i=i+Math.imul(I,J)|0,n=n+Math.imul(A,Q)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(C,re)|0,i=i+Math.imul(C,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,oe)|0,n=n+Math.imul(b,le)|0,a=(a=a+Math.imul(b,ue)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,ue)|0,n=n+Math.imul(y,de)|0,a=(a=a+Math.imul(y,pe)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,pe)|0;var Se=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(a=(a=a+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;u=((i=i+Math.imul(m,me)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,G),a=(a=Math.imul(N,K))+Math.imul(B,G)|0,i=Math.imul(B,K),n=n+Math.imul(F,X)|0,a=(a=a+Math.imul(F,J)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,J)|0,n=n+Math.imul(P,Q)|0,a=(a=a+Math.imul(P,ee)|0)+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,oe)|0,n=n+Math.imul(k,le)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,ue)|0,n=n+Math.imul(b,de)|0,a=(a=a+Math.imul(b,pe)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,pe)|0;var Ce=(u+(n=n+Math.imul(y,fe)|0)|0)+((8191&(a=(a=a+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;u=((i=i+Math.imul(v,me)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,X),a=(a=Math.imul(N,J))+Math.imul(B,X)|0,i=Math.imul(B,J),n=n+Math.imul(F,Q)|0,a=(a=a+Math.imul(F,ee)|0)+Math.imul(R,Q)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,a=(a=a+Math.imul(P,ne)|0)+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(S,le)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(C,le)|0,i=i+Math.imul(C,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,pe)|0)+Math.imul(M,de)|0,i=i+Math.imul(M,pe)|0;var Le=(u+(n=n+Math.imul(b,fe)|0)|0)+((8191&(a=(a=a+Math.imul(b,me)|0)+Math.imul(x,fe)|0))<<13)|0;u=((i=i+Math.imul(x,me)|0)+(a>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(N,Q),a=(a=Math.imul(N,ee))+Math.imul(B,Q)|0,i=Math.imul(B,ee),n=n+Math.imul(F,re)|0,a=(a=a+Math.imul(F,ne)|0)+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,a=(a=a+Math.imul(P,oe)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,oe)|0,n=n+Math.imul(A,le)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(E,le)|0,i=i+Math.imul(E,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,pe)|0)+Math.imul(C,de)|0,i=i+Math.imul(C,pe)|0;var Ae=(u+(n=n+Math.imul(k,fe)|0)|0)+((8191&(a=(a=a+Math.imul(k,me)|0)+Math.imul(M,fe)|0))<<13)|0;u=((i=i+Math.imul(M,me)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,re),a=(a=Math.imul(N,ne))+Math.imul(B,re)|0,i=Math.imul(B,ne),n=n+Math.imul(F,ie)|0,a=(a=a+Math.imul(F,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,le)|0,a=(a=a+Math.imul(P,ue)|0)+Math.imul(I,le)|0,i=i+Math.imul(I,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,pe)|0)+Math.imul(E,de)|0,i=i+Math.imul(E,pe)|0;var Ee=(u+(n=n+Math.imul(S,fe)|0)|0)+((8191&(a=(a=a+Math.imul(S,me)|0)+Math.imul(C,fe)|0))<<13)|0;u=((i=i+Math.imul(C,me)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,ie),a=(a=Math.imul(N,oe))+Math.imul(B,ie)|0,i=Math.imul(B,oe),n=n+Math.imul(F,le)|0,a=(a=a+Math.imul(F,ue)|0)+Math.imul(R,le)|0,i=i+Math.imul(R,ue)|0,n=n+Math.imul(P,de)|0,a=(a=a+Math.imul(P,pe)|0)+Math.imul(I,de)|0,i=i+Math.imul(I,pe)|0;var De=(u+(n=n+Math.imul(A,fe)|0)|0)+((8191&(a=(a=a+Math.imul(A,me)|0)+Math.imul(E,fe)|0))<<13)|0;u=((i=i+Math.imul(E,me)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(N,le),a=(a=Math.imul(N,ue))+Math.imul(B,le)|0,i=Math.imul(B,ue),n=n+Math.imul(F,de)|0,a=(a=a+Math.imul(F,pe)|0)+Math.imul(R,de)|0,i=i+Math.imul(R,pe)|0;var Pe=(u+(n=n+Math.imul(P,fe)|0)|0)+((8191&(a=(a=a+Math.imul(P,me)|0)+Math.imul(I,fe)|0))<<13)|0;u=((i=i+Math.imul(I,me)|0)+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(N,de),a=(a=Math.imul(N,pe))+Math.imul(B,de)|0,i=Math.imul(B,pe);var Ie=(u+(n=n+Math.imul(F,fe)|0)|0)+((8191&(a=(a=a+Math.imul(F,me)|0)+Math.imul(R,fe)|0))<<13)|0;u=((i=i+Math.imul(R,me)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Oe=(u+(n=Math.imul(N,fe))|0)+((8191&(a=(a=Math.imul(N,me))+Math.imul(B,fe)|0))<<13)|0;return u=((i=Math.imul(B,me))+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=_e,l[4]=be,l[5]=xe,l[6]=we,l[7]=ke,l[8]=Me,l[9]=Te,l[10]=Se,l[11]=Ce,l[12]=Le,l[13]=Ae,l[14]=Ee,l[15]=De,l[16]=Pe,l[17]=Ie,l[18]=Oe,0!==u&&(l[19]=u,r.length++),r};function f(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?p(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,e,t):f(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=a);u--){var d=0|this.words[u];this.words[u]=c<<26-i|d>>>i,c=d&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!=(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,l=n.length-a.length;if("mod"!==t){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var p=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(p=Math.min(p/o|0,67108863),n._ishlnsubmul(a,p,d);0!==n.negative;)p--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=p)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var p=0,h=1;0==(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(c),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var f=0,m=1;0==(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(l)):(r.isub(t),s.isub(a),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,p=1;0==(r.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new w(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){w.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},a(v,y),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,a=i}a>>>=22,e.words[n-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new _;else if("p192"===e)t=new b;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},w.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},w.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},w.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},w.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},w.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},w.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},w.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},w.prototype.isqr=function(e){return this.imul(e,e.clone())},w.prototype.sqr=function(e){return this.mul(e,e)},w.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var d=this.pow(c,a),p=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),f=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var d=u>>c&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4==++s||0===n&&0===c)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}l=26}return a},w.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},w.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},a(k,w),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:104}],96:[function(e,t,r){"use strict";t.exports=function(e){var t,r,n,a=e.length,i=0;for(t=0;t>>1;if(!(c<=0)){var d,p=a.mallocDouble(2*c*s),h=a.mallocInt32(s);if((s=l(e,c,p,h))>0){if(1===c&&n)i.init(s),d=i.sweepComplete(c,r,0,s,p,h,0,s,p,h);else{var f=a.mallocDouble(2*c*u),m=a.mallocInt32(u);(u=l(t,c,f,m))>0&&(i.init(s+u),d=1===c?i.sweepBipartite(c,r,0,s,p,h,0,u,f,m):o(c,r,n,s,p,h,u,f,m),a.free(f),a.free(m))}a.free(p),a.free(h)}return d}}}function c(e,t){n.push([e,t])}},{"./lib/intersect":99,"./lib/sweep":103,"typedarray-pool":543}],98:[function(e,t,r){"use strict";var n="d",a="ax",i="vv",o="fp",s="es",l="rs",u="re",c="rb",d="ri",p="rp",h="bs",f="be",m="bb",g="bi",y="bp",v="rv",_="Q",b=[n,a,i,l,u,c,d,h,f,m,g];function x(e){var t="bruteForce"+(e?"Full":"Partial"),r=[],x=b.slice();e||x.splice(3,0,o);var w=["function "+t+"("+x.join()+"){"];function k(t,o){var x=function(e,t,r){var o="bruteForce"+(e?"Red":"Blue")+(t?"Flip":"")+(r?"Full":""),x=["function ",o,"(",b.join(),"){","var ",s,"=2*",n,";"],w="for(var i="+l+","+p+"="+s+"*"+l+";i<"+u+";++i,"+p+"+="+s+"){var x0="+c+"["+a+"+"+p+"],x1="+c+"["+a+"+"+p+"+"+n+"],xi="+d+"[i];",k="for(var j="+h+","+y+"="+s+"*"+h+";j<"+f+";++j,"+y+"+="+s+"){var y0="+m+"["+a+"+"+y+"],"+(r?"y1="+m+"["+a+"+"+y+"+"+n+"],":"")+"yi="+g+"[j];";return e?x.push(w,_,":",k):x.push(k,_,":",w),r?x.push("if(y1"+f+"-"+h+"){"),e?(k(!0,!1),w.push("}else{"),k(!1,!1)):(w.push("if("+o+"){"),k(!0,!0),w.push("}else{"),k(!0,!1),w.push("}}else{if("+o+"){"),k(!1,!0),w.push("}else{"),k(!1,!1),w.push("}")),w.push("}}return "+t);var M=r.join("")+w.join("");return new Function(M)()}r.partial=x(!1),r.full=x(!0)},{}],99:[function(e,t,r){"use strict";t.exports=function(e,t,r,i,c,C,L,A,E){!function(e,t){var r=8*a.log2(t+1)*(e+1)|0,i=a.nextPow2(b*r);w.length0;){var O=(P-=1)*b,F=w[O],R=w[O+1],z=w[O+2],N=w[O+3],B=w[O+4],j=w[O+5],Y=P*x,H=k[Y],V=k[Y+1],U=1&j,W=!!(16&j),q=c,G=C,K=A,Z=E;if(U&&(q=A,G=E,K=c,Z=C),!(2&j&&(z=g(e,F,R,z,q,G,V),R>=z)||4&j&&(R=y(e,F,R,z,q,G,H))>=z)){var X=z-R,J=B-N;if(W){if(e*X*(X+J)=p0)&&!(p1>=hi)",["p0","p1"]),m=c("lo===p0",["p0"]),g=c("lo>>1,p=2*e,h=d,f=s[p*d+t];u=_?(h=v,f=_):y>=x?(h=g,f=y):(h=b,f=x):_>=x?(h=v,f=_):x>=y?(h=g,f=y):(h=b,f=x);for(var w=p*(c-1),k=p*h,M=0;Mr&&a[d+t]>u;--c,d-=o){for(var p=d,h=d+o,f=0;f=0&&a.push("lo=e[k+n]"),e.indexOf("hi")>=0&&a.push("hi=e[k+o]"),r.push(n.replace("_",a.join()).replace("$",e)),Function.apply(void 0,r)};var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],102:[function(e,t,r){"use strict";t.exports=function(e,t){t<=4*n?a(0,t-1,e):function e(t,r,d){var p=(r-t+1)/6|0,h=t+p,f=r-p,m=t+r>>1,g=m-p,y=m+p,v=h,_=g,b=m,x=y,w=f,k=t+1,M=r-1,T=0;u(v,_,d)&&(T=v,v=_,_=T),u(x,w,d)&&(T=x,x=w,w=T),u(v,b,d)&&(T=v,v=b,b=T),u(_,b,d)&&(T=_,_=b,b=T),u(v,x,d)&&(T=v,v=x,x=T),u(b,x,d)&&(T=b,b=x,x=T),u(_,w,d)&&(T=_,_=w,w=T),u(_,b,d)&&(T=_,_=b,b=T),u(x,w,d)&&(T=x,x=w,w=T);for(var S=d[2*_],C=d[2*_+1],L=d[2*x],A=d[2*x+1],E=2*v,D=2*b,P=2*w,I=2*h,O=2*m,F=2*f,R=0;R<2;++R){var z=d[E+R],N=d[D+R],B=d[P+R];d[I+R]=z,d[O+R]=N,d[F+R]=B}o(g,t,d),o(y,r,d);for(var j=k;j<=M;++j)if(c(j,S,C,d))j!==k&&i(j,k,d),++k;else if(!c(j,L,A,d))for(;;){if(c(M,L,A,d)){c(M,S,C,d)?(s(j,k,M,d),++k,--M):(i(j,M,d),--M);break}if(--Me;){var u=r[l-2],c=r[l-1];if(ur[t+1])}function c(e,t,r,n){var a=n[e*=2];return a>>1;i(h,C);var L=0,A=0;for(k=0;k=o)f(u,c,A--,E=E-o|0);else if(E>=0)f(s,l,L--,E);else if(E<=-o){E=-E-o|0;for(var D=0;D>>1;i(h,L);var A=0,E=0,D=0;for(M=0;M>1==h[2*M+3]>>1&&(I=2,M+=1),P<0){for(var O=-(P>>1)-1,F=0;F>1)-1,0===I?f(s,l,A--,O):1===I?f(u,c,E--,O):2===I&&f(d,p,D--,O)}},scanBipartite:function(e,t,r,n,a,u,c,d,p,g,y,v){var _=0,b=2*e,x=t,w=t+e,k=1,M=1;n?M=o:k=o;for(var T=a;T>>1;i(h,A);var E=0;for(T=0;T=o?(P=!n,S-=o):(P=!!n,S-=1),P)m(s,l,E++,S);else{var I=v[S],O=b*S,F=y[O+t+1],R=y[O+t+1+e];e:for(var z=0;z>>1;i(h,k);var M=0;for(_=0;_=o)s[M++]=b-o;else{var S=f[b-=1],C=g*b,L=p[C+t+1],A=p[C+t+1+e];e:for(var E=0;E=0;--E)if(s[E]===b){for(O=E+1;O0&&s.length>i){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=o[t]=r,++e._eventsCount;return e}function y(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(r=o[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:d(r,u,this);break;case 2:p(r,u,this,arguments[1]);break;case 3:h(r,u,this,arguments[1],arguments[2]);break;case 4:f(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(n-1),i=1;i=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(var r=t,n=r+1,a=e.length;n=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return _(this,e,!0)},o.prototype.rawListeners=function(e){return _(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},o.prototype.listenerCount=b,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],106:[function(e,t,r){(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ "use strict";var n=e("base64-js"),a=e("ieee754"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=t,r.SlowBuffer=function(e){return+e!=e&&(e=0),t.alloc(+e)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,t.prototype),r}function t(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,r,n){if("string"==typeof e)return function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(e,r),a=s(n),i=a.write(e,r);return i!==n&&(a=a.slice(0,i)),a}(e,r);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return function(e,r,n){if(r<0||e.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(i)return a?-1:z(e).length;r=(""+r).toLowerCase(),i=!0}}function f(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,r,n,a,i){if(0===e.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+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 r&&(r=t.from(r,a)),t.isBuffer(r))return 0===r.length?-1:y(e,r,n,a,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):y(e,[r],n,a,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,a){var i,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var c=-1;for(i=r;is&&(r=s-l),i=r;i>=0;i--){for(var d=!0,p=0;pa&&(n=a):n=a;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a239?4:u>223?3:u>191?2:1;if(a+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(i=e[a+1]))&&(l=(31&u)<<6|63&i)>127&&(c=l);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(l=(15&u)<<12|(63&i)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),a+=d}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);for(var r="",n=0;nt&&(e+=" ... "),""},i&&(t.prototype[i]=t.prototype.inspect),t.prototype.compare=function(e,r,n,a,i){if(j(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===i&&(i=this.length),r<0||n>e.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(a>>>=0),s=(n>>>=0)-(r>>>=0),l=Math.min(o,s),u=this.slice(a,i),c=e.slice(r,n),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;aa)&&(r=a);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,r,n,a,i,o){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||re.length)throw new RangeError("Index out of range")}function I(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,i){return t=+t,r>>>=0,i||I(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return t=+t,r>>>=0,i||I(e,0,r,8),a.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,t>>>=0,r||D(e,t,this.length);for(var n=this[e],a=1,i=0;++i>>=0,t>>>=0,r||D(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var n=this[e],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},t.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);P(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);P(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,a){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),r>=e.length&&(r=e.length),r||(r=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-r=0;--o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,a),r);return i},t.prototype.fill=function(e,r,n,a){if("string"==typeof e){if("string"==typeof r?(a=r,r=0,n=this.length):"string"==typeof n&&(a=n,n=this.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!t.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===e.length){var i=e.charCodeAt(0);("utf8"===a&&i<128||"latin1"===a)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=r;o55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function N(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":75,buffer:106,ieee754:413}],107:[function(e,t,r){"use strict";var n=e("./lib/monotone"),a=e("./lib/triangulation"),i=e("./lib/delaunay"),o=e("./lib/filter");function s(e){return[Math.min(e[0],e[1]),Math.max(e[0],e[1])]}function l(e,t){return e[0]-t[0]||e[1]-t[1]}function u(e,t,r){return t in e?e[t]:r}t.exports=function(e,t,r){Array.isArray(t)?(r=r||{},t=t||[]):(r=t||{},t=[]);var c=!!u(r,"delaunay",!0),d=!!u(r,"interior",!0),p=!!u(r,"exterior",!0),h=!!u(r,"infinity",!1);if(!d&&!p||0===e.length)return[];var f=n(e,t);if(c||d!==p||h){for(var m=a(e.length,function(e){return e.map(s).sort(l)}(t)),g=0;g0;){for(var h=r.pop(),f=(s=r.pop(),c=-1,d=-1,l=o[s],1);f=0||(t.flip(s,h),a(e,t,r,c,s,d),a(e,t,r,s,d,c),a(e,t,r,d,h,c),a(e,t,r,h,c,d))}}},{"binary-search-bounds":112,"robust-in-sphere":506}],109:[function(e,t,r){"use strict";var n,a=e("binary-search-bounds");function i(e,t,r,n,a,i,o){this.cells=e,this.neighbor=t,this.flags=n,this.constraint=r,this.active=a,this.next=i,this.boundary=o}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}t.exports=function(e,t,r){var n=function(e,t){for(var r=e.cells(),n=r.length,a=0;a0||l.length>0;){for(;s.length>0;){var h=s.pop();if(u[h]!==-a){u[h]=a,c[h];for(var f=0;f<3;++f){var m=p[3*h+f];m>=0&&0===u[m]&&(d[3*h+f]?l.push(m):(s.push(m),u[m]=a))}}}var g=l;l=s,s=g,l.length=0,a=-a}var y=function(e,t,r){for(var n=0,a=0;a1&&a(r[p[h-2]],r[p[h-1]],i)>0;)e.push([p[h-1],p[h-2],o]),h-=1;p.length=h,p.push(o);var f=c.upperIds;for(h=f.length;h>1&&a(r[f[h-2]],r[f[h-1]],i)<0;)e.push([f[h-2],f[h-1],o]),h-=1;f.length=h,f.push(o)}}function h(e,t){var r;return(r=e.a[0]y[0]&&a.push(new u(y,g,s,d),new u(g,y,o,d))}a.sort(c);for(var v=a[0].a[0]-(1+Math.abs(a[0].a[0]))*Math.pow(2,-52),_=[new l([v,1],[v,0],-1,[],[],[],[])],b=[],x=(d=0,a.length);d=0}}(),i.removeTriangle=function(e,t,r){var n=this.stars;o(n[e],t,r),o(n[t],r,e),o(n[r],e,t)},i.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},i.opposite=function(e,t){for(var r=this.stars[t],n=1,a=r.length;n>>1,x=a[m]"];return a?t.indexOf("c")<0?i.push(";if(x===y){return m}else if(x<=y){"):i.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):i.push(";if(",t,"){i=m;"),r?i.push("l=m+1}else{h=m-1}"):i.push("h=m-1}else{l=m+1}"),i.push("}"),a?i.push("return -1};"):i.push("return i};"),i.join("")}function a(e,t,r,a){return new Function([n("A","x"+e+"y",t,["y"],a),n("P","c(x,y)"+e+"0",t,["y","c"],a),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}t.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],113:[function(e,t,r){"use strict";t.exports=function(e){for(var t=1,r=1;rr?r:e:et?t:e}},{}],117:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n;if(r){n=t;for(var a=new Array(t.length),i=0;it[2]?1:0)}function y(e,t,r){if(0!==e.length){if(t)for(var n=0;n=0;--i){var _=t[c=(C=n[i])[0]],b=_[0],x=_[1],w=e[b],k=e[x];if((w[0]-k[0]||w[1]-k[1])<0){var M=b;b=x,x=M}_[0]=b;var T,S=_[1]=C[1];for(a&&(T=_[2]);i>0&&n[i-1][0]===c;){var C,L=(C=n[--i])[1];a?t.push([S,L,T]):t.push([S,L]),S=L}a?t.push([S,x,T]):t.push([S,x])}return p}(e,t,p,g,r));return y(t,v,r),!!v||p.length>0||g.length>0}},{"./lib/rat-seg-intersect":118,"big-rat":79,"big-rat/cmp":77,"big-rat/to-float":91,"box-intersect":97,nextafter:452,"rat-vec":487,"robust-segment-intersect":511,"union-find":544}],118:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var i=s(t,e),d=s(n,r),p=c(i,d);if(0===o(p))return null;var h=s(e,r),f=c(d,h),m=a(f,p),g=u(i,m);return l(e,g)};var n=e("big-rat/mul"),a=e("big-rat/div"),i=e("big-rat/sub"),o=e("big-rat/sign"),s=e("rat-vec/sub"),l=e("rat-vec/add"),u=e("rat-vec/muls");function c(e,t){return i(n(e[0],t[1]),n(e[1],t[0]))}},{"big-rat/div":78,"big-rat/mul":88,"big-rat/sign":89,"big-rat/sub":90,"rat-vec/add":486,"rat-vec/muls":488,"rat-vec/sub":489}],119:[function(e,t,r){"use strict";var n=e("clamp");function a(e,t){null==t&&(t=!0);var r=e[0],a=e[1],i=e[2],o=e[3];return null==o&&(o=t?1:255),t&&(r*=255,a*=255,i*=255,o*=255),16777216*(r=255&n(r,0,255))+((a=255&n(a,0,255))<<16)+((i=255&n(i,0,255))<<8)+(o=255&n(o,0,255))}t.exports=a,t.exports.to=a,t.exports.from=function(e,t){var r=(e=+e)>>>24,n=(16711680&e)>>>16,a=(65280&e)>>>8,i=255&e;return!1===t?[r,n,a,i]:[r/255,n/255,a/255,i/255]}},{clamp:116}],120:[function(e,t,r){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],121:[function(e,t,r){"use strict";var n=e("color-rgba"),a=e("clamp"),i=e("dtype");t.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var r=new(i(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!=typeof e||((e=n(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:1):(r[0]=a(Math.floor(255*e[0]),0,255),r[1]=a(Math.floor(255*e[1]),0,255),r[2]=a(Math.floor(255*e[2]),0,255),r[3]=null==e[3]?255:a(Math.floor(255*e[3]),0,255)),r)}},{clamp:116,"color-rgba":123,dtype:170}],122:[function(e,r,n){(function(t){"use strict";var n=e("color-name"),a=e("is-plain-obj"),i=e("defined");r.exports=function(e){var r,s,l=[],u=1;if("string"==typeof e)if(n[e])l=n[e].slice(),s="rgb";else if("transparent"===e)u=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var c=(h=e.slice(1)).length;u=1,c<=4?(l=[parseInt(h[0]+h[0],16),parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16)],4===c&&(u=parseInt(h[3]+h[3],16)/255)):(l=[parseInt(h[0]+h[1],16),parseInt(h[2]+h[3],16),parseInt(h[4]+h[5],16)],8===c&&(u=parseInt(h[6]+h[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(r=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var d=r[1],p="rgb"===d,h=d.replace(/a$/,"");s=h,c="cmyk"===h?4:"gray"===h?1:3,l=r[2].trim().split(/\s*,\s*/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===h?255*parseFloat(e)/100:parseFloat(e);if("h"===h[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==o[e])return o[e]}return parseFloat(e)})),d===h&&l.push(1),u=p?1:void 0===l[c]?1:l[c],l=l.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(l=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),s=e.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(e))if(a(e)){var f=i(e.r,e.red,e.R,null);null!==f?(s="rgb",l=[f,i(e.g,e.green,e.G),i(e.b,e.blue,e.B)]):(s="hsl",l=[i(e.h,e.hue,e.H),i(e.s,e.saturation,e.S),i(e.l,e.lightness,e.L,e.b,e.brightness)]),u=i(e.a,e.alpha,e.opacity,1),null!=e.opacity&&(u/=100)}else(Array.isArray(e)||t.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e))&&(l=[e[0],e[1],e[2]],s="rgb",u=4===e.length?e[3]:1);else s="rgb",l=[e>>>16,(65280&e)>>>8,255&e];return{space:s,values:l,alpha:u}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":120,defined:165,"is-plain-obj":423}],123:[function(e,t,r){"use strict";var n=e("color-parse"),a=e("color-space/hsl"),i=e("clamp");t.exports=function(e){var t,r=n(e);return r.space?((t=Array(3))[0]=i(r.values[0],0,255),t[1]=i(r.values[1],0,255),t[2]=i(r.values[2],0,255),"h"===r.space[0]&&(t=a.rgb(t)),t.push(i(r.alpha,0,1)),t):[]}},{clamp:116,"color-parse":122,"color-space/hsl":124}],124:[function(e,t,r){"use strict";var n=e("./rgb");t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,a,i,o=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[i=255*l,i,i];t=2*l-(r=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(n=o+1/3*-(u-1))<0?n++:n>1&&n--,i=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,a[u]=255*i;return a}},n.hsl=function(e){var t,r,n=e[0]/255,a=e[1]/255,i=e[2]/255,o=Math.min(n,a,i),s=Math.max(n,a,i),l=s-o;return s===o?t=0:n===s?t=(a-i)/l:a===s?t=2+(i-n)/l:i===s&&(t=4+(n-a)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(o+s)/2,[t,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{"./rgb":125}],125:[function(e,t,r){"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],126:[function(e,t,r){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],127:[function(e,t,r){"use strict";var n=e("./colorScale"),a=e("lerp");function i(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function o(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}t.exports=function(e){var t,r,l,u,c,d,p,h,f,m;if(e||(e={}),h=(e.nshades||72)-1,p=e.format||"hex",(d=e.colormap)||(d="jet"),"string"==typeof d){if(d=d.toLowerCase(),!n[d])throw Error(d+" not a supported colorscale");c=n[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);c=d.slice()}if(c.length>h+1)throw new Error(d+" map requires nshades to be at least size "+c.length);f=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=c.map((function(e){return Math.round(e.index*h)})),f[0]=Math.min(Math.max(f[0],0),1),f[1]=Math.min(Math.max(f[1],0),1);var g=c.map((function(e,t){var r=c[t].index,n=c[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=f[0]+(f[1]-f[0])*r,n)})),y=[];for(m=0;m0?-1:l(e,t,i)?-1:1:0===s?u>0?1:l(e,t,r)?1:-1:a(u-s)}var p=n(e,t,r);return p>0?o>0&&n(e,t,i)>0?1:-1:p<0?o>0||n(e,t,i)>0?1:-1:n(e,t,i)>0?1:l(e,t,r)?1:-1};var n=e("robust-orientation"),a=e("signum"),i=e("two-sum"),o=e("robust-product"),s=e("robust-sum");function l(e,t,r){var n=i(e[0],-t[0]),a=i(e[1],-t[1]),l=i(r[0],-t[0]),u=i(r[1],-t[1]),c=s(o(n,l),o(a,u));return c[c.length-1]>=0}},{"robust-orientation":508,"robust-product":509,"robust-sum":513,signum:514,"two-sum":542}],129:[function(e,t,r){t.exports=function(e,t){var r=e.length,i=e.length-t.length;if(i)return i;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return e[0]+e[1]-t[0]-t[1]||n(e[0],e[1])-n(t[0],t[1]);case 3:var o=e[0]+e[1],s=t[0]+t[1];if(i=o+e[2]-(s+t[2]))return i;var l=n(e[0],e[1]),u=n(t[0],t[1]);return n(l,e[2])-n(u,t[2])||n(l+e[2],o)-n(u+t[2],s);case 4:var c=e[0],d=e[1],p=e[2],h=e[3],f=t[0],m=t[1],g=t[2],y=t[3];return c+d+p+h-(f+m+g+y)||n(c,d,p,h)-n(f,m,g,y,f)||n(c+d,c+p,c+h,d+p,d+h,p+h)-n(f+m,f+g,f+y,m+g,m+y,g+y)||n(c+d+p,c+d+h,c+p+h,d+p+h)-n(f+m+g,f+m+y,f+g+y,m+g+y);default:for(var v=e.slice().sort(a),_=t.slice().sort(a),b=0;be[r][0]&&(r=n);return tr?[[r],[t]]:[[t]]}},{}],133:[function(e,t,r){"use strict";t.exports=function(e){var t=n(e),r=t.length;if(r<=2)return[];for(var a=new Array(r),i=t[r-1],o=0;o=t[l]&&(s+=1);i[o]=s}}return e}(n(i,!0),r)}};var n=e("incremental-convex-hull"),a=e("affine-hull")},{"affine-hull":64,"incremental-convex-hull":414}],135:[function(e,t,r){t.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],136:[function(e,t,r){t.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],137:[function(e,t,r){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],138:[function(e,t,r){t.exports=["normal","italic","oblique"]},{}],139:[function(e,t,r){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],140:[function(e,t,r){"use strict";t.exports={parse:e("./parse"),stringify:e("./stringify")}},{"./parse":142,"./stringify":143}],141:[function(e,t,r){"use strict";var n=e("css-font-size-keywords");t.exports={isSize:function(e){return/^[\d\.]/.test(e)||-1!==e.indexOf("/")||-1!==n.indexOf(e)}}},{"css-font-size-keywords":136}],142:[function(e,t,r){"use strict";var n=e("unquote"),a=e("css-global-keywords"),i=e("css-system-font-keywords"),o=e("css-font-weight-keywords"),s=e("css-font-style-keywords"),l=e("css-font-stretch-keywords"),u=e("string-split-by"),c=e("./lib/util").isSize;t.exports=p;var d=p.cache={};function p(e){if("string"!=typeof e)throw new Error("Font argument must be a string.");if(d[e])return d[e];if(""===e)throw new Error("Cannot parse an empty string.");if(-1!==i.indexOf(e))return d[e]={system:e};for(var t,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},p=u(e,/\s+/);t=p.shift();){if(-1!==a.indexOf(t))return["style","variant","weight","stretch"].forEach((function(e){r[e]=t})),d[e]=r;if(-1===s.indexOf(t))if("normal"!==t&&"small-caps"!==t)if(-1===l.indexOf(t)){if(-1===o.indexOf(t)){if(c(t)){var f=u(t,"/");if(r.size=f[0],null!=f[1]?r.lineHeight=h(f[1]):"/"===p[0]&&(p.shift(),r.lineHeight=h(p.shift())),!p.length)throw new Error("Missing required font-family.");return r.family=u(p.join(" "),/\s*,\s*/).map(n),d[e]=r}throw new Error("Unknown or unsupported font token: "+t)}r.weight=t}else r.stretch=t;else r.variant=t;else r.style=t}throw new Error("Missing required font-size.")}function h(e){var t=parseFloat(e);return t.toString()===e?t:e}},{"./lib/util":141,"css-font-stretch-keywords":137,"css-font-style-keywords":138,"css-font-weight-keywords":139,"css-global-keywords":144,"css-system-font-keywords":145,"string-split-by":527,unquote:546}],143:[function(e,t,r){"use strict";var n=e("pick-by-alias"),a=e("./lib/util").isSize,i=m(e("css-global-keywords")),o=m(e("css-system-font-keywords")),s=m(e("css-font-weight-keywords")),l=m(e("css-font-style-keywords")),u=m(e("css-font-stretch-keywords")),c={normal:1,"small-caps":1},d={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},p="1rem",h="serif";function f(e,t){if(e&&!t[e]&&!i[e])throw Error("Unknown keyword `"+e+"`");return e}function m(e){for(var t={},r=0;r=0;--h)i[h]=u*e[h]+c*t[h]+d*r[h]+p*n[h];return i}return u*e+c*t+d*r+p*n},t.exports.derivative=function(e,t,r,n,a,i){var o=6*a*a-6*a,s=3*a*a-4*a+1,l=-6*a*a+6*a,u=3*a*a-2*a;if(e.length){i||(i=new Array(e.length));for(var c=e.length-1;c>=0;--c)i[c]=o*e[c]+s*t[c]+l*r[c]+u*n[c];return i}return o*e+s*t+l*r[c]+u*n}},{}],147:[function(e,t,r){"use strict";var n=e("./lib/thunk.js");function a(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}t.exports=function(e){var t=new a;t.pre=e.pre,t.body=e.body,t.post=e.post;var r=e.args.slice(0);t.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)t.scalarArgs.push(i),t.shimArgs.push("scalar"+i);else if("index"===o){if(t.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(t.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,n(t)}},{"./lib/thunk.js":149}],148:[function(e,t,r){"use strict";var n=e("uniq");function a(e,t,r){var n,a,i=e.length,o=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],u=[],c=0,d=0;for(n=0;n0&&l.push("var "+u.join(",")),n=i-1;n>=0;--n)c=e[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",d,"]-=s",d].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(e,t,r){for(var n=e.body,a=[],i=[],o=0;o0&&(r=r&&t[n]===t[n-1])}return r?t[0]:t.join("")}t.exports=function(e,t){for(var r=t[1].length-Math.abs(e.arrayBlockIndices[0])|0,s=new Array(e.arrayArgs.length),l=new Array(e.arrayArgs.length),u=0;u0&&_.push("shape=SS.slice(0)"),e.indexArgs.length>0){var b=new Array(r);for(u=0;u0&&v.push("var "+_.join(",")),u=0;u3&&v.push(i(e.pre,e,l));var M=i(e.body,e,l),T=function(e){for(var t=0,r=e[0].length;t0,u=[],c=0;c0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",t[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",t[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",t[c],"]=j",c].join(""));for(c=0;c3&&v.push(i(e.post,e,l)),e.debug&&console.log("-----Generated cwise routine for ",t,":\n"+v.join("\n")+"\n----------");var S=[e.funcName||"unnamed","_cwise_loop_",s[0].join("s"),"m",T,o(l)].join("");return new Function(["function ",S,"(",y.join(","),"){",v.join("\n"),"} return ",S].join(""))()}},{uniq:545}],149:[function(e,t,r){"use strict";var n=e("./compile.js");t.exports=function(e){var t=["'use strict'","var CACHED={}"],r=[],a=e.funcName+"_cwise_thunk";t.push(["return function ",a,"(",e.shimArgs.join(","),"){"].join(""));for(var i=[],o=[],s=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c0&&(l.push("array"+e.arrayArgs[0]+".shape.length===array"+d+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[c]))),u.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+d+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[c])+"]"))}for(e.arrayArgs.length>1&&(t.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),t.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),t.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}")),c=0;ct?1:e>=t?0:NaN}function r(e){return 1===e.length&&(e=function(e){return function(r,n){return t(e(r),n)}}(e)),{left:function(t,r,n,a){for(null==n&&(n=0),null==a&&(a=t.length);n>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(null==n&&(n=0),null==a&&(a=t.length);n>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}var n=r(t),a=n.right,i=n.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,n,a=e.length,i=0,o=-1,l=0,u=0;if(null==t)for(;++o1)return u/(i-1)}function u(e,t){var r=l(e,t);return r?Math.sqrt(r):r}function c(e,t){var r,n,a,i=e.length,o=-1;if(null==t){for(;++o=r)for(n=a=r;++or&&(n=r),a=r)for(n=a=r;++or&&(n=r),a=0?(i>=y?10:i>=v?5:i>=_?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=y?10:i>=v?5:i>=_?2:1)}function x(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),a=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/a;return i>=y?a*=10:i>=v?a*=5:i>=_&&(a*=2),t=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e);return o+(+r(e[i+1],i+1,e)-o)*(a-i)}}function M(e,t){var r,n,a=e.length,i=-1;if(null==t){for(;++i=r)for(n=r;++ir&&(n=r)}else for(;++i=r)for(n=r;++ir&&(n=r);return n}function T(e){if(!(a=e.length))return[];for(var t=-1,r=M(e,S),n=new Array(r);++te?1:t>=e?0:NaN},e.deviation=u,e.extent=c,e.histogram=function(){var e=m,t=c,r=w;function n(n){var i,o,s=n.length,l=new Array(s);for(i=0;id;)p.pop(),--h;var f,m=new Array(h+1);for(i=0;i<=h;++i)(f=m[i]=[]).x0=i>0?p[i-1]:c,f.x1=i=r)for(n=r;++in&&(n=r)}else for(;++i=r)for(n=r;++in&&(n=r);return n},e.mean=function(e,t){var r,n=e.length,a=n,i=-1,o=0;if(null==t)for(;++i=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,n=e.length-1,a=e[0],i=new Array(n<0?0:n);r0)return[e];if((n=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),i=new Array(a=Math.ceil(t-e+1));++s=l.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var s,u,d,p=-1,h=n.length,f=l[a++],m=r(),g=i();++pl.length)return r;var a,i=u[n-1];return null!=t&&n>=l.length?a=r.entries():(a=[],r.each((function(t,r){a.push({key:r,values:e(t,n)})}))),null!=i?a.sort((function(e,t){return i(e.key,t.key)})):a}(c(e,0,i,o),0)},key:function(e){return l.push(e),s},sortKeys:function(e){return u[l.length-1]=e,s},sortValues:function(t){return e=t,s},rollup:function(e){return t=e,s}}},e.set=u,e.map=r,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],155:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";function t(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function r(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function n(){}var a="\\s*([+-]?\\d+)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,u=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),c=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),d=new RegExp("^rgba\\("+[a,a,a,i]+"\\)$"),p=new RegExp("^rgba\\("+[o,o,o,i]+"\\)$"),h=new RegExp("^hsl\\("+[i,o,o]+"\\)$"),f=new RegExp("^hsla\\("+[i,o,o,i]+"\\)$"),m={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 g(e){var t;return e=(e+"").trim().toLowerCase(),(t=s.exec(e))?new x((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=l.exec(e))?y(parseInt(t[1],16)):(t=u.exec(e))?new x(t[1],t[2],t[3],1):(t=c.exec(e))?new x(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=d.exec(e))?v(t[1],t[2],t[3],t[4]):(t=p.exec(e))?v(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=h.exec(e))?k(t[1],t[2]/100,t[3]/100,1):(t=f.exec(e))?k(t[1],t[2]/100,t[3]/100,t[4]):m.hasOwnProperty(e)?y(m[e]):"transparent"===e?new x(NaN,NaN,NaN,0):null}function y(e){return new x(e>>16&255,e>>8&255,255&e,1)}function v(e,t,r,n){return n<=0&&(e=t=r=NaN),new x(e,t,r,n)}function _(e){return e instanceof n||(e=g(e)),e?new x((e=e.rgb()).r,e.g,e.b,e.opacity):new x}function b(e,t,r,n){return 1===arguments.length?_(e):new x(e,t,r,null==n?1:n)}function x(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function w(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function k(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new T(e,t,r,n)}function M(e,t,r,a){return 1===arguments.length?function(e){if(e instanceof T)return new T(e.h,e.s,e.l,e.opacity);if(e instanceof n||(e=g(e)),!e)return new T;if(e instanceof T)return e;var t=(e=e.rgb()).r/255,r=e.g/255,a=e.b/255,i=Math.min(t,r,a),o=Math.max(t,r,a),s=NaN,l=o-i,u=(o+i)/2;return l?(s=t===o?(r-a)/l+6*(r0&&u<1?0:s,new T(s,l,u,e.opacity)}(e):new T(e,t,r,null==a?1:a)}function T(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function S(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}t(n,g,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),t(x,b,r(n,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new x(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new x(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+w(this.r)+w(this.g)+w(this.b)},toString:function(){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+")")}})),t(T,M,r(n,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new T(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new T(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,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new x(S(e>=240?e-240:e+120,a,n),S(e,a,n),S(e<120?e+240:e-120,a,n),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}}));var C=Math.PI/180,L=180/Math.PI,A=.96422,E=1,D=.82521,P=4/29,I=6/29,O=3*I*I,F=I*I*I;function R(e){if(e instanceof N)return new N(e.l,e.a,e.b,e.opacity);if(e instanceof W){if(isNaN(e.h))return new N(e.l,0,0,e.opacity);var t=e.h*C;return new N(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof x||(e=_(e));var r,n,a=H(e.r),i=H(e.g),o=H(e.b),s=B((.2225045*a+.7168786*i+.0606169*o)/E);return a===i&&i===o?r=n=s:(r=B((.4360747*a+.3850649*i+.1430804*o)/A),n=B((.0139322*a+.0971045*i+.7141733*o)/D)),new N(116*s-16,500*(r-s),200*(s-n),e.opacity)}function z(e,t,r,n){return 1===arguments.length?R(e):new N(e,t,r,null==n?1:n)}function N(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function B(e){return e>F?Math.pow(e,1/3):e/O+P}function j(e){return e>I?e*e*e:O*(e-P)}function Y(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function H(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function V(e){if(e instanceof W)return new W(e.h,e.c,e.l,e.opacity);if(e instanceof N||(e=R(e)),0===e.a&&0===e.b)return new W(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*L;return new W(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function U(e,t,r,n){return 1===arguments.length?V(e):new W(e,t,r,null==n?1:n)}function W(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}t(N,z,r(n,{brighter:function(e){return new N(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new N(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new x(Y(3.1338561*(t=A*j(t))-1.6168667*(e=E*j(e))-.4906146*(r=D*j(r))),Y(-.9787684*t+1.9161415*e+.033454*r),Y(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),t(W,U,r(n,{brighter:function(e){return new W(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new W(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return R(this).rgb()}}));var q=-.14861,G=1.78277,K=-.29227,Z=-.90649,X=1.97294,J=X*Z,$=X*G,Q=G*K-Z*q;function ee(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof te)return new te(e.h,e.s,e.l,e.opacity);e instanceof x||(e=_(e));var t=e.r/255,r=e.g/255,n=e.b/255,a=(Q*n+J*t-$*r)/(Q+J-$),i=n-a,o=(X*(r-a)-K*i)/Z,s=Math.sqrt(o*o+i*i)/(X*a*(1-a)),l=s?Math.atan2(o,i)*L-120:NaN;return new te(l<0?l+360:l,s,a,e.opacity)}(e):new te(e,t,r,null==n?1:n)}function te(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}t(te,ee,r(n,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new te(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new te(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*C,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),a=Math.sin(e);return new x(255*(t+r*(q*n+G*a)),255*(t+r*(K*n+Z*a)),255*(t+r*(X*n)),this.opacity)}})),e.color=g,e.rgb=b,e.hsl=M,e.lab=z,e.hcl=U,e.lch=function(e,t,r,n){return 1===arguments.length?V(e):new W(r,t,e,null==n?1:n)},e.gray=function(e,t){return new N(e,0,0,null==t?1:t)},e.cubehelix=ee,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],156:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,a={};t=0&&(r=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}}))}function i(e,t){for(var r,n=0,a=e.length;n0)for(var r,n,a=new Array(r),i=0;ip+u||nh+u||ic.index){var d=p-s.x-s.vx,g=h-s.y-s.vy,y=d*d+g*g;ye.r&&(e.r=e[t].r)}function p(){if(r){var t,a,i=r.length;for(n=new Array(i),t=0;t=u)){(e.data!==r||e.next)&&(0===d&&(f+=(d=o())*d),0===p&&(f+=(p=o())*p),f1?(null==r?c.remove(e):c.set(e,v(r)),t):c.get(e)},find:function(t,r,n){var a,i,o,s,l,u=0,c=e.length;for(null==n?n=1/0:n*=n,u=0;u1?(p.on(e,r),t):p.on(e)}}},e.forceX=function(e){var t,r,n,a=i(.1);function o(e){for(var a,i=0,o=t.length;i=0;)t+=r[n].value;else t=1;e.value=t}function i(e,t){var r,n,a,i,s,c=new u(e),d=+e.value&&(c.value=e.value),p=[c];for(null==t&&(t=o);r=p.pop();)if(d&&(r.value=+r.data.value),(a=t(r.data))&&(s=a.length))for(r.children=new Array(s),i=s-1;i>=0;--i)p.push(n=r.children[i]=new u(a[i])),n.parent=r,n.depth=r.depth+1;return c.eachBefore(l)}function o(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function u(e){this.data=e,this.depth=this.height=0,this.parent=null}u.prototype=i.prototype={constructor:u,count:function(){return this.eachAfter(a)},each:function(e){var t,r,n,a,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(e(i),r=i.children)for(n=0,a=r.length;n=0;--r)a.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,a=n&&n.length;--a>=0;)r+=n[a].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),a=null;for(e=r.pop(),t=n.pop();e===t;)a=e,e=r.pop(),t=n.pop();return a}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var a=n.length;e!==r;)n.splice(a,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return i(this).eachBefore(s)}};var c=Array.prototype.slice;function d(e){for(var t,r,n=0,a=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(c.call(e))).length,i=[];n0&&r*r>n*n+a*a}function m(e,t){for(var r=0;r(o*=o)?(n=(u+o-a)/(2*u),i=Math.sqrt(Math.max(0,o/u-n*n)),r.x=e.x-n*s-i*l,r.y=e.y-n*l+i*s):(n=(u+a-o)/(2*u),i=Math.sqrt(Math.max(0,a/u-n*n)),r.x=t.x+n*s-i*l,r.y=t.y+n*l+i*s)):(r.x=t.x+r.r,r.y=t.y)}function b(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,a=t.y-e.y;return r>0&&r*r>n*n+a*a}function x(e){var t=e._,r=e.next._,n=t.r+r.r,a=(t.x*r.r+r.x*t.r)/n,i=(t.y*r.r+r.y*t.r)/n;return a*a+i*i}function w(e){this._=e,this.next=null,this.previous=null}function k(e){if(!(a=e.length))return 0;var t,r,n,a,i,o,s,l,u,c,p;if((t=e[0]).x=0,t.y=0,!(a>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(a>2))return t.r+r.r;_(r,t,n=e[2]),t=new w(t),r=new w(r),n=new w(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;sp&&(p=s),g=c*c*m,(h=Math.max(p/g,g/d))>f){c-=s;break}f=h}y.push(o={value:c,dice:l1?t:1)},r}(q),Z=function e(t){function r(e,r,n,a,i){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,u,c,d=-1,p=o.length,h=e.value;++d1?t:1)},r}(q);e.cluster=function(){var e=t,a=1,i=1,o=!1;function s(t){var s,l=0;t.eachAfter((function(t){var a=t.children;a?(t.x=function(e){return e.reduce(r,0)/e.length}(a),t.y=function(e){return 1+e.reduce(n,0)}(a)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var u=function(e){for(var t;t=e.children;)e=t[0];return e}(t),c=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),d=u.x-e(u,c)/2,p=c.x+e(c,u)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*a,e.y=(t.y-e.y)*i}:function(e){e.x=(e.x-d)/(p-d)*a,e.y=(1-(t.y?e.y/t.y:1))*i})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,a=+e[0],i=+e[1],s):o?null:[a,i]},s.nodeSize=function(e){return arguments.length?(o=!0,a=+e[0],i=+e[1],s):o?[a,i]:null},s},e.hierarchy=i,e.pack=function(){var e=null,t=1,r=1,n=S;function a(a){return a.x=t/2,a.y=r/2,e?a.eachBefore(A(e)).eachAfter(E(n,.5)).eachBefore(D(1)):a.eachBefore(A(L)).eachAfter(E(S,1)).eachAfter(E(n,a.r/Math.min(t,r))).eachBefore(D(Math.min(t,r)/(2*a.r))),a}return a.radius=function(t){return arguments.length?(e=M(t),a):e},a.size=function(e){return arguments.length?(t=+e[0],r=+e[1],a):[t,r]},a.padding=function(e){return arguments.length?(n="function"==typeof e?e:C(+e),a):n},a},e.packSiblings=function(e){return k(e),e},e.packEnclose=d,e.partition=function(){var e=1,t=1,r=0,n=!1;function a(a){var i=a.height+1;return a.x0=a.y0=r,a.x1=e,a.y1=t/i,a.eachBefore(function(e,t){return function(n){n.children&&I(n,n.x0,e*(n.depth+1)/t,n.x1,e*(n.depth+2)/t);var a=n.x0,i=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error("cycle");return i}return r.id=function(t){return arguments.length?(e=T(t),r):e},r.parentId=function(e){return arguments.length?(t=T(e),r):t},r},e.tree=function(){var e=B,t=1,r=1,n=null;function a(a){var l=function(e){for(var t,r,n,a,i,o=new U(e,0),s=[o];t=s.pop();)if(n=t._.children)for(t.children=new Array(i=n.length),a=i-1;a>=0;--a)s.push(r=t.children[a]=new U(n[a],a)),r.parent=t;return(o.parent=new U(null,0)).children=[o],o}(a);if(l.eachAfter(i),l.parent.m=-l.z,l.eachBefore(o),n)a.eachBefore(s);else{var u=a,c=a,d=a;a.eachBefore((function(e){e.xc.x&&(c=e),e.depth>d.depth&&(d=e)}));var p=u===c?1:e(u,c)/2,h=p-u.x,f=t/(c.x+p+h),m=r/(d.depth||1);a.eachBefore((function(e){e.x=(e.x+h)*f,e.y=e.depth*m}))}return a}function i(t){var r=t.children,n=t.parent.children,a=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var i=(r[0].z+r[r.length-1].z)/2;a?(t.z=a.z+e(t._,a._),t.m=t.z-i):t.z=i}else a&&(t.z=a.z+e(t._,a._));t.parent.A=function(t,r,n){if(r){for(var a,i=t,o=t,s=r,l=i.parent.children[0],u=i.m,c=o.m,d=s.m,p=l.m;s=Y(s),i=j(i),s&&i;)l=j(l),(o=Y(o)).a=t,(a=s.z+d-i.z-u+e(s._,i._))>0&&(H(V(s,t,n),t,a),u+=a,c+=a),d+=s.m,u+=i.m,p+=l.m,c+=o.m;s&&!Y(o)&&(o.t=s,o.m+=d-c),i&&!j(l)&&(l.t=i,l.m+=u-p,n=t)}return n}(t,a,t.parent.A||n[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return a.separation=function(t){return arguments.length?(e=t,a):e},a.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],a):n?null:[t,r]},a.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],a):n?[t,r]:null},a},e.treemap=function(){var e=K,t=!1,r=1,n=1,a=[0],i=S,o=S,s=S,l=S,u=S;function c(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(d),a=[0],t&&e.eachBefore(P),e}function d(t){var r=a[t.depth],n=t.x0+r,c=t.y0+r,d=t.x1-r,p=t.y1-r;d=r-1){var c=s[t];return c.x0=a,c.y0=i,c.x1=o,void(c.y1=l)}for(var d=u[t],p=n/2+d,h=t+1,f=r-1;h>>1;u[m]l-i){var v=(a*y+o*g)/n;e(t,h,g,a,i,v,l),e(h,r,y,v,i,o,l)}else{var _=(i*y+l*g)/n;e(t,h,g,a,i,o,_),e(h,r,y,a,_,o,l)}}(0,l,e.value,t,r,n,a)},e.treemapDice=I,e.treemapSlice=W,e.treemapSliceDice=function(e,t,r,n,a){(1&e.depth?W:I)(e,t,r,n,a)},e.treemapSquarify=K,e.treemapResquarify=Z,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],159:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-color")):a(n.d3=n.d3||{},n.d3)}(this,(function(e,t){"use strict";function r(e,t,r,n,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*r+(1+3*e+3*i-3*o)*n+o*a)/6}function n(e){var t=e.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[a],o=e[a+1],s=a>0?e[a-1]:2*i-o,l=a180||r<-180?r-360*Math.round(r/360):r):i(isNaN(e)?t:e)}function l(e){return 1==(e=+e)?u:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):i(isNaN(t)?r:t)}}function u(e,t){var r=t-e;return r?o(e,r):i(isNaN(e)?t:e)}var c=function e(r){var n=l(r);function a(e,r){var a=n((e=t.rgb(e)).r,(r=t.rgb(r)).r),i=n(e.g,r.g),o=n(e.b,r.b),s=u(e.opacity,r.opacity);return function(t){return e.r=a(t),e.g=i(t),e.b=o(t),e.opacity=s(t),e+""}}return a.gamma=e,a}(1);function d(e){return function(r){var n,a,i=r.length,o=new Array(i),s=new Array(i),l=new Array(i);for(n=0;ni&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:g(r,n)})),i=_.lastIndex;return i180?t+=360:t-e>180&&(e+=360),i.push({i:r.push(a(r)+"rotate(",null,n)-2,x:g(e,t)})):t&&r.push(a(r)+"rotate("+t+n)}(i.rotate,o.rotate,s,l),function(e,t,r,i){e!==t?i.push({i:r.push(a(r)+"skewX(",null,n)-2,x:g(e,t)}):t&&r.push(a(r)+"skewX("+t+n)}(i.skewX,o.skewX,s,l),function(e,t,r,n,i,o){if(e!==r||t!==n){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:g(e,r)},{i:s-2,x:g(t,n)})}else 1===r&&1===n||i.push(a(i)+"scale("+r+","+n+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(e){for(var t,r=-1,n=l.length;++r1e-6)if(Math.abs(d*l-u*c)>1e-6&&i){var h=n-o,f=a-s,m=l*l+u*u,g=h*h+f*f,y=Math.sqrt(m),v=Math.sqrt(p),_=i*Math.tan((t-Math.acos((m+p-g)/(2*y*v)))/2),b=_/v,x=_/y;Math.abs(b-1)>1e-6&&(this._+="L"+(e+b*c)+","+(r+b*d)),this._+="A"+i+","+i+",0,0,"+ +(d*h>c*f)+","+(this._x1=e+x*l)+","+(this._y1=r+x*u)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,a,i,o,s,l){e=+e,a=+a;var u=(i=+i)*Math.cos(o),c=i*Math.sin(o),d=e+u,p=a+c,h=1^l,f=l?o-s:s-o;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+d+","+p:(Math.abs(this._x1-d)>1e-6||Math.abs(this._y1-p)>1e-6)&&(this._+="L"+d+","+p),i&&(f<0&&(f=f%r+r),f>n?this._+="A"+i+","+i+",0,1,"+h+","+(e-u)+","+(a-c)+"A"+i+","+i+",0,1,"+h+","+(this._x1=d)+","+(this._y1=p):f>1e-6&&(this._+="A"+i+","+i+",0,"+ +(f>=t)+","+h+","+(this._x1=e+i*Math.cos(s))+","+(this._y1=a+i*Math.sin(s))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}},e.path=i,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],161:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";function t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var a,i,o,s,l,u,c,d,p,h=e._root,f={data:n},m=e._x0,g=e._y0,y=e._x1,v=e._y1;if(!h)return e._root=f,e;for(;h.length;)if((u=t>=(i=(m+y)/2))?m=i:y=i,(c=r>=(o=(g+v)/2))?g=o:v=o,a=h,!(h=h[d=c<<1|u]))return a[d]=f,e;if(s=+e._x.call(null,h.data),l=+e._y.call(null,h.data),t===s&&r===l)return f.next=h,a?a[d]=f:e._root=f,e;do{a=a?a[d]=new Array(4):e._root=new Array(4),(u=t>=(i=(m+y)/2))?m=i:y=i,(c=r>=(o=(g+v)/2))?g=o:v=o}while((d=c<<1|u)==(p=(l>=o)<<1|s>=i));return a[p]=h,a[d]=f,e}var r=function(e,t,r,n,a){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=a};function n(e){return e[0]}function a(e){return e[1]}function i(e,t,r){var i=new o(null==t?n:t,null==r?a:r,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function o(e,t,r,n,a,i){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=a,this._y1=i,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=i.prototype=o.prototype;l.copy=function(){var e,t,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var a=0;a<4;++a)(t=n.source[a])&&(t.length?e.push({source:t,target:n.target[a]=new Array(4)}):n.target[a]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),n=+this._y.call(null,e);return t(this.cover(r,n),r,n,e)},l.addAll=function(e){var r,n,a,i,o=e.length,s=new Array(o),l=new Array(o),u=1/0,c=1/0,d=-1/0,p=-1/0;for(n=0;nd&&(d=a),ip&&(p=i));for(de||e>a||n>t||t>i))return this;var o,s,l=a-r,u=this._root;switch(s=(t<(n+i)/2)<<1|e<(r+a)/2){case 0:do{(o=new Array(4))[s]=u,u=o}while(i=n+(l*=2),e>(a=r+l)||t>i);break;case 1:do{(o=new Array(4))[s]=u,u=o}while(i=n+(l*=2),(r=a-l)>e||t>i);break;case 2:do{(o=new Array(4))[s]=u,u=o}while(n=i-(l*=2),e>(a=r+l)||n>t);break;case 3:do{(o=new Array(4))[s]=u,u=o}while(n=i-(l*=2),(r=a-l)>e||n>t)}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=a,this._y1=i,this},l.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},l.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(e,t,n){var a,i,o,s,l,u,c,d=this._x0,p=this._y0,h=this._x1,f=this._y1,m=[],g=this._root;for(g&&m.push(new r(g,d,p,h,f)),null==n?n=1/0:(d=e-n,p=t-n,h=e+n,f=t+n,n*=n);u=m.pop();)if(!(!(g=u.node)||(i=u.x0)>h||(o=u.y0)>f||(s=u.x1)=v)<<1|e>=y)&&(u=m[m.length-1],m[m.length-1]=m[m.length-1-c],m[m.length-1-c]=u)}else{var _=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),x=_*_+b*b;if(x=(s=(f+g)/2))?f=s:g=s,(c=o>=(l=(m+y)/2))?m=l:y=l,t=h,!(h=h[d=c<<1|u]))return this;if(!h.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,p=d)}for(;h.data!==e;)if(n=h,!(h=h.next))return this;return(a=h.next)&&delete h.next,n?(a?n.next=a:delete n.next,this):t?(a?t[d]=a:delete t[d],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(r?r[p]=h:this._root=h),this):(this._root=a,this)},l.removeAll=function(e){for(var t=0,r=e.length;t=1?p:e<=-1?-p:Math.asin(e)}function m(e){return e.innerRadius}function g(e){return e.outerRadius}function y(e){return e.startAngle}function v(e){return e.endAngle}function _(e){return e&&e.padAngle}function b(e,t,r,n,a,i,s){var l=e-r,c=t-n,d=(s?i:-i)/u(l*l+c*c),p=d*c,h=-d*l,f=e+p,m=t+h,g=r+p,y=n+h,v=(f+g)/2,_=(m+y)/2,b=g-f,x=y-m,w=b*b+x*x,k=a-i,M=f*y-g*m,T=(x<0?-1:1)*u(o(0,k*k*w-M*M)),S=(M*x-b*T)/w,C=(-M*b-x*T)/w,L=(M*x+b*T)/w,A=(-M*b+x*T)/w,E=S-v,D=C-_,P=L-v,I=A-_;return E*E+D*D>P*P+I*I&&(S=L,C=A),{cx:S,cy:C,x01:-p,y01:-h,x11:S*(a/k-1),y11:C*(a/k-1)}}function x(e){this._context=e}function w(e){return new x(e)}function k(e){return e[0]}function M(e){return e[1]}function T(){var e=k,n=M,a=r(!0),i=null,o=w,s=null;function l(r){var l,u,c,d=r.length,p=!1;for(null==i&&(s=o(c=t.path())),l=0;l<=d;++l)!(l=d;--p)u.point(y[p],v[p]);u.lineEnd(),u.areaEnd()}g&&(y[c]=+e(h,c,r),v[c]=+a(h,c,r),u.point(n?+n(h,c,r):y[c],i?+i(h,c,r):v[c]))}if(f)return u=null,f+""||null}function d(){return T().defined(o).curve(l).context(s)}return c.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),n=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),c):e},c.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:r(+e),c):n},c.y=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),i=null,c):a},c.y0=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),c):a},c.y1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:r(+e),c):i},c.lineX0=c.lineY0=function(){return d().x(e).y(a)},c.lineY1=function(){return d().x(e).y(i)},c.lineX1=function(){return d().x(n).y(a)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),c):o},c.curve=function(e){return arguments.length?(l=e,null!=s&&(u=l(s)),c):l},c.context=function(e){return arguments.length?(null==e?s=u=null:u=l(s=e),c):s},c}function C(e,t){return te?1:t>=e?0:NaN}function L(e){return e}x.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)}}};var A=D(w);function E(e){this._curve=e}function D(e){function t(t){return new E(e(t))}return t._curve=e,t}function P(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(D(e)):t()._curve},e}function I(){return P(T().curve(A))}function O(){var e=S().curve(A),t=e.curve,r=e.lineX0,n=e.lineX1,a=e.lineY0,i=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 P(r())},delete e.lineX0,e.lineEndAngle=function(){return P(n())},delete e.lineX1,e.lineInnerRadius=function(){return P(a())},delete e.lineY0,e.lineOuterRadius=function(){return P(i())},delete e.lineY1,e.curve=function(e){return arguments.length?t(D(e)):t()._curve},e}function F(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}E.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 R=Array.prototype.slice;function z(e){return e.source}function N(e){return e.target}function B(e){var n=z,a=N,i=k,o=M,s=null;function l(){var r,l=R.call(arguments),u=n.apply(this,l),c=a.apply(this,l);if(s||(s=r=t.path()),e(s,+i.apply(this,(l[0]=u,l)),+o.apply(this,l),+i.apply(this,(l[0]=c,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(e){return arguments.length?(n=e,l):n},l.target=function(e){return arguments.length?(a=e,l):a},l.x=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),l):i},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function j(e,t,r,n,a){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,a,n,a)}function Y(e,t,r,n,a){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+a)/2,n,r,n,a)}function H(e,t,r,n,a){var i=F(t,r),o=F(t,r=(r+a)/2),s=F(n,r),l=F(n,a);e.moveTo(i[0],i[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var V={draw:function(e,t){var r=Math.sqrt(t/d);e.moveTo(r,0),e.arc(0,0,r,0,h)}},U={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},W=Math.sqrt(1/3),q=2*W,G={draw:function(e,t){var r=Math.sqrt(t/q),n=r*W;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},K=Math.sin(d/10)/Math.sin(7*d/10),Z=Math.sin(h/10)*K,X=-Math.cos(h/10)*K,J={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),n=Z*r,a=X*r;e.moveTo(0,-r),e.lineTo(n,a);for(var i=1;i<5;++i){var o=h*i/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},$={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}},Q=Math.sqrt(3),ee={draw:function(e,t){var r=-Math.sqrt(t/(3*Q));e.moveTo(0,2*r),e.lineTo(-Q*r,-r),e.lineTo(Q*r,-r),e.closePath()}},te=-.5,re=Math.sqrt(3)/2,ne=1/Math.sqrt(12),ae=3*(ne/2+1),ie={draw:function(e,t){var r=Math.sqrt(t/ae),n=r/2,a=r*ne,i=n,o=r*ne+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(te*n-re*a,re*n+te*a),e.lineTo(te*i-re*o,re*i+te*o),e.lineTo(te*s-re*l,re*s+te*l),e.lineTo(te*n+re*a,te*a-re*n),e.lineTo(te*i+re*o,te*o-re*i),e.lineTo(te*s+re*l,te*l-re*s),e.closePath()}},oe=[V,U,G,$,J,ee,ie];function se(){}function le(e,t,r){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+r)/6)}function ue(e){this._context=e}function ce(e){this._context=e}function de(e){this._context=e}function pe(e,t){this._basis=new ue(e),this._beta=t}ue.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:le(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:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ce.prototype={areaStart:se,areaEnd:se,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:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},de.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},pe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,a=e[0],i=t[0],o=e[r]-a,s=t[r]-i,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(a+n*o),this._beta*t[l]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var he=function e(t){function r(e){return 1===t?new ue(e):new pe(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function fe(e,t,r){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-r),e._x2,e._y2)}function me(e,t){this._context=e,this._k=(1-t)/6}me.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:fe(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:fe(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 ge=function e(t){function r(e){return new me(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ye(e,t){this._context=e,this._k=(1-t)/6}ye.prototype={areaStart:se,areaEnd:se,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:fe(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 ve=function e(t){function r(e){return new ye(e,t)}return r.tension=function(t){return e(+t)},r}(0);function _e(e,t){this._context=e,this._k=(1-t)/6}_e.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:fe(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 be=function e(t){function r(e){return new _e(e,t)}return r.tension=function(t){return e(+t)},r}(0);function xe(e,t,r){var n=e._x1,a=e._y1,i=e._x2,o=e._y2;if(e._l01_a>c){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);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>c){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/d,o=(o*u+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(n,a,i,o,e._x2,e._y2)}function we(e,t){this._context=e,this._alpha=t}we.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 r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:xe(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 ke=function e(t){function r(e){return t?new we(e,t):new me(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Me(e,t){this._context=e,this._alpha=t}Me.prototype={areaStart:se,areaEnd:se,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 r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:xe(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 Te=function e(t){function r(e){return t?new Me(e,t):new ye(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Se(e,t){this._context=e,this._alpha=t}Se.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 r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:xe(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 Ce=function e(t){function r(e){return t?new Se(e,t):new _e(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Le(e){this._context=e}function Ae(e){return e<0?-1:1}function Ee(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Ae(i)+Ae(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function De(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Pe(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Ie(e){this._context=e}function Oe(e){this._context=new Fe(e)}function Fe(e){this._context=e}function Re(e){this._context=e}function ze(e){var t,r,n=e.length-1,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t1)for(var r,n,a,i=1,o=e[t[0]],s=o.length;i=0;)r[t]=t;return r}function Ye(e,t){return e[t]}function He(e){var t=e.map(Ve);return je(e).sort((function(e,r){return t[e]-t[r]}))}function Ve(e){for(var t,r=-1,n=0,a=e.length,i=-1/0;++ri&&(i=t,n=r);return n}function Ue(e){var t=e.map(We);return je(e).sort((function(e,r){return t[e]-t[r]}))}function We(e){for(var t,r=0,n=-1,a=e.length;++n=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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=m,o=g,x=r(0),w=null,k=y,M=v,T=_,S=null;function C(){var r,m,g=+e.apply(this,arguments),y=+o.apply(this,arguments),v=k.apply(this,arguments)-p,_=M.apply(this,arguments)-p,C=n(_-v),L=_>v;if(S||(S=r=t.path()),yc)if(C>h-c)S.moveTo(y*i(v),y*l(v)),S.arc(0,0,y,v,_,!L),g>c&&(S.moveTo(g*i(_),g*l(_)),S.arc(0,0,g,_,v,L));else{var A,E,D=v,P=_,I=v,O=_,F=C,R=C,z=T.apply(this,arguments)/2,N=z>c&&(w?+w.apply(this,arguments):u(g*g+y*y)),B=s(n(y-g)/2,+x.apply(this,arguments)),j=B,Y=B;if(N>c){var H=f(N/g*l(z)),V=f(N/y*l(z));(F-=2*H)>c?(I+=H*=L?1:-1,O-=H):(F=0,I=O=(v+_)/2),(R-=2*V)>c?(D+=V*=L?1:-1,P-=V):(R=0,D=P=(v+_)/2)}var U=y*i(D),W=y*l(D),q=g*i(O),G=g*l(O);if(B>c){var K,Z=y*i(P),X=y*l(P),J=g*i(I),$=g*l(I);if(C1?0:e<-1?d:Math.acos(e)}((Q*te+ee*re)/(u(Q*Q+ee*ee)*u(te*te+re*re)))/2),ae=u(K[0]*K[0]+K[1]*K[1]);j=s(B,(g-ae)/(ne-1)),Y=s(B,(y-ae)/(ne+1))}}R>c?Y>c?(A=b(J,$,U,W,y,Y,L),E=b(Z,X,q,G,y,Y,L),S.moveTo(A.cx+A.x01,A.cy+A.y01),Yc&&F>c?j>c?(A=b(q,G,Z,X,g,-j,L),E=b(U,W,J,$,g,-j,L),S.lineTo(A.cx+A.x01,A.cy+A.y01),j0&&(f+=d);for(null!=t?m.sort((function(e,r){return t(g[e],g[r])})):null!=n&&m.sort((function(e,t){return n(r[e],r[t])})),s=0,u=f?(v-p*b)/f:0;s0?d*u:0)+b,g[l]={data:r[l],index:s,value:d,startAngle:y,endAngle:c,padAngle:_};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),s):i},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.areaRadial=O,e.radialArea=O,e.lineRadial=I,e.radialLine=I,e.pointRadial=F,e.linkHorizontal=function(){return B(j)},e.linkVertical=function(){return B(Y)},e.linkRadial=function(){var e=B(H);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e},e.symbol=function(){var e=r(V),n=r(64),a=null;function i(){var r;if(a||(a=r=t.path()),e.apply(this,arguments).draw(a,+n.apply(this,arguments)),r)return a=null,r+""||null}return i.type=function(t){return arguments.length?(e="function"==typeof t?t:r(t),i):e},i.size=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),i):n},i.context=function(e){return arguments.length?(a=null==e?null:e,i):a},i},e.symbols=oe,e.symbolCircle=V,e.symbolCross=U,e.symbolDiamond=G,e.symbolSquare=$,e.symbolStar=J,e.symbolTriangle=ee,e.symbolWye=ie,e.curveBasisClosed=function(e){return new ce(e)},e.curveBasisOpen=function(e){return new de(e)},e.curveBasis=function(e){return new ue(e)},e.curveBundle=he,e.curveCardinalClosed=ve,e.curveCardinalOpen=be,e.curveCardinal=ge,e.curveCatmullRomClosed=Te,e.curveCatmullRomOpen=Ce,e.curveCatmullRom=ke,e.curveLinearClosed=function(e){return new Le(e)},e.curveLinear=w,e.curveMonotoneX=function(e){return new Ie(e)},e.curveMonotoneY=function(e){return new Oe(e)},e.curveNatural=function(e){return new Re(e)},e.curveStep=function(e){return new Ne(e,.5)},e.curveStepAfter=function(e){return new Ne(e,1)},e.curveStepBefore=function(e){return new Ne(e,0)},e.stack=function(){var e=r([]),t=je,n=Be,a=Ye;function i(r){var i,o,s=e.apply(this,arguments),l=r.length,u=s.length,c=new Array(u);for(i=0;i0){for(var r,n,a,i=0,o=e[0].length;i1)for(var r,n,a,i,o,s,l=0,u=e[t[0]].length;l=0?(n[0]=i,n[1]=i+=a):a<0?(n[1]=o,n[0]=o+=a):n[0]=i},e.stackOffsetNone=Be,e.stackOffsetSilhouette=function(e,t){if((r=e.length)>0){for(var r,n=0,a=e[t[0]],i=a.length;n0&&(n=(r=e[t[0]]).length)>0){for(var r,n,a,i=0,o=1;o=0&&r._call.call(null,e),r=r._next;--n}function y(){l=(s=c.now())+u,n=a=0;try{g()}finally{n=0,function(){for(var e,n,a=t,i=1/0;a;)a._call?(i>a._time&&(i=a._time),e=a,a=a._next):(n=a._next,a._next=null,a=e?e._next=n:t=n);r=e,_(i)}(),l=0}}function v(){var e=c.now(),t=e-s;t>o&&(u-=t,s=e)}function _(e){n||(a&&(a=clearTimeout(a)),e-l>24?(e<1/0&&(a=setTimeout(y,e-c.now()-u)),i&&(i=clearInterval(i))):(i||(s=c.now(),i=setInterval(v,o)),n=1,d(y)))}f.prototype=m.prototype={constructor:f,restart:function(e,n,a){if("function"!=typeof e)throw new TypeError("callback is not a function");a=(null==a?p():+a)+(null==n?0:+n),this._next||r===this||(r?r._next=this:t=this,r=this),this._call=e,this._time=a,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}},e.now=p,e.timer=m,e.timerFlush=g,e.timeout=function(e,t,r){var n=new f;return t=null==t?0:+t,n.restart((function(r){n.stop(),e(r+t)}),t,r),n},e.interval=function(e,t,r){var n=new f,a=t;return null==t?(n.restart(e,t,r),n):(t=+t,r=null==r?p():+r,n.restart((function i(o){o+=a,n.restart(i,a+=t,r),e(o)}),t,r),n)},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],164:[function(e,t,r){!function(){var e={version:"3.5.17"},r=[].slice,n=function(e){return r.call(e)},a=this.document;function i(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(a)try{n(a.documentElement.childNodes)[0].nodeType}catch(e){n=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var s=this.Element.prototype,l=s.setAttribute,u=s.setAttributeNS,c=this.CSSStyleDeclaration.prototype,d=c.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,r){u.call(this,e,t,r+"")},c.setProperty=function(e,t,r){d.call(this,e,t+"",r)}}function p(e,t){return et?1:e>=t?0:NaN}function h(e){return null===e?NaN:+e}function f(e){return!isNaN(e)}function m(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}e.ascending=p,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},e.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},e.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=a=n;break}for(;++in&&(r=n),a=n){r=a=n;break}for(;++in&&(r=n),a1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t?Math.sqrt(t):t};var g=m(p);function y(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return p(e(t),r)}:e)},e.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var v=Math.abs;function _(e){for(var t=1;e*t%1;)t*=10;return t}function b(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function x(){this._=Object.create(null)}e.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("infinite range");var n,a=[],i=_(v(r)),o=-1;if(e*=i,t*=i,(r*=i)<0)for(;(n=e+r*++o)>t;)a.push(n/i);else for(;(n=e+r*++o)=a.length)return r?r.call(n,i):t?i.sort(t):i;for(var l,u,c,d,p=-1,h=i.length,f=a[s++],m=new x;++p=a.length)return t;var n=[],o=i[r++];return t.forEach((function(t,a){n.push({key:t,values:e(a,r)})})),o?n.sort((function(e,t){return o(e.key,t.key)})):n}(o(e.map,t,0),0)},n.key=function(e){return a.push(e),n},n.sortKeys=function(e){return i[a.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new D;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function U(e){return V(e,K),e}var W=function(e,t){return t.querySelector(e)},q=function(e,t){return t.querySelectorAll(e)},G=function(e,t){var r=e.matches||e[O(e,"matchesSelector")];return(G=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(W=function(e,t){return Sizzle(e,t)[0]||null},q=Sizzle,G=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var K=e.selection.prototype=[];function Z(e){return"function"==typeof e?e:function(){return W(e,this)}}function X(e){return"function"==typeof e?e:function(){return q(e,this)}}K.select=function(e){var t,r,n,a,i=[];e=Z(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),$.hasOwnProperty(r)?{space:$[r],local:e}:e}},K.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each(Q(r,t[r]));return this}return this.each(Q(t,r))},K.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=re(e)).length,a=-1;if(t=r.classList){for(;++a=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},K.sort=function(e){e=de.apply(this,arguments);for(var t=-1,r=this.length;++t=t&&(t=a+1);!(o=s[t])&&++t0&&(t=t.slice(0,o));var l=ye.get(t);function u(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return l&&(t=l,s=_e),o?r?function(){var e=s(r,n(arguments));u.call(this),this.addEventListener(t,this[i]=e,e.$=a),e._=r}:u:r?R:function(){var r,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var a in this)if(r=a.match(n)){var i=this[a];this.removeEventListener(r[1],i,i.$),delete this[a]}}}e.selection.enter=he,e.selection.enter.prototype=fe,fe.append=K.append,fe.empty=K.empty,fe.node=K.node,fe.call=K.call,fe.size=K.size,fe.select=function(e){for(var t,r,n,a,i,o=[],s=-1,l=this.length;++s0?1:e<0?-1:0}function Fe(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function Re(e){return e>1?0:e<-1?Le:Math.acos(e)}function ze(e){return e>1?De:e<-1?-De:Math.asin(e)}function Ne(e){return((e=Math.exp(e))+1/e)/2}function Be(e){return(e=Math.sin(e/2))*e}var je=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],s=t[0],l=t[1],u=t[2],c=s-a,d=l-i,p=c*c+d*d;if(p0&&(t=t.transition().duration(m)),t.call(w.event)}function C(){u&&u.domain(l.range().map((function(e){return(e-p.x)/p.k})).map(l.invert)),d&&d.domain(c.range().map((function(e){return(e-p.y)/p.k})).map(c.invert))}function L(e){g++||e({type:"zoomstart"})}function A(e){C(),e({type:"zoom",scale:p.k,translate:[p.x,p.y]})}function E(e){--g||(e({type:"zoomend"}),r=null)}function D(){var t=this,r=x.of(t,arguments),n=0,a=e.select(o(t)).on(v,(function(){n=1,T(e.mouse(t),i),A(r)})).on(_,(function(){a.on(v,null).on(_,null),s(n),E(r)})),i=k(e.mouse(t)),s=we(t);ws.call(t),L(r)}function P(){var t,r=this,n=x.of(r,arguments),a={},i=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,u="touchend"+o,c=[],d=e.select(r),h=we(r);function f(){var n=e.touches(r);return t=p.k,n.forEach((function(e){e.identifier in a&&(a[e.identifier]=k(e))})),n}function m(){var t=e.event.target;e.select(t).on(l,g).on(u,v),c.push(t);for(var n=e.event.changedTouches,o=0,d=n.length;o1){y=h[0];var _=h[1],b=y[0]-_[0],x=y[1]-_[1];i=b*b+x*x}}function g(){var o,l,u,c,d=e.touches(r);ws.call(r);for(var p=0,h=d.length;p360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new lt(i(e+120),i(e),i(e-120))}function Ke(t,r,n){return this instanceof Ke?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof Ke?new Ke(t.h,t.c,t.l):at(t instanceof Je?t.l:(t=mt((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ke(t,r,n)}qe.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,this.l/e)},qe.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,e*this.l)},qe.rgb=function(){return Ge(this.h,this.s,this.l)},e.hcl=Ke;var Ze=Ke.prototype=new Ue;function Xe(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Je(r,Math.cos(e*=Pe)*t,Math.sin(e)*t)}function Je(e,t,r){return this instanceof Je?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Je?new Je(e.l,e.a,e.b):e instanceof Ke?Xe(e.h,e.c,e.l):mt((e=lt(e)).r,e.g,e.b):new Je(e,t,r)}Ze.brighter=function(e){return new Ke(this.h,this.c,Math.min(100,this.l+$e*(arguments.length?e:1)))},Ze.darker=function(e){return new Ke(this.h,this.c,Math.max(0,this.l-$e*(arguments.length?e:1)))},Ze.rgb=function(){return Xe(this.h,this.c,this.l).rgb()},e.lab=Je;var $e=18,Qe=.95047,et=1,tt=1.08883,rt=Je.prototype=new Ue;function nt(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new lt(st(3.2404542*(a=it(a)*Qe)-1.5371385*(n=it(n)*et)-.4985314*(i=it(i)*tt)),st(-.969266*a+1.8760108*n+.041556*i),st(.0556434*a-.2040259*n+1.0572252*i))}function at(e,t,r){return e>0?new Ke(Math.atan2(r,t)*Ie,Math.sqrt(t*t+r*r),e):new Ke(NaN,NaN,e)}function it(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ot(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function st(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function lt(e,t,r){return this instanceof lt?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof lt?new lt(e.r,e.g,e.b):ht(""+e,lt,Ge):new lt(e,t,r)}function ut(e){return new lt(e>>16,e>>8&255,255&e)}function ct(e){return ut(e)+""}rt.brighter=function(e){return new Je(Math.min(100,this.l+$e*(arguments.length?e:1)),this.a,this.b)},rt.darker=function(e){return new Je(Math.max(0,this.l-$e*(arguments.length?e:1)),this.a,this.b)},rt.rgb=function(){return nt(this.l,this.a,this.b)},e.rgb=lt;var dt=lt.prototype=new Ue;function pt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ht(e,t,r){var n,a,i,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(yt(a[0]),yt(a[1]),yt(a[2]))}return(i=vt.get(e))?t(i.r,i.g,i.b):(null==e||"#"!==e.charAt(0)||isNaN(i=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&i)>>4,o|=o>>4,s=240&i,s|=s>>4,l=15&i,l|=l<<4):7===e.length&&(o=(16711680&i)>>16,s=(65280&i)>>8,l=255&i)),t(o,s,l))}function ft(e,t,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-i,l=(o+i)/2;return s?(a=l<.5?s/(o+i):s/(2-o-i),n=e==o?(t-r)/s+(t0&&l<1?0:n),new We(n,a,l)}function mt(e,t,r){var n=ot((.4124564*(e=gt(e))+.3575761*(t=gt(t))+.1804375*(r=gt(r)))/Qe),a=ot((.2126729*e+.7151522*t+.072175*r)/et);return Je(116*a-16,500*(n-a),200*(a-ot((.0193339*e+.119192*t+.9503041*r)/tt)))}function gt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function yt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}dt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=a.call(o,u)}catch(e){return void s.error.call(o,e)}s.load.call(o,e)}else s.error.call(o,u)}return!this.XDomainRequest||"withCredentials"in u||!/^(http(s)?:)?\/\//.test(t)||(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=d:u.onreadystatechange=function(){u.readyState>3&&d()},u.onprogress=function(t){var r=e.event;e.event=t;try{s.progress.call(o,u)}finally{e.event=r}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",o):r},o.responseType=function(e){return arguments.length?(c=e,o):c},o.response=function(e){return a=e,o},["get","post"].forEach((function(e){o[e]=function(){return o.send.apply(o,[e].concat(n(arguments)))}})),o.send=function(e,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),u.open(e,t,!0),null==r||"accept"in l||(l.accept=r+",*/*"),u.setRequestHeader)for(var i in l)u.setRequestHeader(i,l[i]);return null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=c&&(u.responseType=c),null!=a&&o.on("error",a).on("load",(function(e){a(null,e)})),s.beforesend.call(o,u),u.send(null==n?null:n),o},o.abort=function(){return u.abort(),o},e.rebind(o,s,"on"),null==i?o:o.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(i))}vt.forEach((function(e,t){vt.set(e,ut(t))})),e.functor=_t,e.xhr=bt(P),e.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=xt(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,(function(e,n){if(r)return r(e,n-1);var a=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");r=t?function(e,r){return t(a(e),r)}:a}))},a.parseRows=function(e,t){var r,a,i={},o={},s=[],l=e.length,u=0,c=0;function d(){if(u>=l)return o;if(a)return a=!1,i;var t=u;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(Tt),Tt=setTimeout(Lt,t)),Mt=0):(Mt=1,St(Lt))}function At(){for(var e=Date.now(),t=wt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Et(){for(var e,t=wt,r=1/0;t;)t.c?(t.t8?function(e){return e/r}:function(e){return e*r},symbol:e}}));function It(t){var r=t.decimal,n=t.thousands,a=t.grouping,i=t.currency,o=a&&n?function(e,t){for(var r=e.length,i=[],o=0,s=a[0],l=0;r>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),i.push(e.substring(r-=s,r+s)),!((l+=s+1)>t));)s=a[o=(o+1)%a.length];return i.reverse().join(n)}:P;return function(t){var n=Ot.exec(t),a=n[1]||" ",s=n[2]||">",l=n[3]||"-",u=n[4]||"",c=n[5],d=+n[6],p=n[7],h=n[8],f=n[9],m=1,g="",y="",v=!1,_=!0;switch(h&&(h=+h.substring(1)),(c||"0"===a&&"="===s)&&(c=a="0",s="="),f){case"n":p=!0,f="g";break;case"%":m=100,y="%",f="f";break;case"p":m=100,y="%",f="r";break;case"b":case"o":case"x":case"X":"#"===u&&(g="0"+f.toLowerCase());case"c":_=!1;case"d":v=!0,h=0;break;case"s":m=-1,f="r"}"$"===u&&(g=i[0],y=i[1]),"r"!=f||h||(f="g"),null!=h&&("g"==f?h=Math.max(1,Math.min(21,h)):"e"!=f&&"f"!=f||(h=Math.max(0,Math.min(20,h)))),f=Ft.get(f)||Rt;var b=c&&p;return function(t){var n=y;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(m<0){var u=e.formatPrefix(t,h);t=u.scale(t),n=u.symbol+y}else t*=m;var x,w,k=(t=f(t,h)).lastIndexOf(".");if(k<0){var M=_?t.lastIndexOf("e"):-1;M<0?(x=t,w=""):(x=t.substring(0,M),w=t.substring(M))}else x=t.substring(0,k),w=r+t.substring(k+1);!c&&p&&(x=o(x,1/0));var T=g.length+x.length+w.length+(b?0:i.length),S=T"===s?S+i+t:"^"===s?S.substring(0,T>>=1)+i+t+S.substring(T):i+(b?t:S+t))+n}}}e.formatPrefix=function(t,r){var n=0;return(t=+t)&&(t<0&&(t*=-1),r&&(t=e.round(t,Dt(t,r))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Pt[8+n/3]};var Ot=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ft=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,r){return(t=e.round(t,Dt(t,r))).toFixed(Math.max(0,Math.min(20,Dt(t*(1+1e-15),r))))}});function Rt(e){return e+""}var zt=e.time={},Nt=Date;function Bt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Bt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){jt.setUTCDate.apply(this._,arguments)},setDay:function(){jt.setUTCDay.apply(this._,arguments)},setFullYear:function(){jt.setUTCFullYear.apply(this._,arguments)},setHours:function(){jt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){jt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){jt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){jt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){jt.setUTCSeconds.apply(this._,arguments)},setTime:function(){jt.setTime.apply(this._,arguments)}};var jt=Date.prototype;function Yt(e,t,r){function n(t){var r=e(t),n=i(r,1);return t-r1)for(;o=u)return-1;if(37===(a=t.charCodeAt(s++))){if(o=t.charAt(s++),!(i=w[o in Ut?t.charAt(s++):o])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}c.utc=function(e){var t=c(e);function r(e){try{var r=new(Nt=Bt);return r._=e,t(r)}finally{Nt=Date}}return r.parse=function(e){try{Nt=Bt;var r=t.parse(e);return r&&r._}finally{Nt=Date}},r.toString=t.toString,r},c.multi=c.utc.multi=dr;var p=e.map(),h=Kt(o),f=Zt(o),m=Kt(s),g=Zt(s),y=Kt(l),v=Zt(l),_=Kt(u),b=Zt(u);i.forEach((function(e,t){p.set(e.toLowerCase(),t)}));var x={a:function(e){return s[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:c(r),d:function(e,t){return Gt(e.getDate(),t,2)},e:function(e,t){return Gt(e.getDate(),t,2)},H:function(e,t){return Gt(e.getHours(),t,2)},I:function(e,t){return Gt(e.getHours()%12||12,t,2)},j:function(e,t){return Gt(1+zt.dayOfYear(e),t,3)},L:function(e,t){return Gt(e.getMilliseconds(),t,3)},m:function(e,t){return Gt(e.getMonth()+1,t,2)},M:function(e,t){return Gt(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return Gt(e.getSeconds(),t,2)},U:function(e,t){return Gt(zt.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Gt(zt.mondayOfYear(e),t,2)},x:c(n),X:c(a),y:function(e,t){return Gt(e.getFullYear()%100,t,2)},Y:function(e,t){return Gt(e.getFullYear()%1e4,t,4)},Z:ur,"%":function(){return"%"}},w={a:function(e,t,r){m.lastIndex=0;var n=m.exec(t.slice(r));return n?(e.w=g.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(e,t,r){h.lastIndex=0;var n=h.exec(t.slice(r));return n?(e.w=f.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(e,t,r){_.lastIndex=0;var n=_.exec(t.slice(r));return n?(e.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(e,t,r){y.lastIndex=0;var n=y.exec(t.slice(r));return n?(e.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(e,t,r){return d(e,x.c.toString(),t,r)},d:nr,e:nr,H:ir,I:ir,j:ar,L:lr,m:rr,M:or,p:function(e,t,r){var n=p.get(t.slice(r,r+=2).toLowerCase());return null==n?-1:(e.p=n,r)},S:sr,U:Jt,w:Xt,W:$t,x:function(e,t,r){return d(e,x.x.toString(),t,r)},X:function(e,t,r){return d(e,x.X.toString(),t,r)},y:er,Y:Qt,Z:tr,"%":cr};return c}zt.year=Yt((function(e){return(e=zt.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),zt.years=zt.year.range,zt.years.utc=zt.year.utc.range,zt.day=Yt((function(e){var t=new Nt(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),zt.days=zt.day.range,zt.days.utc=zt.day.utc.range,zt.dayOfYear=function(e){var t=zt.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var r=zt[e]=Yt((function(e){return(e=zt.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var r=zt.year(e).getDay();return Math.floor((zt.dayOfYear(e)+(r+t)%7)/7)-(r!==t)}));zt[e+"s"]=r.range,zt[e+"s"].utc=r.utc.range,zt[e+"OfYear"]=function(e){var r=zt.year(e).getDay();return Math.floor((zt.dayOfYear(e)+(r+t)%7)/7)}})),zt.week=zt.sunday,zt.weeks=zt.sunday.range,zt.weeks.utc=zt.sunday.utc.range,zt.weekOfYear=zt.sundayOfYear;var Ut={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,qt=/^%/;function Gt(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i68?1900:2e3),r+a[0].length):-1}function tr(e,t,r){return/^[+-]\d{4}$/.test(t=t.slice(r,r+5))?(e.Z=-t,r+5):-1}function rr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function nr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function ar(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+3));return n?(e.j=+n[0],r+n[0].length):-1}function ir(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function or(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function sr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function lr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ur(e){var t=e.getTimezoneOffset(),r=t>0?"-":"+",n=v(t)/60|0,a=v(t)%60;return r+Gt(n,"0",2)+Gt(a,"0",2)}function cr(e,t,r){qt.lastIndex=0;var n=qt.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function dr(e){for(var t=e.length,r=-1;++r=0?1:-1,s=o*i,l=Math.cos(t),u=Math.sin(t),c=a*u,d=n*l+c*Math.cos(s),p=c*o*Math.sin(s);Ir.add(Math.atan2(p,d)),r=e,n=l,a=u}Or.point=function(o,s){Or.point=i,r=(e=o)*Pe,n=Math.cos(s=(t=s)*Pe/2+Le/4),a=Math.sin(s)},Or.lineEnd=function(){i(e,t)}}function Rr(e){var t=e[0],r=e[1],n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function zr(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Nr(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Br(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function jr(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Yr(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Hr(e){return[Math.atan2(e[1],e[0]),ze(e[2])]}function Vr(e,t){return v(e[0]-t[0])Se?a=90:u<-Se&&(r=-90),d[0]=t,d[1]=n}};function h(e,i){c.push(d=[t=e,n=e]),ia&&(a=i)}function f(e,o){var s=Rr([e*Pe,o*Pe]);if(l){var u=Nr(l,s),c=Nr([u[1],-u[0],0],u);Yr(c),c=Hr(c);var d=e-i,p=d>0?1:-1,f=c[0]*Ie*p,m=v(d)>180;if(m^(p*ia&&(a=g);else if(m^(p*i<(f=(f+360)%360-180)&&fa&&(a=o);m?ex(t,n)&&(n=e):x(e,n)>x(t,n)&&(t=e):n>=t?(en&&(n=e)):e>i?x(t,e)>x(t,n)&&(n=e):x(e,n)>x(t,n)&&(t=e)}else h(e,o);l=s,i=e}function m(){p.point=f}function g(){d[0]=t,d[1]=n,p.point=h,l=null}function y(e,t){if(l){var r=e-i;u+=v(r)>180?r+(r>0?360:-360):r}else o=e,s=t;Or.point(e,t),f(e,t)}function _(){Or.lineStart()}function b(){y(o,s),Or.lineEnd(),v(u)>Se&&(t=-(n=180)),d[0]=t,d[1]=n,l=null}function x(e,t){return(t-=e)<0?t+360:t}function w(e,t){return e[0]-t[0]}function k(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:ex(m[0],m[1])&&(m[1]=h[1]),x(h[0],m[1])>x(m[0],m[1])&&(m[0]=h[0])):s.push(m=h);for(var l,u,h,f=-1/0,m=(o=0,s[u=s.length-1]);o<=u;m=h,++o)h=s[o],(l=x(m[1],h[0]))>f&&(f=l,t=h[0],n=m[1])}return c=d=null,t===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,r],[n,a]]}}(),e.geo.centroid=function(t){wr=kr=Mr=Tr=Sr=Cr=Lr=Ar=Er=Dr=Pr=0,e.geo.stream(t,Ur);var r=Er,n=Dr,a=Pr,i=r*r+n*n+a*a;return i=0;--s)a.point((d=c[s])[0],d[1]);else n(h.x,h.p.x,-1,a);h=h.p}c=(h=h.o).z,f=!f}while(!h.v);a.lineEnd()}}}function Qr(e){if(t=e.length){for(var t,r,n=0,a=e[0];++n=0?1:-1,k=w*x,M=k>Le,T=f*_;if(Ir.add(Math.atan2(T*w*Math.sin(k),m*b+T*Math.cos(k))),i+=M?x+w*Ae:x,M^p>=r^y>=r){var S=Nr(Rr(d),Rr(e));Yr(S);var C=Nr(a,S);Yr(C);var L=(M^x>=0?-1:1)*ze(C[2]);(n>L||n===L&&(S[0]||S[1]))&&(o+=M^x>=0?1:-1)}if(!g++)break;p=y,f=_,m=b,d=e}}return(i<-Se||i0){for(_||(o.polygonStart(),_=!0),o.lineStart();++i1&&2&t&&r.push(r.pop().concat(r.shift())),s.push(r.filter(rn))}return c}}function rn(e){return e.length>1}function nn(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,r){e.push([t,r])},lineEnd:R,buffer:function(){var r=t;return t=[],e=null,r},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function an(e,t){return((e=e.x)[0]<0?e[1]-De-Se:De-e[1])-((t=t.x)[0]<0?t[1]-De-Se:De-t[1])}var on=tn(Jr,(function(e){var t,r=NaN,n=NaN,a=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(i,o){var s=i>0?Le:-Le,l=v(i-r);v(l-Le)0?De:-De),e.point(a,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(i,n),t=0):a!==s&&l>=Le&&(v(r-a)Se?Math.atan((Math.sin(t)*(i=Math.cos(n))*Math.sin(r)-Math.sin(n)*(a=Math.cos(t))*Math.sin(e))/(a*i*o)):(t+n)/2}(r,n,i,o),e.point(a,n),e.lineEnd(),e.lineStart(),e.point(s,n),t=0),e.point(r=i,n=o),a=s},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}}),(function(e,t,r,n){var a;if(null==e)a=r*De,n.point(-Le,a),n.point(0,a),n.point(Le,a),n.point(Le,0),n.point(Le,-a),n.point(0,-a),n.point(-Le,-a),n.point(-Le,0),n.point(-Le,a);else if(v(e[0]-t[0])>Se){var i=e[0]0,n=v(t)>Se;return tn(a,(function(e){var t,s,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,p){var h,f=[d,p],m=a(d,p),g=r?m?0:o(d,p):m?o(d+(d<0?Le:-Le),p):0;if(!t&&(u=l=m)&&e.lineStart(),m!==l&&(h=i(t,f),(Vr(t,h)||Vr(f,h))&&(f[0]+=Se,f[1]+=Se,m=a(f[0],f[1]))),m!==l)c=0,m?(e.lineStart(),h=i(f,t),e.point(h[0],h[1])):(h=i(t,f),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(n&&t&&r^m){var y;g&s||!(y=i(f,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])))}!m||t&&Vr(t,f)||e.point(f[0],f[1]),t=f,l=m,s=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return c|(u&&l)<<1}}}),Un(e,6*Pe),r?[0,-e]:[-Le,e-Le]);function a(e,r){return Math.cos(e)*Math.cos(r)>t}function i(e,r,n){var a=[1,0,0],i=Nr(Rr(e),Rr(r)),o=zr(i,i),s=i[0],l=o-s*s;if(!l)return!n&&e;var u=t*o/l,c=-t*s/l,d=Nr(a,i),p=jr(a,u);Br(p,jr(i,c));var h=d,f=zr(p,h),m=zr(h,h),g=f*f-m*(zr(p,p)-1);if(!(g<0)){var y=Math.sqrt(g),_=jr(h,(-f-y)/m);if(Br(_,p),_=Hr(_),!n)return _;var b,x=e[0],w=r[0],k=e[1],M=r[1];w0^_[1]<(v(_[0]-x)Le^(x<=_[0]&&_[0]<=w)){var C=jr(h,(-f+y)/m);return Br(C,p),[_,Hr(C)]}}}function o(t,n){var a=r?e:Le-e,i=0;return t<-a?i|=1:t>a&&(i|=2),n<-a?i|=4:n>a&&(i|=8),i}}function ln(e,t,r,n){return function(a){var i,o=a.a,s=a.b,l=o.x,u=o.y,c=0,d=1,p=s.x-l,h=s.y-u;if(i=e-l,p||!(i>0)){if(i/=p,p<0){if(i0){if(i>d)return;i>c&&(c=i)}if(i=r-l,p||!(i<0)){if(i/=p,p<0){if(i>d)return;i>c&&(c=i)}else if(p>0){if(i0)){if(i/=h,h<0){if(i0){if(i>d)return;i>c&&(c=i)}if(i=n-u,h||!(i<0)){if(i/=h,h<0){if(i>d)return;i>c&&(c=i)}else if(h>0){if(i0&&(a.a={x:l+c*p,y:u+c*h}),d<1&&(a.b={x:l+d*p,y:u+d*h}),a}}}}}}var un=1e9;function cn(t,r,n,a){return function(l){var u,c,d,p,h,f,m,g,y,v,_,b=l,x=nn(),w=ln(t,r,n,a),k={point:S,lineStart:function(){k.point=C,c&&c.push(d=[]),v=!0,y=!1,m=g=NaN},lineEnd:function(){u&&(C(p,h),f&&y&&x.rejoin(),u.push(x.buffer())),k.point=S,y&&l.lineEnd()},polygonStart:function(){l=x,u=[],c=[],_=!0},polygonEnd:function(){l=b,u=e.merge(u);var r=function(e){for(var t=0,r=c.length,n=e[1],a=0;an&&Fe(u,i,e)>0&&++t:i[1]<=n&&Fe(u,i,e)<0&&--t,u=i;return 0!==t}([t,a]),n=_&&r,i=u.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),M(null,null,1,l),l.lineEnd()),i&&$r(u,o,r,M,l),l.polygonEnd()),u=c=d=null}};function M(e,o,l,u){var c=0,d=0;if(null==e||(c=i(e,l))!==(d=i(o,l))||s(e,o)<0^l>0)do{u.point(0===c||3===c?t:n,c>1?a:r)}while((c=(c+l+4)%4)!==d);else u.point(o[0],o[1])}function T(e,i){return t<=e&&e<=n&&r<=i&&i<=a}function S(e,t){T(e,t)&&l.point(e,t)}function C(e,t){var r=T(e=Math.max(-un,Math.min(un,e)),t=Math.max(-un,Math.min(un,t)));if(c&&d.push([e,t]),v)p=e,h=t,f=r,v=!1,r&&(l.lineStart(),l.point(e,t));else if(r&&y)l.point(e,t);else{var n={a:{x:m,y:g},b:{x:e,y:t}};w(n)?(y||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),_=!1):r&&(l.lineStart(),l.point(e,t),_=!1)}m=e,g=t,y=r}return k};function i(e,a){return v(e[0]-t)0?0:3:v(e[0]-n)0?2:1:v(e[1]-r)0?1:0:a>0?3:2}function o(e,t){return s(e.x,t.x)}function s(e,t){var r=i(e,1),n=i(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}}function dn(e){var t=0,r=Le/3,n=Rn(e),a=n(t,r);return a.parallels=function(e){return arguments.length?n(t=e[0]*Le/180,r=e[1]*Le/180):[t/Le*180,r/Le*180]},a}function pn(e,t){var r=Math.sin(e),n=(r+Math.sin(t))/2,a=1+r*(2*n-r),i=Math.sqrt(a)/n;function o(e,t){var r=Math.sqrt(a-2*n*Math.sin(t))/n;return[r*Math.sin(e*=n),i-r*Math.cos(e)]}return o.invert=function(e,t){var r=i-t;return[Math.atan2(e,r)/n,ze((a-(e*e+r*r)*n*n)/(2*n))]},o}e.geo.clipExtent=function(){var e,t,r,n,a,i,o={stream:function(e){return a&&(a.valid=!1),(a=i(e)).valid=!0,a},extent:function(s){return arguments.length?(i=cn(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1]),a&&(a.valid=!1,a=null),o):[[e,t],[r,n]]}};return o.extent([[0,0],[960,500]])},(e.geo.conicEqualArea=function(){return dn(pn)}).raw=pn,e.geo.albers=function(){return e.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},e.geo.albersUsa=function(){var t,r,n,a,i=e.geo.albers(),o=e.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=e.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,r){t=[e,r]}};function u(e){var i=e[0],o=e[1];return t=null,r(i,o),t||(n(i,o),t)||a(i,o),t}return u.invert=function(e){var t=i.scale(),r=i.translate(),n=(e[0]-r[0])/t,a=(e[1]-r[1])/t;return(a>=.12&&a<.234&&n>=-.425&&n<-.214?o:a>=.166&&a<.234&&n>=-.214&&n<-.115?s:i).invert(e)},u.stream=function(e){var t=i.stream(e),r=o.stream(e),n=s.stream(e);return{point:function(e,a){t.point(e,a),r.point(e,a),n.point(e,a)},sphere:function(){t.sphere(),r.sphere(),n.sphere()},lineStart:function(){t.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){t.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){t.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){t.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},u.precision=function(e){return arguments.length?(i.precision(e),o.precision(e),s.precision(e),u):i.precision()},u.scale=function(e){return arguments.length?(i.scale(e),o.scale(.35*e),s.scale(e),u.translate(i.translate())):i.scale()},u.translate=function(e){if(!arguments.length)return i.translate();var t=i.scale(),c=+e[0],d=+e[1];return r=i.translate(e).clipExtent([[c-.455*t,d-.238*t],[c+.455*t,d+.238*t]]).stream(l).point,n=o.translate([c-.307*t,d+.201*t]).clipExtent([[c-.425*t+Se,d+.12*t+Se],[c-.214*t-Se,d+.234*t-Se]]).stream(l).point,a=s.translate([c-.205*t,d+.212*t]).clipExtent([[c-.214*t+Se,d+.166*t+Se],[c-.115*t-Se,d+.234*t-Se]]).stream(l).point,u},u.scale(1070)};var hn,fn,mn,gn,yn,vn,_n={point:R,lineStart:R,lineEnd:R,polygonStart:function(){fn=0,_n.lineStart=bn},polygonEnd:function(){_n.lineStart=_n.lineEnd=_n.point=R,hn+=v(fn/2)}};function bn(){var e,t,r,n;function a(e,t){fn+=n*e-r*t,r=e,n=t}_n.point=function(i,o){_n.point=a,e=r=i,t=n=o},_n.lineEnd=function(){a(e,t)}}var xn={point:function(e,t){eyn&&(yn=e),tvn&&(vn=t)},lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R};function wn(){var e=kn(4.5),t=[],r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=kn(t),r},result:function(){if(t.length){var e=t.join("");return t=[],e}}};function n(r,n){t.push("M",r,",",n,e)}function a(e,n){t.push("M",e,",",n),r.point=i}function i(e,r){t.push("L",e,",",r)}function o(){r.point=n}function s(){t.push("Z")}return r}function kn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var Mn,Tn={point:Sn,lineStart:Cn,lineEnd:Ln,polygonStart:function(){Tn.lineStart=An},polygonEnd:function(){Tn.point=Sn,Tn.lineStart=Cn,Tn.lineEnd=Ln}};function Sn(e,t){Mr+=e,Tr+=t,++Sr}function Cn(){var e,t;function r(r,n){var a=r-e,i=n-t,o=Math.sqrt(a*a+i*i);Cr+=o*(e+r)/2,Lr+=o*(t+n)/2,Ar+=o,Sn(e=r,t=n)}Tn.point=function(n,a){Tn.point=r,Sn(e=n,t=a)}}function Ln(){Tn.point=Sn}function An(){var e,t,r,n;function a(e,t){var a=e-r,i=t-n,o=Math.sqrt(a*a+i*i);Cr+=o*(r+e)/2,Lr+=o*(n+t)/2,Ar+=o,Er+=(o=n*e-r*t)*(r+e),Dr+=o*(n+t),Pr+=3*o,Sn(r=e,n=t)}Tn.point=function(i,o){Tn.point=a,Sn(e=r=i,t=n=o)},Tn.lineEnd=function(){a(e,t)}}function En(e){var t=4.5,r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=e,r},result:R};function n(r,n){e.moveTo(r+t,n),e.arc(r,n,t,0,Ae)}function a(t,n){e.moveTo(t,n),r.point=i}function i(t,r){e.lineTo(t,r)}function o(){r.point=n}function s(){e.closePath()}return r}function Dn(e){var t=.5,r=Math.cos(30*Pe),n=16;function a(e){return(n?o:i)(e)}function i(t){return On(t,(function(r,n){r=e(r,n),t.point(r[0],r[1])}))}function o(t){var r,a,i,o,l,u,c,d,p,h,f,m,g={point:y,lineStart:v,lineEnd:b,polygonStart:function(){t.polygonStart(),g.lineStart=x},polygonEnd:function(){t.polygonEnd(),g.lineStart=v}};function y(r,n){r=e(r,n),t.point(r[0],r[1])}function v(){d=NaN,g.point=_,t.lineStart()}function _(r,a){var i=Rr([r,a]),o=e(r,a);s(d,p,c,h,f,m,d=o[0],p=o[1],c=r,h=i[0],f=i[1],m=i[2],n,t),t.point(d,p)}function b(){g.point=y,t.lineEnd()}function x(){v(),g.point=w,g.lineEnd=k}function w(e,t){_(r=e,t),a=d,i=p,o=h,l=f,u=m,g.point=_}function k(){s(d,p,c,h,f,m,a,i,r,o,l,u,n,t),g.lineEnd=b,b()}return g}function s(n,a,i,o,l,u,c,d,p,h,f,m,g,y){var _=c-n,b=d-a,x=_*_+b*b;if(x>4*t&&g--){var w=o+h,k=l+f,M=u+m,T=Math.sqrt(w*w+k*k+M*M),S=Math.asin(M/=T),C=v(v(M)-1)t||v((_*D+b*P)/x-.5)>.3||o*h+l*f+u*m0&&16,a):Math.sqrt(t)},a}function Pn(e){var t=Dn((function(t,r){return e([t*Ie,r*Ie])}));return function(e){return zn(t(e))}}function In(e){this.stream=e}function On(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Fn(e){return Rn((function(){return e}))()}function Rn(t){var r,n,a,i,o,s,l=Dn((function(e,t){return[(e=r(e,t))[0]*u+i,o-e[1]*u]})),u=150,c=480,d=250,p=0,h=0,f=0,m=0,g=0,y=on,v=P,_=null,b=null;function x(e){return[(e=a(e[0]*Pe,e[1]*Pe))[0]*u+i,o-e[1]*u]}function w(e){return(e=a.invert((e[0]-i)/u,(o-e[1])/u))&&[e[0]*Ie,e[1]*Ie]}function k(){a=Xr(n=jn(f,m,g),r);var e=r(p,h);return i=c-e[0]*u,o=d+e[1]*u,M()}function M(){return s&&(s.valid=!1,s=null),x}return x.stream=function(e){return s&&(s.valid=!1),(s=zn(y(n,l(v(e))))).valid=!0,s},x.clipAngle=function(e){return arguments.length?(y=null==e?(_=e,on):sn((_=+e)*Pe),M()):_},x.clipExtent=function(e){return arguments.length?(b=e,v=e?cn(e[0][0],e[0][1],e[1][0],e[1][1]):P,M()):b},x.scale=function(e){return arguments.length?(u=+e,k()):u},x.translate=function(e){return arguments.length?(c=+e[0],d=+e[1],k()):[c,d]},x.center=function(e){return arguments.length?(p=e[0]%360*Pe,h=e[1]%360*Pe,k()):[p*Ie,h*Ie]},x.rotate=function(e){return arguments.length?(f=e[0]%360*Pe,m=e[1]%360*Pe,g=e.length>2?e[2]%360*Pe:0,k()):[f*Ie,m*Ie,g*Ie]},e.rebind(x,l,"precision"),function(){return r=t.apply(this,arguments),x.invert=r.invert&&w,k()}}function zn(e){return On(e,(function(t,r){e.point(t*Pe,r*Pe)}))}function Nn(e,t){return[e,t]}function Bn(e,t){return[e>Le?e-Ae:e<-Le?e+Ae:e,t]}function jn(e,t,r){return e?t||r?Xr(Hn(e),Vn(t,r)):Hn(e):t||r?Vn(t,r):Bn}function Yn(e){return function(t,r){return[(t+=e)>Le?t-Ae:t<-Le?t+Ae:t,r]}}function Hn(e){var t=Yn(e);return t.invert=Yn(-e),t}function Vn(e,t){var r=Math.cos(e),n=Math.sin(e),a=Math.cos(t),i=Math.sin(t);function o(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,u=Math.sin(t),c=u*r+s*n;return[Math.atan2(l*a-c*i,s*r-u*n),ze(c*a+l*i)]}return o.invert=function(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,u=Math.sin(t),c=u*a-l*i;return[Math.atan2(l*a+u*i,s*r+c*n),ze(c*r-s*n)]},o}function Un(e,t){var r=Math.cos(e),n=Math.sin(e);return function(a,i,o,s){var l=o*t;null!=a?(a=Wn(r,a),i=Wn(r,i),(o>0?ai)&&(a+=o*Ae)):(a=e+o*Ae,i=e-.5*l);for(var u,c=a;o>0?c>i:c2?e[2]*Pe:0),t.invert=function(t){return(t=e.invert(t[0]*Pe,t[1]*Pe))[0]*=Ie,t[1]*=Ie,t},t},Bn.invert=Nn,e.geo.circle=function(){var e,t,r=[0,0],n=6;function a(){var e="function"==typeof r?r.apply(this,arguments):r,n=jn(-e[0]*Pe,-e[1]*Pe,0).invert,a=[];return t(null,null,1,{point:function(e,t){a.push(e=n(e,t)),e[0]*=Ie,e[1]*=Ie}}),{type:"Polygon",coordinates:[a]}}return a.origin=function(e){return arguments.length?(r=e,a):r},a.angle=function(r){return arguments.length?(t=Un((e=+r)*Pe,n*Pe),a):e},a.precision=function(r){return arguments.length?(t=Un(e*Pe,(n=+r)*Pe),a):n},a.angle(90)},e.geo.distance=function(e,t){var r,n=(t[0]-e[0])*Pe,a=e[1]*Pe,i=t[1]*Pe,o=Math.sin(n),s=Math.cos(n),l=Math.sin(a),u=Math.cos(a),c=Math.sin(i),d=Math.cos(i);return Math.atan2(Math.sqrt((r=d*o)*r+(r=u*c-l*d*s)*r),l*c+u*d*s)},e.geo.graticule=function(){var t,r,n,a,i,o,s,l,u,c,d,p,h=10,f=h,m=90,g=360,y=2.5;function _(){return{type:"MultiLineString",coordinates:b()}}function b(){return e.range(Math.ceil(a/m)*m,n,m).map(d).concat(e.range(Math.ceil(l/g)*g,s,g).map(p)).concat(e.range(Math.ceil(r/h)*h,t,h).filter((function(e){return v(e%m)>Se})).map(u)).concat(e.range(Math.ceil(o/f)*f,i,f).filter((function(e){return v(e%g)>Se})).map(c))}return _.lines=function(){return b().map((function(e){return{type:"LineString",coordinates:e}}))},_.outline=function(){return{type:"Polygon",coordinates:[d(a).concat(p(s).slice(1),d(n).reverse().slice(1),p(l).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.majorExtent(e).minorExtent(e):_.minorExtent()},_.majorExtent=function(e){return arguments.length?(a=+e[0][0],n=+e[1][0],l=+e[0][1],s=+e[1][1],a>n&&(e=a,a=n,n=e),l>s&&(e=l,l=s,s=e),_.precision(y)):[[a,l],[n,s]]},_.minorExtent=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],r>t&&(e=r,r=t,t=e),o>i&&(e=o,o=i,i=e),_.precision(y)):[[r,o],[t,i]]},_.step=function(e){return arguments.length?_.majorStep(e).minorStep(e):_.minorStep()},_.majorStep=function(e){return arguments.length?(m=+e[0],g=+e[1],_):[m,g]},_.minorStep=function(e){return arguments.length?(h=+e[0],f=+e[1],_):[h,f]},_.precision=function(e){return arguments.length?(y=+e,u=qn(o,i,90),c=Gn(r,t,y),d=qn(l,s,90),p=Gn(a,n,y),_):y},_.majorExtent([[-180,-90+Se],[180,90-Se]]).minorExtent([[-180,-80-Se],[180,80+Se]])},e.geo.greatArc=function(){var t,r,n=Kn,a=Zn;function i(){return{type:"LineString",coordinates:[t||n.apply(this,arguments),r||a.apply(this,arguments)]}}return i.distance=function(){return e.geo.distance(t||n.apply(this,arguments),r||a.apply(this,arguments))},i.source=function(e){return arguments.length?(n=e,t="function"==typeof e?null:e,i):n},i.target=function(e){return arguments.length?(a=e,r="function"==typeof e?null:e,i):a},i.precision=function(){return arguments.length?i:0},i},e.geo.interpolate=function(e,t){return r=e[0]*Pe,n=e[1]*Pe,a=t[0]*Pe,i=t[1]*Pe,o=Math.cos(n),s=Math.sin(n),l=Math.cos(i),u=Math.sin(i),c=o*Math.cos(r),d=o*Math.sin(r),p=l*Math.cos(a),h=l*Math.sin(a),f=2*Math.asin(Math.sqrt(Be(i-n)+o*l*Be(a-r))),m=1/Math.sin(f),(g=f?function(e){var t=Math.sin(e*=f)*m,r=Math.sin(f-e)*m,n=r*c+t*p,a=r*d+t*h,i=r*s+t*u;return[Math.atan2(a,n)*Ie,Math.atan2(i,Math.sqrt(n*n+a*a))*Ie]}:function(){return[r*Ie,n*Ie]}).distance=f,g;var r,n,a,i,o,s,l,u,c,d,p,h,f,m,g},e.geo.length=function(t){return Mn=0,e.geo.stream(t,Xn),Mn};var Xn={sphere:R,point:R,lineStart:function(){var e,t,r;function n(n,a){var i=Math.sin(a*=Pe),o=Math.cos(a),s=v((n*=Pe)-e),l=Math.cos(s);Mn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*i-t*o*l)*s),t*i+r*o*l),e=n,t=i,r=o}Xn.point=function(a,i){e=a*Pe,t=Math.sin(i*=Pe),r=Math.cos(i),Xn.point=n},Xn.lineEnd=function(){Xn.point=Xn.lineEnd=R}},lineEnd:R,polygonStart:R,polygonEnd:R};function Jn(e,t){function r(t,r){var n=Math.cos(t),a=Math.cos(r),i=e(n*a);return[i*a*Math.sin(t),i*Math.sin(r)]}return r.invert=function(e,r){var n=Math.sqrt(e*e+r*r),a=t(n),i=Math.sin(a),o=Math.cos(a);return[Math.atan2(e*i,n*o),Math.asin(n&&r*i/n)]},r}var $n=Jn((function(e){return Math.sqrt(2/(1+e))}),(function(e){return 2*Math.asin(e/2)}));(e.geo.azimuthalEqualArea=function(){return Fn($n)}).raw=$n;var Qn=Jn((function(e){var t=Math.acos(e);return t&&t/Math.sin(t)}),P);function ea(e,t){var r=Math.cos(e),n=function(e){return Math.tan(Le/4+e/2)},a=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(n(t)/n(e)),i=r*Math.pow(n(e),a)/a;if(!a)return na;function o(e,t){i>0?t<-De+Se&&(t=-De+Se):t>De-Se&&(t=De-Se);var r=i/Math.pow(n(t),a);return[r*Math.sin(a*e),i-r*Math.cos(a*e)]}return o.invert=function(e,t){var r=i-t,n=Oe(a)*Math.sqrt(e*e+r*r);return[Math.atan2(e,r)/a,2*Math.atan(Math.pow(i/n,1/a))-De]},o}function ta(e,t){var r=Math.cos(e),n=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),a=r/n+e;if(v(n)1&&Fe(e[r[n-2]],e[r[n-1]],e[a])<=0;)--n;r[n++]=a}return r.slice(0,n)}function da(e,t){return e[0]-t[0]||e[1]-t[1]}(e.geo.stereographic=function(){return Fn(oa)}).raw=oa,sa.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-De]},(e.geo.transverseMercator=function(){var e=aa(sa),t=e.center,r=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?r([e[0],e[1],e.length>2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90])}).raw=sa,e.geom={},e.geom.hull=function(e){var t=la,r=ua;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=_t(t),i=_t(r),o=e.length,s=[],l=[];for(n=0;n=0;--n)h.push(e[s[u[n]][2]]);for(n=+d;nSe)s=s.L;else{if(!((a=i-Aa(s,o))>Se)){n>-Se?(t=s.P,r=s):a>-Se?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Ma(e);if(va.insert(t,l),t||r){if(t===r)return Oa(t),r=Ma(t.site),va.insert(l,r),l.edge=r.edge=za(t.site,l.site),Ia(t),void Ia(r);if(r){Oa(t),Oa(r);var u=t.site,c=u.x,d=u.y,p=e.x-c,h=e.y-d,f=r.site,m=f.x-c,g=f.y-d,y=2*(p*g-h*m),v=p*p+h*h,_=m*m+g*g,b={x:(g*v-h*_)/y+c,y:(p*_-m*v)/y+d};Na(r.edge,u,f,b),l.edge=za(u,e,null,b),r.edge=za(e,f,null,b),Ia(t),Ia(r)}else l.edge=za(t.site,l.site)}}function La(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,u=l-t;if(!u)return s;var c=s-n,d=1/i-1/u,p=c/u;return d?(-p+Math.sqrt(p*p-2*d*(c*c/(-2*u)-l+u/2+a-i/2)))/d+n:(n+s)/2}function Aa(e,t){var r=e.N;if(r)return La(r,t);var n=e.site;return n.y===t?n.x:1/0}function Ea(e){this.site=e,this.edges=[]}function Da(e,t){return t.angle-e.angle}function Pa(){Ya(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ia(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,s=a.y,l=n.x-o,u=n.y-s,c=i.x-o,d=2*(l*(g=i.y-s)-u*c);if(!(d>=-Ce)){var p=l*l+u*u,h=c*c+g*g,f=(g*p-u*h)/d,m=(l*h-c*p)/d,g=m+s,y=wa.pop()||new Pa;y.arc=e,y.site=a,y.x=f+o,y.y=g+Math.sqrt(f*f+m*m),y.cy=g,e.circle=y;for(var v=null,_=ba._;_;)if(y.y<_.y||y.y===_.y&&y.x<=_.x){if(!_.L){v=_.P;break}_=_.L}else{if(!_.R){v=_;break}_=_.R}ba.insert(v,y),v||(_a=y)}}}}function Oa(e){var t=e.circle;t&&(t.P||(_a=t.N),ba.remove(t),wa.push(t),Ya(t),e.circle=null)}function Fa(e,t){var r=e.b;if(r)return!0;var n,a,i=e.a,o=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,d=e.r,p=c.x,h=c.y,f=d.x,m=d.y,g=(p+f)/2,y=(h+m)/2;if(m===h){if(g=s)return;if(p>f){if(i){if(i.y>=u)return}else i={x:g,y:l};r={x:g,y:u}}else{if(i){if(i.y1)if(p>f){if(i){if(i.y>=u)return}else i={x:(l-a)/n,y:l};r={x:(u-a)/n,y:u}}else{if(i){if(i.y=s)return}else i={x:o,y:n*o+a};r={x:s,y:n*s+a}}else{if(i){if(i.xSe||v(a-r)>Se)&&(s.splice(o,0,new Ba((y=i.site,_=c,b=v(n-d)Se?{x:d,y:v(t-d)Se?{x:v(r-f)Se?{x:p,y:v(t-p)Se?{x:v(r-h)=r&&u.x<=a&&u.y>=n&&u.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Se)*Se,y:Math.round(a(e,t)/Se)*Se,i:t}}))}return o.links=function(e){return Wa(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return Wa(s(e)).cells.forEach((function(r,n){for(var a,i,o,s,l=r.site,u=r.edges.sort(Da),c=-1,d=u.length,p=u[d-1].edge,h=p.l===l?p.r:p.l;++ci||d>o||p=x)<<1|t>=b,k=w+4;wi&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:ei(r,n)})),i=ni.lastIndex;return im&&(m=l.x),l.y>g&&(g=l.y),u.push(l.x),c.push(l.y);else for(d=0;dm&&(m=b),x>g&&(g=x),u.push(b),c.push(x)}var w=m-h,k=g-f;function M(e,t,r,n,a,i,o,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,u=e.y;if(null!=l)if(v(l-r)+v(u-n)<.01)T(e,t,r,n,a,i,o,s);else{var c=e.point;e.x=e.y=e.point=null,T(e,c,l,u,a,i,o,s),T(e,t,r,n,a,i,o,s)}else e.x=r,e.y=n,e.point=t}else T(e,t,r,n,a,i,o,s)}function T(e,t,r,n,a,i,o,s){var l=.5*(a+o),u=.5*(i+s),c=r>=l,d=n>=u,p=d<<1|c;e.leaf=!1,c?a=l:o=l,d?i=u:s=u,M(e=e.nodes[p]||(e.nodes[p]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,s)}w>k?g=f+w:m=h+k;var S={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(S,e,+y(e,++d),+_(e,d),h,f,m,g)},visit:function(e){Xa(e,S,h,f,m,g)},find:function(e){return Ja(S,e[0],e[1],h,f,m,g)}};if(d=-1,null==t){for(;++d=0&&!(n=e.interpolators[a](t,r)););return n}function ii(e,t){var r,n=[],a=[],i=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=1?1:e(t)}}function ci(e){return function(t){return 1-e(1-t)}}function di(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function pi(e){return e*e}function hi(e){return e*e*e}function fi(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function mi(e){return 1-Math.cos(e*De)}function gi(e){return Math.pow(2,10*(e-1))}function yi(e){return 1-Math.sqrt(1-e*e)}function vi(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function _i(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function bi(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=wi(a),s=xi(a,i),l=wi(((t=i)[0]+=(n=-s)*(r=a)[0],t[1]+=n*r[1],t))||0;a[0]*i[1]=0?e.slice(0,t):e,a=t>=0?e.slice(t+1):"in";return n=si.get(n)||oi,ui((a=li.get(a)||P)(n.apply(null,r.call(arguments,1))))},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,a=t.c,i=t.l,o=r.h-n,s=r.c-a,l=r.l-i;return isNaN(s)&&(s=0,a=isNaN(a)?r.c:a),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Xe(n+o*e,a+s*e,i+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,a=t.s,i=t.l,o=r.h-n,s=r.s-a,l=r.l-i;return isNaN(s)&&(s=0,a=isNaN(a)?r.s:a),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Ge(n+o*e,a+s*e,i+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,a=t.a,i=t.b,o=r.l-n,s=r.a-a,l=r.b-i;return function(e){return nt(n+o*e,a+s*e,i+l*e)+""}},e.interpolateRound=_i,e.transform=function(t){var r=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new bi(t?t.matrix:ki)})(t)},bi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ki={a:1,b:0,c:0,d:1,e:0,f:0};function Mi(e){return e.length?e.pop()+",":""}function Ti(t,r){var n=[],a=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:ei(e[0],t[0])},{i:a-2,x:ei(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,n,a),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Mi(r)+"rotate(",null,")")-2,x:ei(e,t)})):t&&r.push(Mi(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,a),function(e,t,r,n){e!==t?n.push({i:r.push(Mi(r)+"skewX(",null,")")-2,x:ei(e,t)}):t&&r.push(Mi(r)+"skewX("+t+")")}(t.skew,r.skew,n,a),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(Mi(r)+"scale(",null,",",null,")");n.push({i:a-4,x:ei(e[0],t[0])},{i:a-2,x:ei(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Mi(r)+"scale("+t+")")}(t.scale,r.scale,n,a),t=r=null,function(e){for(var t,r=-1,i=a.length;++r0?n=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:n=0})):e>0&&(l.start({type:"start",alpha:n=e}),t=Ct(s.tick)),s):n},s.start=function(){var e,t,r,n=y.length,l=v.length,c=u[0],f=u[1];for(e=0;e=0;)r.push(a[n])}function Bi(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(c=u[l]),c.parent=i,c.depth=i.depth+1;r&&(i.value=0),i.children=u}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Bi(a,(function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)})),s}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(Ni(e,(function(e){e.children&&(e.value=0)})),Bi(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,n){var a=t.call(this,e,n);return function e(t,r,n,a){var i=t.children;if(t.x=r,t.y=t.depth*a,t.dx=n,t.dy=a,i&&(o=i.length)){var o,s,l,u=-1;for(n=t.value?n/t.value:0;++us&&(s=n),o.push(n)}for(r=0;ra&&(n=r,a=t);return n}function Qi(e){return e.reduce(eo,0)}function eo(e,t){return e+t[1]}function to(e,t){return ro(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ro(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function no(t){return[e.min(t),e.max(t)]}function ao(e,t){return e.value-t.value}function io(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function oo(e,t){e._pack_next=t,t._pack_prev=e}function so(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function lo(e){if((t=e.children)&&(l=t.length)){var t,r,n,a,i,o,s,l,u=1/0,c=-1/0,d=1/0,p=-1/0;if(t.forEach(uo),(r=t[0]).x=-r.r,r.y=0,_(r),l>1&&((n=t[1]).x=n.r,n.y=0,_(n),l>2))for(po(r,n,a=t[2]),_(a),io(r,a),r._pack_prev=a,io(a,n),n=r._pack_next,i=3;i0)for(o=-1;++o=d[0]&&l<=d[1]&&((s=u[e.bisect(p,l,1,f)-1]).y+=m,s.push(i[o]));return u}return i.value=function(e){return arguments.length?(r=e,i):r},i.range=function(e){return arguments.length?(n=_t(e),i):n},i.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return ro(t,e)}:_t(e),i):a},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(ao),n=0,a=[1,1];function i(e,i){var o=r.call(this,e,i),s=o[0],l=a[0],u=a[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,Bi(s,(function(e){e.r=+c(e.value)})),Bi(s,lo),n){var d=n*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;Bi(s,(function(e){e.r+=d})),Bi(s,lo),Bi(s,(function(e){e.r-=d}))}return function e(t,r,n,a){var i=t.children;if(t.x=r+=a*t.x,t.y=n+=a*t.y,t.r*=a,i)for(var o=-1,s=i.length;++oh.x&&(h=e),e.depth>f.depth&&(f=e)}));var m=r(p,h)/2-p.x,g=n[0]/(h.x+r(h,p)/2+m),y=n[1]/(f.depth||1);Ni(c,(function(e){e.x=(e.x+m)*g,e.y=e.depth*y}))}return u}function o(e){var t=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(t[0].z+t[t.length-1].z)/2;a?(e.z=a.z+r(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+r(e._,a._));e.parent.A=function(e,t,n){if(t){for(var a,i=e,o=e,s=t,l=i.parent.children[0],u=i.m,c=o.m,d=s.m,p=l.m;s=mo(s),i=fo(i),s&&i;)l=fo(l),(o=mo(o)).a=e,(a=s.z+d-i.z-u+r(s._,i._))>0&&(go(yo(s,e,n),e,a),u+=a,c+=a),d+=s.m,u+=i.m,p+=l.m,c+=o.m;s&&!mo(o)&&(o.t=s,o.m+=d-c),i&&!fo(l)&&(l.t=i,l.m+=u-p,n=e)}return n}(e,a,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e)?l:null,i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null==(n=e)?null:l,i):a?n:null},zi(i,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=ho,n=[1,1],a=!1;function i(i,o){var s,l=t.call(this,i,o),u=l[0],c=0;Bi(u,(function(t){var n=t.children;n&&n.length?(t.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),t.y=function(t){return 1+e.max(t,(function(e){return e.y}))}(n)):(t.x=s?c+=r(t,s):0,t.y=0,s=t)}));var d=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(u),p=function e(t){var r,n=t.children;return n&&(r=n.length)?e(n[r-1]):t}(u),h=d.x-r(d,p)/2,f=p.x+r(p,d)/2;return Bi(u,a?function(e){e.x=(e.x-u.x)*n[0],e.y=(u.y-e.y)*n[1]}:function(e){e.x=(e.x-h)/(f-h)*n[0],e.y=(1-(u.y?e.y/u.y:1))*n[1]}),l}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e),i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null!=(n=e),i):a?n:null},zi(i,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=vo,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(e,t){for(var r,n,a=-1,i=e.length;++a0;)s.push(r=u[a-1]),s.area+=r.area,"squarify"!==l||(n=h(s,m))<=p?(u.pop(),p=n):(s.area-=s.pop().area,f(s,m,i,!1),m=Math.min(i.dx,i.dy),s.length=s.area=0,p=1/0);s.length&&(f(s,m,i,!0),s.length=s.area=0),t.forEach(d)}}function p(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(c(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(f(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(p)}}function h(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,s=e.length;++oa&&(a=r));return t*=t,(n*=n)?Math.max(t*a*u/n,n/(t*i*u)):1/0}function f(e,t,r,a){var i,o=-1,s=e.length,l=r.x,u=r.y,c=t?n(e.area/t):0;if(t==r.dx){for((a||c>r.dy)&&(c=r.dy);++or.dx)&&(c=r.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?So:wo,s=a?Ci:Si;return i=e(t,r,s,n),o=e(r,t,s,ai),l}function l(e){return i(e)}return l.invert=function(e){return o(e)},l.domain=function(e){return arguments.length?(t=e.map(Number),s()):t},l.range=function(e){return arguments.length?(r=e,s()):r},l.rangeRound=function(e){return l.range(e).interpolate(_i)},l.clamp=function(e){return arguments.length?(a=e,s()):a},l.interpolate=function(e){return arguments.length?(n=e,s()):n},l.ticks=function(e){return Eo(t,e)},l.tickFormat=function(e,r){return Do(t,e,r)},l.nice=function(e){return Lo(t,e),s()},l.copy=function(){return e(t,r,n,a)},s()}([0,1],[0,1],ai,!1)};var Po={s:1,g:1,p:1,r:1,e:1};function Io(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}e.scale.log=function(){return function t(r,n,a,i){function o(e){return(a?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(n)}function s(e){return a?Math.pow(n,e):-Math.pow(n,-e)}function l(e){return r(o(e))}return l.invert=function(e){return s(r.invert(e))},l.domain=function(e){return arguments.length?(a=e[0]>=0,r.domain((i=e.map(Number)).map(o)),l):i},l.base=function(e){return arguments.length?(n=+e,r.domain(i.map(o)),l):n},l.nice=function(){var e=ko(i.map(o),a?Math:Fo);return r.domain(e),i=e.map(s),l},l.ticks=function(){var e=bo(i),t=[],r=e[0],l=e[1],u=Math.floor(o(r)),c=Math.ceil(o(l)),d=n%1?2:n;if(isFinite(c-u)){if(a){for(;u0;p--)t.push(s(u)*p);for(u=0;t[u]l;c--);t=t.slice(u,c)}return t},l.tickFormat=function(t,r){if(!arguments.length)return Oo;arguments.length<2?r=Oo:"function"!=typeof r&&(r=e.format(r));var a=Math.max(1,n*t/l.ticks().length);return function(e){var t=e/s(Math.round(o(e)));return t*n0?a[e-1]:r[0],ed?0:1;if(u=Ee)return l(u,h)+(s?l(s,1-h):"")+"Z";var f,m,g,y,v,_,b,x,w,k,M,T,S=0,C=0,L=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===Ho?Math.sqrt(s*s+u*u):+n.apply(this,arguments),h||(C*=-1),u&&(C=ze(g/u*Math.sin(y))),s&&(S=ze(g/s*Math.sin(y)))),u){v=u*Math.cos(c+C),_=u*Math.sin(c+C),b=u*Math.cos(d-C),x=u*Math.sin(d-C);var A=Math.abs(d-c-2*C)<=Le?0:1;if(C&&Ko(v,_,b,x)===h^A){var E=(c+d)/2;v=u*Math.cos(E),_=u*Math.sin(E),b=x=null}}else v=_=0;if(s){w=s*Math.cos(d-S),k=s*Math.sin(d-S),M=s*Math.cos(c+S),T=s*Math.sin(c+S);var D=Math.abs(c-d+2*S)<=Le?0:1;if(S&&Ko(w,k,M,T)===1-h^D){var P=(c+d)/2;w=s*Math.cos(P),k=s*Math.sin(P),M=T=null}}else w=k=0;if(p>Se&&(f=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function Zo(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],s=(a?n:-n)/Math.sqrt(i*i+o*o),l=s*o,u=-s*i,c=e[0]+l,d=e[1]+u,p=t[0]+l,h=t[1]+u,f=(c+p)/2,m=(d+h)/2,g=p-c,y=h-d,v=g*g+y*y,_=r-n,b=c*h-p*d,x=(y<0?-1:1)*Math.sqrt(Math.max(0,_*_*v-b*b)),w=(b*y-g*x)/v,k=(-b*g-y*x)/v,M=(b*y+g*x)/v,T=(-b*g+y*x)/v,S=w-f,C=k-m,L=M-f,A=T-m;return S*S+C*C>L*L+A*A&&(w=M,k=T),[[w-l,k-u],[w*r/_,k*r/_]]}function Xo(e){var t=la,r=ua,n=Jr,a=$o,i=a.key,o=.7;function s(i){var s,l=[],u=[],c=-1,d=i.length,p=_t(t),h=_t(r);function f(){l.push("M",a(e(u),o))}for(;++c1&&a.push("H",n[0]),a.join("")},"step-before":es,"step-after":ts,basis:as,"basis-open":function(e){if(e.length<4)return $o(e);for(var t,r=[],n=-1,a=e.length,i=[0],o=[0];++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);for(r.push(is(ls,i)+","+is(ls,o)),--n;++n9&&(a=3*t/Math.sqrt(a),o[s]=a*r,o[s+1]=a*n));for(s=-1;++s<=l;)a=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),i.push([a||0,o[s]*a||0]);return i}(e))}});function $o(e){return e.length>1?e.join("L"):e+"Z"}function Qo(e){return e.join("L")+"Z"}function es(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t1){s=t[1],i=e[l],l++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-s[0])+","+(i[1]-s[1])+","+i[0]+","+i[1];for(var u=2;uLe)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=_t(e),i):r},i.source=function(t){return arguments.length?(e=_t(t),i):e},i.target=function(e){return arguments.length?(t=_t(e),i):t},i.startAngle=function(e){return arguments.length?(n=_t(e),i):n},i.endAngle=function(e){return arguments.length?(a=_t(e),i):a},i},e.svg.diagonal=function(){var e=Kn,t=Zn,r=fs;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,a),s=(i.y+o.y)/2,l=[i,{x:i.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=_t(t),n):e},n.target=function(e){return arguments.length?(t=_t(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=fs,n=t.projection;return t.projection=function(e){return arguments.length?n(ms(r=e)):r},t},e.svg.symbol=function(){var e=ys,t=gs;function r(r,n){return(_s.get(e.call(this,r,n))||vs)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=_t(t),r):e},r.size=function(e){return arguments.length?(t=_t(e),r):t},r};var _s=e.map({circle:vs,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*xs)),r=t*xs;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/bs),r=t*bs/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/bs),r=t*bs/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=_s.keys();var bs=Math.sqrt(3),xs=Math.tan(30*Pe);K.transition=function(e){for(var t,r,n=Ts||++Ls,a=Ds(e),i=[],o=Ss||{time:Date.now(),ease:fi,delay:0,duration:250},s=-1,l=this.length;++s0;)u[--p].call(e,o);if(i>=1)return d.event&&d.event.end.call(e,e.__data__,t),--c.count?delete c[n]:delete e[r],1}d||(i=a.time,o=Ct((function(e){var t=d.delay;if(o.t=t+i,t<=e)return p(e-t);o.c=p}),0,i),d=c[n]={tween:new x,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++c.count)}Cs.call=K.call,Cs.empty=K.empty,Cs.node=K.node,Cs.size=K.size,e.transition=function(t,r){return t&&t.transition?Ts?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Cs,Cs.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=Z(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var d,g,y=this,v=e.select(e.event.target),_=n.of(y,arguments),b=e.select(y),x=v.datum(),w=!/^(n|s)$/.test(x)&&a,k=!/^(e|w)$/.test(x)&&i,M=v.classed("extent"),T=we(y),S=e.mouse(y),C=e.select(o(y)).on("keydown.brush",(function(){32==e.event.keyCode&&(M||(d=null,S[0]-=s[1],S[1]-=l[1],M=2),B())})).on("keyup.brush",(function(){32==e.event.keyCode&&2==M&&(S[0]+=s[1],S[1]+=l[1],M=0,B())}));if(e.event.changedTouches?C.on("touchmove.brush",E).on("touchend.brush",P):C.on("mousemove.brush",E).on("mouseup.brush",P),b.interrupt().selectAll("*").interrupt(),M)S[0]=s[0]-S[0],S[1]=l[0]-S[1];else if(x){var L=+/w$/.test(x),A=+/^n/.test(x);g=[s[1-L]-S[0],l[1-A]-S[1]],S[0]=s[L],S[1]=l[A]}else e.event.altKey&&(d=S.slice());function E(){var t=e.mouse(y),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(e.event.altKey?(d||(d=[(s[0]+s[1])/2,(l[0]+l[1])/2]),S[0]=s[+(t[0]1?{floor:function(t){for(;s(t=e.floor(t));)t=Us(t-1);return t},ceil:function(t){for(;s(t=e.ceil(t));)t=Us(+t+1);return t}}:e))},a.ticks=function(e,t){var r=bo(a.domain()),n=null==e?i(r,10):"number"==typeof e?i(r,e):!e.range&&[{range:e},t];return n&&(e=n[0],t=n[1]),e.range(r[0],Us(+r[1]+1),t<1?1:t)},a.tickFormat=function(){return n},a.copy=function(){return Vs(t.copy(),r,n)},Co(a,t)}function Us(e){return new Date(e)}Bs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Hs:Ys,Hs.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Hs.toString=Ys.toString,zt.second=Yt((function(e){return new Nt(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))}),(function(e){return e.getSeconds()})),zt.seconds=zt.second.range,zt.seconds.utc=zt.second.utc.range,zt.minute=Yt((function(e){return new Nt(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))}),(function(e){return e.getMinutes()})),zt.minutes=zt.minute.range,zt.minutes.utc=zt.minute.utc.range,zt.hour=Yt((function(e){var t=e.getTimezoneOffset()/60;return new Nt(36e5*(Math.floor(e/36e5-t)+t))}),(function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))}),(function(e){return e.getHours()})),zt.hours=zt.hour.range,zt.hours.utc=zt.hour.utc.range,zt.month=Yt((function(e){return(e=zt.day(e)).setDate(1),e}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e){return e.getMonth()})),zt.months=zt.month.range,zt.months.utc=zt.month.utc.range;var Ws=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],qs=[[zt.second,1],[zt.second,5],[zt.second,15],[zt.second,30],[zt.minute,1],[zt.minute,5],[zt.minute,15],[zt.minute,30],[zt.hour,1],[zt.hour,3],[zt.hour,6],[zt.hour,12],[zt.day,1],[zt.day,2],[zt.week,1],[zt.month,1],[zt.month,3],[zt.year,1]],Gs=Bs.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Jr]]),Ks={range:function(t,r,n){return e.range(Math.ceil(t/n)*n,+r,n).map(Us)},floor:P,ceil:P};qs.year=zt.year,zt.scale=function(){return Vs(e.scale.linear(),qs,Gs)};var Zs=qs.map((function(e){return[e[0].utc,e[1]]})),Xs=js.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Jr]]);function Js(e){return JSON.parse(e.responseText)}function $s(e){var t=a.createRange();return t.selectNode(a.body),t.createContextualFragment(e.responseText)}Zs.year=zt.year.utc,zt.scale.utc=function(){return Vs(e.scale.linear(),Zs,Xs)},e.text=bt((function(e){return e.responseText})),e.json=function(e,t){return xt(e,"application/json",Js,t)},e.html=function(e,t){return xt(e,"text/html",$s,t)},e.xml=bt((function(e){return e.responseXML})),"object"==typeof t&&t.exports?t.exports=e:this.d3=e}()},{}],165:[function(e,t,r){t.exports=function(){for(var e=0;e=2)return!1;e[r]=n}return!0})):x.filter((function(e){for(var t=0;t<=s;++t){var r=y[e[t]];if(r<0)return!1;e[t]=r}return!0})),1&s)for(c=0;cs*l){var h=(p-d)/s;i[c]=1e3*h}}return i}function o(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),a=e[0];a>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),a=1048575&n;return 2146435072&n&&(a+=1<<20),[r,a]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}}).call(this,e("buffer").Buffer)},{buffer:106}],169:[function(e,t,r){var n=e("abs-svg-path"),a=e("normalize-svg-path"),i={M:"moveTo",C:"bezierCurveTo"};t.exports=function(e,t){e.beginPath(),a(n(t)).forEach((function(t){var r=t[0],n=t.slice(1);e[i[r]].apply(e,n)})),e.closePath()}},{"abs-svg-path":62,"normalize-svg-path":453}],170:[function(e,t,r){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],171:[function(e,t,r){"use strict";t.exports=function(e,t){switch(void 0===t&&(t=0),typeof e){case"number":if(e>0)return function(e,t){var r,n;for(r=new Array(e),n=0;n80*r){n=l=e[0],s=u=e[1];for(var b=r;bl&&(l=c),h>u&&(u=h);f=0!==(f=Math.max(l-n,u-s))?1/f:0}return o(v,_,r,n,s,f),_}function a(e,t,r,n,a){var i,o;if(a===L(e,t,r,n)>0)for(i=t;i=t;i-=n)o=T(i,e[i],e[i+1],o);return o&&_(o,o.next)&&(S(o),o=o.next),o}function i(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!_(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(S(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function o(e,t,r,n,a,d,p){if(e){!p&&d&&function(e,t,r,n){var a=e;do{null===a.z&&(a.z=f(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,r,n,a,i,o,s,l,u=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,u*=2}while(o>1)}(a)}(e,n,a,d);for(var h,m,g=e;e.prev!==e.next;)if(h=e.prev,m=e.next,d?l(e,n,a,d):s(e))t.push(h.i/r),t.push(e.i/r),t.push(m.i/r),S(e),e=m.next,g=m.next;else if((e=m)===g){p?1===p?o(e=u(i(e),t,r),t,r,n,a,d,2):2===p&&c(e,t,r,n,a,d):o(i(e),t,r,n,a,d,1);break}}}function s(e){var t=e.prev,r=e,n=e.next;if(v(t,r,n)>=0)return!1;for(var a=e.next.next;a!==e.prev;){if(g(t.x,t.y,r.x,r.y,n.x,n.y,a.x,a.y)&&v(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function l(e,t,r,n){var a=e.prev,i=e,o=e.next;if(v(a,i,o)>=0)return!1;for(var s=a.xi.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,c=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,d=f(s,l,t,r,n),p=f(u,c,t,r,n),h=e.prevZ,m=e.nextZ;h&&h.z>=d&&m&&m.z<=p;){if(h!==e.prev&&h!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&v(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==e.prev&&m!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,m.x,m.y)&&v(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&v(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=p;){if(m!==e.prev&&m!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,m.x,m.y)&&v(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function u(e,t,r){var n=e;do{var a=n.prev,o=n.next.next;!_(a,o)&&b(a,n,n.next,o)&&k(a,o)&&k(o,a)&&(t.push(a.i/r),t.push(n.i/r),t.push(o.i/r),S(n),S(n.next),n=e=o),n=n.next}while(n!==e);return i(n)}function c(e,t,r,n,a,s){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&y(l,u)){var c=M(l,u);return l=i(l,l.next),c=i(c,c.next),o(l,t,r,n,a,s),void o(c,t,r,n,a,s)}u=u.next}l=l.next}while(l!==e)}function d(e,t){return e.x-t.x}function p(e,t){if(t=function(e,t){var r,n=t,a=e.x,i=e.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&a!==n.x&&g(ir.x||n.x===r.x&&h(r,n)))&&(r=n,p=l)),n=n.next}while(n!==u);return r}(e,t)){var r=M(t,e);i(r,r.next)}}function h(e,t){return v(e.prev,e,t.prev)<0&&v(t.next,e,e.next)<0}function f(e,t,r,n,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*a)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*a)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&b(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(k(e,t)&&k(t,e)&&function(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(v(e.prev,e,t.prev)||v(e,t.prev,t))||_(e,t)&&v(e.prev,e,e.next)>0&&v(t.prev,t,t.next)>0)}function v(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function _(e,t){return e.x===t.x&&e.y===t.y}function b(e,t,r,n){var a=w(v(e,t,r)),i=w(v(e,t,n)),o=w(v(r,n,e)),s=w(v(r,n,t));return a!==i&&o!==s||!(0!==a||!x(e,r,t))||!(0!==i||!x(e,n,t))||!(0!==o||!x(r,e,n))||!(0!==s||!x(r,t,n))}function x(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function w(e){return e>0?1:e<0?-1:0}function k(e,t){return v(e.prev,e,e.next)<0?v(e,t,e.next)>=0&&v(e,e.prev,t)>=0:v(e,t,e.prev)<0||v(e,e.next,t)<0}function M(e,t){var r=new C(e.i,e.x,e.y),n=new C(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function T(e,t,r,n){var a=new C(e,t,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function S(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 C(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(e,t,r,n){for(var a=0,i=t,o=r-n;i0&&(n+=e[a-1].length,r.holes.push(n))}return r}},{}],173:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.length;if("number"!=typeof t){t=0;for(var a=0;a=t}))}(t);for(var r,a=n(e).components.filter((function(e){return e.length>1})),i=1/0,o=0;o=55296&&v<=56319&&(w+=e[++r]),w=k?p.call(k,M,w,m):w,t?(h.value=w,f(g,m,h)):g[m]=w,++m;y=m}if(void 0===y)for(y=o(e.length),t&&(g=new t(y)),r=0;r0?1:-1}},{}],185:[function(e,t,r){"use strict";var n=e("../math/sign"),a=Math.abs,i=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*i(a(e)):e}},{"../math/sign":182}],186:[function(e,t,r){"use strict";var n=e("./to-integer"),a=Math.max;t.exports=function(e){return a(0,n(e))}},{"./to-integer":185}],187:[function(e,t,r){"use strict";var n=e("./valid-callable"),a=e("./valid-value"),i=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(r,u){var c,d=arguments[2],p=arguments[3];return r=Object(a(r)),n(u),c=s(r),p&&c.sort("function"==typeof p?i.call(p,r):void 0),"function"!=typeof e&&(e=c[e]),o.call(e,c,(function(e,n){return l.call(r,e)?o.call(u,d,r[e],e,r,n):t}))}}},{"./valid-callable":205,"./valid-value":207}],188:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":189,"./shim":190}],189:[function(e,t,r){"use strict";t.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},{}],190:[function(e,t,r){"use strict";var n=e("../keys"),a=e("../valid-value"),i=Math.max;t.exports=function(e,t){var r,o,s,l=i(arguments.length,2);for(e=Object(a(e)),s=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},o=1;o-1}},{}],211:[function(e,t,r){"use strict";var n=Object.prototype.toString,a=n.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||n.call(e)===a)||!1}},{}],212:[function(e,t,r){"use strict";var n=Object.create(null),a=Math.random;t.exports=function(){var e;do{e=a().toString(36).slice(2)}while(n[e]);return e}},{}],213:[function(e,t,r){"use strict";var n,a=e("es5-ext/object/set-prototype-of"),i=e("es5-ext/string/#/contains"),o=e("d"),s=e("es6-symbol"),l=e("./"),u=Object.defineProperty;n=t.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?i.call(t,"key+value")?"key+value":i.call(t,"key")?"key":"value":"value",u(this,"__kind__",o("",t))},a&&a(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),u(n.prototype,s.toStringTag,o("c","Array Iterator"))},{"./":216,d:152,"es5-ext/object/set-prototype-of":202,"es5-ext/string/#/contains":208,"es6-symbol":221}],214:[function(e,t,r){"use strict";var n=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/valid-callable"),i=e("es5-ext/string/is-string"),o=e("./get"),s=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;t.exports=function(e,t){var r,c,d,p,h,f,m,g,y=arguments[2];if(s(e)||n(e)?r="array":i(e)?r="string":e=o(e),a(t),d=function(){p=!0},"array"!==r)if("string"!==r)for(c=e.next();!c.done;){if(l.call(t,y,c.value,d),p)return;c=e.next()}else for(f=e.length,h=0;h=55296&&g<=56319&&(m+=e[++h]),l.call(t,y,m,d),!p);++h);else u.call(e,(function(e){return l.call(t,y,e,d),p}))}},{"./get":215,"es5-ext/function/is-arguments":179,"es5-ext/object/valid-callable":205,"es5-ext/string/is-string":211}],215:[function(e,t,r){"use strict";var n=e("es5-ext/function/is-arguments"),a=e("es5-ext/string/is-string"),i=e("./array"),o=e("./string"),s=e("./valid-iterable"),l=e("es6-symbol").iterator;t.exports=function(e){return"function"==typeof s(e)[l]?e[l]():n(e)?new i(e):a(e)?new o(e):new i(e)}},{"./array":213,"./string":218,"./valid-iterable":219,"es5-ext/function/is-arguments":179,"es5-ext/string/is-string":211,"es6-symbol":221}],216:[function(e,t,r){"use strict";var n,a=e("es5-ext/array/#/clear"),i=e("es5-ext/object/assign"),o=e("es5-ext/object/valid-callable"),s=e("es5-ext/object/valid-value"),l=e("d"),u=e("d/auto-bind"),c=e("es6-symbol"),d=Object.defineProperty,p=Object.defineProperties;t.exports=n=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");p(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(o(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,p(n.prototype,i({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&a.call(this.__redo__),this.__nextIndex__=0}))}))),d(n.prototype,c.iterator,l((function(){return this})))},{d:152,"d/auto-bind":151,"es5-ext/array/#/clear":175,"es5-ext/object/assign":188,"es5-ext/object/valid-callable":205,"es5-ext/object/valid-value":207,"es6-symbol":221}],217:[function(e,t,r){"use strict";var n=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/is-value"),i=e("es5-ext/string/is-string"),o=e("es6-symbol").iterator,s=Array.isArray;t.exports=function(e){return!(!a(e)||!s(e)&&!i(e)&&!n(e)&&"function"!=typeof e[o])}},{"es5-ext/function/is-arguments":179,"es5-ext/object/is-value":196,"es5-ext/string/is-string":211,"es6-symbol":221}],218:[function(e,t,r){"use strict";var n,a=e("es5-ext/object/set-prototype-of"),i=e("d"),o=e("es6-symbol"),s=e("./"),l=Object.defineProperty;n=t.exports=function(e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",i("",e.length))},a&&a(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:i((function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,i("c","String Iterator"))},{"./":216,d:152,"es5-ext/object/set-prototype-of":202,"es6-symbol":221}],219:[function(e,t,r){"use strict";var n=e("./is-iterable");t.exports=function(e){if(!n(e))throw new TypeError(e+" is not iterable");return e}},{"./is-iterable":217}],220:[function(e,r,n){(function(t,a){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version 3.3.1 */ !function(e,t){"object"==typeof n&&void 0!==r?r.exports=t():e.ES6Promise=t()}(this,(function(){"use strict";function r(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,o=void 0,s=void 0,l=function(e,t){m[i]=e,m[i+1]=t,2===(i+=2)&&(s?s(g):x())},u="undefined"!=typeof window?window:void 0,c=u||{},d=c.MutationObserver||c.WebKitMutationObserver,p="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(g,1)}}var m=new Array(1e3);function g(){for(var e=0;e=r-1){p=l.length-1;var f=e-t[r-1];for(h=0;h=r-1)for(var c=s.length-1,d=(t[r-1],0);d=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--d)n.push(i(l[d-1],u[d-1],arguments[d])),a.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var p=r;p>0;--p){var h=i(u[p-1],c[p-1],arguments[p]);n.push(h),a.push((h-n[o++])*d)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(i(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var n=this._state,a=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=e-t,d=c>1e-6?1/c:0;this._time.push(e);for(var p=r;p>0;--p){var h=arguments[p];n.push(i(l[p-1],u[p-1],n[o++]+h)),a.push(h*d)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--d)n.push(i(l[d],u[d],n[o]+c*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":92,"cubic-hermite":146}],229:[function(e,t,r){var n=e("dtype");t.exports=function(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(e)&&e[0]&&"number"==typeof e[0][0]){var a,i,o,s,l=e[0].length,u=e.length*l;t&&"string"!=typeof t||(t=new(n(t||"float32"))(u+r));var c=t.length-r;if(u!==c)throw new Error("source length "+u+" ("+l+"x"+e.length+") does not match destination length "+c);for(a=0,o=r;at[0]-o[0]/2&&(p=o[0]/2,h+=o[1]);return r}},{"css-font/stringify":143}],231:[function(e,t,r){"use strict";function n(e,t){t||(t={}),("string"==typeof e||Array.isArray(e))&&(t.family=e);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var s=t.size||t.fontSize||t.em||48,l=t.weight||t.fontWeight||"",u=(e=[t.style||t.fontStyle||"",l,s].join(" ")+"px "+r,t.origin||"top");if(n.cache[r]&&s<=n.cache[r].em)return a(n.cache[r],u);var c=t.canvas||n.canvas,d=c.getContext("2d"),p={upper:void 0!==t.upper?t.upper:"H",lower:void 0!==t.lower?t.lower:"x",descent:void 0!==t.descent?t.descent:"p",ascent:void 0!==t.ascent?t.ascent:"h",tittle:void 0!==t.tittle?t.tittle:"i",overshoot:void 0!==t.overshoot?t.overshoot:"O"},h=Math.ceil(1.5*s);c.height=h,c.width=.5*h,d.font=e;var f={top:0};d.clearRect(0,0,h,h),d.textBaseline="top",d.fillStyle="black",d.fillText("H",0,0);var m=i(d.getImageData(0,0,h,h));d.clearRect(0,0,h,h),d.textBaseline="bottom",d.fillText("H",0,h);var g=i(d.getImageData(0,0,h,h));f.lineHeight=f.bottom=h-g+m,d.clearRect(0,0,h,h),d.textBaseline="alphabetic",d.fillText("H",0,h);var y=h-i(d.getImageData(0,0,h,h))-1+m;f.baseline=f.alphabetic=y,d.clearRect(0,0,h,h),d.textBaseline="middle",d.fillText("H",0,.5*h);var v=i(d.getImageData(0,0,h,h));f.median=f.middle=h-v-1+m-.5*h,d.clearRect(0,0,h,h),d.textBaseline="hanging",d.fillText("H",0,.5*h);var _=i(d.getImageData(0,0,h,h));f.hanging=h-_-1+m-.5*h,d.clearRect(0,0,h,h),d.textBaseline="ideographic",d.fillText("H",0,h);var b=i(d.getImageData(0,0,h,h));if(f.ideographic=h-b-1+m,p.upper&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.upper,0,0),f.upper=i(d.getImageData(0,0,h,h)),f.capHeight=f.baseline-f.upper),p.lower&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.lower,0,0),f.lower=i(d.getImageData(0,0,h,h)),f.xHeight=f.baseline-f.lower),p.tittle&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.tittle,0,0),f.tittle=i(d.getImageData(0,0,h,h))),p.ascent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.ascent,0,0),f.ascent=i(d.getImageData(0,0,h,h))),p.descent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.descent,0,0),f.descent=o(d.getImageData(0,0,h,h))),p.overshoot){d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.overshoot,0,0);var x=o(d.getImageData(0,0,h,h));f.overshoot=x-y}for(var w in f)f[w]/=s;return f.em=s,n.cache[r]=f,a(f,u)}function a(e,t){var r={};for(var n in"string"==typeof t&&(t=e[t]),e)"em"!==n&&(r[n]=e[n]-t);return r}function i(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}t.exports=n,n.canvas=document.createElement("canvas"),n.cache={}},{}],232:[function(e,t,r){"use strict";t.exports=function(e){return new u(e||y,null)};var n=0,a=1;function i(e,t,r,n,a,i){this._color=e,this.key=t,this.value=r,this.left=n,this.right=a,this._count=i}function o(e){return new i(e._color,e.key,e.value,e.left,e.right,e._count)}function s(e,t){return new i(e,t.key,t.value,t.left,t.right,t._count)}function l(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function u(e,t){this._compare=e,this.root=t}var c=u.prototype;function d(e,t){var r;return t.left&&(r=d(e,t.left))?r:(r=e(t.key,t.value))||(t.right?d(e,t.right):void 0)}function p(e,t,r,n){if(t(e,n.key)<=0){var a;if(n.left&&(a=p(e,t,r,n.left)))return a;if(a=r(n.key,n.value))return a}if(n.right)return p(e,t,r,n.right)}function h(e,t,r,n,a){var i,o=r(e,a.key),s=r(t,a.key);if(o<=0){if(a.left&&(i=h(e,t,r,n,a.left)))return i;if(s>0&&(i=n(a.key,a.value)))return i}if(s>0&&a.right)return h(e,t,r,n,a.right)}function f(e,t){this.tree=e,this._stack=t}Object.defineProperty(c,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(c,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(c,"length",{get:function(){return this.root?this.root._count:0}}),c.insert=function(e,t){for(var r=this._compare,o=this.root,c=[],d=[];o;){var p=r(e,o.key);c.push(o),d.push(p),o=p<=0?o.left:o.right}c.push(new i(n,e,t,null,null,1));for(var h=c.length-2;h>=0;--h)o=c[h],d[h]<=0?c[h]=new i(o._color,o.key,o.value,c[h+1],o.right,o._count+1):c[h]=new i(o._color,o.key,o.value,o.left,c[h+1],o._count+1);for(h=c.length-1;h>1;--h){var f=c[h-1];if(o=c[h],f._color===a||o._color===a)break;var m=c[h-2];if(m.left===f)if(f.left===o){if(!(g=m.right)||g._color!==n){m._color=n,m.left=f.right,f._color=a,f.right=m,c[h-2]=f,c[h-1]=o,l(m),l(f),h>=3&&((y=c[h-3]).left===m?y.left=f:y.right=f);break}f._color=a,m.right=s(a,g),m._color=n,h-=1}else{if(!(g=m.right)||g._color!==n){f.right=o.left,m._color=n,m.left=o.right,o._color=a,o.left=f,o.right=m,c[h-2]=o,c[h-1]=f,l(m),l(f),l(o),h>=3&&((y=c[h-3]).left===m?y.left=o:y.right=o);break}f._color=a,m.right=s(a,g),m._color=n,h-=1}else if(f.right===o){if(!(g=m.left)||g._color!==n){m._color=n,m.right=f.left,f._color=a,f.left=m,c[h-2]=f,c[h-1]=o,l(m),l(f),h>=3&&((y=c[h-3]).right===m?y.right=f:y.left=f);break}f._color=a,m.left=s(a,g),m._color=n,h-=1}else{var g;if(!(g=m.left)||g._color!==n){var y;f.left=o.right,m._color=n,m.right=o.left,o._color=a,o.right=f,o.left=m,c[h-2]=o,c[h-1]=f,l(m),l(f),l(o),h>=3&&((y=c[h-3]).right===m?y.right=o:y.left=o);break}f._color=a,m.left=s(a,g),m._color=n,h-=1}}return c[0]._color=a,new u(r,c[0])},c.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return d(e,this.root);case 2:return p(t,this._compare,e,this.root);case 3:if(this._compare(t,r)>=0)return;return h(t,r,this._compare,e,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new f(this,e)}}),Object.defineProperty(c,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new f(this,e)}}),c.at=function(e){if(e<0)return new f(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}return new f(this,[])},c.ge=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i<=0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new f(this,n)},c.gt=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i<0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new f(this,n)},c.lt=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i>0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new f(this,n)},c.le=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i>=0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new f(this,n)},c.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var a=t(e,r.key);if(n.push(r),0===a)return new f(this,n);r=a<=0?r.left:r.right}return new f(this,[])},c.remove=function(e){var t=this.find(e);return t?t.remove():this},c.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var m=f.prototype;function g(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function y(e,t){return et?1:0}Object.defineProperty(m,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(m,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),m.clone=function(){return new f(this.tree,this._stack.slice())},m.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var t=new Array(e.length),r=e[e.length-1];t[t.length-1]=new i(r._color,r.key,r.value,r.left,r.right,r._count);for(var c=e.length-2;c>=0;--c)(r=e[c]).left===e[c+1]?t[c]=new i(r._color,r.key,r.value,t[c+1],r.right,r._count):t[c]=new i(r._color,r.key,r.value,r.left,t[c+1],r._count);if((r=t[t.length-1]).left&&r.right){var d=t.length;for(r=r.left;r.right;)t.push(r),r=r.right;var p=t[d-1];for(t.push(new i(r._color,p.key,p.value,r.left,r.right,r._count)),t[d-1].key=r.key,t[d-1].value=r.value,c=t.length-2;c>=d;--c)r=t[c],t[c]=new i(r._color,r.key,r.value,r.left,t[c+1],r._count);t[d-1].left=t[d]}if((r=t[t.length-1])._color===n){var h=t[t.length-2];for(h.left===r?h.left=null:h.right===r&&(h.right=null),t.pop(),c=0;c=0;--c){if(t=e[c],0===c)return void(t._color=a);if((r=e[c-1]).left===t){if((i=r.right).right&&i.right._color===n)return u=(i=r.right=o(i)).right=o(i.right),r.right=i.left,i.left=r,i.right=u,i._color=r._color,t._color=a,r._color=a,u._color=a,l(r),l(i),c>1&&((d=e[c-2]).left===r?d.left=i:d.right=i),void(e[c-1]=i);if(i.left&&i.left._color===n)return u=(i=r.right=o(i)).left=o(i.left),r.right=u.left,i.left=u.right,u.left=r,u.right=i,u._color=r._color,r._color=a,i._color=a,t._color=a,l(r),l(i),l(u),c>1&&((d=e[c-2]).left===r?d.left=u:d.right=u),void(e[c-1]=u);if(i._color===a){if(r._color===n)return r._color=a,void(r.right=s(n,i));r.right=s(n,i);continue}i=o(i),r.right=i.left,i.left=r,i._color=r._color,r._color=n,l(r),l(i),c>1&&((d=e[c-2]).left===r?d.left=i:d.right=i),e[c-1]=i,e[c]=r,c+11&&((d=e[c-2]).right===r?d.right=i:d.left=i),void(e[c-1]=i);if(i.right&&i.right._color===n)return u=(i=r.left=o(i)).right=o(i.right),r.left=u.right,i.right=u.left,u.right=r,u.left=i,u._color=r._color,r._color=a,i._color=a,t._color=a,l(r),l(i),l(u),c>1&&((d=e[c-2]).right===r?d.right=u:d.left=u),void(e[c-1]=u);if(i._color===a){if(r._color===n)return r._color=a,void(r.left=s(n,i));r.left=s(n,i);continue}var d;i=o(i),r.left=i.right,i.right=r,i._color=r._color,r._color=n,l(r),l(i),c>1&&((d=e[c-2]).right===r?d.right=i:d.left=i),e[c-1]=i,e[c]=r,c+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(m,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(m,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),m.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(m,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),m.update=function(e){var t=this._stack;if(0===t.length)throw new Error("Can't update empty node!");var r=new Array(t.length),n=t[t.length-1];r[r.length-1]=new i(n._color,n.key,e,n.left,n.right,n._count);for(var a=t.length-2;a>=0;--a)(n=t[a]).left===t[a+1]?r[a]=new i(n._color,n.key,n.value,r[a+1],n.right,n._count):r[a]=new i(n._color,n.key,n.value,n.left,r[a+1],n._count);return new u(this.tree._compare,r[0])},m.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(m,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},{}],233:[function(e,t,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,i=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(e){if(e<0)return Number("0/0");for(var t=i[0],r=i.length-1;r>0;--r)t+=i[r]/(e+r);var n=e+a+.5;return.5*Math.log(2*Math.PI)+(e+.5)*Math.log(n)-n+Math.log(t)-Math.log(e)}t.exports=function e(t){if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*e(1-t));if(t>100)return Math.exp(o(t));t-=1;for(var r=n[0],a=1;a<9;a++)r+=n[a]/(t+a);var i=t+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(i,t+.5)*Math.exp(-i)*r},t.exports.log=o},{}],234:[function(e,t,r){t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("must specify type string");if(t=t||{},"undefined"==typeof document&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var n,a=t;try{var i=[e];0===e.indexOf("webgl")&&i.push("experimental-"+e);for(var o=0;o0?(h[c]=-1,f[c]=0):(h[c]=0,f[c]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(e){};var y=[0,0,0],v=[0,0,0],_=[0,0,0];d.draw=function(e){e=e||g;for(var t=this.gl,r=e.model||l,n=e.view||l,a=e.projection||l,i=this.bounds,s=e._ortho||!1,c=o(r,n,a,i,s),d=c.cubeEdges,p=c.axis,b=n[12],x=n[13],w=n[14],k=n[15],M=(s?2:1)*this.pixelRatio*(a[3]*b+a[7]*x+a[11]*w+a[15]*k)/t.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=d[T],this.lastCubeProps.axis[T]=p[T];var S=h;for(T=0;T<3;++T)f(h[T],T,this.bounds,d,p);t=this.gl;var C,L,A,E=m;for(T=0;T<3;++T)this.backgroundEnable[T]?E[T]=p[T]:E[T]=0;for(this._background.draw(r,n,a,i,E,this.backgroundColor),this._lines.bind(r,n,a,this),T=0;T<3;++T){var D=[0,0,0];p[T]>0?D[T]=i[1][T]:D[T]=i[0][T];for(var P=0;P<2;++P){var I=(T+1+P)%3,O=(T+1+(1^P))%3;this.gridEnable[I]&&this._lines.drawGrid(I,O,this.bounds,D,this.gridColor[I],this.gridWidth[I]*this.pixelRatio)}for(P=0;P<2;++P)I=(T+1+P)%3,O=(T+1+(1^P))%3,this.zeroEnable[O]&&Math.min(i[0][O],i[1][O])<=0&&Math.max(i[0][O],i[1][O])>=0&&this._lines.drawZero(I,O,this.bounds,D,this.zeroLineColor[O],this.zeroLineWidth[O]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,S[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,S[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var F=u(y,S[T].primalMinor),R=u(v,S[T].mirrorMinor),z=this.lineTickLength;for(P=0;P<3;++P){var N=M/r[5*P];F[P]*=z[P]*N,R[P]*=z[P]*N}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,S[T].primalOffset,F,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,S[T].mirrorOffset,R,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}function B(e){(A=[0,0,0])[e]=1}function j(e,t,r){var n=(e+1)%3,a=(e+2)%3,i=t[n],o=t[a],s=r[n],l=r[a];i>0&&l>0?B(n):i>0&&l<0?B(n):i<0&&l>0?B(n):i<0&&l<0?B(n):o>0&&s>0?B(a):o>0&&s<0?B(a):o<0&&s>0?B(a):o<0&&s<0&&B(a)}for(this._lines.unbind(),this._text.bind(r,n,a,this.pixelRatio),T=0;T<3;++T){var Y=S[T].primalMinor,H=S[T].mirrorMinor,V=u(_,S[T].primalOffset);for(P=0;P<3;++P)this.lineTickEnable[T]&&(V[P]+=M*Y[P]*Math.max(this.lineTickLength[P],0)/r[5*P]);var U=[0,0,0];if(U[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,L=1,"auto"===(C=[this.tickAlign[T],.5,L])[0]?C[0]=0:C[0]=parseInt(""+C[0]),A=[0,0,0],j(T,Y,H),P=0;P<3;++P)V[P]+=M*Y[P]*this.tickPad[P]/r[5*P];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],V,this.tickColor[T],U,A,C)}if(this.labelEnable[T]){for(L=0,A=[0,0,0],this.labels[T].length>4&&(B(T),L=1),"auto"===(C=[this.labelAlign[T],.5,L])[0]?C[0]=0:C[0]=parseInt(""+C[0]),P=0;P<3;++P)V[P]+=M*Y[P]*this.labelPad[P]/r[5*P];V[T]+=.5*(i[0][T]+i[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],V,this.labelColor[T],[0,0,0],A,C)}}this._text.unbind()},d.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":236,"./lib/cube.js":237,"./lib/lines.js":238,"./lib/text.js":240,"./lib/ticks.js":241}],236:[function(e,t,r){"use strict";t.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,d=[0,0,0],p=[0,0,0],h=-1;h<=1;h+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),d[l]=h,p[l]=h;for(var f=-1;f<=1;f+=2){d[u]=f;for(var m=-1;m<=1;m+=2)d[c]=m,t.push(d[0],d[1],d[2],p[0],p[1],p[2]),s+=1}var g=u;u=c,c=g}var y=n(e,new Float32Array(t)),v=n(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),_=a(e,[{buffer:y,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:e.FLOAT,size:3,offset:12,stride:24}],v),b=i(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(e,y,_,b)};var n=e("gl-buffer"),a=e("gl-vao"),i=e("./shaders").bg;function o(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(e,t,r,n,a,i){for(var o=!1,s=0;s<3;++s)o=o||a[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:n,enable:a,colors:i},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":239,"gl-buffer":243,"gl-vao":328}],237:[function(e,t,r){"use strict";t.exports=function(e,t,r,i,h){a(s,t,e),a(s,r,s);for(var v=0,_=0;_<2;++_){c[2]=i[_][2];for(var b=0;b<2;++b){c[1]=i[b][1];for(var x=0;x<2;++x)c[0]=i[x][0],p(l[v],c,s),v+=1}}var w=-1;for(_=0;_<8;++_){for(var k=l[_][3],M=0;M<3;++M)u[_][M]=l[_][M]/k;h&&(u[_][2]*=-1),k<0&&(w<0?w=_:u[_][2]L&&(w|=1<L&&(w|=1<u[_][1]&&(R=_));var z=-1;for(_=0;_<3;++_)(B=R^1<<_)!==w&&B!==F&&(z<0&&(z=B),(C=u[B])[0]u[N][0]&&(N=B))}var j=m;j[0]=j[1]=j[2]=0,j[n.log2(z^R)]=R&z,j[n.log2(R^N)]=R&N;var Y=7^N;Y===w||Y===F?(Y=7^z,j[n.log2(N^Y)]=Y&N):j[n.log2(z^Y)]=Y&z;var H=g,V=w;for(T=0;T<3;++T)H[T]=V&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);r.text=function(e){return a(e,s,l,null,[{name:"position",type:"vec3"}])};var u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);r.bg=function(e){return a(e,u,c,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":303,glslify:410}],240:[function(e,t,r){(function(r){"use strict";t.exports=function(e,t,r,i,s,l){var c=n(e),d=a(e,[{buffer:c,size:3}]),p=o(e);p.attributes.position.location=0;var h=new u(e,p,c,d);return h.update(t,r,i,s,l),h};var n=e("gl-buffer"),a=e("gl-vao"),i=e("vectorize-text"),o=e("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};function u(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var c=u.prototype,d=[0,0];c.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var a=this.shader.uniforms;a.model=e,a.view=t,a.projection=r,a.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},c.unbind=function(){this.vao.unbind()},c.update=function(e,t,r,n,a){var o=[];function s(e,t,r,n,a,s){var u=l[r];u||(u=l[r]={});var c=u[t];c||(c=u[t]=function(e,t){try{return i(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:a,styletags:s}));for(var d=(n||12)/12,p=c.positions,h=c.cells,f=0,m=h.length;f=0;--y){var v=p[g[y]];o.push(d*v[0],-d*v[1],e)}}for(var u=[0,0,0],c=[0,0,0],d=[0,0,0],p=[0,0,0],h={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},f=0;f<3;++f){d[f]=o.length/3|0,s(.5*(e[0][f]+e[1][f]),t[f],r[f],12,1.25,h),p[f]=(o.length/3|0)-d[f],u[f]=o.length/3|0;for(var m=0;m=0&&(a=r.length-n-1);var i=Math.pow(10,a),o=Math.round(e*t*i),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/i,u=o%i;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),a){for(var d=""+u;d.length=e[0][a];--o)i.push({x:o*t[a],text:n(t[a],o)});r.push(i)}return r},r.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,i,a),r}function c(e,t){for(var r=n.malloc(e.length,t),a=e.length,i=0;i=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=u(this.gl,this.type,this.length,this.usage,e.data,t):this.length=u(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=n.malloc(e.size,r),l=i(s,e.shape);a.assign(l,e),this.length=u(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),n.free(s)}}else if(Array.isArray(e)){var d;d=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(e,"uint16"):c(e,"float32"),this.length=u(this.gl,this.type,this.length,this.usage,t<0?d:d.subarray(0,e.length),t),n.free(d)}else if("object"==typeof e&&"number"==typeof e.length)this.length=u(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!=typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},t.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=e.createBuffer(),i=new s(e,r,a,0,n);return i.update(t),i}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":543}],244:[function(e,t,r){"use strict";var n=e("gl-vec3");t.exports=function(e,t){var r=e.positions,a=e.vectors,i={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),i;for(var o=0,s=1/0,l=-1/0,u=1/0,c=-1/0,d=1/0,p=-1/0,h=null,f=null,m=[],g=1/0,y=!1,v=0;vo&&(o=n.length(b)),v){var x=2*n.distance(h,_)/(n.length(f)+n.length(b));x?(g=Math.min(g,x),y=!1):y=!0}y||(h=_,f=b),m.push(b)}var w=[s,u,d],k=[l,c,p];t&&(t[0]=w,t[1]=k),0===o&&(o=1);var M=1/o;isFinite(g)||(g=1),i.vectorScale=g;var T=e.coneSize||.5;e.absoluteConeSize&&(T=e.absoluteConeSize*M),i.coneScale=T,v=0;for(var S=0;v=1},h.isTransparent=function(){return this.opacity<1},h.pickSlots=1,h.setPickBase=function(e){this.pickId=e},h.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=c({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var a=t[n],i=0;i<3;++i)r[4*n+i]=a[i];r[4*n+3]=255*a[3]}return u(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,a=e.vectors;if(n&&r&&a){var i=[],o=[],s=[],l=[],d=[];this.cells=r,this.positions=n,this.vectors=a;var p=e.meshColor||[1,1,1,1],h=e.vertexIntensity,f=1/0,m=-1/0;if(h)if(e.vertexIntensityBounds)f=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=u,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},h.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||d,n=e.view||d,a=e.projection||d,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:a,clipBounds:i,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},h.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions[r[1]].slice(0,3),a={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?a.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(a.intensity=this.intensity[r[1]],a.velocity=this.vectors[r[1]].slice(0,3),a.divergence=this.vectors[r[1]][3],a.index=t),a},h.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(e,t,r){var s=r.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var r=n(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(e,s),c=function(e,t){var r=n(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(e,s),d=o(e,u(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=e.LINEAR_MIPMAP_LINEAR,d.magFilter=e.LINEAR;var h=a(e),f=a(e),m=a(e),g=a(e),y=a(e),v=new p(e,d,l,c,h,f,y,m,g,i(e,[{buffer:h,type:e.FLOAT,size:4},{buffer:y,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:f,type:e.FLOAT,size:4}]),r.traceType||"cone");return v.update(t),v}},{colormap:127,"gl-buffer":243,"gl-mat4/invert":267,"gl-mat4/multiply":269,"gl-shader":303,"gl-texture2d":323,"gl-vao":328,ndarray:451}],246:[function(e,t,r){var n=e("glslify"),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:410}],247:[function(e,t,r){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],248:[function(e,t,r){var n=e("./1.0/numbers");t.exports=function(e){return n[e]}},{"./1.0/numbers":247}],249:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=n(t),o=a(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=i(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var u=new s(t,r,o,l);return u.update(e),u};var n=e("gl-buffer"),a=e("gl-vao"),i=e("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function u(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||o,a=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var i=n[12],s=n[13],l=n[14],u=n[15],c=(e._ortho?2:1)*this.pixelRatio*(a[3]*i+a[7]*s+a[11]*l+a[15]*u)/t.drawingBufferHeight;this.vao.bind();for(var d=0;d<3;++d)t.lineWidth(this.lineWidth[d]*this.pixelRatio),r.capSize=this.capSize[d]*c,this.lineCount[d]&&t.drawArrays(t.LINES,this.lineOffset[d],this.lineCount[d]);this.vao.unbind()};var c=function(){for(var e=new Array(3),t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var a=-1;a<=1;a+=2){var i=[0,0,0];i[(n+t)%3]=a,r.push(i)}e[t]=r}return e}();function d(e,t,r,n){for(var a=c[n],i=0;i0&&((h=c.slice())[s]+=f[1][s],a.push(c[0],c[1],c[2],m[0],m[1],m[2],m[3],0,0,0,h[0],h[1],h[2],m[0],m[1],m[2],m[3],0,0,0),u(this.bounds,h),o+=2+d(a,h,m,s)))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(a)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":250,"gl-buffer":243,"gl-vao":328}],250:[function(e,t,r){"use strict";var n=e("glslify"),a=e("gl-shader"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(e){return a(e,i,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":303,glslify:410}],251:[function(e,t,r){"use strict";var n=e("gl-texture2d");t.exports=function(e,t,r,n){a||(a=e.FRAMEBUFFER_UNSUPPORTED,i=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var u=e.getExtension("WEBGL_draw_buffers");if(!l&&u&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var a=new Array(r),i=0;ic||r<0||r>c)throw new Error("gl-fbo: Parameters are too large for FBO");var d=1;if("color"in(n=n||{})){if((d=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(d>1){if(!u)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(d>e.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+d+" draw buffers")}}var p=e.UNSIGNED_BYTE,h=e.getExtension("OES_texture_float");if(n.float&&d>0){if(!h)throw new Error("gl-fbo: Context does not support floating point textures");p=e.FLOAT}else n.preferFloat&&d>0&&h&&(p=e.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new f(e,t,r,p,d,m,g,u)};var a,i,o,s,l=null;function u(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function c(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function d(e){switch(e){case a:throw new Error("gl-fbo: Framebuffer unsupported");case i:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function p(e,t,r,a,i,o){if(!a)return null;var s=n(e,t,r,i,a);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function h(e,t,r,n,a){var i=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,i),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,a,e.RENDERBUFFER,i),i}function f(e,t,r,n,a,i,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(a);for(var f=0;f1&&s.drawBuffersWEBGL(l[o]);var v=r.getExtension("WEBGL_depth_texture");v?f?e.depth=p(r,a,i,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=p(r,a,i,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&f?e._depth_rb=h(r,a,i,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=h(r,a,i,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):f&&(e._depth_rb=h(r,a,i,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var _=r.checkFramebufferStatus(r.FRAMEBUFFER);if(_!==r.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),y=0;ya||r<0||r>a)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var i=u(n),o=0;o>8*h&255;this.pickOffset=r,a.bind();var f=a.uniforms;f.viewTransform=e,f.pickOffset=t,f.shape=this.shape;var m=a.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),d.pick=function(e,t,r){var n=this.pickOffset,a=this.shape[0]*this.shape[1];if(r=n+a)return null;var i=r-n,o=this.xData,s=this.yData;return{object:this,pointId:i,dataCoord:[o[i%this.shape[0]],s[i/this.shape[0]|0]]}},d.update=function(e){var t=(e=e||{}).shape||[0,0],r=e.x||a(t[0]),o=e.y||a(t[1]),s=e.z||new Float32Array(t[0]*t[1]);this.xData=r,this.yData=o;var l=e.colorLevels||[0],u=e.colorValues||[0,0,0,1],c=l.length,d=this.bounds,h=d[0]=r[0],f=d[1]=o[0],m=1/((d[2]=r[r.length-1])-h),g=1/((d[3]=o[o.length-1])-f),y=t[0],v=t[1];this.shape=[y,v];var _=(y-1)*(v-1)*(p.length>>>1);this.numVertices=_;for(var b=i.mallocUint8(4*_),x=i.mallocFloat32(2*_),w=i.mallocUint8(2*_),k=i.mallocUint32(_),M=0,T=0;T max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\nlowp vec4 encode_float_1540259130(highp float v) {\n highp float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(e){return a(e,i,o,null,l)},r.createPickShader=function(e){return a(e,i,s,null,l)}},{"gl-shader":303,glslify:410}],257:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=c(t);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=d(t);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(t),u=a(t,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),p=l(new Array(1024),[256,1,4]),h=0;h<1024;++h)p.data[h]=255;var f=i(t,p);f.wrap=t.REPEAT;var m=new g(t,r,o,s,u,f);return m.update(e),m};var n=e("gl-buffer"),a=e("gl-vao"),i=e("gl-texture2d"),o=e("glsl-read-float"),s=e("binary-search-bounds"),l=e("ndarray"),u=e("./lib/shaders"),c=u.createShader,d=u.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(e,t){for(var r=0,n=0;n<3;++n){var a=e[n]-t[n];r+=a*a}return Math.sqrt(r)}function f(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function m(e,t,r,n){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=n}function g(e,t,r,n,a,i){this.gl=e,this.shader=t,this.pickShader=r,this.buffer=n,this.vao=a,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=i,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=g.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:e.model||p,view:e.view||p,projection:e.projection||p,clipBounds:f(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:e.model||p,view:e.view||p,projection:e.projection||p,pickId:this.pickId,clipBounds:f(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(e){var t,r;this.dirty=!0;var n=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var a=[],i=[],o=[],u=0,c=0,d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],p=e.position||e.positions;if(p){var f=e.color||e.colors||[0,0,0,1],m=e.lineWidth||1,g=!1;e:for(t=1;t0){for(var w=0;w<24;++w)a.push(a[a.length-12]);c+=2,g=!0}continue e}d[0][r]=Math.min(d[0][r],b[r],x[r]),d[1][r]=Math.max(d[1][r],b[r],x[r])}Array.isArray(f[0])?(y=f.length>t-1?f[t-1]:f.length>0?f[f.length-1]:[0,0,0,1],v=f.length>t?f[t]:f.length>0?f[f.length-1]:[0,0,0,1]):y=v=f,3===y.length&&(y=[y[0],y[1],y[2],1]),3===v.length&&(v=[v[0],v[1],v[2],1]),!this.hasAlpha&&y[3]<1&&(this.hasAlpha=!0),_=Array.isArray(m)?m.length>t-1?m[t-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=u;if(u+=h(b,x),g){for(r=0;r<2;++r)a.push(b[0],b[1],b[2],x[0],x[1],x[2],k,_,y[0],y[1],y[2],y[3]);c+=2,g=!1}a.push(b[0],b[1],b[2],x[0],x[1],x[2],k,_,y[0],y[1],y[2],y[3],b[0],b[1],b[2],x[0],x[1],x[2],k,-_,y[0],y[1],y[2],y[3],x[0],x[1],x[2],b[0],b[1],b[2],u,-_,v[0],v[1],v[2],v[3],x[0],x[1],x[2],b[0],b[1],b[2],u,_,v[0],v[1],v[2],v[3]),c+=4}}if(this.buffer.update(a),i.push(u),o.push(p[p.length-1].slice()),this.bounds=d,this.vertexCount=c,this.points=o,this.arcLength=i,"dashes"in e){var M=e.dashes.slice();for(M.unshift(0),t=1;t1.0001)return null;y+=g[d]}return Math.abs(y-1)>.001?null:[p,s(e,g),g]}},{barycentric:74,"polytope-closest-point/lib/closest_point_2d.js":482}],281:[function(e,t,r){var n=e("glslify"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:c,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"}]}},{glslify:410}],282:[function(e,t,r){"use strict";var n=e("gl-shader"),a=e("gl-buffer"),i=e("gl-vao"),o=e("gl-texture2d"),s=e("normals"),l=e("gl-mat4/multiply"),u=e("gl-mat4/invert"),c=e("ndarray"),d=e("colormap"),p=e("simplicial-complex-contour"),h=e("typedarray-pool"),f=e("./lib/shaders"),m=e("./lib/closest-point"),g=f.meshShader,y=f.wireShader,v=f.pointShader,_=f.pickShader,b=f.pointPickShader,x=f.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m,g,y,v,_,b,x,k,M,T,S,C){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=a,this.pickShader=i,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=p,this.triangleUVs=d,this.triangleIds=u,this.triangleVAO=h,this.triangleCount=0,this.lineWidth=1,this.edgePositions=f,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=m,this.edgeVAO=v,this.edgeCount=0,this.pointPositions=_,this.pointColors=x,this.pointUVs=k,this.pointSizes=M,this.pointIds=b,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=C,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var M=k.prototype;function T(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}function S(e){var t=n(e,v.vertex,v.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.pointSize.location=4,t}function C(e){var t=n(e,_.vertex,_.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t}function L(e){var t=n(e,b.vertex,b.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t.attributes.pointSize.location=4,t}function A(e){var t=n(e,x.vertex,x.fragment);return t.attributes.position.location=0,t}M.isOpaque=function(){return!this.hasAlpha},M.isTransparent=function(){return this.hasAlpha},M.pickSlots=1,M.setPickBase=function(e){this.pickId=e},M.highlight=function(e){if(e&&this.contourEnable){for(var t=p(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,a=t.vertexWeights,i=r.length,o=h.mallocFloat32(6*i),s=0,l=0;l0&&((d=this.triShader).bind(),d.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((d=this.lineShader).bind(),d.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((d=this.pointShader).bind(),d.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((d=this.contourShader).bind(),d.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},M.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,n=e.view||w,a=e.projection||w,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:r,view:n,projection:a,clipBounds:i,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},M.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,a=new Array(r.length),i=0;ia[M]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[e],r.uniforms.angle=y[e],i.drawArrays(i.TRIANGLES,a[M],a[T]-a[M]))),v[e]&&k&&(c[1^e]-=S*h*_[e],r.uniforms.dataAxis=d,r.uniforms.screenOffset=c,r.uniforms.color=b[e],r.uniforms.angle=x[e],i.drawArrays(i.TRIANGLES,w,k)),c[1^e]=S*s[2+(1^e)]-1,f[e+2]&&(c[1^e]+=S*h*m[e+2],Ma[M]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[e+2],r.uniforms.angle=y[e+2],i.drawArrays(i.TRIANGLES,a[M],a[T]-a[M]))),v[e+2]&&k&&(c[1^e]+=S*h*_[e+2],r.uniforms.dataAxis=d,r.uniforms.screenOffset=c,r.uniforms.color=b[e+2],r.uniforms.angle=x[e+2],i.drawArrays(i.TRIANGLES,w,k))}),m.drawTitle=function(){var e=[0,0],t=[0,0];return function(){var r=this.plot,n=this.shader,a=r.gl,i=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)t[c]=2*(o[c]*u-i[c])/(i[2+c]-i[c])-1;n.bind(),n.uniforms.dataAxis=e,n.uniforms.screenOffset=t,n.uniforms.angle=s,n.uniforms.color=l,a.drawArrays(a.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=(p=[0,0],h=[0,0],f=[0,0],function(){var e=this.plot,t=this.shader,r=e._tickBounds,n=e.dataBox,a=e.screenBox,i=e.viewBox;t.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,u=.5*(n[o+2]+n[o]),c=n[o+2]-n[o],d=i[o],m=i[o+2]-d,g=a[o],y=a[o+2]-g;h[o]=2*l/c*m/y,p[o]=2*(s-u)/c*m/y}f[1]=2*e.pixelRatio/(a[3]-a[1]),f[0]=f[1]*(a[3]-a[1])/(a[2]-a[0]),t.uniforms.dataScale=h,t.uniforms.dataShift=p,t.uniforms.textScale=f,this.vbo.bind(),t.attributes.textCoordinate.pointer()}),m.update=function(e){var t,r,n,a,o,s=[],l=e.ticks,u=e.bounds;for(o=0;o<2;++o){var c=[Math.floor(s.length/3)],d=[-1/0],p=l[o];for(t=0;t=0){var m=t[f]-n[f]*(t[f+2]-t[f])/(n[f+2]-n[f]);0===f?o.drawLine(m,t[1],m,t[3],h[f],p[f]):o.drawLine(t[0],m,t[2],m,h[f],p[f])}}for(f=0;f=0;--e)this.objects[e].dispose();for(this.objects.length=0,e=this.overlays.length-1;e>=0;--e)this.overlays[e].dispose();this.overlays.length=0,this.gl=null},u.addObject=function(e){this.objects.indexOf(e)<0&&(this.objects.push(e),this.setDirty())},u.removeObject=function(e){for(var t=this.objects,r=0;rMath.abs(t))u.rotate(i,0,0,-e*r*Math.PI*f.rotateSpeed/window.innerWidth);else if(!f._ortho){var o=-f.zoomSpeed*a*t/window.innerHeight*(i-u.lastT())/20;u.pan(i,0,0,d*(Math.exp(o)-1))}}}),!0)},f.enableMouseListeners(),f};var n=e("right-now"),a=e("3d-view"),i=e("mouse-change"),o=e("mouse-wheel"),s=e("mouse-event-offset"),l=e("has-passive-events")},{"3d-view":54,"has-passive-events":412,"mouse-change":436,"mouse-event-offset":437,"mouse-wheel":439,"right-now":502}],291:[function(e,t,r){var n=e("glslify"),a=e("gl-shader"),i=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(e){return a(e,i,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":303,glslify:410}],292:[function(e,t,r){"use strict";var n=e("./camera.js"),a=e("gl-axes3d"),i=e("gl-axes3d/properties"),o=e("gl-spikes3d"),s=e("gl-select-static"),l=e("gl-fbo"),u=e("a-big-triangle"),c=e("mouse-change"),d=e("gl-mat4/perspective"),p=e("gl-mat4/ortho"),h=e("./lib/shader"),f=e("is-mobile")({tablet:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var r=Math.round(Math.pow(10,-t));return Math.ceil(e*r)/r}return t>0?(r=Math.round(Math.pow(10,t)),Math.ceil(e/r)*r):Math.ceil(e)}function y(e){return"boolean"!=typeof e||e}t.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch(e){return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:f})),!r)throw new Error("webgl not supported");var v=e.bounds||[[-10,-10,-10],[10,10,10]],_=new m,b=l(r,[r.drawingBufferWidth,r.drawingBufferHeight],{preferFloat:!f}),x=h(r),w=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,k={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:w},M=e.axes||{},T=a(r,M);T.enable=!M.disable;var S=e.spikes||{},C=o(r,S),L=[],A=[],E=[],D=[],P=!0,I=!0,O=new Array(16),F=new Array(16),R={view:null,projection:O,model:F,_ortho:!1},z=(I=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),N=e.cameraObject||n(t,k),B={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:_,camera:N,axes:T,axesPixels:null,spikes:C,bounds:v,objects:L,shape:z,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:y(e.autoResize),autoBounds:y(e.autoBounds),autoScale:!!e.autoScale,autoCenter:y(e.autoCenter),clipToBounds:y(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z}},j=[r.drawingBufferWidth/B.pixelRatio|0,r.drawingBufferHeight/B.pixelRatio|0];function Y(){if(!B._stopped&&B.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var a=0|Math.ceil(r*B.pixelRatio),i=0|Math.ceil(n*B.pixelRatio);if(a!==t.width||i!==t.height){t.width=a,t.height=i;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",P=!0}}}function H(){for(var e=L.length,t=D.length,n=0;n0&&0===E[t-1];)E.pop(),D.pop().dispose()}function V(){if(B.contextLost)return!0;r.isContextLost()&&(B.contextLost=!0,B.mouseListener.enabled=!1,B.selection.object=null,B.oncontextloss&&B.oncontextloss())}B.autoResize&&Y(),window.addEventListener("resize",Y),B.update=function(e){B._stopped||(e=e||{},P=!0,I=!0)},B.add=function(e){B._stopped||(e.axes=T,L.push(e),A.push(-1),P=!0,I=!0,H())},B.remove=function(e){if(!B._stopped){var t=L.indexOf(e);t<0||(L.splice(t,1),A.pop(),P=!0,I=!0,H())}},B.dispose=function(){if(!B._stopped&&(B._stopped=!0,window.removeEventListener("resize",Y),t.removeEventListener("webglcontextlost",V),B.mouseListener.enabled=!1,!B.contextLost)){T.dispose(),C.dispose();for(var e=0;e_.distance)continue;for(var u=0;u 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:410}],294:[function(e,t,r){"use strict";var n=e("gl-shader"),a=e("gl-buffer"),i=e("typedarray-pool"),o=e("./lib/shader");function s(e,t,r,n,a){this.plot=e,this.offsetBuffer=t,this.pickBuffer=r,this.shader=n,this.pickShader=a,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(e,t){var r=e.gl,i=a(r),l=a(r),u=n(r,o.pointVertex,o.pointFragment),c=n(r,o.pickVertex,o.pickFragment),d=new s(e,i,l,u,c);return d.update(t),e.addObject(d),d};var l,u,c=s.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(e){var t;function r(t,r){return t in e?e[t]:r}e=e||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=e.positions.length>>>1,a=e.positions instanceof Float32Array,o=e.idToIndex instanceof Int32Array&&e.idToIndex.length>=n,s=e.positions,l=a?s:i.mallocFloat32(s.length),u=o?e.idToIndex:i.mallocInt32(n);if(a||l.set(s),!o)for(l.set(s),t=0;t>>1;for(r=0;r=t[0]&&i<=t[2]&&o>=t[1]&&o<=t[3]&&n++}return n}(this.points,a),c=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/i,l[4]=2/o,l[6]=-2*a[0]/i-1,l[7]=-2*a[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=c<5,r.uniforms.pointSize=c,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),t&&(u[0]=255&e,u[1]=e>>8&255,u[2]=e>>16&255,u[3]=e>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=u,this.pickOffset=e);var d=n.getParameter(n.BLEND),p=n.getParameter(n.DITHER);return d&&!this.blend&&n.disable(n.BLEND),p&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),d&&!this.blend&&n.enable(n.BLEND),p&&n.enable(n.DITHER),e+this.pointCount}),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(e,t,r){var n=this.pickOffset,a=this.pointCount;if(r=n+a)return null;var i=r-n,o=this.points;return{object:this,pointId:i,dataCoord:[o[2*i],o[2*i+1]]}}},{"./lib/shader":293,"gl-buffer":243,"gl-shader":303,"typedarray-pool":543}],295:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o,s,l,u=t[0],c=t[1],d=t[2],p=t[3],h=r[0],f=r[1],m=r[2],g=r[3];return(i=u*h+c*f+d*m+p*g)<0&&(i=-i,h=-h,f=-f,m=-m,g=-g),1-i>1e-6?(a=Math.acos(i),o=Math.sin(a),s=Math.sin((1-n)*a)/o,l=Math.sin(n*a)/o):(s=1-n,l=n),e[0]=s*u+l*h,e[1]=s*c+l*f,e[2]=s*d+l*m,e[3]=s*p+l*g,e}},{}],296:[function(e,t,r){"use strict";t.exports=function(e){return e||0===e?e.toString():""}},{}],297:[function(e,t,r){"use strict";var n=e("vectorize-text");t.exports=function(e,t,r){var i=a[t];if(i||(i=a[t]={}),e in i)return i[e];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(e,o);o.triangles=!1;var l,u,c=n(e,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),u=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),c=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],d={vertex:i,fragment:l,attributes:c},p={vertex:o,fragment:l,attributes:c},h={vertex:s,fragment:l,attributes:c},f={vertex:i,fragment:u,attributes:c},m={vertex:o,fragment:u,attributes:c},g={vertex:s,fragment:u,attributes:c};function y(e,t){var r=n(e,t),a=r.attributes;return a.position.location=0,a.color.location=1,a.glyph.location=2,a.id.location=3,r}r.createPerspective=function(e){return y(e,d)},r.createOrtho=function(e){return y(e,p)},r.createProject=function(e){return y(e,h)},r.createPickPerspective=function(e){return y(e,f)},r.createPickOrtho=function(e){return y(e,m)},r.createPickProject=function(e){return y(e,g)}},{"gl-shader":303,glslify:410}],299:[function(e,t,r){"use strict";var n=e("is-string-blank"),a=e("gl-buffer"),i=e("gl-vao"),o=e("typedarray-pool"),s=e("gl-mat4/multiply"),l=e("./lib/shaders"),u=e("./lib/glyphs"),c=e("./lib/get-simple-string"),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t){var r=e[0],n=e[1],a=e[2],i=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*a+t[12]*i,e[1]=t[1]*r+t[5]*n+t[9]*a+t[13]*i,e[2]=t[2]*r+t[6]*n+t[10]*a+t[14]*i,e[3]=t[3]*r+t[7]*n+t[11]*a+t[15]*i,e}function h(e,t,r,n){return p(n,n),p(n,n),p(n,n)}function f(e,t){this.index=e,this.dataCoordinate=this.position=t}function m(e){return!0===e?1:e>1?1:e}function g(e,t,r,n,a,i,o,s,l,u,c,d){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=n,this.pointBuffer=a,this.colorBuffer=i,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=u,this.pickOrthoShader=c,this.pickProjectShader=d,this.points=[],this._selectResult=new f(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),u=l.createPickOrtho(t),c=l.createPickProject(t),d=a(t),p=a(t),h=a(t),f=a(t),m=i(t,[{buffer:d,size:3,type:t.FLOAT},{buffer:p,size:4,type:t.FLOAT},{buffer:h,size:2,type:t.FLOAT},{buffer:f,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),y=new g(t,r,n,o,d,p,h,f,m,s,u,c);return y.update(e),y};var y=g.prototype;y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},y.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var v=[0,0],_=[0,0,0],b=[0,0,0],x=[0,0,0,1],w=[0,0,0,1],k=d.slice(),M=[0,0,0],T=[[0,0,0],[0,0,0]];function S(e){return e[0]=e[1]=e[2]=0,e}function C(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function L(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}function A(e,t,r,n){var a,i=t.axesProject,o=t.gl,l=e.uniforms,u=r.model||d,c=r.view||d,p=r.projection||d,f=t.axesBounds,m=function(e){for(var t=T,r=0;r<2;++r)for(var n=0;n<3;++n)t[r][n]=Math.max(Math.min(e[r][n],1e8),-1e8);return t}(t.clipBounds);a=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],v[0]=2/o.drawingBufferWidth,v[1]=2/o.drawingBufferHeight,e.bind(),l.view=c,l.projection=p,l.screenSize=v,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=m,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(i[g]){l.scale=t.projectScale[g],l.opacity=t.projectOpacity[g];for(var y=k,A=0;A<16;++A)y[A]=0;for(A=0;A<4;++A)y[5*A]=1;y[5*g]=0,a[g]<0?y[12+g]=f[0][g]:y[12+g]=f[1][g],s(y,u,y),l.model=y;var E=(g+1)%3,D=(g+2)%3,P=S(_),I=S(b);P[E]=1,I[D]=1;var O=h(0,0,0,C(x,P)),F=h(0,0,0,C(w,I));if(Math.abs(O[1])>Math.abs(F[1])){var R=O;O=F,F=R,R=P,P=I,I=R;var z=E;E=D,D=z}O[0]<0&&(P[E]=-1),F[1]>0&&(I[D]=-1);var N=0,B=0;for(A=0;A<4;++A)N+=Math.pow(u[4*E+A],2),B+=Math.pow(u[4*D+A],2);P[E]/=Math.sqrt(N),I[D]/=Math.sqrt(B),l.axes[0]=P,l.axes[1]=I,l.fragClipBounds[0]=L(M,m[0],g,-1e8),l.fragClipBounds[1]=L(M,m[1],g,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*n),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}var E=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function D(e,t,r,n,a,i,o){var s=r.gl;if((i===r.projectHasAlpha||o)&&A(t,r,n,a),i===r.hasAlpha||o){e.bind();var l=e.uniforms;l.model=n.model||d,l.view=n.view||d,l.projection=n.projection||d,v[0]=2/s.drawingBufferWidth,v[1]=2/s.drawingBufferHeight,l.screenSize=v,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=E,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=a,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*a),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function P(e,t,r,a){var i;i=Array.isArray(e)?t=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var a=0;a<3;++a)n.position[a]=n.dataCoordinate[a]=r[a];return n},y.highlight=function(e){if(e){var t=e.index,r=255&t,n=t>>8&255,a=t>>16&255;this.highlightId=[r/255,n/255,a/255,0]}else this.highlightId=[1,1,1,1]},y.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(Array.isArray(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(Array.isArray(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){Array.isArray(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(r=+e.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=m(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=m(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var a,i,s=e.position,l=e.font||"normal",u=e.alignment||[0,0];if(2===u.length)a=u[0],i=u[1];else for(a=[],i=[],n=0;n0){var I=0,O=_,F=[0,0,0,1],R=[0,0,0,1],z=Array.isArray(h)&&Array.isArray(h[0]),N=Array.isArray(y)&&Array.isArray(y[0]);e:for(n=0;n0?1-S[0][0]:q<0?1+S[1][0]:1,G*=G>0?1-S[0][1]:G<0?1+S[1][1]:1],Z=M.cells||[],X=M.positions||[];for(k=0;k0){var y=r*c;o.drawBox(d-y,p-y,h+y,p+y,i),o.drawBox(d-y,f-y,h+y,f+y,i),o.drawBox(d-y,p-y,d+y,f+y,i),o.drawBox(h-y,p-y,h+y,f+y,i)}}}},s.update=function(e){e=e||{},this.innerFill=!!e.innerFill,this.outerFill=!!e.outerFill,this.innerColor=(e.innerColor||[0,0,0,.5]).slice(),this.outerColor=(e.outerColor||[0,0,0,.5]).slice(),this.borderColor=(e.borderColor||[0,0,0,1]).slice(),this.borderWidth=e.borderWidth||0,this.selectBox=(e.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":300,"gl-buffer":243,"gl-shader":303}],302:[function(e,t,r){"use strict";t.exports=function(e,t){var r=n(e,t),i=a.mallocUint8(t[0]*t[1]*4);return new u(e,r,i)};var n=e("gl-fbo"),a=e("typedarray-pool"),i=e("ndarray"),o=e("bit-twiddle").nextPow2,s=e("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_fthis.buffer.length){a.free(this.buffer);for(var n=this.buffer=a.mallocUint8(o(r*t*4)),i=0;ir)for(e=r;et)for(e=t;e=0){for(var k=0|w.type.charAt(w.type.length-1),M=new Array(k),T=0;T=0;)S+=1;x[v]=S}var C=new Array(r.length);function L(){p.program=o.program(h,p._vref,p._fref,b,x);for(var e=0;e=0){if((f=p.charCodeAt(p.length-1)-48)<2||f>4)throw new n("","Invalid data type for attribute "+d+": "+p);o(e,t,h[0],a,f,i,d)}else{if(!(p.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+d+": "+p);var f;if((f=p.charCodeAt(p.length-1)-48)<2||f>4)throw new n("","Invalid data type for attribute "+d+": "+p);s(e,t,h,a,f,i,d)}}}return i};var n=e("./GLError");function a(e,t,r,n,a,i){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=a,this._constFunc=i}var i=a.prototype;function o(e,t,r,n,i,o,s){for(var l=["gl","v"],u=[],c=0;c4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+t+"],false,obj"+e+")"}throw new a("","Unknown uniform data type for "+name+": "+r)}if((i=r.charCodeAt(r.length-1)-48)<2||i>4)throw new a("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+t+"],obj"+e+")";case"v":return"gl.uniform"+i+"fv(locations["+t+"],obj"+e+")";default:throw new a("","Unrecognized data type for vector "+name+": "+r)}}}function u(t){for(var n=["return function updateProperty(obj){"],a=function e(t,r){if("object"!=typeof r)return[[t,r]];var n=[];for(var a in r){var i=r[a],o=t;parseInt(a)+""===a?o+="["+a+"]":o+="."+a,"object"==typeof i?n.push.apply(n,e(o,i)):n.push([o,i])}return n}("",t),i=0;i4)throw new a("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r;if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new a("","Unknown uniform data type for "+name+": "+e)}}(r[c].type);var h}function d(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var r=0;r1){s[0]in i||(i[s[0]]=[]),i=i[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:410}],314:[function(e,t,r){"use strict";var n=e("gl-vec3"),a=e("gl-vec4"),i=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t,r,i){for(var o=0,s=0;s0)for(k=0;k<8;k++){var M=(k+1)%8;u.push(p[k],h[k],h[M],h[M],p[M],p[k]),d.push(v,y,y,y,v,v),f.push(m,g,g,g,m,m);var T=u.length;c.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var S=p;p=h,h=S;var C=v;v=y,y=C;var L=m;m=g,g=L}return{positions:u,cells:c,vectors:d,vertexIntensity:f}}(e,r,i,o)})),d=[],p=[],h=[],f=[];for(s=0;st)return r-1}return r},l=function(e,t,r){return er?r:e},u=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var r=e.length,n=1;nd-1||v>p-1||_>h-1)return n.create();var b,x,w,k,M,T,S=i[0][f],C=i[0][y],L=i[1][m],A=i[1][v],E=i[2][g],D=(o-S)/(C-S),P=(u-L)/(A-L),I=(c-E)/(i[2][_]-E);switch(isFinite(D)||(D=.5),isFinite(P)||(P=.5),isFinite(I)||(I=.5),r.reversedX&&(f=d-1-f,y=d-1-y),r.reversedY&&(m=p-1-m,v=p-1-v),r.reversedZ&&(g=h-1-g,_=h-1-_),r.filled){case 5:M=g,T=_,w=m*h,k=v*h,b=f*h*p,x=y*h*p;break;case 4:M=g,T=_,b=f*h,x=y*h,w=m*h*d,k=v*h*d;break;case 3:w=m,k=v,M=g*p,T=_*p,b=f*p*h,x=y*p*h;break;case 2:w=m,k=v,b=f*p,x=y*p,M=g*p*d,T=_*p*d;break;case 1:b=f,x=y,M=g*d,T=_*d,w=m*d*h,k=v*d*h;break;default:b=f,x=y,w=m*d,k=v*d,M=g*d*p,T=_*d*p}var O=a[b+w+M],F=a[b+w+T],R=a[b+k+M],z=a[b+k+T],N=a[x+w+M],B=a[x+w+T],j=a[x+k+M],Y=a[x+k+T],H=n.create(),V=n.create(),U=n.create(),W=n.create();n.lerp(H,O,N,D),n.lerp(V,F,B,D),n.lerp(U,R,j,D),n.lerp(W,z,Y,D);var q=n.create(),G=n.create();n.lerp(q,H,U,P),n.lerp(G,V,W,P);var K=n.create();return n.lerp(K,q,G,I),K}(t,e,h)},m=e.getDivergence||function(e,t){var r=n.create(),a=1e-4;n.add(r,e,[a,0,0]);var i=f(r);n.subtract(i,i,t),n.scale(i,i,1e4),n.add(r,e,[0,a,0]);var o=f(r);n.subtract(o,o,t),n.scale(o,o,1e4),n.add(r,e,[0,0,a]);var s=f(r);return n.subtract(s,s,t),n.scale(s,s,1e4),n.add(r,i,o),n.add(r,r,s),r},g=[],y=t[0][0],v=t[0][1],_=t[0][2],b=t[1][0],x=t[1][1],w=t[1][2],k=function(e){var t=e[0],r=e[1],n=e[2];return!(tb||rx||n<_||n>w)},M=10*n.distance(t[0],t[1])/a,T=M*M,S=1,C=0,L=r.length;L>1&&(S=function(e){for(var t=[],r=[],n=[],a={},i={},o={},s=e.length,l=0;lC&&(C=z),F.push(z),g.push({points:D,velocities:P,divergences:F});for(var N=0;N<100*a&&D.lengthT&&n.scale(B,B,M/Math.sqrt(j)),n.add(B,B,E),I=f(B),n.squaredDistance(O,B)-T>-1e-4*T&&(D.push(B),O=B,P.push(I),R=m(B,I),z=n.length(R),isFinite(z)&&z>C&&(C=z),F.push(z)),E=B}}var Y=o(g,e.colormap,C,S);return d?Y.tubeScale=d:(0===C&&(C=1),Y.tubeScale=.5*c*S/C),Y};var c=e("./lib/shaders"),d=e("gl-cone3d").createMesh;t.exports.createTubeMesh=function(e,t){return d(e,t,{shaders:c,traceType:"streamtube"})}},{"./lib/shaders":313,"gl-cone3d":244,"gl-vec3":347,"gl-vec4":383}],315:[function(e,t,r){var n=e("gl-shader"),a=e("glslify"),i=a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=a(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(e){var t=n(e,i,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},r.createPickShader=function(e){var t=n(e,i,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},r.createContourShader=function(e){var t=n(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},r.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},{"gl-shader":303,glslify:410}],316:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],317:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=v(t),n=b(t),s=_(t),l=x(t),u=a(t),c=i(t,[{buffer:u,size:4,stride:w,offset:0},{buffer:u,size:3,stride:w,offset:16},{buffer:u,size:3,stride:w,offset:28}]),d=a(t),p=i(t,[{buffer:d,size:4,stride:20,offset:0},{buffer:d,size:1,stride:20,offset:16}]),h=a(t),f=i(t,[{buffer:h,size:2,type:t.FLOAT}]),m=o(t,1,C,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new L(t,[0,0],[[0,0,0],[0,0,0]],r,n,u,c,m,s,l,d,p,h,f,[0,0,0]),y={levels:[[],[],[]]};for(var k in e)y[k]=e[k];return y.colormap=y.colormap||"jet",g.update(y),g};var n=e("bit-twiddle"),a=e("gl-buffer"),i=e("gl-vao"),o=e("gl-texture2d"),s=e("typedarray-pool"),l=e("colormap"),u=e("ndarray-ops"),c=e("ndarray-pack"),d=e("ndarray"),p=e("surface-nets"),h=e("gl-mat4/multiply"),f=e("gl-mat4/invert"),m=e("binary-search-bounds"),g=e("ndarray-gradient"),y=e("./lib/shaders"),v=y.createShader,_=y.createContourShader,b=y.createPickShader,x=y.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],M=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],T=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function S(e,t,r,n,a){this.position=e,this.index=t,this.uv=r,this.level=n,this.dataCoordinate=a}!function(){for(var e=0;e<3;++e){var t=T[e],r=(e+2)%3;t[(e+1)%3+0]=1,t[r+3]=1,t[e+6]=1}}();var C=256;function L(e,t,r,n,a,i,o,l,u,c,p,h,f,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=a,this._coordinateBuffer=i,this._vao=o,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=p,this._contourVAO=h,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new S([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=f,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var A=L.prototype;A.isTransparent=function(){return this.opacity<1},A.isOpaque=function(){if(this.opacity>=1)return!0;for(var e=0;e<3;++e)if(this._contourCounts[e].length>0||this._dynamicCounts[e]>0)return!0;return!1},A.pickSlots=1,A.setPickBase=function(e){this.pickId=e};var E=[0,0,0],D={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(e,t){var r,n,a,i=t.axes&&t.axes.lastCubeProps.axis||E,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=D.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(i[r]>0)][r],h(l,e.model,l);var u=D.clipBounds[r];for(a=0;a<2;++a)for(n=0;n<3;++n)u[a][n]=e.clipBounds[a][n];u[0][r]=-1e8,u[1][r]=1e8}return D.showSurface=o,D.showContour=s,D}var I={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},O=k.slice(),F=[1,0,0,0,1,0,0,0,1];function R(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=I;n.model=e.model||k,n.view=e.view||k,n.projection=e.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=f(n.inverseModel,n.model);for(var a=0;a<2;++a)for(var i=n.clipBounds[a],o=0;o<3;++o)i[o]=Math.min(Math.max(this.clipBounds[a][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=F,n.vertexColor=this.vertexColor;var s=O;for(h(s,n.view,n.model),h(s,n.projection,s),f(s,s),a=0;a<3;++a)n.eyePosition[a]=s[12+a]/s[15];var l=s[15];for(a=0;a<3;++a)l+=this.lightPosition[a]*s[4*a+3];for(a=0;a<3;++a){var u=s[12+a];for(o=0;o<3;++o)u+=s[4*o+a]*this.lightPosition[o];n.lightPosition[a]=u/l}var c=P(n,this);if(c.showSurface&&t===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=c.projections[a],this._shader.uniforms.clipBounds=c.clipBounds[a],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(c.showContour&&!t){var d=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,d.bind(),d.uniforms=n;var p=this._contourVAO;for(p.bind(),a=0;a<3;++a)for(d.uniforms.permutation=T[a],r.lineWidth(this.contourWidth[a]*this.pixelRatio),o=0;o>4)/16)/255,a=Math.floor(n),i=n-a,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;a+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var d=c?i:1-i,p=0;p<2;++p)for(var h=a+c,f=s+p,g=d*(p?l:1-l),y=0;y<3;++y)u[y]+=this._field[y].get(h,f)*g;for(var v=this._pickResult.level,_=0;_<3;++_)if(v[_]=m.le(this.contourLevels[_],u[_]),v[_]<0)this.contourLevels[_].length>0&&(v[_]=0);else if(v[_]Math.abs(x-u[_])&&(v[_]+=1)}for(r.index[0]=i<.5?a:a+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=o/t[1],y=0;y<3;++y)r.dataCoordinate[y]=this._field[y].get(r.index[0],r.index[1]);return r},A.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();u.assign(e.lo(1,1).hi(r[0],r[1]),t),u.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),u.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),u.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),u.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},A.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=j(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,(function(e){return N(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=j(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0);var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var a=(t.shape[0]+2)*(t.shape[1]+2);a>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(a))),this._field[2]=d(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var i=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=d(this._field[o].data,[i[0]+2,i[1]+2]);if(e.coords){var h=e.coords;if(!Array.isArray(h)||3!==h.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var f=h[o];for(b=0;b<2;++b)if(f.shape[b]!==i[b])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],f)}}else if(e.ticks){var m=e.ticks;if(!Array.isArray(m)||2!==m.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var y=m[o];if((Array.isArray(y)||y.length)&&(y=d(y)),y.shape[0]!==i[o])throw new Error("gl-surface: invalid tick length");var v=d(y.data,i);v.stride[o]=y.stride[0],v.stride[1^o]=0,this.padField(this._field[o],v)}}else{for(o=0;o<2;++o){var _=[0,0];_[o]=1,this._field[o]=d(this._field[o].data,[i[0]+2,i[1]+2],_,0)}this._field[0].set(0,0,0);for(var b=0;b0){for(var ke=0;ke<5;++ke)re.pop();W-=1}continue e}re.push(se[0],se[1],ce[0],ce[1],se[2]),W+=1}}oe.push(W)}this._contourOffsets[ne]=ie,this._contourCounts[ne]=oe}var Me=s.mallocFloat(re.length);for(o=0;o halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:e,draw:t,atlas:{}}},k.prototype.update=function(e){var t=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=a(e,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=d(e.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=v(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=k.baseFontSize+"px sans-serif");var r,i=!1,o=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,r){if("string"==typeof e)try{e=n.parse(e)}catch(t){e=n.parse(k.baseFontSize+"px "+e)}else e=n.parse(n.stringify(e));var a=n.stringify({size:k.baseFontSize,family:e.family,stretch:x?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),s=h(e.size),l=Math.round(s[0]*f(s[1]));if(l!==t.fontSize[r]&&(o=!0,t.fontSize[r]=l),!(t.font[r]&&a==t.font[r].baseString||(i=!0,t.font[r]=k.fonts[a],t.font[r]))){var u=e.family.join(", "),c=[e.style];e.style!=e.variant&&c.push(e.variant),e.variant!=e.weight&&c.push(e.weight),x&&e.weight!=e.stretch&&c.push(e.stretch),t.font[r]={baseString:a,family:u,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:y(u,{origin:"top",fontSize:k.baseFontSize,fontStyle:c.join(" ")})},k.fonts[a]=t.font[r]}})),(i||o)&&this.font.forEach((function(r,a){var i=n.stringify({size:t.fontSize[a],family:r.family,stretch:x?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(t.fontAtlas[a]=t.shader.atlas[i],!t.fontAtlas[a]){var o=r.metrics;t.shader.atlas[i]=t.fontAtlas[a]={fontString:i,step:2*Math.ceil(t.fontSize[a]*o.bottom*.5),em:t.fontSize[a],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"==typeof e.text&&e.position&&e.position.length>2){for(var s=Array(.5*e.position.length),p=0;p2){for(var w=!e.position[0].length,M=c.mallocFloat(2*this.count),T=0,S=0;T1?t.align[r]:t.align[0]:t.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,r){var n=(t.font[r]||t.font[0]).metrics,a=0;return a+=.5*n.bottom,a+="number"==typeof e?e-n.baseline:-n[e],k.normalViewport||(a*=-1),a}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){var U;if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var W=e.color.length;U=c.mallocUint8(W);for(var q=(e.color.subarray||e.color.slice).bind(e.color),G=0;G4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var X=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(X);for(var J=0;J1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},t.exports=k},{"bit-twiddle":93,"color-normalize":121,"css-font":140,"detect-kerning":167,"es6-weak-map":319,"flatten-vertex-data":229,"font-atlas":230,"font-measure":231,"gl-util/context":324,"is-plain-obj":423,"object-assign":455,"parse-rect":460,"parse-unit":462,"pick-by-alias":466,regl:500,"to-px":537,"typedarray-pool":543}],319:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?WeakMap:e("./polyfill")},{"./is-implemented":320,"./polyfill":322}],320:[function(e,t,r){"use strict";t.exports=function(){var e,t;if("function"!=typeof WeakMap)return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(e){return!1}return"[object WeakMap]"===String(e)&&"function"==typeof e.set&&e.set({},1)===e&&"function"==typeof e.delete&&"function"==typeof e.has&&"one"===e.get(t)}},{}],321:[function(e,t,r){"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],322:[function(e,t,r){"use strict";var n,a=e("es5-ext/object/is-value"),i=e("es5-ext/object/set-prototype-of"),o=e("es5-ext/object/valid-object"),s=e("es5-ext/object/valid-value"),l=e("es5-ext/string/random-uniq"),u=e("d"),c=e("es6-iterator/get"),d=e("es6-iterator/for-of"),p=e("es6-symbol").toStringTag,h=e("./is-native-implemented"),f=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,y=Object.getPrototypeOf;t.exports=n=function(){var e,t=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return e=h&&i&&WeakMap!==n?i(new WeakMap,y(this)):this,a(t)&&(f(t)||(t=c(t))),m(e,"__weakMapData__",u("c","$weakMap$"+l())),t?(d(t,(function(t){s(t),e.set(t[0],t[1])})),e):e},h&&(i&&i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:u(n)})),Object.defineProperties(n.prototype,{delete:u((function(e){return!!g.call(o(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)})),get:u((function(e){if(g.call(o(e),this.__weakMapData__))return e[this.__weakMapData__]})),has:u((function(e){return g.call(o(e),this.__weakMapData__)})),set:u((function(e,t){return m(o(e),this.__weakMapData__,u("c",t)),this})),toString:u((function(){return"[object WeakMap]"}))}),m(n.prototype,p,u("c","WeakMap"))},{"./is-native-implemented":321,d:152,"es5-ext/object/is-value":196,"es5-ext/object/set-prototype-of":202,"es5-ext/object/valid-object":206,"es5-ext/object/valid-value":207,"es5-ext/string/random-uniq":212,"es6-iterator/for-of":214,"es6-iterator/get":215,"es6-symbol":221}],323:[function(e,t,r){"use strict";var n=e("ndarray"),a=e("ndarray-ops"),i=e("typedarray-pool");t.exports=function(e){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||function(e){o=[e.LINEAR,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_NEAREST],s=[e.NEAREST,e.LINEAR,e.NEAREST_MIPMAP_NEAREST,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_LINEAR],l=[e.REPEAT,e.CLAMP_TO_EDGE,e.MIRRORED_REPEAT]}(e),"number"==typeof arguments[1])return g(e,arguments[1],arguments[2],arguments[3]||e.RGBA,arguments[4]||e.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(e,0|arguments[1][0],0|arguments[1][1],arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var t=arguments[1],r=u(t)?t:t.raw;if(r)return function(e,t,r,n,a,i){var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,a,a,i,t),new p(e,o,r,n,a,i)}(e,r,0|t.width,0|t.height,arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if(t.shape&&t.data&&t.stride)return function(e,t){var r=t.dtype,o=t.shape.slice(),s=e.getParameter(e.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=f(o,t.stride.slice()),u=0;"float32"===r?u=e.FLOAT:"float64"===r?(u=e.FLOAT,l=!1,r="float32"):"uint8"===r?u=e.UNSIGNED_BYTE:(u=e.UNSIGNED_BYTE,l=!1,r="uint8");var d,h,g=0;if(2===o.length)g=e.LUMINANCE,o=[o[0],o[1],1],t=n(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])g=e.ALPHA;else if(2===o[2])g=e.LUMINANCE_ALPHA;else if(3===o[2])g=e.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}}u!==e.FLOAT||e.getExtension("OES_texture_float")||(u=e.UNSIGNED_BYTE,l=!1);var y=t.size;if(l)d=0===t.offset&&t.data.length===y?t.data:t.data.subarray(t.offset,t.offset+y);else{var v=[o[2],o[2]*o[0],1];h=i.malloc(y,r);var _=n(h,o,v,0);"float32"!==r&&"float64"!==r||u!==e.UNSIGNED_BYTE?a.assign(_,t):c(_,t),d=h.subarray(0,y)}var b=m(e);return e.texImage2D(e.TEXTURE_2D,0,g,o[0],o[1],0,g,u,d),l||i.free(h),new p(e,b,o[0],o[1],g,u)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function u(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&e instanceof ImageData}var c=function(e,t){a.muls(e,t,255)};function d(e,t,r){var n=e.gl,a=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function p(e,t,r,n,a,i){this.gl=e,this.handle=t,this.format=a,this.type=i,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var h=p.prototype;function f(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,n,a){var i=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture shape");if(a===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,a,null),new p(e,o,t,r,n,a)}Object.defineProperties(h,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return d(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return d(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,d(this,this._shape[0],e),e}}}),h.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},h.dispose=function(){this.gl.deleteTexture(this.handle)},h.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},h.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=u(e)?e:e.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,u,d){var p=d.dtype,h=d.shape.slice();if(h.length<2||h.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,y=f(h,d.stride.slice());if("float32"===p?m=e.FLOAT:"float64"===p?(m=e.FLOAT,y=!1,p="float32"):"uint8"===p?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,y=!1,p="uint8"),2===h.length)g=e.LUMINANCE,h=[h[0],h[1],1],d=n(d.data,h,[d.stride[0],d.stride[1],1],d.offset);else{if(3!==h.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===h[2])g=e.ALPHA;else if(2===h[2])g=e.LUMINANCE_ALPHA;else if(3===h[2])g=e.RGB;else{if(4!==h[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}h[2]}if(g!==e.LUMINANCE&&g!==e.ALPHA||s!==e.LUMINANCE&&s!==e.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=d.size,_=u.indexOf(o)<0;if(_&&u.push(o),m===l&&y)0===d.offset&&d.data.length===v?_?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,d.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,d.data):_?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,d.data.subarray(d.offset,d.offset+v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,d.data.subarray(d.offset,d.offset+v));else{var b;b=l===e.FLOAT?i.mallocFloat32(v):i.mallocUint8(v);var x=n(b,h,[h[2],h[2]*h[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?c(x,d):a.assign(x,d),_?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,b.subarray(0,v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,b.subarray(0,v)),l===e.FLOAT?i.freeFloat32(b):i.freeUint8(b)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":543}],324:[function(e,r,n){(function(t){"use strict";var n=e("pick-by-alias");function a(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*t.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*t.innerHeight);else{var r=e.container.getBoundingClientRect();e.canvas.width=e.width||r.right-r.left,e.canvas.height=e.height||r.bottom-r.top}}function i(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function o(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}r.exports=function(e){var r;if(e?"string"==typeof e&&(e={container:e}):e={},(e=i(e)?{container:e}:"string"==typeof(r=e).nodeName&&"function"==typeof r.appendChild&&"function"==typeof r.getBoundingClientRect?{container:e}:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(e)?{gl:e}:n(e,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(e.pixelRatio=t.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}i(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=o(),e.container.appendChild(e.canvas),a(e))}else if(!e.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=o(),e.container.appendChild(e.canvas),a(e)}if(!e.gl)try{e.gl=e.canvas.getContext("webgl",e.attrs)}catch(r){try{e.gl=e.canvas.getContext("experimental-webgl",e.attrs)}catch(r){e.gl=e.canvas.getContext("webgl-experimental",e.attrs)}}return e.gl}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":466}],325:[function(e,t,r){"use strict";t.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var n=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var a=0;a1?0:Math.acos(s)};var n=e("./fromValues"),a=e("./normalize"),i=e("./dot")},{"./dot":340,"./fromValues":346,"./normalize":357}],331:[function(e,t,r){t.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},{}],332:[function(e,t,r){t.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],333:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],334:[function(e,t,r){t.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},{}],335:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],l=r[2];return e[0]=a*l-i*s,e[1]=i*o-n*l,e[2]=n*s-a*o,e}},{}],336:[function(e,t,r){t.exports=e("./distance")},{"./distance":337}],337:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return Math.sqrt(r*r+n*n+a*a)}},{}],338:[function(e,t,r){t.exports=e("./divide")},{"./divide":339}],339:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},{}],340:[function(e,t,r){t.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},{}],341:[function(e,t,r){t.exports=1e-6},{}],342:[function(e,t,r){t.exports=function(e,t){var r=e[0],a=e[1],i=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(a-s)<=n*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-l)<=n*Math.max(1,Math.abs(i),Math.abs(l))};var n=e("./epsilon")},{"./epsilon":341}],343:[function(e,t,r){t.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},{}],344:[function(e,t,r){t.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},{}],345:[function(e,t,r){t.exports=function(e,t,r,a,i,o){var s,l;for(t||(t=3),r||(r=0),l=a?Math.min(a*t+r,e.length):e.length,s=r;s0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}},{}],358:[function(e,t,r){t.exports=function(e,t){t=t||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,a=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=n*t,e}},{}],359:[function(e,t,r){t.exports=function(e,t,r,n){var a=r[1],i=r[2],o=t[1]-a,s=t[2]-i,l=Math.sin(n),u=Math.cos(n);return e[0]=t[0],e[1]=a+o*u-s*l,e[2]=i+o*l+s*u,e}},{}],360:[function(e,t,r){t.exports=function(e,t,r,n){var a=r[0],i=r[2],o=t[0]-a,s=t[2]-i,l=Math.sin(n),u=Math.cos(n);return e[0]=a+s*l+o*u,e[1]=t[1],e[2]=i+s*u-o*l,e}},{}],361:[function(e,t,r){t.exports=function(e,t,r,n){var a=r[0],i=r[1],o=t[0]-a,s=t[1]-i,l=Math.sin(n),u=Math.cos(n);return e[0]=a+o*u-s*l,e[1]=i+o*l+s*u,e[2]=t[2],e}},{}],362:[function(e,t,r){t.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},{}],363:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},{}],364:[function(e,t,r){t.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},{}],365:[function(e,t,r){t.exports=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}},{}],366:[function(e,t,r){t.exports=e("./squaredDistance")},{"./squaredDistance":368}],367:[function(e,t,r){t.exports=e("./squaredLength")},{"./squaredLength":369}],368:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return r*r+n*n+a*a}},{}],369:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}},{}],370:[function(e,t,r){t.exports=e("./subtract")},{"./subtract":371}],371:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},{}],372:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2];return e[0]=n*r[0]+a*r[3]+i*r[6],e[1]=n*r[1]+a*r[4]+i*r[7],e[2]=n*r[2]+a*r[5]+i*r[8],e}},{}],373:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[3]*n+r[7]*a+r[11]*i+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*a+r[8]*i+r[12])/o,e[1]=(r[1]*n+r[5]*a+r[9]*i+r[13])/o,e[2]=(r[2]*n+r[6]*a+r[10]*i+r[14])/o,e}},{}],374:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*i-l*a,d=u*a+l*n-o*i,p=u*i+o*a-s*n,h=-o*n-s*a-l*i;return e[0]=c*u+h*-o+d*-l-p*-s,e[1]=d*u+h*-s+p*-o-c*-l,e[2]=p*u+h*-l+c*-s-d*-o,e}},{}],375:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},{}],376:[function(e,t,r){t.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],377:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],378:[function(e,t,r){t.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},{}],379:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(r*r+n*n+a*a+i*i)}},{}],380:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},{}],381:[function(e,t,r){t.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},{}],382:[function(e,t,r){t.exports=function(e,t,r,n){var a=new Float32Array(4);return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a}},{}],383:[function(e,t,r){t.exports={create:e("./create"),clone:e("./clone"),fromValues:e("./fromValues"),copy:e("./copy"),set:e("./set"),add:e("./add"),subtract:e("./subtract"),multiply:e("./multiply"),divide:e("./divide"),min:e("./min"),max:e("./max"),scale:e("./scale"),scaleAndAdd:e("./scaleAndAdd"),distance:e("./distance"),squaredDistance:e("./squaredDistance"),length:e("./length"),squaredLength:e("./squaredLength"),negate:e("./negate"),inverse:e("./inverse"),normalize:e("./normalize"),dot:e("./dot"),lerp:e("./lerp"),random:e("./random"),transformMat4:e("./transformMat4"),transformQuat:e("./transformQuat")}},{"./add":375,"./clone":376,"./copy":377,"./create":378,"./distance":379,"./divide":380,"./dot":381,"./fromValues":382,"./inverse":384,"./length":385,"./lerp":386,"./max":387,"./min":388,"./multiply":389,"./negate":390,"./normalize":391,"./random":392,"./scale":393,"./scaleAndAdd":394,"./set":395,"./squaredDistance":396,"./squaredLength":397,"./subtract":398,"./transformMat4":399,"./transformQuat":400}],384:[function(e,t,r){t.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},{}],385:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3];return Math.sqrt(t*t+r*r+n*n+a*a)}},{}],386:[function(e,t,r){t.exports=function(e,t,r,n){var a=t[0],i=t[1],o=t[2],s=t[3];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e}},{}],387:[function(e,t,r){t.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},{}],388:[function(e,t,r){t.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},{}],389:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},{}],390:[function(e,t,r){t.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},{}],391:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=a*o,e[3]=i*o),e}},{}],392:[function(e,t,r){var n=e("./normalize"),a=e("./scale");t.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),a(e,e,t),e}},{"./normalize":391,"./scale":393}],393:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},{}],394:[function(e,t,r){t.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},{}],395:[function(e,t,r){t.exports=function(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}},{}],396:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return r*r+n*n+a*a+i*i}},{}],397:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3];return t*t+r*r+n*n+a*a}},{}],398:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},{}],399:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3];return e[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,e[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,e[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,e[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,e}},{}],400:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*i-l*a,d=u*a+l*n-o*i,p=u*i+o*a-s*n,h=-o*n-s*a-l*i;return e[0]=c*u+h*-o+d*-l-p*-s,e[1]=d*u+h*-s+p*-o-c*-l,e[2]=p*u+h*-l+c*-s-d*-o,e[3]=t[3],e}},{}],401:[function(e,t,r){t.exports=function(e,t,r,i){return n[0]=i,n[1]=r,n[2]=t,n[3]=e,a[0]};var n=new Uint8Array(4),a=new Float32Array(n.buffer)},{}],402:[function(e,t,r){var n=e("glsl-tokenizer"),a=e("atob-lite");t.exports=function(e){for(var t=Array.isArray(e)?e:n(e),r=0;r0)continue;r=e.slice(0,1).join("")}return z(r),D+=r.length,(C=C.slice(r.length)).length}}function U(){return/[^a-fA-F0-9]/.test(t)?(z(C.join("")),S=l,M):(C.push(t),r=t,M+1)}function W(){return"."===t?(C.push(t),S=m,r=t,M+1):/[eE]/.test(t)?(C.push(t),S=m,r=t,M+1):"x"===t&&1===C.length&&"0"===C[0]?(S=x,C.push(t),r=t,M+1):/[^\d]/.test(t)?(z(C.join("")),S=l,M):(C.push(t),r=t,M+1)}function q(){return"f"===t&&(C.push(t),r=t,M+=1),/[eE]/.test(t)?(C.push(t),r=t,M+1):"-"===t&&/[eE]/.test(r)?(C.push(t),r=t,M+1):/[^\d]/.test(t)?(z(C.join("")),S=l,M):(C.push(t),r=t,M+1)}function G(){if(/[^\d\w_]/.test(t)){var e=C.join("");return S=R.indexOf(e)>-1?v:F.indexOf(e)>-1?y:g,z(C.join("")),S=l,M}return C.push(t),r=t,M+1}};var n=e("./lib/literals"),a=e("./lib/operators"),i=e("./lib/builtins"),o=e("./lib/literals-300es"),s=e("./lib/builtins-300es"),l=999,u=9999,c=0,d=1,p=2,h=3,f=4,m=5,g=6,y=7,v=8,_=9,b=10,x=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":405,"./lib/builtins-300es":404,"./lib/literals":407,"./lib/literals-300es":406,"./lib/operators":408}],404:[function(e,t,r){var n=e("./builtins");n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":405}],405:[function(e,t,r){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],406:[function(e,t,r){var n=e("./literals");t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":407}],407:[function(e,t,r){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],408:[function(e,t,r){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],409:[function(e,t,r){var n=e("./index");t.exports=function(e,t){var r=n(t),a=[];return a=(a=a.concat(r(e))).concat(r(null))}},{"./index":403}],410:[function(e,t,r){t.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n>1,c=-7,d=r?a-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+e[t+d],d+=p,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=p,c-=8);if(0===i)i=1-u;else{if(i===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=u}return(h?-1:1)*o*Math.pow(2,i-n)},r.write=function(e,t,r,n,a,i){var o,s,l,u=8*i-a-1,c=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&s,h+=f,s/=256,a-=8);for(o=o<0;e[r+h]=255&o,h+=f,o/=256,u-=8);e[r+h-f]|=128*m}},{}],414:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.length;if(0===r)throw new Error("Must have at least d+1 points");var a=e[0].length;if(r<=a)throw new Error("Must input at least d+1 points");var o=e.slice(0,a+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(a+1),c=0;c<=a;++c)l[c]=c;s<0&&(l[0]=1,l[1]=0);var d=new i(l,new Array(a+1),!1),p=d.adjacent,h=new Array(a+2);for(c=0;c<=a;++c){for(var f=l.slice(),m=0;m<=a;++m)m===c&&(f[m]=-1);var g=f[0];f[0]=f[1],f[1]=g;var y=new i(f,new Array(a+1),!0);p[c]=y,h[c]=y}for(h[a+1]=d,c=0;c<=a;++c){f=p[c].vertices;var v=p[c].adjacent;for(m=0;m<=a;++m){var _=f[m];if(_<0)v[m]=d;else for(var b=0;b<=a;++b)p[b].vertices.indexOf(_)<0&&(v[m]=p[b])}}var x=new u(a,o,h),w=!!t;for(c=a+1;c0&&t.push(","),t.push("tuple[",r,"]");t.push(")}return orient");var a=new Function("test",t.join("")),i=n[e+1];return i||(i=n),a(i)}(e)),this.orient=i}var c=u.prototype;c.handleBoundaryDegeneracy=function(e,t){var r=this.dimension,n=this.vertices.length-1,a=this.tuple,i=this.vertices,o=[e];for(e.lastVisited=-n;o.length>0;){(e=o.pop()).vertices;for(var s=e.adjacent,l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,d=0;d<=r;++d){var p=c[d];a[d]=p<0?t:i[p]}var h=this.orient();if(h>0)return u;u.lastVisited=-n,0===h&&o.push(u)}}}return null},c.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,i=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)i[c]=a[l[c]];for(s.lastVisited=r,c=0;c<=n;++c){var d=u[c];if(!(d.lastVisited>=r)){var p=i[c];i[c]=e;var h=this.orient();if(i[c]=p,h<0){s=d;continue e}d.boundary?d.lastVisited=-r:d.lastVisited=r}}return}return s},c.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,d=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,u.push(t);for(var p=[];d.length>0;){var h=(t=d.pop()).vertices,f=t.adjacent,m=h.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var y=f[g];if(y.boundary&&!(y.lastVisited>=r)){var v=y.vertices;if(y.lastVisited!==-r){for(var _=0,b=0;b<=n;++b)v[b]<0?(_=b,l[b]=e):l[b]=a[v[b]];if(this.orient()>0){v[_]=r,y.boundary=!1,u.push(y),d.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var x=y.adjacent,w=h.slice(),k=f.slice(),M=new i(w,k,!0);c.push(M);var T=x.indexOf(t);if(!(T<0))for(x[T]=M,k[m]=y,w[g]=-1,k[g]=t,f[g]=M,M.flip(),b=0;b<=n;++b){var S=w[b];if(!(S<0||S===r)){for(var C=new Array(n-1),L=0,A=0;A<=n;++A){var E=w[A];E<0||A===b||(C[L++]=E)}p.push(new o(C,M,b))}}}}}for(p.sort(s),g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&e)){var d=o[0];o[0]=o[1],o[1]=d}t.push(o)}}return t}},{"robust-orientation":508,"simplicial-complex":518}],415:[function(e,t,r){"use strict";var n=e("binary-search-bounds"),a=0,i=1;function o(e,t,r,n,a){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=a,this.count=(t?t.count:0)+(r?r.count:0)+n.length}t.exports=function(e){return e&&0!==e.length?new _(v(e)):new _(null)};var s=o.prototype;function l(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function u(e,t){var r=v(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function c(e,t){var r=e.intervals([]);r.push(t),u(e,r)}function d(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?a:(r.splice(n,1),u(e,r),i)}function p(e,t,r){for(var n=0;n=0&&e[n][1]>=t;--n){var a=r(e[n]);if(a)return a}}function f(e,t){for(var r=0;r>1],a=[],i=[],s=[];for(r=0;r3*(t+1)?c(this,e):this.left.insert(e):this.left=v([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?c(this,e):this.right.insert(e):this.right=v([e]);else{var r=n.ge(this.leftPoints,e,g),a=n.ge(this.rightPoints,e,y);this.leftPoints.splice(r,0,e),this.rightPoints.splice(a,0,e)}},s.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?d(this,e):2===(u=this.left.remove(e))?(this.left=null,this.count-=1,i):(u===i&&(this.count-=1),u):a;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?d(this,e):2===(u=this.right.remove(e))?(this.right=null,this.count-=1,i):(u===i&&(this.count-=1),u):a;if(1===this.count)return this.leftPoints[0]===e?2:a;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,u=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=u}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return i}for(s=n.ge(this.leftPoints,e,g);sthis.mid?this.right&&(r=this.right.queryPoint(e,t))?r:h(this.rightPoints,e,t):f(this.leftPoints,t);var r},s.queryInterval=function(e,t,r){var n;return ethis.mid&&this.right&&(n=this.right.queryInterval(e,t,r))?n:tthis.mid?h(this.rightPoints,e,r):f(this.leftPoints,r)};var b=_.prototype;b.insert=function(e){this.root?this.root.insert(e):this.root=new o(e[0],null,null,[e],[e])},b.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),t!==a}return!1},b.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},b.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":92}],416:[function(e,t,r){"use strict";t.exports=function(e,t){t=t||new Array(e.length);for(var r=0;r * @license MIT */ t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],420:[function(e,t,r){"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],421:[function(e,t,r){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var n=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function i(e){e||(e={});var t=e.ua;return t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"==typeof t&&(e.tablet?a.test(t):n.test(t))}},{}],422:[function(e,t,r){"use strict";t.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},{}],423:[function(e,t,r){"use strict";var n=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===n.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}},{}],424:[function(e,t,r){"use strict";t.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},{}],425:[function(e,t,r){"use strict";t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},{}],426:[function(e,t,r){t.exports=function(e,t,r){return e*(1-r)+t*r}},{}],427:[function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?t.exports=n():(e=e||self).mapboxgl=n()}(this,(function(){"use strict";var e,t,r;function n(n,a){if(e)if(t){var i="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",o={};e(o),(r=a(o)).workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"}))}else t=a;else e=a}return n(0,(function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=n;function n(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}n.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},n.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},n.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},n.prototype.solveCurveX=function(e,t){var r,n,a,i,o;for(void 0===t&&(t=1e-6),a=e,o=0;o<8;o++){if(i=this.sampleCurveX(a)-e,Math.abs(i)(n=1))return n;for(;ri?r=a:n=a,a=.5*(n-r)+r}return a},n.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var a=i;function i(e,t){this.x=e,this.y=t}function o(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var r=0;r0;)t[r]=arguments[r+1];for(var n=0,a=t;n>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function m(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function g(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function y(e,t){return-1!==e.indexOf(t,e.length-t.length)}function v(e,t,r){var n={};for(var a in e)n[a]=t.call(r||this,e[a],a,e);return n}function _(e,t,r){var n={};for(var a in e)t.call(r||this,e[a],a,e)&&(n[a]=e[a]);return n}function b(e){return Array.isArray(e)?e.map(b):"object"==typeof e&&e?v(e,b):e}var x={};function w(e){x[e]||("undefined"!=typeof console&&console.warn(e),x[e]=!0)}function k(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function M(e){for(var t=0,r=0,n=e.length,a=n-1,i=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(e,r,n,a){var i=n||a;return t[r]=!i||i.toLowerCase(),""})),t["max-age"]){var r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t}function S(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(e){return!1}}var C,L,A,E,D=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),P=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,I=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,O={now:D,frame:function(e){var t=P(e);return{cancel:function(){return I(t)}}},getImageData:function(e){var t=self.document.createElement("canvas"),r=t.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(0,0,e.width,e.height)},resolveURL:function(e){return C||(C=self.document.createElement("a")),C.href=e,C.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==L&&(L=self.matchMedia("(prefers-reduced-motion: reduce)")),L.matches)}},F={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},R={supported:!1,testSupport:function(e){!z&&E&&(N?B(e):A=e)}},z=!1,N=!1;function B(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,E),e.isContextLost())return;R.supported=!0}catch(e){}e.deleteTexture(t),z=!0}self.document&&((E=self.document.createElement("img")).onload=function(){A&&B(A),A=null,N=!0},E.onerror=function(){z=!0,A=null},E.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var j="01",Y=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function H(e){return 0===e.indexOf("mapbox:")}Y.prototype._createSkuToken=function(){var e=function(){for(var e="",t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",j,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},Y.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Y.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},Y.prototype.normalizeStyleURL=function(e,t){if(!H(e))return e;var r=q(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Y.prototype.normalizeGlyphsURL=function(e,t){if(!H(e))return e;var r=q(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Y.prototype.normalizeSourceURL=function(e,t){if(!H(e))return e;var r=q(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},Y.prototype.normalizeSpriteURL=function(e,t,r,n){var a=q(e);return H(e)?(a.path="/styles/v1"+a.path+"/sprite"+t+r,this._makeAPIURL(a,this._customAccessToken||n)):(a.path+=""+t+r,G(a))},Y.prototype.normalizeTileURL=function(e,t,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!H(t))return e;var n=q(e),a=O.devicePixelRatio>=2||512===r?"@2x":"",i=R.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+a+i),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,F.REQUIRE_ACCESS_TOKEN&&(F.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},Y.prototype.canonicalizeTileURL=function(e){var t=q(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;var r="mapbox://tiles/";r+=t.path.replace("/v4/","");var n=t.params.filter((function(e){return!e.match(/^access_token=/)}));return n.length&&(r+="?"+n.join("&")),r},Y.prototype.canonicalizeTileset=function(e,t){if(!H(t))return e.tiles||[];for(var r=[],n=0,a=e.tiles;n=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(e){w("Unable to write to LocalStorage")}},Z.prototype.processRequests=function(e){},Z.prototype.postEvent=function(e,t,r,n){var a=this;if(F.EVENTS_URL){var i=q(F.EVENTS_URL);i.params.push("access_token="+(n||F.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.3.2",skuId:j,userId:this.anonId},s=t?d(o,t):o,l={url:G(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=ye(l,(function(e){a.pendingRequest=null,r(e),a.saveEventData(),a.processRequests(n)}))}},Z.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var X,J=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return H(e)||U(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},n)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,a=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=f()),this.postEvent(a,{skuToken:this.skuToken},(function(e){e||n&&(t.success[n]=!0)}),e))}},t}(Z),$=new(function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return H(e)||U(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=K(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,a=n!==this.eventData.tokenU;m(this.anonId)||(this.anonId=f(),a=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(i),l=(i-this.eventData.lastSuccess)/864e5;a=a||l>=1||l<-1||o.getDate()!==s.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=i,t.eventData.tokenU=n)}),e)}},t}(Z)),Q=$.postTurnstileEvent.bind($),ee=new J,te=ee.postMapLoadEvent.bind(ee),re="mapbox-tiles",ne=500,ae=50,ie=42e4;function oe(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var se=1/0,le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(le);var ue=function(e){function t(t,r,n){401===r&&U(n)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,t),this.status=r,this.url=n,this.name=this.constructor.name,this.message=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error);function ce(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var de=ce()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function pe(e,t){var r,n=new self.AbortController,a=new self.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:de(),signal:n.signal}),i=!1,o=!1,s=(r=a.url).indexOf("sku=")>0&&U(r);"json"===e.type&&a.headers.set("Accept","application/json");var l=function(r,n,i){if(!o){if(r&&"SecurityError"!==r.message&&w(r),n&&i)return u(n);var l=Date.now();self.fetch(a).then((function(r){if(r.ok){var n=s?r.clone():null;return u(r,n,l)}return t(new ue(r.statusText,r.status,e.url))})).catch((function(e){20!==e.code&&t(new Error(e.message))}))}},u=function(r,n,s){("arrayBuffer"===e.type?r.arrayBuffer():"json"===e.type?r.json():r.text()).then((function(e){o||(n&&s&&function(e,t,r){if(self.caches){var n={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach((function(e,t){return n.headers.set(t,e)}));var a=T(t.headers.get("Cache-Control")||"");a["no-store"]||(a["max-age"]&&n.headers.set("Expires",new Date(r+1e3*a["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-rDate.now()&&!r["no-cache"]}(n);e.delete(r),a&&e.put(r,n.clone()),t(null,n,a)})).catch(t)})).catch(t)}(a,l):l(null,null),{cancel:function(){o=!0,i||n.abort()}}}var he,fe,me=function(e,t){if(r=e.url,!(/^file:/.test(r)||/^file:/.test(de())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return pe(e,t);if(ce()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}var r;return function(e,t){var r=new self.XMLHttpRequest;for(var n in r.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(r.responseType="arraybuffer"),e.headers)r.setRequestHeader(n,e.headers[n]);return"json"===e.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===e.credentials,r.onerror=function(){t(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===e.type)try{n=JSON.parse(r.response)}catch(e){return t(e)}t(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else t(new ue(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}(e,t)},ge=function(e,t){return me(d(e,{type:"arrayBuffer"}),t)},ye=function(e,t){return me(d(e,{method:"POST"}),t)};he=[],fe=0;var ve=function(e,t){if(fe>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return he.push(r),r}fe++;var n=!1,a=function(){if(!n)for(n=!0,fe--;he.length&&fe0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},ke.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var Me={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"},{"!":"text-variable-anchor"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},Te=function(e,t,r,n){this.message=(e?e+": ":"")+r,n&&(this.identifier=n),null!=t&&t.__line__&&(this.line=t.__line__)};function Se(e){var t=e.key,r=e.value;return r?[new Te(t,r,"constants have been deprecated as of v8")]:[]}function Ce(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,a=t;n":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Ue=[Ie,Oe,Fe,Re,ze,Ye,Ne,He(Be)];function We(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!We(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=Ue;r255?255:e}function a(e){return e<0?0:e>1?1:e}function i(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function o(e){return"%"===e[e.length-1]?a(parseFloat(e)/100):a(parseFloat(e))}function s(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{t.parseCSSColor=function(e){var t,a=e.replace(/ /g,"").toLowerCase();if(a in r)return r[a].slice();if("#"===a[0])return 4===a.length?(t=parseInt(a.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===a.length&&(t=parseInt(a.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=a.indexOf("("),u=a.indexOf(")");if(-1!==l&&u+1===a.length){var c=a.substr(0,l),d=a.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==d.length)return null;p=o(d.pop());case"rgb":return 3!==d.length?null:[i(d[0]),i(d[1]),i(d[2]),p];case"hsla":if(4!==d.length)return null;p=o(d.pop());case"hsl":if(3!==d.length)return null;var h=(parseFloat(d[0])%360+360)%360/360,f=o(d[1]),m=o(d[2]),g=m<=.5?m*(f+1):m+f-m*f,y=2*m-g;return[n(255*s(y,g,h+1/3)),n(255*s(y,g,h)),n(255*s(y,g,h-1/3)),p];default:return null}}return null}}catch(e){}})).parseCSSColor,Ge=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};Ge.parse=function(e){if(e){if(e instanceof Ge)return e;if("string"==typeof e){var t=qe(e);if(t)return new Ge(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},Ge.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],a=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+a+")"},Ge.prototype.toArray=function(){var e=this.r,t=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*r/n,n]},Ge.black=new Ge(0,0,0,1),Ge.white=new Ge(1,1,1,1),Ge.transparent=new Ge(0,0,0,0),Ge.red=new Ge(1,0,0,1);var Ke=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ke.prototype.compare=function(e,t){return this.collator.compare(e,t)},Ke.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Ze=function(e,t,r,n){this.text=e,this.scale=t,this.fontStack=r,this.textColor=n},Xe=function(e){this.sections=e};function Je(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function $e(e){if(null===e)return Ie;if("string"==typeof e)return Fe;if("boolean"==typeof e)return Re;if("number"==typeof e)return Oe;if(e instanceof Ge)return ze;if(e instanceof Ke)return je;if(e instanceof Xe)return Ye;if(Array.isArray(e)){for(var t,r=e.length,n=0,a=e;n2){var s=e[1];if("string"!=typeof s||!(s in rt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=rt[s],n++}else i=Be;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],n++}r=He(i,o)}else r=rt[a];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var at=function(e){this.type=Ye,this.sections=e};at.parse=function(e,t){if(e.length<3)return t.error("Expected at least two arguments.");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");for(var r=[],n=1;n4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Je(t[0],t[1],t[2],t[3])))return new Ge(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new tt(r||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=0)return!1;var r=!0;return e.eachChild((function(e){r&&!ht(e,t)&&(r=!1)})),r}ct.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Re);if(!n)return null;var a=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Re);if(!a)return null;var i=null;return r.locale&&!(i=t.parse(r.locale,1,Fe))?null:new ct(n,a,i)},ct.prototype.evaluate=function(e){return new Ke(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},ct.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},ct.prototype.possibleOutputs=function(){return[void 0]},ct.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var ft=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};ft.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var r=e[1];return t.scope.has(r)?new ft(r,t.scope.get(r)):t.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},ft.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},ft.prototype.eachChild=function(){},ft.prototype.possibleOutputs=function(){return[void 0]},ft.prototype.serialize=function(){return["var",this.name]};var mt=function(e,t,r,n,a){void 0===t&&(t=[]),void 0===n&&(n=new Pe),void 0===a&&(a=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=a,this.expectedType=r};function gt(e,t){for(var r,n,a=e.length-1,i=0,o=a,s=0;i<=o;)if(r=e[s=Math.floor((i+o)/2)],n=e[s+1],r<=t){if(s===a||tt))throw new tt("Input is not a number.");o=s-1}return 0}mt.prototype.parse=function(e,t,r,n,a){return void 0===a&&(a={}),t?this.concat(t,r,n)._parse(e,a):this._parse(e,a)},mt.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new nt(t,[e]):"coerce"===r?new ot(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var a=this.registry[n];if(a){var i=a.parse(e,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,s=i.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else i=r(i,o,t.typeAnnotation||"coerce");else i=r(i,o,t.typeAnnotation||"assert")}if(!(i instanceof et)&&function e(t){if(t instanceof ft)return e(t.boundExpression);if(t instanceof ut&&"error"===t.name)return!1;if(t instanceof ct)return!1;var r=t instanceof ot||t instanceof nt,n=!0;return t.eachChild((function(t){n=r?n&&e(t):n&&t instanceof et})),!!n&&dt(t)&&ht(t,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(i)){var l=new lt;try{i=new et(i.type,i.evaluate(l))}catch(e){return this.error(e.message),null}}return i}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},mt.prototype.concat=function(e,t,r){var n="number"==typeof e?this.path.concat(e):this.path,a=r?this.scope.concat(r):this.scope;return new mt(this.registry,n,t||null,a,this.errors)},mt.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new De(n,e))},mt.prototype.checkSubtype=function(e,t){var r=We(e,t);return r&&this.error(r),r};var yt=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,a=r;n=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,a);if(!c)return null;a=a||c.type,n.push([o,c])}return new yt(a,r,n)},yt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;return n>=t[a-1]?r[a-1].evaluate(e):r[gt(t,n)].evaluate(e)},yt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var _t=Object.freeze({number:vt,color:function(e,t,r){return new Ge(vt(e.r,t.r,r),vt(e.g,t.g,r),vt(e.b,t.b,r),vt(e.a,t.a,r))},array:function(e,t,r){return e.map((function(e,n){return vt(e,t[n],r)}))}}),bt=.95047,xt=1,wt=1.08883,kt=4/29,Mt=6/29,Tt=3*Mt*Mt,St=Mt*Mt*Mt,Ct=Math.PI/180,Lt=180/Math.PI;function At(e){return e>St?Math.pow(e,1/3):e/Tt+kt}function Et(e){return e>Mt?e*e*e:Tt*(e-kt)}function Dt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Pt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function It(e){var t=Pt(e.r),r=Pt(e.g),n=Pt(e.b),a=At((.4124564*t+.3575761*r+.1804375*n)/bt),i=At((.2126729*t+.7151522*r+.072175*n)/xt);return{l:116*i-16,a:500*(a-i),b:200*(i-At((.0193339*t+.119192*r+.9503041*n)/wt)),alpha:e.a}}function Ot(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=xt*Et(t),r=bt*Et(r),n=wt*Et(n),new Ge(Dt(3.2404542*r-1.5371385*t-.4985314*n),Dt(-.969266*r+1.8760108*t+.041556*n),Dt(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function Ft(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var Rt={forward:It,reverse:Ot,interpolate:function(e,t,r){return{l:vt(e.l,t.l,r),a:vt(e.a,t.a,r),b:vt(e.b,t.b,r),alpha:vt(e.alpha,t.alpha,r)}}},zt={forward:function(e){var t=It(e),r=t.l,n=t.a,a=t.b,i=Math.atan2(a,n)*Lt;return{h:i<0?i+360:i,c:Math.sqrt(n*n+a*a),l:r,alpha:e.a}},reverse:function(e){var t=e.h*Ct,r=e.c;return Ot({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:Ft(e.h,t.h,r),c:vt(e.c,t.c,r),l:vt(e.l,t.l,r),alpha:vt(e.alpha,t.alpha,r)}}},Nt=Object.freeze({lab:Rt,hcl:zt}),Bt=function(e,t,r,n,a){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=a;i1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(a=t.parse(a,2,Oe)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=ze:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var m=t.parse(p,f,u);if(!m)return null;u=u||m.type,l.push([d,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Bt(u,r,n,a,l):t.error("Type "+Ve(u)+" is not interpolatable.")},Bt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;if(n>=t[a-1])return r[a-1].evaluate(e);var i=gt(t,n),o=t[i],s=t[i+1],l=Bt.interpolationFactor(this.interpolation,n,o,s),u=r[i].evaluate(e),c=r[i+1].evaluate(e);return"interpolate"===this.operator?_t[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?zt.reverse(zt.interpolate(zt.forward(u),zt.forward(c),l)):Rt.reverse(Rt.interpolate(Rt.forward(u),Rt.forward(c),l))},Bt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t=r.length)throw new tt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new tt("Array index must be an integer, but found "+t+" instead.");return r[t]},Vt.prototype.eachChild=function(e){e(this.index),e(this.input)},Vt.prototype.possibleOutputs=function(){return[void 0]},Vt.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ut=function(e,t,r,n,a,i){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=a,this.otherwise=i};Ut.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var a={},i=[],o=2;oNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,$e(p)))return null}else r=$e(p);if(void 0!==a[String(p)])return u.error("Branch labels must be unique.");a[String(p)]=i.length}var h=t.parse(l,o,n);if(!h)return null;n=n||h.type,i.push(h)}var f=t.parse(e[1],1,Be);if(!f)return null;var m=t.parse(e[e.length-1],e.length-1,n);return m?"value"!==f.type.kind&&t.concat(1).checkSubtype(r,f.type)?null:new Ut(r,n,f,a,i,m):null},Ut.prototype.evaluate=function(e){var t=this.input.evaluate(e);return($e(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Ut.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Ut.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Ut.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},a=0,i=Object.keys(this.cases).sort();a",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),Qt=Kt("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),er=Kt(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0})),tr=function(e,t,r,n,a){this.type=Fe,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=a};tr.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,Oe);if(!r)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var a=null;if(n.locale&&!(a=t.parse(n.locale,1,Fe)))return null;var i=null;if(n.currency&&!(i=t.parse(n.currency,1,Fe)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=t.parse(n["min-fraction-digits"],1,Oe)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,Oe))?null:new tr(r,a,i,o,s)},tr.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},tr.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},tr.prototype.possibleOutputs=function(){return[void 0]},tr.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var rr=function(e){this.type=Oe,this.input=e};rr.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+Ve(r.type)+" instead."):new rr(r):null},rr.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new tt("Expected value to be of type string or array, but found "+Ve($e(t))+" instead.")},rr.prototype.eachChild=function(e){e(this.input)},rr.prototype.possibleOutputs=function(){return[void 0]},rr.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var nr={"==":Zt,"!=":Xt,">":$t,"<":Jt,">=":er,"<=":Qt,array:nt,at:Vt,boolean:nt,case:Wt,coalesce:Yt,collator:ct,format:at,interpolate:Bt,"interpolate-hcl":Bt,"interpolate-lab":Bt,length:rr,let:Ht,literal:et,match:Ut,number:nt,"number-format":tr,object:nt,step:yt,string:nt,"to-boolean":ot,"to-color":ot,"to-number":ot,"to-string":ot,var:ft};function ar(e,t){var r=t[0],n=t[1],a=t[2],i=t[3];r=r.evaluate(e),n=n.evaluate(e),a=a.evaluate(e);var o=i?i.evaluate(e):1,s=Je(r,n,a,o);if(s)throw new tt(s);return new Ge(r/255*o,n/255*o,a/255*o,o)}function ir(e,t){return e in t}function or(e,t){var r=t[e];return void 0===r?null:r}function sr(e){return{type:e}}function lr(e){return{result:"success",value:e}}function ur(e){return{result:"error",value:e}}function cr(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function dr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function pr(e){return!!e.expression&&e.expression.interpolated}function hr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function fr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function mr(e){return e}function gr(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function yr(e,t,r,n,a){return gr(typeof r===a?n[r]:void 0,e.default,t.default)}function vr(e,t,r){if("number"!==hr(r))return gr(e.default,t.default);var n=e.stops.length;if(1===n)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];var a=gt(e.stops.map((function(e){return e[0]})),r);return e.stops[a][1]}function _r(e,t,r){var n=void 0!==e.base?e.base:1;if("number"!==hr(r))return gr(e.default,t.default);var a=e.stops.length;if(1===a)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[a-1][0])return e.stops[a-1][1];var i=gt(e.stops.map((function(e){return e[0]})),r),o=function(e,t,r,n){var a=n-r,i=e-r;return 0===a?0:1===t?i/a:(Math.pow(t,i)-1)/(Math.pow(t,a)-1)}(r,n,e.stops[i][0],e.stops[i+1][0]),s=e.stops[i][1],l=e.stops[i+1][1],u=_t[t.type]||mr;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=Nt[e.colorSpace];u=function(e,t){return c.reverse(c.interpolate(c.forward(e),c.forward(t),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return u(r,n,o)}}:u(s,l,o)}function br(e,t,r){return"color"===t.type?r=Ge.parse(r):"formatted"===t.type?r=Xe.fromString(r.toString()):hr(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0),gr(r,e.default,t.default)}ut.register(nr,{error:[{kind:"error"},[Fe],function(e,t){var r=t[0];throw new tt(r.evaluate(e))}],typeof:[Fe,[Be],function(e,t){return Ve($e(t[0].evaluate(e)))}],"to-rgba":[He(Oe,4),[ze],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[ze,[Oe,Oe,Oe],ar],rgba:[ze,[Oe,Oe,Oe,Oe],ar],has:{type:Re,overloads:[[[Fe],function(e,t){return ir(t[0].evaluate(e),e.properties())}],[[Fe,Ne],function(e,t){var r=t[0],n=t[1];return ir(r.evaluate(e),n.evaluate(e))}]]},get:{type:Be,overloads:[[[Fe],function(e,t){return or(t[0].evaluate(e),e.properties())}],[[Fe,Ne],function(e,t){var r=t[0],n=t[1];return or(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[Be,[Fe],function(e,t){return or(t[0].evaluate(e),e.featureState||{})}],properties:[Ne,[],function(e){return e.properties()}],"geometry-type":[Fe,[],function(e){return e.geometryType()}],id:[Be,[],function(e){return e.id()}],zoom:[Oe,[],function(e){return e.globals.zoom}],"heatmap-density":[Oe,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[Oe,[],function(e){return e.globals.lineProgress||0}],accumulated:[Be,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[Oe,sr(Oe),function(e,t){for(var r=0,n=0,a=t;n":[Re,[Fe,Be],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>i}],"filter-id->":[Re,[Be],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>a}],"filter-<=":[Re,[Fe,Be],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[Re,[Be],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n<=a}],"filter->=":[Re,[Fe,Be],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[Re,[Be],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>=a}],"filter-has":[Re,[Be],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Re,[],function(e){return null!==e.id()}],"filter-type-in":[Re,[He(Fe)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Re,[He(Be)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Re,[Fe,He(Be)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[Re,[Fe,He(Be)],function(e,t){var r=t[0],n=t[1];return function(e,t,r,n){for(;r<=n;){var a=r+n>>1;if(t[a]===e)return!0;t[a]>e?n=a-1:r=a+1}return!1}(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Re,overloads:[[[Re,Re],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[sr(Re),function(e,t){for(var r=0,n=t;r0&&"string"==typeof e[0]&&e[0]in nr}function kr(e,t){var r=new mt(nr,[],t?function(e){var t={color:ze,string:Fe,number:Oe,enum:Fe,boolean:Re,formatted:Ye};return"array"===e.type?He(t[e.value]||Be,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?lr(new xr(n,t)):ur(r.errors)}xr.prototype.evaluateWithoutErrorHandling=function(e,t,r,n){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.formattedSection=n,this.expression.evaluate(this._evaluator)},xr.prototype.evaluate=function(e,t,r,n){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.formattedSection=n||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new tt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}};var Mr=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!pt(t.expression)};Mr.prototype.evaluateWithoutErrorHandling=function(e,t,r,n){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n)},Mr.prototype.evaluate=function(e,t,r,n){return this._styleExpression.evaluate(e,t,r,n)};var Tr=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!pt(t.expression),this.interpolationType=n};function Sr(e,t){if("error"===(e=kr(e,t)).result)return e;var r=e.value.expression,n=dt(r);if(!n&&!cr(t))return ur([new De("","data expressions not supported")]);var a=ht(r,["zoom"]);if(!a&&!dr(t))return ur([new De("","zoom expressions not supported")]);var i=function e(t){var r=null;if(t instanceof Ht)r=e(t.result);else if(t instanceof Yt)for(var n=0,a=t.args;nn.maximum?[new Te(t,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Dr(e){var t,r,n,a=e.valueSpec,i=Ae(e.value.type),o={},s="categorical"!==i&&void 0===e.value.property,l=!s,u="array"===hr(e.value.stops)&&"array"===hr(e.value.stops[0])&&"object"===hr(e.value.stops[0][0]),c=Lr({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===i)return[new Te(e.key,e.value,'identity function may not have a "stops" property')];var t=[],r=e.value;return t=t.concat(Ar({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===hr(r)&&0===r.length&&t.push(new Te(e.key,r,"array must have at least one stop")),t},default:function(e){return $r({key:e.key,value:e.value,valueSpec:a,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===i&&s&&c.push(new Te(e.key,e.value,'missing required property "property"')),"identity"===i||e.value.stops||c.push(new Te(e.key,e.value,'missing required property "stops"')),"exponential"===i&&e.valueSpec.expression&&!pr(e.valueSpec)&&c.push(new Te(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!cr(e.valueSpec)?c.push(new Te(e.key,e.value,"property functions not supported")):s&&!dr(e.valueSpec)&&c.push(new Te(e.key,e.value,"zoom functions not supported"))),"categorical"!==i&&!u||void 0!==e.value.property||c.push(new Te(e.key,e.value,'"property" property is required')),c;function d(e){var t=[],i=e.value,s=e.key;if("array"!==hr(i))return[new Te(s,i,"array expected, "+hr(i)+" found")];if(2!==i.length)return[new Te(s,i,"array length 2 expected, length "+i.length+" found")];if(u){if("object"!==hr(i[0]))return[new Te(s,i,"object expected, "+hr(i[0])+" found")];if(void 0===i[0].zoom)return[new Te(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new Te(s,i,"object stop key must have value")];if(n&&n>Ae(i[0].zoom))return[new Te(s,i[0].zoom,"stop zoom values must appear in ascending order")];Ae(i[0].zoom)!==n&&(n=Ae(i[0].zoom),r=void 0,o={}),t=t.concat(Lr({key:s+"[0]",value:i[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Er,value:p}}))}else t=t.concat(p({key:s+"[0]",value:i[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},i));return wr(Ee(i[1]))?t.concat([new Te(s+"[1]",i[1],"expressions are not allowed in function stops.")]):t.concat($r({key:s+"[1]",value:i[1],valueSpec:a,style:e.style,styleSpec:e.styleSpec}))}function p(e,n){var s=hr(e.value),l=Ae(e.value),u=null!==e.value?e.value:n;if(t){if(s!==t)return[new Te(e.key,u,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Te(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==i){var c="number expected, "+s+" found";return cr(a)&&void 0===i&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Te(e.key,u,c)]}return"categorical"!==i||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==i&&"number"===s&&void 0!==r&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);tt?1:0}function Nr(e){if(!e)return!0;var t,r=e[0];return e.length<=1?"any"!==r:"=="===r?Br(e[1],e[2],"=="):"!="===r?Hr(Br(e[1],e[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Br(e[1],e[2],r):"any"===r?(t=e.slice(1),["any"].concat(t.map(Nr))):"all"===r?["all"].concat(e.slice(1).map(Nr)):"none"===r?["all"].concat(e.slice(1).map(Nr).map(Hr)):"in"===r?jr(e[1],e.slice(2)):"!in"===r?Hr(jr(e[1],e.slice(2))):"has"===r?Yr(e[1]):"!has"!==r||Hr(Yr(e[1]))}function Br(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function jr(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(zr)]]:["filter-in-small",e,["literal",t]]}}function Yr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Hr(e){return["!",e]}function Vr(e){return Or(Ee(e.value))?Pr(Ce({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){var r=t.value,n=t.key;if("array"!==hr(r))return[new Te(n,r,"array expected, "+hr(r)+" found")];var a,i=t.styleSpec,o=[];if(r.length<1)return[new Te(n,r,"filter array must have at least 1 element")];switch(o=o.concat(Ir({key:n+"[0]",value:r[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Ae(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ae(r[1])&&o.push(new Te(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new Te(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(a=hr(r[1]))&&o.push(new Te(n+"[1]",r[1],"string expected, "+a+" found"));for(var s=2;s=c[h+0]&&n>=c[h+1])?(o[p]=!0,i.push(u[p])):o[p]=!1}}},dn.prototype._forEachCell=function(e,t,r,n,a,i,o,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(r),d=this._convertToCellCoord(n),p=l;p<=c;p++)for(var h=u;h<=d;h++){var f=this.d*h+p;if((!s||s(this._convertFromCellCoord(p),this._convertFromCellCoord(h),this._convertFromCellCoord(p+1),this._convertFromCellCoord(h+1)))&&a.call(this,e,t,r,n,f,i,o,s))return}},dn.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},dn.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=cn+this.cells.length+1+1,r=0,n=0;n=0)){var d=e[c];u[c]=hn[l].shallow.indexOf(c)>=0?d:gn(d,t)}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)}function yn(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof pn)return e;if(Array.isArray(e))return e.map(yn);if("object"==typeof e){var t=e.$name||"Object",r=hn[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var n=Object.create(r.prototype),a=0,i=Object.keys(e);a=0?s:yn(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)}var vn=function(){this.first=!0};vn.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function bn(e){for(var t=0,r=e;t=65097&&e<=65103)||_n["CJK Compatibility Ideographs"](e)||_n["CJK Compatibility"](e)||_n["CJK Radicals Supplement"](e)||_n["CJK Strokes"](e)||!(!_n["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||_n["CJK Unified Ideographs Extension A"](e)||_n["CJK Unified Ideographs"](e)||_n["Enclosed CJK Letters and Months"](e)||_n["Hangul Compatibility Jamo"](e)||_n["Hangul Jamo Extended-A"](e)||_n["Hangul Jamo Extended-B"](e)||_n["Hangul Jamo"](e)||_n["Hangul Syllables"](e)||_n.Hiragana(e)||_n["Ideographic Description Characters"](e)||_n.Kanbun(e)||_n["Kangxi Radicals"](e)||_n["Katakana Phonetic Extensions"](e)||_n.Katakana(e)&&12540!==e||!(!_n["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!_n["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||_n["Unified Canadian Aboriginal Syllabics"](e)||_n["Unified Canadian Aboriginal Syllabics Extended"](e)||_n["Vertical Forms"](e)||_n["Yijing Hexagram Symbols"](e)||_n["Yi Syllables"](e)||_n["Yi Radicals"](e))))}function kn(e){return!(wn(e)||function(e){return!!(_n["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||_n["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||_n["Letterlike Symbols"](e)||_n["Number Forms"](e)||_n["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||_n["Control Pictures"](e)&&9251!==e||_n["Optical Character Recognition"](e)||_n["Enclosed Alphanumerics"](e)||_n["Geometric Shapes"](e)||_n["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||_n["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||_n["CJK Symbols and Punctuation"](e)||_n.Katakana(e)||_n["Private Use Area"](e)||_n["CJK Compatibility Forms"](e)||_n["Small Form Variants"](e)||_n["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function Mn(e,t){return!(!t&&(e>=1424&&e<=2303||_n["Arabic Presentation Forms-A"](e)||_n["Arabic Presentation Forms-B"](e))||e>=2304&&e<=3583||e>=3840&&e<=4255||_n.Khmer(e))}var Tn,Sn=!1,Cn=null,Ln=!1,An=new ke,En={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ln||null!=En.applyArabicShaping}},Dn=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new vn,this.transition={})};Dn.prototype.isSupportedScript=function(e){return function(e,t){for(var r=0,n=e;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var Pn=function(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(fr(e))return new Cr(e,t);if(wr(e)){var r=Sr(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=Ge.parse(e)),{kind:"constant",evaluate:function(){return n}}}(void 0===t?e.specification.default:t,e.specification)};Pn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Pn.prototype.possiblyEvaluate=function(e){return this.property.possiblyEvaluate(this,e)};var In=function(e){this.property=e,this.value=new Pn(e,void 0)};In.prototype.transitioned=function(e,t){return new Fn(this.property,this.value,t,d({},e.transition,this.transition),e.now)},In.prototype.untransitioned=function(){return new Fn(this.property,this.value,null,{},0)};var On=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};On.prototype.getValue=function(e){return b(this._values[e].value.value)},On.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new In(this._values[e].property)),this._values[e].value=new Pn(this._values[e].property,null===t?void 0:b(t))},On.prototype.getTransition=function(e){return b(this._values[e].transition)},On.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new In(this._values[e].property)),this._values[e].transition=b(t)||void 0},On.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);tthis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(t=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(a))}return r};var Rn=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Rn.prototype.possiblyEvaluate=function(e){for(var t=new Bn(this._properties),r=0,n=Object.keys(this._values);rn.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},t.prototype.interpolate=function(e){return e},t}(Yn),Vn=function(e){this.specification=e};Vn.prototype.possiblyEvaluate=function(e,t){if(void 0!==e.value){if("constant"===e.expression.kind){var r=e.expression.evaluate(t);return this._calculate(r,r,r,t)}return this._calculate(e.expression.evaluate(new Dn(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Dn(Math.floor(t.zoom),t)),e.expression.evaluate(new Dn(Math.floor(t.zoom+1),t)),t)}},Vn.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},Vn.prototype.interpolate=function(e){return e};var Un=function(e){this.specification=e};Un.prototype.possiblyEvaluate=function(e,t){return!!e.expression.evaluate(t)},Un.prototype.interpolate=function(){return!1};var Wn=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Pn(r,void 0),a=this.defaultTransitionablePropertyValues[t]=new In(r);this.defaultTransitioningPropertyValues[t]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}};fn("DataDrivenProperty",Yn),fn("DataConstantProperty",jn),fn("CrossFadedDataDrivenProperty",Hn),fn("CrossFadedProperty",Vn),fn("ColorRampProperty",Un);var qn=function(e){function t(t,r){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter=function(){return!0},"custom"!==t.type&&(t=t,this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new zn(r.layout)),r.paint)){for(var n in this._transitionablePaint=new On(r.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var a in t.layout)this.setLayoutProperty(a,t.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".layout."+e;if(this._validate(sn,n,e,t,r))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return y(e,"-transition")?this._transitionablePaint.getTransition(e.slice(0,-"-transition".length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".paint."+e;if(this._validate(on,n,e,t,r))return!1}if(y(e,"-transition"))return this._transitionablePaint.setTransition(e.slice(0,-"-transition".length),t||void 0),!1;var a=this._transitionablePaint._values[e],i="cross-faded-data-driven"===a.property.specification["property-type"],o=a.value.isDataDriven(),s=a.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||i||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,r){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e)),this.paint=this._transitioningPaint.possiblyEvaluate(e)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),_(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,r,n,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&ln(this,e.call(nn,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:Me,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof Nn&&cr(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(ke),Gn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Kn=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Zn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Xn(e,t){void 0===t&&(t=1);var r=0,n=0;return{members:e.map((function(e){var a,i=(a=e.type,Gn[a].BYTES_PER_ELEMENT),o=r=Jn(r,Math.max(t,i)),s=e.components||1;return n=Math.max(n,i),r+=i*s,{name:e.name,type:e.type,components:s,offset:o}})),size:Jn(r,Math.max(n,t)),alignment:t}}function Jn(e,t){return Math.ceil(e/t)*t}Zn.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Zn.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Zn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Zn.prototype.clear=function(){this.length=0},Zn.prototype.resize=function(e){this.reserve(e),this.length=e},Zn.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},Zn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var $n=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e},t}(Zn);$n.prototype.bytesPerElement=4,fn("StructArrayLayout2i4",$n);var Qn=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,a){var i=4*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,this.int16[i+3]=a,e},t}(Zn);Qn.prototype.bytesPerElement=8,fn("StructArrayLayout4i8",Qn);var ea=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,a,i)},t.prototype.emplace=function(e,t,r,n,a,i,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=a,this.int16[s+4]=i,this.int16[s+5]=o,e},t}(Zn);ea.prototype.bytesPerElement=12,fn("StructArrayLayout2i4i12",ea);var ta=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,a,i)},t.prototype.emplace=function(e,t,r,n,a,i,o){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=a,this.uint8[l+6]=i,this.uint8[l+7]=o,e},t}(Zn);ta.prototype.bytesPerElement=8,fn("StructArrayLayout2i4ub8",ta);var ra=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,n,a,i,o,s)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=r,this.uint16[u+2]=n,this.uint16[u+3]=a,this.uint16[u+4]=i,this.uint16[u+5]=o,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(Zn);ra.prototype.bytesPerElement=16,fn("StructArrayLayout8ui16",ra);var na=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,n,a,i,o,s)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l){var u=8*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=a,this.uint16[u+4]=i,this.uint16[u+5]=o,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(Zn);na.prototype.bytesPerElement=16,fn("StructArrayLayout4i4ui16",na);var aa=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=3*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,e},t}(Zn);aa.prototype.bytesPerElement=12,fn("StructArrayLayout3f12",aa);var ia=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint32[r+0]=t,e},t}(Zn);ia.prototype.bytesPerElement=4,fn("StructArrayLayout1ul4",ia);var oa=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s,l,u,c){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,n,a,i,o,s,l,u,c)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l,u,c,d){var p=12*e,h=6*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=a,this.int16[p+4]=i,this.int16[p+5]=o,this.uint32[h+3]=s,this.uint16[p+8]=l,this.uint16[p+9]=u,this.int16[p+10]=c,this.int16[p+11]=d,e},t}(Zn);oa.prototype.bytesPerElement=24,fn("StructArrayLayout6i1ul2ui2i24",oa);var sa=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,a,i)},t.prototype.emplace=function(e,t,r,n,a,i,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=a,this.int16[s+4]=i,this.int16[s+5]=o,e},t}(Zn);sa.prototype.bytesPerElement=12,fn("StructArrayLayout2i2i2i12",sa);var la=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,a){var i=12*e,o=3*e;return this.uint8[i+0]=t,this.uint8[i+1]=r,this.float32[o+1]=n,this.float32[o+2]=a,e},t}(Zn);la.prototype.bytesPerElement=12,fn("StructArrayLayout2ub2f12",la);var ua=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m,g){var y=22*e,v=11*e,_=44*e;return this.int16[y+0]=t,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=a,this.uint32[v+2]=i,this.uint32[v+3]=o,this.uint32[v+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=u,this.uint16[y+12]=c,this.float32[v+7]=d,this.float32[v+8]=p,this.uint8[_+36]=h,this.uint8[_+37]=f,this.uint8[_+38]=m,this.uint32[v+10]=g,e},t}(Zn);ua.prototype.bytesPerElement=44,fn("StructArrayLayout2i2ui3ul3ui2f3ub1ul44",ua);var ca=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m,g,y,v,_){var b=this.length;return this.resize(b+1),this.emplace(b,e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m,g,y,v,_)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m,g,y,v,_,b){var x=24*e,w=12*e;return this.int16[x+0]=t,this.int16[x+1]=r,this.int16[x+2]=n,this.int16[x+3]=a,this.int16[x+4]=i,this.int16[x+5]=o,this.uint16[x+6]=s,this.uint16[x+7]=l,this.uint16[x+8]=u,this.uint16[x+9]=c,this.uint16[x+10]=d,this.uint16[x+11]=p,this.uint16[x+12]=h,this.uint16[x+13]=f,this.uint16[x+14]=m,this.uint16[x+15]=g,this.uint16[x+16]=y,this.uint32[w+9]=v,this.float32[w+10]=_,this.float32[w+11]=b,e},t}(Zn);ca.prototype.bytesPerElement=48,fn("StructArrayLayout6i11ui1ul2f48",ca);var da=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.float32[r+0]=t,e},t}(Zn);da.prototype.bytesPerElement=4,fn("StructArrayLayout1f4",da);var pa=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=3*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,e},t}(Zn);pa.prototype.bytesPerElement=6,fn("StructArrayLayout3i6",pa);var ha=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=2*e,i=4*e;return this.uint32[a+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,e},t}(Zn);ha.prototype.bytesPerElement=8,fn("StructArrayLayout1ul2ui8",ha);var fa=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=3*e;return this.uint16[a+0]=t,this.uint16[a+1]=r,this.uint16[a+2]=n,e},t}(Zn);fa.prototype.bytesPerElement=6,fn("StructArrayLayout3ui6",fa);var ma=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e},t}(Zn);ma.prototype.bytesPerElement=4,fn("StructArrayLayout2ui4",ma);var ga=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint16[r+0]=t,e},t}(Zn);ga.prototype.bytesPerElement=2,fn("StructArrayLayout1ui2",ga);var ya=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e},t}(Zn);ya.prototype.bytesPerElement=8,fn("StructArrayLayout2f8",ya);var va=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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,a){var i=4*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,this.float32[i+3]=a,e},t}(Zn);va.prototype.bytesPerElement=16,fn("StructArrayLayout4f16",va);var _a=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(Kn);_a.prototype.size=24;var ba=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(e){return new _a(this,e)},t}(oa);fn("CollisionBoxArray",ba);var xa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},Object.defineProperties(t.prototype,r),t}(Kn);xa.prototype.size=44;var wa=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(e){return new xa(this,e)},t}(ua);fn("PlacedSymbolArray",wa);var ka=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},radialTextOffset:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},r.key.get=function(){return this._structArray.uint16[this._pos2+6]},r.key.set=function(e){this._structArray.uint16[this._pos2+6]=e},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+7]=e},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.featureIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+14]},r.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+14]=e},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+15]},r.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+15]=e},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+16]},r.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+16]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+9]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+9]=e},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+10]},r.textBoxScale.set=function(e){this._structArray.float32[this._pos4+10]=e},r.radialTextOffset.get=function(){return this._structArray.float32[this._pos4+11]},r.radialTextOffset.set=function(e){this._structArray.float32[this._pos4+11]=e},Object.defineProperties(t.prototype,r),t}(Kn);ka.prototype.size=48;var Ma=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(e){return new ka(this,e)},t}(ca);fn("SymbolInstanceArray",Ma);var Ta=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,r),t}(Kn);Ta.prototype.size=4;var Sa=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.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new Ta(this,e)},t}(da);fn("GlyphOffsetArray",Sa);var Ca=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(e){this._structArray.int16[this._pos2+0]=e},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(e){this._structArray.int16[this._pos2+1]=e},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,r),t}(Kn);Ca.prototype.size=6;var La=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.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new Ca(this,e)},t}(pa);fn("SymbolLineVertexArray",La);var Aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,r),t}(Kn);Aa.prototype.size=8;var Ea=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(e){return new Aa(this,e)},t}(ha);fn("FeatureIndexArray",Ea);var Da=Xn([{name:"a_pos",components:2,type:"Int16"}],4).members,Pa=function(e){void 0===e&&(e=[]),this.segments=e};function Ia(e,t){return 256*(e=u(Math.floor(e),0,255))+u(Math.floor(t),0,255)}Pa.prototype.prepareSegment=function(e,t,r,n){var a=this.segments[this.segments.length-1];return e>Pa.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Pa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!a||a.vertexLength+e>Pa.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n)&&(a={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(a.sortKey=n),this.segments.push(a)),a},Pa.prototype.get=function(){return this.segments},Pa.prototype.destroy=function(){for(var e=0,t=this.segments;e>1;this.ids[n]>=e?r=n:t=n+1}for(var a=[];this.ids[t]===e;){var i=this.positions[3*t],o=this.positions[3*t+1],s=this.positions[3*t+2];a.push({index:i,start:o,end:s}),t++}return a},Oa.serialize=function(e,t){var r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return function e(t,r,n,a){if(!(n>=a)){for(var i=t[n+a>>1],o=n-1,s=a+1;;){do{o++}while(t[o]i);if(o>=s)break;Fa(t,o,s),Fa(r,3*o,3*s),Fa(r,3*o+1,3*s+1),Fa(r,3*o+2,3*s+2)}e(t,r,n,s),e(t,r,s+1,a)}}(r,n,0,r.length-1),t.push(r.buffer,n.buffer),{ids:r,positions:n}},Oa.deserialize=function(e){var t=new Oa;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},fn("FeaturePositionMap",Oa);var Ra=function(e,t){this.gl=e.gl,this.location=t},za=function(e){function t(t,r){e.call(this,t,r),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(Ra),Na=function(e){function t(t,r){e.call(this,t,r),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Ra),Ba=function(e){function t(t,r){e.call(this,t,r),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Ra),ja=function(e){function t(t,r){e.call(this,t,r),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Ra),Ya=function(e){function t(t,r){e.call(this,t,r),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Ra),Ha=function(e){function t(t,r){e.call(this,t,r),this.current=Ge.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Ra),Va=new Float32Array(16),Ua=function(e){function t(t,r){e.call(this,t,r),this.current=Va}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(var t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}},t}(Ra);function Wa(e){return[Ia(255*e.r,255*e.g),Ia(255*e.b,255*e.a)]}var qa=function(e,t,r){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=r,this.maxValue=-1/0};qa.prototype.defines=function(){return this.names.map((function(e){return"#define HAS_UNIFORM_u_"+e}))},qa.prototype.setConstantPatternPositions=function(){},qa.prototype.populatePaintArray=function(){},qa.prototype.updatePaintArray=function(){},qa.prototype.upload=function(){},qa.prototype.destroy=function(){},qa.prototype.setUniforms=function(e,t,r,n){t.set(n.constantOr(this.value))},qa.prototype.getBinding=function(e,t){return"color"===this.type?new Ha(e,t):new Na(e,t)},qa.serialize=function(e){var t=e.value,r=e.names,n=e.type;return{value:gn(t),names:r,type:n}},qa.deserialize=function(e){var t=e.value,r=e.names,n=e.type;return new qa(yn(t),r,n)};var Ga=function(e,t,r){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Ga.prototype.defines=function(){return this.names.map((function(e){return"#define HAS_UNIFORM_u_"+e}))},Ga.prototype.populatePaintArray=function(){},Ga.prototype.updatePaintArray=function(){},Ga.prototype.upload=function(){},Ga.prototype.destroy=function(){},Ga.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},Ga.prototype.setUniforms=function(e,t,r,n,a){var i=this.patternPositions;"u_pattern_to"===a&&i.patternTo&&t.set(i.patternTo),"u_pattern_from"===a&&i.patternFrom&&t.set(i.patternFrom)},Ga.prototype.getBinding=function(e,t){return new Ya(e,t)};var Ka=function(e,t,r,n){this.expression=e,this.names=t,this.type=r,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===r?2:1,offset:0}})),this.paintVertexArray=new n};Ka.prototype.defines=function(){return[]},Ka.prototype.setConstantPatternPositions=function(){},Ka.prototype.populatePaintArray=function(e,t,r,n){var a=this.paintVertexArray,i=a.length;a.reserve(e);var o=this.expression.evaluate(new Dn(0),t,{},n);if("color"===this.type)for(var s=Wa(o),l=i;lri.max||o.yri.max)&&(w("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=u(o.x,ri.min,ri.max),o.y=u(o.y,ri.min,ri.max))}return r}function ai(e,t,r,n,a){e.emplaceBack(2*t+(n+1)/2,2*r+(a+1)/2)}var ii=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new $n,this.indexArray=new fa,this.segments=new Pa,this.programConfigurations=new $a(Da,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function oi(e,t){for(var r=0;r1){if(ci(e,t))return!0;for(var n=0;n1?e.distSqr(r):e.distSqr(r.sub(t)._mult(a)._add(t))}function fi(e,t){for(var r,n,a,i=!1,o=0;ot.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(i=!i);return i}function mi(e,t){for(var r=!1,n=0,a=e.length-1;nt.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(r=!r)}return r}function gi(e,t,r){var n=r[0],a=r[2];if(e.xa.x&&t.x>a.x||e.ya.y&&t.y>a.y)return!1;var i=k(e,t,r[0]);return i!==k(e,t,r[1])||i!==k(e,t,r[2])||i!==k(e,t,r[3])}function yi(e,t,r){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).binders[e].maxValue}function vi(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function _i(e,t,r,n,i){if(!t[0]&&!t[1])return e;var o=a.convert(t)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=ti||u<0||u>=ti)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),d=c.vertexLength;ai(this.layoutVertexArray,l,u,-1,-1),ai(this.layoutVertexArray,l,u,1,-1),ai(this.layoutVertexArray,l,u,1,1),ai(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(d,d+1,d+2),this.indexArray.emplaceBack(d,d+3,d+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{})},fn("CircleBucket",ii,{omit:["layers"]});var bi,xi=new Wn({"circle-sort-key":new Yn(Me.layout_circle["circle-sort-key"])}),wi={paint:new Wn({"circle-radius":new Yn(Me.paint_circle["circle-radius"]),"circle-color":new Yn(Me.paint_circle["circle-color"]),"circle-blur":new Yn(Me.paint_circle["circle-blur"]),"circle-opacity":new Yn(Me.paint_circle["circle-opacity"]),"circle-translate":new jn(Me.paint_circle["circle-translate"]),"circle-translate-anchor":new jn(Me.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new jn(Me.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new jn(Me.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Yn(Me.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Yn(Me.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Yn(Me.paint_circle["circle-stroke-opacity"])}),layout:xi},ki="undefined"!=typeof Float32Array?Float32Array:Array;function Mi(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3];return e[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,e[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,e[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,e[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)}),bi=new ki(3),ki!=Float32Array&&(bi[0]=0,bi[1]=0,bi[2]=0),function(){var e=new ki(4);ki!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var Ti=function(e){function t(t){e.call(this,t,wi)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new ii(e)},t.prototype.queryRadius=function(e){var t=e;return yi("circle-radius",this,t)+yi("circle-stroke-width",this,t)+vi(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,a,i,o,s){for(var l=_i(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.angle,o),u=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),c="map"===this.paint.get("circle-pitch-alignment"),d=c?l:function(e,t){return e.map((function(e){return Si(e,t)}))}(l,s),p=c?u*o:u,h=0,f=n;he.width||a.height>e.height||r.x>e.width-a.width||r.y>e.height-a.height)throw new RangeError("out of range source coordinates for image copy");if(a.width>t.width||a.height>t.height||n.x>t.width-a.width||n.y>t.height-a.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=e.data,s=t.data,l=0;l80*r){n=i=e[0],a=o=e[1];for(var f=r;fi&&(i=s),l>o&&(o=l);u=0!==(u=Math.max(i-n,o-a))?1/u:0}return Ui(p,h,r,n,a,u),h}function Hi(e,t,r,n,a){var i,o;if(a===ho(e,t,r,n)>0)for(i=t;i=t;i-=n)o=uo(i,e[i],e[i+1],o);return o&&no(o,o.next)&&(co(o),o=o.next),o}function Vi(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!no(n,n.next)&&0!==ro(n.prev,n,n.next))n=n.next;else{if(co(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function Ui(e,t,r,n,a,i,o){if(e){!o&&i&&function(e,t,r,n){var a=e;do{null===a.z&&(a.z=$i(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,r,n,a,i,o,s,l,u=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,u*=2}while(o>1)}(a)}(e,n,a,i);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,i?qi(e,n,a,i):Wi(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),co(e),e=l.next,u=l.next;else if((e=l)===u){o?1===o?Ui(e=Gi(Vi(e),t,r),t,r,n,a,i,2):2===o&&Ki(e,t,r,n,a,i):Ui(Vi(e),t,r,n,a,i,1);break}}}function Wi(e){var t=e.prev,r=e,n=e.next;if(ro(t,r,n)>=0)return!1;for(var a=e.next.next;a!==e.prev;){if(eo(t.x,t.y,r.x,r.y,n.x,n.y,a.x,a.y)&&ro(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function qi(e,t,r,n){var a=e.prev,i=e,o=e.next;if(ro(a,i,o)>=0)return!1;for(var s=a.xi.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,c=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,d=$i(s,l,t,r,n),p=$i(u,c,t,r,n),h=e.prevZ,f=e.nextZ;h&&h.z>=d&&f&&f.z<=p;){if(h!==e.prev&&h!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&ro(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,f!==e.prev&&f!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,f.x,f.y)&&ro(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&ro(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;f&&f.z<=p;){if(f!==e.prev&&f!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,f.x,f.y)&&ro(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Gi(e,t,r){var n=e;do{var a=n.prev,i=n.next.next;!no(a,i)&&ao(a,n,n.next,i)&&so(a,i)&&so(i,a)&&(t.push(a.i/r),t.push(n.i/r),t.push(i.i/r),co(n),co(n.next),n=e=i),n=n.next}while(n!==e);return Vi(n)}function Ki(e,t,r,n,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&to(o,s)){var l=lo(o,s);return o=Vi(o,o.next),l=Vi(l,l.next),Ui(o,t,r,n,a,i),void Ui(l,t,r,n,a,i)}s=s.next}o=o.next}while(o!==e)}function Zi(e,t){return e.x-t.x}function Xi(e,t){if(t=function(e,t){var r,n=t,a=e.x,i=e.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&a!==n.x&&eo(ir.x||n.x===r.x&&Ji(r,n)))&&(r=n,p=l)),n=n.next}while(n!==u);return r}(e,t)){var r=lo(t,e);Vi(r,r.next)}}function Ji(e,t){return ro(e.prev,e,t.prev)<0&&ro(t.next,e,e.next)<0}function $i(e,t,r,n,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*a)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*a)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Qi(e){var t=e,r=e;do{(t.x=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function to(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&ao(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(so(e,t)&&so(t,e)&&function(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(ro(e.prev,e,t.prev)||ro(e,t.prev,t))||no(e,t)&&ro(e.prev,e,e.next)>0&&ro(t.prev,t,t.next)>0)}function ro(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function no(e,t){return e.x===t.x&&e.y===t.y}function ao(e,t,r,n){var a=oo(ro(e,t,r)),i=oo(ro(e,t,n)),o=oo(ro(r,n,e)),s=oo(ro(r,n,t));return a!==i&&o!==s||!(0!==a||!io(e,r,t))||!(0!==i||!io(e,n,t))||!(0!==o||!io(r,e,n))||!(0!==s||!io(r,t,n))}function io(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function oo(e){return e>0?1:e<0?-1:0}function so(e,t){return ro(e.prev,e,e.next)<0?ro(e,t,e.next)>=0&&ro(e,e.prev,t)>=0:ro(e,t,e.prev)<0||ro(e,e.next,t)<0}function lo(e,t){var r=new po(e.i,e.x,e.y),n=new po(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function uo(e,t,r,n){var a=new po(e,t,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function co(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 po(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ho(e,t,r,n){for(var a=0,i=t,o=r-n;in;){if(a-n>600){var o=a-n+1,s=r-n+1,l=Math.log(o),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(o-u)/o)*(s-o/2<0?-1:1);e(t,r,Math.max(n,Math.floor(r-s*u/o+c)),Math.min(a,Math.floor(r+(o-s)*u/o+c)),i)}var d=t[r],p=n,h=a;for(mo(t,n,r),i(t[a],d)>0&&mo(t,n,a);p0;)h--}0===i(t[n],d)?mo(t,n,h):mo(t,++h,a),h<=r&&(n=h+1),r<=h&&(a=h-1)}}(e,t,r||0,n||e.length-1,a||go)}function mo(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function go(e,t){return et?1:0}function yo(e,t){var r=e.length;if(r<=1)return[e];for(var n,a,i=[],o=0;o1)for(var l=0;l0&&(n+=e[a-1].length,r.holes.push(n))}return r},Bi.default=ji;var xo=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new $n,this.indexArray=new fa,this.indexArray2=new ma,this.programConfigurations=new $a(Ni,e.layers,e.zoom),this.segments=new Pa,this.segments2=new Pa,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};xo.prototype.populate=function(e,t){this.hasPattern=_o("fill",this.layers,t);for(var r=this.layers[0].layout.get("fill-sort-key"),n=[],a=0,i=e;a>3}if(i--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&l.push(t),t=[]),t.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Co.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,a=0,i=0,o=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(n--,1===r||2===r)(a+=e.readSVarint())s&&(s=a),(i+=e.readSVarint())u&&(u=i);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},Co.prototype.toGeoJSON=function(e,t,r){var n,a,i=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=Co.types[this.type];function c(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}function Io(e,t,r){if(3===e){var n=new Eo(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}Do.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new So(this._pbf,t,this.extent,this._keys,this._values)};var Oo={VectorTile:function(e,t){this.layers=e.readFields(Io,{},t)},VectorTileFeature:So,VectorTileLayer:Eo},Fo=Oo.VectorTileFeature.types,Ro=Math.pow(2,13);function zo(e,t,r,n,a,i,o,s){e.emplaceBack(t,r,2*Math.floor(n*Ro)+o,a*Ro*2,i*Ro*2,Math.round(s))}var No=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ea,this.indexArray=new fa,this.programConfigurations=new $a(To,e.layers,e.zoom),this.segments=new Pa,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function Bo(e,t){return e.x===t.x&&(e.x<0||e.x>ti)||e.y===t.y&&(e.y<0||e.y>ti)}function jo(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>ti}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>ti}))}No.prototype.populate=function(e,t){this.features=[],this.hasPattern=_o("fill-extrusion",this.layers,t);for(var r=0,n=e;r=1){var y=h[m-1];if(!Bo(g,y)){c.vertexLength+4>Pa.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=g.sub(y)._perp()._unit(),_=y.dist(g);f+_>32768&&(f=0),zo(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,0,f),zo(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,1,f),f+=_,zo(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,0,f),zo(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,1,f);var b=c.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),c.vertexLength+=4,c.primitiveLength+=2}}}}if(c.vertexLength+s>Pa.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===Fo[e.type]){for(var x=[],w=[],k=c.vertexLength,M=0,T=o;M=2&&e[c-1].equals(e[c-2]);)c--;for(var d=0;d0;if(T&&_>d){var C=p.dist(m);if(C>2*h){var L=p.sub(p.sub(m)._mult(h/C)._round());this.updateDistance(m,L),this.addCurrentVertex(L,y,0,0,f),m=L}}var A=m&&g,E=A?r:u?"butt":n;if(A&&"round"===E&&(ka&&(E="bevel"),"bevel"===E&&(k>2&&(E="flipbevel"),k100)b=v.mult(-1);else{var D=k*y.add(v).mag()/y.sub(v).mag();b._perp()._mult(D*(S?-1:1))}this.addCurrentVertex(p,b,0,0,f),this.addCurrentVertex(p,b.mult(-1),0,0,f)}else if("bevel"===E||"fakeround"===E){var P=-Math.sqrt(k*k-1),I=S?P:0,O=S?0:P;if(m&&this.addCurrentVertex(p,y,I,O,f),"fakeround"===E)for(var F=Math.round(180*M/Math.PI/20),R=1;R2*h){var H=p.add(g.sub(p)._mult(h/Y)._round());this.updateDistance(p,H),this.addCurrentVertex(H,v,0,0,f),p=H}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,s)}},Zo.prototype.addCurrentVertex=function(e,t,r,n,a,i){void 0===i&&(i=!1);var o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,o,s,i,!1,r,a),this.addHalfVertex(e,l,u,i,!0,-n,a),this.distance>Ko/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,r,n,a,i))},Zo.prototype.addHalfVertex=function(e,t,r,n,a,i,o){var s=e.x,l=e.y,u=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(a?1:0),Math.round(63*t)+128,Math.round(63*r)+128,1+(0===i?0:i<0?-1:1)|(63&u)<<2,u>>6);var c=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),o.primitiveLength++),a?this.e2=c:this.e1=c},Zo.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Ko-1):this.distance},fn("LineBucket",Zo,{omit:["layers","patternFeatures"]});var Xo=new Wn({"line-cap":new jn(Me.layout_line["line-cap"]),"line-join":new Yn(Me.layout_line["line-join"]),"line-miter-limit":new jn(Me.layout_line["line-miter-limit"]),"line-round-limit":new jn(Me.layout_line["line-round-limit"]),"line-sort-key":new Yn(Me.layout_line["line-sort-key"])}),Jo={paint:new Wn({"line-opacity":new Yn(Me.paint_line["line-opacity"]),"line-color":new Yn(Me.paint_line["line-color"]),"line-translate":new jn(Me.paint_line["line-translate"]),"line-translate-anchor":new jn(Me.paint_line["line-translate-anchor"]),"line-width":new Yn(Me.paint_line["line-width"]),"line-gap-width":new Yn(Me.paint_line["line-gap-width"]),"line-offset":new Yn(Me.paint_line["line-offset"]),"line-blur":new Yn(Me.paint_line["line-blur"]),"line-dasharray":new Vn(Me.paint_line["line-dasharray"]),"line-pattern":new Hn(Me.paint_line["line-pattern"]),"line-gradient":new Un(Me.paint_line["line-gradient"])}),layout:Xo},$o=new(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.possiblyEvaluate=function(t,r){return r=new Dn(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),e.prototype.possiblyEvaluate.call(this,t,r)},t.prototype.evaluate=function(t,r,n,a){return r=d({},r,{zoom:Math.floor(r.zoom)}),e.prototype.evaluate.call(this,t,r,n,a)},t}(Yn))(Jo.paint.properties["line-width"].specification);$o.useIntegerZoom=!0;var Qo=function(e){function t(t){e.call(this,t,Jo)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Oi(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t){e.prototype.recalculate.call(this,t),this.paint._values["line-floorwidth"]=$o.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new Zo(e)},t.prototype.queryRadius=function(e){var t=e,r=es(yi("line-width",this,t),yi("line-gap-width",this,t)),n=yi("line-offset",this,t);return r/2+Math.abs(n)+vi(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,s){var l=_i(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),u=s/2*es(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),c=this.paint.get("line-offset").evaluate(t,r);return c&&(n=function(e,t){for(var r=[],n=new a(0,0),i=0;i=3)for(var i=0;i0?t+2*e:e}var ts=Xn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),rs=Xn([{name:"a_projected_pos",components:3,type:"Float32"}],4),ns=(Xn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Xn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),as=(Xn([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),Xn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),is=Xn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function os(e,t,r){return e.sections.forEach((function(e){e.text=function(e,t,r){var n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),En.applyArabicShaping&&(e=En.applyArabicShaping(e)),e}(e.text,t,r)})),e}Xn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"}]),Xn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"radialTextOffset"}]),Xn([{type:"Float32",name:"offsetX"}]),Xn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var ss={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},ls=24,us={horizontal:1,vertical:2,horizontalOnly:3},cs=function(){this.text="",this.sectionIndex=[],this.sections=[]};function ds(e,t,r,n,a,i,o,s,l,u,c){var d,p=cs.fromFeature(e,r);u===us.vertical&&p.verticalizePunctuation();var h=En.processBidirectionalText,f=En.processStyledBidirectionalText;if(h&&1===p.sections.length){d=[];for(var m=0,g=h(p.toString(),ys(p,s,n,t));m=0&&n>=e&&ps[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},cs.prototype.substring=function(e,t){var r=new cs;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},cs.prototype.toString=function(){return this.text},cs.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)};var ps={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},hs={};function fs(e,t,r,n){var a=Math.pow(e-t,2);return n?e=0,l=0,u=0;u0)&&("constant"!==a.value.kind||a.value.value.length>0),l="constant"!==o.value.kind||o.value.value&&o.value.value.length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,d=t.glyphDependencies,p=new Dn(this.zoom),h=0,f=e;h=0;for(var S=0,C=_.sections;S=0;s--)i[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:a},s>0&&(a+=t[s-1].dist(t[s]));for(var l=0;l0;this.addCollisionDebugVertices(i,o,s,l,u?this.collisionCircle:this.collisionBox,a.anchorPoint,r,u)}},Ps.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e0},Ps.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ps.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Ps.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Ps.prototype.addIndicesForPlacedTextSymbol=function(e){for(var t=this.text.placedSymbolArray.get(e),r=t.vertexStartIndex+4*t.numGlyphs,n=t.vertexStartIndex;n1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(e)===r&&t.addIndicesForPlacedTextSymbol(e)})),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(i.verticalPlacedTextSymbolIndex);var o=this.icon.placedSymbolArray.get(a);if(o.numGlyphs){var s=o.vertexStartIndex;this.icon.indexArray.emplaceBack(s,s+1,s+2),this.icon.indexArray.emplaceBack(s+1,s+2,s+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},fn("SymbolBucket",Ps,{omit:["layers","collisionBoxArray","features","compareText"]}),Ps.MAX_GLYPHS=65535,Ps.addDynamicAttributes=As;var Is=new Wn({"symbol-placement":new jn(Me.layout_symbol["symbol-placement"]),"symbol-spacing":new jn(Me.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new jn(Me.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Yn(Me.layout_symbol["symbol-sort-key"]),"symbol-z-order":new jn(Me.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new jn(Me.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new jn(Me.layout_symbol["icon-ignore-placement"]),"icon-optional":new jn(Me.layout_symbol["icon-optional"]),"icon-rotation-alignment":new jn(Me.layout_symbol["icon-rotation-alignment"]),"icon-size":new Yn(Me.layout_symbol["icon-size"]),"icon-text-fit":new jn(Me.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new jn(Me.layout_symbol["icon-text-fit-padding"]),"icon-image":new Yn(Me.layout_symbol["icon-image"]),"icon-rotate":new Yn(Me.layout_symbol["icon-rotate"]),"icon-padding":new jn(Me.layout_symbol["icon-padding"]),"icon-keep-upright":new jn(Me.layout_symbol["icon-keep-upright"]),"icon-offset":new Yn(Me.layout_symbol["icon-offset"]),"icon-anchor":new Yn(Me.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new jn(Me.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new jn(Me.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new jn(Me.layout_symbol["text-rotation-alignment"]),"text-field":new Yn(Me.layout_symbol["text-field"]),"text-font":new Yn(Me.layout_symbol["text-font"]),"text-size":new Yn(Me.layout_symbol["text-size"]),"text-max-width":new Yn(Me.layout_symbol["text-max-width"]),"text-line-height":new jn(Me.layout_symbol["text-line-height"]),"text-letter-spacing":new Yn(Me.layout_symbol["text-letter-spacing"]),"text-justify":new Yn(Me.layout_symbol["text-justify"]),"text-radial-offset":new Yn(Me.layout_symbol["text-radial-offset"]),"text-variable-anchor":new jn(Me.layout_symbol["text-variable-anchor"]),"text-anchor":new Yn(Me.layout_symbol["text-anchor"]),"text-max-angle":new jn(Me.layout_symbol["text-max-angle"]),"text-writing-mode":new jn(Me.layout_symbol["text-writing-mode"]),"text-rotate":new Yn(Me.layout_symbol["text-rotate"]),"text-padding":new jn(Me.layout_symbol["text-padding"]),"text-keep-upright":new jn(Me.layout_symbol["text-keep-upright"]),"text-transform":new Yn(Me.layout_symbol["text-transform"]),"text-offset":new Yn(Me.layout_symbol["text-offset"]),"text-allow-overlap":new jn(Me.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new jn(Me.layout_symbol["text-ignore-placement"]),"text-optional":new jn(Me.layout_symbol["text-optional"])}),Os={paint:new Wn({"icon-opacity":new Yn(Me.paint_symbol["icon-opacity"]),"icon-color":new Yn(Me.paint_symbol["icon-color"]),"icon-halo-color":new Yn(Me.paint_symbol["icon-halo-color"]),"icon-halo-width":new Yn(Me.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Yn(Me.paint_symbol["icon-halo-blur"]),"icon-translate":new jn(Me.paint_symbol["icon-translate"]),"icon-translate-anchor":new jn(Me.paint_symbol["icon-translate-anchor"]),"text-opacity":new Yn(Me.paint_symbol["text-opacity"]),"text-color":new Yn(Me.paint_symbol["text-color"],{runtimeType:ze,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new Yn(Me.paint_symbol["text-halo-color"]),"text-halo-width":new Yn(Me.paint_symbol["text-halo-width"]),"text-halo-blur":new Yn(Me.paint_symbol["text-halo-blur"]),"text-translate":new jn(Me.paint_symbol["text-translate"]),"text-translate-anchor":new jn(Me.paint_symbol["text-translate-anchor"])}),layout:Is},Fs=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:Ie,this.defaultValue=e};Fs.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},Fs.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},Fs.prototype.possibleOutputs=function(){return[void 0]},Fs.prototype.serialize=function(){return null},fn("FormatSectionOverride",Fs,{omit:["defaultValue"]});var Rs=function(e){function t(t){e.call(this,t,Os)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t){if(e.prototype.recalculate.call(this,t),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var n=[],a=0,i=r;a=0;p--){var h=o[p];if(!(d.w>h.w||d.h>h.h)){if(d.x=h.x,d.y=h.y,l=Math.max(l,d.y+d.h),s=Math.max(s,d.x+d.w),d.w===h.w&&d.h===h.h){var f=o.pop();p>1,c=-7,d=r?a-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+e[t+d],d+=p,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=p,c-=8);if(0===i)i=1-u;else{if(i===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=u}return(h?-1:1)*o*Math.pow(2,i-n)},Qs=function(e,t,r,n,a,i){var o,s,l,u=8*i-a-1,c=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&s,h+=f,s/=256,a-=8);for(o=o<0;e[r+h]=255&o,h+=f,o/=256,u-=8);e[r+h-f]|=128*m},el=tl;function tl(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}function rl(e){return e.type===tl.Bytes?e.readVarint()+e.pos:e.pos+1}function nl(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function al(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var a=r.pos-1;a>=e;a--)r.buf[a+n]=r.buf[a]}function il(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function gl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}tl.Varint=0,tl.Fixed64=1,tl.Bytes=2,tl.Fixed32=5,tl.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,i=this.pos;this.type=7&n,e(a,t,this),this.pos===i&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=fl(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=gl(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=fl(this.buf,this.pos)+4294967296*fl(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=fl(this.buf,this.pos)+4294967296*gl(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=$s(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=$s(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,a,i=r.buf;if(n=(112&(a=i[r.pos++]))>>4,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<3,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<10,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<17,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<24,a<128)return nl(e,n,t);if(n|=(1&(a=i[r.pos++]))<<31,a<128)return nl(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=function(e,t,r){for(var n="",a=t;a239?4:l>223?3:l>191?2:1;if(a+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(i=e[a+1]))&&(u=(31&l)<<6|63&i)<=127&&(u=null):3===c?(i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&((u=(15&l)<<12|(63&i)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&((u=(15&l)<<18|(63&i)<<12|(63&o)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),a+=c}return n}(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==tl.Bytes)return e.push(this.readVarint(t));var r=rl(this);for(e=e||[];this.pos127;);else if(t===tl.Bytes)this.pos=this.readVarint()+this.pos;else if(t===tl.Fixed32)this.pos+=4;else{if(t!==tl.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}(r,0,t),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,a,i=0;i55295&&n<57344){if(!a){n>56319||i+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):a=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else a&&(e[r++]=239,e[r++]=191,e[r++]=189,a=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&al(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Qs(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Qs(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&al(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,tl.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,il,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,ol,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,ul,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,sl,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,ll,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,cl,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,dl,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,pl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,hl,t)},writeBytesField:function(e,t){this.writeTag(e,tl.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,tl.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,tl.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,tl.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,tl.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,tl.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,tl.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,tl.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,tl.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,tl.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var yl=3;function vl(e,t,r){1===e&&r.readMessage(_l,t)}function _l(e,t,r){if(3===e){var n=r.readMessage(bl,{}),a=n.id,i=n.bitmap,o=n.width,s=n.height,l=n.left,u=n.top,c=n.advance;t.push({id:a,bitmap:new Di({width:o+2*yl,height:s+2*yl},i),metrics:{width:o,height:s,left:l,top:u,advance:c}})}}function bl(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}var xl=yl,wl=function(e){var t=this;this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){t._triggered=!1,t._callback()})};wl.prototype.trigger=function(){var e=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){e._triggered=!1,e._callback()}),0))};var kl=function(e,t,r){this.target=e,this.parent=t,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},g(["receive","process"],this),this.invoker=new wl(this.process),this.target.addEventListener("message",this.receive,!1)};function Ml(e,t,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[e*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}kl.prototype.send=function(e,t,r,n){var a=this,i=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[i]=r);var o=[];return this.target.postMessage({id:i,type:e,hasCallback:!!r,targetMapId:n,sourceMapId:this.mapId,data:gn(t,o)},o),{cancel:function(){r&&delete a.callbacks[i],a.target.postMessage({id:i,type:"",targetMapId:n,sourceMapId:a.mapId})}}},kl.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()},kl.prototype.process=function(){var e=this;if(this.taskQueue.length){var t=this.taskQueue.shift(),r=this.tasks[t];if(delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),r)if(""===r.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(r.error?n(yn(r.error)):n(null,yn(r.data)))}else{var a=!1,i=r.hasCallback?function(r,n){a=!0,delete e.cancelCallbacks[t];var i=[];e.target.postMessage({id:t,type:"",sourceMapId:e.mapId,error:r?gn(r):null,data:gn(n,i)},i)}:function(e){a=!0},o=null,s=yn(r.data);if(this.parent[r.type])o=this.parent[r.type](r.sourceMapId,s,i);else if(this.parent.getWorkerSource){var l=r.type.split(".");o=this.parent.getWorkerSource(r.sourceMapId,l[0],s.source)[l[1]](s,i)}else i(new Error("Could not find function "+r.type));!a&&o&&o.cancel&&(this.cancelCallbacks[t]=o.cancel)}}},kl.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var Tl=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Tl.prototype.setNorthEast=function(e){return this._ne=e instanceof Sl?new Sl(e.lng,e.lat):Sl.convert(e),this},Tl.prototype.setSouthWest=function(e){return this._sw=e instanceof Sl?new Sl(e.lng,e.lat):Sl.convert(e),this},Tl.prototype.extend=function(e){var t,r,n=this._sw,a=this._ne;if(e instanceof Sl)t=e,r=e;else{if(!(e instanceof Tl))return Array.isArray(e)?e.every(Array.isArray)?this.extend(Tl.convert(e)):this.extend(Sl.convert(e)):this;if(t=e._sw,r=e._ne,!t||!r)return this}return n||a?(n.lng=Math.min(t.lng,n.lng),n.lat=Math.min(t.lat,n.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new Sl(t.lng,t.lat),this._ne=new Sl(r.lng,r.lat)),this},Tl.prototype.getCenter=function(){return new Sl((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tl.prototype.getSouthWest=function(){return this._sw},Tl.prototype.getNorthEast=function(){return this._ne},Tl.prototype.getNorthWest=function(){return new Sl(this.getWest(),this.getNorth())},Tl.prototype.getSouthEast=function(){return new Sl(this.getEast(),this.getSouth())},Tl.prototype.getWest=function(){return this._sw.lng},Tl.prototype.getSouth=function(){return this._sw.lat},Tl.prototype.getEast=function(){return this._ne.lng},Tl.prototype.getNorth=function(){return this._ne.lat},Tl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tl.convert=function(e){return!e||e instanceof Tl?e:new Tl(e)};var Sl=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Sl.prototype.wrap=function(){return new Sl(c(this.lng,-180,180),this.lat)},Sl.prototype.toArray=function(){return[this.lng,this.lat]},Sl.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Sl.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Tl(new Sl(this.lng-r,this.lat-t),new Sl(this.lng+r,this.lat+t))},Sl.convert=function(e){if(e instanceof Sl)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Sl(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Sl(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Cl=2*Math.PI*6378137;function Ll(e){return Cl*Math.cos(e*Math.PI/180)}function Al(e){return(180+e)/360}function El(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Dl(e,t){return e/Ll(t)}function Pl(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}var Il=function(e,t,r){void 0===r&&(r=0),this.x=+e,this.y=+t,this.z=+r};Il.fromLngLat=function(e,t){void 0===t&&(t=0);var r=Sl.convert(e);return new Il(Al(r.lng),El(r.lat),Dl(t,r.lat))},Il.prototype.toLngLat=function(){return new Sl(360*this.x-180,Pl(this.y))},Il.prototype.toAltitude=function(){return this.z*Ll(Pl(this.y))},Il.prototype.meterInMercatorCoordinateUnits=function(){return 1/Cl*(e=Pl(this.y),1/Math.cos(e*Math.PI/180));var e};var Ol=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=zl(0,e,t,r)};Ol.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Ol.prototype.url=function(e,t){var r,n,a,i,o,s=(r=this.x,n=this.y,a=this.z,i=Ml(256*r,256*(n=Math.pow(2,a)-n-1),a),o=Ml(256*(r+1),256*(n+1),a),i[0]+","+i[1]+","+o[0]+","+o[1]),l=function(e,t,r){for(var n,a="",i=e;i>0;i--)a+=(t&(n=1<this.canonical.z?new Rl(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Rl(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Rl.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},Rl.prototype.children=function(e){if(this.overscaledZ>=e)return[new Rl(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Rl(t,this.wrap,t,r,n),new Rl(t,this.wrap,t,r+1,n),new Rl(t,this.wrap,t,r,n+1),new Rl(t,this.wrap,t,r+1,n+1)]},Rl.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Nl.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},Nl.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},Nl.prototype.getPixels=function(){return new Pi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Nl.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var n=t*this.dim,a=t*this.dim+this.dim,i=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=a-1;break;case 1:a=n+1}switch(r){case-1:i=o-1;break;case 1:o=i+1}for(var s=-t*this.dim,l=-r*this.dim,u=i;u=0)null!==this.deletedStates[e][n]&&(this.deletedStates[e][n]=this.deletedStates[e][n]||{},this.deletedStates[e][n][r]=null);else if(void 0!==t&&t>=0)if(this.stateChanges[e]&&this.stateChanges[e][n])for(r in this.deletedStates[e][n]={},this.stateChanges[e][n])this.deletedStates[e][n][r]=null;else this.deletedStates[e][n]=null;else this.deletedStates[e]=null}},Vl.prototype.getState=function(e,t){var r=String(t),n=this.state[e]||{},a=this.stateChanges[e]||{},i=d({},n[r],a[r]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){var o=this.deletedStates[e][t];if(null===o)return{};for(var s in o)delete i[s]}return i},Vl.prototype.initializeTileState=function(e,t){e.setFeatureState(this.state,t)},Vl.prototype.coalesceChanges=function(e,t){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var a={};for(var i in this.stateChanges[n])this.state[n][i]||(this.state[n][i]={}),d(this.state[n][i],this.stateChanges[n][i]),a[i]=this.state[n][i];r[n]=a}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var u in this.deletedStates[o]){if(null===this.deletedStates[o][u])this.state[o][u]={};else for(var c=0,p=Object.keys(this.deletedStates[o][u]);c=0&&c[3]>=0&&s.insert(o,c[0],c[1],c[2],c[3])}},Ul.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Oo.VectorTile(new el(this.rawTileData)).layers,this.sourceLayerCoder=new jl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ul.prototype.query=function(e,t,r){var n=this;this.loadVTLayers();for(var i=e.params||{},o=ti/e.tileSize/e.scale,s=Rr(i.filter),l=e.queryGeometry,u=e.queryPadding*o,c=Wl(l),d=this.grid.query(c.minX-u,c.minY-u,c.maxX+u,c.maxY+u),p=Wl(e.cameraQueryGeometry),h=0,f=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(t,r,n,i){return function(e,t,r,n,i){for(var o=0,s=e;o=l.x&&i>=l.y)return!0}var u=[new a(t,r),new a(t,i),new a(n,i),new a(n,r)];if(e.length>2)for(var c=0,d=u;c=0)return!0;return!1}(i,l)){var u=this.sourceLayerCoder.decode(r),c=this.vtLayers[u].feature(n);if(a(new Dn(this.tileID.overscaledZ),c))for(var d=0;d-r/2;){if(--o<0)return!1;s-=e[o].dist(i),i=e[o]}s+=e[o].dist(e[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>a)return!1;o++,s+=d.dist(p)}return!0}function Zl(e){for(var t=0,r=0;ru){var f=(u-l)/h,m=vt(d.x,p.x,f),g=vt(d.y,p.y,f),y=new bs(m,g,p.angleTo(d),c);return y._round(),!o||Kl(e,y,s,o,t)?y:void 0}l+=h}}function Ql(e,t,r,n,a,i,o,s,l){var u=Xl(n,i,o),c=Jl(n,a),d=c*o,p=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d=0&&x=0&&w=0&&h+c<=d){var k=new bs(x,w,_,m);k._round(),a&&!Kl(t,k,o,a,i)||f.push(k)}}p+=v}return l||f.length||s||(f=e(t,p/2,n,a,i,o,s,!0,u)),f}(e,p?t/2*s%t:(c/2+2*i)*o*s%t,t,u,r,d,p,!1,l)}Gl.prototype.registerFadeDuration=function(e){var t=e+this.timeAdded;t>l.z,c=new a(l.x*u,l.y*u),d=new a(c.x+u,c.y+u),p=this.segments.prepareSegment(4,r,n);r.emplaceBack(c.x,c.y,c.x,c.y),r.emplaceBack(d.x,c.y,d.x,c.y),r.emplaceBack(c.x,d.y,c.x,d.y),r.emplaceBack(d.x,d.y,d.x,d.y);var h=p.vertexLength;n.emplaceBack(h,h+1,h+2),n.emplaceBack(h+1,h+2,h+3),p.vertexLength+=4,p.primitiveLength+=2}this.maskedBoundsBuffer=t.createVertexBuffer(r,Bl.members),this.maskedIndexBuffer=t.createIndexBuffer(n)}},Gl.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Gl.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Gl.prototype.setExpiryData=function(e){var t=this.expirationTime;if(e.cacheControl){var r=T(e.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var n=Date.now(),a=!1;if(this.expirationTime>n)a=!1;else if(t)if(this.expirationTime0&&(y=Math.max(10*l,y),this._addLineCollisionCircles(e,t,r,r.segment,v,y,n,i,o,d))}else{if(p){var _=new a(m,h),b=new a(g,h),x=new a(m,f),w=new a(g,f),k=p*Math.PI/180;_._rotate(k),b._rotate(k),x._rotate(k),w._rotate(k),m=Math.min(_.x,b.x,x.x,w.x),g=Math.max(_.x,b.x,x.x,w.x),h=Math.min(_.y,b.y,x.y,w.y),f=Math.max(_.y,b.y,x.y,w.y)}e.emplaceBack(r.x,r.y,m,h,g,f,n,i,o,0,0)}this.boxEndIndex=e.length};eu.prototype._addLineCollisionCircles=function(e,t,r,n,a,i,o,s,l,u){var c=i/2,d=Math.floor(a/c)||1,p=1+.4*Math.log(u)/Math.LN2,h=Math.floor(d*p/2),f=-i/2,m=r,g=n+1,y=f,v=-a/2,_=v-a/4;do{if(--g<0){if(y>v)return;g=0;break}y-=t[g].dist(m),m=t[g]}while(y>_);for(var b=t[g].dist(t[g+1]),x=-h;xa&&(k+=w-a),!(k=t.length)return;b=t[g].dist(t[g+1])}var M=k-y,T=t[g],S=t[g+1].sub(T)._unit()._mult(M)._add(T)._round(),C=Math.abs(k-f)0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function ru(e,t){return et?1:0}function nu(e,t,r){void 0===t&&(t=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0],u=0;uo)&&(o=c.x),(!u||c.y>s)&&(s=c.y)}var d=o-n,p=s-i,h=Math.min(d,p),f=h/2,m=new tu([],au);if(0===h)return new a(n,i);for(var g=n;gv.d||!v.d)&&(v=b,r&&console.log("found best %d after %d probes",Math.round(1e4*b.d)/1e4,_)),b.max-v.d<=t||(f=b.h/2,m.push(new iu(b.p.x-f,b.p.y-f,f,e)),m.push(new iu(b.p.x+f,b.p.y-f,f,e)),m.push(new iu(b.p.x-f,b.p.y+f,f,e)),m.push(new iu(b.p.x+f,b.p.y+f,f,e)),_+=4)}return r&&(console.log("num probes: "+_),console.log("best distance: "+v.d)),v.p}function au(e,t){return t.max-e.max}function iu(e,t,r,n){this.p=new a(e,t),this.h=r,this.d=function(e,t){for(var r=!1,n=1/0,a=0;ae.y!=c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(r=!r),n=Math.min(n,hi(e,u,c))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}tu.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},tu.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},tu.prototype.peek=function(){return this.data[0]},tu.prototype._up=function(e){for(var t=this.data,r=this.compare,n=t[e];e>0;){var a=e-1>>1,i=t[a];if(r(n,i)>=0)break;t[e]=i,e=a}t[e]=n},tu.prototype._down=function(e){for(var t=this.data,r=this.compare,n=this.length>>1,a=t[e];e=0)break;t[e]=o,e=i}t[e]=a};var ou=t((function(e){e.exports=function(e,t){var r,n,a,i,o,s,l,u;for(r=3&e.length,n=e.length-r,a=t,o=3432918353,s=461845907,u=0;u>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(i>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:a^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return a^=e.length,a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0}})),su=t((function(e){e.exports=function(e,t){for(var r,n=e.length,a=t^n,i=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:a^=(255&e.charCodeAt(i+2))<<16;case 2:a^=(255&e.charCodeAt(i+1))<<8;case 1:a=1540483477*(65535&(a^=255&e.charCodeAt(i)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}})),lu=ou,uu=ou,cu=su;lu.murmur3=uu,lu.murmur2=cu;var du=7;function pu(e,t){var r=0,n=0,a=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=a-du;break;case"bottom-right":case"bottom-left":n=-a+du;break;case"bottom":n=-t+du;break;case"top":n=t-du}switch(e){case"top-right":case"bottom-right":r=-a;break;case"top-left":case"bottom-left":r=a;break;case"left":r=t;break;case"right":r=-t}return[r,n]}function hu(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var fu=65535;function mu(e,t,r,n,i,o,s,l,u,c,d,p,h){var f=function(e,t,r,n,i,o,s,l){for(var u=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,c=t.positionedGlyphs,d=[],p=0;pfu&&w(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===m.kind&&((g=[xs*h.compositeTextSizes[0].evaluate(o,{}),xs*h.compositeTextSizes[1].evaluate(o,{})])[0]>fu||g[1]>fu)&&w(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),e.addSymbols(e.text,f,g,s,i,o,u,t,l.lineStartIndex,l.lineLength);for(var y=0,v=c;y=0;o--)if(n.dist(i[o])ae&&(e.getActor().send("enforceCacheSizeLimit",ne),se=0)},e.clamp=u,e.clearTileCache=function(e){var t=self.caches.delete(re);e&&t.catch(e).then((function(){return e()}))},e.clone=function(e){var t=new ki(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=b,e.config=F,e.create=function(){var e=new ki(16);return ki!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=function(){var e=new ki(9);return ki!=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},e.create$2=function(){var e=new ki(4);return ki!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.createCommonjsModule=t,e.createExpression=kr,e.createLayout=Xn,e.createStyleLayer=function(e){return"custom"===e.type?new Ys(e):new Hs[e.type](e)},e.deepEqual=o,e.ease=l,e.emitValidationErrors=ln,e.endsWith=y,e.enforceCacheSizeLimit=function(e){self.caches&&self.caches.open(re).then((function(t){t.keys().then((function(r){for(var n=0;n=ti||u.y<0||u.y>=ti||function(e,t,r,n,i,o,s,l,u,c,d,p,h,f,m,g,y,v,_,b,x){var k,M,T,S=e.addToLineVertexArray(t,r),C=0,L=0,A=0,E={},D=lu(""),P=(o.layout.get("text-radial-offset").evaluate(_,{})||0)*ls;if(e.allowVerticalPlacement&&n.vertical){var I=o.layout.get("text-rotate").evaluate(_,{})+90,O=n.vertical;T=new eu(s,r,t,l,u,c,O,d,p,h,e.overscaling,I)}for(var F in n.horizontal){var R=n.horizontal[F];if(!k){D=lu(R.text);var z=o.layout.get("text-rotate").evaluate(_,{});k=new eu(s,r,t,l,u,c,R,d,p,h,e.overscaling,z)}var N=1===R.lineCount;if(L+=mu(e,t,R,o,h,_,f,S,n.vertical?us.horizontal:us.horizontalOnly,N?Object.keys(n.horizontal):[F],E,b,x),N)break}n.vertical&&(A+=mu(e,t,n.vertical,o,h,_,f,S,us.vertical,["vertical"],E,b,x));var B=k?k.boxStartIndex:e.collisionBoxArray.length,j=k?k.boxEndIndex:e.collisionBoxArray.length,Y=T?T.boxStartIndex:e.collisionBoxArray.length,H=T?T.boxEndIndex:e.collisionBoxArray.length;if(i){var V=function(e,t,r,n,i,o){var s,l,u,c,d=t.image,p=r.layout,h=t.top-1/d.pixelRatio,f=t.left-1/d.pixelRatio,m=t.bottom+1/d.pixelRatio,g=t.right+1/d.pixelRatio;if("none"!==p.get("icon-text-fit")&&i){var y=g-f,v=m-h,_=p.get("text-size").evaluate(o,{})/24,b=i.left*_,x=i.right*_,w=i.top*_,k=x-b,M=i.bottom*_-w,T=p.get("icon-text-fit-padding")[0],S=p.get("icon-text-fit-padding")[1],C=p.get("icon-text-fit-padding")[2],L=p.get("icon-text-fit-padding")[3],A="width"===p.get("icon-text-fit")?.5*(M-v):0,E="height"===p.get("icon-text-fit")?.5*(k-y):0,D="width"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?k:y,P="height"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?M:v;s=new a(b+E-L,w+A-T),l=new a(b+E+S+D,w+A-T),u=new a(b+E+S+D,w+A+C+P),c=new a(b+E-L,w+A+C+P)}else s=new a(f,h),l=new a(g,h),u=new a(g,m),c=new a(f,m);var I=r.layout.get("icon-rotate").evaluate(o,{})*Math.PI/180;if(I){var O=Math.sin(I),F=Math.cos(I),R=[F,-O,O,F];s._matMult(R),l._matMult(R),c._matMult(R),u._matMult(R)}return[{tl:s,tr:l,bl:c,br:u,tex:d.paddedRect,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0}]}(0,i,o,0,gu(n.horizontal),_),U=o.layout.get("icon-rotate").evaluate(_,{});M=new eu(s,r,t,l,u,c,i,m,g,!1,e.overscaling,U),C=4*V.length;var W=e.iconSizeData,q=null;"source"===W.kind?(q=[xs*o.layout.get("icon-size").evaluate(_,{})])[0]>fu&&w(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===W.kind&&((q=[xs*x.compositeIconSizes[0].evaluate(_,{}),xs*x.compositeIconSizes[1].evaluate(_,{})])[0]>fu||q[1]>fu)&&w(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,V,q,v,y,_,!1,t,S.lineStartIndex,S.lineLength)}var G=M?M.boxStartIndex:e.collisionBoxArray.length,K=M?M.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=Ps.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(t.x,t.y,E.right>=0?E.right:-1,E.center>=0?E.center:-1,E.left>=0?E.left:-1,E.vertical||-1,D,B,j,Y,H,G,K,l,L,A,C,0,d,P)}(e,u,l,r,n,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,m,_,k,s,y,b,M,p,t,i,o)};if("line"===T)for(var L=0,A=function(e,t,r,n,i){for(var o=[],s=0;s=n&&p.x>=n||(d.x>=n?d=new a(n,d.y+(p.y-d.y)*((n-d.x)/(p.x-d.x)))._round():p.x>=n&&(p=new a(n,d.y+(p.y-d.y)*((n-d.x)/(p.x-d.x)))._round()),d.y>=i&&p.y>=i||(d.y>=i?d=new a(d.x+(p.x-d.x)*((i-d.y)/(p.y-d.y)),i)._round():p.y>=i&&(p=new a(d.x+(p.x-d.x)*((i-d.y)/(p.y-d.y)),i)._round()),u&&d.equals(u[u.length-1])||(u=[d],o.push(u)),u.push(p)))))}return o}(t.geometry,0,0,ti,ti);L1){var z=$l(R,x,r.vertical||h,n,24,g);z&&C(R,z)}}else if("Polygon"===t.type)for(var N=0,B=yo(t.geometry,0);N=S.maxzoom||"none"!==S.visibility&&(o(T,this.zoom),(f[S.id]=S.createBucket({index:u.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,sourceID:this.source})).populate(b,m),u.bucketLayerIDs.push(T.map((function(e){return e.id}))))}}}var C=e.mapObject(m.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(C).length?n.send("getGlyphs",{uid:this.uid,stacks:C},(function(e,t){c||(c=e,d=t,E.call(s))})):d={};var L=Object.keys(m.iconDependencies);L.length?n.send("getImages",{icons:L},(function(e,t){c||(c=e,p=t,E.call(s))})):p={};var A=Object.keys(m.patternDependencies);function E(){if(c)return i(c);if(d&&p&&h){var t=new a(d),r=new e.ImageAtlas(p,h);for(var n in f){var s=f[n];s instanceof e.SymbolBucket?(o(s.layers,this.zoom),e.performSymbolLayout(s,d,t.positions,p,r.iconPositions,this.showCollisionBoxes)):s.hasPattern&&(s instanceof e.LineBucket||s instanceof e.FillBucket||s instanceof e.FillExtrusionBucket)&&(o(s.layers,this.zoom),s.addFeatures(m,r.patternPositions))}this.status="done",i(null,{buckets:e.values(f).filter((function(e){return!e.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?d:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?t.positions:null})}}A.length?n.send("getImages",{icons:A},(function(e,t){c||(c=e,h=t,E.call(s))})):h={},E.call(this)};var s="undefined"!=typeof performance,l={getEntriesByName:function(e){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(e)},mark:function(e){return!!(s&&performance&&performance.mark)&&performance.mark(e)},measure:function(e,t,r){return!!(s&&performance&&performance.measure)&&performance.measure(e,t,r)},clearMarks:function(e){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(e)},clearMeasures:function(e){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(e)}},u=function(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},l.mark(this._marks.start)};function c(t,r){var n=e.getArrayBuffer(t.request,(function(t,n,a,i){t?r(t):n&&r(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(n)),rawData:n,cacheControl:a,expires:i})}));return function(){n.cancel(),r()}}u.prototype.finish=function(){l.mark(this._marks.end);var e=l.getEntriesByName(this._marks.measure);return 0===e.length&&(l.measure(this._marks.measure,this._marks.start,this._marks.end),e=l.getEntriesByName(this._marks.measure),l.clearMarks(this._marks.start),l.clearMarks(this._marks.end),l.clearMeasures(this._marks.measure)),e},l.Performance=u;var d=function(e,t,r){this.actor=e,this.layerIndex=t,this.loadVectorData=r||c,this.loading={},this.loaded={}};d.prototype.loadTile=function(t,r){var n=this,a=t.uid;this.loading||(this.loading={});var o=!!(t&&t.request&&t.request.collectResourceTiming)&&new l.Performance(t.request),s=this.loading[a]=new i(t);s.abort=this.loadVectorData(t,(function(t,i){if(delete n.loading[a],t||!i)return s.status="done",n.loaded[a]=s,r(t);var l=i.rawData,u={};i.expires&&(u.expires=i.expires),i.cacheControl&&(u.cacheControl=i.cacheControl);var c={};if(o){var d=o.finish();d&&(c.resourceTiming=JSON.parse(JSON.stringify(d)))}s.vectorTile=i.vectorTile,s.parse(i.vectorTile,n.layerIndex,n.actor,(function(t,n){if(t||!n)return r(t);r(null,e.extend({rawTileData:l.slice(0)},n,u,c))})),n.loaded=n.loaded||{},n.loaded[a]=s}))},d.prototype.reloadTile=function(e,t){var r=this.loaded,n=e.uid,a=this;if(r&&r[n]){var i=r[n];i.showCollisionBoxes=e.showCollisionBoxes;var o=function(e,r){var n=i.reloadCallback;n&&(delete i.reloadCallback,i.parse(i.vectorTile,a.layerIndex,a.actor,n)),t(e,r)};"parsing"===i.status?i.reloadCallback=o:"done"===i.status&&(i.vectorTile?i.parse(i.vectorTile,this.layerIndex,this.actor,o):o())}},d.prototype.abortTile=function(e,t){var r=this.loading,n=e.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),t()},d.prototype.removeTile=function(e,t){var r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()};var p=function(){this.loaded={}};p.prototype.loadTile=function(t,r){var n=t.uid,a=t.encoding,i=t.rawImageData,o=new e.DEMData(n,i,a);this.loaded=this.loaded||{},this.loaded[n]=o,r(null,o)},p.prototype.removeTile=function(e){var t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]};var h={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function f(e){var t=0;if(e&&e.length>0){t+=Math.abs(m(e[0]));for(var r=1;r2){for(o=0;o=0}(e)===t?e:e.reverse()}var x=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};w.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],r=0,n=this._feature.geometry;r>31}function z(e,t){for(var r=e.loadGeometry(),n=e.type,a=0,i=0,o=r.length,s=0;s>1;!function e(t,r,n,a,i,o){for(;i>a;){if(i-a>600){var s=i-a+1,l=n-a+1,u=Math.log(s),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(t,r,n,Math.max(a,Math.floor(n-l*c/s+d)),Math.min(i,Math.floor(n+(s-l)*c/s+d)),o)}var p=r[2*n+o],h=a,f=i;for(B(t,r,a,n),r[2*i+o]>p&&B(t,r,a,i);hp;)f--}r[2*a+o]===p?B(t,r,a,f):B(t,r,++f,i),f<=n&&(a=f+1),n<=f&&(i=f-1)}}(t,r,s,a,i,o%2),e(t,r,n,a,s-1,o+1),e(t,r,n,s+1,i,o+1)}}(o,s,n,0,o.length-1,0)};U.prototype.range=function(e,t,r,n){return function(e,t,r,n,a,i,o){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var d=u.pop(),p=u.pop(),h=u.pop();if(p-h<=o)for(var f=h;f<=p;f++)s=t[2*f],l=t[2*f+1],s>=r&&s<=a&&l>=n&&l<=i&&c.push(e[f]);else{var m=Math.floor((h+p)/2);s=t[2*m],l=t[2*m+1],s>=r&&s<=a&&l>=n&&l<=i&&c.push(e[m]);var g=(d+1)%2;(0===d?r<=s:n<=l)&&(u.push(h),u.push(m-1),u.push(g)),(0===d?a>=s:i>=l)&&(u.push(m+1),u.push(p),u.push(g))}}return c}(this.ids,this.coords,e,t,r,n,this.nodeSize)},U.prototype.within=function(e,t,r){return function(e,t,r,n,a,i){for(var o=[0,e.length-1,0],s=[],l=a*a;o.length;){var u=o.pop(),c=o.pop(),d=o.pop();if(c-d<=i)for(var p=d;p<=c;p++)Y(t[2*p],t[2*p+1],r,n)<=l&&s.push(e[p]);else{var h=Math.floor((d+c)/2),f=t[2*h],m=t[2*h+1];Y(f,m,r,n)<=l&&s.push(e[h]);var g=(u+1)%2;(0===u?r-a<=f:n-a<=m)&&(o.push(d),o.push(h-1),o.push(g)),(0===u?r+a>=f:n+a>=m)&&(o.push(h+1),o.push(c),o.push(g))}}return s}(this.ids,this.coords,e,t,r,this.nodeSize)};var W={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(e){return e}},q=function(e){this.options=Q(Object.create(W),e),this.trees=new Array(this.options.maxZoom+1)};function G(e,t,r,n,a){return{x:e,y:t,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:a}}function K(e,t){var r=e.geometry.coordinates,n=r[0],a=r[1];return{x:J(n),y:$(a),zoom:1/0,index:t,parentId:-1}}function Z(e){return{type:"Feature",id:e.id,properties:X(e),geometry:{type:"Point",coordinates:[(n=e.x,360*(n-.5)),(t=e.y,r=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var t,r,n}function X(e){var t=e.numPoints,r=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return Q(Q({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function J(e){return e/360+.5}function $(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function Q(e,t){for(var r in t)e[r]=t[r];return e}function ee(e){return e.x}function te(e){return e.y}function re(e,t,r,n,a,i){var o=a-r,s=i-n;if(0!==o||0!==s){var l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=a,n=i):l>0&&(r+=o*l,n+=s*l)}return(o=e-r)*o+(s=t-n)*s}function ne(e,t,r,n){var a={id:void 0===e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)ae(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(a*u-l*i)/2:Math.sqrt(Math.pow(l-a,2)+Math.pow(u-i,2))),a=l,i=u}var c=t.length-3;t[2]=1,function e(t,r,n,a){for(var i,o=a,s=n-r>>1,l=n-r,u=t[r],c=t[r+1],d=t[n],p=t[n+1],h=r+3;ho)i=h,o=f;else if(f===o){var m=Math.abs(h-s);ma&&(i-r>3&&e(t,r,i,a),t[i+2]=o,n-i>3&&e(t,i,n,a))}(t,0,c,r),t[c+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function le(e,t,r,n){for(var a=0;a1?1:r}function de(e,t,r,n,a,i,o,s){if(n/=t,i>=(r/=t)&&o=n)return null;for(var l=[],u=0;u=r&&f=n)){var m=[];if("Point"===p||"MultiPoint"===p)pe(d,m,r,n,a);else if("LineString"===p)he(d,m,r,n,a,!1,s.lineMetrics);else if("MultiLineString"===p)me(d,m,r,n,a,!1);else if("Polygon"===p)me(d,m,r,n,a,!0);else if("MultiPolygon"===p)for(var g=0;g=r&&o<=n&&(t.push(e[i]),t.push(e[i+1]),t.push(e[i+2]))}}function he(e,t,r,n,a,i,o){for(var s,l,u=fe(e),c=0===a?ye:ve,d=e.start,p=0;pr&&(l=c(u,h,f,g,y,r),o&&(u.start=d+s*l)):v>n?_=r&&(l=c(u,h,f,g,y,r),b=!0),_>n&&v<=n&&(l=c(u,h,f,g,y,n),b=!0),!i&&b&&(o&&(u.end=d+s*l),t.push(u),u=fe(e)),o&&(d+=s)}var x=e.length-3;h=e[x],f=e[x+1],m=e[x+2],(v=0===a?h:f)>=r&&v<=n&&ge(u,h,f,m),x=u.length-3,i&&x>=3&&(u[x]!==u[0]||u[x+1]!==u[1])&&ge(u,u[0],u[1],u[2]),u.length&&t.push(u)}function fe(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function me(e,t,r,n,a,i){for(var o=0;oo.maxX&&(o.maxX=c),d>o.maxY&&(o.maxY=d)}return o}function Me(e,t,r,n){var a=t.geometry,i=t.type,o=[];if("Point"===i||"MultiPoint"===i)for(var s=0;s0&&t.size<(a?o:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;lo)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;a&&function(e,t){for(var r=0,n=0,a=e.length,i=a-2;n0===t)for(n=0,a=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n=n;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new U(s,ee,te,i,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return r&&console.timeEnd("total time"),this},q.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),a=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,a=180;else if(r>a){var o=this.getClusters([r,n,180,i],t),s=this.getClusters([-180,n,a,i],t);return o.concat(s)}for(var l=this.trees[this._limitZoom(t)],u=[],c=0,d=l.range(J(r),$(i),J(a),$(n));c>5,r=e%32,n="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(n);var i=a.points[t];if(!i)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,u=a.within(i.x,i.y,o);l1?this._map(u,!0):null,g=(l<<5)+(t+1),y=0,v=d;y1&&console.time("creation"),p=this.tiles[d]=ke(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var h="z"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(p.source=e,a){if(t===l.maxZoom||t===a)continue;var f=1<1&&console.time("clipping");var m,g,y,v,_,b,x=.5*l.buffer/l.extent,w=.5-x,k=.5+x,M=1+x;m=g=y=v=null,_=de(e,c,r-x,r+k,0,p.minX,p.maxX,l),b=de(e,c,r+w,r+M,0,p.minX,p.maxX,l),e=null,_&&(m=de(_,c,n-x,n+k,1,p.minY,p.maxY,l),g=de(_,c,n+w,n+M,1,p.minY,p.maxY,l),_=null),b&&(y=de(b,c,n-x,n+k,1,p.minY,p.maxY,l),v=de(b,c,n+w,n+M,1,p.minY,p.maxY,l),b=null),u>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(y||[],t+1,2*r+1,2*n),s.push(v||[],t+1,2*r+1,2*n+1)}}},Se.prototype.getTile=function(e,t,r){var n=this.options,a=n.extent,i=n.debug;if(e<0||e>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,u=e,c=t,d=r;!l&&u>0;)u--,c=Math.floor(c/2),d=Math.floor(d/2),l=this.tiles[Ce(u,c,d)];return l&&l.source?(i>1&&console.log("found parent tile z%d-%d-%d",u,c,d),i>1&&console.time("drilling down"),this.splitTile(l.source,u,c,d,e,t,r),i>1&&console.timeEnd("drilling down"),this.tiles[s]?xe(this.tiles[s],a):null):null};var Ae=function(t){function r(e,r,n){t.call(this,e,r,Le),n&&(this.loadGeoJSON=n)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var a=!!(n&&n.request&&n.request.collectResourceTiming)&&new l.Performance(n.request);this.loadGeoJSON(n,(function(i,o){if(i||!o)return r(i);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));!function e(t,r){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(v(e,r)),t;case"GeometryCollection":return t.geometries=t.geometries.map(v(e,r)),t;case"Feature":return t.geometry=e(t.geometry,r),t;case"Polygon":case"MultiPolygon":return function(e,t){return"Polygon"===e.type?e.coordinates=_(e.coordinates,t):"MultiPolygon"===e.type&&(e.coordinates=e.coordinates.map(v(_,t))),e}(t,r);default:return t}}(o,!0);try{t._geoJSONIndex=n.cluster?new q(function(t){var r=t.superclusterOptions,n=t.clusterProperties;if(!n||!r)return r;for(var a={},i={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),u=0,c=l;u=0?0:t.button},r.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var p=function(t){function r(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,r=this.requestors;t=0?1.2:1))}function y(e,t,r,n,a,i,o){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else{var l=i.requests[s];l||(l=i.requests[s]=[],_.loadGlyphRange(r,s,n.url,n.requestManager,(function(e,t){if(t)for(var r in t)n._doesCharSupportLocalGlyph(+r)||(i.glyphs[+r]=t[+r]);for(var a=0,o=l;athis.height)return e.warnOnce("LineAtlas out of space"),null;for(var i=0,o=0;o=n&&t.x=a&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,i,r.z,a,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",n))}}))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setData=function(t){var r=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)r.fire(new e.ErrorEvent(t));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new e.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},r.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},r.prototype.getClusterLeaves=function(e,t,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:r},n),this},r.prototype._updateWorkerData=function(t){var r=this;this._loaded=!1;var n=e.extend({},this.workerOptions),a=this._data;"string"==typeof a?(n.request=this.map._requestManager.transformRequest(e.browser.resolveURL(a),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(a),this.actor.send(this.type+".loadData",n,(function(e,a){r._removed||a&&a.abandoned||(r._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[r.id]&&(r._resourceTiming=a.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),t(e))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(t,r){var n=this,a=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.request=this.actor.send(a,i,(function(e,i){return delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(i,n.map.painter,"reloadTile"===a),r(null))}))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},r.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(e.Evented),D=function(t){function r(e,r,n,a){t.call(this),this.id=e,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=r}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(t,r){var n=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(a,i){n._loaded=!0,a?n.fire(new e.ErrorEvent(a)):i&&(n.image=i,t&&(n.coordinates=t),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setCoordinates=function(t){var r=this;this.coordinates=t;var n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){for(var r=1/0,n=1/0,a=-1/0,i=-1/0,o=0,s=t;or.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=t}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,e.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[n];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(D),I=function(t){function r(r,n,a,i){t.call(this,r,n,a,i),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!=typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var a in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,e.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var i=this.tiles[a];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},B.prototype.has=function(e){return e.wrapped().key in this.data},B.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},B.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},B.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},B.prototype.remove=function(e,t){if(!this.has(e))return this;var r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),a=this.data[r][n];return this.data[r].splice(n,1),a.timeout&&clearTimeout(a.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(a.value),this.order.splice(this.order.indexOf(r),1),this},B.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this};var j=function(e,t,r){this.context=e;var n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};j.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},j.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},j.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var Y={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},H=function(e,t,r,n){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;var a=e.gl;this.buffer=a.createBuffer(),e.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};H.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},H.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},H.prototype.enableAttributes=function(e,t){for(var r=0;r1||(Math.abs(r)>1&&(1===Math.abs(r+a)?r+=a:1===Math.abs(r-a)&&(r-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[i]&&(e.neighboringTiles[i].backfilled=!0)))}},r.prototype.getTile=function(e){return this.getTileByID(e.key)},r.prototype.getTileByID=function(e){return this._tiles[e]},r.prototype.getZoom=function(e){return e.zoom+e.scaleZoom(e.tileSize/this._source.tileSize)},r.prototype._retainLoadedChildren=function(e,t,r,n){for(var a in this._tiles){var i=this._tiles[a];if(!(n[a]||!i.hasData()||i.tileID.overscaledZ<=t||i.tileID.overscaledZ>r)){for(var o=i.tileID;i&&i.tileID.overscaledZ>t+1;){var s=i.tileID.scaledTo(i.tileID.overscaledZ-1);(i=this._tiles[s.key])&&i.hasData()&&(o=s)}for(var l=o;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(e,t){for(var r=e.overscaledZ-1;r>=t;r--){var n=e.scaledTo(r);if(!n)return;var a=String(n.key),i=this._tiles[a];if(i&&i.hasData())return i;if(this._cache.has(n))return this._cache.get(n)}},r.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),r=Math.floor(5*t),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,r=Math.round(t);if(this._prevLng=e,r){var n={};for(var a in this._tiles){var i=this._tiles[a];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+r),n[i.tileID.key]=i}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var a;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?a=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(a=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(a=a.filter((function(e){return n._source.hasTile(e)})))):a=[];var i=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(t)),o=Math.max(i-r.maxOverzooming,this._source.minzoom),s=Math.max(i+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(a,i);if(Pe(this._source.type)){for(var u={},c={},d=0,p=Object.keys(l);dthis._source.maxzoom){var g=f.children(this._source.maxzoom)[0],y=this.getTile(g);if(y&&y.hasData()){n[g.key]=g;continue}}else{var v=f.children(this._source.maxzoom);if(n[v[0].key]&&n[v[1].key]&&n[v[2].key]&&n[v[3].key])continue}for(var _=m.wasRequested(),b=f.overscaledZ-1;b>=i;--b){var x=f.scaledTo(b);if(a[x.key])break;if(a[x.key]=!0,!(m=this.getTile(x))&&_&&(m=this._addTile(x)),m&&(n[x.key]=x,_=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._addTile=function(t){var r=this._tiles[t.key];if(r)return r;(r=this._cache.getAndRemove(t))&&(this._setTileReloadTimer(t.key,r),r.tileID=t,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,r)));var n=Boolean(r);return n||(r=new e.Tile(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,t.key,r.state))),r?(r.uses++,this._tiles[t.key]=r,n||this._source.fire(new e.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(e,t){var r=this;e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);var n=t.getExpiryTimeout();n&&(this._timers[e]=setTimeout((function(){r._reloadTile(e,"expired"),delete r._timers[e]}),n))},r.prototype._removeTile=function(e){var t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},r.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},r.prototype.tilesIn=function(t,r,n){var a=this,i=[],o=this.transform;if(!o)return i;for(var s=n?o.getCameraQueryGeometry(t):t,l=t.map((function(e){return o.pointCoordinate(e)})),u=s.map((function(e){return o.pointCoordinate(e)})),c=this.getIds(),d=1/0,p=1/0,h=-1/0,f=-1/0,m=0,g=u;m=0&&y[1].y+g>=0){var v=l.map((function(e){return s.getTilePoint(e)})),_=u.map((function(e){return s.getTilePoint(e)}));i.push({tile:n,tileID:s,queryGeometry:v,cameraQueryGeometry:_,scale:m})}}},_=0;_=e.browser.now())return!0}return!1},r.prototype.setFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.updateState(e,t,r)},r.prototype.removeFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,r)},r.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},r}(e.Evented);function De(e,t){return e%32-t%32||t-e}function Pe(e){return"raster"===e||"image"===e||"video"===e}function Ie(){return new e.window.Worker(Qn.workerUrl)}Ee.maxOverzooming=10,Ee.maxUnderzooming=3;var Oe=function(){this.active={}};Oe.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function $e(t,r,n,a,i,o,s,l){var u=a?t.textSizeData:t.iconSizeData,c=e.evaluateSizeForZoom(u,n.transform.zoom),d=[256/n.width*2+1,256/n.height*2+1],p=a?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;p.clear();for(var h=t.lineVertexArray,f=a?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,y=0;yMath.abs(n.x-r.x)*a?{useVertical:!0}:(t===e.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function tt(t,r,n,a,i,o,s,l,u,c,d,p,h,f){var m,g=r/24,y=t.lineOffsetX*g,v=t.lineOffsetY*g;if(t.numGlyphs>1){var _=t.glyphStartIndex+t.numGlyphs,b=t.lineStartIndex,x=t.lineStartIndex+t.lineLength,w=Qe(g,l,y,v,n,d,p,t,u,o,h,!1);if(!w)return{notEnoughRoom:!0};var k=Xe(w.first.point,s).point,M=Xe(w.last.point,s).point;if(a&&!n){var T=et(t.writingMode,k,M,f);if(T)return T}m=[w.first];for(var S=t.glyphStartIndex+1;S<_-1;S++)m.push(nt(g*l.getoffsetX(S),y,v,n,d,p,t.segment,b,x,u,o,h,!1));m.push(w.last)}else{if(a&&!n){var C=Xe(p,i).point,L=t.lineStartIndex+t.segment+1,A=new e.Point(u.getx(L),u.gety(L)),E=Xe(A,i),D=E.signedDistanceFromCamera>0?E.point:rt(p,A,C,1,i),P=et(t.writingMode,C,D,f);if(P)return P}var I=nt(g*l.getoffsetX(t.glyphStartIndex),y,v,n,d,p,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,u,o,h,!1);if(!I)return{notEnoughRoom:!0};m=[I]}for(var O=0,F=m;O0?1:-1,g=0;a&&(m*=-1,g=Math.PI),m<0&&(g+=Math.PI);for(var y=m>0?l+s:l+s+1,v=y,_=i,b=i,x=0,w=0,k=Math.abs(f);x+w<=k;){if((y+=m)=u)return null;if(b=_,void 0===(_=p[y])){var M=new e.Point(c.getx(y),c.gety(y)),T=Xe(M,d);if(T.signedDistanceFromCamera>0)_=p[y]=T.point;else{var S=y-m;_=rt(0===x?o:new e.Point(c.getx(S),c.gety(S)),M,b,k-x+1,d)}}x+=w,w=b.dist(_)}var C=(k-x)/w,L=_.sub(b),A=L.mult(C)._add(b);return A._add(L._unit()._perp()._mult(n*m)),{point:A,angle:g+Math.atan2(_.y-b.y,_.x-b.x),tileDistance:h?{prevTileDistance:y-m===v?0:c.gettileUnitDistanceFromAnchor(y-m),lastSegmentViewportDistance:k-x}:null}}Ge.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Ge.prototype.insert=function(e,t,r,n,a){this._forEachCell(t,r,n,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(a)},Ge.prototype.insertCircle=function(e,t,r,n){this._forEachCell(t-n,r-n,t+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(n)},Ge.prototype._insertBoxCell=function(e,t,r,n,a,i){this.boxCells[a].push(i)},Ge.prototype._insertCircleCell=function(e,t,r,n,a,i){this.circleCells[a].push(i)},Ge.prototype._query=function(e,t,r,n,a,i){if(r<0||e>this.width||n<0||t>this.height)return!a&&[];var o=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(a)return!0;for(var s=0;s0:o},Ge.prototype._queryCircle=function(e,t,r,n,a){var i=e-r,o=e+r,s=t-r,l=t+r;if(o<0||i>this.width||l<0||s>this.height)return!n&&[];var u=[],c={hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(i,s,o,l,this._queryCellCircle,u,c,a),n?u.length>0:u},Ge.prototype.query=function(e,t,r,n,a){return this._query(e,t,r,n,!1,a)},Ge.prototype.hitTest=function(e,t,r,n,a){return this._query(e,t,r,n,!0,a)},Ge.prototype.hitTestCircle=function(e,t,r,n){return this._queryCircle(e,t,r,!0,n)},Ge.prototype._queryCell=function(e,t,r,n,a,i,o,s){var l=o.seenUids,u=this.boxCells[a];if(null!==u)for(var c=this.bboxes,d=0,p=u;d=c[f+0]&&n>=c[f+1]&&(!s||s(this.boxKeys[h]))){if(o.hitTest)return i.push(!0),!0;i.push({key:this.boxKeys[h],x1:c[f],y1:c[f+1],x2:c[f+2],y2:c[f+3]})}}}var m=this.circleCells[a];if(null!==m)for(var g=this.circles,y=0,v=m;yo*o+s*s},Ge.prototype._circleAndRectCollide=function(e,t,r,n,a,i,o){var s=(i-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;var u=(o-a)/2,c=Math.abs(t-(a+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var d=l-s,p=c-u;return d*d+p*p<=r*r};var at=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function it(e,t){for(var r=0;rC)lt(t,L,!1);else{var I=this.projectPoint(u,A,E),O=D*M;if(f.length>0){var F=I.x-f[f.length-4],R=I.y-f[f.length-3];if(O*O*2>F*F+R*R&&L+8-S&&z=this.screenRightBoundary||n<100||t>this.screenBottomBoundary},st.prototype.isInsideGrid=function(e,t,r,n){return r>=0&&e=0&&t0)return this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(g=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={radialOffset:i,width:n,height:a,anchor:t,textBoxScale:o,prevAnchor:g},this.markUsedJustification(f,t,h,m),f.allowVerticalPlacement&&(this.markUsedOrientation(f,m,h),this.placedOrientations[h.crossTileID]=m),v},gt.prototype.placeLayerBucket=function(t,r,n,a,i,o,s,l,u,c){var d=this,p=t.layers[0].layout,h=e.evaluateSizeForZoom(t.textSizeData,this.transform.zoom),f=p.get("text-optional"),m=p.get("icon-optional"),g=p.get("text-allow-overlap"),y=p.get("icon-allow-overlap"),v=g&&(y||!t.hasIconData()||m),_=y&&(g||!t.hasTextData()||f),b=this.collisionGroups.get(t.sourceID),x="map"===p.get("text-rotation-alignment"),w="map"===p.get("text-pitch-alignment"),k="viewport-y"===p.get("symbol-z-order");!t.collisionArrays&&c&&t.deserializeCollisionBoxes(c);var M=function(a,c){if(!u[a.crossTileID])if(l)d.placements[a.crossTileID]=new pt(!1,!1,!1);else{var y,k=!1,M=!1,T=!0,S={box:null,offscreen:null},C={box:null,offscreen:null},L=null,A=null,E=0,D=0,P=0;c.textFeatureIndex&&(E=c.textFeatureIndex),c.verticalTextFeatureIndex&&(D=c.verticalTextFeatureIndex);var I=c.textBox;if(I){var O=function(r){var n=e.WritingMode.horizontal;if(t.allowVerticalPlacement&&!r&&d.prevPlacement){var i=d.prevPlacement.placedOrientations[a.crossTileID];i&&(d.placedOrientations[a.crossTileID]=i,n=i,d.markUsedOrientation(t,n,a))}return n},F=function(r,n){if(t.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&c.verticalTextBox)for(var i=0,o=t.writingModes;i0&&(R=R.filter((function(e){return e!==z.anchor}))).unshift(z.anchor)}var N=function(e,n){for(var i=e.x2-e.x1,s=e.y2-e.y1,l=a.textBoxScale,u={box:[],offscreen:!1},c=g?2*R.length:R.length,p=0;p=R.length;if((u=d.attemptAnchorPlacement(h,e,i,s,a.radialTextOffset,l,x,w,o,r,b,f,a,t,n))&&u.box&&u.box.length){k=!0;break}}return u};F((function(){return N(I,e.WritingMode.horizontal)}),(function(){var r=c.verticalTextBox,n=S&&S.box&&S.box.length;return t.allowVerticalPlacement&&!n&&a.numVerticalGlyphVertices>0&&r?N(r,e.WritingMode.vertical):{box:null,offscreen:null}})),S&&(k=S.box,T=S.offscreen);var B=O(S&&S.box);if(!k&&d.prevPlacement){var j=d.prevPlacement.variableOffsets[a.crossTileID];j&&(d.variableOffsets[a.crossTileID]=j,d.markUsedJustification(t,j.anchor,a,B))}}else{var Y=function(e,n){var i=d.collisionIndex.placeCollisionBox(e,p.get("text-allow-overlap"),o,r,b.predicate);return i&&i.box&&i.box.length&&(d.markUsedOrientation(t,n,a),d.placedOrientations[a.crossTileID]=n),i};F((function(){return Y(I,e.WritingMode.horizontal)}),(function(){var r=c.verticalTextBox;return t.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&r?Y(r,e.WritingMode.vertical):{box:null,offscreen:null}})),O(S&&S.box&&S.box.length)}}k=(y=S)&&y.box&&y.box.length>0,T=y&&y.offscreen;var H=c.textCircles;if(H){var V=t.text.placedSymbolArray.get(a.centerJustifiedTextSymbolIndex),U=e.evaluateSizeForFeature(t.textSizeData,h,V);L=d.collisionIndex.placeCollisionCircles(H,p.get("text-allow-overlap"),i,o,V,t.lineVertexArray,t.glyphOffsetArray,U,r,n,s,w,b.predicate),k=p.get("text-allow-overlap")||L.circles.length>0,T=T&&L.offscreen}c.iconFeatureIndex&&(P=c.iconFeatureIndex),c.iconBox&&(M=(A=d.collisionIndex.placeCollisionBox(c.iconBox,p.get("icon-allow-overlap"),o,r,b.predicate)).box.length>0,T=T&&A.offscreen);var W=f||0===a.numHorizontalGlyphVertices&&0===a.numVerticalGlyphVertices,q=m||0===a.numIconVertices;W||q?q?W||(M=M&&k):k=M&&k:M=k=M&&k,k&&y&&y.box&&(C&&C.box&&D?d.collisionIndex.insertCollisionBox(y.box,p.get("text-ignore-placement"),t.bucketInstanceId,D,b.ID):d.collisionIndex.insertCollisionBox(y.box,p.get("text-ignore-placement"),t.bucketInstanceId,E,b.ID)),M&&A&&d.collisionIndex.insertCollisionBox(A.box,p.get("icon-ignore-placement"),t.bucketInstanceId,P,b.ID),k&&L&&d.collisionIndex.insertCollisionCircles(L.circles,p.get("text-ignore-placement"),t.bucketInstanceId,E,b.ID),d.placements[a.crossTileID]=new pt(k||v,M||_,T||t.justReloaded),u[a.crossTileID]=!0}};if(k)for(var T=t.getSortedSymbolIndexes(this.transform.angle),S=T.length-1;S>=0;--S){var C=T[S];M(t.symbolInstances.get(C),t.collisionArrays[C])}else for(var L=0;L=0&&(t.text.placedSymbolArray.get(u).crossTileID=i>=0&&u!==i?0:n.crossTileID)}},gt.prototype.markUsedOrientation=function(t,r,n){for(var a=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,i=r===e.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||m>0,b=h.numIconVertices>0;if(_){for(var x=Tt(v.text),w=(f+m)/4,k=0;k=0&&(t.text.placedSymbolArray.get(e).hidden=M||C)})),h.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(h.verticalPlacedTextSymbolIndex).hidden=M||S);var L=this.variableOffsets[h.crossTileID];L&&this.markUsedJustification(t,L.anchor,h,T);var A=this.placedOrientations[h.crossTileID];A&&(this.markUsedJustification(t,"left",h,A),this.markUsedOrientation(t,A,h))}if(b){for(var E=Tt(v.icon),D=0;De},gt.prototype.setStale=function(){this.stale=!0};var vt=Math.pow(2,25),_t=Math.pow(2,24),bt=Math.pow(2,17),xt=Math.pow(2,16),wt=Math.pow(2,9),kt=Math.pow(2,8),Mt=Math.pow(2,1);function Tt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*vt+t*_t+r*bt+t*xt+r*wt+t*kt+r*Mt+t}var St=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};St.prototype.continuePlacement=function(e,t,r,n,a){for(;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new St),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ct.prototype.commit=function(e){return this.placement.commit(e),this.placement};var Lt=512/e.EXTENT/2,At=function(e,t,r){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;ne.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,a)}else{var u=o[e.scaledTo(Number(i)).key];u&&u.findMatches(t.symbolInstances,e,a)}}for(var c=0;c1?"@2x":"",l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,o||(o=e,a=t,c())})),u=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){u=null,o||(o=e,i=t,c())}));function c(){if(o)n(o);else if(a&&i){var t=e.browser.getImageData(i),r={};for(var s in a){var l=a[s],u=l.width,c=l.height,d=l.x,p=l.y,h=l.sdf,f=l.pixelRatio,m=new e.RGBAImage({width:u,height:c});e.RGBAImage.copy(t,m,{x:d,y:p},{x:0,y:0},{width:u,height:c}),r[s]={data:m,pixelRatio:f,sdf:h}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(t.sprite,this.map._requestManager,(function(t,r){if(n._spriteRequest=null,t)n.fire(new e.ErrorEvent(t));else if(r)for(var a in r)n.imageManager.addImage(a,r[a]);n.imageManager.setLoaded(!0),n.fire(new e.Event("data",{dataType:"style"}))})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);var i=Ne(this.stylesheet.layers);this._order=i.map((function(e){return e.id})),this._layers={};for(var o=0,s=i;o0)throw new Error("Unimplemented: "+a.map((function(e){return e.command})).join(", ")+".");return n.forEach((function(e){"setTransition"!==e.command&&r[e.command].apply(r,e.args)})),this.stylesheet=t,!0},r.prototype.addImage=function(t,r){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,r),this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},r.prototype.getImage=function(e){return this.imageManager.getImage(e)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,r,n){var a=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var i=this.sourceCaches[t]=new Ee(t,r,this.dispatcher);i.style=this,i.setEventedParent(this,(function(){return{isSourceLoaded:a.loaded(),source:i.serialize(),sourceId:t}})),i.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},r.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},r.prototype.addLayer=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var a=t.id;if(this.getLayer(a))this.fire(new e.ErrorEvent(new Error('Layer with id "'+a+'" already exists on this map')));else{var i;if("custom"===t.type){if(It(this,e.validateCustomStyleLayer(t)))return;i=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(a,t.source),t=e.clone$1(t),t=e.extend(t,{source:a})),this._validate(e.validateStyle.layer,"layers."+a,t,{arrayIndex:-1},n))return;i=e.createStyleLayer(t),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){var s=this._removedLayers[a];delete this._removedLayers[a],s.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)}}},r.prototype.moveLayer=function(t,r){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==r){var n=this._order.indexOf(t);this._order.splice(n,1);var a=r?this._order.indexOf(r):this._order.length;r&&-1===a?this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(a,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(t){this._checkLoaded();var r=this._layers[t];if(r){r.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(e){return this._layers[e]},r.prototype.setLayerZoomRange=function(t,r,n){this._checkLoaded();var a=this.getLayer(t);a?a.minzoom===r&&a.maxzoom===n||(null!=r&&(a.minzoom=r),null!=n&&(a.maxzoom=n),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var a=this.getLayer(t);if(a){if(!e.deepEqual(a.filter,r))return null==r?(a.filter=void 0,void this._updateLayer(a)):void(this._validate(e.validateStyle.filter,"layers."+a.id+".filter",r,null,n)||(a.filter=e.clone$1(r),this._updateLayer(a)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,r,n,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(t);i?e.deepEqual(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n,a),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,r){var n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(t,r,n,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(t);i?e.deepEqual(i.getPaintProperty(r),n)||(i.setPaintProperty(r,n,a)&&this._updateLayer(i),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},r.prototype.setFeatureState=function(t,r){this._checkLoaded();var n=t.source,a=t.sourceLayer,i=this.sourceCaches[n],o=parseInt(t.id,10);if(void 0!==i){var s=i.getSource().type;"geojson"===s&&a?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||a?isNaN(o)||o<0?this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):i.setFeatureState(a,o,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(t,r){this._checkLoaded();var n=t.source,a=this.sourceCaches[n];if(void 0!==a){var i=a.getSource().type,o="vector"===i?t.sourceLayer:void 0,s=parseInt(t.id,10);"vector"!==i||o?void 0!==t.id&&isNaN(s)||s<0?this.fire(new e.ErrorEvent(new Error("The feature id parameter must be non-negative."))):r&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):a.removeFeatureState(o,s,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(t){this._checkLoaded();var r=t.source,n=t.sourceLayer,a=this.sourceCaches[r],i=parseInt(t.id,10);if(void 0!==a)if("vector"!==a.getSource().type||n){if(!(isNaN(i)||i<0))return a.getFeatureState(n,i);this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},r.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,r=function(e){return"fill-extrusion"===t._layers[e].type},n={},a=[],i=this._order.length-1;i>=0;i--){var o=this._order[i];if(r(o)){n[o]=i;for(var s=0,l=e;s=0;f--){var m=this._order[f];if(r(m))for(var g=a.length-1;g>=0;g--){var y=a[g].feature;if(n[y.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),qt=ur("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),Gt=ur("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Kt=ur("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),Zt=ur("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Xt=ur("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Jt=ur("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),$t=ur("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),Qt=ur("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),er=ur("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),tr=ur("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),rr=ur("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),nr=ur("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),ar=ur("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}"),ir=ur("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),or=ur("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),sr=ur("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),lr=ur("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function ur(e,t){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(r,(function(e,t,r,a,i){return n[i]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:t=t.replace(r,(function(e,t,r,a,i){var o="float"===a?"vec2":"vec4",s=i.match(/color/)?"color":o;return n[i]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = a_"+i+";\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"}))}}var cr=Object.freeze({prelude:Nt,background:Bt,backgroundPattern:jt,circle:Yt,clippingMask:Ht,heatmap:Vt,heatmapTexture:Ut,collisionBox:Wt,collisionCircle:qt,debug:Gt,fill:Kt,fillOutline:Zt,fillOutlinePattern:Xt,fillPattern:Jt,fillExtrusion:$t,fillExtrusionPattern:Qt,hillshadePrepare:er,hillshade:tr,line:rr,lineGradient:nr,linePattern:ar,lineSDF:ir,raster:or,symbolIcon:sr,symbolSDF:lr}),dr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};dr.prototype.bind=function(e,t,r,n,a,i,o,s){this.context=e;for(var l=this.boundPaintVertexBuffers.length!==n.length,u=0;!l&&u>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}pr.prototype.draw=function(e,t,r,n,a,i,o,s,l,u,c,d,p,h,f,m){var g,y=e.gl;for(var v in e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(a),e.setCullFace(i),this.fixedUniforms)this.fixedUniforms[v].set(o[v]);h&&h.setUniforms(e,this.binderUniforms,d,{zoom:p});for(var _=(g={},g[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g)[t],b=0,x=c.get();b0?1-1/(1.001-o):-o),u_contrast_factor:(i=a.paint.get("raster-contrast"),i>0?1/(1-i):1+i),u_spin_weights:Rr(a.paint.get("raster-hue-rotate"))};var i,o};function Rr(e){e*=Math.PI/180;var t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}var zr=function(e,t,r,n,a,i,o,s,l,u){var c=a.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:a.options.fadeDuration?a.symbolFadeChange:1,u_matrix:i,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},Nr=function(t,r,n,a,i,o,s,l,u,c,d){var p=i.transform;return e.extend(zr(t,r,n,a,i,o,s,l,u,c),{u_gamma_scale:a?Math.cos(p._pitch)*p.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+d})},Br=function(e,t,r){return{u_matrix:e,u_opacity:t,u_color:r}},jr=function(t,r,n,a,i,o){return e.extend(function(e,t,r,n){var a=r.imageManager.getPattern(e.from),i=r.imageManager.getPattern(e.to),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/u,d=c*(n.tileID.canonical.x+n.tileID.wrap*u),p=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:i.tl,u_pattern_br_b:i.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:i.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/ut(n,1,r.transform.tileZoom),u_pixel_coord_upper:[d>>16,p>>16],u_pixel_coord_lower:[65535&d,65535&p]}}(a,o,n,i),{u_matrix:t,u_opacity:r})},Yr={fillExtrusion:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fillExtrusionPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,r.u_height_factor),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fill:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},fillPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},fillOutline:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world)}},fillOutlinePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},circle:function(t,r){return{u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,r.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},collisionBox:xr,collisionCircle:xr,debug:function(t,r){return{u_color:new e.UniformColor(t,r.u_color),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},clippingMask:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmap:function(t,r){return{u_extrude_scale:new e.Uniform1f(t,r.u_extrude_scale),u_intensity:new e.Uniform1f(t,r.u_intensity),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmapTexture:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_color_ramp:new e.Uniform1i(t,r.u_color_ramp),u_opacity:new e.Uniform1f(t,r.u_opacity)}},hillshade:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_latrange:new e.Uniform2f(t,r.u_latrange),u_light:new e.Uniform2f(t,r.u_light),u_shadow:new e.UniformColor(t,r.u_shadow),u_highlight:new e.UniformColor(t,r.u_highlight),u_accent:new e.UniformColor(t,r.u_accent)}},hillshadePrepare:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_dimension:new e.Uniform2f(t,r.u_dimension),u_zoom:new e.Uniform1f(t,r.u_zoom),u_maxzoom:new e.Uniform1f(t,r.u_maxzoom)}},line:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels)}},lineGradient:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_image:new e.Uniform1i(t,r.u_image)}},linePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_texsize:new e.Uniform2f(t,r.u_texsize),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_image:new e.Uniform1i(t,r.u_image),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},lineSDF:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,r.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,r.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,r.u_sdfgamma),u_image:new e.Uniform1i(t,r.u_image),u_tex_y_a:new e.Uniform1f(t,r.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,r.u_tex_y_b),u_mix:new e.Uniform1f(t,r.u_mix)}},raster:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_tl_parent:new e.Uniform2f(t,r.u_tl_parent),u_scale_parent:new e.Uniform1f(t,r.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,r.u_buffer_scale),u_fade_t:new e.Uniform1f(t,r.u_fade_t),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image0:new e.Uniform1i(t,r.u_image0),u_image1:new e.Uniform1i(t,r.u_image1),u_brightness_low:new e.Uniform1f(t,r.u_brightness_low),u_brightness_high:new e.Uniform1f(t,r.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,r.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,r.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,r.u_spin_weights)}},symbolIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1f(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture)}},symbolSDF:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1f(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1f(t,r.u_is_halo)}},background:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_color:new e.UniformColor(t,r.u_color)}},backgroundPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image:new e.Uniform1i(t,r.u_image),u_pattern_tl_a:new e.Uniform2f(t,r.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,r.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,r.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,r.u_pattern_br_b),u_texsize:new e.Uniform2f(t,r.u_texsize),u_mix:new e.Uniform1f(t,r.u_mix),u_pattern_size_a:new e.Uniform2f(t,r.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,r.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,r.u_scale_a),u_scale_b:new e.Uniform1f(t,r.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,r.u_tile_units_to_pixels)}}};function Hr(t,r){for(var n=t.sort((function(e,t){return e.tileID.isLessThan(t.tileID)?-1:t.tileID.isLessThan(e.tileID)?1:0})),a=0;a0){var s=e.browser.now(),l=(s-t.timeAdded)/o,u=r?(s-r.timeAdded)/o:-1,c=n.getSource(),d=i.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-d)>Math.abs(t.tileID.overscaledZ-d),h=p&&t.refreshedUponExpiration?1:e.clamp(p?l:1-u,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}function rn(t,r,n){var a=t.context,i=a.gl,o=n.posMatrix,s=t.useProgram("debug"),l=Te.disabled,u=Se.disabled,c=t.colorModeForRenderPass(),d="$debug";s.draw(a,i.LINE_STRIP,l,u,c,Le.disabled,kr(o,e.Color.red),d,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);for(var p=r.getTileByID(n.key).latestRawTileData,h=p&&p.byteLength||0,f=Math.floor(h/1024),m=r.getTile(n).tileSize,g=512/Math.min(m,512),y=function(e,t,r,n){n=n||1;var a,i,o,s,l,u,c,d,p=[];for(a=0,i=e.length;a":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},an={symbol:function(e,t,r,n,a){if("translucent"===e.renderPass){var i=Se.disabled,o=e.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Zr(e,t,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),i,o,a),0!==r.paint.get("text-opacity").constantOr(1)&&Zr(e,t,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),i,o,a),t.map.showCollisionBoxes&&function(e,t,r,n){Ur(e,t,r,n,!1),Ur(e,t,r,n,!0)}(e,t,r,n)}},circle:function(t,r,n,a){if("translucent"===t.renderPass){var i=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=void 0!==n.layout.get("circle-sort-key").constantOr(1);if(0!==i.constantOr(1)||0!==o.constantOr(1)&&0!==s.constantOr(1)){for(var u=t.context,c=u.gl,d=t.depthModeForSublayer(0,Te.ReadOnly),p=Se.disabled,h=t.colorModeForRenderPass(),f=[],m=0;mt.y){var r=e;e=t,t=r}return{x0:e.x,y0:e.y,x1:t.x,y1:t.y,dx:t.x-e.x,dy:t.y-e.y}}function ln(e,t,r,n,a){var i=Math.max(r,Math.floor(t.y0)),o=Math.min(n,Math.ceil(t.y1));if(e.x0===t.x0&&e.y0===t.y0?e.x0+t.dy/e.dy*e.dx0,d=t.dx<0,p=i;pl.dy&&(o=s,s=l,l=o),s.dy>u.dy&&(o=s,s=u,u=o),l.dy>u.dy&&(o=l,l=u,u=o),s.dy&&ln(u,s,n,a,i),l.dy&&ln(u,l,n,a,i)}on.prototype.resize=function(t,r){var n=this.context.gl;if(this.width=t*e.browser.devicePixelRatio,this.height=r*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var a=0,i=this.style._order;a256&&this.clearStencil(),r.setColorMode(Ce.disabled),r.setDepthMode(Te.disabled);var a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var i=0,o=t;i256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Se({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},on.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Se({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},on.prototype.colorModeForRenderPass=function(){var t=this.context.gl;return this._showOverdrawInspector?new Ce([t.CONSTANT_COLOR,t.ONE],new e.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Ce.unblended:Ce.alphaBlended},on.prototype.depthModeForSublayer=function(e,t,r){if(!this.opaquePassEnabledForLayer())return Te.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new Te(r||this.context.gl.LEQUAL,t,[n,n])},on.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var S=this.style._layers[n[this.currentLayer]],C=a[S.source],L=s[S.source];this._renderTileClippingMasks(S,L),this.renderLayer(this,C,S,L)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},on.prototype.isPatternMissing=function(e){if(!e)return!1;var t=this.imageManager.getPattern(e.from),r=this.imageManager.getPattern(e.to);return!t||!r},on.prototype.useProgram=function(e,t){void 0===t&&(t=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+e+(t.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new pr(this.context,cr[e],t,Yr[e],this._showOverdrawInspector)),this.cache[r]},on.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},on.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)};var cn=function(t,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=t||0,this._maxZoom=r||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},dn={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};cn.prototype.clone=function(){var e=new cn(this._minZoom,this._maxZoom,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e},dn.minZoom.get=function(){return this._minZoom},dn.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},dn.maxZoom.get=function(){return this._maxZoom},dn.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},dn.renderWorldCopies.get=function(){return this._renderWorldCopies},dn.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},dn.worldSize.get=function(){return this.tileSize*this.scale},dn.centerPoint.get=function(){return this.size._div(2)},dn.size.get=function(){return new e.Point(this.width,this.height)},dn.bearing.get=function(){return-this.angle/Math.PI*180},dn.bearing.set=function(t){var r=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},dn.pitch.get=function(){return this._pitch/Math.PI*180},dn.pitch.set=function(t){var r=e.clamp(t,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},dn.fov.get=function(){return this._fov/Math.PI*180},dn.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},dn.zoom.get=function(){return this._zoom},dn.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},dn.center.get=function(){return this._center},dn.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},cn.prototype.coveringZoomLevel=function(e){return(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize))},cn.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new e.Point(0,0)),a=this.pointCoordinate(new e.Point(this.width,0)),i=this.pointCoordinate(new e.Point(this.width,this.height)),o=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(n.x,a.x,i.x,o.x)),l=Math.floor(Math.max(n.x,a.x,i.x,o.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new e.UnwrappedTileID(u,t));return r},cn.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),n=r;if(void 0!==t.minzoom&&rt.maxzoom&&(r=t.maxzoom);var a=e.MercatorCoordinate.fromLngLat(this.center),i=Math.pow(2,r),o=new e.Point(i*a.x-.5,i*a.y-.5);return function(t,r,n,a){void 0===a&&(a=!0);var i=1<=0&&l<=i)for(u=r;uo&&(a=o-g)}if(this.lngRange){var y=h.x,v=u.x/2;y-vl&&(n=l-v)}void 0===n&&void 0===a||(this.center=this.unproject(new e.Point(void 0!==n?n:h.x,void 0!==a?a:h.y))),this._unmodified=c,this._constraining=!1}},cn.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,r=Math.PI/2+this._pitch,n=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-r-t),a=this.point,i=a.x,o=a.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),l=this.height/50,u=new Float64Array(16);e.perspective(u,this._fov,this.width/this.height,l,s),e.scale(u,u,[1,-1,1]),e.translate(u,u,[0,0,-this.cameraToCenterDistance]),e.rotateX(u,u,this._pitch),e.rotateZ(u,u,this.angle),e.translate(u,u,[-i,-o,0]),this.mercatorMatrix=e.scale([],u,[this.worldSize,this.worldSize,this.worldSize]),e.scale(u,u,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=u;var c=this.width%2/2,d=this.height%2/2,p=Math.cos(this.angle),h=Math.sin(this.angle),f=i-Math.round(i)+p*c+h*d,m=o-Math.round(o)+p*d+h*c,g=new Float64Array(u);if(e.translate(g,g,[f>.5?f-1:f,m>.5?m-1:m,0]),this.alignedProjMatrix=g,u=e.create(),e.scale(u,u,[this.width/2,-this.height/2,1]),e.translate(u,u,[1,-1,0]),this.labelPlaneMatrix=u,u=e.create(),e.scale(u,u,[1,-1,1]),e.translate(u,u,[-1,-1,0]),e.scale(u,u,[2/this.width,2/this.height,1]),this.glCoordMatrix=u,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(u=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=u,this._posMatrixCache={},this._alignedPosMatrixCache={}}},cn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},cn.prototype.getCameraPoint=function(){var t=this._pitch,r=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,r))},cn.prototype.getCameraQueryGeometry=function(t){var r=this.getCameraPoint();if(1===t.length)return[t[0],r];for(var n=r.x,a=r.y,i=r.x,o=r.y,s=0,l=t;s=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},pn.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(e){}};var hn=function(t){function n(n,a,i,o){void 0===o&&(o={});var s=r.mousePos(a.getCanvasContainer(),i),l=a.unproject(s);t.call(this,n,e.extend({point:s,lngLat:l,originalEvent:i},o)),this._defaultPrevented=!1,this.target=a}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(e.Event),fn=function(t){function n(n,a,i){var o=r.touchPos(a.getCanvasContainer(),i),s=o.map((function(e){return a.unproject(e)})),l=o.reduce((function(e,t,r,n){return e.add(t.div(n.length))}),new e.Point(0,0)),u=a.unproject(l);t.call(this,n,{points:o,point:l,lngLats:s,lngLat:u,originalEvent:i}),this._defaultPrevented=!1}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(e.Event),mn=function(e){function t(t,r,n){e.call(this,t,{originalEvent:n}),this._defaultPrevented=!1}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={defaultPrevented:{configurable:!0}};return t.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,r),t}(e.Event),gn=function(t){this._map=t,this._el=t.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};gn.prototype.setZoomRate=function(e){this._defaultZoomRate=e},gn.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},gn.prototype.isEnabled=function(){return!!this._enabled},gn.prototype.isActive=function(){return!!this._active},gn.prototype.isZooming=function(){return!!this._zooming},gn.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},gn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},gn.prototype.onWheel=function(t){if(this.isEnabled()){var r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=e.browser.now(),a=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(a*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this.isActive()||this._start(t)),t.preventDefault()}},gn.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(e)},gn.prototype._start=function(t){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new e.Event("movestart",{originalEvent:t})),this._map.fire(new e.Event("zoomstart",{originalEvent:t}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var n=r.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},gn.prototype._onScrollFrame=function(){var t=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,a=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==a&&(a=1/a);var i="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(i*a))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,u=!1;if("wheel"===this._type&&s&&l){var c=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),d=l(c);r.zoom=e.number(s,o,d),c<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):u=!0}else r.zoom=o,u=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new e.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new e.Event("zoom",{originalEvent:this._lastWheelEvent})),u&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._map.fire(new e.Event("zoomend",{originalEvent:t._lastWheelEvent})),t._map.fire(new e.Event("moveend",{originalEvent:t._lastWheelEvent})),delete t._targetZoom}),200))}},gn.prototype._smoothOutEasing=function(t){var r=e.ease;if(this._prevEase){var n=this._prevEase,a=(e.browser.now()-n.start)/n.duration,i=n.easing(a+.01)-n.easing(a),o=.27/Math.sqrt(i*i+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=e.bezier(o,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:r},r};var yn=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=r.clickTolerance||1,e.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};yn.prototype.isEnabled=function(){return!!this._enabled},yn.prototype.isActive=function(){return!!this._active},yn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},yn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yn.prototype.onMouseDown=function(t){this.isEnabled()&&t.shiftKey&&0===t.button&&(e.window.document.addEventListener("mousemove",this._onMouseMove,!1),e.window.document.addEventListener("keydown",this._onKeyDown,!1),e.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,t),this._active=!0)},yn.prototype._onMouseMove=function(e){var t=r.mousePos(this._el,e);if(!(this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)180&&(h=180);var f=h/180;u+=d*h*(f/2),Math.abs(r._normalizeBearing(u,0))0&&r-t[0][0]>160;)t.shift()};var bn=e.bezier(0,0,.3,1),xn=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,e.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};xn.prototype.isEnabled=function(){return"disabled"!==this._state},xn.prototype.isActive=function(){return"active"===this._state},xn.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},xn.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},xn.prototype.onMouseDown=function(t){"enabled"===this._state&&(t.ctrlKey||0!==r.mouseButton(t)||(r.addEventListener(e.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(e.window.document,"mouseup",this._onMouseUp),this._start(t)))},xn.prototype.onTouchStart=function(t){"enabled"===this._state&&(t.touches.length>1||(r.addEventListener(e.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(e.window.document,"touchend",this._onTouchEnd),this._start(t)))},xn.prototype._start=function(t){e.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._prevPos=this._lastPos=r.mousePos(this._el,t),this._inertia=[[e.browser.now(),this._startPos]]},xn.prototype._onMove=function(t){t.preventDefault();var n=r.mousePos(this._el,t);this._lastPos.equals(n)||"pending"===this._state&&n.dist(this._mouseDownPos)1400&&(s=1400,o._unit()._mult(s));var l=s/750,u=o.mult(-l/2);this._map.panBy(u,{duration:1e3*l,easing:bn,noMoveStart:!0},{originalEvent:e})}}},xn.prototype._fireEvent=function(t,r){return this._map.fire(new e.Event(t,r?{originalEvent:r}:{}))},xn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,r=e.browser.now();t.length>0&&r-t[0][0]>160;)t.shift()};var wn=function(t){this._map=t,this._el=t.getCanvasContainer(),e.bindAll(["_onKeyDown"],this)};function kn(e){return e*(2-e)}wn.prototype.isEnabled=function(){return!!this._enabled},wn.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},wn.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},wn.prototype._onKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=0,r=0,n=0,a=0,i=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),i=-1);break;case 40:e.shiftKey?n=-1:(i=1,e.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:kn,zoom:t?Math.round(s)+t*(e.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-a,100*-i],center:o.getCenter()};o.easeTo(l,{originalEvent:e})}};var Mn=function(t){this._map=t,e.bindAll(["_onDblClick","_onZoomEnd"],this)};Mn.prototype.isEnabled=function(){return!!this._enabled},Mn.prototype.isActive=function(){return!!this._active},Mn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Mn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Mn.prototype.onTouchStart=function(e){var t=this;if(this.isEnabled()&&!(e.points.length>1))if(this._tapped){var r=e.points[0],n=this._tappedPoint;if(n&&n.dist(r)<=30){e.originalEvent.preventDefault();var a=function(){t._tapped&&t._zoom(e),t._map.off("touchcancel",i),t._resetTapped()},i=function(){t._map.off("touchend",a),t._resetTapped()};this._map.once("touchend",a),this._map.once("touchcancel",i)}else this._resetTapped()}else this._tappedPoint=e.points[0],this._tapped=setTimeout((function(){t._tapped=null,t._tappedPoint=null}),300)},Mn.prototype._resetTapped=function(){clearTimeout(this._tapped),this._tapped=null,this._tappedPoint=null},Mn.prototype.onDblClick=function(e){this.isEnabled()&&(e.originalEvent.preventDefault(),this._zoom(e))},Mn.prototype._zoom=function(e){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(e.originalEvent.shiftKey?-1:1),{around:e.lngLat},e)},Mn.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Tn=e.bezier(0,0,.15,1),Sn=function(t){this._map=t,this._el=t.getCanvasContainer(),e.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};Sn.prototype.isEnabled=function(){return!!this._enabled},Sn.prototype.enable=function(e){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)},Sn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},Sn.prototype.disableRotation=function(){this._rotationDisabled=!0},Sn.prototype.enableRotation=function(){this._rotationDisabled=!1},Sn.prototype.onStart=function(t){if(this.isEnabled()&&2===t.touches.length){var n=r.mousePos(this._el,t.touches[0]),a=r.mousePos(this._el,t.touches[1]),i=n.add(a).div(2);this._startVec=n.sub(a),this._startAround=this._map.transform.pointLocation(i),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(e.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(e.window.document,"touchend",this._onEnd)}},Sn.prototype._getTouchEventData=function(e){var t=r.mousePos(this._el,e.touches[0]),n=r.mousePos(this._el,e.touches[1]),a=t.sub(n);return{vec:a,center:t.add(n).div(2),scale:a.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI}},Sn.prototype._onMove=function(t){if(2===t.touches.length){var r=this._getTouchEventData(t),n=r.vec,a=r.scale,i=r.bearing;if(!this._gestureIntent){var o=this._rotationDisabled&&1!==a||Math.abs(1-a)>.15;Math.abs(i)>10?this._gestureIntent="rotate":o&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new e.Event(this._gestureIntent+"start",{originalEvent:t})),this._map.fire(new e.Event("movestart",{originalEvent:t})),this._startVec=n)}this._lastTouchEvent=t,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),t.preventDefault()}},Sn.prototype._onTouchFrame=function(){this._frameId=null;var t=this._gestureIntent;if(t){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),a=n.center,i=n.bearing,o=n.scale,s=r.pointLocation(a),l=r.locationPoint(s);"rotate"===t&&(r.bearing=this._startBearing+i),r.zoom=r.scaleZoom(this._startScale*o),r.setLocationAtPoint(this._startAround,l),this._map.fire(new e.Event(t,{originalEvent:this._lastTouchEvent})),this._map.fire(new e.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([e.browser.now(),o,a])}},Sn.prototype._onEnd=function(t){r.removeEventListener(e.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(e.window.document,"touchend",this._onEnd);var n=this._gestureIntent,a=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new e.Event(n+"end",{originalEvent:t})),this._drainInertiaBuffer();var i=this._inertia,o=this._map;if(i.length<2)o.snapToNorth({},{originalEvent:t});else{var s=i[i.length-1],l=i[0],u=o.transform.scaleZoom(a*s[1]),c=o.transform.scaleZoom(a*l[1]),d=u-c,p=(s[0]-l[0])/1e3,h=s[2];if(0!==p&&u!==c){var f=.15*d/p;Math.abs(f)>2.5&&(f=f>0?2.5:-2.5);var m=1e3*Math.abs(f/(12*.15)),g=u+f*m/2e3;g<0&&(g=0),o.easeTo({zoom:g,duration:m,easing:Tn,around:this._aroundCenter?o.getCenter():o.unproject(h),noMoveStart:!0},{originalEvent:t})}else o.snapToNorth({},{originalEvent:t})}}},Sn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,r=e.browser.now();t.length>2&&r-t[0][0]>160;)t.shift()};var Cn={scrollZoom:gn,boxZoom:yn,dragRotate:_n,dragPan:xn,keyboard:wn,doubleClickZoom:Mn,touchZoomRotate:Sn},Ln=function(t){function r(r,n){t.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(e,t){return this.jumpTo({center:e},t)},r.prototype.panBy=function(t,r,n){return t=e.Point.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},r),n)},r.prototype.panTo=function(t,r,n){return this.easeTo(e.extend({center:t},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(e,t){return this.jumpTo({zoom:e},t),this},r.prototype.zoomTo=function(t,r,n){return this.easeTo(e.extend({zoom:t},r),n)},r.prototype.zoomIn=function(e,t){return this.zoomTo(this.getZoom()+1,e,t),this},r.prototype.zoomOut=function(e,t){return this.zoomTo(this.getZoom()-1,e,t),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(e,t){return this.jumpTo({bearing:e},t),this},r.prototype.rotateTo=function(t,r,n){return this.easeTo(e.extend({bearing:t},r),n)},r.prototype.resetNorth=function(t,r){return this.rotateTo(0,e.extend({duration:1e3},t),r),this},r.prototype.resetNorthPitch=function(t,r){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),r),this},r.prototype.snapToNorth=function(e,t){return Math.abs(this.getBearing())t?1:0})),["bottom","left","right","top"])){var o=this.transform,s=o.project(e.LngLat.convert(t)),l=o.project(e.LngLat.convert(r)),u=s.rotate(-n*Math.PI/180),c=l.rotate(-n*Math.PI/180),d=new e.Point(Math.max(u.x,c.x),Math.max(u.y,c.y)),p=new e.Point(Math.min(u.x,c.x),Math.min(u.y,c.y)),h=d.sub(p),f=(o.width-a.padding.left-a.padding.right)/h.x,m=(o.height-a.padding.top-a.padding.bottom)/h.y;if(!(m<0||f<0)){var g=Math.min(o.scaleZoom(o.scale*Math.min(f,m)),a.maxZoom),y=e.Point.convert(a.offset),v=(a.padding.left-a.padding.right)/2,_=(a.padding.top-a.padding.bottom)/2,b=new e.Point(y.x+v,y.y+_).mult(o.scale/o.zoomScale(g));return{center:o.unproject(s.add(l).div(2).sub(b)),zoom:g,bearing:n}}e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else e.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(e,t,r){return this._fitInternal(this.cameraForBounds(e,t),t,r)},r.prototype.fitScreenCoordinates=function(t,r,n,a,i){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(t)),this.transform.pointLocation(e.Point.convert(r)),n,a),a,i)},r.prototype._fitInternal=function(t,r,n){return t?(r=e.extend(t,r)).linear?this.easeTo(r,n):this.flyTo(r,n):this},r.prototype.jumpTo=function(t,r){this.stop();var n=this.transform,a=!1,i=!1,o=!1;return"zoom"in t&&n.zoom!==+t.zoom&&(a=!0,n.zoom=+t.zoom),void 0!==t.center&&(n.center=e.LngLat.convert(t.center)),"bearing"in t&&n.bearing!==+t.bearing&&(i=!0,n.bearing=+t.bearing),"pitch"in t&&n.pitch!==+t.pitch&&(o=!0,n.pitch=+t.pitch),this.fire(new e.Event("movestart",r)).fire(new e.Event("move",r)),a&&this.fire(new e.Event("zoomstart",r)).fire(new e.Event("zoom",r)).fire(new e.Event("zoomend",r)),i&&this.fire(new e.Event("rotatestart",r)).fire(new e.Event("rotate",r)).fire(new e.Event("rotateend",r)),o&&this.fire(new e.Event("pitchstart",r)).fire(new e.Event("pitch",r)).fire(new e.Event("pitchend",r)),this.fire(new e.Event("moveend",r))},r.prototype.easeTo=function(t,r){var n=this;this.stop(),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||e.browser.prefersReducedMotion)&&(t.duration=0);var a=this.transform,i=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in t?+t.zoom:i,u="bearing"in t?this._normalizeBearing(t.bearing,o):o,c="pitch"in t?+t.pitch:s,d=a.centerPoint.add(e.Point.convert(t.offset)),p=a.pointLocation(d),h=e.LngLat.convert(t.center||p);this._normalizeCenter(h);var f,m,g=a.project(p),y=a.project(h).sub(g),v=a.zoomScale(l-i);return t.around&&(f=e.LngLat.convert(t.around),m=a.locationPoint(f)),this._zooming=l!==i,this._rotating=o!==u,this._pitching=c!==s,this._prepareEase(r,t.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease((function(t){if(n._zooming&&(a.zoom=e.number(i,l,t)),n._rotating&&(a.bearing=e.number(o,u,t)),n._pitching&&(a.pitch=e.number(s,c,t)),f)a.setLocationAtPoint(f,m);else{var p=a.zoomScale(a.zoom-i),h=l>i?Math.min(2,v):Math.max(.5,v),_=Math.pow(h,1-t),b=a.unproject(g.add(y.mult(t*_)).mult(p));a.setLocationAtPoint(a.renderWorldCopies?b.wrap():b,d)}n._fireMoveEvents(r)}),(function(){t.delayEndEvents?n._easeEndTimeoutID=setTimeout((function(){return n._afterEase(r)}),t.delayEndEvents):n._afterEase(r)}),t),this},r.prototype._prepareEase=function(t,r){this._moving=!0,r||this.fire(new e.Event("movestart",t)),this._zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&this.fire(new e.Event("pitchstart",t))},r.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},r.prototype._afterEase=function(t){var r=this._zooming,n=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new e.Event("zoomend",t)),n&&this.fire(new e.Event("rotateend",t)),a&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))},r.prototype.flyTo=function(t,r){var n=this;if(e.browser.prefersReducedMotion){var a=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(a,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var i=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u="zoom"in t?e.clamp(+t.zoom,i.minZoom,i.maxZoom):o,c="bearing"in t?this._normalizeBearing(t.bearing,s):s,d="pitch"in t?+t.pitch:l,p=i.zoomScale(u-o),h=i.centerPoint.add(e.Point.convert(t.offset)),f=i.pointLocation(h),m=e.LngLat.convert(t.center||f);this._normalizeCenter(m);var g=i.project(f),y=i.project(m).sub(g),v=t.curve,_=Math.max(i.width,i.height),b=_/p,x=y.mag();if("minZoom"in t){var w=e.clamp(Math.min(t.minZoom,o,u),i.minZoom,i.maxZoom),k=_/i.zoomScale(w-o);v=Math.sqrt(k/x*2)}var M=v*v;function T(e){var t=(b*b-_*_+(e?-1:1)*M*M*x*x)/(2*(e?b:_)*M*x);return Math.log(Math.sqrt(t*t+1)-t)}function S(e){return(Math.exp(e)-Math.exp(-e))/2}function C(e){return(Math.exp(e)+Math.exp(-e))/2}var L=T(0),A=function(e){return C(L)/C(L+v*e)},E=function(e){return _*((C(L)*(S(t=L+v*e)/C(t))-S(L))/M)/x;var t},D=(T(1)-L)/v;if(Math.abs(x)<1e-6||!isFinite(D)){if(Math.abs(_-b)<1e-6)return this.easeTo(t,r);var P=b<_?-1:1;D=Math.abs(Math.log(b/_))/v,E=function(){return 0},A=function(e){return Math.exp(P*v*e)}}if("duration"in t)t.duration=+t.duration;else{var I="screenSpeed"in t?+t.screenSpeed/v:+t.speed;t.duration=1e3*D/I}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==c,this._pitching=d!==l,this._prepareEase(r,!1),this._ease((function(t){var a=t*D,p=1/A(a);i.zoom=1===t?u:o+i.scaleZoom(p),n._rotating&&(i.bearing=e.number(s,c,t)),n._pitching&&(i.pitch=e.number(l,d,t));var f=1===t?m:i.unproject(g.add(y.mult(E(a))).mult(p));i.setLocationAtPoint(i.renderWorldCopies?f.wrap():f,h),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),t),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var e=this._onEaseEnd;delete this._onEaseEnd,e.call(this)}return this},r.prototype._ease=function(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(t,r){t=e.wrap(t,-180,180);var n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}},r}(e.Evented),An=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};An.prototype.getDefaultPosition=function(){return"bottom-right"},An.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},An.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},An.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var n=r.reduce((function(e,t,n){return t.value&&(e+=t.key+"="+t.value+(n=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,e.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},An.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var En=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};En.prototype.onAdd=function(e){this._map=e,this._container=r.create("div","mapboxgl-ctrl");var t=r.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label","Mapbox logo"),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},En.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},En.prototype.getDefaultPosition=function(){return"bottom-left"},En.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},En.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},En.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Dn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Dn.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Dn.prototype.remove=function(e){for(var t=this._currentlyRunning,r=0,n=t?this._queue.concat(t):this._queue;rt.maxZoom)throw new Error("maxZoom must be greater than minZoom");var i=new cn(t.minZoom,t.maxZoom,t.renderWorldCopies);if(n.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=e.uniqueId(),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof In))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return a._update(!1)})),this.on("moveend",(function(){return a._update(!1)})),this.on("zoom",(function(){return a._update(!0)})),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),function(e,t){var n=e.getCanvasContainer(),a=null,i=!1,o=null;for(var s in Cn)e[s]=new Cn[s](e,t),t.interactive&&t[s]&&e[s].enable(t[s]);r.addEventListener(n,"mouseout",(function(t){e.fire(new hn("mouseout",e,t))})),r.addEventListener(n,"mousedown",(function(a){i=!0,o=r.mousePos(n,a);var s=new hn("mousedown",e,a);e.fire(s),s.defaultPrevented||(t.interactive&&!e.doubleClickZoom.isActive()&&e.stop(),e.boxZoom.onMouseDown(a),e.boxZoom.isActive()||e.dragPan.isActive()||e.dragRotate.onMouseDown(a),e.boxZoom.isActive()||e.dragRotate.isActive()||e.dragPan.onMouseDown(a))})),r.addEventListener(n,"mouseup",(function(t){var r=e.dragRotate.isActive();a&&!r&&e.fire(new hn("contextmenu",e,a)),a=null,i=!1,e.fire(new hn("mouseup",e,t))})),r.addEventListener(n,"mousemove",(function(t){if(!e.dragPan.isActive()&&!e.dragRotate.isActive()){for(var r=t.target;r&&r!==n;)r=r.parentNode;r===n&&e.fire(new hn("mousemove",e,t))}})),r.addEventListener(n,"mouseover",(function(t){for(var r=t.target;r&&r!==n;)r=r.parentNode;r===n&&e.fire(new hn("mouseover",e,t))})),r.addEventListener(n,"touchstart",(function(r){var n=new fn("touchstart",e,r);e.fire(n),n.defaultPrevented||(t.interactive&&e.stop(),e.boxZoom.isActive()||e.dragRotate.isActive()||e.dragPan.onTouchStart(r),e.touchZoomRotate.onStart(r),e.doubleClickZoom.onTouchStart(n))}),{passive:!1}),r.addEventListener(n,"touchmove",(function(t){e.fire(new fn("touchmove",e,t))}),{passive:!1}),r.addEventListener(n,"touchend",(function(t){e.fire(new fn("touchend",e,t))})),r.addEventListener(n,"touchcancel",(function(t){e.fire(new fn("touchcancel",e,t))})),r.addEventListener(n,"click",(function(a){var i=r.mousePos(n,a);(!o||i.equals(o)||i.dist(o)-1&&this._controls.splice(r,1),t.onRemove(this),this},a.prototype.resize=function(t){var r=this._containerDimensions(),n=r[0],a=r[1];return this._resizeCanvas(n,a),this.transform.resize(n,a),this.painter.resize(n,a),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t)).fire(new e.Event("resize",t)).fire(new e.Event("moveend",t)),this},a.prototype.getBounds=function(){return this.transform.getBounds()},a.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},a.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},a.prototype.setMinZoom=function(e){if((e=null==e?0:e)>=0&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},a.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},a.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},a.prototype.getMaxZoom=function(){return this.transform.maxZoom},a.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},a.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},a.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},a.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},a.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},a.prototype.on=function(e,t,r){var a=this;if(void 0===r)return n.prototype.on.call(this,e,t);var i=function(){var n;if("mouseenter"===e||"mouseover"===e){var i=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){var o=a.getLayer(t)?a.queryRenderedFeatures(n.point,{layers:[t]}):[];o.length?i||(i=!0,r.call(a,new hn(e,a,n.originalEvent,{features:o}))):i=!1},mouseout:function(){i=!1}}}}if("mouseleave"===e||"mouseout"===e){var o=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){(a.getLayer(t)?a.queryRenderedFeatures(n.point,{layers:[t]}):[]).length?o=!0:o&&(o=!1,r.call(a,new hn(e,a,n.originalEvent)))},mouseout:function(t){o&&(o=!1,r.call(a,new hn(e,a,t.originalEvent)))}}}}return{layer:t,listener:r,delegates:(n={},n[e]=function(e){var n=a.getLayer(t)?a.queryRenderedFeatures(e.point,{layers:[t]}):[];n.length&&(e.features=n,r.call(a,e),delete e.features)},n)}}();for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(o,i.delegates[o]);return this},a.prototype.off=function(e,t,r){if(void 0===r)return n.prototype.off.call(this,e,t);if(this._delegatedListeners&&this._delegatedListeners[e])for(var a=this._delegatedListeners[e],i=0;i180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Nn.prototype._updateZoomButtons=function(){var e=this._map.getZoom();e===this._map.getMaxZoom()?this._zoomInButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomInButton.classList.remove("mapboxgl-ctrl-icon-disabled"),e===this._map.getMinZoom()?this._zoomOutButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomOutButton.classList.remove("mapboxgl-ctrl-icon-disabled")},Nn.prototype._rotateCompassArrow=function(){var e=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=e},Nn.prototype.onAdd=function(e){return this._map=e,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new _n(e,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.addEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.enable()),this._container},Nn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.removeEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.disable(),delete this._handler),delete this._map},Nn.prototype._createButton=function(e,t,n){var a=r.create("button",e,this._container);return a.type="button",a.title=t,a.setAttribute("aria-label",t),a.addEventListener("click",n),a};var jn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Yn(e,t,r){var n=e.classList;for(var a in jn)n.remove("mapboxgl-"+r+"-anchor-"+a);n.add("mapboxgl-"+r+"-anchor-"+t)}var Hn,Vn=function(t){function n(n,a){if(t.call(this),(n instanceof e.window.HTMLElement||a)&&(n=e.extend({element:n},a)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._draggable=n&&n.draggable||!1,this._state="inactive",n&&n.element)this._element=n.element,this._offset=e.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var i=r.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var u=0,c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];u5280?Zn(t,u,p/5280,"mi"):Zn(t,u,p,"ft")}else r&&"nautical"===r.unit?Zn(t,u,d/1852,"nm"):Zn(t,u,d,"m")}function Zn(e,t,r,n){var a,i,o,s=(a=r,(i=Math.pow(10,(""+Math.floor(a)).length-1))*(o=(o=a/i)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(o))),l=s/r;"m"===n&&s>=1e3&&(s/=1e3,n="km"),e.style.width=t*l+"px",e.innerHTML=s+n}Gn.prototype.getDefaultPosition=function(){return"bottom-left"},Gn.prototype._onMove=function(){Kn(this._map,this._container,this.options)},Gn.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Gn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Gn.prototype.setUnit=function(e){this.options.unit=e,Kn(this._map,this._container,this.options)};var Xn=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Xn.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Xn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Xn.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Xn.prototype._setupUI=function(){(this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Xn.prototype._updateTitle=function(){var e=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},Xn.prototype._isFullscreen=function(){return this._fullscreen},Xn.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},Xn.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Jn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},$n=function(t){function n(r){t.call(this),this.options=e.extend(Object.create(Jn),r),e.bindAll(["_update","_onClickClose","remove"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){var r=this;return this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",(function(e){r._update(e.point)})),this._map.on("mouseup",(function(e){r._update(e.point)})),this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),this._map.off("remove",this.remove),this._map.off("mousemove"),delete this._map),this.fire(new e.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove"),this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){var e=this;return this._trackPointer=!0,this._pos=null,this._map&&(this._map.off("move",this._update),this._map.on("mousemove",(function(t){e._update(t.point)})),this._map.on("drag",(function(t){e._update(t.point)})),this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},n.prototype.setHTML=function(t){var r,n=e.window.document.createDocumentFragment(),a=e.window.document.createElement("body");for(a.innerHTML=t;r=a.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container.style.maxWidth},n.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},n.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},n.prototype._update=function(t){var n=this,a=this._lngLat||this._trackPointer;if(this._map&&a&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return n._container.classList.add(e)}))),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Bn(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)){var i=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),o=this.options.anchor,s=function t(r){if(r){if("number"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new e.Point(0,0),top:new e.Point(0,r),"top-left":new e.Point(n,n),"top-right":new e.Point(-n,n),bottom:new e.Point(0,-r),"bottom-left":new e.Point(n,-n),"bottom-right":new e.Point(-n,-n),left:new e.Point(r,0),right:new e.Point(-r,0)}}if(r instanceof e.Point||Array.isArray(r)){var a=e.Point.convert(r);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}return{center:e.Point.convert(r.center||[0,0]),top:e.Point.convert(r.top||[0,0]),"top-left":e.Point.convert(r["top-left"]||[0,0]),"top-right":e.Point.convert(r["top-right"]||[0,0]),bottom:e.Point.convert(r.bottom||[0,0]),"bottom-left":e.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(r["bottom-right"]||[0,0]),left:e.Point.convert(r.left||[0,0]),right:e.Point.convert(r.right||[0,0])}}return t(new e.Point(0,0))}(this.options.offset);if(!o){var l,u=this._container.offsetWidth,c=this._container.offsetHeight;l=i.y+s.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-u/2&&l.push("right"),o=0===l.length?"bottom":l.join("-")}var d=i.add(s[o]).round();r.setTransform(this._container,jn[o]+" translate("+d.x+"px,"+d.y+"px)"),Yn(this._container,o,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(e.Evented),Qn={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,Map:Fn,NavigationControl:Nn,GeolocateControl:Wn,AttributionControl:An,ScaleControl:Gn,FullscreenControl:Xn,Popup:$n,Marker:Vn,Style:Rt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Oe.workerCount},set workerCount(e){Oe.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return Qn})),r}))},{}],428:[function(e,t,r){"use strict";t.exports=function(e){for(var t=1<h[1][2]&&(y[0]=-y[0]),h[0][2]>h[2][0]&&(y[1]=-y[1]),h[1][0]>h[0][1]&&(y[2]=-y[2]),!0}},{"./normalize":430,"gl-mat4/clone":261,"gl-mat4/create":262,"gl-mat4/determinant":263,"gl-mat4/invert":267,"gl-mat4/transpose":278,"gl-vec3/cross":335,"gl-vec3/dot":340,"gl-vec3/length":350,"gl-vec3/normalize":357}],430:[function(e,t,r){t.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var n=1/r,a=0;a<16;a++)e[a]=t[a]*n;return!0}},{}],431:[function(e,t,r){var n=e("gl-vec3/lerp"),a=e("mat4-recompose"),i=e("mat4-decompose"),o=e("gl-mat4/determinant"),s=e("quat-slerp"),l=d(),u=d(),c=d();function d(){return{translate:p(),scale:p(1),skew:p(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function p(e){return[e||0,e||0,e||0]}t.exports=function(e,t,r,d){if(0===o(t)||0===o(r))return!1;var p=i(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),h=i(r,u.translate,u.scale,u.skew,u.perspective,u.quaternion);return!(!p||!h||(n(c.translate,l.translate,u.translate,d),n(c.skew,l.skew,u.skew,d),n(c.scale,l.scale,u.scale,d),n(c.perspective,l.perspective,u.perspective,d),s(c.quaternion,l.quaternion,u.quaternion,d),a(e,c.translate,c.scale,c.skew,c.perspective,c.quaternion),0))}},{"gl-mat4/determinant":263,"gl-vec3/lerp":351,"mat4-decompose":429,"mat4-recompose":432,"quat-slerp":484}],432:[function(e,t,r){var n={identity:e("gl-mat4/identity"),translate:e("gl-mat4/translate"),multiply:e("gl-mat4/multiply"),create:e("gl-mat4/create"),scale:e("gl-mat4/scale"),fromRotationTranslation:e("gl-mat4/fromRotationTranslation")},a=(n.create(),n.create());t.exports=function(e,t,r,i,o,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],n.identity(a),0!==i[2]&&(a[9]=i[2],n.multiply(e,e,a)),0!==i[1]&&(a[9]=0,a[8]=i[1],n.multiply(e,e,a)),0!==i[0]&&(a[8]=0,a[4]=i[0],n.multiply(e,e,a)),n.scale(e,e,r),e}},{"gl-mat4/create":262,"gl-mat4/fromRotationTranslation":265,"gl-mat4/identity":266,"gl-mat4/multiply":269,"gl-mat4/scale":276,"gl-mat4/translate":277}],433:[function(e,t,r){"use strict";t.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}},{}],434:[function(e,t,r){"use strict";var n=e("binary-search-bounds"),a=e("mat4-interpolate"),i=e("gl-mat4/invert"),o=e("gl-mat4/rotateX"),s=e("gl-mat4/rotateY"),l=e("gl-mat4/rotateZ"),u=e("gl-mat4/lookAt"),c=e("gl-mat4/translate"),d=(e("gl-mat4/scale"),e("gl-vec3/normalize")),p=[0,0,0];function h(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(e){return new h((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var f=h.prototype;f.recalcMatrix=function(e){var t=this._time,r=n.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,u=0;u<16;++u)o[u]=s[l++];else{var c=t[r+1]-t[r],p=(l=16*r,this.prevMatrix),h=!0;for(u=0;u<16;++u)p[u]=s[l++];var f=this.nextMatrix;for(u=0;u<16;++u)f[u]=s[l++],h=h&&p[u]===f[u];if(c<1e-6||h)for(u=0;u<16;++u)o[u]=p[u];else a(o,p,f,(e-t[r])/c)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],d(m,m);var g=this.computedInverse;i(g,o);var y=this.computedEye,v=g[15];y[0]=g[12]/v,y[1]=g[13]/v,y[2]=g[14]/v;var _=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(u=0;u<3;++u)_[u]=y[u]-o[2+4*u]*b}},f.idle=function(e){if(!(e1&&n(e[o[c-2]],e[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&n(e[s[c-2]],e[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var d=0,p=(a=0,o.length);a0;--h)r[d++]=s[h];return r};var n=e("robust-orientation")[3]},{"robust-orientation":508}],436:[function(e,t,r){"use strict";t.exports=function(e,t){t||(t=e,e=window);var r=0,a=0,i=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function u(e,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||u!==a||c!==i||l(s))&&(r=0|e,a=u||0,i=c||0,t&&t(r,a,i,o))}function c(e){u(0,e)}function d(){(r||a||i||o.shift||o.alt||o.meta||o.control)&&(a=i=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function p(e){l(e)&&t&&t(r,a,i,o)}function h(e){0===n.buttons(e)?u(0,e):u(r,e)}function f(e){u(r|n.buttons(e),e)}function m(e){u(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",f),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",c),e.addEventListener("mouseenter",c),e.addEventListener("mouseout",c),e.addEventListener("mouseover",c),e.addEventListener("blur",d),e.addEventListener("keyup",p),e.addEventListener("keydown",p),e.addEventListener("keypress",p),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",p),window.addEventListener("keydown",p),window.addEventListener("keypress",p)))}g();var y={element:e};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",f),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",c),e.removeEventListener("mouseenter",c),e.removeEventListener("mouseout",c),e.removeEventListener("mouseover",c),e.removeEventListener("blur",d),e.removeEventListener("keyup",p),e.removeEventListener("keydown",p),e.removeEventListener("keypress",p),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",p),window.removeEventListener("keydown",p),window.removeEventListener("keypress",p)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return i},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var n=e("mouse-event")},{"mouse-event":438}],437:[function(e,t,r){var n={left:0,top:0};t.exports=function(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var a,i=e.clientX||0,o=e.clientY||0,s=(a=t)===window||a===document||a===document.body?n:a.getBoundingClientRect();return r[0]=i-s.left,r[1]=o-s.top,r}},{}],438:[function(e,t,r){"use strict";function n(e){return e.target||e.srcElement||window}r.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1< 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var L=e.getters||[],A=new Array(S),E=0;E=0?A[E]=!0:A[E]=!1;return function(e,t,r,S,C,L){var A=L.length,E=C.length;if(E<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var D="extractContour"+C.join("_"),P=[],I=[],O=[],F=0;F0&&B.push(l(F,C[R-1])+"*"+s(C[R-1])),I.push(f(F,C[R])+"=("+B.join("-")+")|0")}for(F=0;F=0;--F)j.push(s(C[F]));for(I.push(w+"=("+j.join("*")+")|0",b+"=mallocUint32("+w+")",_+"=mallocUint32("+w+")",k+"=0"),I.push(m(0)+"=0"),R=1;R<1<0;M=M-1&f)w.push(_+"["+k+"+"+y(M)+"]");for(w.push(v(0)),M=0;M=0;--t)W(t,0);var r=[];for(t=0;t0){",h(C[t]),"=1;"),e(t-1,r|1<=0?s.push("0"):t.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),i.push("1"),o.push("s["+l+"]-2"));var u=".lo("+i.join()+").hi("+o.join()+")";if(0===i.length&&(u=""),a>0){for(n.push("if(1"),l=0;l=0||t.indexOf(-(l+1))>=0||n.push("&&s[",l,"]>2");for(n.push("){grad",a,"(src.pick(",s.join(),")",u),l=0;l=0||t.indexOf(-(l+1))>=0||n.push(",dst.pick(",s.join(),",",l,")",u);n.push(");")}for(l=0;l1){dst.set(",s.join(),",",c,",0.5*(src.get(",p.join(),")-src.get(",h.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):n.push("if(s[",c,"]>1){diff(",d,",src.pick(",p.join(),")",u,",src.pick(",h.join(),")",u,");}else{zero(",d,");};");break;case"mirror":0===a?n.push("dst.set(",s.join(),",",c,",0);"):n.push("zero(",d,");");break;case"wrap":var f=s.slice(),m=s.slice();t[l]<0?(f[c]="s["+c+"]-2",m[c]="0"):(f[c]="s["+c+"]-1",m[c]="1"),0===a?n.push("if(s[",c,"]>2){dst.set(",s.join(),",",c,",0.5*(src.get(",f.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):n.push("if(s[",c,"]>2){diff(",d,",src.pick(",f.join(),")",u,",src.pick(",m.join(),")",u,");}else{zero(",d,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}a>0&&n.push("};")}for(var s=0;s<1<>",rrshift:">>>"};!function(){for(var e in s){var t=s[e];r[e]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),r[e+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+t+"=b"},rvalue:!0,funcName:e+"eq"}),r[e+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),r[e+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+t+"=s"},rvalue:!0,funcName:e+"seq"})}}();var l={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var e in l){var t=l[e];r[e]=o({args:["array","array"],body:{args:["a","b"],body:"a="+t+"b"},funcName:e}),r[e+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+t+"a"},rvalue:!0,count:2,funcName:e+"eq"})}}();var u={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var e in u){var t=u[e];r[e]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),r[e+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),r[e+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+t+"b"},rvalue:!0,count:2,funcName:e+"eq"}),r[e+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+t+"s"},rvalue:!0,count:2,funcName:e+"seq"})}}();var c=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var e=0;ethis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=n({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=n({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=n({args:["array","array"],pre:a,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":147}],446:[function(e,t,r){"use strict";var n=e("ndarray"),a=e("./doConvert.js");t.exports=function(e,t){for(var r=[],i=e,o=1;Array.isArray(i);)r.push(i.length),o*=i.length,i=i[0];return 0===r.length?n():(t||(t=n(new Float64Array(o),r)),a(t,e),t)}},{"./doConvert.js":447,ndarray:451}],447:[function(e,t,r){t.exports=e("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":147}],448:[function(e,t,r){"use strict";var n=e("typedarray-pool"),a=32;function i(e){switch(e){case"uint8":return[n.mallocUint8,n.freeUint8];case"uint16":return[n.mallocUint16,n.freeUint16];case"uint32":return[n.mallocUint32,n.freeUint32];case"int8":return[n.mallocInt8,n.freeInt8];case"int16":return[n.mallocInt16,n.freeInt16];case"int32":return[n.mallocInt32,n.freeInt32];case"float32":return[n.mallocFloat,n.freeFloat];case"float64":return[n.mallocDouble,n.freeDouble];default:return null}}function o(e){for(var t=[],r=0;r0?s.push(["d",f,"=s",f,"-d",d,"*n",d].join("")):s.push(["d",f,"=s",f].join("")),d=f),0!=(h=e.length-1-l)&&(p>0?s.push(["e",h,"=s",h,"-e",p,"*n",p,",f",h,"=",u[h],"-f",p,"*n",p].join("")):s.push(["e",h,"=s",h,",f",h,"=",u[h]].join("")),p=h)}r.push("var "+s.join(","));var m=["0","n0-1","data","offset"].concat(o(e.length));r.push(["if(n0<=",a,"){","insertionSort(",m.join(","),")}else{","quickSort(",m.join(","),")}"].join("")),r.push("}return "+n);var g=new Function("insertionSort","quickSort",r.join("\n")),y=function(e,t){var r=["'use strict'"],n=["ndarrayInsertionSort",e.join("d"),t].join(""),a=["left","right","data","offset"].concat(o(e.length)),s=i(t),l=["i,j,cptr,ptr=left*s0+offset"];if(e.length>1){for(var u=[],c=1;c1){for(r.push("dptr=0;sptr=ptr"),c=e.length-1;c>=0;--c)0!==(h=e[c])&&r.push(["for(i",h,"=0;i",h,"b){break __l}"].join("")),c=e.length-1;c>=1;--c)r.push("sptr+=e"+c,"dptr+=f"+c,"}");for(r.push("dptr=cptr;sptr=cptr-s0"),c=e.length-1;c>=0;--c)0!==(h=e[c])&&r.push(["for(i",h,"=0;i",h,"=0;--c)0!==(h=e[c])&&r.push(["for(i",h,"=0;i",h,"scratch)){",p("cptr",d("cptr-s0")),"cptr-=s0","}",p("cptr","scratch"));return r.push("}"),e.length>1&&s&&r.push("free(scratch)"),r.push("} return "+n),s?new Function("malloc","free",r.join("\n"))(s[0],s[1]):new Function(r.join("\n"))()}(e,t),v=function(e,t,r){var n=["'use strict'"],s=["ndarrayQuickSort",e.join("d"),t].join(""),l=["left","right","data","offset"].concat(o(e.length)),u=i(t),c=0;n.push(["function ",s,"(",l.join(","),"){"].join(""));var d=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(e.length>1){for(var p=[],h=1;h=0;--i)0!==(o=e[i])&&n.push(["for(i",o,"=0;i",o,"1)for(i=0;i1?n.push("ptr_shift+=d"+o):n.push("ptr0+=d"+o),n.push("}"))}}function v(t,r,a,i){if(1===r.length)n.push("ptr0="+f(r[0]));else{for(var o=0;o1)for(o=0;o=1;--o)a&&n.push("pivot_ptr+=f"+o),r.length>1?n.push("ptr_shift+=e"+o):n.push("ptr0+=e"+o),n.push("}")}function _(){e.length>1&&u&&n.push("free(pivot1)","free(pivot2)")}function b(t,r){var a="el"+t,i="el"+r;if(e.length>1){var o="__l"+ ++c;v(o,[a,i],!1,["comp=",m("ptr0"),"-",m("ptr1"),"\n","if(comp>0){tmp0=",a,";",a,"=",i,";",i,"=tmp0;break ",o,"}\n","if(comp<0){break ",o,"}"].join(""))}else n.push(["if(",m(f(a)),">",m(f(i)),"){tmp0=",a,";",a,"=",i,";",i,"=tmp0}"].join(""))}function x(t,r){e.length>1?y([t,r],!1,g("ptr0",m("ptr1"))):n.push(g(f(t),m(f(r))))}function w(t,r,a){if(e.length>1){var i="__l"+ ++c;v(i,[r],!0,[t,"=",m("ptr0"),"-pivot",a,"[pivot_ptr]\n","if(",t,"!==0){break ",i,"}"].join(""))}else n.push([t,"=",m(f(r)),"-pivot",a].join(""))}function k(t,r){e.length>1?y([t,r],!1,["tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1","tmp")].join("")):n.push(["ptr0=",f(t),"\n","ptr1=",f(r),"\n","tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1","tmp")].join(""))}function M(t,r,a){e.length>1?(y([t,r,a],!1,["tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1",m("ptr2")),"\n",g("ptr2","tmp")].join("")),n.push("++"+r,"--"+a)):n.push(["ptr0=",f(t),"\n","ptr1=",f(r),"\n","ptr2=",f(a),"\n","++",r,"\n","--",a,"\n","tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1",m("ptr2")),"\n",g("ptr2","tmp")].join(""))}function T(e,t){k(e,t),n.push("--"+t)}function S(t,r,a){e.length>1?y([t,r],!0,[g("ptr0",m("ptr1")),"\n",g("ptr1",["pivot",a,"[pivot_ptr]"].join(""))].join("")):n.push(g(f(t),m(f(r))),g(f(r),"pivot"+a))}function C(t,r){n.push(["if((",r,"-",t,")<=",a,"){\n","insertionSort(",t,",",r,",data,offset,",o(e.length).join(","),")\n","}else{\n",s,"(",t,",",r,",data,offset,",o(e.length).join(","),")\n","}"].join(""))}function L(t,r,a){e.length>1?(n.push(["__l",++c,":while(true){"].join("")),y([t],!0,["if(",m("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",c,"}"].join("")),n.push(a,"}")):n.push(["while(",m(f(t)),"===pivot",r,"){",a,"}"].join(""))}return n.push("var "+d.join(",")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),e.length>1?y(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",m("ptr1"),"\n","pivot2[pivot_ptr]=",m("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",m("ptr0"),"\n","y=",m("ptr2"),"\n","z=",m("ptr4"),"\n",g("ptr5","x"),"\n",g("ptr6","y"),"\n",g("ptr7","z")].join("")):n.push(["pivot1=",m(f("el2")),"\n","pivot2=",m(f("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",m(f("el1")),"\n","y=",m(f("el3")),"\n","z=",m(f("el5")),"\n",g(f("index1"),"x"),"\n",g(f("index3"),"y"),"\n",g(f("index5"),"z")].join("")),x("index2","left"),x("index4","right"),n.push("if(pivots_are_equal){"),n.push("for(k=less;k<=great;++k){"),w("comp","k",1),n.push("if(comp===0){continue}"),n.push("if(comp<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),n.push("while(true){"),w("comp","great",1),n.push("if(comp>0){"),n.push("great--"),n.push("}else if(comp<0){"),M("k","less","great"),n.push("break"),n.push("}else{"),T("k","great"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}else{"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2>0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp>0){"),n.push("if(--greatindex5){"),L("less",1,"++less"),L("great",2,"--great"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1===0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2===0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp===0){"),n.push("if(--great1&&u?new Function("insertionSort","malloc","free",n.join("\n"))(r,u[0],u[1]):new Function("insertionSort",n.join("\n"))(r)}(e,t,y);return g(y,v)}},{"typedarray-pool":543}],449:[function(e,t,r){"use strict";var n=e("./lib/compile_sort.js"),a={};t.exports=function(e){var t=e.order,r=e.dtype,i=[t,r].join(":"),o=a[i];return o||(a[i]=o=n(t,r)),o(e),e}},{"./lib/compile_sort.js":448}],450:[function(e,t,r){"use strict";var n=e("ndarray-linear-interpolate"),a=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_3_arg4_)}",args:[{name:"_inline_3_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_4_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_4_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),i=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});t.exports=function(e,t,r){switch(t.shape.length){case 1:i(e,r,n.d1,t);break;case 2:o(e,r,n.d2,t);break;case 3:s(e,r,n.d3,t);break;default:a(e,r,n.bind(void 0,t),t.shape.length)}return e}},{"cwise/lib/wrapper":150,"ndarray-linear-interpolate":444}],451:[function(e,t,r){var n=e("iota-array"),a=e("is-buffer"),i="undefined"!=typeof Float64Array;function o(e,t){return e[0]-t[0]}function s(){var e,t=this.stride,r=new Array(t.length);for(e=0;eMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===t&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+r+"_set("+l.join(",")+",v){"),a?i.push("return this.data.set("+c+",v)}"):i.push("return this.data["+c+"]=v}"),i.push("proto.get=function "+r+"_get("+l.join(",")+"){"),a?i.push("return this.data.get("+c+")}"):i.push("return this.data["+c+"]}"),i.push("proto.index=function "+r+"_index(",l.join(),"){return "+c+"}"),i.push("proto.hi=function "+r+"_hi("+l.join(",")+"){return new "+r+"(this.data,"+o.map((function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this.shape[",e,"]:i",e,"|0"].join("")})).join(",")+","+o.map((function(e){return"this.stride["+e+"]"})).join(",")+",this.offset)}");var h=o.map((function(e){return"a"+e+"=this.shape["+e+"]"})),f=o.map((function(e){return"c"+e+"=this.stride["+e+"]"}));i.push("proto.lo=function "+r+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+h.join(",")+","+f.join(","));for(var m=0;m=0){d=i"+m+"|0;b+=c"+m+"*d;a"+m+"-=d}");for(i.push("return new "+r+"(this.data,"+o.map((function(e){return"a"+e})).join(",")+","+o.map((function(e){return"c"+e})).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+l.join(",")+"){var "+o.map((function(e){return"a"+e+"=this.shape["+e+"]"})).join(",")+","+o.map((function(e){return"b"+e+"=this.stride["+e+"]"})).join(",")+",c=this.offset,d=0,ceil=Math.ceil"),m=0;m=0){c=(c+this.stride["+m+"]*i"+m+")|0}else{a.push(this.shape["+m+"]);b.push(this.stride["+m+"])}");return i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+o.map((function(e){return"shape["+e+"]"})).join(",")+","+o.map((function(e){return"stride["+e+"]"})).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",i.join("\n"))(u[e],s)}var u={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=function(e,t,r,n){if(void 0===e)return(0,u.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var o=t.length;if(void 0===r){r=new Array(o);for(var s=o-1,c=1;s>=0;--s)r[s]=c,c*=t[s]}if(void 0===n)for(n=0,s=0;s>>0;t.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-a:a;var r=n.hi(e),o=n.lo(e);return t>e==e>0?o===i?(r+=1,o=0):o+=1:0===o?(o=i,r-=1):o-=1,n.pack(o,r)}},{"double-bits":168}],453:[function(e,t,r){var n=Math.PI,a=u(120);function i(e,t,r,n){return["C",e,t,r,n,r,n]}function o(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}function s(e,t,r,i,o,u,c,d,p,h){if(h)k=h[0],M=h[1],x=h[2],w=h[3];else{var f=l(e,t,-o);e=f.x,t=f.y;var m=(e-(d=(f=l(d,p,-o)).x))/2,g=(t-(p=f.y))/2,y=m*m/(r*r)+g*g/(i*i);y>1&&(r*=y=Math.sqrt(y),i*=y);var v=r*r,_=i*i,b=(u==c?-1:1)*Math.sqrt(Math.abs((v*_-v*g*g-_*m*m)/(v*g*g+_*m*m)));b==1/0&&(b=1);var x=b*r*g/i+(e+d)/2,w=b*-i*m/r+(t+p)/2,k=Math.asin(((t-w)/i).toFixed(9)),M=Math.asin(((p-w)/i).toFixed(9));(k=eM&&(k-=2*n),!c&&M>k&&(M-=2*n)}if(Math.abs(M-k)>a){var T=M,S=d,C=p;M=k+a*(c&&M>k?1:-1);var L=s(d=x+r*Math.cos(M),p=w+i*Math.sin(M),r,i,o,0,c,S,C,[M,T,x,w])}var A=Math.tan((M-k)/4),E=4/3*r*A,D=4/3*i*A,P=[2*e-(e+E*Math.sin(k)),2*t-(t-D*Math.cos(k)),d+E*Math.sin(M),p-D*Math.cos(M),d,p];if(h)return P;L&&(P=P.concat(L));for(var I=0;I7&&(r.push(y.splice(0,7)),y.unshift("C"));break;case"S":var _=h,b=f;"C"!=t&&"S"!=t||(_+=_-n,b+=b-a),y=["C",_,b,y[1],y[2],y[3],y[4]];break;case"T":"Q"==t||"T"==t?(d=2*h-d,p=2*f-p):(d=h,p=f),y=o(h,f,d,p,y[1],y[2]);break;case"Q":d=y[1],p=y[2],y=o(h,f,y[1],y[2],y[3],y[4]);break;case"L":y=i(h,f,y[1],y[2]);break;case"H":y=i(h,f,y[1],f);break;case"V":y=i(h,f,h,y[1]);break;case"Z":y=i(h,f,l,c)}t=v,h=y[y.length-2],f=y[y.length-1],y.length>4?(n=y[y.length-4],a=y[y.length-3]):(n=h,a=f),r.push(y)}return r}},{}],454:[function(e,t,r){r.vertexNormals=function(e,t,r){for(var n=t.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;oi){var b=a[u],x=1/Math.sqrt(g*v);for(_=0;_<3;++_){var w=(_+1)%3,k=(_+2)%3;b[_]+=x*(y[w]*m[k]-y[k]*m[w])}}}for(o=0;oi)for(x=1/Math.sqrt(M),_=0;_<3;++_)b[_]*=x;else for(_=0;_<3;++_)b[_]=0}return a},r.faceNormals=function(e,t,r){for(var n=e.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;oi?1/Math.sqrt(h):0,u=0;u<3;++u)p[u]*=h;a[o]=p}return a}},{}],455:[function(e,t,r){ /* object-assign (c) Sindre Sorhus @license MIT */ "use strict";var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,s,l=o(e),u=1;u0){var d=Math.sqrt(c+1);e[0]=.5*(o-l)/d,e[1]=.5*(s-n)/d,e[2]=.5*(r-i)/d,e[3]=.5*d}else{var p=Math.max(t,i,u);d=Math.sqrt(2*p-c+1),t>=p?(e[0]=.5*d,e[1]=.5*(a+r)/d,e[2]=.5*(s+n)/d,e[3]=.5*(o-l)/d):i>=p?(e[0]=.5*(r+a)/d,e[1]=.5*d,e[2]=.5*(l+o)/d,e[3]=.5*(s-n)/d):(e[0]=.5*(n+s)/d,e[1]=.5*(o+l)/d,e[2]=.5*d,e[3]=.5*(r-a)/d)}return e}},{}],457:[function(e,t,r){"use strict";t.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],n=e.radius||1;t=[].slice.call(t,0,3),c(r=[].slice.call(r,0,4),r);var a=new d(r,t,Math.log(n));return a.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&a.lookAt(0,e.eye,e.center,e.up),a};var n=e("filtered-vector"),a=e("gl-mat4/lookAt"),i=e("gl-mat4/fromQuat"),o=e("gl-mat4/invert"),s=e("./lib/quatFromFrame");function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e,t,r,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(n,2))}function c(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=u(r,n,a,i);o>1e-6?(e[0]=r/o,e[1]=n/o,e[2]=a/o,e[3]=i/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function d(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var p=d.prototype;p.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},p.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;c(t,t);var r=this.computedMatrix;i(r,t);var n=this.computedCenter,a=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);a[0]=n[0]+s*r[2],a[1]=n[1]+s*r[6],a[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,d=0;d<3;++d)u+=r[l+4*d]*a[d];r[12+l]=-u}},p.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},p.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},p.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},p.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var a=this.computedMatrix,i=a[1],o=a[5],s=a[9],u=l(i,o,s);i/=u,o/=u,s/=u;var c=a[0],d=a[4],p=a[8],h=c*i+d*o+p*s,f=l(c-=i*h,d-=o*h,p-=s*h);c/=f,d/=f,p/=f;var m=a[2],g=a[6],y=a[10],v=m*i+g*o+y*s,_=m*c+g*d+y*p,b=l(m-=v*i+_*c,g-=v*o+_*d,y-=v*s+_*p);m/=b,g/=b,y/=b;var x=c*t+i*r,w=d*t+o*r,k=p*t+s*r;this.center.move(e,x,w,k);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+n),this.radius.set(e,Math.log(M))},p.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||0,r=r||0;var a=this.computedMatrix,i=a[0],o=a[4],s=a[8],c=a[1],d=a[5],p=a[9],h=a[2],f=a[6],m=a[10],g=t*i+r*c,y=t*o+r*d,v=t*s+r*p,_=-(f*v-m*y),b=-(m*g-h*v),x=-(h*y-f*g),w=Math.sqrt(Math.max(0,1-Math.pow(_,2)-Math.pow(b,2)-Math.pow(x,2))),k=u(_,b,x,w);k>1e-6?(_/=k,b/=k,x/=k,w/=k):(_=b=x=0,w=1);var M=this.computedRotation,T=M[0],S=M[1],C=M[2],L=M[3],A=T*w+L*_+S*x-C*b,E=S*w+L*b+C*_-T*x,D=C*w+L*x+T*b-S*_,P=L*w-T*_-S*b-C*x;if(n){_=h,b=f,x=m;var I=Math.sin(n)/l(_,b,x);_*=I,b*=I,x*=I,P=P*(w=Math.cos(t))-(A=A*w+P*_+E*x-D*b)*_-(E=E*w+P*b+D*_-A*x)*b-(D=D*w+P*x+A*b-E*_)*x}var O=u(A,E,D,P);O>1e-6?(A/=O,E/=O,D/=O,P/=O):(A=E=D=0,P=1),this.rotation.set(e,A,E,D,P)},p.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;a(i,t,r,n);var o=this.computedRotation;s(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),c(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,u=0;u<3;++u)l+=Math.pow(r[u]-t[u],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},p.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},p.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),c(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,t);var a=n[15];if(Math.abs(a)>1e-6){var i=n[12]/a,l=n[13]/a,u=n[14]/a;this.recalcMatrix(e);var d=Math.exp(this.computedRadius[0]);this.center.set(e,i-n[2]*d,l-n[6]*d,u-n[10]*d),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},p.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},p.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},p.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},p.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},p.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var a=e.distance;a&&a>0&&this.radius.set(t,Math.log(a)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},{"./lib/quatFromFrame":456,"filtered-vector":228,"gl-mat4/fromQuat":264,"gl-mat4/invert":267,"gl-mat4/lookAt":268}],458:[function(e,t,r){ /*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. */ "use strict";var n=e("repeat-string");t.exports=function(e,t,r){return n(r=void 0!==r?r+"":" ",t)+e}},{"repeat-string":501}],459:[function(e,t,r){"use strict";function n(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",i=!!t.flat;n.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function i(t,i,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),a+s+a}r.forEach((function(e,n){for(var a,o=0;e!=a;)if(a=e,e=e.replace(t,i),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e})),n=n.reverse(),r=r.map((function(t){return n.forEach((function(r){t=t.replace(new RegExp("(\\"+a+r+"\\"+a+")","g"),e[0]+"$1"+e[1])})),t}))}));var o=new RegExp("\\"+a+"([0-9]+)\\"+a);return i?r:function e(t,r,n){for(var a,i=[],s=0;a=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");i.push(t.slice(0,a.index)),i.push(e(r[a[1]],r)),t=t.slice(a.index+a[0].length)}return i.push(t),i}(r[0],r)}function a(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",a=e[0];if(!a)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;a!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=a,a=a.replace(i,s)}return a}return e.reduce((function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r}),"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function i(e,t){return Array.isArray(e)?a(e,t):n(e,t)}i.parse=n,i.stringify=a,t.exports=i},{}],460:[function(e,t,r){"use strict";var n=e("pick-by-alias");t.exports=function(e){var t;return arguments.length>1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=n(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}},{"pick-by-alias":466}],461:[function(e,t,r){t.exports=function(e){var t=[];return e.replace(a,(function(e,r,a){var o=r.toLowerCase();for(a=function(e){var t=e.match(i);return t?t.map(Number):[]}(a),"m"==o&&a.length>2&&(t.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==n[o])return a.unshift(r),t.push(a);if(a.length0;--o)i=l[o],r=s[o],s[o]=s[i],s[i]=r,l[o]=l[r],l[r]=i,u=(u+r)*o;return n.freeUint32(l),n.freeUint32(s),u},r.unrank=function(e,t,r){switch(e){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(t?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):t?[0,1]:[1,0]}var n,a,i,o=1;for((r=r||new Array(e))[0]=0,i=1;i0;--i)t=t-(n=t/o|0)*o|0,o=o/i|0,a=0|r[i],r[i]=0|r[n],r[n]=0|a;return r}},{"invert-permutation":416,"typedarray-pool":543}],466:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,i,o={};if("string"==typeof t&&(t=a(t)),Array.isArray(t)){var s={};for(i=0;i0){o=i[c][r][0],l=c;break}s=o[1^l];for(var d=0;d<2;++d)for(var p=i[d][r],h=0;h0&&(o=f,s=m,l=d)}return a?s:(o&&u(o,l),s)}function d(e,r){var a=i[r][e][0],o=[e];u(a,r);for(var s=a[1^r];;){for(;s!==e;)o.push(s),s=c(o[o.length-2],s,!1);if(i[0][e].length+i[1][e].length===0)break;var l=o[o.length-1],d=e,p=o[1],h=c(l,d,!0);if(n(t[l],t[d],t[p],t[h])<0)break;o.push(e),s=c(l,d)}return o}function p(e,t){return t[1]===t[t.length-1]}for(o=0;o0;){i[0][o].length;var m=d(o,h);p(0,m)?f.push.apply(f,m):(f.length>0&&l.push(f),f=m)}f.length>0&&l.push(f)}return l};var n=e("compare-angle")},{"compare-angle":128}],468:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=n(e,t.length),a=new Array(t.length),i=new Array(t.length),o=[],s=0;s0;){var u=o.pop();a[u]=!1;var c=r[u];for(s=0;s0}))).length,g=new Array(m),y=new Array(m);for(h=0;h0;){var N=R.pop(),B=L[N];l(B,(function(e,t){return e-t}));var j,Y=B.length,H=z[N];if(0===H){var V=f[N];j=[V]}for(h=0;h=0||(z[U]=1^H,R.push(U),0===H&&(F(V=f[U])||(V.reverse(),j.push(V))))}0===H&&r.push(j)}return r};var n=e("edges-to-adjacency-list"),a=e("planar-dual"),i=e("point-in-big-polygon"),o=e("two-product"),s=e("robust-sum"),l=e("uniq"),u=e("./lib/trim-leaves");function c(e,t){for(var r=new Array(e),n=0;n>>1;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?m=new(d(t.dtype))(y):t.dtype&&(m=t.dtype,Array.isArray(m)&&(m.length=y));for(var v=0;vr||s>h){for(var p=0;pr+a||S>l||C=E||o===s)){var u=_[i];void 0===s&&(s=u.length);for(var c=o;c=g&&p<=v&&h>=y&&h<=k&&D.push(d)}var f=b[i],m=f[4*o+0],x=f[4*o+1],w=f[4*o+2],M=f[4*o+3],A=function(e,t){for(var r=null,n=0;null===r;)if(r=e[4*t+n],++n>e.length)return null;return r}(f,o+1),P=.5*a,I=i+1;t(r,n,P,I,m,x||w||M||A),t(r,n+P,P,I,x,w||M||A),t(r+P,n,P,I,w,M||A),t(r+P,n+P,P,I,M,A)}}}(0,0,1,0,0,1),D},m;function A(e,t,r){for(var n=1,a=.5,i=.5,o=.5,s=0;s0&&t[a]===r[0]))return 1;i=e[a-1]}for(var s=1;i;){var l=i.key,u=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,i=i.right}else if(u>0)i=i.left;else{if(!(u<0))return 0;s=1,i=i.right}}return s}}(y.slabs,y.coordinates);return 0===i.length?v:function(e,t){return function(r){return e(r[0],r[1])?0:t(r)}}(l(i),v)};var n=e("robust-orientation")[3],a=e("slab-decomposition"),i=e("interval-tree-1d"),o=e("binary-search-bounds");function s(){return!0}function l(e){for(var t={},r=0;r=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],s=n[1]-r[1],l=o*i+a*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-a>e&&(i-u)*(a-c)/(o-c)+u-n>e&&(s=!s),i=u,o=c}return s}};return t}},{}],477:[function(e,t,r){var n={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a0}))}function c(e,n){var a=e.seg,i=n.seg,o=a.start,s=a.end,u=i.start,c=i.end;r&&r.checkIntersection(a,i);var d=t.linesIntersect(o,s,u,c);if(!1===d){if(!t.pointsCollinear(o,s,u))return!1;if(t.pointsSame(o,c)||t.pointsSame(s,u))return!1;var p=t.pointsSame(o,u),h=t.pointsSame(s,c);if(p&&h)return n;var f=!p&&t.pointBetween(o,u,c),m=!h&&t.pointBetween(s,u,c);if(p)return m?l(n,s):l(e,c),n;f&&(h||(m?l(n,s):l(e,c)),l(n,o))}else 0===d.alongA&&(-1===d.alongB?l(e,u):0===d.alongB?l(e,d.pt):1===d.alongB&&l(e,c)),0===d.alongB&&(-1===d.alongA?l(n,o):0===d.alongA?l(n,d.pt):1===d.alongA&&l(n,s));return!1}for(var d=[];!i.isEmpty();){var p=i.getHead();if(r&&r.vert(p.pt[0]),p.isStart){r&&r.segmentNew(p.seg,p.primary);var h=u(p),f=h.before?h.before.ev:null,m=h.after?h.after.ev:null;function g(){if(f){var e=c(p,f);if(e)return e}return!!m&&c(p,m)}r&&r.tempStatus(p.seg,!!f&&f.seg,!!m&&m.seg);var y,v,_=g();if(_&&(e?(v=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below)&&(_.seg.myFill.above=!_.seg.myFill.above):_.seg.otherFill=p.seg.myFill,r&&r.segmentUpdate(_.seg),p.other.remove(),p.remove()),i.getHead()!==p){r&&r.rewind(p.seg);continue}e?(v=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below,p.seg.myFill.below=m?m.seg.myFill.above:a,p.seg.myFill.above=v?!p.seg.myFill.below:p.seg.myFill.below):null===p.seg.otherFill&&(y=m?p.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:p.primary?o:a,p.seg.otherFill={above:y,below:y}),r&&r.status(p.seg,!!f&&f.seg,!!m&&m.seg),p.other.status=h.insert(n.node({ev:p}))}else{var b=p.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&c(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!p.primary){var x=p.seg.myFill;p.seg.myFill=p.seg.otherFill,p.seg.otherFill=x}d.push(p.seg)}i.getHead().remove()}return r&&r.done(),d}return e?{addRegion:function(e){for(var n,a,i,o=e[e.length-1],l=0;l=u?(M=1,v=u+2*p+f):v=p*(M=-p/u)+f):(M=0,h>=0?(T=0,v=f):-h>=d?(T=1,v=d+2*h+f):v=h*(T=-h/d)+f);else if(T<0)T=0,p>=0?(M=0,v=f):-p>=u?(M=1,v=u+2*p+f):v=p*(M=-p/u)+f;else{var S=1/k;v=(M*=S)*(u*M+c*(T*=S)+2*p)+T*(c*M+d*T+2*h)+f}else M<0?(b=d+h)>(_=c+p)?(x=b-_)>=(w=u-2*c+d)?(M=1,T=0,v=u+2*p+f):v=(M=x/w)*(u*M+c*(T=1-M)+2*p)+T*(c*M+d*T+2*h)+f:(M=0,b<=0?(T=1,v=d+2*h+f):h>=0?(T=0,v=f):v=h*(T=-h/d)+f):T<0?(b=u+p)>(_=c+h)?(x=b-_)>=(w=u-2*c+d)?(T=1,M=0,v=d+2*h+f):v=(M=1-(T=x/w))*(u*M+c*T+2*p)+T*(c*M+d*T+2*h)+f:(T=0,b<=0?(M=1,v=u+2*p+f):p>=0?(M=0,v=f):v=p*(M=-p/u)+f):(x=d+h-c-p)<=0?(M=0,T=1,v=d+2*h+f):x>=(w=u-2*c+d)?(M=1,T=0,v=u+2*p+f):v=(M=x/w)*(u*M+c*(T=1-M)+2*p)+T*(c*M+d*T+2*h)+f;var C=1-M-T;for(l=0;l1)for(var r=1;r0){var u=e[r-1];if(0===n(s,u)&&i(u)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},{"cell-orientation":113,"compare-cell":129,"compare-oriented-cell":130}],491:[function(e,t,r){"use strict";var n=e("array-bounds"),a=e("color-normalize"),i=e("update-diff"),o=e("pick-by-alias"),s=e("object-assign"),l=e("flatten-vertex-data"),u=e("to-float32"),c=u.float32,d=u.fract32;t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,u,h,f,m,g,y=e._gl,v={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},_=[];return f=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),u=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),h=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"static",type:"float",data:p}),k(t),r=e({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{color:{buffer:f,offset:function(e,t){return 4*t.offset},divisor:1},position:{buffer:u,offset:function(e,t){return 8*t.offset},divisor:1},positionFract:{buffer:h,offset:function(e,t){return 8*t.offset},divisor:1},error:{buffer:m,offset:function(e,t){return 16*t.offset},divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:p.length}),s(b,{update:k,draw:x,destroy:M,regl:e,gl:y,canvas:y.canvas,groups:_}),b;function b(e){e?k(e):null===e&&M(),x()}function x(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),_.forEach((function(e,r){e&&(t&&(t[r]?e.draw=!0:e.draw=!1),e.draw?w(r):e.draw=!0)}))}function w(e){"number"==typeof e&&(e=_[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],r(e),e.after&&e.after(e))}function k(e){if(e){null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var t=0,r=0;if(b.groups=_=e.map((function(e,u){var c=_[u];return e?("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=o(e,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),c||(_[u]=c={id:u,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=s({},v,e)),i(c,e,[{lineWidth:function(e){return.5*+e},capSize:function(e){return.5*+e},opacity:parseFloat,errors:function(e){return e=l(e),r+=e.length,e},positions:function(e,r){return e=l(e,"float64"),r.count=Math.floor(e.length/2),r.bounds=n(e,2),r.offset=t,t+=r.count,e}},{color:function(e,t){var r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){var n=e;e=Array(r);for(var i=0;i 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(e){t=a}return{fill:e({primitive:"triangle",elements:function(e,t){return t.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:a,miter:t}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];t.length&&(e=this).update.apply(e,t),this.draw()},g.prototype.draw=function(){for(var e=this,t=[],r=arguments.length;r--;)t[r]=arguments[r];return(t.length?t:this.passes).forEach((function(t,r){var n;if(t&&Array.isArray(t))return(n=e).draw.apply(n,t);"number"==typeof t&&(t=e.passes[t]),t&&t.count>1&&t.opacity&&(e.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&e.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>g.precisionThreshold||t.scale[1]*t.viewport.height>g.precisionThreshold?e.shaders.rect(t):"rect"===t.join||!t.join&&(t.thickness<=2||t.count>=g.maxPoints)?e.shaders.rect(t):e.shaders.miter(t)))})),this},g.prototype.update=function(e){var t=this;if(e){null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var r=this.regl,o=this.gl;if(e.forEach((function(e,d){var f=t.passes[d];if(void 0!==e)if(null!==e){if("number"==typeof e[0]&&(e={positions:e}),e=s(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow"}),f||(t.passes[d]=f={id:d,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=i({},g.defaults,e)),null!=e.thickness&&(f.thickness=parseFloat(e.thickness)),null!=e.opacity&&(f.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(f.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(f.overlay=!!e.overlay,d 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=c(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(palette,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pixelRatio;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),f&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(l)}v.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},v.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},v.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nn)?t.tree=l(e,{bounds:d}):n&&n.length&&(t.tree=n),t.tree){var p={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(p):t.elements=s.elements(p)}return a({data:m.float(e),usage:"dynamic"}),i({data:m.fract(e),usage:"dynamic"}),u({data:new Uint8Array(c),type:"uint8",usage:"stream"}),e}},{marker:function(t,r,n){var a=r.activation;if(a.forEach((function(e){return e&&e.destroy&&e.destroy()})),a.length=0,t&&"number"!=typeof t[0]){for(var i=[],o=0,l=Math.min(t.length,r.count);o=0)return i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var o=0,s=e.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===a.length?a[0]:a},v.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*e.length/t);if(n>1)for(var a=.25*(e=e.slice()).length%t;a2?(s[0],s[2],n=s[1],a=s[3]):s.length?(n=s[0],a=s[1]):(s.x,n=s.y,s.x,s.width,a=s.y+s.height),l.length>2?(i=l[0],o=l[2],l[1],l[3]):l.length?(i=l[0],o=l[1]):(i=l.x,l.y,o=l.x+l.width,l.y,l.height),[i,n,o,a]}function h(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];var t=l(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}t.exports=c,c.prototype.render=function(){for(var e,t=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(e=this).update.apply(e,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){t.draw(),t.dirty=!0,t.planned=null}))):(this.draw(),this.dirty=!0,o((function(){t.dirty=!1}))),this)},c.prototype.update=function(){for(var e,t=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];if(r.length){for(var a=0;aM))&&(s.lower||!(k>>=t))<<3,(t|=r=(15<(e>>>=r))<<2)|(r=(3<(e>>>=r))<<1)|e>>>r>>1}function s(){function e(e){e:{for(var t=16;268435456>=t;t*=16)if(e<=t){e=t;break e}e=0}return 0<(t=r[o(e)>>2]).length?t.pop():new ArrayBuffer(e)}function t(e){r[o(e.byteLength)>>2].push(e)}var r=i(8,(function(){return[]}));return{alloc:e,free:t,allocType:function(t,r){var n=null;switch(t){case 5120:n=new Int8Array(e(r),0,r);break;case 5121:n=new Uint8Array(e(r),0,r);break;case 5122:n=new Int16Array(e(2*r),0,r);break;case 5123:n=new Uint16Array(e(2*r),0,r);break;case 5124:n=new Int32Array(e(4*r),0,r);break;case 5125:n=new Uint32Array(e(4*r),0,r);break;case 5126:n=new Float32Array(e(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){t(e.buffer)}}}function l(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||G(e.data))}function u(e,t,r,n,a,i){for(var o=0;o(a=s)&&(a=n.buffer.byteLength,5123===d?a>>=1:5125===d&&(a>>=2)),n.vertCount=a,a=o,0>o&&(a=4,1===(o=n.buffer.dimension)&&(a=0),2===o&&(a=1),3===o&&(a=4)),n.primType=a}function o(e){n.elementsCount--,delete s[e.id],e.buffer.destroy(),e.buffer=null}var s={},u=0,c={uint8:5121,uint16:5123};t.oes_element_index_uint&&(c.uint32=5125),a.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:function(e,t){function s(e){if(e)if("number"==typeof e)u(e),d.primType=4,d.vertCount=0|e,d.type=5121;else{var t=null,r=35044,n=-1,a=-1,o=0,p=0;Array.isArray(e)||G(e)||l(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=$[e.usage]),"primitive"in e&&(n=re[e.primitive]),"count"in e&&(a=0|e.count),"type"in e&&(p=c[e.type]),"length"in e?o=0|e.length:(o=a,5123===p||5122===p?o*=2:5125!==p&&5124!==p||(o*=4))),i(d,t,r,n,a,o,p)}else u(),d.primType=4,d.vertCount=0,d.type=5121;return s}var u=r.create(null,34963,!0),d=new a(u._buffer);return n.elementsCount++,s(e),s._reglType="elements",s._elements=d,s.subdata=function(e,t){return u.subdata(e,t),s},s.destroy=function(){o(d)},s},createStream:function(e){var t=d.pop();return t||(t=new a(r.create(null,34963,!0,!1)._buffer)),i(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){d.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof a?e._elements:null},clear:function(){K(s).forEach(o)}}}function m(e){for(var t=W.allocType(5123,e.length),r=0;r>>31<<15,a=(i<<1>>>24)-127,i=i>>13&1023;t[r]=-24>a?n:-14>a?n+(i+1024>>-14-a):15>=a,r.height>>=a,h(r,n[a]),e.mipmask|=1<t;++t)e.images[t]=null;return e}function E(e){for(var t=e.images,r=0;rt){for(var r=0;r=--this.refCount&&z(this)}}),o.profile&&(i.getTotalTextureSize=function(){var e=0;return Object.keys(ye).forEach((function(t){e+=ye[t].stats.size})),e}),{create2D:function(t,r){function n(e,t){var r=a.texInfo;D.call(r);var i=A();return"number"==typeof e?S(i,0|e,"number"==typeof t?0|t:0|e):e?(P(r,e),C(i,e)):S(i,1,1),r.genMipmaps&&(i.mipmask=(i.width<<1)-1),a.mipmask=i.mipmask,u(a,i),a.internalformat=i.internalformat,n.width=i.width,n.height=i.height,F(a),L(i,3553),I(r,3553),R(),E(i),o.profile&&(a.stats.size=k(a.internalformat,a.type,i.width,i.height,r.genMipmaps,!1)),n.format=ee[a.internalformat],n.type=te[a.type],n.mag=re[r.magFilter],n.min=ne[r.minFilter],n.wrapS=ae[r.wrapS],n.wrapT=ae[r.wrapT],n}var a=new O(3553);return ye[a.id]=a,i.textureCount++,n(t,r),n.subimage=function(e,t,r,i){t|=0,r|=0,i|=0;var o=y();return u(o,a),o.width=0,o.height=0,h(o,e),o.width=o.width||(a.width>>i)-t,o.height=o.height||(a.height>>i)-r,F(a),f(o,3553,t,r,i),R(),M(o),n},n.resize=function(t,r){var i=0|t,s=0|r||i;if(i===a.width&&s===a.height)return n;n.width=a.width=i,n.height=a.height=s,F(a);for(var l,u=a.channels,c=a.type,d=0;a.mipmask>>d;++d){var p=i>>d,h=s>>d;if(!p||!h)break;l=W.zero.allocType(c,p*h*u),e.texImage2D(3553,d,a.format,p,h,0,a.format,a.type,l),l&&W.zero.freeType(l)}return R(),o.profile&&(a.stats.size=k(a.internalformat,a.type,i,s,!1,!1)),n},n._reglType="texture2d",n._texture=a,o.profile&&(n.stats=a.stats),n.destroy=function(){a.decRef()},n},createCube:function(t,r,n,a,s,l){function d(e,t,r,n,a,i){var s,l=p.texInfo;for(D.call(l),s=0;6>s;++s)m[s]=A();if("number"!=typeof e&&e){if("object"==typeof e)if(t)C(m[0],e),C(m[1],t),C(m[2],r),C(m[3],n),C(m[4],a),C(m[5],i);else if(P(l,e),c(p,e),"faces"in e)for(e=e.faces,s=0;6>s;++s)u(m[s],p),C(m[s],e[s]);else for(s=0;6>s;++s)C(m[s],e)}else for(e=0|e||1,s=0;6>s;++s)S(m[s],e,e);for(u(p,m[0]),p.mipmask=l.genMipmaps?(m[0].width<<1)-1:m[0].mipmask,p.internalformat=m[0].internalformat,d.width=m[0].width,d.height=m[0].height,F(p),s=0;6>s;++s)L(m[s],34069+s);for(I(l,34067),R(),o.profile&&(p.stats.size=k(p.internalformat,p.type,d.width,d.height,l.genMipmaps,!0)),d.format=ee[p.internalformat],d.type=te[p.type],d.mag=re[l.magFilter],d.min=ne[l.minFilter],d.wrapS=ae[l.wrapS],d.wrapT=ae[l.wrapT],s=0;6>s;++s)E(m[s]);return d}var p=new O(34067);ye[p.id]=p,i.cubeCount++;var m=Array(6);return d(t,r,n,a,s,l),d.subimage=function(e,t,r,n,a){r|=0,n|=0,a|=0;var i=y();return u(i,p),i.width=0,i.height=0,h(i,t),i.width=i.width||(p.width>>a)-r,i.height=i.height||(p.height>>a)-n,F(p),f(i,34069+e,r,n,a),R(),M(i),d},d.resize=function(t){if((t|=0)!==p.width){d.width=p.width=t,d.height=p.height=t,F(p);for(var r=0;6>r;++r)for(var n=0;p.mipmask>>n;++n)e.texImage2D(34069+r,n,p.format,t>>n,t>>n,0,p.format,p.type,null);return R(),o.profile&&(p.stats.size=k(p.internalformat,p.type,d.width,d.height,!1,!0)),d}},d._reglType="textureCube",d._texture=p,o.profile&&(d.stats=p.stats),d.destroy=function(){p.decRef()},d},clear:function(){for(var t=0;tr;++r)if(0!=(t.mipmask&1<>r,t.height>>r,0,t.internalformat,t.type,null);else for(var n=0;6>n;++n)e.texImage2D(34069+n,r,t.internalformat,t.width>>r,t.height>>r,0,t.internalformat,t.type,null);I(t.texInfo,t.target)}))}}}function T(e,t,r,n,a,i){function o(e,t,r){this.target=e,this.texture=t,this.renderbuffer=r;var n=e=0;t?(e=t.width,n=t.height):r&&(e=r.width,n=r.height),this.width=e,this.height=n}function s(e){e&&(e.texture&&e.texture._texture.decRef(),e.renderbuffer&&e.renderbuffer._renderbuffer.decRef())}function l(e,t,r){e&&(e.texture?e.texture._texture.refCount+=1:e.renderbuffer._renderbuffer.refCount+=1)}function u(t,r){r&&(r.texture?e.framebufferTexture2D(36160,t,r.target,r.texture._texture.texture,0):e.framebufferRenderbuffer(36160,t,36161,r.renderbuffer._renderbuffer.renderbuffer))}function c(e){var t=3553,r=null,n=null,a=e;return"object"==typeof e&&(a=e.data,"target"in e&&(t=0|e.target)),"texture2d"===(e=a._reglType)?r=a:"textureCube"===e?r=a:"renderbuffer"===e&&(n=a,t=36161),new o(t,r,n)}function d(e,t,r,i,s){return r?((e=n.create2D({width:e,height:t,format:i,type:s}))._texture.refCount=0,new o(3553,e,null)):((e=a.create({width:e,height:t,format:i}))._renderbuffer.refCount=0,new o(36161,null,e))}function p(e){return e&&(e.texture||e.renderbuffer)}function h(e,t,r){e&&(e.texture?e.texture.resize(t,r):e.renderbuffer&&e.renderbuffer.resize(t,r),e.width=t,e.height=r)}function f(){this.id=k++,M[this.id]=this,this.framebuffer=e.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function m(e){e.colorAttachments.forEach(s),s(e.depthAttachment),s(e.stencilAttachment),s(e.depthStencilAttachment)}function g(t){e.deleteFramebuffer(t.framebuffer),t.framebuffer=null,i.framebufferCount--,delete M[t.id]}function y(t){var n;e.bindFramebuffer(36160,t.framebuffer);var a=t.colorAttachments;for(n=0;na;++a){for(u=0;ue;++e)r[e].resize(n);return t.width=t.height=n,t},_reglType:"framebufferCube",destroy:function(){r.forEach((function(e){e.destroy()}))}})},clear:function(){K(M).forEach(g)},restore:function(){_.cur=null,_.next=null,_.dirty=!0,K(M).forEach((function(t){t.framebuffer=e.createFramebuffer(),y(t)}))}})}function S(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function C(e,t,r,n){function a(e,t,r,n){this.name=e,this.id=t,this.location=r,this.info=n}function i(e,t){for(var r=0;re&&(e=t.stats.uniformsCount)})),e},r.getMaxAttributesCount=function(){var e=0;return p.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);K(u).forEach(t),u={},K(c).forEach(t),c={},p.forEach((function(t){e.deleteProgram(t.program)})),p.length=0,d={},r.shaderCount=0},program:function(e,t,n){var a=d[t];a||(a=d[t]={});var i=a[e];return i||(i=new s(t,e),r.shaderCount++,l(i),a[e]=i,p.push(i)),i},restore:function(){u={},c={};for(var e=0;e"+t+"?"+a+".constant["+t+"]:0;"})).join(""),"}}else{","if(",o,"(",a,".buffer)){",c,"=",s,".createStream(",34962,",",a,".buffer);","}else{",c,"=",s,".getBuffer(",a,".buffer);","}",d,'="type" in ',a,"?",i.glTypes,"[",a,".type]:",c,".dtype;",l.normalized,"=!!",a,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",c,");","}"),l}))})),o}function T(e,t,r,n,a){var o=x(e),s=function(e,t,r){function n(e){if(e in a){var r=a[e];e=!0;var n,o,s=0|r.x,l=0|r.y;return"width"in r?n=0|r.width:e=!1,"height"in r?o=0|r.height:e=!1,new O(!e&&t&&t.thisDep,!e&&t&&t.contextDep,!e&&t&&t.propDep,(function(e,t){var a=e.shared.context,i=n;"width"in r||(i=t.def(a,".","framebufferWidth","-",s));var u=o;return"height"in r||(u=t.def(a,".","framebufferHeight","-",l)),[s,l,i,u]}))}if(e in i){var u=i[e];return e=z(u,(function(e,t){var r=e.invoke(t,u),n=e.shared.context,a=t.def(r,".x|0"),i=t.def(r,".y|0");return[a,i,t.def('"width" in ',r,"?",r,".width|0:","(",n,".","framebufferWidth","-",a,")"),r=t.def('"height" in ',r,"?",r,".height|0:","(",n,".","framebufferHeight","-",i,")")]})),t&&(e.thisDep=e.thisDep||t.thisDep,e.contextDep=e.contextDep||t.contextDep,e.propDep=e.propDep||t.propDep),e}return t?new O(t.thisDep,t.contextDep,t.propDep,(function(e,t){var r=e.shared.context;return[0,0,t.def(r,".","framebufferWidth"),t.def(r,".","framebufferHeight")]})):null}var a=e.static,i=e.dynamic;if(e=n("viewport")){var o=e;e=new O(e.thisDep,e.contextDep,e.propDep,(function(e,t){var r=o.append(e,t),n=e.shared.context;return t.set(n,".viewportWidth",r[2]),t.set(n,".viewportHeight",r[3]),r}))}return{viewport:e,scissor_box:n("scissor.box")}}(e,o),l=k(e),u=function(e,t){var r=e.static,n=e.dynamic,a={};return ne.forEach((function(e){function t(t,i){if(e in r){var s=t(r[e]);a[o]=R((function(){return s}))}else if(e in n){var l=n[e];a[o]=z(l,(function(e,t){return i(e,t,e.invoke(t,l))}))}}var o=y(e);switch(e){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return t((function(e){return e}),(function(e,t,r){return r}));case"depth.func":return t((function(e){return ke[e]}),(function(e,t,r){return t.def(e.constants.compareFuncs,"[",r,"]")}));case"depth.range":return t((function(e){return e}),(function(e,t,r){return[t.def("+",r,"[0]"),t=t.def("+",r,"[1]")]}));case"blend.func":return t((function(e){return[we["srcRGB"in e?e.srcRGB:e.src],we["dstRGB"in e?e.dstRGB:e.dst],we["srcAlpha"in e?e.srcAlpha:e.src],we["dstAlpha"in e?e.dstAlpha:e.dst]]}),(function(e,t,r){function n(e,n){return t.def('"',e,n,'" in ',r,"?",r,".",e,n,":",r,".",e)}e=e.constants.blendFuncs;var a=n("src","RGB"),i=n("dst","RGB"),o=(a=t.def(e,"[",a,"]"),t.def(e,"[",n("src","Alpha"),"]"));return[a,i=t.def(e,"[",i,"]"),o,e=t.def(e,"[",n("dst","Alpha"),"]")]}));case"blend.equation":return t((function(e){return"string"==typeof e?[X[e],X[e]]:"object"==typeof e?[X[e.rgb],X[e.alpha]]:void 0}),(function(e,t,r){var n=e.constants.blendEquations,a=t.def(),i=t.def();return(e=e.cond("typeof ",r,'==="string"')).then(a,"=",i,"=",n,"[",r,"];"),e.else(a,"=",n,"[",r,".rgb];",i,"=",n,"[",r,".alpha];"),t(e),[a,i]}));case"blend.color":return t((function(e){return i(4,(function(t){return+e[t]}))}),(function(e,t,r){return i(4,(function(e){return t.def("+",r,"[",e,"]")}))}));case"stencil.mask":return t((function(e){return 0|e}),(function(e,t,r){return t.def(r,"|0")}));case"stencil.func":return t((function(e){return[ke[e.cmp||"keep"],e.ref||0,"mask"in e?e.mask:-1]}),(function(e,t,r){return[e=t.def('"cmp" in ',r,"?",e.constants.compareFuncs,"[",r,".cmp]",":",7680),t.def(r,".ref|0"),t=t.def('"mask" in ',r,"?",r,".mask|0:-1")]}));case"stencil.opFront":case"stencil.opBack":return t((function(t){return["stencil.opBack"===e?1029:1028,Me[t.fail||"keep"],Me[t.zfail||"keep"],Me[t.zpass||"keep"]]}),(function(t,r,n){function a(e){return r.def('"',e,'" in ',n,"?",i,"[",n,".",e,"]:",7680)}var i=t.constants.stencilOps;return["stencil.opBack"===e?1029:1028,a("fail"),a("zfail"),a("zpass")]}));case"polygonOffset.offset":return t((function(e){return[0|e.factor,0|e.units]}),(function(e,t,r){return[t.def(r,".factor|0"),t=t.def(r,".units|0")]}));case"cull.face":return t((function(e){var t=0;return"front"===e?t=1028:"back"===e&&(t=1029),t}),(function(e,t,r){return t.def(r,'==="front"?',1028,":",1029)}));case"lineWidth":return t((function(e){return e}),(function(e,t,r){return r}));case"frontFace":return t((function(e){return Te[e]}),(function(e,t,r){return t.def(r+'==="cw"?2304:2305')}));case"colorMask":return t((function(e){return e.map((function(e){return!!e}))}),(function(e,t,r){return i(4,(function(e){return"!!"+r+"["+e+"]"}))}));case"sample.coverage":return t((function(e){return["value"in e?e.value:1,!!e.invert]}),(function(e,t,r){return[t.def('"value" in ',r,"?+",r,".value:1"),t=t.def("!!",r,".invert")]}))}})),a}(e),c=w(e),d=s.viewport;return d&&(u.viewport=d),(s=s[d=y("scissor.box")])&&(u[d]=s),(o={framebuffer:o,draw:l,shader:c,state:u,dirty:s=0>1)",s],");")}function t(){r(l,".drawArraysInstancedANGLE(",[f,m,g,s],");")}h?v?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}function o(){function e(){r(c+".drawElements("+[f,g,y,m+"<<(("+y+"-5121)>>1)"]+");")}function t(){r(c+".drawArrays("+[f,m,g]+");")}h?v?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}var s,l,u=e.shared,c=u.gl,d=u.draw,p=n.draw,h=function(){var a=p.elements,i=t;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(e,i)):a=i.def(d,".","elements"),a&&i("if("+a+")"+c+".bindBuffer(34963,"+a+".buffer.buffer);"),a}(),f=a("primitive"),m=a("offset"),g=function(){var a=p.count,i=t;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(e,i)):a=i.def(d,".","count"),a}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");$&&(s=a("instances"),l=e.instancing);var y=h+".type",v=p.elements&&F(p.elements);$&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),i(),r("}else if(",s,"<0){"),o(),r("}")):i():o()}function V(e,t,r,n,a){return a=(t=b()).proc("body",a),$&&(t.instancing=a.def(t.shared.extensions,".angle_instanced_arrays")),e(t,a,r,n),t.compile().body}function U(e,t,r,n){E(e,t),B(e,t,r,n.attributes,(function(){return!0})),j(e,t,r,n.uniforms,(function(){return!0})),Y(e,t,t,r)}function W(e,t,r,n){function a(){return!0}e.batchId="a1",E(e,t),B(e,t,r,n.attributes,a),j(e,t,r,n.uniforms,a),Y(e,t,t,r)}function q(e,t,r,n){function a(e){return e.contextDep&&o||e.propDep}function i(e){return!a(e)}E(e,t);var o=r.contextDep,s=t.def(),l=t.def();e.shared.props=l,e.batchId=s;var u=e.scope(),c=e.scope();t(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&S(e,c,r.context),r.needsFramebuffer&&C(e,c,r.framebuffer),A(e,c,r.state,a),r.profile&&a(r.profile)&&N(e,c,r,!1,!0),n?(B(e,u,r,n.attributes,i),B(e,c,r,n.attributes,a),j(e,u,r,n.uniforms,i),j(e,c,r,n.uniforms,a),Y(e,u,c,r)):(t=e.global.def("{}"),n=r.shader.progVar.append(e,c),l=c.def(n,".id"),u=c.def(t,"[",l,"]"),c(e.shared.gl,".useProgram(",n,".program);","if(!",u,"){",u,"=",t,"[",l,"]=",e.link((function(t){return V(W,e,r,t,2)})),"(",n,");}",u,".call(this,a0[",s,"],",s,");"))}function G(e,r){function n(t){var n=r.shader[t];n&&a.set(i.shader,"."+t,n.append(e,a))}var a=e.proc("scope",3);e.batchId="a2";var i=e.shared,o=i.current;S(e,a,r.context),r.framebuffer&&r.framebuffer.append(e,a),I(Object.keys(r.state)).forEach((function(t){var n=r.state[t].append(e,a);g(n)?n.forEach((function(r,n){a.set(e.next[t],"["+n+"]",r)})):a.set(i.next,"."+t,n)})),N(e,a,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(t){var n=r.draw[t];n&&a.set(i.draw,"."+t,""+n.append(e,a))})),Object.keys(r.uniforms).forEach((function(n){a.set(i.uniforms,"["+t.id(n)+"]",r.uniforms[n].append(e,a))})),Object.keys(r.attributes).forEach((function(t){var n=r.attributes[t].append(e,a),i=e.scopeAttrib(t);Object.keys(new Z).forEach((function(e){a.set(i,"."+e,n[e])}))})),n("vert"),n("frag"),0=--this.refCount&&o(this)},a.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(c).forEach((function(t){e+=c[t].stats.size})),e}),{create:function(t,r){function o(t,r){var n=0,i=0,c=32854;if("object"==typeof t&&t?("shape"in t?(n=0|(i=t.shape)[0],i=0|i[1]):("radius"in t&&(n=i=0|t.radius),"width"in t&&(n=0|t.width),"height"in t&&(i=0|t.height)),"format"in t&&(c=s[t.format])):"number"==typeof t?(n=0|t,i="number"==typeof r?0|r:n):t||(n=i=1),n!==u.width||i!==u.height||c!==u.format)return o.width=u.width=n,o.height=u.height=i,u.format=c,e.bindRenderbuffer(36161,u.renderbuffer),e.renderbufferStorage(36161,c,n,i),a.profile&&(u.stats.size=ge[u.format]*u.width*u.height),o.format=l[u.format],o}var u=new i(e.createRenderbuffer());return c[u.id]=u,n.renderbufferCount++,o(t,r),o.resize=function(t,r){var n=0|t,i=0|r||n;return n===u.width&&i===u.height?o:(o.width=u.width=n,o.height=u.height=i,e.bindRenderbuffer(36161,u.renderbuffer),e.renderbufferStorage(36161,u.format,n,i),a.profile&&(u.stats.size=ge[u.format]*u.width*u.height),o)},o._reglType="renderbuffer",o._renderbuffer=u,a.profile&&(o.stats=u.stats),o.destroy=function(){u.decRef()},o},clear:function(){K(c).forEach(o)},restore:function(){K(c).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)})),e.bindRenderbuffer(36161,null)}}},ve=[];ve[6408]=4,ve[6407]=3;var _e=[];_e[5121]=1,_e[5126]=4,_e[36193]=2;var be=["x","y","z","w"],xe="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),we={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ke={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Me={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Te={cw:2304,ccw:2305},Se=new O(!1,!1,!1,(function(){}));return function(e){function t(){if(0===Z.length)w&&w.update(),Q=null;else{Q=V.next(t),d();for(var e=Z.length-1;0<=e;--e){var r=Z[e];r&&r(D,null,0)}g.flush(),w&&w.update()}}function r(){!Q&&0=Z.length&&n()}}}}function c(){var e=G.viewport,t=G.scissor_box;e[0]=e[1]=t[0]=t[1]=0,D.viewportWidth=D.framebufferWidth=D.drawingBufferWidth=e[2]=t[2]=g.drawingBufferWidth,D.viewportHeight=D.framebufferHeight=D.drawingBufferHeight=e[3]=t[3]=g.drawingBufferHeight}function d(){D.tick+=1,D.time=m(),c(),W.procs.poll()}function p(){c(),W.procs.refresh(),w&&w.update()}function m(){return(U()-k)/1e3}if(!(e=a(e)))return null;var g=e.gl,y=g.getContextAttributes();g.isContextLost();var v=function(e,t){function r(t){var r;t=t.toLowerCase();try{r=n[t]=e.getExtension(t)}catch(e){}return!!r}for(var n={},a=0;at;++t)ee(j({framebuffer:e.framebuffer.faces[t]},e),l);else ee(e,l);else l(0,e)},prop:H.define.bind(null,1),context:H.define.bind(null,2),this:H.define.bind(null,3),draw:s({}),buffer:function(e){return I.create(e,34962,!1,!1)},elements:function(e){return O.create(e,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:z.create,framebuffer:Y.create,framebufferCube:Y.createCube,attributes:y,frame:u,on:function(e,t){var r;switch(e){case"frame":return u(t);case"lost":r=X;break;case"restore":r=J;break;case"destroy":r=$}return r.push(t),{cancel:function(){for(var e=0;e * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ "use strict";var n,a="";t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var r=e.length*t;if(n!==e||void 0===n)n=e,a="";else if(a.length>=r)return a.substr(0,r);for(;r>a.length&&t>1;)1&t&&(a+=e),t>>=1,e+=e;return a=(a+=e).substr(0,r)}},{}],502:[function(e,r,n){(function(e){r.exports=e.performance&&e.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],503:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,a=t-2;a>=0;--a){var i=r,o=e[a];(l=o-((r=i+o)-i))&&(e[--n]=r,r=l)}var s=0;for(a=n;a>1;return["sum(",e(t.slice(0,r)),",",e(t.slice(r)),")"].join("")}(t);var n}function d(e){return new Function("sum","scale","prod","compress",["function robustDeterminant",e,"(m){return compress(",c(u(e)),")};return robustDeterminant",e].join(""))(a,i,n,o)}var p=[function(){return[0]},function(e){return[e[0][0]]}];!function(){for(;p.length>1;return["sum(",u(e.slice(0,t)),",",u(e.slice(t)),")"].join("")}function c(e,t){if("m"===e.charAt(0)){if("w"===t.charAt(0)){var r=e.split("[");return["w",t.substr(1),"m",r[0].substr(1)].join("")}return["prod(",e,",",t,")"].join("")}return c(t,e)}function d(e){if(2===e.length)return[["diff(",c(e[0][0],e[1][1]),",",c(e[1][0],e[0][1]),")"].join("")];for(var t=[],r=0;r0&&r.push(","),r.push("[");for(var o=0;o0&&r.push(","),o===a?r.push("+b[",i,"]"):r.push("+A[",i,"][",o,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",t);var s=new Function("det",r.join(""));return s(e<6?n[e]:n)}var o=[function(){return[0]},function(e,t){return[[t[0]],[e[0][0]]]}];!function(){for(;o.length>1;return["sum(",u(e.slice(0,t)),",",u(e.slice(t)),")"].join("")}function c(e){if(2===e.length)return[["sum(prod(",e[0][0],",",e[1][1],"),prod(-",e[0][1],",",e[1][0],"))"].join("")];for(var t=[],r=0;r0){if(i<=0)return o;n=a+i}else{if(!(a<0))return o;if(i>=0)return o;n=-(a+i)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:p(e,t,r)},function(e,t,r,n){var a=e[0]-n[0],i=t[0]-n[0],o=r[0]-n[0],s=e[1]-n[1],l=t[1]-n[1],u=r[1]-n[1],c=e[2]-n[2],d=t[2]-n[2],p=r[2]-n[2],f=i*u,m=o*l,g=o*s,y=a*u,v=a*l,_=i*s,b=c*(f-m)+d*(g-y)+p*(v-_),x=7771561172376103e-31*((Math.abs(f)+Math.abs(m))*Math.abs(c)+(Math.abs(g)+Math.abs(y))*Math.abs(d)+(Math.abs(v)+Math.abs(_))*Math.abs(p));return b>x||-b>x?b:h(e,t,r,n)}];function m(e){var t=f[e.length];return t||(t=f[e.length]=d(e.length)),t.apply(void 0,e)}!function(){for(;f.length<=s;)f.push(d(f.length));for(var e=[],r=["slow"],n=0;n<=s;++n)e.push("a"+n),r.push("o"+n);var a=["function getOrientation(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=s;++n)a.push("case ",n,":return o",n,"(",e.slice(0,n).join(),");");a.push("}var s=new Array(arguments.length);for(var i=0;i0&&o>0||i<0&&o<0)return!1;var s=n(r,e,t),l=n(a,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==i||0!==o||0!==s||0!==l||function(e,t,r,n){for(var a=0;a<2;++a){var i=e[a],o=t[a],s=Math.min(i,o),l=Math.max(i,o),u=r[a],c=n[a],d=Math.min(u,c);if(Math.max(u,c)=n?(a=d,(l+=1)=n?(a=d,(l+=1)0?1:0}},{}],515:[function(e,t,r){"use strict";t.exports=function(e){return a(n(e))};var n=e("boundary-cells"),a=e("reduce-simplicial-complex")},{"boundary-cells":96,"reduce-simplicial-complex":490}],516:[function(e,t,r){"use strict";t.exports=function(e,t,r,s){if(r=r||0,void 0===s&&(s=function(e){for(var t=e.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",a[0],"],c[",a[1],"])")}l.push("]")}l.push(");")}}for(i=e+1;i>1;--i){i>1,s=i(e[o],t);s<=0?(0===s&&(a=o),r=o+1):s>0&&(n=o-1)}return a}function c(e,t){for(var r=new Array(e.length),a=0,o=r.length;a=e.length||0!==i(e[g],s)););}return r}function d(e,t){if(t<0)return[];for(var r=[],a=(1<>>c&1&&u.push(a[c]);t.push(u)}return s(t)},r.skeleton=d,r.boundary=function(e){for(var t=[],r=0,n=e.length;r>1:(e>>1)-1}function _(e){for(var t=y(e);;){var r=t,n=2*e+1,a=2*(e+1),i=e;if(n0;){var r=v(e);if(!(r>=0&&t0){var e=M[0];return g(0,S-1),S-=1,_(0),e}return-1}function w(e,t){var r=M[e];return u[r]===t?e:(u[r]=-1/0,b(e),x(),u[r]=t,b((S+=1)-1))}function k(e){if(!c[e]){c[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),T[t]>=0&&w(T[t],m(t)),T[r]>=0&&w(T[r],m(r))}}var M=[],T=new Array(i);for(d=0;d>1;d>=0;--d)_(d);for(;;){var C=x();if(C<0||u[C]>r)break;k(C)}var L=[];for(d=0;d=0&&r>=0&&t!==r){var n=T[t],a=T[r];n!==a&&E.push([n,a])}})),a.unique(a.normalize(E)),{positions:L,edges:E}};var n=e("robust-orientation"),a=e("simplicial-complex")},{"robust-orientation":508,"simplicial-complex":520}],523:[function(e,t,r){"use strict";t.exports=function(e,t){var r,i,o,s;if(t[0][0]t[1][0]))return a(t,e);r=t[1],i=t[0]}if(e[0][0]e[1][0]))return-a(e,t);o=e[1],s=e[0]}var l=n(r,i,s),u=n(r,i,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=n(s,o,i),u=n(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return i[0]-s[0]};var n=e("robust-orientation");function a(e,t){var r,a,i,o;if(t[0][0]t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),u=Math.min(t[0][1],t[1][1]),c=Math.max(t[0][1],t[1][1]);return lc?s-c:l-c}r=t[1],a=t[0]}e[0][1]0)if(t[0]!==o[1][0])r=e,e=e.right;else{if(l=u(e.right,t))return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l;if(l=u(e.right,t))return l;e=e.left}}return r}function c(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function d(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var r=u(this.slabs[t],e),a=-1;if(r&&(a=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var c=u(this.slabs[t-1],e);c&&(s?o(c.key,s)>0&&(s=c.key,a=c.value):(a=c.value,s=c.key))}var d=this.horizontal[t];if(d.length>0){var p=n.ge(d,e[1],l);if(p=d.length)return a;h=d[p]}}if(h.start)if(s){var f=i(s[0],s[1],[e[0],h.y]);s[0][0]>s[1][0]&&(f=-f),f>0&&(a=h.index)}else a=h.index;else h.y!==e[1]&&(a=h.index)}}}return a}},{"./lib/order-segments":523,"binary-search-bounds":92,"functional-red-black-tree":232,"robust-orientation":508}],525:[function(e,t,r){"use strict";var n=e("robust-dot-product"),a=e("robust-sum");function i(e,t){var r=a(n(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,n){var a=-t/(n-t);a<0?a=0:a>1&&(a=1);for(var i=1-a,o=e.length,s=new Array(o),l=0;l0||a>0&&c<0){var d=o(s,c,l,a);r.push(d),n.push(d.slice())}c<0?n.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),a=c}return{positive:r,negative:n}},t.exports.positive=function(e,t){for(var r=[],n=i(e[e.length-1],t),a=e[e.length-1],s=e[0],l=0;l0||n>0&&u<0)&&r.push(o(a,u,s,n)),u>=0&&r.push(s.slice()),n=u}return r},t.exports.negative=function(e,t){for(var r=[],n=i(e[e.length-1],t),a=e[e.length-1],s=e[0],l=0;l0||n>0&&u<0)&&r.push(o(a,u,s,n)),u<=0&&r.push(s.slice()),n=u}return r}},{"robust-dot-product":505,"robust-sum":513}],526:[function(e,t,r){!function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(r){return function(r,n){var a,i,o,s,l,u,c,d,p,h=1,f=r.length,m="";for(i=0;i=0),s.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,s.width?parseInt(s.width):0);break;case"e":a=s.precision?parseFloat(a).toExponential(s.precision):parseFloat(a).toExponential();break;case"f":a=s.precision?parseFloat(a).toFixed(s.precision):parseFloat(a);break;case"g":a=s.precision?String(Number(a.toPrecision(s.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=s.precision?a.substring(0,s.precision):a;break;case"t":a=String(!!a),a=s.precision?a.substring(0,s.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=s.precision?a.substring(0,s.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=s.precision?a.substring(0,s.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase()}e.json.test(s.type)?m+=a:(!e.number.test(s.type)||d&&!s.sign?p="":(p=d?"+":"-",a=a.toString().replace(e.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(p+a).length,l=s.width&&c>0?u.repeat(c):"",m+=s.align?p+a+l:"0"===u?p+l+a:l+p+a)}return m}(function(t){if(a[t])return a[t];for(var r,n=t,i=[],o=0;n;){if(null!==(r=e.text.exec(n)))i.push(r[0]);else if(null!==(r=e.modulo.exec(n)))i.push("%");else{if(null===(r=e.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],u=[];if(null===(u=e.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=e.key_access.exec(l)))s.push(u[1]);else{if(null===(u=e.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(u[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[t]=i}(r),arguments)}function n(e,r){return t.apply(null,[e].concat(r||[]))}var a=Object.create(null);void 0!==r&&(r.sprintf=t,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=t,window.vsprintf=n)}()},{}],527:[function(e,t,r){"use strict";var n=e("parenthesis");t.exports=function(e,t,r){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(e){return 1===e.length&&(e+=e),e})));var a=n.parse(e,{flat:!0,brackets:r.ignore}),i=a[0].split(t);if(r.escape){for(var o=[],s=0;s0;){t=u[u.length-1];var h=e[t];if(i[t]=0&&s[t].push(o[m])}i[t]=f}else{if(n[t]===r[t]){var g=[],y=[],v=0;for(f=l.length-1;f>=0;--f){var _=l[f];if(a[_]=!1,g.push(_),y.push(s[_]),v+=s[_].length,o[_]=d.length,_===t){l.length=f;break}}d.push(g);var b=new Array(v);for(f=0;f c)|0 },"),"generic"===t&&i.push("getters:[0],");for(var s=[],l=[],u=0;u>>7){"),u=0;u<1<<(1<128&&u%128==0){d.length>0&&p.push("}}");var h="vExtra"+d.length;i.push("case ",u>>>7,":",h,"(m&0x7f,",l.join(),");break;"),p=["function ",h,"(m,",l.join(),"){switch(m){"],d.push(p)}p.push("case ",127&u,":");for(var f=new Array(r),m=new Array(r),g=new Array(r),y=new Array(r),v=0,_=0;__)&&!(u&1<0&&(T="+"+g[b]+"*c");var S=f[b].length/v*.5,C=.5+y[b]/v*.5;M.push("d"+b+"-"+C+"-"+S+"*("+f[b].join("+")+T+")/("+m[b].join("+")+")")}p.push("a.push([",M.join(),"]);","break;")}i.push("}},"),d.length>0&&p.push("}}");var L=[];for(u=0;u<1<1&&(i=1),i<-1&&(i=-1),a*Math.acos(i)};r.default=function(e){var t=e.px,r=e.py,l=e.cx,u=e.cy,c=e.rx,d=e.ry,p=e.xAxisRotation,h=void 0===p?0:p,f=e.largeArcFlag,m=void 0===f?0:f,g=e.sweepFlag,y=void 0===g?0:g,v=[];if(0===c||0===d)return[];var _=Math.sin(h*a/360),b=Math.cos(h*a/360),x=b*(t-l)/2+_*(r-u)/2,w=-_*(t-l)/2+b*(r-u)/2;if(0===x&&0===w)return[];c=Math.abs(c),d=Math.abs(d);var k=Math.pow(x,2)/Math.pow(c,2)+Math.pow(w,2)/Math.pow(d,2);k>1&&(c*=Math.sqrt(k),d*=Math.sqrt(k));var M=function(e,t,r,n,i,o,l,u,c,d,p,h){var f=Math.pow(i,2),m=Math.pow(o,2),g=Math.pow(p,2),y=Math.pow(h,2),v=f*m-f*y-m*g;v<0&&(v=0),v/=f*y+m*g;var _=(v=Math.sqrt(v)*(l===u?-1:1))*i/o*h,b=v*-o/i*p,x=d*_-c*b+(e+r)/2,w=c*_+d*b+(t+n)/2,k=(p-_)/i,M=(h-b)/o,T=(-p-_)/i,S=(-h-b)/o,C=s(1,0,k,M),L=s(k,M,T,S);return 0===u&&L>0&&(L-=a),1===u&&L<0&&(L+=a),[x,w,C,L]}(t,r,l,u,c,d,m,y,_,b,x,w),T=n(M,4),S=T[0],C=T[1],L=T[2],A=T[3],E=Math.abs(A)/(a/4);Math.abs(1-E)<1e-7&&(E=1);var D=Math.max(Math.ceil(E),1);A/=D;for(var P=0;Pt[2]&&(t[2]=u[c+0]),u[c+1]>t[3]&&(t[3]=u[c+1]);return t}},{"abs-svg-path":62,assert:69,"is-svg-path":425,"normalize-svg-path":532,"parse-svg-path":461}],532:[function(e,t,r){"use strict";t.exports=function(e){for(var t,r=[],o=0,s=0,l=0,u=0,c=null,d=null,p=0,h=0,f=0,m=e.length;f4?(o=g[g.length-4],s=g[g.length-3]):(o=p,s=h),r.push(g)}return r};var n=e("svg-arc-to-cubic-bezier");function a(e,t,r,n){return["C",e,t,r,n,r,n]}function i(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}},{"svg-arc-to-cubic-bezier":530}],533:[function(e,t,r){"use strict";var n,a=e("svg-path-bounds"),i=e("parse-svg-path"),o=e("draw-svg-path"),s=e("is-svg-path"),l=e("bitmap-sdf"),u=document.createElement("canvas"),c=u.getContext("2d");t.exports=function(e,t){if(!s(e))throw Error("Argument should be valid svg path string");var r,d;t||(t={}),t.shape?(r=t.shape[0],d=t.shape[1]):(r=u.width=t.w||t.width||200,d=u.height=t.h||t.height||200);var p=Math.min(r,d),h=t.stroke||0,f=t.viewbox||t.viewBox||a(e),m=[r/(f[2]-f[0]),d/(f[3]-f[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(c.fillStyle="black",c.fillRect(0,0,r,d),c.fillStyle="white",h&&("number"!=typeof h&&(h=1),c.strokeStyle=h>0?"white":"black",c.lineWidth=Math.abs(h)),c.translate(.5*r,.5*d),c.scale(g,g),function(){if(null!=n)return n;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return n=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var y=new Path2D(e);c.fill(y),h&&c.stroke(y)}else{var v=i(e);o(c,v),c.fill(),h&&c.stroke()}return c.setTransform(1,0,0,1,0,0),l(c,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*p})}},{"bitmap-sdf":94,"draw-svg-path":169,"is-svg-path":425,"parse-svg-path":461,"svg-path-bounds":531}],534:[function(e,t,r){(function(r){"use strict";t.exports=function e(t,r,a){a=a||{};var o=i[t];o||(o=i[t]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(e){for(var t=e.cells,r=e.positions,n=new Float32Array(6*t.length),a=0,i=0,o=0;o0&&(d+=.02);var h=new Float32Array(c),f=0,m=-.5*d;for(p=0;p1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=E(e,360),t=E(t,100),r=E(r,100),0===t)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=o(l,s,e+1/3),a=o(l,s,e),i=o(l,s,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(t.h,l,c),d=!0,p="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=A(i),{ok:d,format:t.format||p,r:o(255,s(a.r,0)),g:o(255,s(a.g,0)),b:o(255,s(a.b,0)),a:i}}(t);this._originalInput=t,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=i(100*this._a)/100,this._format=l.format||c.format,this._gradientType=l.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=c.ok,this._tc_id=a++}function c(e,t,r){e=E(e,255),t=E(t,255),r=E(r,255);var n,a,i=s(e,t,r),l=o(e,t,r),u=(i+l)/2;if(i==l)n=a=0;else{var c=i-l;switch(a=u>.5?c/(2-i-l):c/(i+l),i){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(u(n));return i}function S(e,t){t=t||6;for(var r=u(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(u({h:n,s:a,v:i})),i=(i+s)%1;return o}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,r,n,a=this.toRgb();return t=a.r/255,r=a.g/255,n=a.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=c(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return p(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var o=[I(i(e).toString(16)),I(i(t).toString(16)),I(i(r).toString(16)),I(F(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*E(this._r,255))+"%",g:i(100*E(this._g,255))+"%",b:i(100*E(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*E(this._r,255))+"%, "+i(100*E(this._g,255))+"%, "+i(100*E(this._b,255))+"%)":"rgba("+i(100*E(this._r,255))+"%, "+i(100*E(this._g,255))+"%, "+i(100*E(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=u(e);r="#"+h(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},u.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:O(e[n]));e=r}return u(e,t)},u.equals=function(e,t){return!(!e||!t)&&u(e).toRgbString()==u(t).toRgbString()},u.random=function(){return u.fromRatio({r:l(),g:l(),b:l()})},u.mix=function(e,t,r){r=0===r?0:r||50;var n=u(e).toRgb(),a=u(t).toRgb(),i=r/100;return u({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},u.readability=function(t,r){var n=u(t),a=u(r);return(e.max(n.getLuminance(),a.getLuminance())+.05)/(e.min(n.getLuminance(),a.getLuminance())+.05)},u.isReadable=function(e,t,r){var n,a,i,o,s,l=u.readability(e,t);switch(a=!1,(i=r,o=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase(),s=(i.size||"small").toLowerCase(),"AA"!==o&&"AAA"!==o&&(o="AA"),"small"!==s&&"large"!==s&&(s="small"),n={level:o,size:s}).level+n.size){case"AAsmall":case"AAAlarge":a=l>=4.5;break;case"AAlarge":a=l>=3;break;case"AAAsmall":a=l>=7}return a},u.mostReadable=function(e,t,r){var n,a,i,o,s=null,l=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var c=0;cl&&(l=n,s=u(t[c]));return u.isReadable(e,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,u.mostReadable(e,["#fff","#000"],r))};var C=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},L=u.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(C);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(t,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(r,s(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function D(e){return o(1,s(0,e))}function P(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}function F(t){return e.round(255*parseFloat(t)).toString(16)}function R(e){return P(e)/255}var z,N,B,j=(N="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",B="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+B),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+B),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+B),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Y(e){return!!j.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=u:window.tinycolor=u}(Math)},{}],536:[function(e,t,r){"use strict";t.exports=a,t.exports.float32=t.exports.float=a,t.exports.fract32=t.exports.fract=function(e){if(e.length){for(var t=a(e),r=0,n=t.length;rd&&(d=l[0]),l[1]p&&(p=l[1])}function a(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(a);break;case"Point":n(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(n)}}if(!t){var i,o,s=r(e),l=new Array(2),u=1/0,c=u,d=-u,p=-u;for(o in e.arcs.forEach((function(e){for(var t=-1,r=e.length;++td&&(d=l[0]),l[1]p&&(p=l[1])})),e.objects)a(e.objects[o]);t=e.bbox=[u,c,d,p]}return t},a=function(e,t){for(var r,n=e.length,a=n-t;a<--n;)r=e[a],e[a++]=e[n],e[n]=r};function i(e,t){var r=t.id,n=t.bbox,a=null==t.properties?{}:t.properties,i=o(e,t);return null==r&&null==n?{type:"Feature",properties:a,geometry:i}:null==n?{type:"Feature",id:r,properties:a,geometry:i}:{type:"Feature",id:r,bbox:n,properties:a,geometry:i}}function o(e,t){var n=r(e),i=e.arcs;function o(e,t){t.length&&t.pop();for(var r=i[e<0?~e:e],o=0,s=r.length;o1)n=function(e,t,r){var n,a=[],i=[];function o(e){var t=e<0?~e:e;(i[t]||(i[t]=[])).push({i:e,g:n})}function s(e){e.forEach(o)}function l(e){e.forEach(s)}return function e(t){switch(n=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),i.forEach(null==r?function(e){a.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&a.push(e[0].i)}),a}(0,t,r);else for(a=0,n=new Array(i=e.arcs.length);a1)for(var i,o,u=1,c=l(a[0]);uc&&(o=a[0],a[0]=a[u],a[u]=o,c=i);return a}))}}var c=function(e,t){for(var r=0,n=e.length;r>>1;e[a]=2))throw new Error("n must be ≥2");if(e.transform)throw new Error("already quantized");var r,a=n(e),i=a[0],o=(a[2]-i)/(t-1)||1,s=a[1],l=(a[3]-s)/(t-1)||1;function u(e){e[0]=Math.round((e[0]-i)/o),e[1]=Math.round((e[1]-s)/l)}function c(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"Point":u(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(u)}}for(r in e.arcs.forEach((function(e){for(var t,r,n,a=1,u=1,c=e.length,d=e[0],p=d[0]=Math.round((d[0]-i)/o),h=d[1]=Math.round((d[1]-s)/l);aMath.max(r,n)?a[2]=1:r>Math.max(t,n)?a[0]=1:a[1]=1;for(var i=0,o=0,l=0;l<3;++l)i+=e[l]*e[l],o+=a[l]*e[l];for(l=0;l<3;++l)a[l]-=o/i*e[l];return s(a,a),a}function p(e,t,r,a,i,o,s,l){this.center=n(r),this.up=n(a),this.right=n(i),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}var h=p.prototype;h.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},h.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},h.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,a=0,i=0;i<3;++i)a+=t[i]*r[i],n+=t[i]*t[i];var l=Math.sqrt(n),c=0;for(i=0;i<3;++i)r[i]-=t[i]*a/n,c+=r[i]*r[i],t[i]/=l;var d=Math.sqrt(c);for(i=0;i<3;++i)r[i]/=d;var p=this.computedToward;o(p,t,r),s(p,p);var h=Math.exp(this.computedRadius[0]),f=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(f),y=Math.sin(f),v=Math.cos(m),_=Math.sin(m),b=this.computedCenter,x=g*v,w=y*v,k=_,M=-g*_,T=-y*_,S=v,C=this.computedEye,L=this.computedMatrix;for(i=0;i<3;++i){var A=x*r[i]+w*p[i]+k*t[i];L[4*i+1]=M*r[i]+T*p[i]+S*t[i],L[4*i+2]=A,L[4*i+3]=0}var E=L[1],D=L[5],P=L[9],I=L[2],O=L[6],F=L[10],R=D*F-P*O,z=P*I-E*F,N=E*O-D*I,B=u(R,z,N);for(R/=B,z/=B,N/=B,L[0]=R,L[4]=z,L[8]=N,i=0;i<3;++i)C[i]=b[i]+L[2+4*i]*h;for(i=0;i<3;++i){c=0;for(var j=0;j<3;++j)c+=L[i+4*j]*C[j];L[12+i]=-c}L[15]=1},h.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var f=[0,0,0];h.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var a=this.computedMatrix;f[0]=a[2],f[1]=a[6],f[2]=a[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,u=0;u<3;++u)a[4*u]=o[u],a[4*u+1]=s[u],a[4*u+2]=l[u];for(i(a,a,n,f),u=0;u<3;++u)o[u]=a[4*u],s[u]=a[4*u+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},h.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var a=this.computedMatrix,i=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],s=a[9],l=u(i,o,s);i/=l,o/=l,s/=l;var c=a[0],d=a[4],p=a[8],h=c*i+d*o+p*s,f=u(c-=i*h,d-=o*h,p-=s*h),m=(c/=f)*t+i*r,g=(d/=f)*t+o*r,y=(p/=f)*t+s*r;this.center.move(e,m,g,y);var v=Math.exp(this.computedRadius[0]);v=Math.max(1e-4,v+n),this.radius.set(e,Math.log(v))},h.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},h.setMatrix=function(e,t,r,n){var i=1;"number"==typeof r&&(i=0|r),(i<0||i>3)&&(i=1);var o=(i+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[i],l=t[i+4],d=t[i+8];if(n){var p=Math.abs(s),h=Math.abs(l),f=Math.abs(d),m=Math.max(p,h,f);p===m?(s=s<0?-1:1,l=d=0):f===m?(d=d<0?-1:1,s=l=0):(l=l<0?-1:1,s=d=0)}else{var g=u(s,l,d);s/=g,l/=g,d/=g}var y,v,_=t[o],b=t[o+4],x=t[o+8],w=_*s+b*l+x*d,k=u(_-=s*w,b-=l*w,x-=d*w),M=l*(x/=k)-d*(b/=k),T=d*(_/=k)-s*x,S=s*b-l*_,C=u(M,T,S);if(M/=C,T/=C,S/=C,this.center.jump(e,U,W,q),this.radius.idle(e),this.up.jump(e,s,l,d),this.right.jump(e,_,b,x),2===i){var L=t[1],A=t[5],E=t[9],D=L*_+A*b+E*x,P=L*M+A*T+E*S;y=R<0?-Math.PI/2:Math.PI/2,v=Math.atan2(P,D)}else{var I=t[2],O=t[6],F=t[10],R=I*s+O*l+F*d,z=I*_+O*b+F*x,N=I*M+O*T+F*S;y=Math.asin(c(R)),v=Math.atan2(N,z)}this.angle.jump(e,v,y),this.recalcMatrix(e);var B=t[2],j=t[6],Y=t[10],H=this.computedMatrix;a(H,t);var V=H[15],U=H[12]/V,W=H[13]/V,q=H[14]/V,G=Math.exp(this.computedRadius[0]);this.center.jump(e,U-B*G,W-j*G,q-Y*G)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},h.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},h.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},h.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var a=(n=n||this.computedUp)[0],i=n[1],o=n[2],s=u(a,i,o);if(!(s<1e-6)){a/=s,i/=s,o/=s;var l=t[0]-r[0],d=t[1]-r[1],p=t[2]-r[2],h=u(l,d,p);if(!(h<1e-6)){l/=h,d/=h,p/=h;var f=this.computedRight,m=f[0],g=f[1],y=f[2],v=a*m+i*g+o*y,_=u(m-=v*a,g-=v*i,y-=v*o);if(!(_<.01&&(_=u(m=i*p-o*d,g=o*l-a*p,y=a*d-i*l))<1e-6)){m/=_,g/=_,y/=_,this.up.set(e,a,i,o),this.right.set(e,m,g,y),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(h));var b=i*y-o*g,x=o*m-a*y,w=a*g-i*m,k=u(b,x,w),M=a*l+i*d+o*p,T=m*l+g*d+y*p,S=(b/=k)*l+(x/=k)*d+(w/=k)*p,C=Math.asin(c(M)),L=Math.atan2(S,T),A=this.angle._state,E=A[A.length-1],D=A[A.length-2];E%=2*Math.PI;var P=Math.abs(E+2*Math.PI-L),I=Math.abs(E-L),O=Math.abs(E-2*Math.PI-L);P0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(d(e),0,e)}function h(e){return new Uint16Array(d(2*e),0,e)}function f(e){return new Uint32Array(d(4*e),0,e)}function m(e){return new Int8Array(d(e),0,e)}function g(e){return new Int16Array(d(2*e),0,e)}function y(e){return new Int32Array(d(4*e),0,e)}function v(e){return new Float32Array(d(4*e),0,e)}function _(e){return new Float64Array(d(8*e),0,e)}function b(e){return o?new Uint8ClampedArray(d(e),0,e):p(e)}function x(e){return new DataView(d(e),0,e)}function w(e){e=a.nextPow2(e);var t=a.log2(e),n=u[t];return n.length>0?n.pop():new r(e)}n.free=function(e){if(r.isBuffer(e))u[a.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,n=0|a.log2(t);l[n].push(e)}},n.freeUint8=n.freeUint16=n.freeUint32=n.freeInt8=n.freeInt16=n.freeInt32=n.freeFloat32=n.freeFloat=n.freeFloat64=n.freeDouble=n.freeUint8Clamped=n.freeDataView=function(e){c(e.buffer)},n.freeArrayBuffer=c,n.freeBuffer=function(e){u[a.log2(e.length)].push(e)},n.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return d(e);switch(t){case"uint8":return p(e);case"uint16":return h(e);case"uint32":return f(e);case"int8":return m(e);case"int16":return g(e);case"int32":return y(e);case"float":case"float32":return v(e);case"double":case"float64":return _(e);case"uint8_clamped":return b(e);case"buffer":return w(e);case"data":case"dataview":return x(e);default:return null}return null},n.mallocArrayBuffer=d,n.mallocUint8=p,n.mallocUint16=h,n.mallocUint32=f,n.mallocInt8=m,n.mallocInt16=g,n.mallocInt32=y,n.mallocFloat32=n.mallocFloat=v,n.mallocFloat64=n.mallocDouble=_,n.mallocUint8Clamped=b,n.mallocDataView=x,n.mallocBuffer=w,n.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.UINT8C[e].length=0,l[e].length=0,u[e].length=0}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"bit-twiddle":93,buffer:106,dup:171}],544:[function(e,t,r){"use strict";function n(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t0&&(i=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,i+"px",n.font].filter((function(e){return e})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(e,t,r,n,i,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(e[1+a]):0,l=i>-1?parseInt(r[1+i]):0;s!==l&&(n=n.replace(z(),"?px "),S*=Math.pow(.75,l-s),n=n.replace("?px ",z())),T+=.25*A*(l-s)}if(!0===o.superscripts){var u=e.indexOf(f),d=r.indexOf(f),h=u>-1?parseInt(e[1+u]):0,m=d>-1?parseInt(r[1+d]):0;h!==m&&(n=n.replace(z(),"?px "),S*=Math.pow(.75,m-h),n=n.replace("?px ",z())),T-=.25*A*(m-h)}if(!0===o.bolds){var g=e.indexOf(c)>-1,v=r.indexOf(c)>-1;!g&&v&&(n=_?n.replace("italic ","italic bold "):"bold "+n),g&&!v&&(n=n.replace("bold ",""))}if(!0===o.italics){var _=e.indexOf(p)>-1,b=r.indexOf(p)>-1;!_&&b&&(n="italic "+n),_&&!b&&(n=n.replace("italic ",""))}t.font=n}for(w=0;w",i="",o=a.length,s=i.length,l=t[0]===f||t[0]===y,u=0,c=-s;u>-1&&-1!==(u=r.indexOf(a,u))&&-1!==(c=r.indexOf(i,u+o))&&!(c<=u);){for(var d=u;d=c)n[d]=null,r=r.substr(0,d)+" "+r.substr(d+1);else if(null!==n[d]){var p=n[d].indexOf(t[0]);-1===p?n[d]+=t:l&&(n[d]=n[d].substr(0,p+1)+(1+parseInt(n[d][p+1]))+n[d].substr(p+2))}var h=u+o,m=r.substr(h,c-h).indexOf(a);u=-1!==m?m:c+s}return n}function b(e,t){var r=n(e,128);return t?i(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function x(e,t,r,n){var a=b(e,n),i=function(e,t,r){for(var n=t.textAlign||"start",a=t.textBaseline||"alphabetic",i=[1<<30,1<<30],o=[0,0],s=e.length,l=0;l=0?t[i]:a}))},has___:{value:_((function(t){var n=v(t);return n?r in n:e.indexOf(t)>=0}))},set___:{value:_((function(n,a){var i,o=v(n);return o?o[r]=a:(i=e.indexOf(n))>=0?t[i]=a:(i=e.length,t[i]=a,e[i]=n),this}))},delete___:{value:_((function(n){var a,i,o=v(n);return o?r in o&&delete o[r]:!((a=e.indexOf(n))<0||(i=e.length-1,e[a]=void 0,t[a]=t[i],e[a]=e[i],e.length=i,t.length=i,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||b();var t,n=new r,a=void 0,i=!1;return t=e?function(e,t){return n.set(e,t),n.has(e)||(a||(a=new m),a.set(e,t)),this}:function(e,t){if(i)try{n.set(e,t)}catch(r){a||(a=new m),a.set___(e,t)}else n.set(e,t);return this},Object.create(m.prototype,{get___:{value:_((function(e,t){return a?n.has(e)?n.get(e):a.get___(e,t):n.get(e,t)}))},has___:{value:_((function(e){return n.has(e)||!!a&&a.has___(e)}))},set___:{value:_(t)},delete___:{value:_((function(e){var t=!!n.delete(e);return a&&a.delete___(e)||t}))},permitHostObjects___:{value:_((function(e){if(e!==g)throw new Error("bogus call to permitHostObjects___");i=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=m.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=m)}function g(e){e.permitHostObjects___&&e.permitHostObjects___(g)}function y(e){return!(e.substr(0,l.length)==l&&"___"===e.substr(e.length-3))}function v(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[u];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return o(e,u,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(e){return}}}function _(e){return e.prototype=null,Object.freeze(e)}function b(){h||"undefined"==typeof console||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],551:[function(e,t,r){var n=e("./hidden-store.js");t.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:n(t,e)}}},{"./hidden-store.js":552}],552:[function(e,t,r){t.exports=function(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?n.apply(this,arguments):r},writable:!0}),r}},{}],553:[function(e,t,r){var n=e("./create-store.js");t.exports=function(){var e=n();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},{"./create-store.js":551}],554:[function(e,t,r){var n=e("get-canvas-context");t.exports=function(e){return n("webgl",e)}},{"get-canvas-context":234}],555:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(l);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var a=this.intercalaryMonth(e);if(r&&t!==a||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);if(t<0||t>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?t>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,r){var a,o=this._validateYear(e,n.local.invalidyear),s=p[o-p[0]],l=s>>9&4095,u=s>>5&15,c=31&s;(a=i.newDate(l,u,c)).add(4-(a.dayOfWeek()||7),"d");var d=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=d[e-d[0]];if(t>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-t?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,s,r,n.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),r=a.day();var o=this.isIntercalaryMonth(e,t),s=this.toChineseMonth(e,t),l=function(e,t,r,n,a){var i,o,s;if("object"==typeof e)o=e,i=t||{};else{var l;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,i=n):(l=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:l}}s=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f>9&4095,(m>>5&15)-1,(31&m)+s);return i.year=g.getFullYear(),i.month=1+g.getMonth(),i.day=g.getDate(),i}(e,s,r,o);return i.toJD(l.year,l.month,l.day)},fromJD:function(e){var t=i.fromJD(e),r=function(e,t,r,n){var a,i;if("object"==typeof e)a=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var o=p[a.year-p[0]],s=a.year<<9|a.month<<5|a.day;i.year=s>=o?a.year:a.year-1,o=p[i.year-p[0]];var l,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(a.year,a.month-1,a.day);l=Math.round((c-u)/864e5);var h,f=d[i.year-d[0]];for(h=0;h<13;h++){var m=f&1<<12-h?30:29;if(l>13;return!g||h=2&&n<=6},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(r=a.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},{"../main":569,"object-assign":455}],558:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":569,"object-assign":455}],559:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),12===t&&this.leapYear(e)?30:8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var s=7;s<=this.monthsInYear(e);s++)o+=this.daysInMonth(e,s);for(s=1;s=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.hebrew=i},{"../main":569,"object-assign":455}],560:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(r=a.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.islamic=i},{"../main":569,"object-assign":455}],561:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),r=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),s=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,s)}}),n.calendars.julian=i},{"../main":569,"object-assign":455}],562:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function s(e,t){return o(e-1,t)+1}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate).day()},weekDay:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),!0},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[s(20+(e-=this.jdEpoch),20),s(e+4,13)]},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),n.calendars.mayan=i},{"../main":569,"object-assign":455}],563:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),n.calendars.nanakshahi=i},{"../main":569,"object-assign":455}],564:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,r=this.minMonth;r<=12;r++)t+=this.NEPALI_CALENDAR_DATA[e][r];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=n.instance(),o=0,s=t,l=e;this._createMissingCalendarData(e);var u=e-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==t&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=i.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],i.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),a=t.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,s=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][o]-s+1;a>l;)++o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e-(e>=0?474:473),s=474+o(i,2820);return r+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),r=Math.floor(t/1029983),n=o(t,1029983),a=2820;if(1029982!==n){var i=Math.floor(n/366),s=o(n,366);a=Math.floor((2134*i+2816*s+2815)/1028522)+i+1}var l=a+2820*r+474;l=l<=0?l-1:l;var u=e-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),d=e-this.toJD(l,c,1)+1;return this.newDate(l,c,d)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":569,"object-assign":455}],566:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":569,"object-assign":455}],567:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),n.calendars.thai=o},{"../main":569,"object-assign":455}],568:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),s=i+1,l=a-12*i,u=t-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(e,t,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":569,"object-assign":455}],569:[function(e,t,r){var n=e("object-assign");function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function s(){this.shortYearCutoff="+10"}function l(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}n(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=a-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var u=t.exports=new a;u.cdate=i,u.baseCalendar=s,u.calendars.gregorian=l},{"object-assign":455}],570:[function(e,t,r){var n=e("object-assign"),a=e("./main");n(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n,i,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,u=r.dayNames||this.local.dayNames,c=r.monthNumbers||this.local.monthNumbers,d=r.monthNamesShort||this.local.monthNamesShort,p=r.monthNames||this.local.monthNames,h=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;w+n1}),f=function(e,t,r,n){var a=""+t;if(h(e,n))for(;a.length1},_=function(e,r){var n=v(e,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),s=t.substring(T).match(o);if(!s)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=s[0].length,parseInt(s[0],10)},b=this,x=function(){if("function"==typeof l){v("m");var e=l.call(b,t.substring(T));return T+=e.length,e}return _("m")},w=function(e,r,n,i){for(var o=v(e,i)?n:r,s=0;s-1){h=1,f=m;for(var L=this.daysInMonth(p,h);f>L;L=this.daysInMonth(p,h))h++,f-=L}return d>-1?this.fromJD(d):this.newDate(p,h,f)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})},{"./main":569,"object-assign":455}],571:[function(e,t,r){t.exports=e("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":147}],572:[function(e,t,r){"use strict";t.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=e("./lib/zc-core")},{"./lib/zc-core":571}],573:[function(e,t,r){"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},{}],574:[function(e,t,r){"use strict";var n=e("./arrow_paths"),a=e("../../plots/font_attributes"),i=e("../../plots/cartesian/constants"),o=e("../../plot_api/plot_template").templatedArray;t.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../plot_api/plot_template":754,"../../plots/cartesian/constants":770,"../../plots/font_attributes":790,"./arrow_paths":573}],575:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./draw").draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=a.getFromId(e,t.xref),n=a.getFromId(e,t.yref);t._extremes={},r&&s(t,r),n&&s(t,n)}))}function s(e,t){var r,n=t._id,i=n.charAt(0),o=e[i],s=e["a"+i],l=e[i+"ref"],u=e["a"+i+"ref"],c=e["_"+i+"padplus"],d=e["_"+i+"padminus"],p={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,f=h+p,m=h-p,g=3*e.startarrowsize*e.arrowwidth||0,y=g+p,v=g-p;if(u===l){var _=a.findExtremes(t,[t.r2c(o)],{ppadplus:f,ppadminus:m}),b=a.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(c,y),ppadminus:Math.max(d,v)});r={min:[_.min[0],b.min[0]],max:[_.max[0],b.max[0]]}}else y=s?y+s:y,v=s?v-s:v,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(c,f,y),ppadminus:Math.max(d,m,v)});e._extremes[n]=r}t.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,o],e)}},{"../../lib":716,"../../plots/cartesian/axes":764,"./draw":580}],576:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("../../plot_api/plot_template").arrayEditor;function o(e,t){var r,n,a,i,o,l,u,c=e._fullLayout.annotations,d=[],p=[],h=[],f=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var r,s,l=o(e,t),u=l.on,c=l.off.concat(l.explicitOff),d={},p=e._fullLayout.annotations;if(u.length||c.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var U=!1,W=["x","y"],q=0;q1)&&(ee===Q?((ue=te.r2fraction(t["a"+$]))<0||ue>1)&&(U=!0):U=!0),G=te._offset+te.r2p(t[$]),X=.5}else"x"===$?(Z=t[$],G=b.l+b.w*Z):(Z=1-t[$],G=b.t+b.h*Z),X=t.showarrow?.5:Z;if(t.showarrow){le.head=G;var ce=t["a"+$];J=ne*Y(.5,t.xanchor)-ae*Y(.5,t.yanchor),ee===Q?(le.tail=te._offset+te.r2p(ce),K=J):(le.tail=G+ce,K=J+ce),le.text=le.tail+J;var de=_["x"===$?"width":"height"];if("paper"===Q&&(le.head=o.constrain(le.head,1,de-1)),"pixel"===ee){var pe=-Math.max(le.tail-3,le.text),he=Math.min(le.tail+3,le.text)-de;pe>0?(le.tail+=pe,le.text+=pe):he>0&&(le.tail-=he,le.text-=he)}le.tail+=se,le.head+=se}else K=J=ie*Y(X,oe),le.text=G+J;le.text+=se,J+=se,K+=se,t["_"+$+"padplus"]=ie/2+K,t["_"+$+"padminus"]=ie/2-K,t["_"+$+"size"]=ie,t["_"+$+"shift"]=J}if(U)I.remove();else{var fe=0,me=0;if("left"!==t.align&&(fe=(w-y)*("center"===t.align?.5:1)),"top"!==t.valign&&(me=(P-v)*("middle"===t.valign?.5:1)),c)n.select("svg").attr({x:R+fe-1,y:R+me}).call(u.setClipUrl,N?S:null,e);else{var ge=R+me-f.top,ye=R+fe-f.left;H.call(d.positionText,ye,ge).call(u.setClipUrl,N?S:null,e)}B.select("rect").call(u.setRect,R,R,w,P),z.call(u.setRect,O/2,O/2,F-O,j-O),I.call(u.setTranslate,Math.round(C.x.text-F/2),Math.round(C.y.text-j/2)),E.attr({transform:"rotate("+L+","+C.x.text+","+C.y.text+")"});var ve,_e=function(r,n){A.selectAll(".annotation-arrow-g").remove();var c=C.x.head,d=C.y.head,p=C.x.tail+r,f=C.y.tail+n,y=C.x.text+r,v=C.y.text+n,_=o.rotationXYMatrix(L,y,v),w=o.apply2DTransform(_),S=o.apply2DTransform2(_),D=+z.attr("width"),P=+z.attr("height"),O=y-.5*D,F=O+D,R=v-.5*P,N=R+P,B=[[O,R,O,N],[O,N,F,N],[F,N,F,R],[F,R,O,R]].map(S);if(!B.reduce((function(e,t){return e^!!o.segmentsIntersect(c,d,c+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){B.forEach((function(e){var t=o.segmentsIntersect(p,f,c,d,e[0],e[1],e[2],e[3]);t&&(p=t.x,f=t.y)}));var j=t.arrowwidth,Y=t.arrowcolor,H=t.arrowside,V=A.append("g").style({opacity:l.opacity(Y)}).classed("annotation-arrow-g",!0),U=V.append("path").attr("d","M"+p+","+f+"L"+c+","+d).style("stroke-width",j+"px").call(l.stroke,l.rgb(Y));if(m(U,H,t),x.annotationPosition&&U.node().parentNode&&!i){var W=c,q=d;if(t.standoff){var G=Math.sqrt(Math.pow(c-p,2)+Math.pow(d-f,2));W+=t.standoff*(p-c)/G,q+=t.standoff*(f-d)/G}var K,Z,X=V.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(p-W)+","+(f-q),transform:"translate("+W+","+q+")"}).style("stroke-width",j+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");h.init({element:X.node(),gd:e,prepFn:function(){var e=u.getTranslate(I);K=e.x,Z=e.y,s&&s.autorange&&k(s._name+".autorange",!0),g&&g.autorange&&k(g._name+".autorange",!0)},moveFn:function(e,r){var n=w(K,Z),a=n[0]+e,i=n[1]+r;I.call(u.setTranslate,a,i),M("x",s?s.p2r(s.r2p(t.x)+e):t.x+e/b.w),M("y",g?g.p2r(g.r2p(t.y)+r):t.y-r/b.h),t.axref===t.xref&&M("ax",s.p2r(s.r2p(t.ax)+e)),t.ayref===t.yref&&M("ay",g.p2r(g.r2p(t.ay)+r)),V.attr("transform","translate("+e+","+r+")"),E.attr({transform:"rotate("+L+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,T());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&_e(0,0),D&&h.init({element:I.node(),gd:e,prepFn:function(){ve=E.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?M("ax",s.p2r(s.r2p(t.ax)+e)):M("ax",t.ax+e),t.ayref===t.yref?M("ay",g.p2r(g.r2p(t.ay)+r)):M("ay",t.ay+r),_e(e,r);else{if(i)return;var a,o;if(s)a=s.p2r(s.r2p(t.x)+e);else{var l=t._xsize/b.w,u=t.x+(t._xshift-t.xshift)/b.w-l/2;a=h.align(u+e/b.w,l,0,1,t.xanchor)}if(g)o=g.p2r(g.r2p(t.y)+r);else{var c=t._ysize/b.h,d=t.y-(t._yshift+t.yshift)/b.h-c/2;o=h.align(d-r/b.h,c,0,1,t.yanchor)}M("x",a),M("y",o),s&&g||(n=h.getCursor(s?.5:a,g?.5:o,t.xanchor,t.yanchor))}E.attr({transform:"translate("+e+","+r+")"+ve}),p(I,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",V(n))},doneFn:function(){p(I),a.call("_guiRelayout",e,T());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,g=t.indexOf("end")>=0,y=d.backoff*h+r.standoff,v=p.backoff*f+r.startstandoff;if("line"===c.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},s={x:+e.attr("x2"),y:+e.attr("y2")};var _=o.x-s.x,b=o.y-s.y;if(u=(l=Math.atan2(b,_))+Math.PI,y&&v&&y+v>Math.sqrt(_*_+b*b))return void D();if(y){if(y*y>_*_+b*b)return void D();var x=y*Math.cos(l),w=y*Math.sin(l);s.x+=x,s.y+=w,e.attr({x2:s.x,y2:s.y})}if(v){if(v*v>_*_+b*b)return void D();var k=v*Math.cos(l),M=v*Math.sin(l);o.x-=k,o.y-=M,e.attr({x1:o.x,y1:o.y})}}else if("path"===c.nodeName){var T=c.getTotalLength(),S="";if(T1){u=!0;break}}u?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*r[0],t.yaxis.r2l(l.y)*r[1],t.zaxis.r2l(l.z)*r[2]]),n(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":813,"../annotations/draw":580}],587:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(e),s=0;s=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}i.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},i.rgb=function(e){return i.tinyRGB(n(e))},i.opacity=function(e){return e?n(e).getAlpha():0},i.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},i.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||l).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},i.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(i.combine(e,l))),(a.isDark()?t?a.lighten(t):l:r?a.darken(r):s).toString()},i.stroke=function(e,t){var r=n(t);e.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(e,t){var r=n(t);e.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,o=Object.keys(e);for(t=0;t0?n>=l:n<=l));a++)n>c&&n0?n>=l:n<=l));a++)n>r[0]&&n1){var Z=Math.pow(10,Math.floor(Math.log(K)/Math.LN10));q*=Z*u.roundUp(K/Z,[2,5,10]),(Math.abs(A.start)/A.size+1e-6)%1<2e-6&&(W.tick0=0)}W.dtick=q}W.domain=[H+B,H+R-B],W.setScale(),e.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var X,J=e.select("."+M.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),$=e.select("."+M.cbaxis),Q=0;function ee(n,a){var i={propContainer:W,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:o._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+s+",."+s+"-math-group").remove(),f.draw(r,n,c(i,a||{}))}return u.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(T)){var e,r=l.l+(t.x+z)*l.w,n=W.title.font.size;e="top"===T?(1-(H+R-B))*l.h+l.t+3+.75*n:(1-(H+B))*l.h+l.t-3-.25*n,ee(W._id+"title",{attributes:{x:r,y:e,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(T)){var i=e.select("."+M.cbtitle),o=i.select("text"),c=[-t.outlinewidth/2,t.outlinewidth/2],d=i.select(".h"+W._id+"title-math-group").node(),h=15.6;if(o.node()&&(h=parseInt(o.node().style.fontSize,10)*x),d?(Q=p.bBox(d).height)>h&&(c[1]-=(Q-h)/2):o.node()&&!o.classed(M.jsPlaceholder)&&(Q=p.bBox(o.node()).height),Q){if(Q+=5,"top"===T)W.domain[1]-=Q/l.h,c[1]*=-1;else{W.domain[0]+=Q/l.h;var f=m.lineCount(o);c[1]+=(1-f)*h}i.attr("transform","translate("+c+")"),W.setScale()}}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-W.domain[1]))+")"),$.attr("transform","translate(0,"+Math.round(-l.t)+")");var y=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).data(D);y.enter().append("rect").classed(M.cbfill,!0).style("stroke","none"),y.exit().remove();var v=S.map(W.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,i){var o=[0===i?S[0]:(D[i]+D[i-1])/2,i===D.length-1?S[1]:(D[i]+D[i+1])/2].map(W.c2p).map(Math.round);o[1]=u.constrain(o[1]+(o[1]>o[0])?1:-1,v[0],v[1]);var s=n.select(this).attr({x:j,width:Math.max(I,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(t._fillgradient)p.gradient(s,r,t._id,"vertical",t._fillgradient,"fill");else{var l=L(e).replace("e-","");s.attr("fill",a(l).toHexString())}}));var _=e.select("."+M.cblines).selectAll("path."+M.cbline).data(g.color&&g.width?P:[]);_.enter().append("path").classed(M.cbline,!0),_.exit().remove(),_.each((function(e){n.select(this).attr("d","M"+j+","+(Math.round(W.c2p(e))+g.width/2%1)+"h"+I).call(p.lineGroupStyle,g.width,C(e),g.dash)})),$.selectAll("g."+W._id+"tick,path").remove();var b=j+I+(t.outlinewidth||0)/2-("outside"===t.ticks?1:0),w=s.calcTicks(W),k=s.makeTransFn(W),A=s.getTickSigns(W)[2];return s.drawTicks(r,W,{vals:"inside"===W.ticks?s.clipEnds(W,w):w,layer:$,path:s.makeTickPath(W,b,A),transFn:k}),s.drawLabels(r,W,{vals:w,layer:$,transFn:k,labelFns:s.makeLabelFns(W,b)})},function(){if(-1===["top","bottom"].indexOf(T)){var e=W.title.font.size,t=W._offset+W._length/2,a=l.l+(W.position||0)*l.w+("right"===W.side?10+e*(W.showticklabels?1:.5):-10-e*(W.showticklabels?.5:0));ee("h"+W._id+"title",{avoid:{selection:n.select(r).selectAll("g."+W._id+"tick"),side:T,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:a,y:t,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},i.previousPromises,function(){var n=I+t.outlinewidth/2+p.bBox($.node()).width;if((X=J.select("text")).node()&&!X.classed(M.jsPlaceholder)){var a,o=J.select(".h"+W._id+"title-math-group").node();a=o&&-1!==["top","bottom"].indexOf(T)?p.bBox(o).width:p.bBox(J.node()).right-j-l.l,n=Math.max(n,a)}var s=2*t.xpad+n+t.borderwidth+t.outlinewidth/2,u=V-U;e.select("."+M.cbbg).attr({x:j-t.xpad-(t.borderwidth+t.outlinewidth)/2,y:U-N,width:Math.max(s,2),height:Math.max(u+2*N,2)}).call(h.fill,t.bgcolor).call(h.stroke,t.bordercolor).style("stroke-width",t.borderwidth),e.selectAll("."+M.cboutline).attr({x:j,y:U+t.ypad+("top"===T?Q:0),width:Math.max(I,2),height:Math.max(u-2*t.ypad-Q,2)}).call(h.stroke,t.outlinecolor).style({fill:"none","stroke-width":t.outlinewidth});var c=({center:.5,right:1}[t.xanchor]||0)*s;e.attr("transform","translate("+(l.l-c)+","+l.t+")");var d={},f=w[t.yanchor],m=k[t.yanchor];"pixels"===t.lenmode?(d.y=t.y,d.t=u*f,d.b=u*m):(d.t=d.b=0,d.yt=t.y+t.len*f,d.yb=t.y-t.len*m);var g=w[t.xanchor],y=k[t.xanchor];if("pixels"===t.thicknessmode)d.x=t.x,d.l=s*g,d.r=s*y;else{var v=s-I;d.l=v*g,d.r=v*y,d.xl=t.x-t.thickness*g,d.xr=t.x+t.thickness*y}i.autoMargin(r,t._id,d)}],r)}(r,t,e);g&&g.then&&(e._promises||[]).push(g),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,s=r._fullLayout._size;l.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,o){e.attr("transform",n+" translate("+r+","+o+")"),a=l.align(t._xLeftFrac+r/s.w,t._thickFrac,0,1,t.xanchor),i=l.align(t._yBottomFrac-o/s.h,t._lenFrac,0,1,t.yanchor);var u=l.getCursor(a,i,t.xanchor,t.yanchor);d(e,u)},doneFn:function(){if(d(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},{"../../constants/alignment":685,"../../lib":716,"../../lib/extend":707,"../../lib/setcursor":736,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../plots/cartesian/axis_defaults":766,"../../plots/cartesian/layout_attributes":776,"../../plots/cartesian/position_defaults":779,"../../plots/plots":825,"../../registry":845,"../color":591,"../colorscale/helpers":602,"../dragelement":609,"../drawing":612,"../titles":678,"./constants":593,d3:164,tinycolor2:535}],596:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e){return n.isPlainObject(e.colorbar)}},{"../../lib":716}],597:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:e("./attributes"),supplyDefaults:e("./defaults"),draw:e("./draw").draw,hasColorbar:e("./has_colorbar")}},{"./attributes":592,"./defaults":594,"./draw":595,"./has_colorbar":596}],598:[function(e,t,r){"use strict";var n=e("../colorbar/attributes"),a=e("../../lib/regex").counter,i=e("./scales.js").scales;function o(e){return"`"+e+"`"}Object.keys(i),t.exports=function(e,t){e=e||"";var r,s=(t=t||{}).cLetter||"c",l=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),u="showScaleDflt"in t?t.showScaleDflt:"z"===s,c="string"==typeof t.colorscaleDflt?i[t.colorscaleDflt]:null,d=t.editTypeOverride||"",p=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):o(p+(r={z:"z",c:"color"}[s]));var h=s+"auto",f=s+"min",m=s+"max",g=s+"mid",y=(o(p+h),o(p+f),o(p+m),{});y[f]=y[m]=void 0;var v={};v[h]=!1;var _={};return"color"===r&&(_.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(_.color.anim=!0)),_[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:y},_[f]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:v},_[m]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:v},_[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y},_.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},_.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},_.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(_.showscale={valType:"boolean",dflt:u,editType:"calc"},_.colorbar=n),t.noColorAxis||(_.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),_}},{"../../lib/regex":732,"../colorbar/attributes":592,"./scales.js":606}],599:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("./helpers").extractOpts;t.exports=function(e,t,r){var o,s=e._fullLayout,l=r.vals,u=r.containerStr,c=u?a.nestedProperty(t,u).get():t,d=i(c),p=!1!==d.auto,h=d.min,f=d.max,m=d.mid,g=function(){return a.aggNums(Math.min,null,l)},y=function(){return a.aggNums(Math.max,null,l)};void 0===h?h=g():p&&(h=c._colorAx&&n(h)?Math.min(h,g()):g()),void 0===f?f=y():p&&(f=c._colorAx&&n(f)?Math.max(f,y()):y()),p&&void 0!==m&&(f-m>m-h?h=m-(f-m):f-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,d._sync("colorscale",o))}},{"../../lib":716,"./helpers":602,"fast-isnumeric":227}],600:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./helpers").hasColorscale,i=e("./helpers").extractOpts;t.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var s=i(o),l=s.auto;(l||void 0===s.min)&&r(o,a.min),(l||void 0===s.max)&&r(o,a.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function f(e,t){t=t||{};for(var r=e.domain,o=e.range,l=o.length,u=new Array(l),c=0;c4/3-s?o:s}},{}],608:[function(e,t,r){"use strict";var n=e("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*t),0,2),a[t][e]}},{"../../lib":716}],609:[function(e,t,r){"use strict";var n=e("mouse-event-offset"),a=e("has-hover"),i=e("has-passive-events"),o=e("../../lib").removeElement,s=e("../../plots/cartesian/constants"),l=t.exports={};l.align=e("./align"),l.getCursor=e("./cursor");var u=e("./unhover");function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(e){var t,r,n,u,p,h,f,m,g=e.gd,y=1,v=g._context.doubleClickDelay,_=e.element;g._mouseDownTime||(g._mouseDownTime=0),_.style.pointerEvents="all",_.onmousedown=x,i?(_._ontouchstart&&_.removeEventListener("touchstart",_._ontouchstart),_._ontouchstart=x,_.addEventListener("touchstart",x,{passive:!1})):_.ontouchstart=x;var b=e.clampFn||function(e,t,r){return Math.abs(e)v&&(y=Math.max(y-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(y,h),!m){var r;try{r=new MouseEvent("click",t)}catch(e){var n=d(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}f.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=c},{"../../lib":716,"../../plots/cartesian/constants":770,"./align":607,"./cursor":608,"./unhover":610,"has-hover":411,"has-passive-events":412,"mouse-event-offset":437}],610:[function(e,t,r){"use strict";var n=e("../../lib/events"),a=e("../../lib/throttle"),i=e("../../lib/dom").getGraphDiv,o=e("../fx/constants"),s=t.exports={};s.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),s.raw(e,t,r)},s.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},{"../../lib/dom":705,"../../lib/events":706,"../../lib/throttle":741,"../fx/constants":624}],611:[function(e,t,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],612:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../registry"),s=e("../color"),l=e("../colorscale"),u=e("../../lib"),c=e("../../lib/svg_text_utils"),d=e("../../constants/xmlns_namespaces"),p=e("../../constants/alignment").LINE_SPACING,h=e("../../constants/interactions").DESELECTDIM,f=e("../../traces/scatter/subtypes"),m=e("../../traces/scatter/make_bubble_size_func"),g=e("../../components/fx/helpers").appendArrayPointValue,y=t.exports={};y.font=function(e,t,r,n){u.isPlainObject(t)&&(n=t.color,r=t.size,t=t.family),t&&e.style("font-family",t),r+1&&e.style("font-size",r+"px"),n&&e.call(s.fill,n)},y.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},y.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},y.setRect=function(e,t,r,n,a){e.call(y.setPosition,t,r).call(y.setSize,n,a)},y.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),o=n.c2p(e.y);return!!(a(i)&&a(o)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",o):t.attr("transform","translate("+i+","+o+")"),!0)},y.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);y.translatePoint(e,a,t,r)}))},y.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},y.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,s=i.xcalendar,l=i.ycalendar,u=o.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each((function(e){y.hideOutsideRangePoint(e,n.select(this),r,a,s,l)}))}))}},y.crispRound=function(e,t,r){return t&&a(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},y.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";s.stroke(t,n||i.color),y.dashLine(t,l,o)},y.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(s.stroke,r||i.color).call(y.dashLine,l,o)}))},y.dashLine=function(e,t,r){r=+r||0,t=y.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},y.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},y.singleFillStyle=function(e){var t=(((n.select(e.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;t&&e.call(s.fill,t)},y.fillGroupStyle=function(e){e.style("stroke-width",0).each((function(e){var t=n.select(this);e[0].trace&&t.call(s.fill,e[0].trace.fillcolor)}))};var v=e("./symbol_defs");y.symbolNames=[],y.symbolFuncs=[],y.symbolNeedLines={},y.symbolNoDot={},y.symbolNoFill={},y.symbolList=[],Object.keys(v).forEach((function(e){var t=v[e];y.symbolList=y.symbolList.concat([t.n,e,t.n+100,e+"-open"]),y.symbolNames[t.n]=e,y.symbolFuncs[t.n]=t.f,t.needLine&&(y.symbolNeedLines[t.n]=!0),t.noDot?y.symbolNoDot[t.n]=!0:y.symbolList=y.symbolList.concat([t.n+200,e+"-dot",t.n+300,e+"-open-dot"]),t.noFill&&(y.symbolNoFill[t.n]=!0)}));var _=y.symbolNames.length,b="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function x(e,t){var r=e%100;return y.symbolFuncs[r](t)+(e>=200?b:"")}y.symbolNumber=function(e){if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=y.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=_||e>=400?0:Math.floor(Math.max(e,0))};var w={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},M=n.format("~.1f"),T={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:w},horizontalreversed:{node:"linearGradient",attrs:w,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};y.gradient=function(e,t,r,a,o,l){for(var c=o.length,d=T[a],p=new Array(c),h=0;h=100,t.attr("d",x(c,l))}var d,p,h,f=!1;if(e.so)h=o.outlierwidth,p=o.outliercolor,d=i.outliercolor;else{var m=(o||{}).width;h=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in e?e.mlcc=n.lineScale(e.mlc):u.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,u.isArrayOrTypedArray(i.color)&&(d=s.defaultLine,f=!0),d="mc"in e?e.mcc=n.markerScale(e.mc):i.color||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}if(e.om)t.call(s.stroke,d).style({"stroke-width":(h||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:h)+"px");var g=i.gradient,v=e.mgt;if(v?f=!0:v=g&&g.type,Array.isArray(v)&&(v=v[0],T[v]||(v=0)),v&&"none"!==v){var _=e.mgc;_?f=!0:_=g.color;var b=r.uid;f&&(b+="-"+e.i),y.gradient(t,a,b,v,[[0,_],[1,d]],"fill")}else s.fill(t,d);h&&s.stroke(t,p)}},y.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=y.tryColorscale(r,""),t.lineScale=y.tryColorscale(r,"line"),o.traceIs(e,"symbols")&&(t.ms2mrc=f.isBubble(e)?m(e):function(){return(r.size||6)/2}),e.selectedpoints&&u.extendFlat(t,y.makeSelectedPointStyleFns(e)),t},y.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},i=r.marker||{},s=n.marker||{},l=a.opacity,c=i.opacity,d=s.opacity,p=void 0!==c,f=void 0!==d;(u.isArrayOrTypedArray(l)||p||f)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?p?c:t:f?d:h*t});var m=a.color,g=i.color,y=s.color;(g||y)&&(t.selectedColorFn=function(e){var t=e.mcc||m;return e.selected?g||t:y||t});var v=a.size,_=i.size,b=s.size,x=void 0!==_,w=void 0!==b;return o.traceIs(e,"symbols")&&(x||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||v/2;return e.selected?x?_/2:t:w?b/2:t}),t},y.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,u=i.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?u||t:c||(u?t:s.addOpacity(t,h))},t},y.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=y.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){s.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,t){var n=t.mx||a.symbol||0,i=r.selectedSizeFn(t);e.attr("d",x(y.symbolNumber(n),i)),t.mrc2=i})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}y.textPointStyle=function(e,t,r){if(e.size()){var a;if(t.selectedpoints){var i=y.makeSelectedTextStyleFns(t);a=i.selectedTextColorFn}var o=t.texttemplate,s=r._fullLayout;e.each((function(e){var i=n.select(this),l=o?u.extractOption(e,t,"txt","texttemplate"):u.extractOption(e,t,"tx","text");if(l||0===l){if(o){var d=t._module.formatLabels?t._module.formatLabels(e,t,s):{},p={};g(p,t,e.i);var h=t._meta||{};l=u.texttemplateString(l,d,s._d3locale,p,e,h)}var f=e.tp||t.textposition,m=L(e,t),v=a?a(e):e.tc||t.textfont.color;i.call(y.font,e.tf||t.textfont.family,m,v).text(l).call(c.convertToTspans,r).call(C,f,m,e.mrc)}else i.remove()}))}},y.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=y.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=L(e,t);s.fill(a,i),C(a,o,l,e.mrc2||e.mrc)}))}};var A=.5;function E(e,t,r,a){var i=e[0]-t[0],o=e[1]-t[1],s=r[0]-t[0],l=r[1]-t[1],u=Math.pow(i*i+o*o,A/2),c=Math.pow(s*s+l*l,A/2),d=(c*c*i-u*u*s)*a,p=(c*c*o-u*u*l)*a,h=3*c*(u+c),f=3*u*(u+c);return[[n.round(t[0]+(h&&d/h),2),n.round(t[1]+(h&&p/h),2)],[n.round(t[0]-(f&&d/f),2),n.round(t[1]-(f&&p/f),2)]]}y.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r=1e4&&(y.savedBBoxes={},I=0),r&&(y.savedBBoxes[r]=g),I++,u.extendFlat({},g)},y.setClipUrl=function(e,t,r){e.attr("clip-path",F(t,r))},y.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},y.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=" translate("+t+", "+r+")").trim(),e[a]("transform",i),i},y.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},y.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+=" scale("+t+", "+r+")").trim(),e[a]("transform",i),i};var R=/\s*sc.*/;y.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":" scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(R,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var z=/translate\([^)]*\)\s*$/;y.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(z);e=1===t&&1===r?[]:["translate("+o+","+s+")","scale("+t+","+r+")","translate("+-o+","+-s+")"],l&&e.push(l),a.attr("transform",e.join(" "))}}))}},{"../../components/fx/helpers":626,"../../constants/alignment":685,"../../constants/interactions":691,"../../constants/xmlns_namespaces":693,"../../lib":716,"../../lib/svg_text_utils":740,"../../registry":845,"../../traces/scatter/make_bubble_size_func":1135,"../../traces/scatter/subtypes":1142,"../color":591,"../colorscale":603,"./symbol_defs":613,d3:164,"fast-isnumeric":227,tinycolor2:535}],613:[function(e,t,r){"use strict";var n=e("d3");t.exports={circle:{n:0,f:function(e){var t=n.round(e,2);return"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"}},square:{n:1,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"}},diamond:{n:2,f:function(e){var t=n.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"Z"}},cross:{n:3,f:function(e){var t=n.round(.4*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H"+t+"V"+r+"H-"+t+"V"+t+"H-"+r+"V-"+t+"H-"+t+"V-"+r+"H"+t+"V-"+t+"H"+r+"Z"}},x:{n:4,f:function(e){var t=n.round(.8*e/Math.sqrt(2),2),r="l"+t+","+t,a="l"+t+",-"+t,i="l-"+t+",-"+t,o="l-"+t+","+t;return"M0,"+t+r+a+i+a+i+o+i+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+","+n.round(e/2,2)+"H"+t+"L0,-"+n.round(e,2)+"Z"}},"triangle-down":{n:6,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+",-"+n.round(e/2,2)+"H"+t+"L0,"+n.round(e,2)+"Z"}},"triangle-left":{n:7,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M"+n.round(e/2,2)+",-"+t+"V"+t+"L-"+n.round(e,2)+",0Z"}},"triangle-right":{n:8,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+n.round(e/2,2)+",-"+t+"V"+t+"L"+n.round(e,2)+",0Z"}},"triangle-ne":{n:9,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+r+",-"+t+"H"+t+"V"+r+"Z"}},"triangle-se":{n:10,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+t+",-"+r+"V"+t+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H-"+t+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+t+","+r+"V-"+t+"H"+r+"Z"}},pentagon:{n:13,f:function(e){var t=n.round(.951*e,2),r=n.round(.588*e,2),a=n.round(-e,2),i=n.round(-.309*e,2);return"M"+t+","+i+"L"+r+","+n.round(.809*e,2)+"H-"+r+"L-"+t+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+t+"L-"+a+","+r+"V-"+r+"L0,-"+t+"Z"}},hexagon2:{n:15,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+t+",0L"+r+",-"+a+"H-"+r+"L-"+t+",0Z"}},octagon:{n:16,f:function(e){var t=n.round(.924*e,2),r=n.round(.383*e,2);return"M-"+r+",-"+t+"H"+r+"L"+t+",-"+r+"V"+r+"L"+r+","+t+"H-"+r+"L-"+t+","+r+"V-"+r+"Z"}},star:{n:17,f:function(e){var t=1.4*e,r=n.round(.225*t,2),a=n.round(.951*t,2),i=n.round(.363*t,2),o=n.round(.588*t,2),s=n.round(-t,2),l=n.round(-.309*t,2),u=n.round(.118*t,2),c=n.round(.809*t,2);return"M"+r+","+l+"H"+a+"L"+i+","+u+"L"+o+","+c+"L0,"+n.round(.382*t,2)+"L-"+o+","+c+"L-"+i+","+u+"L-"+a+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(e){var t=n.round(.66*e,2),r=n.round(.38*e,2),a=n.round(.76*e,2);return"M-"+a+",0l-"+r+",-"+t+"h"+a+"l"+r+",-"+t+"l"+r+","+t+"h"+a+"l-"+r+","+t+"l"+r+","+t+"h-"+a+"l-"+r+","+t+"l-"+r+",-"+t+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+t+","+r+o+t+","+r+o+"0,-"+a+o+"-"+t+","+r+"Z"}},"star-triangle-down":{n:20,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M"+t+",-"+r+o+"-"+t+",-"+r+o+"0,"+a+o+t+",-"+r+"Z"}},"star-square":{n:21,f:function(e){var t=n.round(1.1*e,2),r=n.round(2*e,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+t+",-"+t+a+"-"+t+","+t+a+t+","+t+a+t+",-"+t+a+"-"+t+",-"+t+"Z"}},"star-diamond":{n:22,f:function(e){var t=n.round(1.4*e,2),r=n.round(1.9*e,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+t+",0"+a+"0,"+t+a+t+",0"+a+"0,-"+t+a+"-"+t+",0Z"}},"diamond-tall":{n:23,f:function(e){var t=n.round(.7*e,2),r=n.round(1.4*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},"diamond-wide":{n:24,f:function(e){var t=n.round(1.4*e,2),r=n.round(.7*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},hourglass:{n:25,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"H-"+t+"L"+t+",-"+t+"H-"+t+"Z"},noDot:!0},bowtie:{n:26,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"V-"+t+"L-"+t+","+t+"V-"+t+"Z"},noDot:!0},"circle-cross":{n:27,f:function(e){var t=n.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e){var t=n.round(e,2),r=n.round(e/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e){var t=n.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e){var t=n.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM0,-"+t+"V"+t+"M-"+t+",0H"+t},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e){var t=n.round(1.3*e,2),r=n.round(.65*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var t=n.round(1.4*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e){var t=n.round(1.2*e,2),r=n.round(.85*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var t=n.round(e/2,2),r=n.round(e,2);return"M"+t+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+t+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+","+a+"L0,0M"+t+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+",-"+a+"L0,0M"+t+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M"+a+","+t+"L0,0M"+a+",-"+t+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+a+","+t+"L0,0M-"+a+",-"+t+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var t=n.round(1.4*e,2);return"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e){var t=n.round(1.4*e,2);return"M0,"+t+"V-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e){var t=n.round(e,2);return"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t},needLine:!0,noDot:!0,noFill:!0}}},{d3:164}],614:[function(e,t,r){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],615:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../registry"),i=e("../../plots/cartesian/axes"),o=e("../../lib"),s=e("./compute_error");function l(e,t,r,a){var l=t["error_"+a]||{},u=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var c=s(l),d=0;d0;t.each((function(t){var d,p=t[0].trace,h=p.error_x||{},f=p.error_y||{};p.ids&&(d=function(e){return e.id});var m=o.hasMarkers(p)&&p.marker.maxdisplayed>0;f.visible||h.visible||(t=[]);var g=n.select(this).selectAll("g.errorbar").data(t,d);if(g.exit().remove(),t.length){h.visible||g.selectAll("path.xerror").remove(),f.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var y=g.enter().append("g").classed("errorbar",!0);c&&y.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(g,r.layerClipId,e),g.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}(e,l,u);if(!m||e.vis){var i,o=t.select("path.yerror");if(f.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var d=f.width;i="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(i+="m-"+d+",0h"+2*d),o.size()?c&&(o=o.transition().duration(s.duration).ease(s.easing)):o=t.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var p=t.select("path.xerror");if(h.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var g=(h.copy_ystyle?f:h).width;i="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(i+="m0,-"+g+"v"+2*g),p.size()?c&&(p=p.transition().duration(s.duration).ease(s.easing)):p=t.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),p.attr("d",i)}else p.remove()}}))}}))}},{"../../traces/scatter/subtypes":1142,"../drawing":612,d3:164,"fast-isnumeric":227}],620:[function(e,t,r){"use strict";var n=e("d3"),a=e("../color");t.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},{"../color":591,d3:164}],621:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("./layout_attributes").hoverlabel,i=e("../../lib/extend").extendFlat;t.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":707,"../../plots/font_attributes":790,"./layout_attributes":630}],622:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry");function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}t.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var s=0;s=0&&r.indexx[0]._length||Q<0||Q>w[0]._length)return p.unhoverRaw(e,t)}else $="xpx"in t?t.xpx:x[0]._length/2,Q="ypx"in t?t.ypx:w[0]._length/2;if(t.pointerX=$+x[0]._offset,t.pointerY=Q+w[0]._offset,I="xval"in t?m.flat(l,t.xval):m.p2c(x,$),O="yval"in t?m.flat(l,t.yval):m.p2c(w,Q),!a(I[0])||!a(O[0]))return o.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var te=1/0;for(R=0;RW&&(K.splice(0,W),te=K[0].distance),y&&0!==G&&0===K.length){U.distance=G,U.index=!1;var oe=N._module.hoverPoints(U,H,V,"closest",c._hoverlayer);if(oe&&(oe=oe.filter((function(e){return e.spikeDistance<=G}))),oe&&oe.length){var se,le=oe.filter((function(e){return e.xa.showspikes}));if(le.length){var ue=le[0];a(ue.x0)&&a(ue.y0)&&(se=he(ue),(!X.vLinePoint||X.vLinePoint.spikeDistance>se.spikeDistance)&&(X.vLinePoint=se))}var ce=oe.filter((function(e){return e.ya.showspikes}));if(ce.length){var de=ce[0];a(de.x0)&&a(de.y0)&&(se=he(de),(!X.hLinePoint||X.hLinePoint.spikeDistance>se.spikeDistance)&&(X.hLinePoint=se))}}}}function pe(e,t){for(var r,n=null,a=1/0,i=0;i1||K.length>1)||"closest"===P&&J&&K.length>1,Se=d.combine(c.plot_bgcolor||d.background,c.paper_bgcolor),Ce={hovermode:P,rotateLabels:Te,bgColor:Se,container:c._hoverlayer,outerContainer:c._paperdiv,commonLabelOpts:c.hoverlabel,hoverdistance:c.hoverdistance},Le=T(K,Ce,e);if(function(e,t,r){var n,a,i,o,s,l,u,c=0,d=1,p=e.size(),h=new Array(p),f=0;function m(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,i=r.pos+r.dp+r.size-t.pmax,a>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=i;n=!1}if(n){var u=0;for(o=0;ot.pmax&&u++;for(o=e.length-1;o>=0&&!(u<=0);o--)(l=e[o]).pos>t.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)e[s].dp-=i;for(o=e.length-1;o>=0&&!(u<=0);o--)(l=e[o]).pos+l.dp+l.size>t.pmax&&(l.del=!0,u--)}}}for(e.each((function(e){var n=e[t],a="x"===n._id.charAt(0),i=n.range;0===f&&i&&i[0]>i[1]!==a&&(d=-1),h[f++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?_:1)/2,pmin:0,pmax:a?r.width:r.height}]})),h.sort((function(e,t){return e[0].posref-t[0].posref||d*(t[0].traceIndex-e[0].traceIndex)}));!n&&c<=p;){for(c++,n=!0,o=0;o.01&&v.pmin===b.pmin&&v.pmax===b.pmax){for(s=y.length-1;s>=0;s--)y[s].dp+=a;for(g.push.apply(g,y),h.splice(o+1,1),u=0,s=g.length-1;s>=0;s--)u+=g[s].dp;for(i=u/g.length,s=g.length-1;s>=0;s--)g[s].dp-=i;n=!1}else o++}h.forEach(m)}for(o=h.length-1;o>=0;o--){var x=h[o];for(s=x.length-1;s>=0;s--){var w=x[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(Le,Te?"xa":"ya",c),S(Le,Te),t.target&&t.target.tagName){var Ae=f.getComponentMethod("annotations","hasClickToShow")(e,xe);u(n.select(t.target),Ae?"pointer":"")}t.target&&!i&&function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,be)&&(be&&e.emit("plotly_unhover",{event:t,points:be}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:x,yaxes:w,xvals:I,yvals:O}))}(e,t,r,i)}))},r.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=e.map((function(e){return{color:e.color||d.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,eventData:e.eventData||!1,hovertemplateLabels:e.hovertemplateLabels||!1}})),i=n.select(t.container),o=t.outerContainer?n.select(t.outerContainer):i,s={hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||d.background,container:i,outerContainer:o},l=T(a,s,t.gd),u=0,c=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function T(e,t,r){var a=r._fullLayout,i=t.hovermode,s=t.rotateLabels,u=t.bgColor,p=t.container,h=t.outerContainer,f=t.commonLabelOpts||{},m=t.fontFamily||g.HOVERFONT,v=t.fontSize||g.HOVERFONTSIZE,_=e[0],b=_.xa,x=_.ya,T="y"===i?"yLabel":"xLabel",S=_[T],C=(String(S)||"").split(" ")[0],L=h.node().getBoundingClientRect(),A=L.top,D=L.width,P=L.height,I=void 0!==S&&_.distance<=t.hoverdistance&&("x"===i||"y"===i);if(I){var O,F,R=!0;for(O=0;Oa.width-P?(M=a.width-P,s.attr("d","M"+(P-w)+",0L"+P+","+D+w+"v"+D+(2*k+E.height)+"H-"+P+"V"+D+w+"H"+(P-2*w)+"Z")):s.attr("d","M0,0L"+w+","+D+w+"H"+(k+E.width/2)+"v"+D+(2*k+E.height)+"H-"+(k+E.width/2)+"V"+D+w+"H-"+w+"Z")}else{var I,O,F;"right"===x.side?(I="start",O=1,F="",M=b._offset+b._length):(I="end",O=-1,F="-",M=b._offset),L=x._offset+(_.y0+_.y1)/2,u.attr("text-anchor",I),s.attr("d","M0,0L"+F+w+","+w+"V"+(k+E.height/2)+"h"+F+(2*k+E.width)+"V-"+(k+E.height/2)+"H"+F+w+"V-"+w+"Z");var R,z=E.height/2,N=A-E.top-z,B="clip"+a._uid+"commonlabel"+x._id;if(M"),void 0!==e.yLabel&&(h+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(h+=(h?"z: ":"")+e.zLabel)):I&&e[i+"Label"]===S?h=e[("x"===i?"y":"x")+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(h=e.yLabel):h=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(h+=(h?"
":"")+e.text),void 0!==e.extraText&&(h+=(h?"
":"")+e.extraText),""!==h||e.hovertemplate||(""===p&&t.remove(),h=p);var x=a._d3locale,T=e.hovertemplate||!1,C=e.hovertemplateLabels||e,L=e.eventData[0]||{};T&&(h=(h=o.hovertemplateString(T,C,x,L,e.trace._meta)).replace(M,(function(t,r){return p=E(r,e.nameLength),""})));var O=t.select("text.nums").call(c.font,e.fontFamily||m,e.fontSize||v,e.fontColor||b).text(h).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),F=t.select("text.name"),R=0,z=0;if(p&&p!==h){F.call(c.font,e.fontFamily||m,e.fontSize||v,_).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var N=F.node().getBoundingClientRect();R=N.width+2*k,z=N.height+2*k}else F.remove(),t.select("rect").remove();t.select("path").style({fill:g,stroke:b});var B,j,Y=O.node().getBoundingClientRect(),H=e.xa._offset+(e.x0+e.x1)/2,V=e.ya._offset+(e.y0+e.y1)/2,U=Math.abs(e.x1-e.x0),W=Math.abs(e.y1-e.y0),q=Y.width+w+k+R;if(e.ty0=A-Y.top,e.bx=Y.width+2*k,e.by=Math.max(Y.height+2*k,z),e.anchor="start",e.txwidth=Y.width,e.tx2width=R,e.offset=0,s)e.pos=H,B=V+W/2+q<=P,j=V-W/2-q>=0,"top"!==e.idealAlign&&B||!j?B?(V+=W/2,e.anchor="start"):e.anchor="middle":(V-=W/2,e.anchor="end");else if(e.pos=V,B=H+U/2+q<=D,j=H-U/2-q>=0,"left"!==e.idealAlign&&B||!j)if(B)H+=U/2,e.anchor="start";else{e.anchor="middle";var G=q/2,K=H+G-D,Z=H-G;K>0&&(H-=K),Z<0&&(H+=-Z)}else H-=U/2,e.anchor="end";O.attr("text-anchor",e.anchor),R&&F.attr("text-anchor",e.anchor),t.attr("transform","translate("+H+","+V+")"+(s?"rotate("+y+")":""))})),B}function S(e,t){e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a=r.select("text.nums"),i=e.anchor,o="end"===i?-1:1,s={start:1,end:-1,middle:0}[i],u=s*(w+k),d=u+s*(e.txwidth+k),p=0,h=e.offset;"middle"===i&&(u-=e.tx2width/2,d+=e.txwidth/2+k),t&&(h*=-x,p=e.offset*b),r.select("path").attr("d","middle"===i?"M-"+(e.bx/2+e.tx2width/2)+","+(h-e.by/2)+"h"+e.bx+"v"+e.by+"h-"+e.bx+"Z":"M0,0L"+(o*w+p)+","+(w+h)+"v"+(e.by/2-w)+"h"+o*e.bx+"v-"+e.by+"H"+(o*w+p)+"V"+(h-w)+"Z");var f=u+p,m=h+e.ty0-e.by/2+k,g=e.textAlign||"auto";"auto"!==g&&("left"===g&&"start"!==i?(a.attr("text-anchor","start"),f="middle"===i?-e.bx/2-e.tx2width/2+k:-e.bx-k):"right"===g&&"end"!==i&&(a.attr("text-anchor","end"),f="middle"===i?e.bx/2-e.tx2width/2-k:e.bx+k)),a.call(l.positionText,f,m),e.tx2width&&(r.select("text.name").call(l.positionText,d+s*k+p,h+e.ty0-e.by/2+k),r.select("rect").call(c.setRect,d+(s-1)*e.tx2width/2+p,h-e.by/2-1,e.tx2width,e.by+2))}))}function C(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],s=e.cd[r]||{};function l(e){return e||a(e)&&0===e}var u=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return l(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(s,n,e,t)};function c(t,r,n){var a=u(r,n);l(a)&&(e[t]=a)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:h.hoverLabelText(e.xa,e.xLabelVal),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:h.hoverLabelText(e.ya,e.yLabelVal),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var d=h.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+h.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+d,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var p=h.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+p+" / -"+h.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+p,"y"===t&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===f.indexOf("y")&&(e.yLabel=void 0),-1===f.indexOf("z")&&(e.zLabel=void 0),-1===f.indexOf("text")&&(e.text=void 0),-1===f.indexOf("name")&&(e.name=void 0)),e}function L(e,t,r){var n,a,o=r.container,s=r.fullLayout,l=s._size,u=r.event,p=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||p){var m=d.combine(s.plot_bgcolor,s.paper_bgcolor);if(p){var g,y,v=t.hLinePoint;n=v&&v.xa,"cursor"===(a=v&&v.ya).spikesnap?(g=u.pointerX,y=u.pointerY):(g=n._offset+v.x,y=a._offset+v.y);var _,b,x=i.readability(v.color,m)<1.5?d.contrast(m):v.color,w=a.spikemode,k=a.spikethickness,M=a.spikecolor||x,T=h.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(_=T,b=g),-1!==w.indexOf("across")){var S=a._counterDomainMin,C=a._counterDomainMax;"free"===a.anchor&&(S=Math.min(S,a.position),C=Math.max(C,a.position)),_=l.l+S*l.w,b=l.l+C*l.w}o.insert("line",":first-child").attr({x1:_,x2:b,y1:y,y2:y,"stroke-width":k,stroke:M,"stroke-dasharray":c.dashStyle(a.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:_,x2:b,y1:y,y2:y,"stroke-width":k+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:T+("right"!==a.side?k:-k),cy:y,r:k,fill:M}).classed("spikeline",!0)}if(f){var L,A,E=t.vLinePoint;n=E&&E.xa,a=E&&E.ya,"cursor"===n.spikesnap?(L=u.pointerX,A=u.pointerY):(L=n._offset+E.x,A=a._offset+E.y);var D,P,I=i.readability(E.color,m)<1.5?d.contrast(m):E.color,O=n.spikemode,F=n.spikethickness,R=n.spikecolor||I,z=h.getPxPosition(e,n);if(-1!==O.indexOf("toaxis")||-1!==O.indexOf("across")){if(-1!==O.indexOf("toaxis")&&(D=z,P=A),-1!==O.indexOf("across")){var N=n._counterDomainMin,B=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),B=Math.max(B,n.position)),D=l.t+(1-B)*l.h,P=l.t+(1-N)*l.h}o.insert("line",":first-child").attr({x1:L,x2:L,y1:D,y2:P,"stroke-width":F,stroke:R,"stroke-dasharray":c.dashStyle(n.spikedash,F)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:L,x2:L,y1:D,y2:P,"stroke-width":F+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==O.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:L,cy:z-("top"!==n.side?F:-F),r:F,fill:R}).classed("spikeline",!0)}}}function A(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function E(e,t){return l.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}},{"../../lib":716,"../../lib/events":706,"../../lib/override_cursor":727,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../registry":845,"../color":591,"../dragelement":609,"../drawing":612,"./constants":624,"./helpers":626,d3:164,"fast-isnumeric":227,tinycolor2:535}],628:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r,a){r("hoverlabel.bgcolor",(a=a||{}).bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},{"../../lib":716}],629:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../dragelement"),o=e("./helpers"),s=e("./layout_attributes"),l=e("./hover");t.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:s},attributes:e("./attributes"),layoutAttributes:s,supplyLayoutGlobalDefaults:e("./layout_global_defaults"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:l.hover,unhover:i.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":716,"../dragelement":609,"./attributes":621,"./calc":622,"./click":623,"./constants":624,"./defaults":625,"./helpers":626,"./hover":627,"./layout_attributes":630,"./layout_defaults":631,"./layout_global_defaults":632,d3:164}],630:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../plots/font_attributes")({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1],editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:20,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":790,"./constants":624}],631:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){function i(r,i){return n.coerce(e,t,a,r,i)}var o,s=i("clickmode");"select"===i("dragmode")&&i("selectdirection"),t._has("cartesian")?s.indexOf("select")>-1?o="closest":(t._isHoriz=function(e,t){for(var r=t._scatterStackOpts||{},n=0;n1){p||h||f||"independent"===M("pattern")&&(p=!0),g._hasSubplotGrid=p;var _,b,x="top to bottom"===M("roworder"),w=p?.2:.1,k=p?.3:.1;m&&t._splomGridDflt&&(_=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:c("x",M,w,_,v),y:c("y",M,k,b,y,x)}}else delete t.grid}function M(e,t){return n.coerce(r,g,l,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,s,l,c,p=e.grid||{},h=t._subplots,f=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(f){var _=p.subplots||[];l=r.subplots=new Array(m);var b=1;for(n=0;n1);if(!1!==m||u.uirevision){var g,y,v,_=i.newContainer(t,"legend");b("uirevision",t.uirevision),!1!==m&&(b("bgcolor",t.paper_bgcolor),b("bordercolor"),b("borderwidth"),a.coerceFont(b,"font",t.font),"h"===b("orientation")?(g=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(y=1.1,v="bottom"):(y=-.1,v="top")):(g=1.02,y=1,v="auto"),b("traceorder",p),l.isGrouped(t.legend)&&b("tracegroupgap"),b("itemsizing"),b("itemclick"),b("itemdoubleclick"),b("x",g),b("xanchor"),b("y",y),b("yanchor",v),b("valign"),a.noneOrAll(u,_,["x","y"]))}function b(e,t){return a.coerce(u,_,o,e,t)}}},{"../../lib":716,"../../plot_api/plot_template":754,"../../plots/layout_attributes":816,"../../registry":845,"./attributes":639,"./helpers":645}],642:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib/events"),l=e("../dragelement"),u=e("../drawing"),c=e("../color"),d=e("../../lib/svg_text_utils"),p=e("./handle_click"),h=e("./constants"),f=e("../../constants/alignment"),m=f.LINE_SPACING,g=f.FROM_TL,y=f.FROM_BR,v=e("./get_legend_data"),_=e("./style"),b=e("./helpers");function x(e,t,r,n,a){var i=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(l.group=i._group),o.traceIs(i,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(e,"plotly_legendclick",l)&&(1===n?t._clickTimeout=setTimeout((function(){p(r,e,n)}),e._context.doubleClickDelay):2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&p(r,e,n)))}function w(e,t){var r=e.data()[0][0],n=t._fullLayout,i=n.legend,s=r.trace,l=o.traceIs(s,"pie-like"),c=s.index,p=t._context.edits.legendText&&!l,f=i._maxNameLength,g=l?r.label:s.name;s._meta&&(g=a.templateString(g,s._meta));var y=a.ensureSingle(e,"text","legendtext");function v(r){d.convertToTspans(r,t,(function(){!function(e,t){var r=e.data()[0][0];if(r.trace.showlegend){var n,a,i=e.select("g[class*=math-group]"),o=i.node(),s=t._fullLayout.legend.font.size*m;if(o){var l=u.bBox(o);n=l.height,a=l.width,u.setTranslate(i,0,n/4)}else{var c=e.select(".legendtext"),p=d.lineCount(c),f=c.node();n=s*p,a=f?u.bBox(f).width:0;var g=s*(.3+(1-p)/2);d.positionText(c,h.textGap,g)}r.lineHeight=s,r.height=Math.max(n,16)+3,r.width=a}else e.remove()}(e,t)}))}y.attr("text-anchor","start").classed("user-select-none",!0).call(u.font,n.legend.font).text(p?k(g,f):g),d.positionText(y,h.textGap,0),p?y.call(d.makeEditable,{gd:t,text:g}).call(v).on("edit",(function(e){this.text(k(e,f)).call(v);var n=r.trace._fullInput||{},i={};if(o.hasTransform(n,"groupby")){var s=o.getTransformIndices(n,"groupby"),l=s[s.length-1],u=a.keyedContainer(n,"transforms["+l+"].styles","target","value.name");u.set(r.trace._group,e),i=u.constructUpdate()}else i.name=e;return o.call("_guiRestyle",t,i,c)})):v(y)}function k(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function M(e,t){var r,i=t._context.doubleClickDelay,o=1,s=a.ensureSingle(e,"rect","legendtoggle",(function(e){e.style("cursor","pointer").attr("pointer-events","all").call(c.fill,"rgba(0,0,0,0)")}));s.on("mousedown",(function(){(r=(new Date).getTime())-t._legendMouseDownTimei&&(o=Math.max(o-1,1)),x(t,r,e,o,n.event)}}))}function T(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function S(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e){var t=e._fullLayout,r="legend"+t._uid;if(t._infolayer&&e.calcdata){e._legendMouseDownTime||(e._legendMouseDownTime=0);var s=t.legend,d=t.showlegend&&v(e.calcdata,s),p=t.hiddenlabels||[];if(!t.showlegend||!d.length)return t._infolayer.selectAll(".legend").remove(),t._topdefs.select("#"+r).remove(),i.autoMargin(e,"legend");var f=a.ensureSingle(t._infolayer,"g","legend",(function(e){e.attr("pointer-events","all")})),m=a.ensureSingleById(t._topdefs,"clipPath",r,(function(e){e.append("rect")})),k=a.ensureSingle(f,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));k.call(c.stroke,s.bordercolor).call(c.fill,s.bgcolor).style("stroke-width",s.borderwidth+"px");var C=a.ensureSingle(f,"g","scrollbox"),L=a.ensureSingle(f,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(c.fill,h.scrollBarColor)})),A=C.selectAll("g.groups").data(d);A.enter().append("g").attr("class","groups"),A.exit().remove();var E=A.selectAll("g.traces").data(a.identity);E.enter().append("g").attr("class","traces"),E.exit().remove(),E.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==p.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(w,e)})).call(_,e).each((function(){n.select(this).call(M,e)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r){var a=e._fullLayout,i=a.legend,o=a._size,s=b.isVertical(i),l=b.isGrouped(i),c=i.borderwidth,d=2*c,p=h.textGap,f=h.itemGap,m=2*(c+f),g=S(i),y=i.y<0||0===i.y&&"top"===g,v=i.y>1||1===i.y&&"bottom"===g;i._maxHeight=Math.max(y||v?a.height/2:o.h,30);var _=0;if(i._width=0,i._height=0,s)r.each((function(e){var t=e[0].height;u.setTranslate(this,c,f+c+i._height+t/2),i._height+=t,i._width=Math.max(i._width,e[0].width)})),_=p+i._width,i._width+=f+p+d,i._height+=m,l&&(t.each((function(e,t){u.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var x=T(i),w=i.x<0||0===i.x&&"right"===x,k=i.x>1||1===i.x&&"left"===x,M=v||y,C=a.width/2;i._maxWidth=Math.max(w?M&&"left"===x?o.l+o.w:C:k?M&&"right"===x?o.r+o.w:C:o.w,2*p);var L=0,A=0;r.each((function(e){var t=e[0].width+p;L=Math.max(L,t),A+=t})),_=null;var E=0;if(l){var D=0,P=0,I=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=r[0].height;u.setTranslate(this,0,f+c+n/2+t),t+=n,e=Math.max(e,p+r[0].width)})),D=Math.max(D,t);var r=e+f;r+c+P>i._maxWidth&&(E=Math.max(E,P),P=0,I+=D+i.tracegroupgap,D=t),u.setTranslate(this,P,I),P+=r})),i._width=Math.max(E,P)+c,i._height=I+D+m}else{var O=r.size(),F=A+d+(O-1)*fi._maxWidth&&(E=Math.max(E,B),z=0,N+=R,i._height+=R,R=0),u.setTranslate(this,c+z,f+c+t/2+N),B=z+r+f,z+=n,R=Math.max(R,t)})),F?(i._width=z+d,i._height=R+m):(i._width=Math.max(E,B)+d,i._height+=R+m)}}i._width=Math.ceil(i._width),i._height=Math.ceil(i._height),i._effHeight=Math.min(i._height,i._maxHeight);var j=e._context.edits,Y=j.legendText||j.legendPosition;r.each((function(e){var t=n.select(this).select(".legendtoggle"),r=e[0].height,a=Y?p:_||p+e[0].width;s||(a+=f/2),u.setRect(t,0,-r/2,a,r)}))}(e,A,E)},function(){if(!function(e){var t=e._fullLayout.legend,r=T(t),n=S(t);return i.autoMargin(e,"legend",{x:t.x,y:t.y,l:t._width*g[r],r:t._width*y[r],b:t._effHeight*y[n],t:t._effHeight*g[n]})}(e)){var c,d,p,v,_=t._size,b=s.borderwidth,w=_.l+_.w*s.x-g[T(s)]*s._width,M=_.t+_.h*(1-s.y)-g[S(s)]*s._effHeight;if(t.margin.autoexpand){var A=w,E=M;w=a.constrain(w,0,t.width-s._width),M=a.constrain(M,0,t.height-s._effHeight),w!==A&&a.log("Constrain legend.x to make legend fit inside graph"),M!==E&&a.log("Constrain legend.y to make legend fit inside graph")}if(u.setTranslate(f,w,M),L.on(".drag",null),f.on("wheel",null),s._height<=s._maxHeight||e._context.staticPlot)k.attr({width:s._width-b,height:s._effHeight-b,x:b/2,y:b/2}),u.setTranslate(C,0,0),m.select("rect").attr({width:s._width-2*b,height:s._effHeight-2*b,x:b,y:b}),u.setClipUrl(C,r,e),u.setRect(L,0,0,0,0),delete s._scrollY;else{var D,P,I,O=Math.max(h.scrollBarMinHeight,s._effHeight*s._effHeight/s._height),F=s._effHeight-O-2*h.scrollBarMargin,R=s._height-s._effHeight,z=F/R,N=Math.min(s._scrollY||0,R);k.attr({width:s._width-2*b+h.scrollBarWidth+h.scrollBarMargin,height:s._effHeight-b,x:b/2,y:b/2}),m.select("rect").attr({width:s._width-2*b+h.scrollBarWidth+h.scrollBarMargin,height:s._effHeight-2*b,x:b,y:b+N}),u.setClipUrl(C,r,e),Y(N,O,z),f.on("wheel",(function(){Y(N=a.constrain(s._scrollY+n.event.deltaY/F*R,0,R),O,z),0!==N&&N!==R&&n.event.preventDefault()}));var B=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;D="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,I=N})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(P="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,Y(N=function(e,t,r){var n=(r-t)/z+e;return a.constrain(n,0,R)}(I,D,P),O,z))}));L.call(B);var j=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(D=e.changedTouches[0].clientY,I=N)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(P=e.changedTouches[0].clientY,Y(N=function(e,t,r){var n=(t-r)/z+e;return a.constrain(n,0,R)}(I,D,P),O,z))}));C.call(j)}e._context.edits.legendPosition&&(f.classed("cursor-move",!0),l.init({element:f.node(),gd:e,prepFn:function(){var e=u.getTranslate(f);p=e.x,v=e.y},moveFn:function(e,t){var r=p+e,n=v+t;u.setTranslate(f,r,n),c=l.align(r,0,_.l,_.l+_.w,s.xanchor),d=l.align(n,0,_.t+_.h,_.t,s.yanchor)},doneFn:function(){void 0!==c&&void 0!==d&&o.call("_guiRelayout",e,{"legend.x":c,"legend.y":d})},clickFn:function(r,n){var a=t._infolayer.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return n.clientX>=e.left&&n.clientX<=e.right&&n.clientY>=e.top&&n.clientY<=e.bottom}));a.size()>0&&x(e,f,a,r,n)}}))}function Y(t,r,n){s._scrollY=e._fullLayout.legend._scrollY=t,u.setTranslate(C,0,-t),u.setRect(L,s._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),m.select("rect").attr("y",b+t)}}],e)}}},{"../../constants/alignment":685,"../../lib":716,"../../lib/events":706,"../../lib/svg_text_utils":740,"../../plots/plots":825,"../../registry":845,"../color":591,"../dragelement":609,"../drawing":612,"./constants":640,"./get_legend_data":643,"./handle_click":644,"./helpers":645,"./style":647,d3:164}],643:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./helpers");t.exports=function(e,t){var r,i,o={},s=[],l=!1,u={},c=0,d=0;function p(e,r){if(""!==e&&a.isGrouped(t))-1===s.indexOf(e)?(s.push(e),l=!0,o[e]=[[r]]):o[e].push([r]);else{var n="~~i"+c;s.push(n),o[n]=[[r]],c++}}for(r=0;r0))return 0;a=t.width}return v?n:Math.min(a,r)};function b(e,t,r){var i=e[0].trace,o=i.marker||{},l=o.line||{},u=r?i.visible&&i.type===r:a.traceIs(i,"bar"),c=n.select(t).select("g.legendpoints").selectAll("path.legend"+r).data(u?[e]:[]);c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),c.exit().remove(),c.each((function(e){var t=n.select(this),r=e[0],a=_(r.mlw,o.line,g,f);t.style("stroke-width",a+"px").call(s.fill,r.mc||o.color),a&&s.stroke(t,r.mlc||l.color)}))}function x(e,t,r){var o=e[0],s=o.trace,l=r?s.visible&&s.type===r:a.traceIs(s,r),u=n.select(t).select("g.legendpoints").selectAll("path.legend"+r).data(l?[e]:[]);if(u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.size()){var p=(s.marker||{}).line,h=_(d(p.width,o.pts),p,g,f),m=i.minExtend(s,{marker:{line:{width:h}}});m.marker.line.color=p.color;var y=i.minExtend(o,{trace:m});c(u,y,m)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var o=r.valign,s=e[0].lineHeight,l=e[0].height;if("middle"!==o&&s&&l){var u={top:1,bottom:-1}[o]*(.5*(s-l+3));a.attr("transform","translate(0,"+u+")")}else a.attr("transform",null);a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var c=a.selectAll("g.legendsymbols").data([e]);c.enter().append("g").classed("legendsymbols",!0),c.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var t=e[0].trace,r=[];t.visible&&"waterfall"===t.type&&(r=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(r);a.enter().append("path").classed("legendwaterfall",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),a.exit().remove(),a.each((function(e){var r=n.select(this),a=t[e[0]].marker,i=_(void 0,a.line,g,f);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){b(e,this,"funnel")})).each((function(e){b(e,this)})).each((function(e){var r=e[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),l.exit().remove(),l.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=_(void 0,r.line,g,f);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var u=i.minExtend(r,{marker:{size:v?p:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,u,t)}}))})).each((function(e){x(e,this,"funnelarea")})).each((function(e){x(e,this,"pie")})).each((function(e){var r,a,s=e[0],c=s.trace,d=c.visible&&c.fill&&"none"!==c.fill,p=u.hasLines(c),f=c.contours,g=!1,v=!1,b=l(c),x=b.colorscale,w=b.reversescale;if(f){var k=f.coloring;"lines"===k?g=!0:p="none"===k||"heatmap"===k||f.showlines,"constraint"===f.type?d="="!==f._operation:"fill"!==k&&"heatmap"!==k||(v=!0)}var M=u.hasMarkers(c)||u.hasText(c),T=d||v,S=p||g,C=M||!T?"M5,0":S?"M5,-2":"M5,-3",L=n.select(this),A=L.select(".legendfill").selectAll("path").data(d||v?[e]:[]);if(A.enter().append("path").classed("js-fill",!0),A.exit().remove(),A.attr("d",C+"h30v6h-30z").call(d?o.fillGroupStyle:function(e){if(e.size()){var r="legendfill-"+c.uid;o.gradient(e,t,r,y(w),x,"fill")}}),p||g){var E=_(void 0,c.line,m,h);a=i.minExtend(c,{line:{width:E}}),r=[i.minExtend(s,{trace:a})]}var D=L.select(".legendlines").selectAll("path").data(p||g?[r]:[]);D.enter().append("path").classed("js-line",!0),D.exit().remove(),D.attr("d",C+(g?"l30,0.0001":"h30")).call(p?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+c.uid;o.lineGroupStyle(e),o.gradient(e,t,r,y(w),x,"stroke")}})})).each((function(e){var r,a,s=e[0],l=s.trace,c=u.hasMarkers(l),d=u.hasText(l),m=u.hasLines(l);function g(e,t,r,n){var a=i.nestedProperty(l,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function y(e){return e[0]}if(c||d||m){var _={},b={};if(c){_.mc=g("marker.color",y),_.mx=g("marker.symbol",y),_.mo=g("marker.opacity",i.mean,[.2,1]),_.mlc=g("marker.line.color",y),_.mlw=g("marker.line.width",i.mean,[0,5],f),b.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var x=g("marker.size",i.mean,[2,16],p);_.ms=x,b.marker.size=x}m&&(b.line={width:g("line.width",y,[0,10],h)}),d&&(_.tx="Aa",_.tp=g("textposition",y),_.ts=10,_.tc=g("textfont.color",y),_.tf=g("textfont.family",y)),r=[i.minExtend(s,_)],(a=i.minExtend(l,b)).selectedpoints=null,a.texttemplate=null}var w=n.select(this).select("g.legendpoints"),k=w.selectAll("path.scatterpts").data(c?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),k.exit().remove(),k.call(o.pointStyle,a,t),c&&(r[0].mrc=3);var M=w.selectAll("g.pointtext").data(d?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),M.exit().remove(),M.selectAll("text").call(o.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=_(void 0,i.line,g,f);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],l=_(void 0,i.line,g,f);a.style("fill","none").call(o.dashLine,i.line.dash,l),l&&s.stroke(a,i.line.color)}))}))}},{"../../lib":716,"../../registry":845,"../../traces/pie/helpers":1097,"../../traces/pie/style_one":1103,"../../traces/scatter/subtypes":1142,"../color":591,"../colorscale/helpers":602,"../drawing":612,d3:164}],648:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../plots/plots"),i=e("../../plots/cartesian/axis_ids"),o=e("../../lib"),s=e("../../fonts/ploticon"),l=o._,u=t.exports={};function c(e,t){var r,a,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=e._fullLayout,c={},d=i.list(e,null,!0),p=u._cartesianSpikesEnabled;if("zoom"===s){var h,f="in"===l?.5:2,m=(1+f)/2,g=(1-f)/2;for(a=0;a1?(T=["toggleHover"],S=["resetViews"]):p?(M=["zoomInGeo","zoomOutGeo"],T=["hoverClosestGeo"],S=["resetGeo"]):d?(T=["hoverClosest3d"],S=["resetCameraDefault3d","resetCameraLastSave3d"]):y?(T=["toggleHover"],S=["resetViewMapbox"]):m?T=["hoverClosestGl2d"]:h?T=["hoverClosestPie"]:_?(T=["hoverClosestCartesian","hoverCompareCartesian"],S=["resetViewSankey"]):T=["toggleHover"],c&&(T=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),function(e){for(var t=0;t0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i0?p+u:u;return{ppad:u,ppadplus:c?f:m,ppadminus:c?m:f}}return{ppad:u}}function c(e,t,r,n,a){var s="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(r)];if(n){var l,u,c,d,p=1/0,h=-1/0,f=n.match(i.segmentRE);for("date"===e.type&&(s=o.decodeDate(s)),l=0;lh&&(h=d)));return h>=p?[p,h]:void 0}}t.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o10?e/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:F?V(r.xanchor)+r.x0:V(r.x0),cy:R?U(r.yanchor)-r.y0:U(r.y0),r:i}).style(a).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:F?V(r.xanchor)+r.x1:V(r.x1),cy:R?U(r.yanchor)-r.y1:U(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():t,K={element:G.node(),gd:e,prepFn:function(n){F&&(x=V(r.xanchor)),R&&(w=U(r.yanchor)),"path"===r.type?D=r.path:(y=F?r.x0:V(r.x0),v=R?r.y0:U(r.y0),_=F?r.x1:V(r.x1),b=R?r.y1:U(r.y1)),y<_?(T=y,A="x0",S=_,E="x1"):(T=_,A="x1",S=y,E="x0"),!R&&vb?(k=v,C="y0",M=b,L="y1"):(k=b,C="y1",M=v,L="y0"),Z(n),$(h,r),function(e,t,r){var n=t.xref,a=t.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),u="";"paper"===n||o.autorange||(u+=n),"paper"===a||l.autorange||(u+=a),s.setClipUrl(e,u?"clip"+r._fullLayout._uid+u:null,r)}(t,r,e),K.moveFn="move"===P?X:J},doneFn:function(){c(t),Q(h),f(t,e,r),n.call("_guiRelayout",e,B.getUpdateObj())},clickFn:function(){Q(h)}};function Z(e){if(z)P="path"===e.target.tagName?"move":"start-point"===e.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=K.element.getBoundingClientRect(),n=r.right-r.left,a=r.bottom-r.top,i=e.clientX-r.left,o=e.clientY-r.top,s=!N&&n>I&&a>O&&!e.shiftKey?u.getCursor(i/n,1-o/a):"move";c(t,s),P=s.split("-")[0]}}function X(n,a){if("path"===r.type){var i=function(e){return e},o=i,s=i;F?j("xanchor",r.xanchor=W(x+n)):(o=function(e){return W(V(e)+n)},Y&&"date"===Y.type&&(o=p.encodeDate(o))),R?j("yanchor",r.yanchor=q(w+a)):(s=function(e){return q(U(e)+a)},H&&"date"===H.type&&(s=p.encodeDate(s))),j("path",r.path=g(D,o,s))}else F?j("xanchor",r.xanchor=W(x+n)):(j("x0",r.x0=W(y+n)),j("x1",r.x1=W(_+n))),R?j("yanchor",r.yanchor=q(w+a)):(j("y0",r.y0=q(v+a)),j("y1",r.y1=q(b+a)));t.attr("d",m(e,r)),$(h,r)}function J(n,a){if(N){var i=function(e){return e},o=i,s=i;F?j("xanchor",r.xanchor=W(x+n)):(o=function(e){return W(V(e)+n)},Y&&"date"===Y.type&&(o=p.encodeDate(o))),R?j("yanchor",r.yanchor=q(w+a)):(s=function(e){return q(U(e)+a)},H&&"date"===H.type&&(s=p.encodeDate(s))),j("path",r.path=g(D,o,s))}else if(z){if("resize-over-start-point"===P){var l=y+n,u=R?v-a:v+a;j("x0",r.x0=F?l:W(l)),j("y0",r.y0=R?u:q(u))}else if("resize-over-end-point"===P){var c=_+n,d=R?b-a:b+a;j("x1",r.x1=F?c:W(c)),j("y1",r.y1=R?d:q(d))}}else{var f=~P.indexOf("n")?k+a:k,B=~P.indexOf("s")?M+a:M,G=~P.indexOf("w")?T+n:T,K=~P.indexOf("e")?S+n:S;~P.indexOf("n")&&R&&(f=k-a),~P.indexOf("s")&&R&&(B=M-a),(!R&&B-f>O||R&&f-B>O)&&(j(C,r[C]=R?f:q(f)),j(L,r[L]=R?B:q(B))),K-G>I&&(j(A,r[A]=F?G:W(G)),j(E,r[E]=F?K:W(K)))}t.attr("d",m(e,r)),$(h,r)}function $(e,t){(F||R)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=V(F?t.xanchor:a.midRange(r?[t.x0,t.x1]:p.extractPathCoords(t.path,d.paramIsX))),o=U(R?t.yanchor:a.midRange(r?[t.y0,t.y1]:p.extractPathCoords(t.path,d.paramIsY)));if(i=p.roundPositionForSharpStrokeRendering(i,1),o=p.roundPositionForSharpStrokeRendering(o,1),F&&R){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(F){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var u="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function Q(e){e.selectAll(".visual-cue").remove()}u.init(K),G.node().onmousemove=Z}(e,_,r,t,h)}}function f(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function m(e,t){var r,n,o,s,l,u,c,h,f=t.type,m=i.getFromId(e,t.xref),g=i.getFromId(e,t.yref),y=e._fullLayout._size;if(m?(r=p.shapePositionToRange(m),n=function(e){return m._offset+m.r2p(r(e,!0))}):n=function(e){return y.l+y.w*e},g?(o=p.shapePositionToRange(g),s=function(e){return g._offset+g.r2p(o(e,!0))}):s=function(e){return y.t+y.h*(1-e)},"path"===f)return m&&"date"===m.type&&(n=p.decodeDate(n)),g&&"date"===g.type&&(s=p.decodeDate(s)),function(e,t,r){var n=e.path,i=e.xsizemode,o=e.ysizemode,s=e.xanchor,l=e.yanchor;return n.replace(d.segmentRE,(function(e){var n=0,u=e.charAt(0),c=d.paramIsX[u],p=d.paramIsY[u],h=d.numParams[u],f=e.substr(1).replace(d.paramRE,(function(e){return c[n]?e="pixel"===i?t(s)+Number(e):t(e):p[n]&&(e="pixel"===o?r(l)-Number(e):r(e)),++n>h&&(e="X"),e}));return n>h&&(f=f.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),u+f}))}(t,n,s);if("pixel"===t.xsizemode){var v=n(t.xanchor);l=v+t.x0,u=v+t.x1}else l=n(t.x0),u=n(t.x1);if("pixel"===t.ysizemode){var _=s(t.yanchor);c=_-t.y0,h=_-t.y1}else c=s(t.y0),h=s(t.y1);if("line"===f)return"M"+l+","+c+"L"+u+","+h;if("rect"===f)return"M"+l+","+c+"H"+u+"V"+h+"H"+l+"Z";var b=(l+u)/2,x=(c+h)/2,w=Math.abs(b-l),k=Math.abs(x-c),M="A"+w+","+k,T=b+w+","+x;return"M"+T+M+" 0 1,1 "+b+","+(x-k)+M+" 0 0,1 "+T+"Z"}function g(e,t,r){return e.replace(d.segmentRE,(function(e){var n=0,a=e.charAt(0),i=d.paramIsX[a],o=d.paramIsY[a],s=d.numParams[a];return a+e.substr(1).replace(d.paramRE,(function(e){return n>=s?e:(i[n]?e=t(e):o[n]&&(e=r(e)),n++,e)}))}))}t.exports={draw:function(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var a=0;a0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform","translate("+(o-.5*c.gripWidth)+","+t._dims.currentValueTotalHeight+")")}}function C(e,t){var r=e._dims;return r.inputAreaStart+c.stepInset+(r.inputAreaLength-2*c.stepInset)*Math.min(1,Math.max(0,t))}function L(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-c.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*c.stepInset-2*r.inputAreaStart)))}function A(e,t,r){var n=r._dims,a=s.ensureSingle(e,"rect",c.railTouchRectClass,(function(n){n.call(M,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,c.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function E(e,t){var r=t._dims,n=r.inputAreaLength-2*c.railInset,a=s.ensureSingle(e,"rect",c.railRectClass);a.attr({width:n,height:c.railWidth,rx:c.railRadius,ry:c.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,c.railInset,.5*(r.inputAreaWidth-c.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._fullLayout,r=function(e,t){for(var r=e[c.name],n=[],a=0;a0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,m(t))}if(i.enter().append("g").classed(c.containerClassName,!0).style("cursor","ew-resize"),i.exit().each((function(){n.select(this).selectAll("g."+c.groupClassName).each(s)})).remove(),0!==r.length){var l=i.selectAll("g."+c.groupClassName).data(r,g);l.enter().append("g").classed(c.groupClassName,!0),l.exit().each(s).remove();for(var u=0;u0||d<0){var g={left:[-h,0],right:[h,0],top:[0,-h],bottom:[0,h]}[_.side];t.attr("transform","translate("+g+")")}}}return O.call(F),P&&(C?O.on(".opacity",null):(M=0,T=!0,O.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),O.call(c.makeEditable,{gd:e}).on("edit",(function(t){void 0!==v?o.call("_guiRestyle",e,g,t,v):o.call("_guiRelayout",e,g,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(F)})).on("input",(function(e){this.text(e||" ").call(c.positionText,b.x,b.y)}))),O.classed("js-placeholder",T),w}}},{"../../constants/alignment":685,"../../constants/interactions":691,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/plots":825,"../../registry":845,"../color":591,"../drawing":612,d3:164,"fast-isnumeric":227}],679:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll,s=e("../../plots/pad_attributes"),l=e("../../plot_api/plot_template").templatedArray,u=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:u,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../../plots/font_attributes":790,"../../plots/pad_attributes":824,"../color/attributes":590}],680:[function(e,t,r){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},{}],681:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,s=i.buttons;function l(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:u}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function u(e,t){function r(r,a){return n.coerce(e,t,s,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:l})}},{"../../lib":716,"../../plots/array_container_defaults":760,"./attributes":679,"./constants":680}],682:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),u=e("../../plot_api/plot_template").arrayEditor,c=e("../../constants/alignment").LINE_SPACING,d=e("./constants"),p=e("./scrollbox");function h(e){return e._index}function f(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function m(e,t,r,n,a,i,o,s){t.active=o,u(e.layout,d.name,t).applyUpdate("active",o),"buttons"===t.type?y(e,n,null,null,t):"dropdown"===t.type&&(a.attr(d.menuIndexAttrName,"-1"),g(e,n,a,i,t),s||y(e,n,a,i,t))}function g(e,t,r,n,a){var i=s.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),l=a._dims,u=a.active,c=a.buttons[u]||d.blankHeaderOpts,p={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:l.headerWidth,height:l.headerHeight};i.call(v,a,c,e).call(S,a,p,h),s.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,a.font).text(d.arrowSymbol[a.direction])})).attr({x:l.headerWidth-d.arrowOffsetX+a.pad.l,y:l.headerHeight/2+d.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(C,String(f(r,a)?-1:a._index)),y(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(k,a)})),o.setTranslate(t,l.lx,l.ly)}function y(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var l=function(e){return-1==+e.attr(d.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,c=r.selectAll("g."+u).data(s.filterVisible(l)),p=c.enter().append("g").classed(u,!0),h=c.exit();"dropdown"===o.type?(p.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var f=0,g=0,y=o._dims,_=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(_?g=y.headerHeight+d.gapButtonHeader:f=y.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-d.gapButtonHeader+d.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(f=-d.gapButtonHeader+d.gapButton-y.openWidth);var b={x:y.lx+f+o.pad.l,y:y.ly+g+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},M={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(v,o,s,e).call(S,o,b),u.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(m(e,o,0,t,r,i,-1),a.executeAPICommand(e,s.method,s.args2)):(m(e,o,0,t,r,i,l),a.executeAPICommand(e,s.method,s.args))),e.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),u.on("mouseover",(function(){u.call(w)})),u.on("mouseout",(function(){u.call(k,o),c.call(x,o)}))})),c.call(x,o),_?(M.w=Math.max(y.openWidth,y.headerWidth),M.h=b.y-M.t):(M.w=b.x-M.l,M.h=Math.max(y.openHeight,y.headerHeight)),M.direction=o.direction,i&&(c.size()?function(e,t,r,n,a,i){var o,s,l,u=a.direction,c="up"===u||"down"===u,p=a._dims,h=a.active;if(c)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+d.headerGroupClassName).each(i)})).remove(),0!==r.length){var l=o.selectAll("g."+d.headerGroupClassName).data(r,h);l.enter().append("g").classed(d.headerGroupClassName,!0);for(var u=s.ensureSingle(o,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),c=0;cw,T=s.barLength+2*s.barPad,S=s.barWidth+2*s.barPad,C=f,L=g+y;L+S>u&&(L=u-S);var A=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);A.exit().on(".drag",null).remove(),A.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),M?(this.hbar=A.attr({rx:s.barRadius,ry:s.barRadius,x:C,y:L,width:T,height:S}),this._hbarXMin=C+T/2,this._hbarTranslateMax=w-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=y>k,D=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,I=f+m,O=g;I+D>l&&(I=l-D);var F=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),E?(this.vbar=F.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:O,width:D,height:P}),this._vbarYMin=O+P/2,this._vbarTranslateMax=k-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,z=c-.5,N=E?d+D+.5:d+.5,B=p-.5,j=M?h+S+.5:h+.5,Y=o._topdefs.selectAll("#"+R).data(M||E?[0]:[]);if(Y.exit().remove(),Y.enter().append("clipPath").attr("id",R).append("rect"),M||E?(this._clipRect=Y.select("rect").attr({x:Math.floor(z),y:Math.floor(B),width:Math.ceil(N)-Math.floor(z),height:Math.ceil(j)-Math.floor(B)}),this.container.call(i.setClipUrl,R,this.gd),this.bg.attr({x:f,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||E){var H=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(V),E&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},s.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,s=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,s)-i)/(s-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(i.setTranslate,e,t+s*this._vbarTranslateMax)}}},{"../../lib":716,"../color":591,"../drawing":612,d3:164}],685:[function(e,t,r){"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],686:[function(e,t,r){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},{}],687:[function(e,t,r){"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format",DATE_FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format"}},{}],688:[function(e,t,r){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],689:[function(e,t,r){"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],690:[function(e,t,r){"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},{}],691:[function(e,t,r){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],692:[function(e,t,r){"use strict";t.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}},{}],693:[function(e,t,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],694:[function(e,t,r){"use strict";r.version="1.51.2",e("es6-promise").polyfill(),e("../build/plotcss"),e("./fonts/mathjax_config")();for(var n=e("./registry"),a=r.register=n.register,i=e("./plot_api"),o=Object.keys(i),s=0;splotly-logomark"}}},{}],697:[function(e,t,r){"use strict";r.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},r.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},r.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},r.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},r.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},r.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},{}],698:[function(e,t,r){"use strict";var n=e("./mod"),a=n.mod,i=n.modHalf,o=Math.PI,s=2*o;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function u(e,t){return i(t-e,s)}function c(e,t){if(l(t))return!0;var r,n;t[0](n=a(n,s))&&(n+=s);var i=a(e,s),o=i+s;return i>=r&&i<=n||o>=r&&o<=n}function d(e,t,r,n,a,i,u){a=a||0,i=i||0;var c,d,p,h,f,m=l([r,n]);function g(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}m?(c=0,d=o,p=s):r=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return d(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return d(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return d(e,t,r,n,a,i,1)}}},{"./mod":723}],699:[function(e,t,r){"use strict";var n=Array.isArray,a="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},i="undefined"==typeof DataView?function(){}:DataView;function o(e){return a.isView(e)&&!(e instanceof i)}function s(e){return n(e)||o(e)}function l(e,t,r){if(s(e)){if(s(e[0])){for(var n=r,a=0;aa.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){e%1||!n(e)||void 0!==a.min&&ea.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(o.get(e,r))}},angle:{coerceFunction:function(e,t,r){"auto"===e?t.set("auto"):n(e)?t.set(c(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||u(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!u(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if("string"==typeof e)if(-1===(n.extras||[]).indexOf(e)){for(var a=e.split("+"),i=0;i=n&&e<=a?e:c}if("string"!=typeof e&&"number"!=typeof e)return c;e=String(e);var u=x(t),y=e.charAt(0);!u||"G"!==y&&"g"!==y||(e=e.substr(1),t="");var w=u&&"chinese"===t.substr(0,7),k=e.match(w?_:v);if(!k)return c;var M=k[1],T=k[3]||"1",S=Number(k[5]||1),C=Number(k[7]||0),L=Number(k[9]||0),A=Number(k[11]||0);if(u){if(2===M.length)return c;var E;M=Number(M);try{var D=g.getComponentMethod("calendars","getCal")(t);if(w){var P="i"===T.charAt(T.length-1);T=parseInt(T,10),E=D.newDate(M,D.toMonthIndex(M,T,P),S)}else E=D.newDate(M,Number(T),S)}catch(e){return c}return E?(E.toJD()-m)*d+C*p+L*h+A*f:c}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),T-=1;var I=new Date(Date.UTC(2e3,T,S,C,L));return I.setUTCFullYear(M),I.getUTCMonth()!==T?c:I.getUTCDate()!==S?c:I.getTime()+A*f},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(e,t){return r.dateTime2ms(e,t)!==c};var k=90*d,M=3*p,T=5*h;function S(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}r.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return c;t||(t=0);var i,o,s,u,v,_,b=Math.floor(10*l(e+.05,1)),w=Math.round(e-b/10);if(x(r)){var C=Math.floor(w/d)+m,L=Math.floor(l(e,d));try{i=g.getComponentMethod("calendars","getCal")(r).fromJD(C).formatDate("yyyy-mm-dd")}catch(e){i=y("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t=n+d&&e<=a-d))return c;var t=Math.floor(10*l(e+.05,1)),r=new Date(Math.round(e-t/10));return S(i.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},r.cleanDate=function(e,t,n){if(e===c)return t;if(r.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(x(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(!(e=r.ms2DateTimeLocal(+e))&&void 0!==t)return t}else if(!r.isDateTime(e,n))return s.error("unrecognized date",e),t;return e};var C=/%\d?f/g;function L(e,t,r,n){e=e.replace(C,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(x(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var A=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(e,t,r,n,a,i){if(a=x(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=l(e+.05,d),n=w(Math.floor(r/p),2)+":"+w(l(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(l(e/f,60),A[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+L(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return L(t,e,n,a)};var E=3*d;r.incrementMonth=function(e,t,r){r=x(r)&&r;var n=l(e,d);if(e=Math.round(e-n),r)try{var a=Math.round(e/d)+m,i=g.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-m)*d+n}catch(t){s.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+E);return u.setUTCMonth(u.getUTCMonth()+t)+n-E},r.findExactDates=function(e,t){for(var r,n,a=0,i=0,s=0,l=0,u=x(t)&&g.getComponentMethod("calendars","getCal")(t),c=0;c0&&(r.push(a),a=[])}return a.length>0&&r.push(a),r},r.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},r.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r1||m<0||m>1?null:{x:e+l*m,y:t+d*m}}function l(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,s=a-t;return o*o+s*s}var l=n*t-a*e;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(e,t,r,n,a,i,o,u){if(s(e,t,r,n,a,i,o,u))return 0;var c=r-e,d=n-t,p=o-a,h=u-i,f=c*c+d*d,m=p*p+h*h,g=Math.min(l(c,d,f,a-e,i-t),l(c,d,f,o-e,u-t),l(p,h,m,e-a,t-i),l(p,h,m,r-a,n-i));return Math.sqrt(g)},r.getTextLocation=function(e,t,r,s){if(e===a&&s===i||(n={},a=e,i=s),n[r])return n[r];var l=e.getPointAtLength(o(r-s/2,t)),u=e.getPointAtLength(o(r+s/2,t)),c=Math.atan((u.y-l.y)/(u.x-l.x)),d=e.getPointAtLength(o(r,t)),p={x:(4*d.x+l.x+u.x)/6,y:(4*d.y+l.y+u.y)/6,theta:c};return n[r]=p,p},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,s=t.top,l=t.bottom,u=0,c=e.getTotalLength(),d=c;function p(t){var r=e.getPointAtLength(t);0===t?n=r:t===c&&(a=r);var u=r.xo?r.x-o:0,d=r.yl?r.y-l:0;return Math.sqrt(u*u+d*d)}for(var h=p(u);h;){if((u+=h+r)>d)return;h=p(u)}for(h=p(d);h;){if(u>(d-=h+r))return;h=p(d)}return{min:u,max:d,len:d-u,total:c,isClosed:0===u&&d===c&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(e,t,r,n){for(var a,i,o,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,u=n.iterationLimit||30,c=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,d=0,p=0,h=s;d0?h=a:p=a,d++}return i}},{"./mod":723}],713:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("tinycolor2"),i=e("color-normalize"),o=e("../components/colorscale"),s=e("../components/color/attributes").defaultLine,l=e("./array").isArrayOrTypedArray,u=i(s),c=1;function d(e,t){var r=e;return r[3]*=t,r}function p(e){if(n(e))return u;var t=i(e);return t.length?t:u}function h(e){return n(e)?e:c}t.exports={formatColor:function(e,t,r){var n,a,s,f,m,g=e.color,y=l(g),v=l(t),_=o.extractOpts(e),b=[];if(n=void 0!==_.colorscale?o.makeColorScaleFuncFromTrace(e):p,a=y?function(e,t){return void 0===e[t]?u:i(n(e[t]))}:p,s=v?function(e,t){return void 0===e[t]?c:h(e[t])}:h,y||v)for(var x=0;xo?s:a(e)?Number(e):s:s},l.isIndex=function(e,t){return!(void 0!==t&&e>=t)&&a(e)&&e>=0&&e%1==0},l.noop=e("./noop"),l.identity=e("./identity"),l.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},l.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},l.simpleMap=function(e,t,r,n){for(var a=e.length,i=new Array(a),o=0;o=Math.pow(2,r)?a>10?(l.warn("randstr failed uniqueness"),u):e(t,r,n,(a||0)+1):u},l.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},l.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,s=2*o,l=2*t-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(a-=s*Math.floor(a/s)),a<0?a=-1-a:a>=o&&(a=s-1-a),i+=e[a]*u[n];c[r]=i}return c},l.syncOrAsync=function(e,t,r){var n;function a(){return l.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a).then(void 0,l.promiseError);return r&&r(t)},l.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},l.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n0?t:0}))},l.fillArray=function(e,t,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+i+"$2");return s+l},l.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var A=/^\w*$/;l.templateString=function(e,t){var r={};return e.replace(l.TEMPLATE_STRING_REGEX,(function(e,n){return A.test(n)?t[n]||"":(r[n]=r[n]||l.nestedProperty(t,n).get,r[n]()||"")}))};var E={max:10,count:0,name:"hovertemplate"};l.hovertemplateString=function(){return I.apply(E,arguments)};var D={max:10,count:0,name:"texttemplate"};l.texttemplateString=function(){return I.apply(D,arguments)};var P=/^[:|\|]/;function I(e,t,r){var a=this,i=arguments;t||(t={});var o={};return e.replace(l.TEMPLATE_STRING_REGEX,(function(e,s,u){var c,d,p,h;for(p=3;p=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(a=10*a+s-48),!l||!u){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var O=2e9;l.seedPseudoRandom=function(){O=2e9},l.pseudoRandom=function(){var e=O;return O=(69069*O+1)%4294967296,Math.abs(O-e)<429496729?l.pseudoRandom():O/4294967296},l.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=l.extractOption(e,t,"htx","hovertext");if(l.isValidTextValue(a))return n(a);var i=l.extractOption(e,t,"tx","text");return l.isValidTextValue(i)?n(i):void 0},l.isValidTextValue=function(e){return e||0===e},l.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n2)return u[t]=2|u[t],p.set(e,null);if(d){for(o=t;o1){for(var e=["LOG:"],t=0;t0){for(var e=["WARN:"],t=0;t0){for(var e=["ERROR:"],t=0;tt/2?e-Math.round(e/t)*t:e}}},{}],724:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,s,l,u=e;for(s=0;s/g),o=0;oi||u===a||us||t&&l(e))}:function(e,t){var l=e[0],u=e[1];if(l===a||li||u===a||us)return!1;var c,d,p,h,f,m=r.length,g=r[0][0],y=r[0][1],v=0;for(c=1;cMath.max(d,g)||u>Math.max(p,y)))if(uc||Math.abs(n(o,p))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var s=r.length,l=n;r.splice(a+1);for(var u=l+1;u1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}},{"../constants/numerical":692,"./matrix":722}],729:[function(e,r,n){(function(t){"use strict";var n=e("./show_no_webgl_msg"),a=e("regl");r.exports=function(e,r){var i=e._fullLayout,o=!0;return i._glcanvas.each((function(n){if(!n.regl&&(!n.pick||i._has("parcoords"))){try{n.regl=a({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||t.devicePixelRatio,extensions:r||[]})}catch(e){o=!1}o&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:n.key})}),!1)}})),o||n({container:i._glcontainer.node()}),o}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":737,regl:500}],730:[function(e,t,r){"use strict";t.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;na.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(e.framework&&e.framework.isPolar)e.framework.undo();else if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;rt}function u(e,t){return e>=t}r.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-1e-9)-1:Math.floor((e-t.start)/t.size+1e-9);var i,c,d=0,p=t.length,h=0,f=p>1?(t[p-1]-t[0])/(p-1):1;for(c=f>=0?r?o:s:r?u:l,e+=1e-9*f*(r?-1:1)*(f>=0?1:-1);d90&&a.log("Long binary search..."),d-1},r.sorterAsc=function(e,t){return e-t},r.sorterDes=function(e,t){return t-e},r.distinctVals=function(e){var t=e.slice();t.sort(r.sorterAsc);for(var n=t.length-1,a=t[n]-t[0]||1,i=a/(n||1)/1e4,o=[t[0]],s=0;st[s]+i&&(a=Math.min(a,t[s+1]-t[s]),o.push(t[s+1]));return{vals:o,minDiff:a}},r.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},r.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(t)||(t=!1),a(i[0])){for(l=new Array(o),s=0;se.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},{"./array":699,"fast-isnumeric":227}],739:[function(e,t,r){"use strict";var n=e("color-normalize");t.exports=function(e){return e?n(e):[0,0,0,1]}},{"color-normalize":121}],740:[function(e,t,r){"use strict";var n=e("d3"),a=e("../lib"),i=e("../constants/xmlns_namespaces"),o=e("../constants/alignment").LINE_SPACING;function s(e,t){return e.node().getBoundingClientRect()[t]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(e,t,S){var C=e.text(),A=!e.attr("data-notex")&&"undefined"!=typeof MathJax&&C.match(l),E=n.select(e.node().parentNode);if(!E.empty()){var D=e.attr("class")?e.attr("class").split(" ")[0]:"text";return D+="-math",E.selectAll("svg."+D).remove(),E.selectAll("g."+D+"-group").remove(),e.style("display",null).attr({"data-unformatted":C,"data-math":"N"}),A?(t&&t._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),i={fontSize:r};!function(e,t,r){var i,o,s,l;MathJax.Hub.Queue((function(){return o=a.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),(function(){var r="math-output-"+a.randstr({},64);return l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":t.fontSize+"px"}).text(e.replace(u,"\\lt ").replace(c,"\\gt ")),MathJax.Hub.Typeset(l.node())}),(function(){var t=n.select("body").select("#MathJax_SVG_glyphs");if(l.select(".MathJax_SVG").empty()||!l.select("svg").node())a.log("There was an error in the tex syntax.",e),r();else{var o=l.select("svg").node().getBoundingClientRect();r(l.select(".MathJax_SVG"),t,o)}if(l.remove(),"SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)}))}(A[2],i,(function(n,a,i){E.selectAll("svg."+D).remove(),E.selectAll("g."+D+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return P(),void t();var l=E.append("g").classed(D+"-group",!0).attr({"pointer-events":"none","data-unformatted":C,"data-math":"Y"});l.node().appendChild(o.node()),a&&a.node()&&o.node().insertBefore(a.node().cloneNode(!0),o.node().firstChild),o.attr({class:D,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var u=e.node().style.fill||"black",c=o.select("g");c.attr({fill:u,stroke:u});var d=s(c,"width"),p=s(c,"height"),h=+e.attr("x")-d*{start:0,middle:.5,end:1}[e.attr("text-anchor")||"start"],f=-(r||s(e,"height"))/4;"y"===D[0]?(l.attr({transform:"rotate("+[-90,+e.attr("x"),+e.attr("y")]+") translate("+[-d/2,f-p/2]+")"}),o.attr({x:+e.attr("x"),y:+e.attr("y")})):"l"===D[0]?o.attr({x:e.attr("x"),y:f-p/2}):"a"===D[0]&&0!==D.indexOf("atitle")?o.attr({x:0,y:f}):o.attr({x:h,y:+e.attr("y")+f-p/2}),S&&S.call(e,l),t(l)}))}))):P(),e}function P(){E.empty()||(D=e.attr("class")+"-math",E.select("svg."+D).remove()),e.text("").style("white-space","pre"),function(e,t){t=t.replace(g," ");var r,s=!1,l=[],u=-1;function c(){u++;var t=document.createElementNS(i.svg,"tspan");n.select(t).attr({class:"line",dy:u*o+"em"}),e.appendChild(t),r=t;var a=l;if(l=[{node:t}],a.length>1)for(var s=1;s doesnt match end tag <"+e+">. Pretending it did match.",t),r=l[l.length-1].node}else a.log("Ignoring unexpected end tag .",t)}_.test(t)?c():(r=e,l=[{node:e}]);for(var E=t.split(y),D=0;D|>|>)/g,d={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},f="​",m=["http:","https:","mailto:","",void 0,":"],g=r.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,v=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=//i;r.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&L(n)}var T=/(^|;)\s*color:/;r.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a="...".length,i=e.split(y),o=[],s="",l=0,u=0;ua?o.push(c.substr(0,f-a)+"..."):o.push(c.substr(0,f));break}s=""}}return o.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function L(e){return e.replace(C,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):S[t])||e}))}function A(e,t,r){var n,a,i,o=r.horizontalAlign,s=r.verticalAlign||"top",l=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},i="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:a()-u.top+"px",left:i()-u.left+"px","z-index":1e3}),this}}r.convertEntities=L,r.lineCount=function(e){return e.selectAll("tspan.line").size()||1},r.positionText=function(e,t,r){return e.each((function(){var e=n.select(this);function a(t,r){return void 0===r?null===(r=e.attr(t))&&(e.attr(t,0),r=0):e.attr(t,r),r}var i=a("x",t),o=a("y",r);"text"===this.nodeName&&e.selectAll("tspan.line").attr({x:i,y:o})}))},r.makeEditable=function(e,t){var r=t.gd,a=t.delegate,i=n.dispatch("edit","input","cancel"),o=a||e;if(e.style({"pointer-events":a?"none":"all"}),1!==e.size())throw new Error("boo");function s(){var a,s,u,c,d;a=n.select(r).select(".svg-container"),s=a.append("div"),u=e.node().style,c=parseFloat(u.fontSize||12),void 0===(d=t.text)&&(d=e.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":u.fontFamily||"Arial","font-size":c,color:t.fill||u.fill||"black",opacity:1,"background-color":t.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(d).call(A(e,a,t)).on("blur",(function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var t,a=n.select(this).attr("class");(t=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(t).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(e,o)})).on("focus",(function(){var e=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===e)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,e.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),n.select(this).call(A(e,a,t)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),e.style({opacity:0});var p,h=o.attr("class");(p=h?"."+h.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(p).style({opacity:0})}function l(e){var t=e.node(),r=document.createRange();r.selectNodeContents(t);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),t.focus()}return t.immediate?s():o.on("click",s),n.rebind(e,i,"on")}},{"../constants/alignment":685,"../constants/xmlns_namespaces":693,"../lib":716,d3:164}],741:[function(e,t,r){"use strict";var n={};function a(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}r.throttle=function(e,t,r){var i=n[e],o=Date.now();if(!i){for(var s in n)n[s].tsi.ts+t?l():i.timer=setTimeout((function(){l(),i.timer=null}),t)},r.done=function(e){var t=n[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},r.clear=function(e){if(e)a(n[e]),delete n[e];else for(var t in n)r.clear(t)}},{}],742:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},{"fast-isnumeric":227}],743:[function(e,t,r){"use strict";var n=t.exports={},a=e("../plots/geo/constants").locationmodeToLayer,i=e("topojson-client").feature;n.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(e,t){return e+t+".json"},n.getTopojsonFeatures=function(e,t){var r=a[e.locationmode],n=t.objects[r];return i(t,n).features}},{"../plots/geo/constants":792,"topojson-client":538}],744:[function(e,t,r){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],745:[function(e,t,r){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],746:[function(e,t,r){"use strict";var n=e("../registry");t.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},r.cleanLayout=function(e){var t,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,d=(s.subplotsRegistry.ternary||{}).attrRegex,p=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(t=0;t3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),f(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),u.clean(e),e.template&&e.template.layout&&r.cleanLayout(e.template.layout),e},r.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}r.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var x=["x","y","z"];r.clearAxisTypes=function(e,t,r){for(var n=0;n1&&i.warn("Full array edits are incompatible with other edits",d);var v=r[""][""];if(u(v))t.set(null);else{if(!Array.isArray(v))return i.warn("Unrecognized full array edit value",d,v),!0;t.set(v)}return!m&&(p(g,y),h(e),!0)}var _,b,x,w,k,M,T,S,C=Object.keys(r).map(Number).sort(o),L=t.get(),A=L||[],E=c(y,d).get(),D=[],P=-1,I=A.length;for(_=0;_A.length-(T?0:1))i.warn("index out of range",d,x);else if(void 0!==M)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,x),u(M)?D.push(x):T?("add"===M&&(M={}),A.splice(x,0,M),E&&E.splice(x,0,{})):i.warn("Unrecognized full object edit value",d,x,M),-1===P&&(P=x);else for(b=0;b=0;_--)A.splice(D[_],1),E&&E.splice(D[_],1);if(A.length?L||t.set(A):t.set(null),m)return!1;if(p(g,y),f!==a){var O;if(-1===P)O=C;else{for(I=Math.max(A.length,I),O=[],_=0;_=P);_++)O.push(x);for(_=P;_=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function F(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),O(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&O(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var i in O(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==t[i].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,r,n);for(var l=function(e,t,r,n){var i,l,u,c,d,p=o.isPlainObject(n),h=[];for(var f in Array.isArray(r)||(r=[r]),r=I(r,e.data.length-1),t)for(var m=0;m-1?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(t,r){e[r]=e[t],delete e[t]}}function U(e,t,r){if(e=o.getGraphDiv(e),k.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=X(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var s=[p.previousPromises];i.layoutReplot?s.push(M.layoutReplot):Object.keys(n).length&&(W(e,i,a)||p.supplyDefaults(e),i.legend&&s.push(M.doLegend),i.layoutstyle&&s.push(M.layoutStyles),i.axrange&&q(s,a.rangesAltered),i.ticks&&s.push(M.doTicksRelayout),i.modebar&&s.push(M.doModeBar),i.camera&&s.push(M.doCamera),i.colorbars&&s.push(M.doColorBars),s.push(A)),s.push(p.rehover,p.redrag),u.add(e,U,[e,a.undoit],U,[e,a.redoit]);var l=o.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function W(e,t,r){var n=e._fullLayout;if(!t.axrange)return!1;for(var a in t)if("axrange"!==a&&t[a])return!1;for(var i in r.rangesAltered){var o=f.id2name(i),s=e.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var u in l._matchGroup)if(u!==i){var c=n[f.id2name(u)];c.autorange=l.autorange,c.range=l.range.slice(),c._input.range=l.range.slice()}}return!0}function q(e,t){var r=t?function(e){var r=[],n=!0;for(var a in t){var i=f.getFromId(e,a);if(r.push(a),i._matchGroup)for(var o in i._matchGroup)t[o]||r.push(o);i.automargin&&(n=!1)}return f.draw(e,r,{skipTitle:n})}:function(e){return f.draw(e,"redraw")};e.push(b,M.doAutoRangeAndConstraints,r,M.drawData,M.finalDraw)}var G=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,K=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(e,t){var r,n,a,i=e.layout,l=e._fullLayout,u=l._guiEditing,p=j(l._preGUI,u),h=Object.keys(t),m=f.list(e),g=o.extendDeepAll({},t),y={};for(V(t),h=Object.keys(t),n=0;n0&&"string"!=typeof I.parts[F];)F--;var R=I.parts[F],z=I.parts[F-1]+"."+R,N=I.parts.slice(0,F).join("."),Y=s(e.layout,N).get(),H=s(l,N).get(),U=I.get();if(void 0!==O){M[P]=O,C[P]="reverse"===R?O:B(U);var W=d.getLayoutValObject(l,I.parts);if(W&&W.impliedEdits&&null!==O)for(var q in W.impliedEdits)L(o.relativeAttr(P,q),W.impliedEdits[q]);if(-1!==["width","height"].indexOf(P))if(O){L("autosize",null);var X="height"===P?"width":"height";L(X,l[X])}else l[P]=e._initialAutoSize[P];else if("autosize"===P)L("width",O?null:l.width),L("height",O?null:l.height);else if(z.match(G))D(z),s(l,N+"._inputRange").set(null);else if(z.match(K)){D(z),s(l,N+"._inputRange").set(null);var $=s(l,N).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else z.match(Z)&&s(l,N+"._inputDomain").set(null);if("type"===R){var Q=Y,ee="linear"===H.type&&"log"===O,te="log"===H.type&&"linear"===O;if(ee||te){if(Q&&Q.range)if(H.autorange)ee&&(Q.range=Q.range[1]>Q.range[0]?[1,2]:[2,1]);else{var re=Q.range[0],ne=Q.range[1];ee?(re<=0&&ne<=0&&L(N+".autorange",!0),re<=0?re=ne/1e6:ne<=0&&(ne=re/1e6),L(N+".range[0]",Math.log(re)/Math.LN10),L(N+".range[1]",Math.log(ne)/Math.LN10)):(L(N+".range[0]",Math.pow(10,re)),L(N+".range[1]",Math.pow(10,ne)))}else L(N+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(e,H,O,L),c.getComponentMethod("images","convertCoords")(e,H,O,L)}else L(N+".autorange",!0),L(N+".range",null);s(l,N+"._inputRange").set(null)}else if(R.match(S)){var ae=s(l,P).get(),ie=(O||{}).type;ie&&"-"!==ie||(ie="linear"),c.getComponentMethod("annotations","convertCoords")(e,ae,ie,L),c.getComponentMethod("images","convertCoords")(e,ae,ie,L)}var oe=w.containerArrayMatch(P);if(oe){r=oe.array,n=oe.index;var se=oe.property,le=W||{editType:"calc"};""!==n&&""===se&&(w.isAddVal(O)?C[P]=null:w.isRemoveVal(O)?C[P]=(s(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),T.update(x,le),y[r]||(y[r]={});var ue=y[r][n];ue||(ue=y[r][n]={}),ue[se]=O,delete t[P]}else"reverse"===R?(Y.range?Y.range.reverse():(L(N+".autorange",!0),Y.range=[1,0]),H.autorange?x.calc=!0:x.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===O||"select"===O)&&"lasso"!==U&&"select"!==U?x.plot=!0:l._has("gl2d")?x.plot=!0:W?T.update(x,W):x.calc=!0,I.set(O))}}for(r in y)w.applyContainerArrayChanges(e,p(i,r),y[r],x,p)||(x.plot=!0);var ce=l._axisConstraintGroups||[];for(A in E)for(n=0;n1;)if(n.pop(),void 0!==(r=s(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ae(e,t){for(var r=0;r=a.length?a[0]:a[e]:a}function l(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function u(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return(void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,c){function d(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,p.transition(e,t.frame.data,t.frame.layout,k.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function h(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&d()};t()}var f,m,g=0;function y(e){return Array.isArray(a)?g>=a.length?e.transitionOpts=a[g]:e.transitionOpts=a[0]:e.transitionOpts=a,g++,e}var v=[],_=null==t,b=Array.isArray(t);if(_||b||!o.isPlainObject(t)){if(_||-1!==["string","number"].indexOf(typeof t))for(f=0;f0&&MM)&&T.push(m);v=T}}v.length>0?function(t){if(0!==t.length){for(var a=0;a=0;n--)if(o.isPlainObject(t[n])){var m=t[n].name,g=(c[m]||f[m]||{}).name,y=t[n].name,v=c[g]||f[g];g&&y&&"number"==typeof y&&v&&Ct.index?-1:e.index=0;n--){if("number"==typeof(a=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;c[a.name="frame "+e._transitionData._counter++];);if(c[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:a[n]});var l=p.modifyFrames,c=p.modifyFrames,d=[e,s],h=[e,i];return u&&u.add(e,l,d,c,h),p.modifyFrames(e,i)},r.addTraces=function e(t,n,a){t=o.getGraphDiv(t);var i,s,l=[],c=r.deleteTraces,d=e,p=[t,l],h=[t,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!k(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function k(e){return e===Math.round(e)&&e>=0}function M(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry)if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a=l.length)return!1;a=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[t[2]],s=3}else if("area"===e.type)a=c[o];else{var d=e._module;if(d||(d=(n.modules[e.type||i.type.dflt]||{})._module),!d)return!1;if(!(a=(r=d.attributes)&&r[o])){var p=d.basePlotModule;p&&p.attributes&&(a=p.attributes[o])}a||(a=i[o])}return w(a,t,s)},r.getLayoutValObject=function(e,t){return w(function(e,t){var r,a,i,s,l=e._basePlotModules;if(l){var u;for(r=0;r=a&&(r._input||{})._templateitemname;s&&(o=a);var l,u=t+"["+o+"]";function c(){l={},s&&(l[u]={},l[u][i]=s)}function d(e,t){s?n.nestedProperty(l[u],e).set(t):l[u+"."+e]=t}function p(){var e=l;return c(),e}return c(),{modifyBase:function(e,t){l[e]=t},modifyItem:d,getUpdateObj:p,applyUpdate:function(t,r){t&&d(t,r);var a=p();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},{"../lib":716,"../plots/attributes":761}],755:[function(e,t,r){"use strict";var n=e("d3"),a=e("../registry"),i=e("../plots/plots"),o=e("../lib"),s=e("../lib/clear_gl_canvases"),l=e("../components/color"),u=e("../components/drawing"),c=e("../components/titles"),d=e("../components/modebar"),p=e("../plots/cartesian/axes"),h=e("../constants/alignment"),f=e("../plots/cartesian/constraints"),m=f.enforce,g=f.clean,y=e("../plots/cartesian/autorange").doAutoRange,v="start",_="middle",b="end";function x(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function w(e){var t,a,s,c,f,m,g=e._fullLayout,y=g._size,v=y.p,_=p.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),r.drawMainTitle(e),d.manage(e),!g._has("cartesian"))return i.previousPromises(e);function b(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-v-n:t._offset+t._length+v+n:y.t+y.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+v+n:t._offset-v-n:y.l+y.w*(e.position||0)+n%1}for(t=0;t<_.length;t++){var w=(c=_[t])._anchorAxis;c._linepositions={},c._lw=u.crispRound(e,c.linewidth,1),c._mainLinePosition=b(c,w,c.side),c._mainMirrorPosition=c.mirror&&w?b(c,w,h.OPPOSITE_SIDE[c.side]):null}var M=[],S=[],C=[],L=1===l.opacity(g.paper_bgcolor)&&1===l.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(a in g._plots)if((s=g._plots[a]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var A=s.xaxis.domain,E=s.yaxis.domain,D=s.plotgroup;if(x(A,E,C)){var P=D.node(),I=s.bg=o.ensureSingle(D,"rect","bg");P.insertBefore(I.node(),P.childNodes[0]),S.push(a)}else D.select("rect.bg").remove(),C.push([A,E]),L||(M.push(a),S.push(a))}var O,F,R,z,N,B,j,Y,H,V,U,W,q,G=g._bgLayer.selectAll(".bg").data(M);for(G.enter().append("rect").classed("bg",!0),G.exit().remove(),G.each((function(e){g._plots[e].bg=n.select(this)})),t=0;tk?c.push({code:"unused",traceType:v,templateCount:w,dataCount:k}):k>w&&c.push({code:"reused",traceType:v,templateCount:w,dataCount:k})}}else c.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=m(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&c.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&g(i)&&e(i,o)}}({data:h,layout:p},""),c.length)return c.map(y)}},{"../lib":716,"../plots/attributes":761,"../plots/plots":825,"./plot_config":752,"./plot_schema":753,"./plot_template":754}],757:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./plot_api"),i=e("../lib"),o=e("../snapshot/helpers"),s=e("../snapshot/tosvg"),l=e("../snapshot/svgtoimg"),u={format:{valType:"enumerated",values:["png","jpeg","webp","svg"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var r,c,d,p;function h(e){return!(e in t)||i.validate(t[e],u[e])}if(t=t||{},i.isPlainObject(e)?(r=e.data||[],c=e.layout||{},d=e.config||{},p={}):(e=i.getGraphDiv(e),r=i.extendDeep([],e.data),c=i.extendDeep({},e.layout),d=e._context,p=e._fullLayout||{}),!h("width")&&null!==t.width||!h("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!h("format"))throw new Error("Image format is not jpeg, png, svg or webp.");var f={};function m(e,r){return i.coerce(t,f,u,e,r)}var g=m("format"),y=m("width"),v=m("height"),_=m("scale"),b=m("setBackground"),x=m("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=i.extendFlat({},c);y?k.width=y:null===t.width&&n(p.width)&&(k.width=p.width),v?k.height=v:null===t.height&&n(p.height)&&(k.height=p.height);var M=i.extendFlat({},d,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),T=o.getRedrawFunc(w);function S(){return new Promise((function(e){setTimeout(e,o.getDelay(w._fullLayout))}))}function C(){return new Promise((function(e,t){var r=s(w,g,_),n=w._fullLayout.width,u=w._fullLayout.height;if(a.purge(w),document.body.removeChild(w),"svg"===g)return e(x?r:o.encodeSVG(r));var c=document.createElement("canvas");c.id=i.randstr(),l({format:g,width:n,height:u,scale:_,canvas:c,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.plot(w,r,k,M).then(T).then(S).then(C).then((function(t){e(function(e){return x?e.replace(o.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},{"../lib":716,"../snapshot/helpers":849,"../snapshot/svgtoimg":851,"../snapshot/tosvg":853,"./plot_api":751,"fast-isnumeric":227}],758:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/plots"),i=e("./plot_schema"),o=e("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(e,t,r,a,i,o){o=o||[];for(var d=Object.keys(e),p=0;p_.length&&a.push(f("unused",i,y.concat(_.length)));var M,T,S,C,L,A=_.length,E=Array.isArray(k);if(E&&(A=Math.min(A,k.length)),2===b.dimensions)for(T=0;T_[T].length&&a.push(f("unused",i,y.concat(T,_[T].length)));var D=_[T].length;for(M=0;M<(E?Math.min(D,k[T].length):D);M++)S=E?k[T][M]:k,C=v[T][M],L=_[T][M],n.validate(C,S)?L!==C&&L!==+C&&a.push(f("dynamic",i,y.concat(T,M),C,L)):a.push(f("value",i,y.concat(T,M),C))}else a.push(f("array",i,y.concat(T),v[T]));else for(T=0;T1&&h.push(f("object","layout"))),a.supplyDefaults(m);for(var g=m._fullData,y=r.length,v=0;v0&&((b=T-o(g)-o(y))>S?x/b>C&&(v=g,_=y,C=x/b):x/T>C&&(v={val:g.val,pad:0},_={val:y.val,pad:0},C=x/T));if(p===h){var L=p-1,A=p+1;if(k)if(0===p)i=[0,1];else{var E=(p>0?d:c).reduce((function(e,t){return Math.max(e,o(t))}),0),D=p/(1-Math.min(.5,E/T));i=p>0?[0,D]:[D,0]}else i=M?[Math.max(0,L),Math.max(1,A)]:[L,A]}else k?(v.val>=0&&(v={val:0,pad:0}),_.val<=0&&(_={val:0,pad:0})):M&&(v.val-C*o(v)<0&&(v={val:0,pad:0}),_.val<=0&&(_={val:1,pad:0})),C=(_.val-v.val)/(T-o(v)-o(_)),i=[v.val-C*o(v),_.val+C*o(_)];return f&&i.reverse(),a.simpleMap(i,t.l2r||Number)}function l(e){var t=e._length/20;return"domain"===e.constrain&&e._inputDomain&&(t*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(e){return e.pad+(e.extrapad?t:0)}}function u(e,t){var r,n,a,i=t._id,o=e._fullData,s=e._fullLayout,l=[],u=[];function p(e,t){for(r=0;r=r&&(u.extrapad||!o)){s=!1;break}a(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=i&&0===t;e.push({val:t,pad:c?0:r,extrapad:!c&&o})}}function h(e){return n(e)&&Math.abs(e)=t}t.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(e,t){if(t.setScale(),t.autorange){t.range=s(e,t),t._r=t.range.slice(),t._rl=a.simpleMap(t._r,t.r2l);var r=t._input,n={};n[t._attr+".range"]=t.range,n[t._attr+".autorange"]=t.autorange,o.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,n),r.range=t.range.slice(),r.autorange=t.autorange}var i=t._anchorAxis;if(i&&i.rangeslider){var l=i.rangeslider[t._name];l&&"auto"===l.rangemode&&(l.range=s(e,t)),i._input.rangeslider[t._name]=a.extendFlat({},l)}},findExtremes:function(e,t,r){r||(r={}),e._m||e.setScale();var a,o,s,l,u,p,f,m,g,y=[],v=[],_=t.length,b=r.padded||!1,x=r.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,k=!1,M=r.vpadLinearized||!1;function T(e){if(Array.isArray(e))return k=!0,function(t){return Math.max(Number(e[t]||0),0)};var t=Math.max(Number(e||0),0);return function(){return t}}var S=T((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),C=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),L=T(r.vpadplus||r.vpad),A=T(r.vpadminus||r.vpad);if(!k){if(m=1/0,g=-1/0,w)for(a=0;a<_;a++)(o=t[a])0&&(m=o),o>g&&o-i&&(m=o),o>g&&o=P;a--)D(a);return{min:y,max:v,opts:r}},concatExtremes:u}},{"../../constants/numerical":692,"../../lib":716,"../../registry":845,"fast-isnumeric":227}],764:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),u=e("../../components/titles"),c=e("../../components/color"),d=e("../../components/drawing"),p=e("./layout_attributes"),h=e("./clean_ticks"),f=e("../../constants/numerical"),m=f.ONEAVGYEAR,g=f.ONEAVGMONTH,y=f.ONEDAY,v=f.ONEHOUR,_=f.ONEMIN,b=f.ONESEC,x=f.MINUS_SIGN,w=f.BADNUM,k=e("../../constants/alignment"),M=k.MID_SHIFT,T=k.CAP_SHIFT,S=k.LINE_SPACING,C=k.OPPOSITE_SIDE,L=t.exports={};L.setConvert=e("./set_convert");var A=e("./axis_autotype"),E=e("./axis_ids");L.id2name=E.id2name,L.name2id=E.name2id,L.cleanId=E.cleanId,L.list=E.list,L.listIds=E.listIds,L.getFromId=E.getFromId,L.getFromTrace=E.getFromTrace;var D=e("./autorange");L.getAutoRange=D.getAutoRange,L.findExtremes=D.findExtremes,L.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],u=n+"ref",c={};return a||(a=l[0]||i),i||(i=a),c[u]={valType:"enumerated",values:l.concat(i?[i]:[]),dflt:a},s.coerce(e,t,c,u)},L.coercePosition=function(e,t,r,n,a,i){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(a,i);else{var u=L.getFromId(t,n);l=r(a,i=u.fraction2r(i)),o=u.cleanPos}e[a]=o(l)},L.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?s.ensureNumber:L.getFromId(t,r).cleanPos)(e)},L.redrawComponents=function(e,t){t=t||L.listIds(e);var r=e._fullLayout;function n(n,a,i,s){for(var l=o.getComponentMethod(n,a),u={},c=0;c2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},L.saveRangeInitial=function(e,t){for(var r=L.list(e,"",!0),n=!1,a=0;a.3*p||c(n)||c(i))){var h=r.dtick/2;e+=e+h.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=L.tickIncrement(e,"M6","reverse")+1.5*y:i.exactMonths>.8?e=L.tickIncrement(e,"M1","reverse")+15.5*y:e-=y/2;var l=L.tickIncrement(e,r);if(l<=n)return l}return e}(_,e,v,u,i)),g=_;g<=c;)g=L.tickIncrement(g,v,!1,i);return{start:t.c2r(_,0,i),end:t.c2r(g,0,i),size:v,_dataSpan:c-u}},L.prepTicks=function(e){var t=s.simpleMap(e.range,e.r2l);if("auto"===e.tickmode||!e.dtick){var r,n=e.nticks;n||("category"===e.type||"multicategory"===e.type?(r=e.tickfont?1.2*(e.tickfont.size||12):15,n=e._length/r):(r="y"===e._id.charAt(0)?40:80,n=s.constrain(e._length/r,4,9)+1),"radialaxis"===e._name&&(n*=2)),"array"===e.tickmode&&(n*=100),L.autoTicks(e,Math.abs(t[1]-t[0])/n),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}e.tick0||(e.tick0="date"===e.type?"2000-01-01":0),"date"===e.type&&e.dtick<.1&&(e.dtick=.1),V(e)},L.calcTicks=function(e){L.prepTicks(e);var t=s.simpleMap(e.range,e.r2l);if("array"===e.tickmode)return function(e){var t=e.tickvals,r=e.ticktext,n=new Array(t.length),a=s.simpleMap(e.range,e.r2l),i=1.0001*a[0]-1e-4*a[1],o=1.0001*a[1]-1e-4*a[0],l=Math.min(i,o),u=Math.max(i,o),c=0;Array.isArray(r)||(r=[]);var d="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var p=0;pl&&h=n:d<=n)&&!(o.length>c||d===u);d=L.tickIncrement(d,e.dtick,i,e.calendar)){u=d;var p=!1;l&&d!==(0|d)&&(p=!0),o.push({minor:p,value:d})}oe(e)&&360===Math.abs(t[1]-t[0])&&o.pop(),e._tmax=(o[o.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;for(var h=new Array(o.length),f=0;f10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=y&&i<=10||t>=15*y)e._tickround="d";else if(t>=_&&i<=16||t>=v)e._tickround="M";else if(t>=b&&i<=19||t>=_)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),u=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(u)>3&&(q(e.exponentformat)&&!G(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}function U(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}L.autoTicks=function(e,t){var r;function n(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar);var i=2*t;i>m?(t/=m,r=n(10),e.dtick="M"+12*H(t,r,F)):i>g?(t/=g,e.dtick="M"+H(t,1,R)):i>y?(e.dtick=H(t,y,N),e.tick0=s.dateTick0(e.calendar,!0)):i>v?e.dtick=H(t,v,R):i>_?e.dtick=H(t,_,z):i>b?e.dtick=H(t,b,z):(r=n(10),e.dtick=H(t,r,F))}else if("log"===e.type){e.tick0=0;var o=s.simpleMap(e.range,e.r2l);if(t>.7)e.dtick=Math.ceil(t);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/t);t=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),e.dtick="L"+H(t,r,F)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):oe(e)?(e.tick0=0,r=1,e.dtick=H(t,r,Y)):(e.tick0=0,r=n(10),e.dtick=H(t,r,F));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var u=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(u)}},L.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return e+o*t;var l=t.charAt(0),u=o*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,u,i);if("L"===l)return Math.log(Math.pow(10,e)+u)/Math.LN10;if("D"===l){var c="D2"===t?j:B,d=e+.01*o,p=s.roundUp(s.mod(d,1),c,r);return Math.floor(d)+Math.log(n.round(Math.pow(10,p),1))/Math.LN10}throw"unrecognized dtick "+String(t)},L.tickFirst=function(e){var t=e.r2l||Number,r=s.simpleMap(e.range,t),i=r[1]"+l,e._prevDateHead=l)),t.text=u}(e,o,r,u):"log"===c?function(e,t,r,n,i){var o=e.dtick,l=t.x,u=e.tickformat,c="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==c&&(o="L3",c="L"),u||"L"===c)t.text=K(Math.pow(10,l),e,i,n);else if(a(o)||"D"===c&&s.mod(l+.01,1)<.1){var d=Math.round(l),p=Math.abs(d),h=e.exponentformat;"power"===h||q(h)&&G(d)?(t.text=0===d?1:1===d?"10":"10"+(d>1?"":x)+p+"",t.fontSize*=1.25):("e"===h||"E"===h)&&p>2?t.text="1"+h+(d>0?"+":x)+p:(t.text=K(Math.pow(10,l),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var f=String(t.text).charAt(0);"0"!==f&&"1"!==f||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,o,0,u,m):"category"===c?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===c?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):oe(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=K(t.x,e,a,n);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=K(s.deg2rad(t.x),e,a,n);else{var l=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["",o[0],"","⁄","",o[1],"","π"].join(""),l&&(t.text=x+t.text)}}}}(e,o,r,u,m):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=K(t.x,e,a,n)}(e,o,0,u,m),n||(e.tickprefix&&!f(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!f(e.showticksuffix)&&(o.text+=e.ticksuffix)),"boundaries"===e.tickson||e.showdividers){var g=function(t){var r=e.l2p(t);return r>=0&&r<=e._length?t:null};o.xbnd=[g(o.x-.5),g(o.x+e.dtick-.5)]}return o},L.hoverLabelText=function(e,t,r){if(r!==w&&r!==t)return L.hoverLabelText(e,t)+" - "+L.hoverLabelText(e,r);var n="log"===e.type&&t<=0,a=L.tickText(e,e.c2l(n?-t:t),"hover").text;return n?0===t?"0":x+a:a};var W=["f","p","n","μ","m","","k","M","G","T"];function q(e){return"SI"===e||"B"===e}function G(e){return e>14||e<-15}function K(e,t,r,n){var i=e<0,o=t._tickround,l=r||t.exponentformat||"B",u=t._tickexponent,c=L.getTickFormat(t),d=t.separatethousands;if(n){var p={exponentformat:l,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};V(p),o=(Number(p._tickround)||0)+4,u=p._tickexponent,t.hoverformat&&(c=t.hoverformat)}if(c)return t._numFormat(c)(e).replace(/-/g,x);var h,f=Math.pow(10,-o)/2;if("none"===l&&(u=0),(e=Math.abs(e))"+h+"":"B"===l&&9===u?e+="B":q(l)&&(e+=W[u/3+5])),i?x+e:e}function Z(e,t){for(var r=[],n={},a=0;a1&&r=0,i=c(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=o(a)))){r=n;break}break;case"log":for(t=0;t0?r.bottom-c:0,d)))),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var h=[0,1];if("x"===f){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?c-r.top:0,d),h.reverse()),r.width>0){var g=r.right-(t._offset+t._length);g>0&&(n.xr=1,n.r=g);var y=t._offset-r.left;y>0&&(n.xl=0,n.l=y)}}else if("l"===l?n[l]=t._depth=Math.max(r.height>0?c-r.left:0,d):(n[l]=t._depth=Math.max(r.height>0?r.right-c:0,d),h.reverse()),r.height>0){var v=r.bottom-(t._offset+t._length);v>0&&(n.yb=0,n.b=v);var _=t._offset-r.top;_>0&&(n.yt=1,n.t=_)}n[m]="free"===t.anchor?t.position:t._anchorAxis.domain[h[0]],t.title.text!==p._dfltTitle[f]&&(n[l]+=J(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[u]+=d),!0===t.mirror||"ticks"===t.mirror?a[m]=t._anchorAxis.domain[h[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[m]=[t._counterDomainMin,t._counterDomainMax][h[1]]))}K&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),i.autoMargin(e,ee(t),n),i.autoMargin(e,te(t),a),i.autoMargin(e,re(t),s)})),r.skipTitle||K&&"bottom"===t.side||q.push((function(){return function(e,t){var r,n=e._fullLayout,a=t._id,i=a.charAt(0),o=t.title.font.size;t.title.hasOwnProperty("standoff")?r=t._depth+t.title.standoff+J(t):(r="multicategory"===t.type?t._depth:10+1.5*o+(t.linewidth?t.linewidth-1:0),r+="x"===i?"top"===t.side?o*(t.showticklabels?1:0):o*(t.showticklabels?1.5:.5):"right"===t.side?o*(t.showticklabels?1:.5):o*(t.showticklabels?.5:0));var s,l,c,p,h=L.getPxPosition(e,t);if("x"===i?(l=t._offset+t._length/2,c="top"===t.side?h-r:h+r):(c=t._offset+t._length/2,l="right"===t.side?h+r:h-r,s={rotate:"-90",offset:0}),"multicategory"!==t.type){var f=t._selections[t._id+"tick"];if(p={selection:f,side:t.side},f&&f.node()&&f.node().parentNode){var m=d.getTranslate(f.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return u.draw(e,a+"title",{propContainer:t,propName:t._name+".title.text",placeholder:n._dfltTitle[i],avoid:p,transform:s,attributes:{x:l,y:c,"text-anchor":"middle"}})}(e,t)})),s.syncOrAsync(q)}},L.getTickSigns=function(e){var t=e._id.charAt(0),r={x:"top",y:"right"}[t],n=e.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==e.ticks==("x"===t)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},L.makeTransFn=function(e){var t=e._id.charAt(0),r=e._offset;return"x"===t?function(t){return"translate("+(r+e.l2p(t.x))+",0)"}:function(t){return"translate(0,"+(r+e.l2p(t.x))+")"}},L.makeTickPath=function(e,t,r,n){n=void 0!==n?n:e.ticklen;var a=e._id.charAt(0),i=(e.linewidth||1)/2;return"x"===a?"M0,"+(t+i*r)+"v"+n*r:"M"+(t+i*r)+",0h"+n*r},L.makeLabelFns=function(e,t,r){var n=e._id.charAt(0),i="boundaries"!==e.tickson&&"outside"===e.ticks,o=0,l=0;if(i&&(o+=e.ticklen),r&&"outside"===e.ticks){var u=s.deg2rad(r);o=e.ticklen*Math.cos(u)+1,l=e.ticklen*Math.sin(u)}e.showticklabels&&(i||e.showline)&&(o+=.2*e.tickfont.size);var c,d,p,h,f={labelStandoff:o+=(e.linewidth||1)/2,labelShift:l};return"x"===n?(h="bottom"===e.side?1:-1,c=l*h,d=t+o*h,p="bottom"===e.side?1:-.2,f.xFn=function(e){return e.dx+c},f.yFn=function(e){return e.dy+d+e.fontSize*p},f.anchorFn=function(e,t){return a(t)&&0!==t&&180!==t?t*h<0?"end":"start":"middle"},f.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side?-n:0}):"y"===n&&(h="right"===e.side?1:-1,c=o,d=-l*h,p=90===Math.abs(e.tickangle)?.5:0,f.xFn=function(e){return e.dx+t+(c+e.fontSize*p)*h},f.yFn=function(e){return e.dy+d+e.fontSize*M},f.anchorFn=function(t,r){return a(r)&&90===Math.abs(r)?"middle":"right"===e.side?"start":"end"},f.heightFn=function(t,r,n){return(r*="left"===e.side?1:-1)<-30?-n:r<30?-.5*n:0}),f},L.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=r.layer.selectAll("path."+n).data(t.ticks?r.vals:[],X);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(c.stroke,t.tickcolor).style("stroke-width",d.crispRound(e,t.tickwidth,1)+"px").attr("d",r.path),a.attr("transform",r.transFn)},L.drawGrid=function(e,t,r){r=r||{};var n=t._id+"grid",a=r.vals,i=r.counterAxis;if(!1===t.showgrid)a=[];else if(i&&L.shouldShowZeroLine(e,t,i))for(var o="array"===t.tickmode,s=0;s1)for(n=1;n2*o}(e,t)?"date":function(e){for(var t=Math.max(1,(e.length-1)/1e3),r=0,n=0,o={},s=0;s2*r}(e)?"category":function(e){if(!e)return!1;for(var t=0;tn?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},r.getAxisGroup=function(e,t){for(var r=e._axisMatchGroups,n=0;n0;o&&(a="array");var s,l=r("categoryorder",a);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=t.categoryorder="trace"),"trace"===l?t._initialCategories=[]:"array"===l?t._initialCategories=s.slice():(s=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;nl*_)||k)for(r=0;rI&&RD&&(D=R);h/=(D-E)/(2*P),E=u.l2r(E),D=u.l2r(D),u.range=u._input.range=C=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function O(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function F(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+t+", "+r+")").attr("d","M0,0Z")}function R(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),z(e,t,a,i)}function z(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function N(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function B(e){C&&e.data&&e._context.showTips&&(s.notifier(s._(e,"Double-click to zoom back out"),"long"),C=!1)}function j(e){return"lasso"===e||"select"===e}function Y(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,S)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function H(e,t,r,n){for(var a,i,o,l,u=!1,c={},d={},p=0;p-1&&w(a,e,K,Z,t.id,Ce),i.indexOf("event")>-1&&d.click(e,a,t.id);else if(1===r&&he){var s=C?W:z,u="s"===C||"w"===L?0:1,c=s._name+".range["+u+"]",p=function(e,t){var r,a=e.range[t],i=Math.abs(a-e.range[1-t]);return"date"===e.type?a:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,n.format("."+r+"g")(Math.pow(10,a))):(r=Math.floor(Math.log(Math.abs(a))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,n.format("."+String(r)+"g")(a))}(s,u),h="left",f="middle";if(s.fixedrange)return;C?(f="n"===C?"top":"bottom","right"===s.side&&(h="right")):"e"===L&&(h="right"),e._context.showAxisRangeEntryBoxes&&n.select(ge).call(l.makeEditable,{gd:e,immediate:!0,background:e._fullLayout.paper_bgcolor,text:String(p),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:h,verticalAlign:f}).on("edit",(function(t){var r=s.d2r(t);void 0!==r&&o.call("_guiRelayout",e,c,r)}))}}function Ee(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,t+ye)),a=Math.max(0,Math.min(Q,r+ve)),i=Math.abs(n-ye),o=Math.abs(a-ve);function s(){ke="",_e.r=_e.l,_e.t=_e.b,Te.attr("d","M0,0Z")}if(_e.l=Math.min(ye,n),_e.r=Math.max(ye,n),_e.t=Math.min(ve,a),_e.b=Math.max(ve,a),ee.isSubplotConstrained)i>S||o>S?(ke="xy",i/$>o/Q?(o=i*Q/$,ve>a?_e.t=ve-o:_e.b=ve+o):(i=o*$/Q,ye>n?_e.l=ye-i:_e.r=ye+i),Te.attr("d",Y(_e))):s();else if(te.isSubplotConstrained)if(i>S||o>S){ke="xy";var l=Math.min(_e.l/$,(Q-_e.b)/Q),u=Math.max(_e.r/$,(Q-_e.t)/Q);_e.l=l*$,_e.r=u*$,_e.b=(1-l)*Q,_e.t=(1-u)*Q,Te.attr("d",Y(_e))}else s();else!ne||om[1]-1/4096&&(t.domain=s),a.noneOrAll(e.domain,t.domain,s)}return r("layer"),t}},{"../../lib":716,"fast-isnumeric":227}],780:[function(e,t,r){"use strict";var n=e("../../constants/alignment").FROM_BL;t.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)]}},{"../../constants/alignment":685}],781:[function(e,t,r){"use strict";var n=e("polybooljs"),a=e("../../registry"),i=e("../../components/color"),o=e("../../components/fx"),s=e("../../lib"),l=e("../../lib/polygon"),u=e("../../lib/throttle"),c=e("../../components/fx/helpers").makeEventData,d=e("./axis_ids").getFromId,p=e("../../lib/clear_gl_canvases"),h=e("../../plot_api/subroutines").redrawReglTraces,f=e("./constants"),m=f.MINSELECT,g=l.filter,y=l.tester;function v(e){return e._id}function _(e,t,r,n,a,i,o){var s,l,u,c,d,p,h,f,m,g=t._hoverdata,y=t._fullLayout.clickmode.indexOf("event")>-1,v=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(g)){k(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n0?function(e,t){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(s)&&(p=C(_))){for(o&&o.remove(),m=0;m0?"M"+a.join("M")+"Z":"M0,0Z",t.attr("d",n)}function C(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,n=e.pointNumbers,a=n.length>0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function L(e,t,r){var n,i,o,s;for(n=0;n-1&&_(t,C,a.xaxes,a.yaxes,a.subplot,a,W),"event"===r&&C.emit("plotly_selected",void 0);o.click(C,t)})).catch(s.error)},a.doneFn=function(){G.remove(),u.done(K).then((function(){u.clear(K),a.gd.emit("plotly_selected",x),h&&a.selectionDefs&&(h.subtract=U,a.selectionDefs.push(h),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,p)),a.doneFnCompleted&&a.doneFnCompleted(Z)})).catch(s.error)}},clearSelect:E,selectOnClick:_}},{"../../components/color":591,"../../components/fx":629,"../../components/fx/helpers":626,"../../lib":716,"../../lib/clear_gl_canvases":701,"../../lib/polygon":728,"../../lib/throttle":741,"../../plot_api/subroutines":755,"../../registry":845,"./axis_ids":767,"./constants":770,polybooljs:474}],782:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=i.cleanNumber,s=i.ms2DateTime,l=i.dateTime2ms,u=i.ensureNumber,c=i.isArrayOrTypedArray,d=e("../../constants/numerical"),p=d.FP_SAFE,h=d.BADNUM,f=d.LOG_CLIP,m=e("./constants"),g=e("./axis_ids");function y(e){return Math.pow(10,e)}function v(e){return null!=e}t.exports=function(e,t){t=t||{};var r=e._id||"x",d=r.charAt(0);function _(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*f*Math.abs(n-a))}return h}function b(t,r,n){var o=l(t,n||e.calendar);if(o===h){if(!a(t))return h;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),u=Math.round(t-s/10);o=l(new Date(u))+s/10}return o}function x(t,r,n){return s(t,r,n||e.calendar)}function w(t){return e._categories[Math.round(t)]}function k(t){if(v(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return h}function M(t){if(e._categoriesMap)return e._categoriesMap[t]}function T(e){var t=M(e);return void 0!==t?t:a(e)?+e:void 0}function S(t){return a(t)?n.round(e._b+e._m*t,2):h}function C(t){return(t-e._b)/e._m}e.c2l="log"===e.type?_:u,e.l2c="log"===e.type?y:u,e.l2p=S,e.p2l=C,e.c2p="log"===e.type?function(e,t){return S(_(e,t))}:S,e.p2c="log"===e.type?function(e){return y(C(e))}:C,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(o(t))},e.p2d=e.p2r=C,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return _(o(e),t)},e.r2d=e.r2c=function(e){return y(o(e))},e.d2c=e.r2l=o,e.c2d=e.l2r=u,e.c2r=_,e.l2d=y,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return y(C(e))},e.r2p=function(t){return e.l2p(o(t))},e.p2r=C,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=b,e.c2d=e.c2r=e.l2d=e.l2r=x,e.d2p=e.r2p=function(t,r,n){return e.l2p(b(t,0,n))},e.p2d=e.p2r=function(e,t,r){return x(C(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,h,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=k,e.r2d=e.c2d=e.l2d=w,e.d2r=e.d2l_noadd=T,e.r2c=function(t){var r=T(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=T,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return w(C(e))},e.r2p=e.d2p,e.p2r=C,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=w,e.d2r=e.d2l_noadd=T,e.r2c=function(t){var r=T(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=M,e.l2r=e.c2r=u,e.r2l=T,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return w(C(e))},e.r2p=e.d2p,e.p2r=C,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(n){var a,o,s=e._traceIndices,l=t._axisMatchGroups;if(l&&l.length&&0===e._categories.length)for(a=0;ap&&(s[n]=p),s[0]===s[1]){var u=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=u,s[1]+=u}}else i.nestedProperty(e,t).set(o)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=g.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var s=e.r2l(e[i][0],o),l=e.r2l(e[i][1],o);if("y"===d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(s-l),e._b=-e._m*l):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(l-s),e._b=-e._m*s),!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw t._replotting=!1,new Error("Something went wrong with axis scaling")},e.makeCalcdata=function(t,r){var n,a,o,s,l=e.type,u="date"===l&&t[r+"calendar"];if(r in t){if(n=t[r],s=t._length||i.minRowLength(n),i.isTypedArray(n)&&("linear"===l||"log"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}if("multicategory"===l)return function(e,t){for(var r=new Array(t),n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,a=n.xaxis,l=n.yaxis,u=a._length,c=l._length,d=!!t.xr1,p=!!t.yr1,h=[];if(d){var f=i.simpleMap(t.xr0,a.r2l),m=i.simpleMap(t.xr1,a.r2l),g=f[1]-f[0],y=m[1]-m[0];h[0]=(f[0]*(1-r)+r*m[0]-f[0])/(f[1]-f[0])*u,h[2]=u*(1-r+r*y/g),a.range[0]=a.l2r(f[0]*(1-r)+r*m[0]),a.range[1]=a.l2r(f[1]*(1-r)+r*m[1])}else h[0]=0,h[2]=u;if(p){var v=i.simpleMap(t.yr0,l.r2l),_=i.simpleMap(t.yr1,l.r2l),b=v[1]-v[0],x=_[1]-_[0];h[1]=(v[1]*(1-r)+r*_[1]-v[1])/(v[0]-v[1])*c,h[3]=c*(1-r+r*x/b),l.range[0]=a.l2r(v[0]*(1-r)+r*_[0]),l.range[1]=l.l2r(v[1]*(1-r)+r*_[1])}else h[1]=0,h[3]=c;s.drawOne(e,a,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[a._id,l._id]);var w=d?u/h[2]:1,k=p?c/h[3]:1,M=d?h[0]:0,T=p?h[1]:0,S=d?h[0]/h[2]*u:0,C=p?h[1]/h[3]*c:0,L=a._offset-S,A=l._offset-C;n.clipRect.call(o.setTranslate,M,T).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,L,A).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(e)}},{"../../components/drawing":612,"../../lib":716,"../../registry":845,"./axes":764,d3:164}],787:[function(e,t,r){"use strict";var n=e("../../registry").traceIs,a=e("./axis_autotype");function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}t.exports=function(e,t,r,s){"-"===r("type",(s.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r=e._id,s=r.charAt(0);-1!==r.indexOf("scene")&&(r=s);var l=function(e,t,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,r,s);if(l)if("histogram"!==l.type||s!=={v:"y",h:"x"}[l.orientation||"v"]){var u,c=s+"calendar",d=l[c],p={noMultiCategory:!n(l,"cartesian")||n(l,"noMultiCategory")};if(o(l,s)){var h=i(l),f=[];for(u=0;u0?".":"")+i;a.isPlainObject(o)?l(o,t,s,n+1):t(s,i,o)}}))}r.manageCommandObserver=function(e,t,n,o){var s={},l=!0;t&&t._commandObserver&&(s=t._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=r.hasSimpleAPICommandBindings(e,n,s.lookupTable);if(t&&t._commandObserver){if(u)return s;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,s}if(u){i(e,u,s.cache),s.check=function(){if(l){var t=i(e,u,s.cache);return t.changed&&o&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(o({value:t.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;da*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(e){return r.getPath().bounds(e)},r.fitExtent=function(e,t){var n=e[1][0]-e[0][0],a=e[1][1]-e[0][1],i=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),i&&r.clipExtent(null);var o=r.getBounds(t),s=Math.min(n/(o[1][0]-o[0][0]),a/(o[1][1]-o[0][1])),l=+e[0][0]+(n-s*(o[1][0]+o[0][0]))/2,u=+e[0][1]+(a-s*(o[1][1]+o[0][1]))/2;return i&&r.clipExtent(i),r.scale(150*s).translate([l,u])},r.precision(m.precision),a&&r.clipAngle(a-m.clipPad),r}(t);c.center([u.lon-l.lon,u.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var d=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],p=t.lonaxis,h=t.lataxis,f=function(e,t){var r=m.clipPad,n=e[0]+r,a=e[1]-r,i=t[0]+r,o=t[1]-r;n>0&&a<0&&(a+=360);var s=(a-n)/4;return{type:"Polygon",coordinates:[[[n,i],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[a,o],[a,i],[a-s,i],[a-2*s,i],[a-3*s,i],[n,i]]]}}(p.range,h.range);c.fitExtent(d,f);var g=this.bounds=c.getBounds(f),y=this.fitScale=c.scale(),v=c.translate();if(!isFinite(g[0][0])||!isFinite(g[0][1])||!isFinite(g[1][0])||!isFinite(g[1][1])||isNaN(v[0])||isNaN(v[0])){for(var _=this.graphDiv,b=["projection.rotation","center","lonaxis.range","lataxis.range"],x="Invalid geo settings, relayout'ing to default view.",w={},k=0;k-1&&h(n.event,i,[r.xaxis],[r.yaxis],r.id,m),u.indexOf("event")>-1&&l.click(i,n.event))}))}function g(e){return r.projection.invert([e[0]+r.xaxis._offset,e[1]+r.yaxis._offset])}},_.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,a="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",a),e.clipRect=e.clipDef.append("rect"),e.framework=n.select(e.container).append("g").attr("class","geo "+e.id).call(s.setClipUrl,a,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(e.mockAxis,r)},_.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};e._isScoped?this.viewInitial={"center.lon":t.lon,"center.lat":t.lat,"projection.scale":r.scale}:e._isClipped?this.viewInitial={"projection.scale":r.scale,"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:this.viewInitial={"center.lon":t.lon,"center.lat":t.lat,"projection.scale":r.scale,"projection.rotation.lon":n.lon}},_.render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function a(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",a).attr("transform",n)}},{"../../components/color":591,"../../components/dragelement":609,"../../components/drawing":612,"../../components/fx":629,"../../lib":716,"../../lib/topojson_utils":743,"../../registry":845,"../cartesian/axes":764,"../cartesian/select":781,"../plots":825,"./constants":792,"./projections":797,"./zoom":798,d3:164,"topojson-client":538}],794:[function(e,t,r){"use strict";var n=e("../../plots/get_data").getSubplotCalcData,a=e("../../lib").counterRegex,i=e("./geo"),o="geo",s=a(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"},t.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,a=t._subplots[o],s=0;s0&&w<0&&(w+=360);var k,M,T,S=(x+w)/2;if(!u){var C=c?s.projRotate:[S,0,0];k=r("projection.rotation.lon",C[0]),r("projection.rotation.lat",C[1]),r("projection.rotation.roll",C[2]),r("showcoastlines",!c)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean")&&r("oceancolor")}u?(M=-96.6,T=38.7):(M=c?S:k,T=(b[0]+b[1])/2),r("center.lon",M),r("center.lat",T),d&&r("projection.parallels",s.projParallels||[0,60]),r("projection.scale"),r("showland")&&r("landcolor"),r("showlakes")&&r("lakecolor"),r("showrivers")&&(r("rivercolor"),r("riverwidth")),r("showcountries",c&&"usa"!==i)&&(r("countrycolor"),r("countrywidth")),("usa"===i||"north america"===i&&50===n)&&(r("showsubunits",!0),r("subunitcolor"),r("subunitwidth")),c||r("showframe",!0)&&(r("framecolor"),r("framewidth")),r("bgcolor")}t.exports=function(e,t,r){n(e,t,r,{type:"geo",attributes:i,handleDefaults:s,partition:"y"})}},{"../subplot_defaults":839,"./constants":792,"./layout_attributes":795}],797:[function(e,t,r){"use strict";t.exports=function(e){function t(e,t){return{type:"Feature",id:e.id,properties:e.properties,geometry:r(e.geometry,t)}}function r(t,n){if(!t)return null;if("GeometryCollection"===t.type)return{type:"GeometryCollection",geometries:object.geometries.map((function(e){return r(e,n)}))};if(!u.hasOwnProperty(t.type))return null;var a=u[t.type];return e.geo.stream(t,n(a)),a.result()}e.geo.project=function(e,t){var a=t.stream;if(!a)throw new Error("not yet supported");return(e&&n.hasOwnProperty(e.type)?n[e.type]:r)(e,a)};var n={Feature:t,FeatureCollection:function(e,r){return{type:"FeatureCollection",features:e.features.map((function(e){return t(e,r)}))}}},a=[],i=[],o={point:function(e,t){a.push([e,t])},result:function(){var e=a.length?a.length<2?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a}:null;return a=[],e}},s={lineStart:c,point:function(e,t){a.push([e,t])},lineEnd:function(){a.length&&(i.push(a),a=[])},result:function(){var e=i.length?i.length<2?{type:"LineString",coordinates:i[0]}:{type:"MultiLineString",coordinates:i}:null;return i=[],e}},l={polygonStart:c,lineStart:c,point:function(e,t){a.push([e,t])},lineEnd:function(){var e=a.length;if(e){do{a.push(a[0].slice())}while(++e<4);i.push(a),a=[]}},polygonEnd:c,result:function(){if(!i.length)return null;var e=[],t=[];return i.forEach((function(r){!function(e){if((t=e.length)<4)return!1;for(var t,r=0,n=e[t-1][1]*e[0][0]-e[t-1][0]*e[0][1];++rn^h>n&&r<(p-u)*(n-c)/(h-c)+u&&(a=!a)}return a}(e[0],r))return e.push(t),!0}))||e.push([t])})),i=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}},u={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function c(){}var d=1e-6,p=d*d,h=Math.PI,f=h/2,m=(Math.sqrt(h),h/180),g=180/h;function y(e){return e>1?f:e<-1?-f:Math.asin(e)}function v(e){return e>1?0:e<-1?h:Math.acos(e)}var _=e.geo.projection,b=e.geo.projectionMutator;function x(e,t){var r=(2+f)*Math.sin(t);t/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>d;n++){var i=Math.cos(t);t-=a=(t+Math.sin(t)*(i+2)-r)/(2*i*(1+i))}return[2/Math.sqrt(h*(4+h))*e*(1+Math.cos(t)),2*Math.sqrt(h/(4+h))*Math.sin(t)]}e.geo.interrupt=function(t){var r,n=[[[[-h,0],[0,f],[h,0]]],[[[-h,0],[0,-f],[h,0]]]];function a(e,r){for(var a=r<0?-1:1,i=n[+(r<0)],o=0,s=i.length-1;oi[o][2][0];++o);var l=t(e-i[o][1][0],r);return l[0]+=t(i[o][1][0],a*r>a*i[o][0][1]?i[o][0][1]:r)[0],l}function i(){r=n.map((function(e){return e.map((function(e){var r,n=t(e[0][0],e[0][1])[0],a=t(e[2][0],e[2][1])[0],i=t(e[1][0],e[0][1])[1],o=t(e[1][0],e[1][1])[1];return i>o&&(r=i,i=o,o=r),[[n,i],[a,o]]}))}))}t.invert&&(a.invert=function(e,i){for(var o=r[+(i<0)],s=n[+(i<0)],l=0,c=o.length;l=0;--a){var p;o=180*(p=n[1][a])[0][0]/h,s=180*p[0][1]/h,u=180*p[1][1]/h,c=180*p[2][0]/h,d=180*p[2][1]/h,r.push(l([[c-t,d-t],[c-t,u+t],[o+t,u+t],[o+t,s-t]],30))}return{type:"Polygon",coordinates:[e.merge(r)]}}(),i)},a},o.lobes=function(e){return arguments.length?(n=e.map((function(e){return e.map((function(e){return[[e[0][0]*h/180,e[0][1]*h/180],[e[1][0]*h/180,e[1][1]*h/180],[e[2][0]*h/180,e[2][1]*h/180]]}))})),i(),o):n.map((function(e){return e.map((function(e){return[[180*e[0][0]/h,180*e[0][1]/h],[180*e[1][0]/h,180*e[1][1]/h],[180*e[2][0]/h,180*e[2][1]/h]]}))}))},o},x.invert=function(e,t){var r=.5*t*Math.sqrt((4+h)/h),n=y(r),a=Math.cos(n);return[e/(2/Math.sqrt(h*(4+h))*(1+a)),y((n+r*(a+2))/(2+f))]},(e.geo.eckert4=function(){return _(x)}).raw=x;var w=e.geo.azimuthalEqualArea.raw;function k(e,t){if(arguments.length<2&&(t=e),1===t)return w;if(t===1/0)return M;function r(r,n){var a=w(r/t,n);return a[0]*=e,a}return r.invert=function(r,n){var a=w.invert(r/e,n);return a[0]*=t,a},r}function M(e,t){return[e*Math.cos(t)/Math.cos(t/=2),2*Math.sin(t)]}function T(e,t){return[3*e/(2*h)*Math.sqrt(h*h/3-t*t),t]}function S(e,t){return[e,1.25*Math.log(Math.tan(h/4+.4*t))]}function C(e){return function(t){var r,n=e*Math.sin(t),a=30;do{t-=r=(t+Math.sin(t)-n)/(1+Math.cos(t))}while(Math.abs(r)>d&&--a>0);return t/2}}M.invert=function(e,t){var r=2*y(t/2);return[e*Math.cos(r/2)/Math.cos(r),r]},(e.geo.hammer=function(){var e=2,t=b(k),r=t(e);return r.coefficient=function(r){return arguments.length?t(e=+r):e},r}).raw=k,T.invert=function(e,t){return[2/3*h*e/Math.sqrt(h*h/3-t*t),t]},(e.geo.kavrayskiy7=function(){return _(T)}).raw=T,S.invert=function(e,t){return[e,2.5*Math.atan(Math.exp(.8*t))-.625*h]},(e.geo.miller=function(){return _(S)}).raw=S,C(h);var L=function(e,t,r){var n=C(r);function a(r,a){return[e*r*Math.cos(a=n(a)),t*Math.sin(a)]}return a.invert=function(n,a){var i=y(a/t);return[n/(e*Math.cos(i)),y((2*i+Math.sin(2*i))/r)]},a}(Math.SQRT2/f,Math.SQRT2,h);function A(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(e.geo.mollweide=function(){return _(L)}).raw=L,A.invert=function(e,t){var r,n=t,a=25;do{var i=n*n,o=i*i;n-=r=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-t)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(Math.abs(r)>d&&--a>0);return[e/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},(e.geo.naturalEarth=function(){return _(A)}).raw=A;var E=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function D(e,t){var r,n=Math.min(18,36*Math.abs(t)/h),a=Math.floor(n),i=n-a,o=(r=E[a])[0],s=r[1],l=(r=E[++a])[0],u=r[1],c=(r=E[Math.min(19,++a)])[0],d=r[1];return[e*(l+i*(c-o)/2+i*i*(c-2*l+o)/2),(t>0?f:-f)*(u+i*(d-s)/2+i*i*(d-2*u+s)/2)]}function P(e,t){return[e*Math.cos(t),t]}function I(e,t){var r,n=Math.cos(t),a=(r=v(n*Math.cos(e/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(e)*a,Math.sin(t)*a]}function O(e,t){var r=I(e,t);return[(r[0]+e/f)/2,(r[1]+t)/2]}E.forEach((function(e){e[1]*=1.0144})),D.invert=function(e,t){var r=t/f,n=90*r,a=Math.min(18,Math.abs(n/5)),i=Math.max(0,Math.floor(a));do{var o=E[i][1],s=E[i+1][1],l=E[Math.min(19,i+2)][1],u=l-o,c=l-2*s+o,d=2*(Math.abs(r)-s)/u,h=c/u,y=d*(1-h*d*(1-2*h*d));if(y>=0||1===i){n=(t>=0?5:-5)*(y+a);var v,_=50;do{y=(a=Math.min(18,Math.abs(n)/5))-(i=Math.floor(a)),o=E[i][1],s=E[i+1][1],l=E[Math.min(19,i+2)][1],n-=(v=(t>=0?f:-f)*(s+y*(l-o)/2+y*y*(l-2*s+o)/2)-t)*g}while(Math.abs(v)>p&&--_>0);break}}while(--i>=0);var b=E[i][0],x=E[i+1][0],w=E[Math.min(19,i+2)][0];return[e/(x+y*(w-b)/2+y*y*(w-2*x+b)/2),n*m]},(e.geo.robinson=function(){return _(D)}).raw=D,P.invert=function(e,t){return[e/Math.cos(t),t]},(e.geo.sinusoidal=function(){return _(P)}).raw=P,I.invert=function(e,t){if(!(e*e+4*t*t>h*h+d)){var r=e,n=t,a=25;do{var i,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),u=Math.sin(n),c=Math.cos(n),p=Math.sin(2*n),f=u*u,m=c*c,g=s*s,y=1-m*l*l,_=y?v(c*l)*Math.sqrt(i=1/y):i=0,b=2*_*c*s-e,x=_*u-t,w=i*(m*g+_*c*l*f),k=i*(.5*o*p-2*_*u*s),M=.25*i*(p*s-_*u*m*o),T=i*(f*l+_*g*c),S=k*M-T*w;if(!S)break;var C=(x*k-b*T)/S,L=(b*M-x*w)/S;r-=C,n-=L}while((Math.abs(C)>d||Math.abs(L)>d)&&--a>0);return[r,n]}},(e.geo.aitoff=function(){return _(I)}).raw=I,O.invert=function(e,t){var r=e,n=t,a=25;do{var i,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),u=s*s,c=o*o,p=Math.sin(r),h=Math.cos(r/2),m=Math.sin(r/2),g=m*m,y=1-c*h*h,_=y?v(o*h)*Math.sqrt(i=1/y):i=0,b=.5*(2*_*o*m+r/f)-e,x=.5*(_*s+n)-t,w=.5*i*(c*g+_*o*h*u)+.5/f,k=i*(p*l/4-_*s*m),M=.125*i*(l*m-_*s*c*p),T=.5*i*(u*h+_*g*o)+.5,S=k*M-T*w,C=(x*k-b*T)/S,L=(b*M-x*w)/S;r-=C,n-=L}while((Math.abs(C)>d||Math.abs(L)>d)&&--a>0);return[r,n]},(e.geo.winkel3=function(){return _(O)}).raw=O}},{}],798:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../registry"),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},u={cursor:"auto"};function c(e,t){return n.behavior.zoom().translate(t.translate()).scale(t.scale())}function d(e,t,r){var n=e.id,o=e.graphDiv,s=o.layout,l=s[n],u=o._fullLayout,c=u[n],d={},p={};function h(e,t){d[n+"."+e]=a.nestedProperty(l,e).get(),i.call("_storeDirectGUIEdit",s,u._preGUI,d);var r=a.nestedProperty(c,e);r.get()!==t&&(r.set(t),a.nestedProperty(l,e).set(t),p[n+"."+e]=t)}r(h),h("projection.scale",t.scale()/e.fitScale),o.emit("plotly_relayout",p)}function p(e,t){var r=c(0,t);function a(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){t.scale(n.event.scale).translate(n.event.translate),e.render();var r=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(u),d(e,t,a)})),r}function h(e,t){var r,a,i,o,s,p,h,f,m,g=c(0,t),y=2;function v(e){return t.invert(e)}function _(r){var n=t.rotate(),a=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",a[0]),r("center.lat",a[1])}return g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),a=t.rotate(),i=t.translate(),o=a,s=v(r)})).on("zoom",(function(){if(p=n.mouse(this),function(e){var r=v(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>y||Math.abs(n[1]-e[1])>y}(r))return g.scale(t.scale()),void g.translate(t.translate());t.scale(n.event.scale),t.translate([i[0],n.event.translate[1]]),s?v(p)&&(f=v(p),h=[o[0]+(f[0]-s[0]),a[1],a[2]],t.rotate(h),o=h):s=v(r=p),m=!0,e.render();var l=t.rotate(),u=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":u[0],"geo.center.lat":u[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(u),m&&d(e,t,_)})),g}function f(e,t){var r,a={r:t.rotate(),k:t.scale()},i=c(0,t),o=function(e){for(var t=0,r=arguments.length,a=[];++tf?(i=(d>0?90:-90)-h,a=0):(i=Math.asin(d/f)*s-h,a=Math.sqrt(f*f-d*d));var m=180-i-2*h,g=(Math.atan2(p,c)-Math.atan2(u,a))*s,y=(Math.atan2(p,c)-Math.atan2(u,-a))*s;return b(r[0],r[1],i,g)<=b(r[0],r[1],m,y)?[i,g,r[2]]:[m,y,r[2]]}function b(e,t,r,n){var a=x(r-e),i=x(n-t);return Math.sqrt(a*a+i*i)}function x(e){return(e%360+540)%360-180}function w(e,t,r){var n=r*o,a=e.slice(),i=0===t?1:0,s=2===t?1:2,l=Math.cos(n),u=Math.sin(n);return a[i]=e[i]*l-e[s]*u,a[s]=e[s]*l+e[i]*u,a}function k(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*s,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*s]}function M(e,t){for(var r=0,n=0,a=e.length;nMath.abs(s)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(i)*x*(s>=0?1:-1),u.boxEnd[1]l[3]&&(u.boxEnd[1]=l[3],u.boxEnd[0]=u.boxStart[0]+(l[3]-u.boxStart[1])/Math.abs(x))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(s)/x*(i>=0?1:-1),u.boxEnd[0]l[2]&&(u.boxEnd[0]=l[2],u.boxEnd[1]=u.boxStart[1]+(l[2]-u.boxStart[0])*Math.abs(x)))}}else u.boxEnabled?(i=u.boxStart[0]!==u.boxEnd[0],s=u.boxStart[1]!==u.boxEnd[1],i||s?(i&&(g(0,u.boxStart[0],u.boxEnd[0]),e.xaxis.autorange=!1),s&&(g(1,u.boxStart[1],u.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,t?(u.panning||(u.dragStart[0]=n,u.dragStart[1]=a),Math.abs(u.dragStart[0]-n).999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(e,t,r){var a=t._basePlotModules.length>1;o(e,t,r,{type:c,attributes:l,handleDefaults:d,fullLayout:t,font:t.font,fullData:r,getDfltFromLayout:function(t){if(!a)return n.validate(e[t],l[t])?e[t]:void 0},paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},{"../../../components/color":591,"../../../lib":716,"../../../registry":845,"../../get_data":799,"../../subplot_defaults":839,"./axis_defaults":807,"./layout_attributes":810}],810:[function(e,t,r){"use strict";var n=e("./axis_attributes"),a=e("../../domain").attributes,i=e("../../../lib/extend").extendFlat,o=e("../../../lib").counterRegex;function s(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(s(0,0,1),{}),center:i(s(0,0,0),{}),eye:i(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":716,"../../../lib/extend":707,"../../domain":789,"./axis_attributes":806}],811:[function(e,t,r){"use strict";var n=e("../../../lib/str2rgbarray"),a=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}i.prototype.merge=function(e){for(var t=0;t<3;++t){var r=e[a[t]];r.visible?(this.enabled[t]=r.showspikes,this.colors[t]=n(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},t.exports=function(e){var t=new i;return t.merge(e),t}},{"../../../lib/str2rgbarray":739}],812:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],u=0;u<3;++u){var c=s[i[u]];if(c._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/e.dataScale[u],Math.abs(c._length)===1/0||isNaN(c._length))l[u]=[];else{c._input_range=c.range.slice(),c.range[0]=r[u].lo/e.dataScale[u],c.range[1]=r[u].hi/e.dataScale[u],c._m=1/(e.dataScale[u]*r[u].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var d=c.tickmode;if("auto"===c.tickmode){c.tickmode="linear";var p=c.nticks||a.constrain(c._length/40,4,9);n.autoTicks(c,Math.abs(c.range[1]-c.range[0])/p)}for(var h=n.calcTicks(c),f=0;f/g," "));l[u]=h,c.tickmode=d}}for(t.ticks=l,u=0;u<3;++u)for(o[u]=.5*(e.glplot.bounds[0][u]+e.glplot.bounds[1][u]),f=0;f<2;++f)t.bounds[f][u]=e.glplot.bounds[f][u];e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],a=new Array(n.length),i=0;i")):"isosurface"===t.type||"volume"===t.type?(w.valueLabel=p.tickText(e.mockAxis,e.mockAxis.d2l(c.traceCoordinate[3]),"hover").text,S.push("value: "+w.valueLabel),c.textLabel&&S.push(c.textLabel),v=S.join("
")):v=c.textLabel;var C={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:x};h.appendArrayPointValue(C,b,x),t._module.eventData&&(C=b._module.eventData(C,c,b,{},x));var L={points:[C]};e.fullSceneLayout.hovermode&&h.loneHover({trace:b,x:(.5+.5*y[0]/y[3])*i,y:(.5-.5*y[1]/y[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:v,name:u.name,color:h.castHoverOption(b,x,"bgcolor")||u.color,borderColor:h.castHoverOption(b,x,"bordercolor"),fontFamily:h.castHoverOption(b,x,"font.family"),fontSize:h.castHoverOption(b,x,"font.size"),fontColor:h.castHoverOption(b,x,"font.color"),nameLength:h.castHoverOption(b,x,"namelength"),textAlign:h.castHoverOption(b,x,"align"),hovertemplate:d.castOption(b,x,"hovertemplate"),hovertemplateLabels:d.extendFlat({},C,w),eventData:[C]},{container:n,gd:r}),c.buttons&&c.distance<5?r.emit("plotly_click",L):r.emit("plotly_hover",L),s=L}else h.loneUnhover(n),r.emit("plotly_unhover",s);e.drawAnnotations(e)}function x(e,t,r){if(e.initializeGLCamera(),!function(e,t,r,i,o){var u={canvas:i,gl:o,container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t,pixelRatio:r};if(e.staticMode){if(!(a||(n=document.createElement("canvas"),a=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");u.pixelRatio=e.pixelRatio,u.gl=a,u.canvas=n}var c=0;try{e.glplot=s(u)}catch(t){c++;try{e.glplot=s(u)}catch(e){c++}}return c<2}(e,e.camera,e.pixelRatio,t,r))return m(e);var i=e.graphDiv,o=i.layout,c=function(){var t={};return e.isCameraChanged(o)&&(t[e.id+".camera"]=e.getCamera()),e.isAspectChanged(o)&&(t[e.id+".aspectratio"]=e.glplot.getAspectratio()),t},d=function(e){if(!1!==e.fullSceneLayout.dragmode){var t=c();e.saveLayout(o),e.graphDiv.emit("plotly_relayout",t)}};return e.glplot.canvas.addEventListener("mouseup",(function(){d(e)})),e.glplot.canvas.addEventListener("wheel",(function(t){if(i._context._scrollZoom.gl3d){if(e.glplot.camera._ortho){var r=t.deltaX>t.deltaY?1.1:1/1.1,n=e.glplot.getAspectratio();e.glplot.setAspectratio({x:r*n.x,y:r*n.y,z:r*n.z})}d(e)}}),!!u&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=c();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(t){i&&i.emit&&i.emit("plotly_webglcontextlost",{event:t,layer:e.id})}),!1),e.glplot.camera=e.camera,e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=b.bind(null,e),e.traces={},e.make4thDimension(),!0}function w(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",r.appendChild(a),this.svgContainer=a,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=y(t,t[this.id]),this.spikeOptions=v(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod("annotations3d","convert"),this.drawAnnotations=c.getComponentMethod("annotations3d","draw"),x(this)}var k=w.prototype;k.initializeGLCamera=function(){var e=this.fullSceneLayout.camera,t="orthographic"===e.projection.type;this.camera=o(this.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:t,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.recoverContext=function(){var e=this,t=this.glplot.gl,r=this.glplot.canvas;this.glplot.dispose(),requestAnimationFrame((function n(){t.isContextLost()?requestAnimationFrame(n):x(e,r,t)?e.plot.apply(e,e.plotArgs):d.error("Catastrophic and unrecoverable WebGL error. Context lost.")}))};var M=["xaxis","yaxis","zaxis"];function T(e,t,r){for(var n=e.fullSceneLayout,a=0;a<3;a++){var i=M[a],o=i.charAt(0),s=n[i],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(d.isArrayOrTypedArray(l))for(var p,h=0;h<(c||l.length);h++)if(d.isArrayOrTypedArray(l[h]))for(var f=0;fm[1][i])m[0][i]=-1,m[1][i]=1;else{var L=m[1][i]-m[0][i];m[0][i]-=L/32,m[1][i]+=L/32}if("reversed"===s.autorange){var A=m[0][i];m[0][i]=m[1][i],m[1][i]=A}}else{var E=s.range;m[0][i]=s.r2l(E[0]),m[1][i]=s.r2l(E[1])}m[0][i]===m[1][i]&&(m[0][i]-=1,m[1][i]+=1),g[i]=m[1][i]-m[0][i],this.glplot.bounds[0][i]=m[0][i]*p[i],this.glplot.bounds[1][i]=m[1][i]*p[i]}var D,P=[1,1,1];for(i=0;i<3;++i){var I=y[l=(s=u[M[i]]).type];P[i]=Math.pow(I.acc,1/I.count)/p[i]}if("auto"===u.aspectmode)D=Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1];else if("cube"===u.aspectmode)D=[1,1,1];else if("data"===u.aspectmode)D=P;else{if("manual"!==u.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var O=u.aspectratio;D=[O.x,O.y,O.z]}u.aspectratio.x=c.aspectratio.x=D[0],u.aspectratio.y=c.aspectratio.y=D[1],u.aspectratio.z=c.aspectratio.z=D[2],this.glplot.setAspectratio(u.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z});var F=u.domain||null,R=t._size||null;if(F&&R){var z=this.container.style;z.position="absolute",z.left=R.l+F.x[0]*R.w+"px",z.top=R.t+(1-F.y[1])*R.h+"px",z.width=R.w*(F.x[1]-F.x[0])+"px",z.height=R.h*(F.y[1]-F.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},k.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(e=this.glplot.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}};var e},k.setViewport=function(e){var t,r=e.camera;this.glplot.camera.lookAt.apply(this,[[(t=r).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),this.glplot.setAspectratio(e.aspectratio);var n="orthographic"===r.projection.type;if(n!==this.glplot.camera._ortho){this.glplot.redraw();var a=this.glplot.clearColor;this.glplot.gl.clearColor(a[0],a[1],a[2],a[3]),this.glplot.gl.clear(this.glplot.gl.DEPTH_BUFFER_BIT|this.glplot.gl.COLOR_BUFFER_BIT),this.glplot.dispose(),x(this),this.glplot.camera._ortho=n}},k.isCameraChanged=function(e){var t=this.getCamera(),r=d.nestedProperty(e,this.id+".camera").get();function n(e,t,r,n){var a=["up","center","eye"],i=["x","y","z"];return t[a[r]]&&e[a[r]][i[n]]===t[a[r]][i[n]]}var a=!1;if(void 0===r)a=!0;else{for(var i=0;i<3;i++)for(var o=0;o<3;o++)if(!n(t,r,i,o)){a=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(a=!0)}return a},k.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=d.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},k.saveLayout=function(e){var t,r,n,a,i,o,s=this.fullLayout,l=this.isCameraChanged(e),u=this.isAspectChanged(e),p=l||u;if(p){var h={};l&&(t=this.getCamera(),n=(r=d.nestedProperty(e,this.id+".camera")).get(),h[this.id+".camera"]=n),u&&(a=this.glplot.getAspectratio(),o=(i=d.nestedProperty(e,this.id+".aspectratio")).get(),h[this.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,s._preGUI,h),l&&(r.set(t),d.nestedProperty(s,this.id+".camera").set(t)),u&&(i.set(a),d.nestedProperty(s,this.id+".aspectratio").set(a),this.glplot.redraw())}return p},k.updateFx=function(e,t){var r=this.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var n=this.graphDiv,a=n._fullLayout,i=this.fullSceneLayout.camera,o=i.up.x,s=i.up.y,l=i.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var u=this.id+".camera.up",p={x:0,y:0,z:1},h={};h[u]=p;var f=n.layout;c.call("_storeDirectGUIEdit",f,a._preGUI,h),i.up=p,d.nestedProperty(f,u).set(p)}}else r.keyBindingMode=e;this.fullSceneLayout.hovermode=t},k.toImage=function(e){e||(e="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var t=this.glplot.gl,r=t.drawingBufferWidth,a=t.drawingBufferHeight;t.bindFramebuffer(t.FRAMEBUFFER,null);var i=new Uint8Array(r*a*4);t.readPixels(0,0,r,a,t.RGBA,t.UNSIGNED_BYTE,i);for(var o=0,s=a-1;o© OpenStreetMap
',tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:'© CARTO',tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:'© CARTO',tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under CC BY SA.',tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},a=Object.keys(n);t.exports={requiredVersion:"1.3.2",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:n,styleValuesNonMapbox:a,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.3.2."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",a.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},{}],818:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){var r=e.split(" "),a=r[0],i=r[1],o=n.isArrayOrTypedArray(t)?n.mean(t):t,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(a){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l}switch(i){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s}return{anchor:u[0]&&u[1]?u.join("-"):u[0]?u[0]:u[1]?u[1]:"center",offset:c}}},{"../../lib":716}],819:[function(e,t,r){"use strict";var n=e("mapbox-gl"),a=e("../../lib"),i=e("../../plots/get_data").getSubplotCalcData,o=e("../../constants/xmlns_namespaces"),s=e("d3"),l=e("../../components/drawing"),u=e("../../lib/svg_text_utils"),c=e("./mapbox"),d=r.constants=e("./constants");function p(e){return"string"==typeof e&&(-1!==d.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://"))}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=a.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=e("./layout_attributes"),r.supplyLayoutDefaults=e("./layout_defaults"),r.plot=function(e){var t=e._fullLayout,r=e.calcdata,o=t._subplots.mapbox;if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var s=function(e,t){var r=e._fullLayout;if(""===e._context.mapboxAccessToken)return"";for(var n=[],i=[],o=!1,s=!1,l=0;l1&&a.warn(d.multipleTokensErrorMsg),n[0]):(i.length&&a.log(["Listed mapbox access token(s)",i.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,o);n.accessToken=s;for(var l=0;l_/2){var b=m.split("|").join("
");y.text(b).attr("data-unformatted",b).call(u.convertToTspans,e),v=l.bBox(y.node())}y.attr("transform","translate(-3, "+(8-v.height)+")"),g.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var x=1;v.width+6>_&&(x=_/(v.width+6));var w=[n.l+n.w*c.x[1],n.t+n.h*(1-c.y[0])];g.attr("transform","translate("+w[0]+","+w[1]+") scale("+x+")")}},r.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(e){var t={},r={};switch(e.type){case"circle":n.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":n.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity})}return{layout:t,paint:r}}s.update=function(e){this.visible?this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||this.source!==e.source||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r=function(e){var t,r=e.sourcetype,n=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"==typeof n?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=n,e.sourceattribution&&(a.attribution=e.sourceattribution),a}(e);t.addSource(this.idSource,r)}},s.updateLayer=function(e){var t,r=this.subplot,n=u(e),a=this.subplot.belowLookup["layout-"+this.index];if("traces"===a)for(var o=r.getMapLayers(),s=0;s1)for(r=0;r-1&&d(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),a.indexOf("event")>-1&&i.click(n,t.originalEvent)}}},m.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var a,i=e.dragmode;a="select"===i?function(e,r){(e.range={})[t.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(e,r,n){(e.lassoPoints={})[t.id]=n.filtered.map(l)};var s=t.dragOptions;t.dragOptions=o.extendDeep(s||{},{element:t.div,gd:n,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),"select"===i||"lasso"===i?(r.dragPan.disable(),r.on("zoomstart",t.clearSelect),t.dragOptions.prepFn=function(e,r,n){c(e,r,n,t.dragOptions,i)},u.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearSelect),t.div.onmousedown=null,t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function l(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},m.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},m.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),c=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){y.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),s.text(o.text()&&c.text()?" - ":"")}},y.sendDataToCloud=function(e){e.emit("plotly_beforeexport");var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL,r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=y.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],x=["year","month","dayMonth","dayMonthYear"];function w(e,t){var r=e._context.locale,n=!1,a={};function o(e){for(var r=!0,i=0;i1&&P.length>1){for(i.getComponentMethod("grid","sizeDefaults")(u,s),o=0;o15&&P.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has("cartesian"),s._hasGeo=s._has("geo"),s._hasGL3D=s._has("gl3d"),s._hasGL2D=s._has("gl2d"),s._hasTernary=s._has("ternary"),s._hasPie=s._has("pie"),y.linkSubplots(d,s,c,a),y.cleanPlot(d,s,c,a),a._zoomlayer&&!e._dragging&&a._zoomlayer.selectAll(".select-outline").remove(),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a0){var d=1-2*s;n=Math.round(d*n),i=Math.round(d*i)}}var p=y.layoutAttributes.width.min,h=y.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-i)>1;(m||f)&&(f&&(r.width=n),m&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),y.sanitizeMargins(r)},y.supplyLayoutModuleDefaults=function(e,t,r,n){var a,o,s,u=i.componentsRegistry,c=t._basePlotModules,d=i.subplotsRegistry.cartesian;for(a in u)(s=u[a]).includeBasePlot&&s.includeBasePlot(e,t);for(var p in c.length||c.push(d),t._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[p].sort(l.subplotSort);for(o=0;o.5*n.width&&(l.log("Margin push",t,"is too big in x, dropping"),r.l=r.r=0),r.b+r.t>.5*n.height&&(l.log("Margin push",t,"is too big in y, dropping"),r.b=r.t=0);var u=void 0!==r.xl?r.xl:r.x,c=void 0!==r.xr?r.xr:r.x,d=void 0!==r.yt?r.yt:r.y,p=void 0!==r.yb?r.yb:r.y;a[t]={l:{val:u,size:r.l+o},r:{val:c,size:r.r+o},b:{val:p,size:r.b+o},t:{val:d,size:r.t+o}},i[t]=1}else delete a[t],delete i[t];if(!n._replotting)return y.doAutoMargin(e)}},y.doAutoMargin=function(e){var t=e._fullLayout;t._size||(t._size={}),S(t);var r=t._size,n=t.margin,o=l.extendFlat({},r),s=n.l,u=n.r,c=n.t,d=n.b,p=t.width,h=t.height,f=t._pushmargin,m=t._pushmarginIds;if(!1!==t.margin.autoexpand){for(var g in f)m[g]||delete f[g];for(var v in f.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:d}},f){var _=f[v].l||{},b=f[v].b||{},x=_.val,w=_.size,k=b.val,M=b.size;for(var T in f){if(a(w)&&f[T].r){var C=f[T].r.val,L=f[T].r.size;if(C>x){var A=(w*C+(L-p)*x)/(C-x),E=(L*(1-x)+(w-p)*(1-C))/(C-x);A>=0&&E>=0&&p-(A+E)>0&&A+E>s+u&&(s=A,u=E)}}if(a(M)&&f[T].t){var D=f[T].t.val,P=f[T].t.size;if(D>k){var I=(M*D+(P-h)*k)/(D-k),O=(P*(1-k)+(M-h)*(1-D))/(D-k);I>=0&&O>=0&&h-(O+I)>0&&I+O>d+c&&(d=I,c=O)}}}}}if(r.l=Math.round(s),r.r=Math.round(u),r.t=Math.round(c),r.b=Math.round(d),r.p=Math.round(n.pad),r.w=Math.round(p)-r.l-r.r,r.h=Math.round(h)-r.t-r.b,!t._replotting&&y.didMarginChange(o,r)){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var F=3*(1+Object.keys(m).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return i.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var o=0,s=0;function l(){return o++,function(){var t;s++,n||s!==o||(t=a,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return i.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(l),setTimeout(l())}))}],o=l.syncOrAsync(a,e);return o&&o.then||(o=Promise.resolve()),o.then((function(){return e}))}y.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},y.graphJson=function(e,t,r,n,a){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&y.supplyDefaults(e);var i=a?e._fullData:e.data,o=a?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(e){if("function"==typeof e)return null;if(l.isPlainObject(e)){var t,n,a={};for(t in e)if("function"!=typeof e[t]&&-1===["_","["].indexOf(t.charAt(0))){if("keepdata"===r){if("src"===t.substr(t.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=e[t+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(e.stream))continue}else if("keepall"!==r&&"string"==typeof(n=e[t+"src"])&&n.indexOf(":")>0)continue;a[t]=u(e[t])}return a}return Array.isArray(e)?e.map(u):l.isTypedArray(e)?l.simpleMap(e,l.identity):l.isJSDate(e)?l.ms2DateTimeLocal(+e):e}var c={data:(i||[]).map((function(e){var r=u(e);return t&&delete r.fit,r}))};return t||(c.layout=u(o)),e.framework&&e.framework.isPolar&&(c=e.framework.getConfig()),s&&(c.frames=u(s)),"object"===n?c:JSON.stringify(c)},y.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(i=n.calc(e,r))}Array.isArray(i)&&i[0]||(i=[{x:c,y:c}]),i[0].t||(i[0].t={}),i[0].trace=r,f[t]=i}}for(E(u,p),a=0;a1e-10?e:0}function p(e,t,r){t=t||0,r=r||0;for(var n=e.length,a=new Array(n),i=0;i0?r:1/0})),a=n.mod(r+1,t.length);return[t[r],t[a]]},findIntersectionXY:u,findXYatLength:function(e,t,r,n){var a=-t*r,i=t*t+1,o=2*(t*a-r),s=a*a+r*r-e*e,l=Math.sqrt(o*o-4*i*s),u=(-o+l)/(2*i),c=(-o-l)/(2*i);return[[u,t*u+a+n],[c,t*c+a+n]]},clampTiny:d,pathPolygon:function(e,t,r,n,a,i){return"M"+p(c(e,t,r,n),a,i).join("L")},pathPolygonAnnulus:function(e,t,r,n,a,i,o){var s,l;e=0?p.angularAxis.domain:n.extent(k),L=Math.abs(k[1]-k[0]);T&&!M&&(L=0);var A=C.slice();S&&M&&(A[1]+=L);var E=p.angularAxis.ticksCount||4;E>8&&(E=E/(E/8)+E%8),p.angularAxis.ticksStep&&(E=(A[1]-A[0])/E);var D=p.angularAxis.ticksStep||(A[1]-A[0])/(E*(p.minorTicks+1));w&&(D=Math.max(Math.round(D),1)),A[2]||(A[2]=D);var P=n.range.apply(this,A);if(P=P.map((function(e,t){return parseFloat(e.toPrecision(12))})),s=n.scale.linear().domain(A.slice(0,2)).range("clockwise"===p.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=s.domain(),c.layout.angularAxis.endPadding=S?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var I=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var F,R=e.select(".chart-group"),z={fill:"none",stroke:p.tickColor},N={"font-size":p.font.size,"font-family":p.font.family,fill:p.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map((function(e,t){return" "+e+" 0 "+p.font.outlineColor})).join(",")};if(p.showLegend){F=e.select(".legend-group").attr({transform:"translate("+[_,p.margin.top]+")"}).style({display:"block"});var B=h.map((function(e,t){var r=o.util.cloneJson(e);return r.symbol="DotPlot"===e.geometry?e.dotType||"circle":"LinePlot"!=e.geometry?"square":"line",r.visibleInLegend=void 0===e.visibleInLegend||e.visibleInLegend,r.color="LinePlot"===e.geometry?e.strokeColor:e.color,r}));o.Legend().config({data:h.map((function(e,t){return e.name||"Element"+t})),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:F,elements:B,reverseOrder:p.legend.reverseOrder})})();var j=F.node().getBBox();_=Math.min(p.width-j.width-p.margin.left-p.margin.right,p.height-p.margin.top-p.margin.bottom)/2,_=Math.max(10,_),x=[p.margin.left+_,p.margin.top+_],r.range([0,_]),c.layout.radialAxis.domain=r.domain(),F.attr("transform","translate("+[x[0]+_,x[1]-_]+")")}else F=e.select(".legend-group").style({display:"none"});e.attr({width:p.width,height:p.height}).style({opacity:p.opacity}),R.attr("transform","translate("+x+")").style({cursor:"crosshair"});var Y=[(p.width-(p.margin.left+p.margin.right+2*_+(j?j.width:0)))/2,(p.height-(p.margin.top+p.margin.bottom+2*_))/2];if(Y[0]=Math.max(0,Y[0]),Y[1]=Math.max(0,Y[1]),e.select(".outer-group").attr("transform","translate("+Y+")"),p.title&&p.title.text){var H=e.select("g.title-group text").style(N).text(p.title.text),V=H.node().getBBox();H.attr({x:x[0]-V.width/2,y:x[1]-_-20})}var U=e.select(".radial.axis-group");if(p.radialAxis.gridLinesVisible){var W=U.selectAll("circle.grid-circle").data(r.ticks(5));W.enter().append("circle").attr({class:"grid-circle"}).style(z),W.attr("r",r),W.exit().remove()}U.select("circle.outside-circle").attr({r:_}).style(z);var q=e.select("circle.background-circle").attr({r:_}).style({fill:p.backgroundColor,stroke:p.stroke});function G(e,t){return s(e)%360+p.orientation}if(p.radialAxis.visible){var K=n.svg.axis().scale(r).ticks(5).tickSize(5);U.call(K).attr({transform:"rotate("+p.radialAxis.orientation+")"}),U.selectAll(".domain").style(z),U.selectAll("g>text").text((function(e,t){return this.textContent+p.radialAxis.ticksSuffix})).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(e,t){return"horizontal"===p.radialAxis.tickOrientation?"rotate("+-p.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),U.selectAll("g>line").style({stroke:"black"})}var Z=e.select(".angular.axis-group").selectAll("g.angular-tick").data(P),X=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(e,t){return"rotate("+G(e)+")"}}).style({display:p.angularAxis.visible?"block":"none"}),Z.exit().remove(),X.append("line").classed("grid-line",!0).classed("major",(function(e,t){return t%(p.minorTicks+1)==0})).classed("minor",(function(e,t){return!(t%(p.minorTicks+1)==0)})).style(z),X.selectAll(".minor").style({stroke:p.minorTickColor}),Z.select("line.grid-line").attr({x1:p.tickLength?_-p.tickLength:0,x2:_}).style({display:p.angularAxis.gridLinesVisible?"block":"none"}),X.append("text").classed("axis-text",!0).style(N);var J=Z.select("text.axis-text").attr({x:_+p.labelOffset,dy:i+"em",transform:function(e,t){var r=G(e),n=_+p.labelOffset,a=p.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-r+" "+n+" 0)":"radial"==a?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:p.angularAxis.labelsVisible?"block":"none"}).text((function(e,t){return t%(p.minorTicks+1)!=0?"":w?w[e]+p.angularAxis.ticksSuffix:e+p.angularAxis.ticksSuffix})).style(N);p.angularAxis.rewriteTicks&&J.text((function(e,t){return t%(p.minorTicks+1)!=0?"":p.angularAxis.rewriteTicks(this.textContent,t)}));var $=n.max(R.selectAll(".angular-tick text")[0].map((function(e,t){return e.getCTM().e+e.getBBox().width})));F.attr({transform:"translate("+[_+$,p.margin.top]+")"});var Q=e.select("g.geometry-group").selectAll("g").size()>0,ee=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(ee.enter().append("g").attr({class:function(e,t){return"geometry geometry"+t}}),ee.exit().remove(),h[0]||Q){var te=[];h.forEach((function(e,t){var n={};n.radialScale=r,n.angularScale=s,n.container=ee.filter((function(e,r){return r==t})),n.geometry=e.geometry,n.orientation=p.orientation,n.direction=p.direction,n.index=t,te.push({data:e,geometryConfig:n})}));var re=n.nest().key((function(e,t){return void 0!==e.data.groupId||"unstacked"})).entries(te),ne=[];re.forEach((function(e,t){"unstacked"===e.key?ne=ne.concat(e.values.map((function(e,t){return[e]}))):ne.push(e.values)})),ne.forEach((function(e,t){var r;r=Array.isArray(e)?e[0].geometryConfig.geometry:e.geometryConfig.geometry;var n=e.map((function(e,t){return a(o[r].defaultConfig(),e)}));o[r]().config(n)()}))}var ae,ie,oe=e.select(".guides-group"),se=e.select(".tooltips-group"),le=o.tooltipPanel().config({container:se,fontSize:8})(),ue=o.tooltipPanel().config({container:se,fontSize:8})(),ce=o.tooltipPanel().config({container:se,hasTick:!0})();if(!M){var de=oe.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",(function(e,t){var r=o.util.getMousePos(q).angle;de.attr({x2:-_,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-p.orientation)%360;ae=s.invert(n);var a=o.util.convertToCartesian(_+12,r+180);le.text(o.util.round(ae)).move([a[0]+x[0],a[1]+x[1]])})).on("mouseout.angular-guide",(function(e,t){oe.select("line").style({opacity:0})}))}var pe=oe.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",(function(e,t){var n=o.util.getMousePos(q).radius;pe.attr({r:n}).style({opacity:.5}),ie=r.invert(o.util.getMousePos(q).radius);var a=o.util.convertToCartesian(n,p.radialAxis.orientation);ue.text(o.util.round(ie)).move([a[0]+x[0],a[1]+x[1]])})).on("mouseout.radial-guide",(function(e,t){pe.style({opacity:0}),ce.hide(),le.hide(),ue.hide()})),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",(function(t,r){var a=n.select(this),i=this.style.fill,s="black",l=this.style.opacity||1;if(a.attr({"data-opacity":l}),i&&"none"!==i){a.attr({"data-fill":i}),s=n.hsl(i).darker().toString(),a.style({fill:s,opacity:1});var u={t:o.util.round(t[0]),r:o.util.round(t[1])};M&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,d=this.getBoundingClientRect(),p=e.node().getBoundingClientRect(),h=[d.left+d.width/2-Y[0]-p.left,d.top+d.height/2-Y[1]-p.top];ce.config({color:s}).text(c),ce.move(h)}else i=this.style.stroke||"black",a.attr({"data-stroke":i}),s=n.hsl(i).darker().toString(),a.style({stroke:s,opacity:1})})).on("mousemove.tooltip",(function(e,t){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ce.show()})).on("mouseout.tooltip",(function(e,t){ce.hide();var r=n.select(this),a=r.attr("data-fill");a?r.style({fill:a,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})}))}))}(u),this},config:function(e){if(!arguments.length)return l;var t=o.util.cloneJson(e);return t.data.forEach((function(e,t){l.data[t]||(l.data[t]={}),a(l.data[t],o.Axis.defaultConfig().data[0]),a(l.data[t],e)})),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,t.layout),this},getLiveConfig:function(){return c},getinputConfig:function(){return u},radialScale:function(e){return r},angularScale:function(e){return s},svg:function(){return e}};return n.rebind(p,d,"on"),p},o.Axis.defaultConfig=function(e,t){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(e,t){for(var r in e)r in t&&(t[r]=e[r])},o.util._extend=function(e,t){for(var r in e)t[r]=e[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(e,t){var r=t||6;return n.range(0,360+r,r).map((function(t,r){var n=t*Math.PI/180;return[t,e(n)]}))},o.util.dataFromEquation=function(e,t,r){var a=t||6,i=[],o=[];n.range(0,360+a,a).forEach((function(t,r){var n=t*Math.PI/180,a=e(n);i.push(t),o.push(a)}));var s={t:i,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(e,t){if(void 0===e)return null;var r=[].concat(e);return n.range(t).map((function(e,t){return r[t]||r[0]}))},o.util.fillArrays=function(e,t,r){return t.forEach((function(t,n){e[t]=o.util.ensureArray(e[t],r)})),e},o.util.cloneJson=function(e){return JSON.parse(JSON.stringify(e))},o.util.validateKeys=function(e,t){"string"==typeof t&&(t=t.split("."));var r=t.shift();return e[r]&&(!t.length||objHasKeys(e[r],t))},o.util.sumArrays=function(e,t){return n.zip(e,t).map((function(e,t){return n.sum(e)}))},o.util.arrayLast=function(e){return e[e.length-1]},o.util.arrayEqual=function(e,t){for(var r=Math.max(e.length,t.length,1);r-- >=0&&e[r]===t[r];);return-2===r},o.util.flattenArray=function(e){for(var t=[];!o.util.arrayEqual(t,e);)t=e,e=[].concat.apply([],e);return e},o.util.deduplicate=function(e){return e.filter((function(e,t,r){return r.indexOf(e)==t}))},o.util.convertToCartesian=function(e,t){var r=t*Math.PI/180;return[e*Math.cos(r),e*Math.sin(r)]},o.util.round=function(e,t){var r=t||2,n=Math.pow(10,r);return Math.round(e*n)/n},o.util.getMousePos=function(e){var t=n.mouse(e.node()),r=t[0],a=t[1],i={};return i.x=r,i.y=a,i.pos=t,i.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,i.radius=Math.sqrt(r*r+a*a),i},o.util.duplicatesCount=function(e){for(var t,r={},n={},a=0,i=e.length;a0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:c(s),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(e,t){return f.fill(r,a,i)},"fill-opacity":0,stroke:function(e,t){return f.stroke(r,a,i)},"stroke-width":function(e,t){return f["stroke-width"](r,a,i)},"stroke-dasharray":function(e,t){return f["stroke-dasharray"](r,a,i)},opacity:function(e,t){return f.opacity(r,a,i)},display:function(e,t){return f.display(r,a,i)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/o[0].length*Math.PI/180,h=n.svg.arc().startAngle((function(e){return-p/2})).endAngle((function(e){return p/2})).innerRadius((function(e){return t.radialScale(l+(e[2]||0))})).outerRadius((function(e){return t.radialScale(l+(e[2]||0))+t.radialScale(e[1])}));u.arc=function(e,r,a){n.select(this).attr({class:"mark arc",d:h,transform:function(e,r){return"rotate("+(t.orientation+s(e[0])+90)+")"}})};var f={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,n,a){return r[e[a].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},m=n.select(this).selectAll("g.layer").data(o);m.enter().append("g").attr({class:"layer"});var g=m.selectAll("path.mark").data((function(e,t){return e}));g.enter().append("path").attr({class:"mark"}),g.style(f).each(u[t.geometryType]),g.exit().remove(),m.exit().remove()}))}return i.config=function(t){return arguments.length?(t.forEach((function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)})),this):e},i.getColorScale=function(){},n.rebind(i,t,"on"),i},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var e=o.Legend.defaultConfig(),t=n.dispatch("hover");function r(){var t=e.legendConfig,i=e.data.map((function(e,r){return[].concat(e).map((function(e,n){var i=a({},t.elements[r]);return i.name=e,i.color=[].concat(t.elements[r].color)[n],i}))})),o=n.merge(i);o=o.filter((function(e,r){return t.elements[r]&&(t.elements[r].visibleInLegend||void 0===t.elements[r].visibleInLegend)})),t.reverseOrder&&(o=o.reverse());var s=t.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map((function(e,t){return e.color})),u=t.fontSize,c=null==t.isContinuous?"number"==typeof o[0]:t.isContinuous,d=c?t.height:u*o.length,p=s.classed("legend-group",!0).selectAll("svg").data([0]),h=p.enter().append("svg").attr({width:300,height:d+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});h.append("g").classed("legend-axis",!0),h.append("g").classed("legend-marks",!0);var f=n.range(o.length),m=n.scale[c?"linear":"ordinal"]().domain(f).range(l),g=n.scale[c?"linear":"ordinal"]().domain(f)[c?"range":"rangePoints"]([0,d]);if(c){var y=p.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);y.enter().append("stop"),y.attr({offset:function(e,t){return t/(l.length-1)*100+"%"}}).style({"stop-color":function(e,t){return e}}),p.append("rect").classed("legend-mark",!0).attr({height:t.height,width:t.colorBandWidth,fill:"url(#grad1)"})}else{var v=p.select(".legend-marks").selectAll("path.legend-mark").data(o);v.enter().append("path").classed("legend-mark",!0),v.attr({transform:function(e,t){return"translate("+[u/2,g(t)+u/2]+")"},d:function(e,t){var r,a,i,o=e.symbol;return i=3*(a=u),"line"===(r=o)?"M"+[[-a/2,-a/12],[a/2,-a/12],[a/2,a/12],[-a/2,a/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(i)():n.svg.symbol().type("square").size(i)()},fill:function(e,t){return m(t)}}),v.exit().remove()}var _=n.svg.axis().scale(g).orient("right"),b=p.select("g.legend-axis").attr({transform:"translate("+[c?t.colorBandWidth:u,u/2]+")"}).call(_);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:c?t.textColor:"none"}),b.selectAll("text").style({fill:t.textColor,"font-size":t.fontSize}).text((function(e,t){return o[t].name})),r}return r.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(r,t,"on"),r},o.Legend.defaultConfig=function(e,t){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var e,t,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,u=function(){var n=(e=i.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),t=n.append("text").attr({dx:i.padding+l,dy:.3*+i.fontSize}),u};return u.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",c=o>=.5?"black":"white",d=a||"";t.style({fill:c,"font-size":i.fontSize+"px"}).text(d);var p=i.padding,h=t.node().getBBox(),f={fill:i.color,stroke:s,"stroke-width":"2px"},m=h.width+2*p+l,g=h.height+2*p;return r.attr({d:"M"+[[l,-g/2],[l,-g/4],[i.hasTick?0:l,0],[l,g/4],[l,g/2],[m,g/2],[m,-g/2]].join("L")+"Z"}).style(f),e.attr({transform:"translate("+[l,-g/2+2*p]+")"}),e.style({display:"block"}),u},u.move=function(t){if(e)return e.attr({transform:"translate("+[t[0],t[1]]+")"}).style({display:"block"}),u},u.hide=function(){if(e)return e.style({display:"none"}),u},u.show=function(){if(e)return e.style({display:"block"}),u},u.config=function(e){return a(i,e),u},u},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var e={convert:function(e,t){var r={};if(e.data&&(r.data=e.data.map((function(e,r){var n=a({},e);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach((function(e,r){o.util.translator.apply(null,e.concat(t))})),t||delete n.marker,t&&delete n.groupId,t?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n})),!t&&e.layout&&"stack"===e.layout.barmode)){var i=o.util.duplicates(r.data.map((function(e,t){return e.geometry})));r.data.forEach((function(e,t){var n=i.indexOf(e.geometry);-1!=n&&(r.data[t].groupId=n)}))}if(e.layout){var s=a({},e.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach((function(e,r){o.util.translator.apply(null,e.concat(t))})),t?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};n.entries(s.margin).forEach((function(e,t){c[u[l.indexOf(e.key)]]=e.value})),s.margin=c}t&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return e}},{"../../../constants/alignment":685,"../../../lib":716,d3:164}],835:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../../lib"),i=e("../../../components/color"),o=e("./micropolar"),s=e("./undo_manager"),l=a.extendDeepAll,u=t.exports={};u.framework=function(e){var t,r,a,i,c,d=new s;function p(r,s){return s&&(c=s),n.select(n.select(c).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),t=t?l(t,r):r,a||(a=o.Axis()),i=o.adapter.plotly().convert(t),a.config(i).render(c),e.data=t.data,e.layout=t.layout,u.fillLayout(e),t}return p.isPolar=!0,p.svg=function(){return a.svg()},p.getConfig=function(){return t},p.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},p.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},p.setUndoPoint=function(){var e,n,a=this,i=o.util.cloneJson(t);e=i,n=r,d.add({undo:function(){n&&a(n)},redo:function(){a(e)}}),r=o.util.cloneJson(i)},p.undo=function(){d.undo()},p.redo=function(){d.redo()},p},u.fillLayout=function(e){var t=n.select(e).selectAll(".plot-container"),r=t.selectAll(".svg-container"),a=e.framework&&e.framework.svg&&e.framework.svg(),o={width:800,height:600,paper_bgcolor:i.background,_container:t,_paperdiv:r,_paper:a};e._fullLayout=l(o,e.layout)}},{"../../../components/color":591,"../../../lib":716,"./micropolar":834,"./undo_manager":836,d3:164}],836:[function(e,t,r){"use strict";t.exports=function(){var e,t=[],r=-1,n=!1;function a(e,t){return e?(n=!0,e[t](),n=!1,this):this}return{add:function(e){return n?this:(t.splice(r+1,t.length-r),t.push(e),r=t.length-1,this)},setCallback:function(t){e=t},undo:function(){var n=t[r];return n?(a(n,"undo"),r-=1,e&&e(n.undo),this):this},redo:function(){var n=t[r+1];return n?(a(n,"redo"),r+=1,e&&e(n.redo),this):this},clear:function(){t=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:c<=0&&p<=0?0:Math.max(c,p),t=s<=180&&l>=180||s>180&&l>=540?-1:u>=0&&d>=0?0:Math.min(u,d),r=s<=270&&l>=270||s>270&&l>=630?-1:c>=0&&p>=0?0:Math.min(c,p),n=l>=360?1:u<=0&&d<=0?0:Math.max(u,d),[t,r,n,a]}(p),_=v[2]-v[0],b=v[3]-v[1],x=d/c,w=Math.abs(b/_);x>w?(h=c,y=(d-(f=c*w))/n.h/2,m=[o[0],o[1]],g=[u[0]+y,u[1]-y]):(f=d,y=(c-(h=d/w))/n.w/2,m=[o[0]+y,o[1]-y],g=[u[0],u[1]]),this.xLength2=h,this.yLength2=f,this.xDomain2=m,this.yDomain2=g;var k=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-g[1]),T=this.radius=h/_,S=this.innerRadius=t.hole*T,C=this.cx=k-T*v[0],E=this.cy=M+T*v[3],D=this.cxx=C-k,P=this.cyy=E-M;this.radialAxis=this.mockAxis(e,t,a,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[a.side],domain:[S/n.w,T/n.w]}),this.angularAxis=this.mockAxis(e,t,i,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(e,t),this.updateAngularAxis(e,t),this.updateRadialAxis(e,t),this.updateRadialAxisTitle(e,t),this.xaxis=this.mockCartesianAxis(e,t,{_id:"x",domain:m}),this.yaxis=this.mockCartesianAxis(e,t,{_id:"y",domain:g});var I=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",I).attr("transform",R(D,P)),r.frontplot.attr("transform",R(k,M)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",I).attr("transform",R(C,E)).call(s.fill,t.bgcolor)},P.mockAxis=function(e,t,r,n){var a=o.extendFlat({},r,n);return p(a,t,e),a},P.mockCartesianAxis=function(e,t,r){var n=this,a=r._id,i=o.extendFlat({type:"linear"},r);d(i,e);var s={x:[0,2],y:[1,3]};return i.setRange=function(){var e=n.sectorBBox,r=s[a],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-t.hole);i.range=[e[r[0]]*l,e[r[1]]*l]},i.isPtWithinRange="x"===a?function(e){return n.isPtInside(e)}:function(){return!0},i.setRange(),i.setScale(),i},P.doAutoRange=function(e,t){var r=this.gd,n=this.radialAxis,a=t.radialaxis;n.setScale(),h(r,n);var i=n.range;a.range=i.slice(),a._input.range=i.slice(),n._rl=[n.r2l(i[0],null,"gregorian"),n.r2l(i[1],null,"gregorian")]},P.updateRadialAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,u=r.cx,d=r.cy,p=t.radialaxis,h=L(t.sector[0],360),f=r.radialAxis,m=l90&&h<=270&&(f.tickangle=180);var g=function(e){return"translate("+(f.l2p(e.x)+l)+",0)"},y=I(p);if(r.radialTickLayout!==y&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=y),m){f.setScale();var v=c.calcTicks(f),_=c.clipEnds(f,v),b=c.getTickSigns(f)[2];c.drawTicks(n,f,{vals:v,layer:a["radial-axis"],path:c.makeTickPath(f,0,b),transFn:g,crisp:!1}),c.drawGrid(n,f,{vals:_,layer:a["radial-grid"],path:function(e){return r.pathArc(f.r2p(e.x)+l)},transFn:o.noop,crisp:!1}),c.drawLabels(n,f,{vals:v,layer:a["radial-axis"],transFn:g,labelFns:c.makeLabelFns(f,0)})}var x=r.radialAxisAngle=r.vangles?E(O(A(p.angle),r.vangles)):p.angle,w=R(u,d),k=w+z(-x);F(a["radial-axis"],m&&(p.showticklabels||p.ticks),{transform:k}),F(a["radial-grid"],m&&p.showgrid,{transform:w}),F(a["radial-line"].select("line"),m&&p.showline,{x1:l,y1:0,x2:i,y2:0,transform:k}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},P.updateRadialAxisTitle=function(e,t,r){var n=this.gd,a=this.radius,i=this.cx,o=this.cy,s=t.radialaxis,u=this.id+"title",c=void 0!==r?r:this.radialAxisAngle,d=A(c),p=Math.cos(d),h=Math.sin(d),f=0;if(s.title){var m=l.bBox(this.layers["radial-axis"].node()).height,g=s.title.font.size;f="counterclockwise"===s.side?-m-.4*g:m+.8*g}this.layers["radial-axis-title"]=y.draw(n,u,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:C(n,"Click to enter radial axis title"),attributes:{x:i+a/2*p+f*h,y:o-a/2*h+f*p,"text-anchor":"middle"},transform:{rotate:-c}})},P.updateAngularAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,u=r.cx,d=r.cy,p=t.angularaxis,h=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",p.rotation),h.setGeometry(),h.setScale();var f=function(e){return h.t2g(e.x)};"linear"===h.type&&"radians"===h.thetaunit&&(h.tick0=E(h.tick0),h.dtick=E(h.dtick));var m=function(e){return R(u+i*Math.cos(e),d-i*Math.sin(e))},g=c.makeLabelFns(h,0).labelStandoff,y={xFn:function(e){var t=f(e);return Math.cos(t)*g},yFn:function(e){var t=f(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(g+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*M)},anchorFn:function(e){var t=f(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=f(e);return-.5*(1+Math.sin(n))*r}},v=I(p);r.angularTickLayout!==v&&(a["angular-axis"].selectAll("."+h._id+"tick").remove(),r.angularTickLayout=v);var _,b=c.calcTicks(h);if("linear"===t.gridshape?(_=b.map(f),o.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,"category"===h.type&&(b=b.filter((function(e){return o.isAngleInsideSector(f(e),r.sectorInRad)}))),h.visible){var x="inside"===h.ticks?-1:1,w=(h.linewidth||1)/2;c.drawTicks(n,h,{vals:b,layer:a["angular-axis"],path:"M"+x*w+",0h"+x*h.ticklen,transFn:function(e){var t=f(e);return m(t)+z(-E(t))},crisp:!1}),c.drawGrid(n,h,{vals:b,layer:a["angular-grid"],path:function(e){var t=f(e),r=Math.cos(t),n=Math.sin(t);return"M"+[u+l*r,d-l*n]+"L"+[u+i*r,d-i*n]},transFn:o.noop,crisp:!1}),c.drawLabels(n,h,{vals:b,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:function(e){return m(f(e))},labelFns:y})}F(a["angular-line"].select("path"),p.showline,{d:r.pathSubplot(),transform:R(u,d)}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},P.updateFx=function(e,t){this.gd._context.staticPlot||(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1),this.updateMainDrag(e))},P.updateMainDrag=function(e){var t=this,r=t.gd,o=t.layers,s=e._zoomlayer,l=T.MINZOOM,u=T.OFFEDGE,c=t.radius,d=t.innerRadius,p=t.cx,h=t.cy,y=t.cxx,x=t.cyy,w=t.sectorInRad,k=t.vangles,M=t.radialAxis,C=S.clampTiny,L=S.findXYatLength,A=S.findEnclosingVertexAngles,E=T.cornerHalfWidth,D=T.cornerLen/2,P=f.makeDragger(o,"path","maindrag","crosshair");n.select(P).attr("d",t.pathSubplot()).attr("transform",R(p,h));var I,O,F,z,N,B,j,Y,H,V={element:P,gd:r,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]};function U(e,t){return Math.sqrt(e*e+t*t)}function W(e,t){return U(e-y,t-x)}function q(e,t){return Math.atan2(x-t,e-y)}function G(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function K(e,r){if(0===e)return t.pathSector(2*E);var n=D/e,a=r-n,i=r+n,o=Math.max(0,Math.min(e,c)),s=o-E,l=o+E;return"M"+G(s,a)+"A"+[s,s]+" 0,0,0 "+G(s,i)+"L"+G(l,i)+"A"+[l,l]+" 0,0,1 "+G(l,a)+"Z"}function Z(e,r,n){if(0===e)return t.pathSector(2*E);var a,i,o=G(e,r),s=G(e,n),l=C((o[0]+s[0])/2),u=C((o[1]+s[1])/2);if(l&&u){var c=u/l,d=-1/c,p=L(E,c,l,u);a=L(D,d,p[0][0],p[0][1]),i=L(D,d,p[1][0],p[1][1])}else{var h,f;u?(h=D,f=E):(h=E,f=D),a=[[l-h,u-f],[l+h,u-f]],i=[[l-h,u+f],[l+h,u+f]]}return"M"+a.join("L")+"L"+i.reverse().join("L")+"Z"}function X(e,t){return t=Math.max(Math.min(t,c),d),el?(e-1&&1===e&&_(n,r,[t.xaxis],[t.yaxis],t.id,V),a.indexOf("event")>-1&&g.click(r,n,t.id)}V.prepFn=function(e,n,i){var o=r._fullLayout.dragmode,l=P.getBoundingClientRect();if(I=n-l.left,O=i-l.top,k){var u=S.findPolygonOffset(c,w[0],w[1],k);I+=y+u[0],O+=x+u[1]}switch(o){case"zoom":V.moveFn=k?ee:$,V.clickFn=ne,V.doneFn=te,function(){F=null,z=null,N=t.pathSubplot(),B=!1;var e=r._fullLayout[t.id];j=a(e.bgcolor).getLuminance(),(Y=f.makeZoombox(s,j,p,h,N)).attr("fill-rule","evenodd"),H=f.makeCorners(s,p,h),b(r)}();break;case"select":case"lasso":v(e,n,i,V,o)}},P.onmousemove=function(e){g.hover(r,e,t.id),r._fullLayout._lasthover=P,r._fullLayout._hoversubplot=t.id},P.onmouseout=function(e){r._dragging||m.unhover(r,e)},m.init(V)},P.updateRadialDrag=function(e,t,r){var a=this,s=a.gd,l=a.layers,u=a.radius,c=a.innerRadius,d=a.cx,p=a.cy,h=a.radialAxis,g=T.radialDragBoxSize,y=g/2;if(h.visible){var v,_,x,M=A(a.radialAxisAngle),S=h._rl,C=S[0],L=S[1],D=S[r],P=.75*(S[1]-S[0])/(1-t.hole)/u;r?(v=d+(u+y)*Math.cos(M),_=p-(u+y)*Math.sin(M),x="radialdrag"):(v=d+(c-y)*Math.cos(M),_=p-(c-y)*Math.sin(M),x="radialdrag-inner");var I,N,B,j=f.makeRectDragger(l,x,"crosshair",-y,-y,g,g),Y={element:j,gd:s};F(n.select(j),h.visible&&c0==(r?B>C:Bn?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+o},e.g2c=function(r){return e.l2c(r+t-o)},e.g2p=function(e){return e*i},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var r=e.type;if("linear"===r){var a=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?i(e):e}(a(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?o(e):e}(e,t))}}e.makeCalcdata=function(t,a){var i,o,s=t[a],l=t._length,u=function(r){return e.d2c(r,t.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(i=new Array(l),o=0;o0){for(var n=[],a=0;a=c&&(h.min=0,m.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function f(e,t,r,n){var a=d[t._name];function o(r,n){return i.coerce(e,t,a,r,n)}o("uirevision",n.uirevision),t.type="linear";var p=o("color"),h=p!==a.color.dflt?p:r.font.color,f=t._name.charAt(0).toUpperCase(),m="Component "+f,g=o("title.text",m);t._hovertitle=g===m?g:f,i.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:h}),o("min"),u(e,t,o,"linear"),s(e,t,o,"linear",{}),l(e,t,o,{outerTicks:!0}),o("showticklabels")&&(i.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:h}),o("tickangle"),o("tickformat")),c(e,t,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}t.exports=function(e,t,r){o(e,t,r,{type:"ternary",attributes:d,handleDefaults:h,font:t.font,paper_bgcolor:t.paper_bgcolor})}},{"../../components/color":591,"../../lib":716,"../../plot_api/plot_template":754,"../cartesian/line_grid_defaults":778,"../cartesian/tick_label_defaults":783,"../cartesian/tick_mark_defaults":784,"../cartesian/tick_value_defaults":785,"../subplot_defaults":839,"./layout_attributes":842}],844:[function(e,t,r){"use strict";var n=e("d3"),a=e("tinycolor2"),i=e("../../registry"),o=e("../../lib"),s=o._,l=e("../../components/color"),u=e("../../components/drawing"),c=e("../cartesian/set_convert"),d=e("../../lib/extend").extendFlat,p=e("../plots"),h=e("../cartesian/axes"),f=e("../../components/dragelement"),m=e("../../components/fx"),g=e("../../components/titles"),y=e("../cartesian/select").prepSelect,v=e("../cartesian/select").selectOnClick,_=e("../cartesian/select").clearSelect,b=e("../cartesian/constants");function x(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=x;var w=x.prototype;w.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},w.plot=function(e,t){var r=t[this.id],n=t._size;this._hasClipOnAxisFalse=!1;for(var a=0;ak*_?a=(i=_)*k:i=(a=v)/k,o=g*a/v,s=y*i/_,r=t.l+t.w*f-a/2,n=t.t+t.h*(1-m)-i/2,p.x0=r,p.y0=n,p.w=a,p.h=i,p.sum=b,p.xaxis={type:"linear",range:[x+2*M-b,b-x-2*w],domain:[f-o/2,f+o/2],_id:"x"},c(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(e){return e.a>=p.aaxis.range[0]&&e.a<=p.aaxis.range[1]&&e.b>=p.baxis.range[1]&&e.b<=p.baxis.range[0]&&e.c>=p.caxis.range[1]&&e.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[x,b-w-M],domain:[m-s/2,m+s/2],_id:"y"},c(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var T=p.yaxis.domain[0],S=p.aaxis=d({},e.aaxis,{range:[x,b-w-M],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+s*k],anchor:"free",position:0,_id:"y",_length:a});c(S,p.graphDiv._fullLayout),S.setScale();var C=p.baxis=d({},e.baxis,{range:[b-x-M,w],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});c(C,p.graphDiv._fullLayout),C.setScale();var L=p.caxis=d({},e.caxis,{range:[b-x-w,M],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+s*k],anchor:"free",position:0,_id:"y",_length:a});c(L,p.graphDiv._fullLayout),L.setScale();var A="M"+r+","+(n+i)+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDef.select("path").attr("d",A),p.layers.plotbg.select("path").attr("d",A);var E="M0,"+i+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDefRelative.select("path").attr("d",E);var D="translate("+r+","+n+")";p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",D),p.clipDefRelative.select("path").attr("transform",null);var P="translate("+(r-C._offset)+","+(n+i)+")";p.layers.baxis.attr("transform",P),p.layers.bgrid.attr("transform",P);var I="translate("+(r+a/2)+","+n+")rotate(30)translate(0,"+-S._offset+")";p.layers.aaxis.attr("transform",I),p.layers.agrid.attr("transform",I);var O="translate("+(r+a/2)+","+n+")rotate(-30)translate(0,"+-L._offset+")";p.layers.caxis.attr("transform",O),p.layers.cgrid.attr("transform",O),p.drawAxes(!0),p.layers.aline.select("path").attr("d",S.showline?"M"+r+","+(n+i)+"l"+a/2+",-"+i:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",C.showline?"M"+r+","+(n+i)+"h"+a:"M0,0").call(l.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",L.showline?"M"+(r+a/2)+","+n+"l"+a/2+","+i:"M0,0").call(l.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},w.drawAxes=function(e){var t=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,a=this.aaxis,i=this.baxis,o=this.caxis;if(this.drawAx(a),this.drawAx(i),this.drawAx(o),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),u=(i.showticklabels?i.tickfont.size:0)+("outside"===i.ticks?i.ticklen:0)+3;n["a-title"]=g.draw(t,"a"+r,{propContainer:a,propName:this.id+".aaxis.title",placeholder:s(t,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=g.draw(t,"b"+r,{propContainer:i,propName:this.id+".baxis.title",placeholder:s(t,"Click to enter Component B title"),attributes:{x:this.x0-u,y:this.y0+this.h+.83*i.title.font.size+u,"text-anchor":"middle"}}),n["c-title"]=g.draw(t,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(t,"Click to enter Component C title"),attributes:{x:this.x0+this.w+u,y:this.y0+this.h+.83*o.title.font.size+u,"text-anchor":"middle"}})}},w.drawAx=function(e){var t,r=this.graphDiv,n=e._name,a=n.charAt(0),i=e._id,s=this.layers[n],l=a+"tickLayout",u=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);this[l]!==u&&(s.selectAll("."+i+"tick").remove(),this[l]=u),e.setScale();var c=h.calcTicks(e),d=h.clipEnds(e,c),p=h.makeTransFn(e),f=h.getTickSigns(e)[2],m=o.deg2rad(30),g=f*(e.linewidth||1)/2,y=f*e.ticklen,v=this.w,_=this.h,b="b"===a?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,x={a:"M0,0l"+_+",-"+v/2,b:"M0,0l-"+v/2+",-"+_,c:"M0,0l-"+_+","+v/2}[a];h.drawTicks(r,e,{vals:"inside"===e.ticks?d:c,layer:s,path:b,transFn:p,crisp:!1}),h.drawGrid(r,e,{vals:d,layer:this.layers[a+"grid"],path:x,transFn:p,crisp:!1}),h.drawLabels(r,e,{vals:c,layer:s,transFn:p,labelFns:h.makeLabelFns(e,0,30)})};var M=b.MINZOOM/2+.87,T="m-0.87,.5h"+M+"v3h-"+(M+5.2)+"l"+(M/2+2.6)+",-"+(.87*M+4.5)+"l2.6,1.5l-"+M/2+","+.87*M+"Z",S="m0.87,.5h-"+M+"v3h"+(M+5.2)+"l-"+(M/2+2.6)+",-"+(.87*M+4.5)+"l-2.6,1.5l"+M/2+","+.87*M+"Z",C="m0,1l"+M/2+","+.87*M+"l2.6,-1.5l-"+(M/2+2.6)+",-"+(.87*M+4.5)+"l-"+(M/2+2.6)+","+(.87*M+4.5)+"l2.6,1.5l"+M/2+",-"+.87*M+"Z",L="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",A=!0;function E(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var e,t,r,n,c,d,p,h,g,x,w=this,M=w.layers.plotbg.select("path").node(),D=w.graphDiv,P=D._fullLayout._zoomlayer,I={element:M,gd:D,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(i,o,s){I.xaxes=[w.xaxis],I.yaxes=[w.yaxis];var u=D._fullLayout.dragmode;I.minDrag="lasso"===u?1:void 0,"zoom"===u?(I.moveFn=B,I.clickFn=F,I.doneFn=j,function(i,o,s){var u=M.getBoundingClientRect();e=o-u.left,t=s-u.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},c=r,n=w.aaxis.range[1]-r.a,d=a(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),p="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",h=!1,g=P.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:d>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",p),x=P.append("path").attr("class","zoombox-corners").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),_(D)}(0,o,s)):"pan"===u?(I.moveFn=Y,I.clickFn=F,I.doneFn=H,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},c=r,_(D)):"select"!==u&&"lasso"!==u||y(i,o,s,I,u)}};function O(e){var t={};return t[w.id+".aaxis.min"]=e.a,t[w.id+".baxis.min"]=e.b,t[w.id+".caxis.min"]=e.c,t}function F(e,t){var r=D._fullLayout.clickmode;E(D),2===e&&(D.emit("plotly_doubleclick",null),i.call("_guiRelayout",D,O({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&v(t,D,[w.xaxis],[w.yaxis],w.id,I),r.indexOf("event")>-1&&m.click(D,t,w.id)}function R(e,t){return 1-t/w.h}function z(e,t){return 1-(e+(w.h-t)/Math.sqrt(3))/w.w}function N(e,t){return(e-(w.h-t)/Math.sqrt(3))/w.w}function B(a,i){var o=e+a,s=t+i,l=Math.max(0,Math.min(1,R(0,t),R(0,s))),u=Math.max(0,Math.min(1,z(e,t),z(o,s))),f=Math.max(0,Math.min(1,N(e,t),N(o,s))),m=(l/2+f)*w.w,y=(1-l/2-u)*w.w,v=(m+y)/2,_=y-m,M=(1-l)*w.h,A=M-_/k;_.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),h=!0),D.emit("plotly_relayouting",O(c))}function j(){E(D),c!==r&&(i.call("_guiRelayout",D,O(c)),A&&D.data&&D._context.showTips&&(o.notifier(s(D,"Double-click to zoom back out"),"long"),A=!1))}function Y(e,t){var n=e/w.xaxis._m,a=t/w.yaxis._m,i=[(c={a:r.a-a,b:r.b+(n+a)/2,c:r.c-(n-a)/2}).a,c.b,c.c].sort(),o=i.indexOf(c.a),s=i.indexOf(c.b),l=i.indexOf(c.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),c={a:i[o],b:i[s],c:i[l]},t=(r.a-c.a)*w.yaxis._m,e=(r.c-c.c-r.b+c.b)*w.xaxis._m);var d="translate("+(w.x0+e)+","+(w.y0+t)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",d);var p="translate("+-e+","+-t+")";w.clipDefRelative.select("path").attr("transform",p),w.aaxis.range=[c.a,w.sum-c.b-c.c],w.baxis.range=[w.sum-c.a-c.c,c.b],w.caxis.range=[w.sum-c.a-c.b,c.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,w),D.emit("plotly_relayouting",O(c))}function H(){i.call("_guiRelayout",D,O(c))}M.onmousemove=function(e){m.hover(D,e,w.id),D._fullLayout._lasthover=M,D._fullLayout._hoversubplot=w.id},M.onmouseout=function(e){D._dragging||f.unhover(D,e)},f.init(I)}},{"../../components/color":591,"../../components/dragelement":609,"../../components/drawing":612,"../../components/fx":629,"../../components/titles":678,"../../lib":716,"../../lib/extend":707,"../../registry":845,"../cartesian/axes":764,"../cartesian/constants":770,"../cartesian/select":781,"../cartesian/set_convert":782,"../plots":825,d3:164,tinycolor2:535}],845:[function(e,t,r){"use strict";var n=e("./lib/loggers"),a=e("./lib/noop"),i=e("./lib/push_unique"),o=e("./lib/is_plain_object"),s=e("./lib/dom").addStyleRule,l=e("./lib/extend"),u=e("./plots/attributes"),c=e("./plots/layout_attributes"),d=l.extendFlat,p=l.extendDeepAll;function h(e){var t=e.name,a=e.categories,i=e.meta;if(r.modules[t])n.log("Type "+t+" already registered");else{r.subplotsRegistry[e.basePlotModule.name]||function(e){var t=e.name;if(r.subplotsRegistry[t])n.log("Plot type "+t+" already registered.");else for(var a in y(e),r.subplotsRegistry[t]=e,r.componentsRegistry)b(a,e.name)}(e.basePlotModule);for(var o={},l=0;l-1&&(d[h[r]].title={text:""});for(r=0;rpath, .legendlines>path, .cbfill").each((function(){var e=n.select(this),t=this.style.fill;t&&-1!==t.indexOf("url(")&&e.style("fill",t.replace(l,"TOBESTRIPPED"));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&e.style("stroke",r.replace(l,"TOBESTRIPPED"))})),"pdf"!==t&&"eps"!==t||p.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),p.node().setAttributeNS(s.xmlns,"xmlns",s.svg),p.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===t&&r&&(p.attr("width",r*f),p.attr("height",r*m),p.attr("viewBox","0 0 "+f+" "+m));var x=(new window.XMLSerializer).serializeToString(p.node());return x=(x=(x=function(e){var t=n.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,(function(e){return"<"===e?"<":"&rt;"===e?">":-1!==e.indexOf("<")||-1!==e.indexOf(">")?"":t.html(e).text()}));return t.remove(),r}(x)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),a.isIE()&&(x=(x=(x=x.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),x}},{"../components/color":591,"../components/drawing":612,"../constants/xmlns_namespaces":693,"../lib":716,d3:164}],854:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){for(var r=0;r0&&d.s>0||(u=!1)}o._extremes[e._id]=s.findExtremes(e,l,{tozero:!u,padded:!0})}}function y(e){for(var t=e.traces,r=0;rd+u||!n(c))}for(var h=0;h0&&x.s>0||(y=!1)}}m._extremes[e._id]=s.findExtremes(e,g,{tozero:!y,padded:v})}}function _(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,s=e.calcdata,l=[],u=[],d=0;di))return t}return void 0!==r?r:e.dflt},r.coerceColor=function(e,t,r){return a(t).isValid()?t:void 0!==r?r:e.dflt},r.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},r.getValue=function(e,t){var r;return Array.isArray(e)?t0}function M(e){return"auto"===e?0:e}function T(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=i.anchor||0,c=a.width,d=a.height,p=Math.abs(t-e),h=Math.abs(n-r),f=p>2*v&&h>2*v?v:0;p-=2*f,h-=2*f;var m=!1;if(!("auto"===l)||c<=p&&d<=h||!(c>p||d>h)||(c>h||d>p)&&c2*v?v:0:p>2*v?v:0;var f=1;l&&(f=s?Math.min(1,h/d):Math.min(1,p/c));var m=M(u);o+=.5*(f*(s?d:c)*Math.abs(Math.sin(Math.PI/180*m))+f*(s?c:d)*Math.abs(Math.cos(Math.PI/180*m)));var g=(e+t)/2,y=(r+n)/2;return s?g=t-o*x(t,e):y=n+o*x(r,n),{textX:(a.left+a.right)/2,textY:(a.top+a.bottom)/2,targetX:g,targetY:y,scale:f,rotate:m}}t.exports={plot:function(e,t,r,h,f,_){var M=t.xaxis,C=t.yaxis,L=e._fullLayout;f||(f={mode:L.barmode,norm:L.barmode,gap:L.bargap,groupgap:L.bargroupgap});var A=i.makeTraceGroups(h,r,"trace bars").each((function(r){var u=n.select(this),h=r[0].trace,L="waterfall"===h.type,A="funnel"===h.type,E="bar"===h.type||A,D=0;L&&h.connector.visible&&"between"===h.connector.mode&&(D=h.connector.line.width/2);var P="h"===h.orientation,I=i.ensureSingle(u,"g","points"),O=b(h),F=I.selectAll("g.point").data(i.identity,O);F.enter().append("g").classed("point",!0),F.exit().remove(),F.each((function(u,b){var L,A,I=n.select(this),O=function(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),n?[a,i]:[i,a]}(u,M,C,P),F=O[0][0],R=O[0][1],z=O[1][0],N=O[1][1],B=!(F!==R&&z!==N&&a(F)&&a(R)&&a(z)&&a(N));if(B&&E&&p.getLineWidth(h,u)&&(P?R-F==0:N-z==0)&&(B=!1),u.isBlank=B,B&&P&&(R=F),B&&!P&&(N=z),D&&!B&&(P?(F-=x(F,R)*D,R+=x(F,R)*D):(z-=x(z,N)*D,N+=x(z,N)*D)),"waterfall"===h.type){if(!B){var j=h[u.dir].marker;L=j.line.width,A=j.color}}else L=p.getLineWidth(h,u),A=u.mc||h.marker.color;var Y=n.round(L/2%1,2);function H(e){return 0===f.gap&&0===f.groupgap?n.round(Math.round(e)-Y,2):e}if(!e._context.staticPlot){var V=s.opacity(A)<1||L>.01?H:function(e,t){return Math.abs(e-t)>=2?H(e):e>t?Math.ceil(e):Math.floor(e)};F=V(F,R),R=V(R,F),z=V(z,N),N=V(N,z)}var U=w(i.ensureSingle(I,"path"),f,_);if(U.style("vector-effect","non-scaling-stroke").attr("d","M"+F+","+z+"V"+N+"H"+R+"V"+z+"Z").call(l.setClipUrl,t.layerClipId,e),k(f)){var W=l.makePointStyleFns(h);l.singlePointStyle(u,U,h,W,e)}!function(e,t,r,n,a,s,u,h,f,_,b){var x,k=t.xaxis,M=t.yaxis,C=e._fullLayout;function L(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+x,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,e)}var A=n[0].trace,E="h"===A.orientation,D=function(e,t,r,n,a){var o,s=t[0].trace;return o=s.texttemplate?function(e,t,r,n,a){var o=t[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l,u,d,p,h="waterfall"===o.type,f="funnel"===o.type;function m(e){return c(p,+e,!0).text}"h"===o.orientation?(l="y",u=a,d="x",p=n):(l="x",u=n,d="y",p=a);var g,v=t[r],_={};_.label=v.p,_.labelLabel=_[l+"Label"]=(g=v.p,c(u,g,!0).text);var b=i.castOption(o,v.i,"text");(0===b||b)&&(_.text=b),_.value=v.s,_.valueLabel=_[d+"Label"]=m(v.s);var x={};y(x,o,v.i),h&&(_.delta=+v.rawS||v.s,_.deltaLabel=m(_.delta),_.final=v.v,_.finalLabel=m(_.final),_.initial=_.final-_.delta,_.initialLabel=m(_.initial)),f&&(_.value=v.s,_.valueLabel=m(_.value),_.percentInitial=v.begR,_.percentInitialLabel=i.formatPercent(v.begR),_.percentPrevious=v.difR,_.percentPreviousLabel=i.formatPercent(v.difR),_.percentTotal=v.sumR,_.percenTotalLabel=i.formatPercent(v.sumR));var w=i.castOption(o,v.i,"customdata");return w&&(_.customdata=w),i.texttemplateString(s,_,e._d3locale,x,_,o._meta||{})}(e,t,r,n,a):s.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function u(e){return c(o?r:n,+e,!0).text}var d,p,h=a.textinfo,f=e[t],m=h.split("+"),g=[],y=function(e){return-1!==m.indexOf(e)};if(y("label")&&g.push((p=e[t].p,c(o?n:r,p,!0).text)),y("text")&&(0===(d=i.castOption(a,f.i,"text"))||d)&&g.push(d),s){var v=+f.rawS||f.s,_=f.v,b=_-v;y("initial")&&g.push(u(b)),y("delta")&&g.push(u(v)),y("final")&&g.push(u(_))}if(l){y("value")&&g.push(u(f.s));var x=0;y("percent initial")&&x++,y("percent previous")&&x++,y("percent total")&&x++;var w=x>1;y("percent initial")&&(d=i.formatPercent(f.begR),w&&(d+=" of initial"),g.push(d)),y("percent previous")&&(d=i.formatPercent(f.difR),w&&(d+=" of previous"),g.push(d)),y("percent total")&&(d=i.formatPercent(f.sumR),w&&(d+=" of total"),g.push(d))}return g.join("
")}(t,r,n,a):p.getValue(s.text,r),p.coerceString(m,o)}(C,n,a,k,M);x=function(e,t){var r=p.getValue(e.textposition,t);return p.coerceEnumerated(g,r)}(A,a);var P="stack"===_.mode||"relative"===_.mode,I=n[a],O=!P||I._outmost;if(D&&"none"!==x&&(!I.isBlank&&s!==u&&h!==f||"auto"!==x&&"inside"!==x)){var F=C.font,R=d.getBarColor(n[a],A),z=d.getInsideTextFont(A,a,F,R),N=d.getOutsideTextFont(A,a,F),B=r.datum();E?"log"===k.type&&B.s0<=0&&(s=k.range[0]=H*(G/V):G>=V*(q/H);H>0&&V>0&&(K||Z||X)?x="inside":(x="outside",j.remove(),j=null)}else x="inside";if(!j){var J=(j=L(r,D,"outside"===x?N:z)).attr("transform");if(j.attr("transform",""),Y=l.bBox(j.node()),H=Y.width,V=Y.height,j.attr("transform",J),H<=0||V<=0)return void j.remove()}"outside"===x?(W="both"===A.constraintext||"outside"===A.constraintext,U=i.getTextTransform(S(s,u,h,f,Y,{isHorizontal:E,constrained:W,angle:A.textangle}))):(W="both"===A.constraintext||"inside"===A.constraintext,U=i.getTextTransform(T(s,u,h,f,Y,{isHorizontal:E,constrained:W,angle:A.textangle,anchor:A.insidetextanchor}))),w(j,_,b).attr("transform",U)}else r.select("text").remove()}(e,t,I,r,b,F,R,z,N,f,_),t.layerClipId&&l.hideOutsideRangePoint(u,I.select("text"),M,C,h.xcalendar,h.ycalendar)}));var R=!1===h.cliponaxis;l.setClipUrl(u,R?null:t.layerClipId,e)}));u.getComponentMethod("errorbars","plot")(e,A,t,f)},toMoveInsideBar:T,toMoveOutsideBar:S}},{"../../components/color":591,"../../components/drawing":612,"../../components/fx/helpers":626,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../registry":845,"./attributes":855,"./constants":857,"./helpers":861,"./style":869,d3:164,"fast-isnumeric":227}],867:[function(e,t,r){"use strict";function n(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(i+o)/2,l]}t.exports=function(e,t){var r,a=e.cd,i=e.xaxis,o=e.yaxis,s=a[0].trace,l="funnel"===s.type,u="h"===s.orientation,c=[];if(!1===t)for(r=0;r1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){h(n.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:f,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?function(e,t,r){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var a,s=n.select(this);if(e.selected){a=o.extendFlat({},m(s,e,t,r));var l=t.selected.textfont&&t.selected.textfont.color;l&&(a.color=l),i.font(s,a)}else i.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,r)}(r,a,e):(h(r,a,e),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:v,getBarColor:b}},{"../../components/color":591,"../../components/drawing":612,"../../lib":716,"../../registry":845,"./attributes":855,"./helpers":861,d3:164}],870:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults");t.exports=function(e,t,r,o,s){r("marker.color",o),a(e,"marker")&&i(e,t,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(e,"marker.line")&&i(e,t,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":591,"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602}],871:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../lib/extend").extendFlat,i=e("../scatterpolar/attributes"),o=e("../bar/attributes");t.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:a({},o.base,{}),offset:a({},o.offset,{}),width:a({},o.width,{}),text:a({},o.text,{}),hovertext:a({},o.hovertext,{}),marker:o.marker,hoverinfo:i.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{"../../lib/extend":707,"../../plots/template_attributes":840,"../bar/attributes":855,"../scatterpolar/attributes":1190}],872:[function(e,t,r){"use strict";var n=e("../../components/colorscale/helpers").hasColorscale,a=e("../../components/colorscale/calc"),i=e("../bar/arrays_to_calcdata"),o=e("../bar/cross_trace_calc").setGroupPositions,s=e("../scatter/calc_selection"),l=e("../../registry").traceIs,u=e("../../lib").extendFlat;t.exports={calc:function(e,t){for(var r=e._fullLayout,o=t.subplot,l=r[o].radialaxis,u=r[o].angularaxis,c=l.makeCalcdata(t,"r"),d=u.makeCalcdata(t,"theta"),p=t._length,h=new Array(p),f=c,m=d,g=0;gp.range[1]&&(_+=Math.PI),n.getClosest(u,(function(e){return m(v,_,[e.rp0,e.rp1],[e.thetag0,e.thetag1],f)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-v)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var b=u[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var x=a.extendFlat({},b,{r:b.s,theta:b.p});return o(b,c,e),s(x,c,d,e),e.hovertemplate=c.hovertemplate,e.color=i(c,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}},{"../../components/fx":629,"../../lib":716,"../../plots/polar/helpers":827,"../bar/hover":862,"../scatterpolar/hover":1194}],875:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"barpolar",basePlotModule:e("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("../scatterpolar/format_labels"),style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../bar/select"),meta:{}}},{"../../plots/polar":828,"../bar/select":867,"../bar/style":869,"../scatter/marker_colorbar":1136,"../scatterpolar/format_labels":1193,"./attributes":871,"./calc":872,"./defaults":873,"./hover":874,"./layout_attributes":876,"./layout_defaults":877,"./plot":878}],876:[function(e,t,r){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],877:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){var i,o={};function s(r,o){return n.coerce(e[i]||{},t[i],a,r,o)}for(var l=0;l0?(u=o,c=l):(u=l,c=o);var d=[s.findEnclosingVertexAngles(u,e.vangles)[0],(u+c)/2,s.findEnclosingVertexAngles(c,e.vangles)[1]];return s.pathPolygonAnnulus(n,a,u,c,d,t,r)}:function(e,n,a,o){return i.pathAnnulus(e,n,a,o,t,r)}}(t),h=t.layers.frontplot.select("g.barlayer");i.makeTraceGroups(h,r,"trace bars").each((function(){var r=n.select(this),s=i.ensureSingle(r,"g","points").selectAll("g.point").data(i.identity);s.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,r=n.select(this),o=e.rp0=c.c2p(e.s0),s=e.rp1=c.c2p(e.s1),h=e.thetag0=d.c2g(e.p0),f=e.thetag1=d.c2g(e.p1);if(a(o)&&a(s)&&a(h)&&a(f)&&o!==s&&h!==f){var m=c.c2g(e.s1),g=(h+f)/2;e.ct=[l.c2p(m*Math.cos(g)),u.c2p(m*Math.sin(g))],t=p(o,s,h,f)}else t="M0,0Z";i.ensureSingle(r,"path").attr("d",t)})),o.setClipUrl(r,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},{"../../components/drawing":612,"../../lib":716,"../../plots/polar/helpers":827,d3:164,"fast-isnumeric":227}],879:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../bar/attributes"),i=e("../../components/color/attributes"),o=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../lib/extend").extendFlat,l=n.marker,u=l.line;t.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},name:{valType:"string",editType:"calc+clearAxisTypes"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers",editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1,editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},u.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:s({},u.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n.fillcolor,offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":590,"../../lib/extend":707,"../../plots/template_attributes":840,"../bar/attributes":855,"../scatter/attributes":1118}],880:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=a._,o=e("../../plots/cartesian/axes");function s(e,t,r){var n={text:"tx",hovertext:"htx"};for(var a in n)Array.isArray(t[a])&&(e[n[a]]=t[a][r])}function l(e,t){return e.v-t.v}function u(e){return e.v}t.exports=function(e,t){var r,c,d,p,h,f=e._fullLayout,m=o.getFromId(e,t.xaxis||"x"),g=o.getFromId(e,t.yaxis||"y"),y=[],v="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(c=m,d="x",p=g,h="y"):(c=g,d="y",p=m,h="x");var _,b=c.makeCalcdata(t,d),x=function(e,t,r,i,o){if(t in e)return r.makeCalcdata(e,t);var s;s=t+"0"in e?e[t+"0"]:"name"in e&&("category"===r.type||n(e.name)&&-1!==["linear","log"].indexOf(r.type)||a.isDateTime(e.name)&&"date"===r.type)?e.name:o;var l="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,e[t+"calendar"]);return i.map((function(){return l}))}(t,h,p,b,f[v]),w=a.distinctVals(x),k=w.vals,M=w.minDiff/2,T=function(e,t){for(var r=e.length,n=new Array(r+1),a=0;a=0&&A_.uf};for(r=0;r0){var P=C[r].sort(l),I=P.map(u),O=I.length;(_={}).pos=k[r],_.pts=P,_[h]=_.pos,_[d]=_.pts.map((function(e){return e.v})),_.min=I[0],_.max=I[O-1],_.mean=a.mean(I,O),_.sd=a.stdev(I,O,_.mean),_.q1=a.interp(I,.25),_.med=a.interp(I,.5),_.q3=a.interp(I,.75),_.lf=Math.min(_.q1,I[Math.min(a.findBin(2.5*_.q1-1.5*_.q3,I,!0)+1,O-1)]),_.uf=Math.max(_.q3,I[Math.max(a.findBin(2.5*_.q3-1.5*_.q1,I),0)]),_.lo=4*_.q1-3*_.q3,_.uo=4*_.q3-3*_.q1;var F=1.57*(_.q3-_.q1)/Math.sqrt(O);_.ln=_.med-F,_.un=_.med+F,_.pts2=P.filter(D),y.push(_)}!function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(y[0].t={num:f[v],dPos:M,posLetter:h,valLetter:d,labels:{med:i(e,"median:"),min:i(e,"min:"),q1:i(e,"q1:"),q3:i(e,"q3:"),max:i(e,"max:"),mean:"sd"===t.boxmean?i(e,"mean ± σ:"):i(e,"mean:"),lf:i(e,"lower fence:"),uf:i(e,"upper fence:")}},f[v]++,y):[{t:{empty:!0}}]}},{"../../lib":716,"../../plots/cartesian/axes":764,"fast-isnumeric":227}],881:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib"),i=e("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(e,t,r,o){var s,l,u,c=t.calcdata,d=t._fullLayout,p=o._id,h=p.charAt(0),f=[],m=0;for(s=0;s1,b=1-d[e+"gap"],x=1-d[e+"groupgap"];for(s=0;s0){var U=L.pointpos,W=L.jitter,q=L.marker.size/2,G=0;U+W>=0&&((G=H*(U+W))>S?(V=!0,j=q,N=G):G>R&&(j=q,N=S)),G<=S&&(N=S);var K=0;U-W<=0&&((K=-H*(U-W))>C?(V=!0,Y=q,B=K):K>z&&(Y=q,B=C)),K<=C&&(B=C)}else N=S,B=C;var Z=new Array(u.length);for(l=0;le.lo&&(x.so=!0)}return i}));f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(i.translatePoints,l,u)}function c(e,t,r,i){var o,s,l=t.pos,u=t.val,c=i.bPos,d=i.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(i.bdPos)?(o=i.bdPos[0],s=i.bdPos[1]):(o=i.bdPos,s=i.bdPos);var h=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?a.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each((function(e){var t=l.c2l(e.pos+c,!0),a=l.l2p(t)+d,i=l.l2p(t-o)+d,h=l.l2p(t+s)+d,f=u.c2p(e.mean,!0),m=u.c2p(e.mean-e.sd,!0),g=u.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+f+","+i+"V"+h+("sd"===p?"m0,0L"+m+","+a+"L"+f+","+i+"L"+g+","+a+"Z":"")):n.select(this).attr("d","M"+i+","+f+"H"+h+("sd"===p?"m0,0L"+a+","+m+"L"+i+","+f+"L"+a+","+g+"Z":""))}))}t.exports={plot:function(e,t,r,i){var o=t.xaxis,s=t.yaxis;a.makeTraceGroups(i,r,"trace boxes").each((function(e){var t,r,a=n.select(this),i=e[0],d=i.t,p=i.trace;d.wdPos=d.bdPos*p.whiskerwidth,!0!==p.visible||d.empty?a.remove():("h"===p.orientation?(t=s,r=o):(t=o,r=s),l(a,{pos:t,val:r},p,d),u(a,{x:o,y:s},p,d),c(a,{pos:t,val:r},p,d))}))},plotBoxAndWhiskers:l,plotPoints:u,plotBoxMean:c}},{"../../components/drawing":612,"../../lib":716,d3:164}],889:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,a=e.cd,i=e.xaxis,o=e.yaxis,s=[];if(!1===t)for(r=0;r=10)return null;for(var a=1/0,i=-1/0,o=t.length,s=0;s0?Math.floor:Math.ceil,P=A>0?Math.ceil:Math.floor,I=A>0?Math.min:Math.max,O=A>0?Math.max:Math.min,F=D(C+E),R=P(L-E),z=[[d=S(C)]];for(i=F;i*A=0;a--)i[c-a]=e[d][a],o[c-a]=t[d][a];for(s.push({x:i,y:o,bicubic:l}),a=d,i=[],o=[];a>=0;a--)i[d-a]=e[a][0],o[d-a]=t[a][0];return s.push({x:i,y:o,bicubic:u}),s}},{}],903:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;t.exports=function(e,t,r){var i,o,s,l,u,c,d,p,h,f,m,g,y,v,_=e["_"+t],b=e[t+"axis"],x=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],M=e["_"+r],T=e[r+"axis"];"array"===b.tickmode&&(b.tickvals=_.slice());var S=e._xctrl,C=e._yctrl,L=S[0].length,A=S.length,E=e._a.length,D=e._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var P=b.smoothing?3:1;function I(n){var a,i,o,s,l,u,c,d,h,f,m,g,y=[],v=[],_={};if("b"===t)for(i=e.b2j(n),o=Math.floor(Math.max(0,Math.min(D-2,i))),s=i-o,_.length=D,_.crossLength=E,_.xy=function(t){return e.evalxy([],t,i)},_.dxy=function(t,r){return e.dxydi([],t,o,r,s)},a=0;a0&&(h=e.dxydi([],a-1,o,0,s),y.push(l[0]+h[0]/3),v.push(l[1]+h[1]/3),f=e.dxydi([],a-1,o,1,s),y.push(d[0]-f[0]/3),v.push(d[1]-f[1]/3)),y.push(d[0]),v.push(d[1]),l=d;else for(a=e.a2i(n),u=Math.floor(Math.max(0,Math.min(E-2,a))),c=a-u,_.length=E,_.crossLength=D,_.xy=function(t){return e.evalxy([],a,t)},_.dxy=function(t,r){return e.dxydj([],u,t,c,r)},i=0;i0&&(m=e.dxydj([],u,i-1,c,0),y.push(l[0]+m[0]/3),v.push(l[1]+m[1]/3),g=e.dxydj([],u,i-1,c,1),y.push(d[0]-g[0]/3),v.push(d[1]-g[1]/3)),y.push(d[0]),v.push(d[1]),l=d;return _.axisLetter=t,_.axis=b,_.crossAxis=T,_.value=n,_.constvar=r,_.index=p,_.x=y,_.y=v,_.smoothing=T.smoothing,_}function O(n){var a,i,o,s,l,u=[],c=[],d={};if(d.length=_.length,d.crossLength=M.length,"b"===t)for(o=Math.max(0,Math.min(D-2,n)),l=Math.min(1,Math.max(0,n-o)),d.xy=function(t){return e.evalxy([],t,n)},d.dxy=function(t,r){return e.dxydi([],t,o,r,l)},a=0;a_.length-1||x.push(a(O(o),{color:b.gridcolor,width:b.gridwidth}));for(p=c;p_.length-1||m<0||m>_.length-1))for(g=_[s],y=_[m],i=0;i_[_.length-1]||w.push(a(I(f),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(O(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(O(_.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,c=(u=[Math.floor((_[_.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((_[0]-b.tick0)/b.dtick/(1+l))].sort((function(e,t){return e-t})))[0],d=u[1],p=c;p<=d;p++)h=b.tick0+b.dtick*p,x.push(a(I(h),{color:b.gridcolor,width:b.gridwidth}));for(p=c-1;p_[_.length-1]||w.push(a(I(f),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(I(_[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(I(_[_.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":707,"../../plots/cartesian/axes":764}],904:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;t.exports=function(e,t){var r,i,o,s=t._labels=[],l=t._gridlines;for(r=0;rt.length&&(e=e.slice(0,t.length)):e=[],a=0;a90&&(h-=180,l=-l),{angle:h,flip:l,p:e.c2p(n,t,r),offsetMultplier:u}}},{}],918:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("./map_1d_array"),o=e("./makepath"),s=e("./orient_text"),l=e("../../lib/svg_text_utils"),u=e("../../lib"),c=e("../../constants/alignment");function d(e,t,r,a,s,l){var u="const-"+s+"-lines",c=r.selectAll("."+u).data(l);c.enter().append("path").classed(u,!0).style("vector-effect","non-scaling-stroke"),c.each((function(r){var a=r,s=a.x,l=a.y,u=i([],s,e.c2p),c=i([],l,t.c2p),d="M"+o(u,c,a.smoothing);n.select(this).attr("d",d).style("stroke-width",a.width).style("stroke",a.color).style("fill","none")})),c.exit().remove()}function p(e,t,r,i,o,u,c,d){var p=u.selectAll("text."+d).data(c);p.enter().append("text").classed(d,!0);var h=0,f={};return p.each((function(o,u){var c;if("auto"===o.axis.tickangle)c=s(i,t,r,o.xy,o.dxy);else{var d=(o.axis.tickangle+180)*Math.PI/180;c=s(i,t,r,o.xy,[Math.cos(d),Math.sin(d)])}u||(f={angle:c.angle,flip:c.flip});var p=(o.endAnchor?-1:1)*c.flip,m=n.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(l.convertToTspans,e),g=a.bBox(this);m.attr("transform","translate("+c.p[0]+","+c.p[1]+") rotate("+c.angle+")translate("+o.axis.labelpadding*p+","+.3*g.height+")"),h=Math.max(h,g.width+o.axis.labelpadding)})),p.exit().remove(),f.maxExtent=h,f}t.exports=function(e,t,r,a){var l=t.xaxis,c=t.yaxis,h=e._fullLayout._clips;u.makeTraceGroups(a,r,"trace").each((function(t){var r=n.select(this),a=t[0],f=a.trace,g=f.aaxis,y=f.baxis,v=u.ensureSingle(r,"g","minorlayer"),_=u.ensureSingle(r,"g","majorlayer"),b=u.ensureSingle(r,"g","boundarylayer"),x=u.ensureSingle(r,"g","labellayer");r.style("opacity",f.opacity),d(l,c,_,0,"a",g._gridlines),d(l,c,_,0,"b",y._gridlines),d(l,c,v,0,"a",g._minorgridlines),d(l,c,v,0,"b",y._minorgridlines),d(l,c,b,0,"a-boundary",g._boundarylines),d(l,c,b,0,"b-boundary",y._boundarylines);var w=p(e,l,c,f,0,x,g._labels,"a-label"),k=p(e,l,c,f,0,x,y._labels,"b-label");!function(e,t,r,n,a,i,o,l){var c,d,p,h,f=u.aggNums(Math.min,null,r.a),g=u.aggNums(Math.max,null,r.a),y=u.aggNums(Math.min,null,r.b),v=u.aggNums(Math.max,null,r.b);c=.5*(f+g),d=y,p=r.ab2xy(c,d,!0),h=r.dxyda_rough(c,d),void 0===o.angle&&u.extendFlat(o,s(r,a,i,p,r.dxydb_rough(c,d))),m(e,t,r,0,p,h,r.aaxis,a,i,o,"a-title"),c=f,d=.5*(y+v),p=r.ab2xy(c,d,!0),h=r.dxydb_rough(c,d),void 0===l.angle&&u.extendFlat(l,s(r,a,i,p,r.dxyda_rough(c,d))),m(e,t,r,0,p,h,r.baxis,a,i,l,"b-title")}(e,x,f,0,l,c,w,k),function(e,t,r,n,a){var s,l,c,d,p=r.select("#"+e._clipPathId);p.size()||(p=r.append("clipPath").classed("carpetclip",!0));var h=u.ensureSingle(p,"path","carpetboundary"),f=t.clipsegments,m=[];for(d=0;d90&&g<270,v=n.select(this);v.text(c.title.text).call(l.convertToTspans,e),y&&(_=(-l.lineCount(v)+f)*h*i-_),v.attr("transform","translate("+t.p[0]+","+t.p[1]+") rotate("+t.angle+") translate(0,"+_+")").classed("user-select-none",!0).attr("text-anchor","middle").call(a.font,c.title.font)})),v.exit().remove()}},{"../../components/drawing":612,"../../constants/alignment":685,"../../lib":716,"../../lib/svg_text_utils":740,"./makepath":915,"./map_1d_array":916,"./orient_text":917,d3:164}],919:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../lib/search").findBin,i=e("./compute_control_points"),o=e("./create_spline_evaluator"),s=e("./create_i_derivative_evaluator"),l=e("./create_j_derivative_evaluator");t.exports=function(e){var t=e._a,r=e._b,u=t.length,c=r.length,d=e.aaxis,p=e.baxis,h=t[0],f=t[u-1],m=r[0],g=r[c-1],y=t[t.length-1]-t[0],v=r[r.length-1]-r[0],_=y*n.RELATIVE_CULL_TOLERANCE,b=v*n.RELATIVE_CULL_TOLERANCE;h-=_,f+=_,m-=b,g+=b,e.isVisible=function(e,t){return e>h&&em&&tf||tg},e.setScale=function(){var t=e._x,r=e._y,n=i(e._xctrl,e._yctrl,t,r,d.smoothing,p.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=o([e._xctrl,e._yctrl],u,c,d.smoothing,p.smoothing),e.dxydi=s([e._xctrl,e._yctrl],d.smoothing,p.smoothing),e.dxydj=l([e._xctrl,e._yctrl],d.smoothing,p.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),u-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),u-2),n=e[1]-t;return(1-n)*r[t]+n*r[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(a(e,t),u-2)),n=t[r],i=t[r+1];return Math.max(0,Math.min(u-1,r+(e-n)/(i-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(a(e,r),c-2)),n=r[t],i=r[t+1];return Math.max(0,Math.min(c-1,t+(e-n)/(i-n)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(n,a,i){if(!i&&(nt[u-1]|ar[c-1]))return[!1,!1];var o=e.a2i(n),s=e.b2j(a),l=e.evalxy([],o,s);if(i){var d,p,h,f,m=0,g=0,y=[];nt[u-1]?(d=u-2,p=1,m=(n-t[u-1])/(t[u-1]-t[u-2])):p=o-(d=Math.max(0,Math.min(u-2,Math.floor(o)))),ar[c-1]?(h=c-2,f=1,g=(a-r[c-1])/(r[c-1]-r[c-2])):f=s-(h=Math.max(0,Math.min(c-2,Math.floor(s)))),m&&(e.dxydi(y,d,h,p,f),l[0]+=y[0]*m,l[1]+=y[1]*m),g&&(e.dxydj(y,d,h,p,f),l[0]+=y[0]*g,l[1]+=y[1]*g)}return l},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(r.length-2,e));return r[t+1]-r[t]},e.dxyda=function(t,r,n,a){var i=e.dxydi(null,t,r,n,a),o=e.dadi(t,n);return[i[0]/o,i[1]/o]},e.dxydb=function(t,r,n,a){var i=e.dxydj(null,t,r,n,a),o=e.dbdj(r,a);return[i[0]/o,i[1]/o]},e.dxyda_rough=function(t,r,n){var a=y*(n||.1),i=e.ab2xy(t+a,r,!0),o=e.ab2xy(t-a,r,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},e.dxydb_rough=function(t,r,n){var a=v*(n||.1),i=e.ab2xy(t,r+a,!0),o=e.ab2xy(t,r-a,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}},{"../../lib/search":735,"./compute_control_points":907,"./constants":908,"./create_i_derivative_evaluator":909,"./create_j_derivative_evaluator":910,"./create_spline_evaluator":911}],920:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r){var a,i,o,s=[],l=[],u=e[0].length,c=e.length;function d(t,r){var n,a=0,i=0;return t>0&&void 0!==(n=e[r][t-1])&&(i++,a+=n),t0&&void 0!==(n=e[r-1][t])&&(i++,a+=n),r0&&i0&&a1e-5);return n.log("Smoother converged to",M,"after",T,"iterations"),e}},{"../../lib":716}],921:[function(e,t,r){"use strict";var n=e("../../lib").isArray1D;t.exports=function(e,t,r){var a=r("x"),i=a&&a.length,o=r("y"),s=o&&o.length;if(!i&&!s)return!1;if(t._cheater=!a,i&&!n(a)||s&&!n(o))t._length=null;else{var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),t.a&&t.a.length&&(l=Math.min(l,t.a.length)),t.b&&t.b.length&&(l=Math.min(l,t.b.length)),t._length=l}return!0}},{"../../lib":716}],922:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../scattergeo/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../plots/attributes"),s=e("../../components/color/attributes").defaultLine,l=e("../../lib/extend").extendFlat,u=a.marker.line;t.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},text:l({},a.text,{}),hovertext:l({},a.hovertext,{}),marker:{line:{color:l({},u.color,{dflt:s}),width:l({},u.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:a.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:a.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n()},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":590,"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scattergeo/attributes":1159}],923:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,i=e("../../components/colorscale/calc"),o=e("../scatter/arrays_to_calcdata"),s=e("../scatter/calc_selection");function l(e){return e&&"string"==typeof e}t.exports=function(e,t){var r,u=t._length,c=new Array(u);r=t.geojson?function(e){return l(e)||n(e)}:l;for(var d=0;d")}}(e,d,o,p.mockAxis),[e]}},{"../../lib":716,"../../plots/cartesian/axes":764,"./attributes":922}],927:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("./calc"),plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"choropleth",basePlotModule:e("../../plots/geo"),categories:["geo","noOpacity"],meta:{}}},{"../../plots/geo":794,"../heatmap/colorbar":1001,"./attributes":922,"./calc":923,"./defaults":924,"./event_data":925,"./hover":926,"./plot":928,"./select":929,"./style":930}],928:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../lib/polygon"),o=e("../../lib/topojson_utils").getTopojsonFeatures,s=e("../../lib/geo_location_utils").locationToFeature,l=e("./style").style;function u(e,t){for(var r=e[0].trace,n=e.length,a=o(r,t),i=0;i0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===l||"FJI"===l?function(e){var t;if(null===c(e))t=e;else for(t=new Array(e.length),a=0;at?r[n++]=[e[a][0]+360,e[a][1]]:a===t?(r[n++]=e[a],r[n++]=[e[a][0],-90]):r[n++]=e[a];var o=i.tester(r);o.pts.pop(),u.push(o)}:function(e){u.push(i.tester(e))},o.type){case"MultiPolygon":for(r=0;ro&&(o=u,t=l)}else t=r;return i.default(t).geometry.coordinates}(s),t.fIn=e,t.fOut=s,y.push(s)}else o.log(["Location with id",t.loc,"does not have a valid GeoJSON geometry,","choroplethmapbox traces only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete g[e.id]}switch(o.isArrayOrTypedArray(k.opacity)&&(_=function(e){var t=e.mo;return n(t)?+o.constrain(t,0,1):0}),o.isArrayOrTypedArray(M.color)&&(b=function(e){return e.mlc}),o.isArrayOrTypedArray(M.width)&&(x=function(e){return e.mlw}),f.type){case"FeatureCollection":var S=f.features;for(m=0;m=0;n--){var a=r[n].id;if("string"==typeof a&&0===a.indexOf("water"))for(var i=n+1;i=0;r--)e.removeLayer(t[r][1])},s.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var r=t[0].trace,a=new o(e,r.uid),i=a.sourceId,s=n(t),l=a.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(i,{type:"geojson",data:s.geojson}),a._addLayers(s,l),t[0].trace._glTrace=a,a}},{"../../plots/mapbox/constants":817,"./convert":932}],936:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../mesh3d/attributes"),o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(e){l[e]=i[e]})),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,t.exports=l},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../mesh3d/attributes":1059}],937:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){for(var r=t.u,a=t.v,i=t.w,o=Math.min(t.x.length,t.y.length,t.z.length,r.length,a.length,i.length),s=-1/0,l=1/0,u=0;uo.level||o.starts.length&&i===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,u=-1/0,c=1/0;for(r=0;r":h>u&&(n.prefixBoundary=!0);break;case"<":(hu||n.starts.length&&p===c)&&(n.prefixBoundary=!0);break;case"][":d=Math.min(h[0],h[1]),p=Math.max(h[0],h[1]),du&&(n.prefixBoundary=!0)}}}},{}],944:[function(e,t,r){"use strict";var n=e("../../components/colorscale").extractOpts,a=e("./make_color_map"),i=e("./end_plus");t.exports={min:"zmin",max:"zmax",calc:function(e,t,r){var o=t.contours,s=t.line,l=o.size||1,u=o.coloring,c=a(t,{isColorbar:!0});if("heatmap"===u){var d=n(t);r._fillgradient=t.colorscale,r._zrange=[d.min,d.max]}else"fill"===u&&(r._fillcolor=c);r._line={color:"lines"===u?c:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:i(o),size:l}}}},{"../../components/colorscale":603,"./end_plus":952,"./make_color_map":957}],945:[function(e,t,r){"use strict";t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],946:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./label_defaults"),i=e("../../components/color"),o=i.addOpacity,s=i.opacity,l=e("../../constants/filter_ops"),u=l.CONSTRAINT_REDUCTION,c=l.COMPARISON_OPS2;t.exports=function(e,t,r,i,l,d){var p,h,f,m=t.contours,g=r("contours.operation");m._operation=u[g],function(e,t){var r;-1===c.indexOf(t.operation)?(e("contours.value",[0,1]),Array.isArray(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),n(t.value)||(Array.isArray(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(r,m),"="===g?p=m.showlines=!0:(p=r("contours.showlines"),f=r("fillcolor",o((e.line||{}).color||l,.5))),p&&(h=r("line.color",f&&s(f)?o(t.fillcolor,1):l),r("line.width",2),r("line.dash")),r("line.smoothing"),a(r,i,h,d)}},{"../../components/color":591,"../../constants/filter_ops":688,"./label_defaults":956,"fast-isnumeric":227}],947:[function(e,t,r){"use strict";var n=e("../../constants/filter_ops"),a=e("fast-isnumeric");function i(e,t){var r,i=Array.isArray(t);function o(e){return a(e)?+e:null}return-1!==n.COMPARISON_OPS2.indexOf(e)?r=o(i?t[0]:t):-1!==n.INTERVAL_OPS.indexOf(e)?r=i?[o(t[0]),o(t[1])]:[o(t),o(t)]:-1!==n.SET_OPS.indexOf(e)&&(r=i?t.map(o):[o(t)]),r}function o(e){return function(t){t=i(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function s(e){return function(t){return{start:t=i(e,t),end:1/0,size:1/0}}}t.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":688,"fast-isnumeric":227}],948:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var a=n("contours.start"),i=n("contours.end"),o=!1===a||!1===i,s=r("contours.size");!(o?t.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],949:[function(e,t,r){"use strict";var n=e("../../lib");function a(e){return n.extendFlat({},e,{edgepaths:n.extendDeep([],e.edgepaths),paths:n.extendDeep([],e.paths),starts:n.extendDeep([],e.starts)})}t.exports=function(e,t){var r,i,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&n.warn("Contour data invalid for the specified inequality operation."),i=e[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",e);break}return l}},{"../../lib":716,"./constraint_mapping":947,"./end_plus":952}],952:[function(e,t,r){"use strict";t.exports=function(e){return e.end+e.size/1e6}},{}],953:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./constants");function i(e,t,r,n){return Math.abs(e[0]-t[0])20&&t?208===e||1114===e?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(e)?i=1:-1!==a.LEFTSTART.indexOf(e)?n=1:-1!==a.TOPSTART.indexOf(e)?i=-1:n=-1,[n,i]}(d,r,t),h=[s(e,t,[-p[0],-p[1]])],f=e.z.length,m=e.z[0].length,g=t.slice(),y=p.slice();for(u=0;u<1e4;u++){if(d>20?(d=a.CHOOSESADDLE[d][(p[0]||p[1])<0?0:1],e.crossings[c]=a.SADDLEREMAINDER[d]):delete e.crossings[c],!(p=a.NEWDELTA[d])){n.log("Found bad marching index:",d,t,e.level);break}h.push(s(e,t,p)),t[0]+=p[0],t[1]+=p[1],c=t.join(","),i(h[h.length-1],h[h.length-2],o,l)&&h.pop();var v=p[0]&&(t[0]<0||t[0]>m-2)||p[1]&&(t[1]<0||t[1]>f-2);if(t[0]===g[0]&&t[1]===g[1]&&p[0]===y[0]&&p[1]===y[1]||r&&v)break;d=e.crossings[c]}1e4===u&&n.log("Infinite loop in contour?");var _,b,x,w,k,M,T,S,C,L,A,E,D,P,I,O=i(h[0],h[h.length-1],o,l),F=0,R=.2*e.smoothing,z=[],N=0;for(u=1;u=N;u--)if((_=z[u])=N&&_+z[b]S&&C--,e.edgepaths[C]=A.concat(h,L));break}H||(e.edgepaths[S]=h.concat(L))}for(S=0;Se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}t.exports=function(e){var t,r,i,o,s,l,u,c,d,p=e[0].z,h=p.length,f=p[0].length,m=2===h||2===f;for(r=0;r=0&&(n=v,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-v[1])<.01&&(v[0]-r[0])*(n[0]-v[0])>=0&&(n=v,s=l):a.log("endpt to newendpt is not vert. or horz.",r,n,v)}if(r=n,s>=0)break;d+="L"+n}if(s===e.edgepaths.length){a.log("unclosed perimeter path");break}p=s,(f=-1===h.indexOf(p))&&(p=h[0],d+="Z")}for(p=0;pn.center?n.right-s:s-n.left)/(c+Math.abs(Math.sin(u)*o)),h=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(d)+Math.cos(u)*o);if(p<1||h<1)return 1/0;var f=y.EDGECOST*(1/(p-1)+1/(h-1));f+=y.ANGLECOST*u*u;for(var m=s-c,g=l-d,v=s+c,_=l+d,b=0;b2*y.MAXCOST)break;h&&(s/=2),l=(o=u-s/2)+1.5*s}if(p<=y.MAXCOST)return c},r.addLabelData=function(e,t,r,n){var a=t.width/2,i=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.sin(l),c=Math.cos(l),d=a*c,p=i*u,h=a*u,f=-i*c,m=[[o-d-p,s-h-f],[o+d-p,s+h-f],[o+d+p,s+h+f],[o-d+p,s-h+f]];r.push({text:t.text,x:o,y:s,dy:t.dy,theta:l,level:t.level,width:t.width,height:t.height}),n.push(m)},r.drawLabels=function(e,t,r,i,o){var l=e.selectAll("text").data(t,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var t=e.x+Math.sin(e.theta)*e.dy,a=e.y-Math.cos(e.theta)*e.dy;n.select(this).text(e.text).attr({x:t,y:a,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+a+")"}).call(s.convertToTspans,r)})),o){for(var u="",c=0;cr.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),a.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if("constraint"!==r.type){var u,c=r.start,d=r.end,p=e._input.contours;c>d&&(r.start=p.start=d,d=r.end=p.end=c,c=r.start),r.size>0||(u=c===d?1:i(c,d,e.ncontours).dtick,p.size=r.size=u)}}},{"../../lib":716,"../../plots/cartesian/axes":764}],961:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../heatmap/style"),o=e("./make_color_map");t.exports=function(e){var t=n.select(e).selectAll("g.contour");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(e){var t=n.select(this),r=e[0].trace,i=r.contours,s=r.line,l=i.size||1,u=i.start,c="constraint"===i.type,d=!c&&"lines"===i.coloring,p=!c&&"fill"===i.coloring,h=d||p?o(r):null;t.selectAll("g.contourlevel").each((function(e){n.select(this).selectAll("path").call(a.lineGroupStyle,s.width,d?h(e.level):s.color,s.dash)}));var f=i.labelfont;if(t.selectAll("g.contourlabels text").each((function(e){a.font(n.select(this),{family:f.family,size:f.size,color:f.color||(d?h(e.level):s.color)})})),c)t.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(p){var m;t.selectAll("g.contourfill path").style("fill",(function(e){return void 0===m&&(m=e.level),h(e.level+.5*l)})),void 0===m&&(m=u),t.selectAll("g.contourbg path").style("fill",h(m-.5*l))}})),i(e)}},{"../../components/drawing":612,"../heatmap/style":1010,"./make_color_map":957,d3:164}],962:[function(e,t,r){"use strict";var n=e("../../components/colorscale/defaults"),a=e("./label_defaults");t.exports=function(e,t,r,i,o){var s,l=r("contours.coloring"),u="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(u=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,n(e,t,i,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),a(r,i,u,o)}},{"../../components/colorscale/defaults":601,"./label_defaults":956}],963:[function(e,t,r){"use strict";var n=e("../heatmap/attributes"),a=e("../contour/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../lib/extend").extendFlat,s=a.contours;t.exports=o({carpet:{valType:"string",editType:"calc"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../contour/attributes":941,"../heatmap/attributes":998}],964:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc"),a=e("../../lib"),i=e("../heatmap/convert_column_xyz"),o=e("../heatmap/clean_2d_array"),s=e("../heatmap/interp2d"),l=e("../heatmap/find_empties"),u=e("../heatmap/make_bound_array"),c=e("./defaults"),d=e("../carpet/lookup_carpetid"),p=e("../contour/set_contours");t.exports=function(e,t){var r=t._carpetTrace=d(e,t);if(r&&r.visible&&"legendonly"!==r.visible){if(!t.a||!t.b){var h=e.data[r.index],f=e.data[t.index];f.a||(f.a=h.a),f.b||(f.b=h.b),c(f,t,t._defaultColor,e._fullLayout)}var m=function(e,t){var r,c,d,p,h,f,m,g=t._carpetTrace,y=g.aaxis,v=g.baxis;y._minDtick=0,v._minDtick=0,a.isArray1D(t.z)&&i(t,y,v,"a","b",["z"]),r=t._a=t._a||t.a,p=t._b=t._b||t.b,r=r?y.makeCalcdata(t,"_a"):[],p=p?v.makeCalcdata(t,"_b"):[],c=t.a0||0,d=t.da||1,h=t.b0||0,f=t.db||1,m=t._z=o(t._z||t.z,t.transpose),t._emptypoints=l(m),s(m,t._emptypoints);var _=a.maxRowLength(m),b="scaled"===t.xtype?"":r,x=u(t,b,c,d,_,y),w="scaled"===t.ytype?"":p,k=u(t,w,h,f,m.length,v),M={a:x,b:k,z:m};return"levels"===t.contours.type&&"none"!==t.contours.coloring&&n(e,t,{vals:m,containerStr:"",cLetter:"z"}),[M]}(e,t);return p(t,t._z),m}}},{"../../components/colorscale/calc":599,"../../lib":716,"../carpet/lookup_carpetid":914,"../contour/set_contours":960,"../heatmap/clean_2d_array":1e3,"../heatmap/convert_column_xyz":1002,"../heatmap/find_empties":1004,"../heatmap/interp2d":1007,"../heatmap/make_bound_array":1008,"./defaults":965}],965:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../heatmap/xyz_defaults"),i=e("./attributes"),o=e("../contour/constraint_defaults"),s=e("../contour/contours_defaults"),l=e("../contour/style_defaults");t.exports=function(e,t,r,u){function c(r,a){return n.coerce(e,t,i,r,a)}if(c("carpet"),e.a&&e.b){if(!a(e,t,c,u,"a","b"))return void(t.visible=!1);c("text"),"constraint"===c("contours.type")?o(e,t,c,u,r,{hasHover:!1}):(s(e,t,c,(function(r){return n.coerce2(e,t,i,r)})),l(e,t,c,u,{hasHover:!1}))}else t._defaultColor=r,t._length=null}},{"../../lib":716,"../contour/constraint_defaults":946,"../contour/contours_defaults":948,"../contour/style_defaults":962,"../heatmap/xyz_defaults":1012,"./attributes":963}],966:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../contour/colorbar"),calc:e("./calc"),plot:e("./plot"),style:e("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":775,"../contour/colorbar":944,"../contour/style":961,"./attributes":963,"./calc":964,"./defaults":965,"./plot":967}],967:[function(e,t,r){"use strict";var n=e("d3"),a=e("../carpet/map_1d_array"),i=e("../carpet/makepath"),o=e("../../components/drawing"),s=e("../../lib"),l=e("../contour/make_crossings"),u=e("../contour/find_all_paths"),c=e("../contour/plot"),d=e("../contour/constants"),p=e("../contour/convert_to_constraints"),h=e("../contour/empty_pathinfo"),f=e("../contour/close_boundaries"),m=e("../carpet/lookup_carpetid"),g=e("../carpet/axis_aligned_line");function y(e,t,r){var n=e.getPointAtLength(t),a=e.getPointAtLength(r),i=a.x-n.x,o=a.y-n.y,s=Math.sqrt(i*i+o*o);return[i/s,o/s]}function v(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function _(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]);return Math.sqrt(1-r*r)/r}t.exports=function(e,t,r,b){var x=t.xaxis,w=t.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),k=r[0],M=k.trace,T=M._carpetTrace=m(e,M),S=e.calcdata[T.index][0];if(T.visible&&"legendonly"!==T.visible){var C=k.a,L=k.b,A=M.contours,E=h(A,t,k),D="constraint"===A.type,P=A._operation,I=D?"="===P?"lines":"fill":A.coloring,O=[[C[0],L[L.length-1]],[C[C.length-1],L[L.length-1]],[C[C.length-1],L[0]],[C[0],L[0]]];l(E);var F=1e-8*(C[C.length-1]-C[0]),R=1e-8*(L[L.length-1]-L[0]);u(E,F,R);var z,N,B,j,Y=E;"constraint"===A.type&&(Y=p(E,P)),function(e,t){var r,n,a,i,o,s,l,u,c;for(r=0;r=0;j--)z=S.clipsegments[j],N=a([],z.x,x.c2p),B=a([],z.y,w.c2p),N.reverse(),B.reverse(),H.push(i(N,B,z.bicubic));var V="M"+H.join("L")+"Z";!function(e,t,r,n,o,l){var u,c,d,p,h=s.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);h.enter().append("path"),h.exit().remove();var f=[];for(p=0;p=0&&(p=A,f=m):Math.abs(d[1]-p[1])=0&&(p=A,f=m):s.log("endpt to newendpt is not vert. or horz.",d,p,A)}if(f>=0)break;v+=C(d,p),d=p}if(f===t.edgepaths.length){s.log("unclosed perimeter path");break}c=f,(b=-1===_.indexOf(c))&&(c=_[0],v+=C(d,p)+"Z",d=null)}for(c=0;cm&&(n.max=m),n.len=n.max-n.min}function g(e,t){var r,n=0;return(Math.abs(e[0]-l)<.1||Math.abs(e[0]-u)<.1)&&(r=v(a.dxydb_rough(e[0],e[1],.1)),n=Math.max(n,i*_(t,r)/2)),(Math.abs(e[1]-c)<.1||Math.abs(e[1]-d)<.1)&&(r=v(a.dxyda_rough(e[0],e[1],.1)),n=Math.max(n,i*_(t,r)/2)),n}}(this,r,e,n,u,t.height),!(n.len<(t.width+t.height)*d.LABELMIN)))for(var a=Math.min(Math.ceil(n.len/P),d.LABELMAX),i=0;i0?+h[c]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var b=o.extractOpts(t),x=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=x[0][1],k=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(c=1;c")}function c(e){return e+"°"}}(u,c,l[0].t.labels),[s]}}},{"../../lib":716,"../../plots/cartesian/axes":764,"../scattermapbox/hover":1186}],974:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),formatLabels:e("../scattermapbox/format_labels"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover"),eventData:e("./event_data"),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var r=t[0].trace,a=new i(e,r.uid),o=a.sourceId,s=n(t),l=a.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}},{"../../plots/mapbox/constants":817,"./convert":970}],976:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){for(var r=0;r"),s.color=function(e,t){var r=e.marker,a=t.mc||r.color,i=t.mlc||r.line.color,o=t.mlw||r.line.width;return n(a)?a:n(i)&&o?i:void 0}(u,d),[s]}}},{"../../components/color":591,"../../lib":716,"../bar/hover":862}],984:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../bar/select":867,"./attributes":977,"./calc":978,"./cross_trace_calc":980,"./defaults":981,"./event_data":982,"./hover":983,"./layout_attributes":985,"./layout_defaults":986,"./plot":987,"./style":988}],985:[function(e,t,r){"use strict";t.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],986:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){var i=!1;function o(r,i){return n.coerce(e,t,a,r,i)}for(var s=0;s path").each((function(e){if(!e.isBlank){var t=l.marker;n.select(this).call(i.fill,e.mc||t.color).call(i.stroke,e.mlc||t.line.color).call(a.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",l.selectedpoints&&!e.selected?o:1)}})),s(r,l,e),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(i.fill,l.connector.fillcolor)})),r.selectAll(".lines").each((function(){var e=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},{"../../components/color":591,"../../components/drawing":612,"../../constants/interactions":691,"../bar/style":869,d3:164}],989:[function(e,t,r){"use strict";var n=e("../pie/attributes"),a=e("../../plots/attributes"),i=e("../../plots/domain").attributes,o=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../lib/extend").extendFlat;t.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},{"../../lib/extend":707,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/template_attributes":840,"../pie/attributes":1092}],990:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="funnelarea",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],991:[function(e,t,r){"use strict";var n=e("../pie/calc");t.exports={calc:function(e,t){return n.calc(e,t)},crossTraceCalc:function(e){n.crossTraceCalc(e,{type:"funnelarea"})}}},{"../pie/calc":1094}],992:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../plots/domain").defaults,o=e("../bar/defaults").handleText;t.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}var u,c=l("values"),d=n.isArrayOrTypedArray(c),p=l("labels");if(Array.isArray(p)?(u=p.length,d&&(u=Math.min(u,c.length))):d&&(u=c.length,l("label0"),l("dlabel")),u){t._length=u,l("marker.line.width")&&l("marker.line.color",s.paper_bgcolor),l("marker.colors"),l("scalegroup");var h,f=l("text"),m=l("texttemplate");if(m||(h=l("textinfo",Array.isArray(f)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),m||h&&"none"!==h){var g=l("textposition");o(e,t,s,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}i(t,s,l),l("title.text")&&(l("title.position"),n.coerceFont(l,"title.font",s.font)),l("aspectratio"),l("baseratio")}else t.visible=!1}},{"../../lib":716,"../../plots/domain":789,"../bar/defaults":859,"./attributes":989}],993:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style"),styleOne:e("../pie/style_one"),meta:{}}},{"../pie/style_one":1103,"./attributes":989,"./base_plot":990,"./calc":991,"./defaults":992,"./layout_attributes":994,"./layout_defaults":995,"./plot":996,"./style":997}],994:[function(e,t,r){"use strict";var n=e("../pie/layout_attributes").hiddenlabels;t.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":1099}],995:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}},{"../../lib":716,"./layout_attributes":994}],996:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../../lib"),o=e("../../lib/svg_text_utils"),s=e("../bar/plot").toMoveInsideBar,l=e("../pie/helpers"),u=e("../pie/plot"),c=u.attachFxHandlers,d=u.determineInsideTextFont,p=u.layoutAreas,h=u.prerenderTitles,f=u.positionTitleOutside;function m(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}t.exports=function(e,t){var r=e._fullLayout;h(t,e),p(t,r._size),i.makeTraceGroups(r._funnelarealayer,t,"trace").each((function(t){var p=n.select(this),h=t[0],g=h.trace;!function(e){if(e.length){var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i,o,s,l=Math.pow(a,2),u=t.vTotal,c=u,d=u*l/(1-l)/u,p=[];for(p.push(L()),o=e.length-1;o>-1;o--)if(!(s=e[o]).hidden){var h=s.v/c;d+=h,p.push(L())}var f=1/0,m=-1/0;for(o=0;o-1;o--)if(!(s=e[o]).hidden){var S=p[T+=1][0],C=p[T][1];s.TL=[-S,C],s.TR=[S,C],s.BL=k,s.BR=M,s.pxmid=(x=s.TR,w=s.BR,[.5*(x[0]+w[0]),.5*(x[1]+w[1])]),k=s.TL,M=s.TR}}function L(){var e,t={x:e=Math.sqrt(d),y:-e};return[t.x,t.y]}}(t),p.each((function(){var p=n.select(this).selectAll("g.slice").data(t);p.enter().append("g").classed("slice",!0),p.exit().remove(),p.each((function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=g.index;var p=h.cx,f=h.cy,y=n.select(this),v=y.selectAll("path.surface").data([r]);v.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),y.call(c,e,t);var _="M"+(p+r.TR[0])+","+(f+r.TR[1])+m(r.TR,r.BR)+m(r.BR,r.BL)+m(r.BL,r.TL)+"Z";v.attr("d",_),u.formatSliceLabel(e,r,h);var b=l.castOption(g.textposition,r.pts),x=y.selectAll("g.slicetext").data(r.text&&"none"!==b?[0]:[]);x.enter().append("g").classed("slicetext",!0),x.exit().remove(),x.each((function(){var t=i.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)}));t.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,d(g,r,e._fullLayout.font)).call(o.convertToTspans,e);var l,u,c,h=a.bBox(t.node()),m=Math.min(r.BL[1],r.BR[1]),y=Math.max(r.TL[1],r.TR[1]);u=Math.max(r.TL[0],r.BL[0]),c=Math.min(r.TR[0],r.BR[0]),l=i.getTextTransform(s(u,c,m,y,h,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})),t.attr("transform","translate("+p+","+f+")"+l)}))}}));var y=n.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);y.enter().append("g").classed("titletext",!0),y.exit().remove(),y.each((function(){var t=i.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),s=g.title.text;g._meta&&(s=i.templateString(s,g._meta)),t.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,g.title.font).call(o.convertToTspans,e);var l=f(h,r._size);t.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")}))}))}))}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../bar/plot":866,"../pie/helpers":1097,"../pie/plot":1101,d3:164}],997:[function(e,t,r){"use strict";var n=e("d3"),a=e("../pie/style_one");t.exports=function(e){e._fullLayout._funnelarealayer.selectAll(".trace").each((function(e){var t=e[0].trace,r=n.select(this);r.style({opacity:t.opacity}),r.selectAll("path.surface").each((function(e){n.select(this).call(a,e,t)}))}))}},{"../pie/style_one":1103,d3:164}],998:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../components/colorscale/attributes"),o=(e("../../constants/docs").FORMAT_LINK,e("../../lib/extend").extendFlat);t.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},n.x,{impliedEdits:{xtype:"array"}}),x0:o({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},n.y,{impliedEdits:{ytype:"array"}}),y0:o({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},n.dy,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},zhoverformat:{valType:"string",dflt:"",editType:"none"},hovertemplate:a()},{transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":598,"../../constants/docs":687,"../../lib/extend":707,"../../plots/template_attributes":840,"../scatter/attributes":1118}],999:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../histogram2d/calc"),s=e("../../components/colorscale/calc"),l=e("./convert_column_xyz"),u=e("./clean_2d_array"),c=e("./interp2d"),d=e("./find_empties"),p=e("./make_bound_array");t.exports=function(e,t){var r,h,f,m,g,y,v,_,b,x=i.getFromId(e,t.xaxis||"x"),w=i.getFromId(e,t.yaxis||"y"),k=n.traceIs(t,"contour"),M=n.traceIs(t,"histogram"),T=n.traceIs(t,"gl2d"),S=k?"best":t.zsmooth;if(x._minDtick=0,w._minDtick=0,M)r=(b=o(e,t)).x,h=b.x0,f=b.dx,m=b.y,g=b.y0,y=b.dy,v=b.z;else{var C=t.z;a.isArray1D(C)?(l(t,x,w,"x","y",["z"]),r=t._x,m=t._y,C=t._z):(r=t._x=t.x?x.makeCalcdata(t,"x"):[],m=t._y=t.y?w.makeCalcdata(t,"y"):[]),h=t.x0,f=t.dx,g=t.y0,y=t.dy,v=u(C,t,x,w),(k||t.connectgaps)&&(t._emptypoints=d(v),c(v,t._emptypoints))}function L(e){S=t._input.zsmooth=t.zsmooth=!1,a.warn('cannot use zsmooth: "fast": '+e)}if("fast"===S)if("log"===x.type||"log"===w.type)L("log axis found");else if(!M){if(r.length){var A=(r[r.length-1]-r[0])/(r.length-1),E=Math.abs(A/100);for(_=0;_E){L("x scale is not linear");break}}if(m.length&&"fast"===S){var D=(m[m.length-1]-m[0])/(m.length-1),P=Math.abs(D/100);for(_=0;_P){L("y scale is not linear");break}}}var I=a.maxRowLength(v),O="scaled"===t.xtype?"":r,F=p(t,O,h,f,I,x),R="scaled"===t.ytype?"":m,z=p(t,R,g,y,v.length,w);T||(t._extremes[x._id]=i.findExtremes(x,F),t._extremes[w._id]=i.findExtremes(w,z));var N={x:F,y:z,z:v,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(O&&O.length===F.length-1&&(N.xCenter=O),R&&R.length===z.length-1&&(N.yCenter=R),M&&(N.xRanges=b.xRanges,N.yRanges=b.yRanges,N.pts=b.pts),k||s(e,t,{vals:v,cLetter:"z"}),k&&t.contours&&"heatmap"===t.contours.coloring){var B={type:"contour"===t.type?"heatmap":"histogram2d",xcalendar:t.xcalendar,ycalendar:t.ycalendar};N.xfill=p(B,O,h,f,I,x),N.yfill=p(B,R,g,y,v.length,w)}return[N]}},{"../../components/colorscale/calc":599,"../../lib":716,"../../plots/cartesian/axes":764,"../../registry":845,"../histogram2d/calc":1030,"./clean_2d_array":1e3,"./convert_column_xyz":1002,"./find_empties":1004,"./interp2d":1007,"./make_bound_array":1008}],1e3:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r,o){var s,l,u,c,d,p;function h(e){if(n(e))return+e}if(t&&t.transpose){for(s=0,d=0;d=0;o--)(s=((d[[(r=(i=p[o])[0])-1,a=i[1]]]||m)[2]+(d[[r+1,a]]||m)[2]+(d[[r,a-1]]||m)[2]+(d[[r,a+1]]||m)[2])/20)&&(l[i]=[r,a,s],p.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(i in l)d[i]=l[i],c.push(l[i])}return c.sort((function(e,t){return t[2]-e[2]}))}},{"../../lib":716}],1005:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../components/colorscale").extractOpts;t.exports=function(e,t,r,s,l,u){var c,d,p,h,f=e.cd[0],m=f.trace,g=e.xa,y=e.ya,v=f.x,_=f.y,b=f.z,x=f.xCenter,w=f.yCenter,k=f.zmask,M=m.zhoverformat,T=v,S=_;if(!1!==e.index){try{p=Math.round(e.index[1]),h=Math.round(e.index[0])}catch(t){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(p<0||p>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(t-v[0],t-v[v.length-1],0)>0||n.inbox(r-_[0],r-_[_.length-1],0)>0)return;if(u){var C;for(T=[2*v[0]-v[1]],C=1;Cm&&(y=Math.max(y,Math.abs(e[i][o]-f)/(g-m))))}return y}t.exports=function(e,t){var r,a=1;for(o(e,t),r=0;r.01;r++)a=o(e,t,i(a));return a>.01&&n.log("interp2d didn't converge quickly",a),e}},{"../../lib":716}],1008:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,i,o,s){var l,u,c,d=[],p=n.traceIs(e,"contour"),h=n.traceIs(e,"histogram"),f=n.traceIs(e,"gl2d");if(a(t)&&t.length>1&&!h&&"category"!==s.type){var m=t.length;if(!(m<=o))return p?t.slice(0,o):t.slice(0,o+1);if(p||f)d=t.slice(0,o);else if(1===o)d=[t[0]-.5,t[0]+.5];else{for(d=[1.5*t[0]-.5*t[1]],c=1;c0;)p=h.c2p(k[v]),v--;for(p0;)y=f.c2p(M[v]),v--;if(y0&&(i=!0);for(var l=0;li){var o=i-r[e];return r[e]=i,o}}return 0},max:function(e,t,r,a){var i=a[t];if(n(i)){if(i=Number(i),!n(r[e]))return r[e]=i,i;if(r[e]u?e>o?e>1.1*a?a:e>1.1*i?i:o:e>s?s:e>l?l:u:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function h(e,t,r,n,i,s){if(n&&e>o){var l=f(t,i,s),u=f(r,i,s),c=e===a?0:1;return l[c]!==u[c]}return Math.floor(r/e)-Math.floor(t/e)>.1}function f(e,t,r){var n=t.c2d(e,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(e,t,r,n,i){var s,l,u=-1.1*t,p=-.1*t,h=e-p,f=r[0],m=r[1],g=Math.min(d(f+p,f+h,n,i),d(m+p,m+h,n,i)),y=Math.min(d(f+u,f+p,n,i),d(m+u,m+p,n,i));if(g>y&&yo){var v=s===a?1:6,_=s===a?"M12":"M1";return function(t,r){var o=n.c2d(t,a,i),s=o.indexOf("-",v);s>0&&(o=o.substr(0,s));var u=n.d2c(o,0,i);if(ur.r2l(N)&&(j=o.tickIncrement(j,b.size,!0,h)),O.start=r.l2r(j),z||a.nestedProperty(t,y+".start").set(O.start)}var Y=b.end,H=r.r2l(I.end),V=void 0!==H;if((b.endFound||V)&&H!==r.r2l(Y)){var U=V?H:a.aggNums(Math.max,null,f);O.end=r.l2r(U),V||a.nestedProperty(t,y+".start").set(O.end)}var W="autobin"+s;return!1===t._input[W]&&(t._input[y]=a.extendFlat({},t[y]||{}),delete t._input[W],delete t[W]),[O,f]}t.exports={calc:function(e,t){var r,i,h,f,m=[],g=[],y=o.getFromId(e,"h"===t.orientation?t.yaxis:t.xaxis),v="h"===t.orientation?"y":"x",_={x:"y",y:"x"}[v],b=t[v+"calendar"],x=t.cumulative,w=p(e,t,y,v),k=w[0],M=w[1],T="string"==typeof k.size,S=[],C=T?S:k,L=[],A=[],E=[],D=0,P=t.histnorm,I=t.histfunc,O=-1!==P.indexOf("density");x.enabled&&O&&(P=P.replace(/ ?density$/,""),O=!1);var F,R="max"===I||"min"===I?null:0,z=l.count,N=u[P],B=!1,j=function(e){return y.r2c(e,0,b)};for(a.isArrayOrTypedArray(t[_])&&"count"!==I&&(F=t[_],B="avg"===I,z=l[I]),r=j(k.start),h=j(k.end)+(r-o.tickIncrement(r,k.size,!1,b))/1e6;r=0&&f=0;n--)s(n);else if("increasing"===t){for(n=1;n=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(g,x.direction,x.currentbin);var K=Math.min(m.length,g.length),Z=[],X=0,J=K-1;for(r=0;r=X;r--)if(g[r]){J=r;break}for(r=X;r<=J;r++)if(n(m[r])&&n(g[r])){var $={p:m[r],s:g[r],b:0};x.enabled||($.pts=E[r],V?$.ph0=$.ph1=E[r].length?M[E[r][0]]:m[r]:($.ph0=Y(S[r]),$.ph1=Y(S[r+1],!0))),Z.push($)}return 1===Z.length&&(Z[0].width1=o.tickIncrement(Z[0].p,k.size,!1,b)-Z[0].p),s(Z,t),a.isArrayOrTypedArray(t.selectedpoints)&&a.tagSelected(Z,t,q),Z},calcAllAutoBins:p}},{"../../lib":716,"../../plots/cartesian/axes":764,"../../registry":845,"../bar/arrays_to_calcdata":854,"./average":1017,"./bin_functions":1019,"./bin_label_vals":1020,"./norm_functions":1028,"fast-isnumeric":227}],1022:[function(e,t,r){"use strict";t.exports={eventDataKeys:["binNumber"]}},{}],1023:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axis_ids"),i=e("../../registry").traceIs,o=e("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=a.getAxisGroup,u=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],c=["x","y"];t.exports=function(e,t){var r,d,p,h,f,m,g,y=t._histogramBinOpts={},v=[],_={},b=[];function x(e,t){return n.coerce(r._input,r,r._module.attributes,e,t)}function w(e){return"v"===e.orientation?"x":"y"}function k(e,r,i){var o=e.uid+"__"+i;r||(r=o);var s=function(e,r){return a.getFromTrace({_fullLayout:t},e,r).type}(e,i),l=e[i+"calendar"],u=y[r],c=!0;u&&(s===u.axType&&l===u.calendar?(c=!1,u.traces.push(e),u.dirs.push(i)):(r=o,s!==u.axType&&n.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+s,"axis","with bins on","type:"+u.axType,"axis."].join(" ")),l!==u.calendar&&n.warn(["Attempted to group the bins of trace",e.index,"set with a",l,"calendar","with bins",u.calendar?"on a "+u.calendar+" calendar":"w/o a set calendar"].join(" ")))),c&&(y[r]={traces:[e],dirs:[i],axType:s,calendar:e[i+"calendar"]||""}),e["_"+i+"bingroup"]=r}for(f=0;fC&&k.splice(C,k.length-C),S.length>C&&S.splice(C,S.length-C);var L=[],A=[],E=[],D="string"==typeof w.size,P="string"==typeof T.size,I=[],O=[],F=D?I:w,R=P?O:T,z=0,N=[],B=[],j=t.histnorm,Y=t.histfunc,H=-1!==j.indexOf("density"),V="max"===Y||"min"===Y?null:0,U=i.count,W=o[j],q=!1,G=[],K=[],Z="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";Z&&"count"!==Y&&(q="avg"===Y,U=i[Y]);var X=w.size,J=_(w.start),$=_(w.end)+(J-a.tickIncrement(J,X,!1,y))/1e6;for(r=J;r<$;r=a.tickIncrement(r,X,!1,y))A.push(V),I.push(r),q&&E.push(0);I.push(r);var Q,ee=A.length,te=(r-J)/ee,re=(Q=J+te/2,m.c2r(Q,0,y)),ne=T.size,ae=b(T.start),ie=b(T.end)+(ae-a.tickIncrement(ae,ne,!1,v))/1e6;for(r=ae;r=0&&h=0&&f0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var c=Math.floor((t-o.x0)/s.dx),d=Math.floor(Math.abs(r-o.y0)/s.dy);if(o.z[d][c]){var p,h=o.hi||s.hoverinfo;if(h){var f=h.split("+");-1!==f.indexOf("all")&&(f=["color"]),-1!==f.indexOf("color")&&(p=!0)}var m,g=s.colormodel,y=g.length,v=s._scaler(o.z[d][c]),_=i.colormodel[g].suffix,b=[];(s.hovertemplate||p)&&(b.push("["+[v[0]+_[0],v[1]+_[1],v[2]+_[2]].join(", ")),4===y&&b.push(", "+v[3]+_[3]),b.push("]"),b=b.join(""),e.extraText=g.toUpperCase()+": "+b),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[d])?m=s.hovertext[d][c]:Array.isArray(s.text)&&Array.isArray(s.text[d])&&(m=s.text[d][c]);var x=u.c2p(o.y0+(d+.5)*s.dy),w=o.x0+(c+.5)*s.dx,k=o.y0+(d+.5)*s.dy,M="["+o.z[d][c].slice(0,s.colormodel.length).join(", ")+"]";return[a.extendFlat(e,{index:[d,c],x0:l.c2p(o.x0+c*s.dx),x1:l.c2p(o.x0+(c+1)*s.dx),y0:x,y1:x,color:v,xVal:w,xLabelVal:w,yVal:k,yLabelVal:k,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:b,"color[0]Label":v[0]+_[0],"color[1]Label":v[1]+_[1],"color[2]Label":v[2]+_[2],"color[3]Label":v[3]+_[3]}})]}}}},{"../../components/fx":629,"../../lib":716,"./constants":1040}],1044:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover"),eventData:e("./event_data"),moduleType:"trace",name:"image",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":775,"./attributes":1038,"./calc":1039,"./defaults":1041,"./event_data":1042,"./hover":1043,"./plot":1045,"./style":1046}],1045:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../constants/xmlns_namespaces"),o=e("./constants");t.exports=function(e,t,r,s){var l=t.xaxis,u=t.yaxis;a.makeTraceGroups(s,r,"im").each((function(e){var t,r,s,c,d,p,h=n.select(this),f=e[0],m=f.trace,g=f.z,y=f.x0,v=f.y0,_=f.w,b=f.h,x=m.dx,w=m.dy;for(p=0;void 0===t&&p<_;)t=l.c2p(y+p*x),p++;for(p=_;void 0===r&&p>0;)r=l.c2p(y+p*x),p--;for(p=0;void 0===c&&p0;)d=u.c2p(v+p*w),p--;r0}function _(e){e.each((function(e){f.stroke(n.select(this),e.line.color)})).each((function(e){f.fill(n.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function b(e,t,r){var n=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,h,e,t)}return d(i,o,l,s,n),p(i,o,l,s),o}function x(e,t){return"translate("+e+","+t+")"}function w(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function k(e,t,r,a){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(i);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(u.convertToTspans,a).call(s.font,t),s.bBox(o.node())}function M(e,t,r,n,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=a.aggNums(o,null,[e[s].value,n],2);return e[s].value=l,l}t.exports=function(e,t,r,d){var p,h=e._fullLayout;v(r)&&d&&(p=d()),a.makeTraceGroups(h._indicatorlayer,t,"trace").each((function(t){var d,T,S,C,L,A=t[0].trace,E=n.select(this),D=A._hasGauge,P=A._isAngular,I=A._isBullet,O=A.domain,F={w:h._size.w*(O.x[1]-O.x[0]),h:h._size.h*(O.y[1]-O.y[0]),l:h._size.l+h._size.w*O.x[0],r:h._size.r+h._size.w*(1-O.x[1]),t:h._size.t+h._size.h*(1-O.y[1]),b:h._size.b+h._size.h*O.y[0]},R=F.l+F.w/2,z=F.t+F.h/2,N=Math.min(F.w/2,F.h),B=l.innerRadius*N,j=A.align||"center";if(T=z,D){if(P&&(d=R,T=z+N/2,S=function(e){return function(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height);return[t/r,e,t]}(e,.9*B)}),I){var Y=l.bulletPadding,H=1-l.bulletNumberDomainSize+Y;d=F.l+(H+(1-H)*g[j])*F.w,S=function(e){return w(e,(l.bulletNumberDomainSize-Y)*F.w,F.h)}}}else d=F.l+g[j]*F.w,S=function(e){return w(e,F.w,F.h)};!function(e,t,r,i){var o,l,d,p=r[0].trace,h=i.numbersX,_=i.numbersY,w=p.align||"center",T=m[w],S=i.transitionOpts,C=i.onComplete,L=a.ensureSingle(t,"g","numbers"),A=[];p._hasNumber&&A.push("number"),p._hasDelta&&(A.push("delta"),"left"===p.delta.position&&A.reverse());var E=L.selectAll("text").data(A);function D(t,r,n,a){if(!t.match("s")||n>=0==a>=0||r(n).slice(-1).match(y)||r(a).slice(-1).match(y))return r;var i=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),o=b(e,{tickformat:i});return function(e){return Math.abs(e)<1?c.tickText(o,e).text:r(e)}}E.enter().append("text"),E.attr("text-anchor",(function(){return T})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),E.exit().remove();var P,I=p.mode+p.align;if(p._hasDelta&&(P=function(){var t=b(e,{tickformat:p.delta.valueformat},p._range);t.setScale(),c.prepTicks(t);var a=function(e){return c.tickText(t,e).text},i=function(e){return p.delta.relative?e.relativeDelta:e.delta},o=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?p.delta.increasing.symbol:p.delta.decreasing.symbol)+t(e)},d=function(e){return e.delta>=0?p.delta.increasing.color:p.delta.decreasing.color};void 0===p._deltaLastValue&&(p._deltaLastValue=i(r[0]));var h=L.select("text.delta");function m(){h.text(o(i(r[0]),a)).call(f.fill,d(r[0])).call(u.convertToTspans,e)}return h.call(s.font,p.delta.font).call(f.fill,d({delta:p._deltaLastValue})),v(S)?h.transition().duration(S.duration).ease(S.easing).tween("text",(function(){var e=n.select(this),t=i(r[0]),s=p._deltaLastValue,l=D(p.delta.valueformat,a,s,t),u=n.interpolateNumber(s,t);return p._deltaLastValue=t,function(t){e.text(o(u(t),l)),e.call(f.fill,d({delta:u(t)}))}})).each("end",(function(){m(),C&&C()})).each("interrupt",(function(){m(),C&&C()})):m(),l=k(o(i(r[0]),a),p.delta.font,T,e),h}(),I+=p.delta.position+p.delta.font.size+p.delta.font.family+p.delta.valueformat,I+=p.delta.increasing.symbol+p.delta.decreasing.symbol,d=l),p._hasNumber&&(function(){var t=b(e,{tickformat:p.number.valueformat},p._range);t.setScale(),c.prepTicks(t);var a=function(e){return c.tickText(t,e).text},i=p.number.suffix,l=p.number.prefix,d=L.select("text.number");function h(){var t="number"==typeof r[0].y?l+a(r[0].y)+i:"-";d.text(t).call(s.font,p.number.font).call(u.convertToTspans,e)}v(S)?d.transition().duration(S.duration).ease(S.easing).each("end",(function(){h(),C&&C()})).each("interrupt",(function(){h(),C&&C()})).attrTween("text",(function(){var e=n.select(this),t=n.interpolateNumber(r[0].lastY,r[0].y);p._lastValue=r[0].y;var o=D(p.number.valueformat,a,r[0].lastY,r[0].y);return function(r){e.text(l+o(t(r))+i)}})):h(),o=k(l+a(r[0].y)+i,p.number.font,T,e)}(),I+=p.number.font.size+p.number.font.family+p.number.valueformat+p.number.suffix+p.number.prefix,d=o),p._hasDelta&&p._hasNumber){var O,F,R=[(o.left+o.right)/2,(o.top+o.bottom)/2],z=[(l.left+l.right)/2,(l.top+l.bottom)/2],N=.75*p.delta.font.size;"left"===p.delta.position&&(O=M(p,"deltaPos",0,-1*(o.width*g[p.align]+l.width*(1-g[p.align])+N),I,Math.min),F=R[1]-z[1],d={width:o.width+l.width+N,height:Math.max(o.height,l.height),left:l.left+O,right:o.right,top:Math.min(o.top,l.top+F),bottom:Math.max(o.bottom,l.bottom+F)}),"right"===p.delta.position&&(O=M(p,"deltaPos",0,o.width*(1-g[p.align])+l.width*g[p.align]+N,I,Math.max),F=R[1]-z[1],d={width:o.width+l.width+N,height:Math.max(o.height,l.height),left:o.left,right:l.right+O,top:Math.min(o.top,l.top+F),bottom:Math.max(o.bottom,l.bottom+F)}),"bottom"===p.delta.position&&(O=null,F=l.height,d={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height,bottom:o.bottom+l.height}),"top"===p.delta.position&&(O=null,F=o.top,d={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height-l.height,bottom:o.bottom}),P.attr({dx:O,dy:F})}(p._hasNumber||p._hasDelta)&&L.attr("transform",(function(){var e=i.numbersScaler(d);I+=e[2];var t,r=M(p,"numbersScale",1,e[0],I,Math.min);p._scaleNumbers||(r=1),t=p._isAngular?_-r*d.bottom:_-r*(d.top+d.bottom)/2,p._numbersTop=r*d.top+t;var n=d[w];"center"===w&&(n=(d.left+d.right)/2);var a=h-r*n;return x(a=M(p,"numbersTranslate",0,a,I,Math.max),t)+" scale("+r+")"}))}(e,E,t,{numbersX:d,numbersY:T,numbersScaler:S,transitionOpts:r,onComplete:p}),D&&(C={range:A.gauge.axis.range,color:A.gauge.bgcolor,line:{color:A.gauge.bordercolor,width:0},thickness:1},L={range:A.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:A.gauge.bordercolor,width:A.gauge.borderwidth},thickness:1});var V=E.selectAll("g.angular").data(P?t:[]);V.exit().remove();var U=E.selectAll("g.angularaxis").data(P?t:[]);U.exit().remove(),P&&function(e,t,r,a){var s,l,u,d,p=r[0].trace,h=a.size,f=a.radius,m=a.innerRadius,g=a.gaugeBg,y=a.gaugeOutline,w=[h.l+h.w/2,h.t+h.h/2+f/2],k=a.gauge,M=a.layer,T=a.transitionOpts,S=a.onComplete,C=Math.PI/2;function L(e){var t=p.gauge.axis.range[0],r=(e-t)/(p.gauge.axis.range[1]-t)*Math.PI-C;return r<-C?-C:r>C?C:r}function A(e){return n.svg.arc().innerRadius((m+f)/2-e/2*(f-m)).outerRadius((m+f)/2+e/2*(f-m)).startAngle(-C)}function E(e){e.attr("d",(function(e){return A(e.thickness).startAngle(L(e.range[0])).endAngle(L(e.range[1]))()}))}k.enter().append("g").classed("angular",!0),k.attr("transform",x(w[0],w[1])),M.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),M.selectAll("g.xangularaxistick,path,text").remove(),(s=b(e,p.gauge.axis)).type="linear",s.range=p.gauge.axis.range,s._id="xangularaxis",s.setScale();var D=function(e){return(s.range[0]-e.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},P={},I=c.makeLabelFns(s,0).labelStandoff;P.xFn=function(e){var t=D(e);return Math.cos(t)*I},P.yFn=function(e){var t=D(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(I+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*o)},P.anchorFn=function(e){var t=D(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},P.heightFn=function(e,t,r){var n=D(e);return-.5*(1+Math.sin(n))*r};var O=function(e){return x(w[0]+f*Math.cos(e),w[1]-f*Math.sin(e))};if(u=function(e){return O(D(e))},l=c.calcTicks(s),d=c.getTickSigns(s)[2],s.visible){d="inside"===s.ticks?-1:1;var F=(s.linewidth||1)/2;c.drawTicks(e,s,{vals:l,layer:M,path:"M"+d*F+",0h"+d*s.ticklen,transFn:function(e){var t=D(e);return O(t)+"rotate("+-i(t)+")"}}),c.drawLabels(e,s,{vals:l,layer:M,transFn:u,labelFns:P})}var R=[g].concat(p.gauge.steps),z=k.selectAll("g.bg-arc").data(R);z.enter().append("g").classed("bg-arc",!0).append("path"),z.select("path").call(E).call(_),z.exit().remove();var N=A(p.gauge.bar.thickness),B=k.selectAll("g.value-arc").data([p.gauge.bar]);B.enter().append("g").classed("value-arc",!0).append("path");var j,Y,H,V=B.select("path");v(T)?(V.transition().duration(T.duration).ease(T.easing).each("end",(function(){S&&S()})).each("interrupt",(function(){S&&S()})).attrTween("d",(j=N,Y=L(r[0].lastY),H=L(r[0].y),function(){var e=n.interpolate(Y,H);return function(t){return j.endAngle(e(t))()}})),p._lastValue=r[0].y):V.attr("d","number"==typeof r[0].y?N.endAngle(L(r[0].y)):"M0,0Z"),V.call(_),B.exit().remove(),R=[];var U=p.gauge.threshold.value;U&&R.push({range:[U,U],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var W=k.selectAll("g.threshold-arc").data(R);W.enter().append("g").classed("threshold-arc",!0).append("path"),W.select("path").call(E).call(_),W.exit().remove();var q=k.selectAll("g.gauge-outline").data([y]);q.enter().append("g").classed("gauge-outline",!0).append("path"),q.select("path").call(E).call(_),q.exit().remove()}(e,0,t,{radius:N,innerRadius:B,gauge:V,layer:U,size:F,gaugeBg:C,gaugeOutline:L,transitionOpts:r,onComplete:p});var W=E.selectAll("g.bullet").data(I?t:[]);W.exit().remove();var q=E.selectAll("g.bulletaxis").data(I?t:[]);q.exit().remove(),I&&function(e,t,r,n){var a,i,o,s,u,d=r[0].trace,p=n.gauge,h=n.layer,m=n.gaugeBg,g=n.gaugeOutline,y=n.size,x=d.domain,w=n.transitionOpts,k=n.onComplete;p.enter().append("g").classed("bullet",!0),p.attr("transform","translate("+y.l+", "+y.t+")"),h.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),h.selectAll("g.xbulletaxistick,path,text").remove();var M=y.h,T=d.gauge.bar.thickness*M,S=x.x[0],C=x.x[0]+(x.x[1]-x.x[0])*(d._hasNumber||d._hasDelta?1-l.bulletNumberDomainSize:1);function L(e){e.attr("width",(function(e){return Math.max(0,a.c2p(e.range[1])-a.c2p(e.range[0]))})).attr("x",(function(e){return a.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*M})).attr("height",(function(e){return e.thickness*M}))}(a=b(e,d.gauge.axis))._id="xbulletaxis",a.domain=[S,C],a.setScale(),i=c.calcTicks(a),o=c.makeTransFn(a),s=c.getTickSigns(a)[2],u=y.t+y.h,a.visible&&(c.drawTicks(e,a,{vals:"inside"===a.ticks?c.clipEnds(a,i):i,layer:h,path:c.makeTickPath(a,u,s),transFn:o}),c.drawLabels(e,a,{vals:i,layer:h,transFn:o,labelFns:c.makeLabelFns(a,u)}));var A=[m].concat(d.gauge.steps),E=p.selectAll("g.bg-bullet").data(A);E.enter().append("g").classed("bg-bullet",!0).append("rect"),E.select("rect").call(L).call(_),E.exit().remove();var D=p.selectAll("g.value-bullet").data([d.gauge.bar]);D.enter().append("g").classed("value-bullet",!0).append("rect"),D.select("rect").attr("height",T).attr("y",(M-T)/2).call(_),v(w)?D.select("rect").transition().duration(w.duration).ease(w.easing).each("end",(function(){k&&k()})).each("interrupt",(function(){k&&k()})).attr("width",Math.max(0,a.c2p(Math.min(d.gauge.axis.range[1],r[0].y)))):D.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,a.c2p(Math.min(d.gauge.axis.range[1],r[0].y))):0),D.exit().remove();var P=r.filter((function(){return d.gauge.threshold.value})),I=p.selectAll("g.threshold-bullet").data(P);I.enter().append("g").classed("threshold-bullet",!0).append("line"),I.select("line").attr("x1",a.c2p(d.gauge.threshold.value)).attr("x2",a.c2p(d.gauge.threshold.value)).attr("y1",(1-d.gauge.threshold.thickness)/2*M).attr("y2",(1-(1-d.gauge.threshold.thickness)/2)*M).call(f.stroke,d.gauge.threshold.line.color).style("stroke-width",d.gauge.threshold.line.width),I.exit().remove();var O=p.selectAll("g.gauge-outline").data([g]);O.enter().append("g").classed("gauge-outline",!0).append("rect"),O.select("rect").call(L).call(_),O.exit().remove()}(e,0,t,{gauge:W,layer:q,size:F,gaugeBg:C,gaugeOutline:L,transitionOpts:r,onComplete:p});var G=E.selectAll("text.title").data(t);G.exit().remove(),G.enter().append("text").classed("title",!0),G.attr("text-anchor",(function(){return I?m.right:m[A.title.align]})).text(A.title.text).call(s.font,A.title.font).call(u.convertToTspans,e),G.attr("transform",(function(){var e,t=F.l+F.w*g[A.title.align],r=l.titlePadding,n=s.bBox(G.node());return D?(P&&(e=A.gauge.axis.visible?s.bBox(U.node()).top-r-n.bottom:F.t+F.h/2-N/2-n.bottom-r),I&&(e=T-(n.top+n.bottom)/2,t=F.l-l.bulletPadding*F.w)):e=A._numbersTop-r-n.bottom,x(t,e)}))}))}},{"../../components/color":591,"../../components/drawing":612,"../../constants/alignment":685,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../plots/cartesian/axis_defaults":766,"../../plots/cartesian/layout_attributes":776,"../../plots/cartesian/position_defaults":779,"./constants":1050,d3:164}],1054:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../mesh3d/attributes"),o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l=e("../../plot_api/edit_types").overrideAll,u=t.exports=l(s({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a()},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../../plots/template_attributes":840,"../mesh3d/attributes":1059}],1055:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length);for(var r=1/0,a=-1/0,i=t.value.length,o=0;o0;r--){var n=Math.min(t[r],t[r-1]),a=Math.max(t[r],t[r-1]);if(a>n&&n-1}function F(e,t){return null===e?t:e}function R(t,r,n){A();var a,i,o,s=[r],l=[n];if(k>=1)s=[r],l=[n];else if(k>0){var u=function(e,t){var r=e[0],n=e[1],a=e[2],i=function(e,t,r){for(var n=[],a=0;a-1?n[h]:L(f,m,g);p[h]=v>-1?v:D(f,m,g,F(t,y))}a=p[0],i=p[1],o=p[2],e._i.push(a),e._j.push(i),e._k.push(o),++d}}function z(e,t,r,n){var a=e[3];an&&(a=n);for(var i=(e[3]-a)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-i)*e[s]+i*t[s];return o}function N(e,t,r){return e>=t&&e<=r}function B(e){var t=.001*(C-S);return e>=S-t&&e<=C+t}function j(t){for(var r=[],n=0;n<4;n++){var a=t[n];r.push([e.x[a],e.y[a],e.z[a],e.value[a]])}return r}var Y=3;function H(e,t,r,n,a,i){i||(i=1),r=[-1,-1,-1];var o=!1,s=[N(t[0][3],n,a),N(t[1][3],n,a),N(t[2][3],n,a)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,r){return B(t[0][3])&&B(t[1][3])&&B(t[2][3])?(R(e,t,r),!0):iMath.abs(k-T)?[M,k]:[k,T];Q(t,L[0],L[1])}}var A=[[Math.min(S,T),Math.max(S,T)],[Math.min(M,C),Math.max(M,C)]];["x","y","z"].forEach((function(t){for(var r=[],n=0;n0&&(u.push(_.id),"x"===t?d.push([_.distRatio,0,0]):"y"===t?d.push([0,_.distRatio,0]):d.push([0,0,_.distRatio]))}else l=ne(1,"x"===t?m-1:"y"===t?g-1:y-1);u.length>0&&(r[a]="x"===t?ee(null,u,i,o,d,r[a]):"y"===t?te(null,u,i,o,d,r[a]):re(null,u,i,o,d,r[a]),a++),l.length>0&&(r[a]="x"===t?Z(null,l,i,o,r[a]):"y"===t?X(null,l,i,o,r[a]):J(null,l,i,o,r[a]),a++)}var b=e.caps[t];b.show&&b.fill&&(I(b.fill),r[a]="x"===t?Z(null,[0,m-1],i,o,r[a]):"y"===t?X(null,[0,g-1],i,o,r[a]):J(null,[0,y-1],i,o,r[a]),a++)}})),0===d&&E(),e._x=_,e._y=b,e._z=x,e._intensity=w,e._Xs=p,e._Ys=h,e._Zs=f}(),e}p.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._x[t],n=this.data._y[t],a=this.data._z[t],i=this.data._Ys.length,o=this.data._Zs.length,s=c(r,this.data._Xs).id,l=c(n,this.data._Ys).id,u=c(a,this.data._Zs).id,d=e.index=u+o*l+o*i*s;e.traceCoordinate=[this.data._x[d],this.data._y[d],this.data._z[d],this.data.value[d]];var p=this.data.hovertext||this.data.text;return Array.isArray(p)&&void 0!==p[d]?e.textLabel=p[d]:p&&(e.textLabel=p),!0}},p.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,n){return t.map((function(t){return e.d2l(t,0,n)*r}))}this.data=h(e);var a={positions:l(n(r.xaxis,e._x,t.dataScale[0],e.xcalendar),n(r.yaxis,e._y,t.dataScale[1],e.ycalendar),n(r.zaxis,e._z,t.dataScale[2],e.zcalendar)),cells:l(e._i,e._j,e._k),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:o(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=s(e);a.vertexIntensity=e._intensity,a.vertexIntensityBounds=[u.min,u.max],a.colormap=i(e),this.mesh.update(a)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports={findNearestOnAxis:c,generateIsoMeshes:h,createIsosurfaceTrace:function(e,t){var r=e.glplot.gl,a=n({gl:r}),i=new d(e,a,t.uid);return a._trace=i,i.update(t),e.glplot.add(a),i}}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gl_format_color":713,"../../lib/str2rgbarray":739,"../../plots/gl3d/zip3":815,"gl-mesh3d":282}],1057:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("../../components/colorscale/defaults");function s(e,t,r,n,i){var s=i("isomin"),l=i("isomax");null!=l&&null!=s&&s>l&&(t.isomin=null,t.isomax=null);var u=i("x"),c=i("y"),d=i("z"),p=i("value");u&&u.length&&c&&c.length&&d&&d.length&&p&&p.length?(a.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),["x","y","z"].forEach((function(e){var t="caps."+e;i(t+".show")&&i(t+".fill");var r="slices."+e;i(r+".show")&&(i(r+".fill"),i(r+".locations"))})),i("spaceframe.show")&&i("spaceframe.fill"),i("surface.show")&&(i("surface.count"),i("surface.fill"),i("surface.pattern")),i("contour.show")&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(e){i(e)})),o(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}t.exports={supplyDefaults:function(e,t,r,a){s(e,t,0,a,(function(r,a){return n.coerce(e,t,i,r,a)}))},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":601,"../../lib":716,"../../registry":845,"./attributes":1054}],1058:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,calc:e("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e("../../plots/gl3d"),categories:["gl3d"],meta:{}}},{"../../plots/gl3d":804,"./attributes":1054,"./calc":1055,"./convert":1056,"./defaults":1057}],1059:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../surface/attributes"),o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat;t.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},i.contours.x.show,{}),color:i.contours.x.color,width:i.contours.x.width,editType:"calc"},lightposition:{x:s({},i.lightposition.x,{dflt:1e5}),y:s({},i.lightposition.y,{dflt:1e5}),z:s({},i.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},i.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"})})},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../surface/attributes":1240}],1060:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){t.intensity&&n(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":599}],1061:[function(e,t,r){"use strict";var n=e("gl-mesh3d"),a=e("delaunay-triangulate"),i=e("alpha-shape"),o=e("convex-hull"),s=e("../../lib/gl_format_color").parseColorScale,l=e("../../lib/str2rgbarray"),u=e("../../components/colorscale").extractOpts,c=e("../../plots/gl3d/zip3");function d(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p=d.prototype;function h(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}p.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},p.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n,d=e.x.length,p=c(f(r.xaxis,e.x,t.dataScale[0],e.xcalendar),f(r.yaxis,e.y,t.dataScale[1],e.ycalendar),f(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,d)||!g(e.j,d)||!g(e.k,d))return;n=c(m(e.i),m(e.j),m(e.k))}else n=0===e.alphahull?o(p):e.alphahull>0?i(e.alphahull,p):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],i=t.length,o=0;og):m=k>b,g=k;var M=l(b,x,w,k);M.pos=_,M.yc=(b+k)/2,M.i=v,M.dir=m?"increasing":"decreasing",M.x=M.pos,M.y=[w,x],h&&(M.tx=t.text[v]),f&&(M.htx=t.hovertext[v]),y.push(M)}else y.push({pos:_,empty:!0})}return t._extremes[s._id]=i.findExtremes(s,n.concat(d,c),{padded:!0}),y.length&&(y[0].t={labels:{open:a(e,"open:")+" ",high:a(e,"high:")+" ",low:a(e,"low:")+" ",close:a(e,"close:")+" "}}),y}t.exports={calc:function(e,t){var r=i.getFromId(e,t.xaxis),a=i.getFromId(e,t.yaxis),o=function(e,t,r){var a=r._minDiff;if(!a){var i,o=e._fullData,s=[];for(a=1/0,i=0;i"+u.labels[_]+n.hoverLabelText(s,b):((v=a.extendFlat({},p)).y0=v.y1=x,v.yLabelVal=b,v.yLabel=u.labels[_]+n.hoverLabelText(s,b),v.name="",d.push(v),g[b]=v)}return d}function p(e,t,r,a){var i=e.cd,o=e.ya,l=i[0].trace,d=i[0].t,p=c(e,t,r,a);if(!p)return[];var h=i[p.index],f=p.index=h.i,m=h.dir;function g(e){return d.labels[e]+n.hoverLabelText(o,l[e][f])}var y=h.hi||l.hoverinfo,v=y.split("+"),_="all"===y,b=_||-1!==v.indexOf("y"),x=_||-1!==v.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+u[m]]:[];return x&&s(h,l,w),p.extraText=w.join("
"),p.y0=p.y1=o.c2p(h.yc,!0),[p]}t.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?d(e,t,r,n):p(e,t,r,n)},hoverSplit:d,hoverOnPoints:p}},{"../../components/color":591,"../../components/fx":629,"../../constants/delta.js":686,"../../lib":716,"../../plots/cartesian/axes":764}],1068:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"ohlc",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc").calc,plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select")}},{"../../plots/cartesian":775,"./attributes":1064,"./calc":1065,"./defaults":1066,"./hover":1067,"./plot":1070,"./select":1071,"./style":1072}],1069:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports=function(e,t,r,i){var o=r("x"),s=r("open"),l=r("high"),u=r("low"),c=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x"],i),s&&l&&u&&c){var d=Math.min(s.length,l.length,u.length,c.length);return o&&(d=Math.min(d,a.minRowLength(o))),t._length=d,d}}},{"../../lib":716,"../../registry":845}],1070:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib");t.exports=function(e,t,r,i){var o=t.xaxis,s=t.yaxis;a.makeTraceGroups(i,r,"trace ohlc").each((function(e){var t=n.select(this),r=e[0],i=r.t;if(!0!==r.trace.visible||i.empty)t.remove();else{var l=i.tickLen,u=t.selectAll("path").data(a.identity);u.enter().append("path"),u.exit().remove(),u.attr("d",(function(e){if(e.empty)return"M0,0Z";var t=o.c2p(e.pos,!0),r=o.c2p(e.pos-l,!0),n=o.c2p(e.pos+l,!0);return"M"+r+","+s.c2p(e.o,!0)+"H"+t+"M"+t+","+s.c2p(e.h,!0)+"V"+s.c2p(e.l,!0)+"M"+n+","+s.c2p(e.c,!0)+"H"+t}))}}))}},{"../../lib":716,d3:164}],1071:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=e.cd,a=e.xaxis,i=e.yaxis,o=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;r=e.length)return!1;if(void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(e.map((function(e){return e.displayindex}))))for(t=0;t0;u&&(o="array");var c=r("categoryorder",o);"array"===c?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),u||"array"!==c||(t.categoryorder="trace")}}t.exports=function(e,t,r,d){function p(r,a){return n.coerce(e,t,l,r,a)}var h=s(e,t,{name:"dimensions",handleItemDefaults:c}),f=function(e,t,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(a(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,d,p);o(t,d,p),Array.isArray(h)&&h.length||(t.visible=!1),u(t,h,"values",f),p("hoveron"),p("hovertemplate"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var m={family:d.font.family,size:Math.round(d.font.size),color:d.font.color};n.coerceFont(p,"labelfont",m);var g={family:d.font.family,size:Math.round(d.font.size/1.2),color:d.font.color};n.coerceFont(p,"tickfont",g)}},{"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/domain":789,"../parcoords/merge_length":1089,"./attributes":1073}],1077:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1073,"./base_plot":1074,"./calc":1075,"./defaults":1076,"./plot":1079}],1078:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plot_api/plot_api"),i=e("../../components/fx"),o=e("../../lib"),s=e("../../components/drawing"),l=e("tinycolor2"),u=e("../../lib/svg_text_utils");function c(e,t,r,a){var i=e.map(F.bind(0,t,r)),l=a.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var c=l.selectAll("g.trace.parcats").data(i,d),g=c.enter().append("g").attr("class","trace parcats");c.attr("transform",(function(e){return"translate("+e.x+", "+e.y+")"})),g.append("g").attr("class","paths");var y=c.select("g.paths").selectAll("path.path").data((function(e){return e.paths}),d);y.attr("fill",(function(e){return e.model.color}));var b=y.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(e){return e.model.color})).attr("fill-opacity",0);_(b),y.attr("d",(function(e){return e.svgD})),b.empty()||y.sort(h),y.exit().remove(),y.on("mouseover",f).on("mouseout",m).on("click",v),g.append("g").attr("class","dimensions");var k=c.select("g.dimensions").selectAll("g.dimension").data((function(e){return e.dimensions}),d);k.enter().append("g").attr("class","dimension"),k.attr("transform",(function(e){return"translate("+e.x+", 0)"})),k.exit().remove();var M=k.selectAll("g.category").data((function(e){return e.categories}),d),T=M.enter().append("g").attr("class","category");M.attr("transform",(function(e){return"translate(0, "+e.y+")"})),T.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),x(T);var S=M.selectAll("rect.bandrect").data((function(e){return e.bands}),d);S.each((function(){o.raiseToTop(this)})),S.attr("fill",(function(e){return e.color}));var P=S.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);S.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})).attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"})),w(P),S.exit().remove(),T.append("text").attr("class","catlabel").attr("pointer-events","none");var I=t._fullLayout.paper_bgcolor;M.select("text.catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",I+" -1px 1px 2px, "+I+" 1px 1px 2px, "+I+" 1px -1px 2px, "+I+" -1px -1px 2px").style("fill","rgb(0, 0, 0)").attr("x",(function(e){return p(e)?e.width+5:-5})).attr("y",(function(e){return e.height/2})).text((function(e){return e.model.categoryLabel})).each((function(e){s.font(n.select(this),e.parcatsViewModel.categorylabelfont),u.convertToTspans(n.select(this),t)})),T.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(e){return e.width/2})).attr("y",-5).text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})).each((function(e){s.font(n.select(this),e.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),M.exit().remove(),k.call(n.behavior.drag().origin((function(e){return{x:e.x,y:0}})).on("dragstart",A).on("drag",E).on("dragend",D)),c.each((function(e){e.traceSelection=n.select(this),e.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),c.exit().remove()}function d(e){return e.key}function p(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function h(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),A=n.mouse(d)[0];i.loneHover({trace:p,x:x-f.left+m.left,y:w-f.top+m.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:A1&&u.displayInd===l.dimensions.length-1?(r=o.left,a="left"):(r=o.left+o.width,a="right");var p=s.model.count,h=s.model.categoryLabel,f=p/s.parcatsViewModel.model.count,m={countLabel:p,categoryLabel:h,probabilityLabel:f.toFixed(3)},g=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&g.push(["Count:",m.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&g.push(["P("+m.categoryLabel+"):",m.probabilityLabel].join(" "));var y=g.join("
");return{trace:c,x:r-e.left,y:d-e.top,text:y,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:c.hovertemplate,hovertemplateLabels:m,eventData:[{data:c._input,fullData:c,count:p,category:h,probability:f}]}}function C(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var t,r=e.parcatsViewModel.graphDiv,a=r._fullLayout,s=a._paperdiv.node().getBoundingClientRect(),u=e.parcatsViewModel.hoveron;"color"===u?(function(e){var t=n.select(e).datum(),r=k(t);b(r),r.each((function(){o.raiseToTop(this)})),n.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(this),T(this,"plotly_hover",n.event)):(function(e){n.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=k(e);b(t),t.each((function(){o.raiseToTop(this)}))})),n.select(e.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),M(this,"plotly_hover",n.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===u?t=S(s,this):"color"===u?t=function(e,t){var r,a,i=t.getBoundingClientRect(),o=n.select(t).datum(),s=o.categoryViewModel,u=s.parcatsViewModel,c=u.model.dimensions[s.model.dimensionInd],d=u.trace,p=i.y+i.height/2;u.dimensions.length>1&&c.displayInd===u.dimensions.length-1?(r=i.left,a="left"):(r=i.left+i.width,a="right");var h=s.model.categoryLabel,f=o.parcatsViewModel.model.count,m=0;o.categoryViewModel.bands.forEach((function(e){e.color===o.color&&(m+=e.count)}));var g=s.model.count,y=0;u.pathSelection.each((function(e){e.model.color===o.color&&(y+=e.model.count)}));var v=m/f,_=m/y,b=m/g,x={countLabel:f,categoryLabel:h,probabilityLabel:v.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",x.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color ∩ "+h+"): "+x.probabilityLabel),w.push("P("+h+" | color): "+_.toFixed(3)),w.push("P(color | "+h+"): "+b.toFixed(3)));var k=w.join("
"),M=l.mostReadable(o.color,["black","white"]);return{trace:d,x:r-e.left,y:p-e.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:M,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:x,eventData:[{data:d._input,fullData:d,category:h,count:f,probability:v,categorycount:g,colorcount:y,bandcolorcount:m}]}}(s,this):"dimension"===u&&(t=function(e,t){var r=[];return n.select(t.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){r.push(S(e,this))})),r}(s,this)),t&&i.loneHover(t,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r}))}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(_(t.pathSelection),x(t.dimensionSelection.selectAll("g.category")),w(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),i.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(h),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?T(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event))}function A(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var r=n.mouse(this)[0],a=n.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=a&&a<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.yd.y+d.height/2&&(o.model.displayInd=d.model.displayInd,d.model.displayInd=l),e.dragCategoryDisplayInd=o.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){i.model.dragX=n.event.x;var p=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[a];void 0!==p&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}N(e.parcatsViewModel),z(e.parcatsViewModel),O(e.parcatsViewModel),I(e.parcatsViewModel)}}function D(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var t={},r=P(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),o=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==i[t]}));o&&i.forEach((function(r,n){var a=e.parcatsViewModel.model.dimensions[n].containerInd;t["dimensions["+a+"].displayindex"]=r}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var u=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),c=u.map((function(e){return e.categoryValue})),d=u.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[c],t["dimensions["+e.model.containerInd+"].ticktext"]=[d],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?T(e.potentialClickBand,"plotly_click",n.event.sourceEvent):M(e.potentialClickBand,"plotly_click",n.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,N(e.parcatsViewModel),z(e.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){O(e.parcatsViewModel,!0),I(e.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(e.parcatsViewModel.graphDiv,t,[r])}))}}function P(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;s--)c+="C"+u[s]+","+(t[s+1]+a)+" "+l[s]+","+(t[s]+a)+" "+(e[s]+r[s])+","+(t[s]+a),c+="l-"+r[s]+",0 ";return c+="Z"}function z(e){var t=e.dimensions,r=e.model,n=t.map((function(e){return e.categories.map((function(e){return e.y}))})),a=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),i=e.model.dimensions.map((function(e){return e.displayInd})),o=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function d(e){var t=e.categoryInds.map((function(e,t){return a[t][e]}));return o.map((function(e){return t[e]}))}u.sort((function(t,r){var n=d(t),a=d(r);return"backward"===e.sortpaths&&(n.reverse(),a.reverse()),n.push(t.valueInds[0]),a.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),a.unshift(r.rawColor)),na?1:0}));for(var p=new Array(u.length),h=t[0].model.count,f=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),m=0;m0?f*(y.count/h):0;for(var v,_=new Array(n.length),b=0;b1?(e.width-80-16)/(n-1):0)*a;var i,o,s,l,u,c=[],d=e.model.maxCats,p=t.categories.length,h=t.count,f=e.height-8*(d-1),m=8*(d-p)/2,g=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(g.sort((function(e,t){return e.displayInd-t.displayInd})),u=0;u0?o.count/h*f:0,s={key:o.valueInds[0],model:o,width:16,height:i,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+i+8,c.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:c,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}t.exports=function(e,t,r,n){c(r,e,n,t)}},{"../../components/drawing":612,"../../components/fx":629,"../../lib":716,"../../lib/svg_text_utils":740,"../../plot_api/plot_api":751,d3:164,tinycolor2:535}],1079:[function(e,t,r){"use strict";var n=e("./parcats");t.exports=function(e,t,r,a){var i=e._fullLayout,o=i._paper,s=i._size;n(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,a)}},{"./parcats":1078}],1080:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/layout_attributes"),i=e("../../plots/font_attributes"),o=e("../../plots/domain").attributes,s=e("../../lib/extend").extendFlat,l=e("../../plot_api/plot_template").templatedArray;t.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},a.tickvals,{editType:"plot"}),ticktext:s({},a.ticktext,{editType:"plot"}),tickformat:s({},a.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"}))}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/plot_template":754,"../../plots/cartesian/layout_attributes":776,"../../plots/domain":789,"../../plots/font_attributes":790}],1081:[function(e,t,r){"use strict";var n=e("./constants"),a=e("d3"),i=e("../../lib/gup").keyFun,o=e("../../lib/gup").repeat,s=e("../../lib").sorterAsc,l=n.bar.snapRatio;function u(e,t){return e*(1-l)+t*l}var c=n.bar.snapClose;function d(e,t){return e*(1-c)+t*c}function p(e,t,r,n){if(function(e,t){for(var r=0;r=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var a=e?-1:1,i=0,o=t.length-1;if(a<0){var s=i;i=o,o=s}for(var l=t[i],c=l,p=i;a*pt){p=r;break}}if(i=c,isNaN(i)&&(i=isNaN(d)||isNaN(p)?isNaN(d)?p:d:t-u[d][1]e[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(f,t);m&&(o.interval=l[i],o.intervalPix=f,o.region=m)}}if(e.ordinal&&!o.region){var y=e.unitTickvals,v=e.unitToPaddedPx.invert(t);for(r=0;r=_[0]&&v<=_[1]){o.clickableOrdinalRange=_;break}}}return o}function x(e,t){a.event.sourceEvent.stopPropagation();var r=t.height-a.mouse(e)[1]-2*n.verticalPadding,i=t.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(t.unitToPaddedPx.invert):i.newExtent=[i.startExtent,t.unitToPaddedPx.invert(r)].sort(s),t.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(t),_(e.parentNode)}function w(e,t){var r=b(t,t.height-a.mouse(e)[1]-2*n.verticalPadding),i="crosshair";r.clickableOrdinalRange?i="pointer":r.region&&(i=r.region+"-resize"),a.select(document.body).style("cursor",i)}function k(e){e.on("mousemove",(function(e){a.event.preventDefault(),e.parent.inBrushDrag||w(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(a.behavior.drag().on("dragstart",(function(e){!function(e,t){a.event.sourceEvent.stopPropagation();var r=t.height-a.mouse(e)[1]-2*n.verticalPadding,i=t.unitToPaddedPx.invert(r),o=t.brush,s=b(t,r),l=s.interval,u=o.svgBrush;if(u.wasDragged=!1,u.grabbingBar="ns"===s.region,u.grabbingBar){var c=l.map(t.unitToPaddedPx);u.grabPoint=r-c[0]-n.verticalPadding,u.barLength=c[1]-c[0]}u.clickableOrdinalRange=s.clickableOrdinalRange,u.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(u.stayingIntervals=u.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),u.startExtent=s.region?l["s"===s.region?1:0]:i,t.parent.inBrushDrag=!0,u.brushStartCallback()}(this,e)})).on("drag",(function(e){x(this,e)})).on("dragend",(function(e){!function(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(w(e,t),x(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1,a.event.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!i.wasDragged)return i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,0===i.extent.length&&T(r)):T(r),i.brushCallback(t),_(e.parentNode),void i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||T(r),i.brushCallback(t),u?_(e.parentNode,s):(s(),_(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)})))}function M(e,t){return e[0]-t[0]}function T(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function S(e){for(var t,r=e.slice(),n=[],a=r.shift();a;){for(t=a.slice();(a=r.shift())&&a[0]<=t[1];)t[1]=Math.max(t[1],a[1]);n.push(t)}return n}t.exports={makeBrush:function(e,t,r,n,a,i){var o,l=function(){var e,t,r=[];return{set:function(n){1===(r=n.map((function(e){return e.slice().sort(s)})).sort(M)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),e=S(r),t=r.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return l.set(r),{filter:l,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=a,function(e){var t=e.brush,r=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(t).slice();t.filter.set(r),o()}),brushEndCallback:i}}},ensureAxisBrush:function(e){var t=e.selectAll("."+n.cn.axisBrush).data(o,i);t.enter().append("g").classed(n.cn.axisBrush,!0),function(e){var t=e.selectAll(".background").data(o);t.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),t.call(k).attr("height",(function(e){return e.height-n.verticalPadding}));var r=e.selectAll(".highlight-shadow").data(o);r.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",n.bar.strokeColor).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),r.attr("y1",(function(e){return e.height})).call(v);var a=e.selectAll(".highlight").data(o);a.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),a.attr("y1",(function(e){return e.height})).call(v)}(t)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(s)})),e=t.multiselect?S(e.sort(M)):[e[0]]):e=[e.sort(s)],t.tickvals){var r=t.tickvals.slice().sort(s);if(!(e=e.map((function(e){var t=[p(0,r,e[0],[]),p(1,r,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}},{"../../lib":716,"../../lib/gup":714,"./constants":1084,d3:164}],1082:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plots/get_data").getModuleCalcData,i=e("./plot"),o=e("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(e){var t=a(e.calcdata,"parcoords")[0];t.length&&i(e,t)},r.clean=function(e,t,r,n){var a=n._has&&n._has("parcoords"),i=t._has&&t._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this.toDataURL("image/png");t.append("svg:image").attr({xmlns:o.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},{"../../constants/xmlns_namespaces":693,"../../plots/get_data":799,"./plot":1091,d3:164}],1083:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale"),i=e("../../lib/gup").wrap;t.exports=function(e,t){var r,o;return a.hasColorscale(t,"line")&&n(t.line.color)?(r=t.line.color,o=a.extractOpts(t.line).colorscale,a.calc(e,t,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(e){for(var t=new Array(e),r=0;rd&&(n.log("parcoords traces support up to "+d+" dimensions at the moment"),f.splice(d));var m=s(e,t,{name:"dimensions",layout:l,handleItemDefaults:h}),g=function(e,t,r,o,s){var l=s("line.color",r);if(a(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,l,c);o(t,l,c),Array.isArray(m)&&m.length||(t.visible=!1),p(t,m,"values",g);var y={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(c,"labelfont",y),n.coerceFont(c,"tickfont",y),n.coerceFont(c,"rangefont",y),c("labelangle"),c("labelside")}},{"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/cartesian/axes":764,"../../plots/domain":789,"./attributes":1080,"./axisbrush":1081,"./constants":1084,"./merge_length":1089}],1086:[function(e,t,r){"use strict";var n=e("../../lib").isTypedArray;r.convertTypedArray=function(e){return n(e)?Array.prototype.slice.call(e):e},r.isOrdinal=function(e){return!!e.tickvals},r.isVisible=function(e){return e.visible||!("visible"in e)}},{"../../lib":716}],1087:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":1080,"./base_plot":1082,"./calc":1083,"./defaults":1085,"./plot":1091}],1088:[function(e,t,r){"use strict";var n=e("glslify"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n p17_20, p21_24, p25_28, p29_32,\n p33_36, p37_40, p41_44, p45_48,\n p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform sampler2D mask, palette;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\n\nbool isPick = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n return (\n fOutside(p[0], lo[0], hi[0]) ||\n fOutside(p[1], lo[1], hi[1]) ||\n fOutside(p[2], lo[2], hi[2]) ||\n fOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n return (\n vOutside(p[0], lo[0], hi[0]) ||\n vOutside(p[1], lo[1], hi[1]) ||\n vOutside(p[2], lo[2], hi[2]) ||\n vOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n return mOutside(A, loA, hiA) ||\n mOutside(B, loB, hiB) ||\n mOutside(C, loC, hiC) ||\n mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n mat4 pnts[4];\n pnts[0] = A;\n pnts[1] = B;\n pnts[2] = C;\n pnts[3] = D;\n\n for(int i = 0; i < 4; ++i) {\n for(int j = 0; j < 4; ++j) {\n for(int k = 0; k < 4; ++k) {\n if(0 == iMod(\n int(255.0 * texture2D(mask,\n vec2(\n (float(i * 2 + j / 2) + 0.5) / 8.0,\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n ))[3]\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n 2\n )) return true;\n }\n }\n }\n return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n float x = 0.5 * sign(v) + 0.5;\n float y = axisY(x, A, B, C, D);\n float z = 1.0 - abs(v);\n\n z += isContext ? 0.0 : 2.0 * float(\n outsideBoundingBox(A, B, C, D) ||\n outsideRasterMask(A, B, C, D)\n );\n\n return vec4(\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n z,\n 1.0\n );\n}\n\nvoid main() {\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n float v = colors[3];\n\n gl_Position = position(isContext, v, A, B, C, D);\n\n fragColor =\n isContext ? vec4(contextColor) :\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),i=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}\n"]),o=e("./constants").maxDimensionCount,s=e("../../lib"),l=1e-6,u=2048,c=new Uint8Array(4),d=new Uint8Array(4),p={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(e,t,r,n,a){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(t,r,n,a),e.clear({color:[0,0,0,0],depth:1})}function f(e,t,r,n,a,i){var o=i.key;r.drawCompleted||(function(e){e.read({x:0,y:0,width:1,height:1,data:c})}(e),r.drawCompleted=!0),function s(l){var u=Math.min(n,a-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],h(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),r.clearOnly||(i.count=2*u,i.offset=2*l*n,t(i),l*n+u>>8*t)%256/255}function y(e,t,r){for(var n=new Array(8*t),a=0,i=0;id&&(d=e[a].dim1.canvasX,o=a);0===s&&h(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(e){var t,r,n,a=[[],[]];for(n=0;n<64;n++){var i=!e&&na._length&&(C=C.slice(0,a._length));var L,A=a.tickvals;function E(e,t){return{val:e,text:L[t]}}function D(e,t){return e.val-t.val}if(Array.isArray(A)&&A.length){L=a.ticktext,Array.isArray(L)&&L.length?L.length>A.length?L=L.slice(0,A.length):A.length>L.length&&(A=A.slice(0,L.length)):L=A.map(n.format(a.tickformat));for(var P=1;P=r||l>=i)return;var u=e.lineLayer.readPixel(s,i-1-l),c=0!==u[3],d=c?u[2]+256*(u[1]+256*u[0]):null,p={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:d};d!==O&&(c?a.hover(p):a.unhover&&a.unhover(p),O=d)}})),I.style("opacity",(function(e){return e.pick?0:1})),c.style("background","rgba(255, 255, 255, 0)");var F=c.selectAll("."+m.cn.parcoords).data(M,d);F.exit().remove(),F.enter().append("g").classed(m.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),F.attr("transform",(function(e){return"translate("+e.model.translateX+","+e.model.translateY+")"}));var R=F.selectAll("."+m.cn.parcoordsControlView).data(p,d);R.enter().append("g").classed(m.cn.parcoordsControlView,!0),R.attr("transform",(function(e){return"translate("+e.model.pad.l+","+e.model.pad.t+")"}));var z=R.selectAll("."+m.cn.yAxis).data((function(e){return e.dimensions}),d);z.enter().append("g").classed(m.cn.yAxis,!0),R.each((function(e){E(z,e)})),I.each((function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=y(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}})),z.attr("transform",(function(e){return"translate("+e.xScale(e.xIndex)+", 0)"})),z.call(n.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;k.linePickActive(!1),e.x=Math.max(-m.overdrag,Math.min(e.model.width+m.overdrag,n.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,z.sort((function(e,t){return e.x-t.x})).each((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),E(z,t),z.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return"translate("+e.xScale(e.xIndex)+", 0)"})),n.select(this).attr("transform","translate("+e.x+", 0)"),z.each((function(r,n,a){a===e.parent.key&&(t.dimensions[n]=r)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!T(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,E(z,t),n.select(this).attr("transform",(function(e){return"translate("+e.x+", 0)"})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!T(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),k.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),z.exit().remove();var N=z.selectAll("."+m.cn.axisOverlays).data(p,d);N.enter().append("g").classed(m.cn.axisOverlays,!0),N.selectAll("."+m.cn.axis).remove();var B=N.selectAll("."+m.cn.axis).data(p,d);B.enter().append("g").classed(m.cn.axis,!0),B.each((function(e){var t=e.model.height/e.model.tickDistance,r=e.domainScale,a=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?a:null).tickFormat((function(t){return f.isOrdinal(e)?t:D(e.model.dimensions[e.visibleIndex],t)})).scale(r)),l.font(B.selectAll("text"),e.model.tickFont)})),B.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),B.selectAll("text").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=N.selectAll("."+m.cn.axisHeading).data(p,d);j.enter().append("g").classed(m.cn.axisHeading,!0);var Y=j.selectAll("."+m.cn.axisTitle).data(p,d);Y.enter().append("text").classed(m.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),Y.text((function(e){return e.label})).each((function(t){var r=n.select(this);l.font(r,t.model.labelFont),s.convertToTspans(r,e)})).attr("transform",(function(e){var t=A(e.model.labelAngle,e.model.labelSide),r=m.axisTitleOffset;return(t.dir>0?"":"translate(0,"+(2*r+e.model.height)+")")+"rotate("+t.degrees+")translate("+-r*t.dx+","+-r*t.dy+")"})).attr("text-anchor",(function(e){var t=A(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var H=N.selectAll("."+m.cn.axisExtent).data(p,d);H.enter().append("g").classed(m.cn.axisExtent,!0);var V=H.selectAll("."+m.cn.axisExtentTop).data(p,d);V.enter().append("g").classed(m.cn.axisExtentTop,!0),V.attr("transform","translate(0,"+-m.axisExtentOffset+")");var U=V.selectAll("."+m.cn.axisExtentTopText).data(p,d);U.enter().append("text").classed(m.cn.axisExtentTopText,!0).call(L),U.text((function(e){return P(e,!0)})).each((function(e){l.font(n.select(this),e.model.rangeFont)}));var W=H.selectAll("."+m.cn.axisExtentBottom).data(p,d);W.enter().append("g").classed(m.cn.axisExtentBottom,!0),W.attr("transform",(function(e){return"translate(0,"+(e.model.height+m.axisExtentOffset)+")"}));var q=W.selectAll("."+m.cn.axisExtentBottomText).data(p,d);q.enter().append("text").classed(m.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),q.text((function(e){return P(e,!1)})).each((function(e){l.font(n.select(this),e.model.rangeFont)})),g.ensureAxisBrush(N)}},{"../../components/colorscale":603,"../../components/drawing":612,"../../lib":716,"../../lib/gup":714,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"./axisbrush":1081,"./constants":1084,"./helpers":1086,"./lines":1088,"color-rgba":123,d3:164}],1091:[function(e,t,r){"use strict";var n=e("./parcoords"),a=e("../../lib/prepare_regl"),i=e("./helpers").isVisible;function o(e,t,r){var n=t.indexOf(r),a=e.indexOf(n);return-1===a&&(a+=t.length),a}t.exports=function(e,t){var r=e._fullLayout;if(a(e)){var s={},l={},u={},c={},d=r._size;t.forEach((function(t,r){var n=t[0].trace;u[r]=n.index;var a=c[r]=n._fullInput.index;s[r]=e.data[a].dimensions,l[r]=e.data[a].dimensions.slice()})),n(e,t,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{filterChanged:function(t,n,a){var i=l[t][n],o=a.map((function(e){return e.slice()})),s="dimensions["+n+"].constraintrange",d=r._tracePreGUI[e._fullData[u[t]]._fullInput.uid];if(void 0===d[s]){var p=i.constraintrange;d[s]=p||null}var h=e._fullData[u[t]].dimensions[n];o.length?(1===o.length&&(o=o[0]),i.constraintrange=o,h.constraintrange=o.slice(),o=[o]):(delete i.constraintrange,delete h.constraintrange,o=null);var f={};f[s]=o,e.emit("plotly_restyle",[f,[c[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n=function(e,t){return function(r,n){return o(e,t,r)-o(e,t,n)}}(r,l[t].filter(i));s[t].sort(n),l[t].filter((function(e){return!i(e)})).sort((function(e){return l[t].indexOf(e)})).forEach((function(e){s[t].splice(s[t].indexOf(e),1),s[t].splice(l[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[s[t]]},[c[t]]])}})}}},{"../../lib/prepare_regl":729,"./helpers":1086,"./parcoords":1090}],1092:[function(e,t,r){"use strict";var n=e("../../plots/attributes"),a=e("../../plots/domain").attributes,i=e("../../plots/font_attributes"),o=e("../../components/color/attributes"),s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../plots/template_attributes").texttemplateAttrs,u=e("../../lib/extend").extendFlat,c=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:u({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:u({},c,{}),insidetextfont:u({},c,{}),outsidetextfont:u({},c,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:u({},c,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:u({},c,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":590,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/font_attributes":790,"../../plots/template_attributes":840}],1093:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="pie",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],1094:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib").isArrayOrTypedArray,i=e("tinycolor2"),o=e("../../components/color"),s={};function l(e){return function(t,r){return!!t&&!!(t=i(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t)}}function u(e,t){var r,n=JSON.stringify(e),a=t[n];if(!a){for(a=e.slice(),r=0;r"),name:p.hovertemplate||-1!==h.indexOf("name")?p.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:c.castOption(b.bgcolor,e.pts)||e.color,borderColor:c.castOption(b.bordercolor,e.pts),fontFamily:c.castOption(x.family,e.pts),fontSize:c.castOption(x.size,e.pts),fontColor:c.castOption(x.color,e.pts),nameLength:c.castOption(b.namelength,e.pts),textAlign:c.castOption(b.align,e.pts),hovertemplate:c.castOption(p.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[d(e,p)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[d(e,p)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,a=t._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[d(s,a)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,a=t._fullData[o.index];t._dragging||!1===r.hovermode||(t._hoverdata=[d(e,a)],i.click(t,n.event))}))}function f(e,t,r){var n=c.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=c.castOption(e._input.textfont.color,t.pts));var a=c.castOption(e.insidetextfont.family,t.pts)||c.castOption(e.textfont.family,t.pts)||r.family,i=c.castOption(e.insidetextfont.size,t.pts)||c.castOption(e.textfont.size,t.pts)||r.size;return{color:n||o.contrast(t.color),family:a,size:i}}function m(e,t){for(var r,n,a=0;a=1)return u;var c=a+1/(2*Math.tan(i)),d=l*Math.min(1/(Math.sqrt(c*c+.5)+c),o/(Math.sqrt(a*a+o/2)+a)),p={scale:2*d/e.height,rCenter:Math.cos(d/l)-d*a/l,rotate:(180/Math.PI*t.midangle+720)%180-90},h=1/a,f=h+1/(2*Math.tan(i)),m=l*Math.min(1/(Math.sqrt(f*f+.5)+f),o/(Math.sqrt(h*h+o/2)+h)),g={scale:2*m/e.width,rCenter:Math.cos(m/l)-m/a/l,rotate:(180/Math.PI*t.midangle+810)%180-90},y=g.scale>p.scale?g:p;return u.scale<1&&y.scale>u.scale?y:u}function y(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function v(e,t){var r=t.pxmid[0],n=t.pxmid[1],a=e.width/2,i=e.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function _(e,t){var r,n,a,i=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=x(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*e.r,s.ty-=e.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*e.r);var l,u,c=(l=e.r,u=e.trace.aspectratio,l/(void 0===u?1:u)),d=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(d+=c,o.x-=(1+a)*c,s.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?d*=2:-1!==i.title.position.indexOf("right")&&(d+=c,o.x+=(1+a)*c,s.tx-=e.titleBox.width/2),r=d/e.titleBox.width,n=b(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function b(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function x(e){var t,r=e.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function w(e,t){for(var r=[],n=0;n1?(u=r.r,c=u/a.aspectratio):(c=r.r,u=c*a.aspectratio),u*=(1+a.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(i){var _=l.castOption(a,t.i,"texttemplate");if(_){var b=function(e){return{label:e.label,value:e.v,valueLabel:c.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:c.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:l.castOption(a,e.i,"customdata")}}(t),x=c.getFirstFilled(a.text,t.pts);(p(x)||""===x)&&(b.text=x),t.text=l.texttemplateString(_,b,e._fullLayout._d3locale,b,a._meta||{})}else t.text=""}}t.exports={plot:function(e,t){var r=e._fullLayout,i=r._size;m(t,e),w(t,i);var d=l.makeTraceGroups(r._pielayer,t,"trace").each((function(t){var r=n.select(this),d=t[0],p=d.trace;!function(e){var t,r,n,a=e[0],i=a.trace,o=i.rotation*Math.PI/180,s=2*Math.PI/a.vTotal,l="px0",u="px1";if("counterclockwise"===i.direction){for(t=0;ta.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-i.hole,r.rInscribed=y(r,a))}(t),r.attr("stroke-linejoin","round"),r.each((function(){var m=n.select(this).selectAll("g.slice").data(t);m.enter().append("g").classed("slice",!0),m.exit().remove();var y=[[[],[]],[[],[]]],b=!1;m.each((function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=p.index,y[r.pxmid[1]<0?0:1][r.pxmid[0]<0?0:1].push(r);var a=d.cx,i=d.cy,o=n.select(this),m=o.selectAll("path.surface").data([r]);if(m.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),o.call(h,e,t),p.pull){var _=+c.castOption(p.pull,r.pts)||0;_>0&&(a+=_*r.pxmid[0],i+=_*r.pxmid[1])}r.cxFinal=a,r.cyFinal=i;var x=p.hole;if(r.v===d.vTotal){var w="M"+(a+r.px0[0])+","+(i+r.px0[1])+L(r.px0,r.pxmid,!0,1)+L(r.pxmid,r.px0,!0,1)+"Z";x?m.attr("d","M"+(a+x*r.px0[0])+","+(i+x*r.px0[1])+L(r.px0,r.pxmid,!1,x)+L(r.pxmid,r.px0,!1,x)+"Z"+w):m.attr("d",w)}else{var M=L(r.px0,r.px1,!0,1);if(x){var T=1-x;m.attr("d","M"+(a+x*r.px1[0])+","+(i+x*r.px1[1])+L(r.px1,r.px0,!1,x)+"l"+T*r.px0[0]+","+T*r.px0[1]+M+"Z")}else m.attr("d","M"+a+","+i+"l"+r.px0[0]+","+r.px0[1]+M+"Z")}k(e,r,d);var S=c.castOption(p.textposition,r.pts),C=o.selectAll("g.slicetext").data(r.text&&"none"!==S?[0]:[]);C.enter().append("g").classed("slicetext",!0),C.exit().remove(),C.each((function(){var t=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)}));t.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,"outside"===S?function(e,t,r){var n=c.castOption(e.outsidetextfont.color,t.pts)||c.castOption(e.textfont.color,t.pts)||r.color,a=c.castOption(e.outsidetextfont.family,t.pts)||c.castOption(e.textfont.family,t.pts)||r.family,i=c.castOption(e.outsidetextfont.size,t.pts)||c.castOption(e.textfont.size,t.pts)||r.size;return{color:n,family:a,size:i}}(p,r,e._fullLayout.font):f(p,r,e._fullLayout.font)).call(u.convertToTspans,e);var o,h=s.bBox(t.node());"outside"===S?o=v(h,r):(o=g(h,r,d),"auto"===S&&o.scale<1&&(t.call(s.font,p.outsidetextfont),p.outsidetextfont.family===p.insidetextfont.family&&p.outsidetextfont.size===p.insidetextfont.size||(h=s.bBox(t.node())),o=v(h,r)));var m=a+r.pxmid[0]*o.rCenter+(o.x||0),y=i+r.pxmid[1]*o.rCenter+(o.y||0);o.outside&&(r.yLabelMin=y-h.height/2,r.yLabelMid=y,r.yLabelMax=y+h.height/2,r.labelExtraX=0,r.labelExtraY=0,b=!0),t.attr("transform","translate("+m+","+y+")"+(o.scale<1?"scale("+o.scale+")":"")+(o.rotate?"rotate("+o.rotate+")":"")+"translate("+-(h.left+h.right)/2+","+-(h.top+h.bottom)/2+")")}))}function L(e,t,n,a){var i=a*(t[0]-e[0]),o=a*(t[1]-e[1]);return"a"+a*d.r+","+a*d.r+" 0 "+r.largeArc+(n?" 1 ":" 0 ")+i+","+o}}));var x=n.select(this).selectAll("g.titletext").data(p.title.text?[0]:[]);if(x.enter().append("g").classed("titletext",!0),x.exit().remove(),x.each((function(){var t,r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),a=p.title.text;p._meta&&(a=l.templateString(a,p._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,p.title.font).call(u.convertToTspans,e),t="middle center"===p.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(d):_(d,i),r.attr("transform","translate("+t.x+","+t.y+")"+(t.scale<1?"scale("+t.scale+")":"")+"translate("+t.tx+","+t.ty+")")})),b&&function(e,t){var r,n,a,i,o,s,l,u,d,p,h,f,m;function g(e,t){return e.pxmid[1]-t.pxmid[1]}function y(e,t){return t.pxmid[1]-e.pxmid[1]}function v(e,r){r||(r={});var a,u,d,h,f=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?e.yLabelMin:e.yLabelMax,g=n?e.yLabelMax:e.yLabelMin,y=e.cyFinal+o(e.px0[1],e.px1[1]),v=f-m;if(v*l>0&&(e.labelExtraY=v),Array.isArray(t.pull))for(u=0;u=(c.castOption(t.pull,d.pts)||0)||((e.pxmid[1]-d.pxmid[1])*l>0?(v=d.cyFinal+o(d.px0[1],d.px1[1])-m-e.labelExtraY)*l>0&&(e.labelExtraY+=v):(g+e.labelExtraY-y)*l>0&&(a=3*s*Math.abs(u-p.indexOf(e)),(h=d.cxFinal+i(d.px0[0],d.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(a=n?g:y,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,(u=e[n][r]).sort(a),d=e[1-n][r],p=d.concat(u),f=[],h=0;hMath.abs(d)?s+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(i+e.labelExtraX+u):s+="l"+e.labelExtraX+","+c+"v"+(d-c)+"h"+u}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+u;l.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(m,p),b&&p.automargin){var w=s.bBox(r.node()),M=p.domain,T=i.w*(M.x[1]-M.x[0]),S=i.h*(M.y[1]-M.y[0]),C=(.5*T-d.r)/i.w,L=(.5*S-d.r)/i.h;a.autoMargin(e,"pie."+p.uid+".automargin",{xl:M.x[0]-C,xr:M.x[1]+C,yb:M.y[0]-L,yt:M.y[1]+L,l:Math.max(d.cx-d.r-w.left,0),r:Math.max(w.right-(d.cx+d.r),0),b:Math.max(w.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-w.top,0),pad:5})}}))}));setTimeout((function(){d.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:k,transformInsideText:g,determineInsideTextFont:f,positionTitleOutside:_,prerenderTitles:m,layoutAreas:w,attachFxHandlers:h}},{"../../components/color":591,"../../components/drawing":612,"../../components/fx":629,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/plots":825,"./event_data":1096,"./helpers":1097,d3:164}],1102:[function(e,t,r){"use strict";var n=e("d3"),a=e("./style_one");t.exports=function(e){e._fullLayout._pielayer.selectAll(".trace").each((function(e){var t=e[0].trace,r=n.select(this);r.style({opacity:t.opacity}),r.selectAll("path.surface").each((function(e){n.select(this).call(a,e,t)}))}))}},{"./style_one":1103,d3:164}],1103:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("./helpers").castOption;t.exports=function(e,t,r){var i=r.marker.line,o=a(i.color,t.pts)||n.defaultLine,s=a(i.width,t.pts)||0;e.style("stroke-width",s).call(n.fill,t.color).call(n.stroke,o)}},{"../../components/color":591,"./helpers":1097}],1104:[function(e,t,r){"use strict";var n=e("../scatter/attributes");t.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":1118}],1105:[function(e,t,r){"use strict";var n=e("gl-pointcloud2d"),a=e("../../lib/str2rgbarray"),i=e("../../plots/cartesian/autorange").findExtremes,o=e("../scatter/get_trace_color");function s(e,t){this.scene=e,this.uid=t,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(e){var t=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},l.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=o(e,{})},l.updateFast=function(e){var t,r,n,o,s,l,u=this.xData=this.pickXData=e.x,c=this.yData=this.pickYData=e.y,d=this.pickXYData=e.xy,p=e.xbounds&&e.ybounds,h=e.indices,f=this.bounds;if(d){if(n=d,t=d.length>>>1,p)f[0]=e.xbounds[0],f[2]=e.xbounds[1],f[1]=e.ybounds[0],f[3]=e.ybounds[1];else for(l=0;lf[2]&&(f[2]=o),sf[3]&&(f[3]=s);if(h)r=h;else for(r=new Int32Array(t),l=0;lf[2]&&(f[2]=o),sf[3]&&(f[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var m=a(e.marker.color),g=a(e.marker.border.color),y=e.opacity*e.marker.opacity;m[3]*=y,this.pointcloudOptions.color=m;var v=e.marker.blend;null===v&&(v=u.length<100||c.length<100),this.pointcloudOptions.blend=v,g[3]*=y,this.pointcloudOptions.borderColor=g;var _=e.marker.sizemin,b=Math.max(e.marker.sizemax,e.marker.sizemin);this.pointcloudOptions.sizeMin=_,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=e.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var x=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;e._extremes[x._id]=i(x,[f[0],f[2]],{ppad:k}),e._extremes[w._id]=i(w,[f[1],f[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},t.exports=function(e,t){var r=new s(e,t.uid);return r.update(t),r}},{"../../lib/str2rgbarray":739,"../../plots/cartesian/autorange":763,"../scatter/get_trace_color":1128,"gl-pointcloud2d":294}],1106:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes");t.exports=function(e,t,r){function i(r,i){return n.coerce(e,t,a,r,i)}i("x"),i("y"),i("xbounds"),i("ybounds"),e.xy&&e.xy instanceof Float32Array&&(t.xy=e.xy),e.indices&&e.indices instanceof Int32Array&&(t.indices=e.indices),i("text"),i("marker.color",r),i("marker.opacity"),i("marker.blend"),i("marker.sizemin"),i("marker.sizemax"),i("marker.border.color",r),i("marker.border.arearatio"),t._length=null}},{"../../lib":716,"./attributes":1104}],1107:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("../scatter3d/calc"),plot:e("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:e("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":802,"../scatter3d/calc":1146,"./attributes":1104,"./convert":1105,"./defaults":1106}],1108:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../../plots/attributes"),i=e("../../components/color/attributes"),o=e("../../components/fx/attributes"),s=e("../../plots/domain").attributes,l=e("../../plots/template_attributes").hovertemplateAttrs,u=e("../../components/colorscale/attributes"),c=e("../../plot_api/plot_template").templatedArray,d=e("../../lib/extend").extendFlat,p=e("../../plot_api/edit_types").overrideAll;e("../../constants/docs").FORMAT_LINK,(t.exports=p({hoverinfo:d({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s"},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},line:{color:{valType:"color",dflt:i.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]})},link:{label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},line:{color:{valType:"color",dflt:i.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:c("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:d(u().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":590,"../../components/colorscale/attributes":598,"../../components/fx/attributes":621,"../../constants/docs":687,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/font_attributes":790,"../../plots/template_attributes":840}],1109:[function(e,t,r){"use strict";var n=e("../../plot_api/edit_types").overrideAll,a=e("../../plots/get_data").getModuleCalcData,i=e("./plot"),o=e("../../components/fx/layout_attributes"),s=e("../../lib/setcursor"),l=e("../../components/dragelement"),u=e("../../plots/cartesian/select").prepSelect,c=e("../../lib"),d=e("../../registry");function p(e,t){var r=e._fullData[t],n=e._fullLayout,a=n.dragmode,i="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if("pan"!==a&&"zoom"!==a){s(o,i);var p={_id:"x",c2p:c.identity,_offset:r._sankey.translateX,_length:r._sankey.width},h={_id:"y",c2p:c.identity,_offset:r._sankey.translateY,_length:r._sankey.height},f={gd:e,element:o.node(),plotinfo:{id:t,xaxis:p,yaxis:h,fillRangeItems:c.noop},subplot:t,xaxes:[p],yaxes:[h],doneFnCompleted:function(r){var n,a=e._fullData[t],i=a.node.groups.slice(),o=[];function s(e){for(var t=a._sankey.graph.nodes,r=0;ry&&(y=i.source[t]),i.target[t]>y&&(y=i.target[t]);var v,_=y+1;e.node._count=_;var b=e.node.groups,x={};for(t=0;t0&&s(C,_)&&s(L,_)&&(!x.hasOwnProperty(C)||!x.hasOwnProperty(L)||x[C]!==x[L])){x.hasOwnProperty(L)&&(L=x[L]),x.hasOwnProperty(C)&&(C=x[C]),L=+L,d[C=+C]=d[L]=!0;var A="";i.label&&i.label[t]&&(A=i.label[t]);var E=null;A&&p.hasOwnProperty(A)&&(E=p[A]),u.push({pointNumber:t,label:A,color:c?i.color[t]:i.color,concentrationscale:E,source:C,target:L,value:+S}),T.source.push(C),T.target.push(L)}}var D=_+b.length,P=o(r.color),I=[];for(t=0;t_-1,childrenNodes:[],pointNumber:t,label:O,color:P?r.color[t]:r.color})}var F=!1;return function(e,t,r){for(var i=a.init2dArray(e,0),o=0;o1}))}(D,T.source,T.target)&&(F=!0),{circular:F,links:u,nodes:I,groups:b,groupLookup:x}}t.exports=function(e,t){var r=u(t);return i({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gup":714,"strongly-connected-components":528}],1111:[function(e,t,r){"use strict";t.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeCapture:"node-capture",nodeCentered:"node-entered",nodeLabelGuide:"node-label-guide",nodeLabel:"node-label",nodeLabelTextPath:"node-label-text-path"}}},{}],1112:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../components/color"),o=e("tinycolor2"),s=e("../../plots/domain").defaults,l=e("../../components/fx/hoverlabel_defaults"),u=e("../../plot_api/plot_template"),c=e("../../plots/array_container_defaults");function d(e,t){function r(r,i){return n.coerce(e,t,a.link.colorscales,r,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}t.exports=function(e,t,r,p){function h(r,i){return n.coerce(e,t,a,r,i)}var f=n.extendDeep(p.hoverlabel,e.hoverlabel),m=e.node,g=u.newContainer(t,"node");function y(e,t){return n.coerce(m,g,a.node,e,t)}y("label"),y("groups"),y("x"),y("y"),y("pad"),y("thickness"),y("line.color"),y("line.width"),y("hoverinfo",e.hoverinfo),l(m,g,y,f),y("hovertemplate");var v=p.colorway;y("color",g.label.map((function(e,t){return i.addOpacity(function(e){return v[e%v.length]}(t),.8)})));var _=e.link||{},b=u.newContainer(t,"link");function x(e,t){return n.coerce(_,b,a.link,e,t)}x("label"),x("source"),x("target"),x("value"),x("line.color"),x("line.width"),x("hoverinfo",e.hoverinfo),l(_,b,x,f),x("hovertemplate");var w,k=o(p.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";x("color",n.repeat(k,b.value.length)),c(_,b,{name:"colorscales",handleItemDefaults:d}),s(t,p,h),h("orientation"),h("valueformat"),h("valuesuffix"),g.x.length&&g.y.length&&(w="freeform"),h("arrangement",w),n.coerceFont(h,"textfont",n.extendFlat({},p.font)),t._length=null}},{"../../components/color":591,"../../components/fx/hoverlabel_defaults":628,"../../lib":716,"../../plot_api/plot_template":754,"../../plots/array_container_defaults":760,"../../plots/domain":789,"./attributes":1108,tinycolor2:535}],1113:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),moduleType:"trace",name:"sankey",basePlotModule:e("./base_plot"),selectPoints:e("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":1108,"./base_plot":1109,"./calc":1110,"./defaults":1112,"./plot":1114,"./select.js":1116}],1114:[function(e,t,r){"use strict";var n=e("d3"),a=e("./render"),i=e("../../components/fx"),o=e("../../components/color"),s=e("../../lib"),l=e("./constants").cn,u=s._;function c(e){return""!==e}function d(e,t){return e.filter((function(e){return e.key===t.traceId}))}function p(e,t){n.select(e).select("path").style("fill-opacity",t),n.select(e).select("rect").style("fill-opacity",t)}function h(e){n.select(e).select("text.name").style("fill","black")}function f(e){return function(t){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(e,t,r){t&&r&&d(r,t).selectAll("."+l.sankeyLink).filter(f(t)).call(v.bind(0,t,r,!1))}function y(e,t,r){t&&r&&d(r,t).selectAll("."+l.sankeyLink).filter(f(t)).call(_.bind(0,t,r,!1))}function v(e,t,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),a&&d(t,e).selectAll("."+l.sankeyLink).filter((function(e){return e.link.label===a})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),r&&d(t,e).selectAll("."+l.sankeyNode).filter(m(e)).call(g)}function _(e,t,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(e){return e.tinyColorAlpha})),a&&d(t,e).selectAll("."+l.sankeyLink).filter((function(e){return e.link.label===a})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),r&&d(t,e).selectAll(l.sankeyNode).filter(m(e)).call(y)}function b(e,t){var r=e.hoverlabel||{},n=s.nestedProperty(r,t).get();return!Array.isArray(n)&&n}t.exports=function(e,t){for(var r=e._fullLayout,s=r._paper,d=r._size,f=0;f"),color:b(s,"bgcolor")||o.addOpacity(f.color,1),borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:n.event.x"),color:b(o,"bgcolor")||a.tinyColorHue,borderColor:b(o,"bordercolor"),fontFamily:b(o,"font.family"),fontSize:b(o,"font.size"),fontColor:b(o,"font.color"),nameLength:b(o,"namelength"),textAlign:b(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[a.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e});p(v,.85),h(v)}}},unhover:function(t,a,o){!1!==e._fullLayout.hovermode&&(n.select(t).call(y,a,o),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,e.emit("plotly_unhover",{event:n.event,points:[a.node]})),i.loneUnhover(r._hoverlayer.node()))},select:function(t,r,a){var o=r.node;o.originalEvent=n.event,e._hoverdata=[o],n.select(t).call(y,r,a),i.click(e,{target:!0})}}})}},{"../../components/color":591,"../../components/fx":629,"../../lib":716,"./constants":1111,"./render":1115,d3:164}],1115:[function(e,t,r){"use strict";var n=e("./constants"),a=e("d3"),i=e("tinycolor2"),o=e("../../components/color"),s=e("../../components/drawing"),l=e("@plotly/d3-sankey"),u=e("@plotly/d3-sankey-circular"),c=e("d3-force"),d=e("../../lib"),p=e("../../lib/gup"),h=p.keyFun,f=p.repeat,m=p.unwrap,g=e("d3-interpolate").interpolateNumber,y=e("../../registry");function v(e,t,r){var a,o=m(t),s=o.trace,c=s.domain,p="h"===s.orientation,h=s.node.pad,f=s.node.thickness,g=e.width*(c.x[1]-c.x[0]),y=e.height*(c.y[1]-c.y[0]),v=o._nodes,_=o._links,b=o.circular;(a=b?u.sankeyCircular().circularLinkGap(0):l.sankey()).iterations(n.sankeyIterations).size(p?[g,y]:[y,g]).nodeWidth(f).nodePadding(h).nodeId((function(e){return e.pointNumber})).nodes(v).links(_);var x,w,k,M=a();for(var T in a.nodePadding()=a||(r=a-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),a=t.y1+h}))}(function(e){var t,r,n=e.map((function(e,t){return{x0:e.x0,index:t}})).sort((function(e,t){return e.x0-t.x0})),a=[],i=-1,o=-1/0;for(x=0;xo+f&&(i+=1,t=s.x0),o=s.x0,a[i]||(a[i]=[]),a[i].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return a}(v=M.nodes)),a.update(M)}return{circular:b,key:r,trace:s,guid:d.randstr(),horizontal:p,width:g,height:y,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:c.x[0]*e.width+e.margin.l,translateY:e.height-c.y[1]*e.height+e.margin.t,dragParallel:p?y:g,dragPerpendicular:p?g:y,arrangement:s.arrangement,sankey:a,graph:M,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function _(e,t,r){var n=i(t.color),a=t.source.label+"|"+t.target.label+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:a,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:b,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function b(){var e=.5;return function(t){if(t.link.circular)return r=t.link,n=r.width/2,a=r.circularPathData,"top"===r.circularLinkType?"M "+a.targetX+" "+(a.targetY+n)+" L"+a.rightInnerExtent+" "+(a.targetY+n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 1 "+(a.rightFullExtent-n)+" "+(a.targetY-a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY-a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.leftInnerExtent+" "+(a.sourceY-n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 0 "+(a.leftFullExtent-n)+" "+(a.sourceY-a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 0 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY-a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.targetY-n)+"L"+a.targetX+" "+(a.targetY-n)+"Z":"M "+a.targetX+" "+(a.targetY-n)+" L"+a.rightInnerExtent+" "+(a.targetY-n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n)+" "+(a.targetY+a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.leftInnerExtent+" "+(a.sourceY+n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY+a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.targetY+n)+"L"+a.targetX+" "+(a.targetY+n)+"Z";var r,n,a,i=t.link.source.x1,o=t.link.target.x0,s=g(i,o),l=s(e),u=s(1-e),c=t.link.y0-t.link.width/2,d=t.link.y0+t.link.width/2,p=t.link.y1-t.link.width/2,h=t.link.y1+t.link.width/2;return"M"+i+","+c+"C"+l+","+c+" "+u+","+p+" "+o+","+p+"L"+o+","+h+"C"+u+","+h+" "+l+","+d+" "+i+","+d+"Z"}}function x(e,t){var r=i(t.color),a=n.nodePadAcross,s=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var l=t.dx,u=Math.max(.5,t.dy),c="node_"+t.pointNumber;return t.group&&(c=d.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:c,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(l),visibleHeight:u,zoneX:-a,zoneY:-s,zoneWidth:l+2*a,zoneHeight:u+2*s,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:o.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,c].join("_"),interactionState:e.interactionState,figure:e}}function w(e){e.attr("transform",(function(e){return"translate("+e.node.x0.toFixed(3)+", "+e.node.y0.toFixed(3)+")"}))}function k(e){e.call(w)}function M(e,t){e.call(k),t.attr("d",b())}function T(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function S(e){return e.link.width>1||e.linkLineWidth>0}function C(e){return"translate("+e.translateX+","+e.translateY+")"+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function L(e){return"translate("+(e.horizontal?0:e.labelY)+" "+(e.horizontal?e.labelY:0)+")"}function A(e){return a.svg.line()([[e.horizontal?e.left?-e.sizeAcross:e.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[e.horizontal?e.left?-n.nodeTextOffsetHorizontal:e.sizeAcross:e.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function E(e){return e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function D(e){return e.horizontal?"scale(1 1)":"scale(-1 1)"}function P(e){return e.darkBackground&&!e.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function I(e){return e.horizontal&&e.left?"100%":"0%"}function O(e,t,r){e.on(".basic",null).on("mouseover.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)}))}function F(e,t,r,i){var o=a.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(d.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(e){i._fullLayout._dragCover=e})),d.raiseToTop(this),a.interactionState.dragInProgress=a.node,z(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),"snap"===a.arrangement)){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(e,t,r,a){!function(e){for(var t=0;t0&&a.forceLayouts[t].alpha(0)}}(0,t,i,r)).stop()}(0,o,a),function(e,t,r,a,i){window.requestAnimationFrame((function o(){var s;for(s=0;s0)window.requestAnimationFrame(o);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,R(r,i)}}))}(e,t,a,o,i)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=a.event.x,i=a.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),z(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),M(e.filter(N(r)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;t5?e.node.label:""})).attr("text-anchor",(function(e){return e.horizontal&&e.left?"end":"start"})),V.transition().ease(n.ease).duration(n.duration).attr("startOffset",I).style("fill",P)}},{"../../components/color":591,"../../components/drawing":612,"../../lib":716,"../../lib/gup":714,"../../registry":845,"./constants":1111,"@plotly/d3-sankey":56,"@plotly/d3-sankey-circular":55,d3:164,"d3-force":157,"d3-interpolate":159,tinycolor2:535}],1116:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=[],n=e.cd[0].trace,a=n._sankey.graph.nodes,i=0;is&&T[g].gap;)g--;for(v=T[g].s,f=T.length-1;f>g;f--)T[f].s=v;for(;sS[c]&&c=0;a--){var i=e[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],1125:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("./constants"),s=e("./subtypes"),l=e("./xy_defaults"),u=e("./stack_defaults"),c=e("./marker_defaults"),d=e("./line_defaults"),p=e("./line_shape_defaults"),h=e("./text_defaults"),f=e("./fillcolor_defaults");t.exports=function(e,t,r,m){function g(r,a){return n.coerce(e,t,i,r,a)}var y=l(e,t,m,g);if(y||(t.visible=!1),t.visible){var v=u(e,t,m,g),_=!v&&yW!=(z=P[E][1])>=W&&(O=P[E-1][0],F=P[E][0],z-R&&(I=O+(F-O)*(W-R)/(z-R),Y=Math.min(Y,I),H=Math.max(H,I)));Y=Math.max(Y,0),H=Math.min(H,p._length);var q=s.defaultLine;return s.opacity(d.fillcolor)?q=d.fillcolor:s.opacity((d.line||{}).color)&&(q=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:Y,x1:H,y0:W,y1:W,color:q,hovertemplate:!1}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},{"../../components/color":591,"../../components/fx":629,"../../lib":716,"../../registry":845,"./get_trace_color":1128}],1130:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./cross_trace_calc"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot"),colorbar:e("./marker_colorbar"),formatLabels:e("./format_labels"),style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"./arrays_to_calcdata":1117,"./attributes":1118,"./calc":1119,"./cross_trace_calc":1123,"./cross_trace_defaults":1124,"./defaults":1125,"./format_labels":1127,"./hover":1129,"./marker_colorbar":1136,"./plot":1138,"./select":1139,"./style":1141,"./subtypes":1142}],1131:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults");t.exports=function(e,t,r,o,s,l){var u=(e.marker||{}).color;s("line.color",r),a(e,"line")?i(e,t,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(u)&&u||r),s("line.width"),(l||{}).noDash||s("line.dash")}},{"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"../../lib":716}],1132:[function(e,t,r){"use strict";var n=e("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,s=i-.5,l=e("../../lib"),u=l.segmentsIntersect,c=l.constrain,d=e("./constants");t.exports=function(e,t){var r,n,i,p,h,f,m,g,y,v,_,b,x,w,k,M,T,S,C=t.xaxis,L=t.yaxis,A="log"===C.type,E="log"===L.type,D=C._length,P=L._length,I=t.connectGaps,O=t.baseTolerance,F=t.shape,R="linear"===F,z=t.fill&&"none"!==t.fill,N=[],B=d.minTolerance,j=e.length,Y=new Array(j),H=0;function V(r){var n=e[r];if(!n)return!1;var i=t.linearized?C.l2p(n.x):C.c2p(n.x),l=t.linearized?L.l2p(n.y):L.c2p(n.y);if(i===a){if(A&&(i=C.c2p(n.x,!0)),i===a)return!1;E&&l===a&&(i*=Math.abs(C._m*P*(C._m>0?o:s)/(L._m*D*(L._m>0?o:s)))),i*=1e3}if(l===a){if(E&&(l=L.c2p(n.y,!0)),l===a)return!1;l*=1e3}return[i,l]}function U(e,t,r,n){var a=r-e,i=n-t,o=.5-e,s=.5-t,l=a*a+i*i,u=a*o+i*s;if(u>0&&ure||e[1]ae)return[c(e[0],te,re),c(e[1],ne,ae)]}function se(e,t){return e[0]===t[0]&&(e[0]===te||e[0]===re)||e[1]===t[1]&&(e[1]===ne||e[1]===ae)||void 0}function le(e,t,r){return function(n,a){var i=oe(n),o=oe(a),s=[];if(i&&o&&se(i,o))return s;i&&s.push(i),o&&s.push(o);var u=2*l.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);return u&&((i&&o?u>0==i[e]>o[e]?i:o:i||o)[e]+=u),s}}function ue(e){var t=e[0],r=e[1],n=t===Y[H-1][0],a=r===Y[H-1][1];if(!n||!a)if(H>1){var i=t===Y[H-2][0],o=r===Y[H-2][1];n&&(t===te||t===re)&&i?o?H--:Y[H-1]=e:a&&(r===ne||r===ae)&&o?i?H--:Y[H-1]=e:Y[H++]=e}else Y[H++]=e}function ce(e){Y[H-1][0]!==e[0]&&Y[H-1][1]!==e[1]&&ue([Z,X]),ue(e),J=null,Z=X=0}function de(e){if(T=e[0]/D,S=e[1]/P,G=e[0]re?re:0,K=e[1]ae?ae:0,G||K){if(H)if(J){var t=Q(J,e);t.length>1&&(ce(t[0]),Y[H++]=t[1])}else $=Q(Y[H-1],e)[0],Y[H++]=$;else Y[H++]=[G||e[0],K||e[1]];var r=Y[H-1];G&&K&&(r[0]!==G||r[1]!==K)?(J&&(Z!==G&&X!==K?ue(Z&&X?(n=J,i=(a=e)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?te:re,ae]:[o>0?re:te,ne]):[Z||G,X||K]):Z&&X&&ue([Z,X])),ue([G,K])):Z-G&&X-K&&ue([G||Z,K||X]),J=e,Z=G,X=K}else J&&ce(Q(J,e)[0]),Y[H++]=e;var n,a,i,o}for("linear"===F||"spline"===F?Q=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ie[a],o=u(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&q(o,e)W(f,pe))break;i=f,(x=y[0]*g[0]+y[1]*g[1])>_?(_=x,p=f,m=!1):x=e.length||!f)break;de(f),n=f}}else de(p)}J&&ue([Z||J[0],X||J[1]]),N.push(Y.slice(0,H))}return N}},{"../../constants/numerical":692,"../../lib":716,"./constants":1122}],1133:[function(e,t,r){"use strict";t.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1134:[function(e,t,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};t.exports=function(e,t,r){var a,i,o,s,l,u={},c=!1,d=-1,p=0,h=-1;for(i=0;i=0?l=h:(l=h=p,p++),l0?Math.max(t,a):0}}},{"fast-isnumeric":227}],1136:[function(e,t,r){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1137:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults"),o=e("./subtypes");t.exports=function(e,t,r,s,l,u){var c=o.isBubble(e),d=(e.line||{}).color;u=u||{},d&&(r=d),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),l("marker.color",r),a(e,"marker")&&i(e,t,s,l,{prefix:"marker.",cLetter:"c"}),u.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),u.noLine||(l("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:c?n.background:n.defaultLine),a(e,"marker.line")&&i(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0)),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),u.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},{"../../components/color":591,"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"./subtypes":1142}],1138:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../lib"),o=i.ensureSingle,s=i.identity,l=e("../../components/drawing"),u=e("./subtypes"),c=e("./line_points"),d=e("./link_traces"),p=e("../../lib/polygon").tester;function h(e,t,r,d,h,f,m){var g;!function(e,t,r,a,o){var s=r.xaxis,l=r.yaxis,c=n.extent(i.simpleMap(s.range,s.r2c)),d=n.extent(i.simpleMap(l.range,l.r2c)),p=a[0].trace;if(u.hasMarkers(p)){var h=p.marker.maxdisplayed;if(0!==h){var f=a.filter((function(e){return e.x>=c[0]&&e.x<=c[1]&&e.y>=d[0]&&e.y<=d[1]})),m=Math.ceil(f.length/h),g=0;o.forEach((function(e,r){var n=e[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function v(e){return y?e.transition():e}var _=r.xaxis,b=r.yaxis,x=d[0].trace,w=x.line,k=n.select(f),M=o(k,"g","errorbars"),T=o(k,"g","lines"),S=o(k,"g","points"),C=o(k,"g","text");if(a.getComponentMethod("errorbars","plot")(e,M,r,m),!0===x.visible){var L,A;v(k).style("opacity",x.opacity);var E=x.fill.charAt(x.fill.length-1);"x"!==E&&"y"!==E&&(E=""),d[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var D,P,I="",O=[],F=x._prevtrace;F&&(I=F._prevRevpath||"",A=F._nextFill,O=F._polygons);var R,z,N,B,j,Y,H,V="",U="",W=[],q=i.noop;if(L=x._ownFill,u.hasLines(x)||"none"!==x.fill){for(A&&A.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(R=l.steps(w.shape),z=l.steps(w.shape.split("").reverse().join(""))):R=z="spline"===w.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),w.smoothing):l.smoothopen(e,w.smoothing)}:function(e){return"M"+e.join("L")},N=function(e){return z(e.reverse())},W=c(d,{xaxis:_,yaxis:b,connectGaps:x.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:x.fill}),H=x._polygons=new Array(W.length),g=0;g1){var r=n.select(this);if(r.datum(d),e)v(r.style("opacity",0).attr("d",D).call(l.lineGroupStyle)).style("opacity",1);else{var a=v(r);a.attr("d",D),l.singleLineStyle(d,a)}}}}}var G=T.selectAll(".js-line").data(W);v(G.exit()).style("opacity",0).remove(),G.each(q(!1)),G.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(q(!0)),l.setClipUrl(G,r.layerClipId,e),W.length?(L?(L.datum(d),B&&Y&&(E?("y"===E?B[1]=Y[1]=b.c2p(0,!0):"x"===E&&(B[0]=Y[0]=_.c2p(0,!0)),v(L).attr("d","M"+Y+"L"+B+"L"+V.substr(1)).call(l.singleFillStyle)):v(L).attr("d",V+"Z").call(l.singleFillStyle))):A&&("tonext"===x.fill.substr(0,6)&&V&&I?("tonext"===x.fill?v(A).attr("d",V+"Z"+I+"Z").call(l.singleFillStyle):v(A).attr("d",V+"L"+I.substr(1)+"Z").call(l.singleFillStyle),x._polygons=x._polygons.concat(O)):(Z(A),x._polygons=null)),x._prevRevpath=U,x._prevPolygons=H):(L?Z(L):A&&Z(A),x._polygons=x._prevRevpath=x._prevPolygons=null),S.datum(d),C.datum(d),function(t,a,i){var o,c=i[0].trace,d=u.hasMarkers(c),p=u.hasText(c),h=ee(c),f=te,m=te;if(d||p){var g=s,x=c.stackgroup,w=x&&"infer zero"===e._fullLayout._scatterStackOpts[_._id+b._id][x].stackgaps;c.marker.maxdisplayed||c._needsCull?g=w?J:X:x&&!w&&(g=$),d&&(f=g),p&&(m=g)}var k,M=(o=t.selectAll("path.point").data(f,h)).enter().append("path").classed("point",!0);y&&M.call(l.pointStyle,c,e).call(l.translatePoints,_,b).style("opacity",0).transition().style("opacity",1),o.order(),d&&(k=l.makePointStyleFns(c)),o.each((function(t){var a=n.select(this),i=v(a);l.translatePoint(t,i,_,b)?(l.singlePointStyle(t,i,c,k,e),r.layerClipId&&l.hideOutsideRangePoint(t,i,_,b,c.xcalendar,c.ycalendar),c.customdata&&a.classed("plotly-customdata",null!==t.data&&void 0!==t.data)):i.remove()})),y?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(m,h)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(e){var t=n.select(this),a=v(t.select("text"));l.translatePoint(e,a,_,b)?r.layerClipId&&l.hideOutsideRangePoint(e,t,_,b,c.xcalendar,c.ycalendar):t.remove()})),o.selectAll("text").call(l.textPointStyle,c,e).each((function(e){var t=_.c2p(e.x),r=b.c2p(e.y);n.select(this).selectAll("tspan.line").each((function(){v(n.select(this)).attr({x:t,y:r})}))})),o.exit().remove()}(S,C,d);var K=!1===x.cliponaxis?null:r.layerClipId;l.setClipUrl(S,K,e),l.setClipUrl(C,K,e)}function Z(e){v(e).attr("d","M0,0Z")}function X(e){return e.filter((function(e){return!e.gap&&e.vis}))}function J(e){return e.filter((function(e){return e.vis}))}function $(e){return e.filter((function(e){return!e.gap}))}function Q(e){return e.id}function ee(e){if(e.ids)return Q}function te(){return!1}}t.exports=function(e,t,r,a,i,u){var c,p,f=!i,m=!!i&&i.duration>0,g=d(e,t,r);(c=a.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),c.order(),function(e,t,r){t.each((function(t){var a=o(n.select(this),"g","fills");l.setClipUrl(a,r.layerClipId,e);var i=t[0].trace,u=[];i._ownfill&&u.push("_ownFill"),i._nexttrace&&u.push("_nextFill");var c=a.selectAll("g").data(u,s);c.enter().append("g"),c.exit().each((function(e){i[e]=null})).remove(),c.order().each((function(e){i[e]=o(n.select(this),"path","js-fill")}))}))}(e,c,t),m?(u&&(p=u()),n.transition().duration(i.duration).ease(i.easing).each("end",(function(){p&&p()})).each("interrupt",(function(){p&&p()})).each((function(){a.selectAll("g.trace").each((function(r,n){h(e,n,t,r,g,this,i)}))}))):c.each((function(r,n){h(e,n,t,r,g,this,i)})),f&&c.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":612,"../../lib":716,"../../lib/polygon":728,"../../registry":845,"./line_points":1132,"./link_traces":1134,"./subtypes":1142,d3:164}],1139:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports=function(e,t){var r,a,i,o,s=e.cd,l=e.xaxis,u=e.yaxis,c=[],d=s[0].trace;if(!n.hasMarkers(d)&&!n.hasText(d))return[];if(!1===t)for(r=0;r0){var p=a.c2l(c);a._lowerLogErrorBound||(a._lowerLogErrorBound=p),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,p)}}else o[s]=[-l[0]*r,l[1]*r]}return o}t.exports=function(e,t,r){var n=[a(e.x,e.error_x,t[0],r.xaxis),a(e.y,e.error_y,t[1],r.yaxis),a(e.z,e.error_z,t[2],r.zaxis)],i=function(e){for(var t=0;t-1?-1:e.indexOf("right")>-1?1:0}function b(e){return null==e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function x(e,t){return t(4*e)}function w(e){return h[e]}function k(e,t,r,n,a){var i=null;if(l.isArrayOrTypedArray(e)){i=[];for(var o=0;o=0){var m=function(e,t,r){var n,a=(r+1)%3,i=(r+2)%3,o=[],l=[];for(n=0;n=0&&d("surfacecolor",p||h);for(var f=["x","y","z"],m=0;m<3;++m){var g="projection."+f[m];d(g+".show")&&(d(g+".opacity"),d(g+".scale"))}var y=n.getComponentMethod("errorbars","supplyDefaults");y(e,t,p||h||r,{axis:"z"}),y(e,t,p||h||r,{axis:"y",inherit:"z"}),y(e,t,p||h||r,{axis:"x",inherit:"z"})}else t.visible=!1}},{"../../lib":716,"../../registry":845,"../scatter/line_defaults":1131,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"./attributes":1145}],1150:[function(e,t,r){"use strict";t.exports={plot:e("./convert"),attributes:e("./attributes"),markerSymbols:e("../../constants/gl3d_markers"),supplyDefaults:e("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":690,"../../plots/gl3d":804,"./attributes":1145,"./calc":1146,"./convert":1148,"./defaults":1149}],1151:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../plots/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../components/colorscale/attributes"),l=e("../../lib/extend").extendFlat,u=n.marker,c=n.line,d=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},n.hovertext,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:l({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:l({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:l({width:d.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:i()}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scatter/attributes":1118}],1152:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../scatter/colorscale_calc"),i=e("../scatter/arrays_to_calcdata"),o=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize,l=e("../carpet/lookup_carpetid");t.exports=function(e,t){var r=t._carpetTrace=l(e,t);if(r&&r.visible&&"legendonly"!==r.visible){var u;t.xaxis=r.xaxis,t.yaxis=r.yaxis;var c,d,p=t._length,h=new Array(p),f=!1;for(u=0;u")}return o}function v(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,g.push(r+": "+t.toFixed(3)+e.labelsuffix)}}},{"../../lib":716,"../scatter/hover":1129}],1157:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:e("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../scatter/marker_colorbar":1136,"../scatter/select":1139,"../scatter/style":1141,"./attributes":1151,"./calc":1152,"./defaults":1153,"./event_data":1154,"./format_labels":1155,"./hover":1156,"./plot":1158}],1158:[function(e,t,r){"use strict";var n=e("../scatter/plot"),a=e("../../plots/cartesian/axes"),i=e("../../components/drawing");t.exports=function(e,t,r,o){var s,l,u,c=r[0][0].carpet,d={xaxis:a.getFromId(e,c.xaxis||"x"),yaxis:a.getFromId(e,c.yaxis||"y"),plot:t.plot};for(n(e,d,r,o),s=0;s")}function h(e){return e+"°"}}(u,m,e,l[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}}},{"../../components/fx":629,"../../constants/numerical":692,"../../lib":716,"../scatter/get_trace_color":1128,"./attributes":1159}],1165:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:e("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":794,"../scatter/marker_colorbar":1136,"../scatter/style":1141,"./attributes":1159,"./calc":1160,"./defaults":1161,"./event_data":1162,"./format_labels":1163,"./hover":1164,"./plot":1166,"./select":1167,"./style":1168}],1166:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM,o=e("../../lib/topojson_utils").getTopojsonFeatures,s=e("../../lib/geo_location_utils").locationToFeature,l=e("../../lib/geojson_utils"),u=e("../scatter/subtypes"),c=e("./style");function d(e,t){var r=e[0].trace;if(Array.isArray(r.locations))for(var n=o(r,t),a=r.locationmode,l=0;l=m,k=2*x,M={},T=t._x=v.makeCalcdata(t,"x"),S=t._y=_.makeCalcdata(t,"y"),C=new Array(k);for(r=0;r1&&a.extendFlat(s.line,p.linePositions(e,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(e,r,n,i,o);s.errorX&&a.extendFlat(s.errorX,l.x),s.errorY&&a.extendFlat(s.errorY,l.y)}return s.text&&(a.extendFlat(s.text,{positions:n},p.textPosition(e,r,s.text,s.marker)),a.extendFlat(s.textSel,{positions:n},p.textPosition(e,r,s.text,s.markerSel)),a.extendFlat(s.textUnsel,{positions:n},p.textPosition(e,r,s.text,s.markerUnsel))),s}(e,0,t,C,T,S),D=h(e,b);return c(y,t),w?E.marker&&(A=2*(E.marker.sizeAvg||Math.max(E.marker.size,3))):A=l(t,x),u(e,t,v,_,T,S,A),E.errorX&&g(t,v,E.errorX),E.errorY&&g(t,_,E.errorY),E.fill&&!D.fill2d&&(D.fill2d=!0),E.marker&&!D.scatter2d&&(D.scatter2d=!0),E.line&&!D.line2d&&(D.line2d=!0),!E.errorX&&!E.errorY||D.error2d||(D.error2d=!0),E.text&&!D.glText&&(D.glText=!0),E.marker&&(E.marker.snap=x),D.lineOptions.push(E.line),D.errorXOptions.push(E.errorX),D.errorYOptions.push(E.errorY),D.fillOptions.push(E.fill),D.markerOptions.push(E.marker),D.markerSelectedOptions.push(E.markerSel),D.markerUnselectedOptions.push(E.markerUnsel),D.textOptions.push(E.text),D.textSelectedOptions.push(E.textSel),D.textUnselectedOptions.push(E.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),M._scene=D,M.index=D.count,M.x=T,M.y=S,M.positions=C,D.count++,[{x:!1,y:!1,t:M,trace:t}]}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/autorange":763,"../../plots/cartesian/axis_ids":767,"../scatter/calc":1119,"../scatter/colorscale_calc":1121,"./constants":1171,"./convert":1172,"./scene_update":1179,"point-cluster":470}],1171:[function(e,t,r){"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],1172:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("svg-path-sdf"),i=e("color-normalize"),o=e("../../registry"),s=e("../../lib"),l=e("../../components/drawing"),u=e("../../plots/cartesian/axis_ids"),c=e("../../lib/gl_format_color").formatColor,d=e("../scatter/subtypes"),p=e("../scatter/make_bubble_size_func"),h=e("./constants"),f=e("../../constants/interactions").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},g=e("../../components/fx/helpers").appendArrayPointValue;function y(e,t){var r,a=e._fullLayout,i=t._length,o=t.textfont,l=t.textposition,u=Array.isArray(l)?l:[l],c=o.color,d=o.size,p=o.family,h={},f=t.texttemplate;if(f){h.text=[];var m=a._d3locale,y=Array.isArray(f),v=y?Math.min(f.length,i):i,_=y?function(e){return f[e]}:function(){return f};for(r=0;rh.TOO_MANY_POINTS?"rect":d.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var p=n[0],f=n[1];for(a=0;a1?l[a]:l[0]:l,f=Array.isArray(u)?u.length>1?u[a]:u[0]:u,g=m[h],y=m[f],v=c?c/.8+1:0,_=-y*v-.5*y;o.offset[a]=[g*v/p,_/p]}}return o}}},{"../../components/drawing":612,"../../components/fx/helpers":626,"../../constants/interactions":691,"../../lib":716,"../../lib/gl_format_color":713,"../../plots/cartesian/axis_ids":767,"../../registry":845,"../scatter/make_bubble_size_func":1135,"../scatter/subtypes":1142,"./constants":1171,"color-normalize":121,"fast-isnumeric":227,"svg-path-sdf":533}],1173:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("../scatter/constants"),s=e("../scatter/subtypes"),l=e("../scatter/xy_defaults"),u=e("../scatter/marker_defaults"),c=e("../scatter/line_defaults"),d=e("../scatter/fillcolor_defaults"),p=e("../scatter/text_defaults");t.exports=function(e,t,r,h){function f(r,a){return n.coerce(e,t,i,r,a)}var m=!!e.marker&&/-open/.test(e.marker.symbol),g=s.isBubble(e),y=l(e,t,h,f);if(y){var v=y-1;u--)s=_[a[u]],l=b[a[u]],c=y.c2p(s)-x,d=v.c2p(l)-w,(p=Math.sqrt(c*c+d*d))g.glText.length){var x=_-g.glText.length;for(h=0;hr&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e})),g.line2d.update(g.lineOptions)),g.error2d){var k=(g.errorXOptions||[]).concat(g.errorYOptions||[]);g.error2d.update(k)}g.scatter2d&&g.scatter2d.update(g.markerOptions),g.fillOrder=s.repeat(null,_),g.fill2d&&(g.fillOptions=g.fillOptions.map((function(e,t){var n=r[t];if(e&&n&&n[0]&&n[0].trace){var a,i,o=n[0],s=o.trace,l=o.t,u=g.lineOptions[t],c=[];s._ownfill&&c.push(t),s._nexttrace&&c.push(t+1),c.length&&(g.fillOrder[t]=c);var d,p,h=[],f=u&&u.positions||l.positions;if("tozeroy"===s.fill){for(d=0;dd&&isNaN(f[p+1]);)p-=2;0!==f[d+1]&&(h=[f[d],0]),h=h.concat(f.slice(d,p+2)),0!==f[p+1]&&(h=h.concat([f[p],0]))}else if("tozerox"===s.fill){for(d=0;dd&&isNaN(f[p]);)p-=2;0!==f[d]&&(h=[0,f[d+1]]),h=h.concat(f.slice(d,p+2)),0!==f[p]&&(h=h.concat([0,f[p+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(h=[],a=0,i=0;i-1;for(h=0;h<_;h++){var C=r[h][0],L=C.trace,A=C.t,E=A.index,D=L._length,P=A.x,I=A.y;if(L.selectedpoints||T||S){if(T||(T=!0),L.selectedpoints){var O=g.selectBatch[E]=s.selIndices2selPoints(L),F={};for(f=0;f=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),f=t-h;if(n.getClosest(l,(function(e){var t=e.lonlat;if(t[0]===s)return 1/0;var n=a.modHalf(t[0],360),i=t[1],o=p.project([n,i]),l=o.x-c.c2p([f,i]),u=o.y-d.c2p([n,r]),h=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+u*u)-h,1-3/h)}),e),!1!==e.index){var m=l[e.index],g=m.lonlat,y=[a.modHalf(g[0],360)+h,g[1]],v=c.c2p(y),_=d.c2p(y),b=m.mrc||1;e.x0=v-b,e.x1=v+b,e.y0=_-b,e.y1=_+b;var x={};x[u.subplot]={_subplot:p};var w=u._module.formatLabels(m,u,x);return e.lonLabel=w.lonLabel,e.latLabel=w.latLabel,e.color=i(u,m),e.extraText=function(e,t,r){if(!e.hovertemplate){var n=(t.hi||e.hoverinfo).split("+"),a=-1!==n.indexOf("all"),i=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=t.lonlat,u=[];return a||i&&s?u.push("("+c(l[0])+", "+c(l[1])+")"):i?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||-1!==n.indexOf("text"))&&o(t,e,u),u.join("
")}function c(e){return e+"°"}}(u,m,l[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}}},{"../../components/fx":629,"../../constants/numerical":692,"../../lib":716,"../scatter/get_trace_color":1128}],1187:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("../scattergeo/calc"),plot:e("./plot"),hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.update(t)},moduleType:"trace",name:"scattermapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":819,"../scatter/marker_colorbar":1136,"../scattergeo/calc":1160,"./attributes":1181,"./defaults":1183,"./event_data":1184,"./format_labels":1185,"./hover":1186,"./plot":1188,"./select":1189}],1188:[function(e,t,r){"use strict";var n=e("./convert"),a=e("../../plots/mapbox/constants").traceLayerPrefix,i=["fill","line","circle","symbol"];function o(e,t){this.type="scattermapbox",this.subplot=e,this.uid=t,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol"},this.layerIds={fill:a+t+"-fill",line:a+t+"-line",circle:a+t+"-circle",symbol:a+t+"-symbol"},this.below=null}var s=o.prototype;s.addSource=function(e,t){this.subplot.map.addSource(this.sourceIds[e],{type:"geojson",data:t.geojson})},s.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)},s.addLayer=function(e,t,r){this.subplot.addLayer({type:e,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint},r)},s.update=function(e){var t,r,a,o=this.subplot,s=o.map,l=n(o.gd,e),u=o.belowLookup["trace-"+this.uid];if(u!==this.below){for(t=i.length-1;t>=0;t--)r=i[t],s.removeLayer(this.layerIds[r]);for(t=0;t=0;t--){var r=i[t];e.removeLayer(this.layerIds[r]),e.removeSource(this.sourceIds[r])}},t.exports=function(e,t){for(var r=t[0].trace,a=new o(e,r.uid),s=n(e.gd,t),l=a.below=e.belowLookup["trace-"+r.uid],u=0;u")}}t.exports={hoverPoints:function(e,t,r,i){var o=n(e,t,r,i);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,a(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:a}},{"../scatter/hover":1129}],1195:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/polar":828,"../scatter/marker_colorbar":1136,"../scatter/select":1139,"../scatter/style":1141,"./attributes":1190,"./calc":1191,"./defaults":1192,"./format_labels":1193,"./hover":1194,"./plot":1196}],1196:[function(e,t,r){"use strict";var n=e("../scatter/plot"),a=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r){for(var i=t.layers.frontplot.select("g.scatterlayer"),o={xaxis:t.xaxis,yaxis:t.yaxis,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},s=t.radialAxis,l=t.angularAxis,u=0;u=u&&(v.marker.cluster=f.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=x),v.line&&x.length>1&&l.extendFlat(v.line,s.linePositions(e,h,x)),v.text&&(l.extendFlat(v.text,{positions:x},s.textPosition(e,h,v.text,v.marker)),l.extendFlat(v.textSel,{positions:x},s.textPosition(e,h,v.text,v.markerSel)),l.extendFlat(v.textUnsel,{positions:x},s.textPosition(e,h,v.text,v.markerUnsel))),v.fill&&!p.fill2d&&(p.fill2d=!0),v.marker&&!p.scatter2d&&(p.scatter2d=!0),v.line&&!p.line2d&&(p.line2d=!0),v.text&&!p.glText&&(p.glText=!0),p.lineOptions.push(v.line),p.fillOptions.push(v.fill),p.markerOptions.push(v.marker),p.markerSelectedOptions.push(v.markerSel),p.markerUnselectedOptions.push(v.markerUnsel),p.textOptions.push(v.text),p.textSelectedOptions.push(v.textSel),p.textUnselectedOptions.push(v.textUnsel),p.selectBatch.push([]),p.unselectBatch.push([]),f.x=w,f.y=k,f.rawx=w,f.rawy=k,f.r=g,f.theta=y,f.positions=x,f._scene=p,f.index=p.count,p.count++}})),i(e,t,r)}}},{"../../lib":716,"../scattergl/constants":1171,"../scattergl/convert":1172,"../scattergl/plot":1178,"../scattergl/scene_update":1179,"fast-isnumeric":227,"point-cluster":470}],1204:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../scatter/attributes"),o=e("../../plots/attributes"),s=e("../../components/colorscale/attributes"),l=e("../../components/drawing/attributes").dash,u=e("../../lib/extend").extendFlat,c=i.marker,d=i.line,p=c.line;t.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:u({},i.mode,{dflt:"markers"}),text:u({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:u({},i.hovertext,{}),line:{color:d.color,width:d.width,dash:l,shape:u({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:u({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:u({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:u({width:p.width,editType:"calc"},s("marker.line")),gradient:c.gradient,editType:"calc"},s("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:u({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":598,"../../components/drawing/attributes":611,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scatter/attributes":1118}],1205:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../scatter/colorscale_calc"),i=e("../scatter/arrays_to_calcdata"),o=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize,l=["a","b","c"],u={a:["b","c"],b:["a","c"],c:["a","b"]};t.exports=function(e,t){var r,c,d,p,h,f,m=e._fullLayout[t.subplot].sum,g=t.sum||m,y={a:t.a,b:t.b,c:t.c};for(r=0;r"),o.hovertemplate=p.hovertemplate,i}function _(e,t){y.push(e._hovertitle+": "+t)}}},{"../scatter/hover":1129}],1210:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:e("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":841,"../scatter/marker_colorbar":1136,"../scatter/select":1139,"../scatter/style":1141,"./attributes":1204,"./calc":1205,"./defaults":1206,"./event_data":1207,"./format_labels":1208,"./hover":1209,"./plot":1211}],1211:[function(e,t,r){"use strict";var n=e("../scatter/plot");t.exports=function(e,t,r){var a=t.plotContainer;a.select(".scatterlayer").selectAll("*").remove();var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:a,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},o=t.layers.frontplot.select("g.scatterlayer");n(e,i,r,o)}},{"../scatter/plot":1138}],1212:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../components/colorscale/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../scattergl/attributes"),s=e("../../plots/cartesian/constants").idRegex,l=e("../../plot_api/plot_template").templatedArray,u=e("../../lib/extend").extendFlat,c=n.marker,d=c.line,p=u(a("marker.line",{editTypeOverride:"calc"}),{width:u({},d.width,{editType:"calc"}),editType:"calc"}),h=u(a("marker"),{symbol:c.symbol,size:u({},c.size,{editType:"markerSize"}),sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,opacity:c.opacity,colorbar:c.colorbar,line:p,editType:"calc"});function f(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[e],editType:"plot"}}}h.color.editType=h.cmin.editType=h.cmax.editType="style",t.exports={dimensions:l("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:u({},o.text,{}),hovertext:u({},o.hovertext,{}),hovertemplate:i(),marker:h,xaxes:f("x"),yaxes:f("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:o.selected.marker,editType:"calc"},unselected:{marker:o.unselected.marker,editType:"calc"},opacity:o.opacity}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/plot_template":754,"../../plots/cartesian/constants":770,"../../plots/template_attributes":840,"../scatter/attributes":1118,"../scattergl/attributes":1169}],1213:[function(e,t,r){"use strict";var n=e("regl-line2d"),a=e("../../registry"),i=e("../../lib/prepare_regl"),o=e("../../plots/get_data").getModuleCalcData,s=e("../../plots/cartesian"),l=e("../../plots/cartesian/axis_ids").getFromId,u=e("../../plots/cartesian/axes").shouldShowZeroLine,c="splom";function d(e,t,r){for(var n=r.matrixOptions.data.length,a=t._visibleDims,i=r.viewOpts.ranges=new Array(n),o=0;op?2*(b.sizeAvg||Math.max(b.size,3)):i(t,_),h=0;hi&&l?r._splomSubplots[C]=1:a-1,T=!0;if("lasso"===v||"select"===v||p.selectedpoints||M){var S=p._length;if(p.selectedpoints){f.selectBatch=p.selectedpoints;var C=p.selectedpoints,L={};for(s=0;sf[y-1]?"-":"+")+"x")).replace("y",(m[0]>m[y-1]?"-":"+")+"y")).replace("z",(g[0]>g[y-1]?"-":"+")+"z");var Y=function(){y=0,N=[],B=[],j=[]};(!y||y2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function h(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function f(e,t){var r=e.fullSceneLayout,a=e.dataScale,c=t._len,d={};function f(e,t){var n=r[t],o=a[u[t]];return i.simpleMap(e,(function(e){return n.d2l(e)*o}))}if(d.vectors=l(f(t.u,"xaxis"),f(t.v,"yaxis"),f(t.w,"zaxis"),c),!c)return{positions:[],cells:[]};var m=f(t._Xs,"xaxis"),g=f(t._Ys,"yaxis"),y=f(t._Zs,"zaxis");d.meshgrid=[m,g,y],d.gridFill=t._gridFill;var v=t._slen;if(v)d.startingPositions=l(f(t.starts.x.slice(0,v),"xaxis"),f(t.starts.y.slice(0,v),"yaxis"),f(t.starts.z.slice(0,v),"zaxis"));else{for(var _=g[0],b=p(m),x=p(y),w=new Array(b.length*x.length),k=0,M=0;M=0};g?(r=Math.min(m.length,v.length),l=function(e){return M(m[e])&&T(e)},c=function(e){return String(m[e])}):(r=Math.min(y.length,v.length),l=function(e){return M(y[e])&&T(e)},c=function(e){return String(y[e])}),b&&(r=Math.min(r,_.length));for(var S=0;S1){for(var E=i.randstr(),D=0;D"),name:M||I("name")?l.name:void 0,color:k("hoverlabel.bgcolor")||v.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:M,hovertemplateLabels:E,eventData:[d(a,l,p.eventDataKeys)]};g&&(R.x0=C-a.rInscribed*a.rpx1,R.x1=C+a.rInscribed*a.rpx1,R.idealAlign=a.pxmid[0]<0?"left":"right"),y&&(R.x=C,R.idealAlign=C<0?"left":"right"),o.loneHover(R,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}),f._hasHoverLabel=!0}if(y){var z=e.select("path.surface");p.styleOne(z,a,l,{hovered:!0})}f._hasHoverEvent=!0,r.emit("plotly_hover",{points:[d(a,l,p.eventDataKeys)],event:n.event})}})),e.on("mouseout",(function(t){var a=r._fullLayout,i=r._fullData[f.index],s=n.select(this).datum();if(f._hasHoverEvent&&(t.originalEvent=n.event,r.emit("plotly_unhover",{points:[d(s,i,p.eventDataKeys)],event:n.event}),f._hasHoverEvent=!1),f._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),f._hasHoverLabel=!1),y){var l=e.select("path.surface");p.styleOne(l,s,i,{hovered:!1})}})),e.on("click",(function(e){var t=r._fullLayout,i=r._fullData[f.index];if(!1===l.triggerHandler(r,"plotly_"+f.type+"click",{points:[d(e,i,p.eventDataKeys)],event:n.event})||g&&(u.isHierarchyRoot(e)||u.isLeaf(e)))t.hovermode&&(r._hoverdata=[d(e,i,p.eventDataKeys)],o.click(r,n.event));else if(!r._dragging&&!r._transitioning){a.call("_storeDirectGUIEdit",i,t._tracePreGUI[i.uid],{level:i.level});var s=u.getPtId(e),c=u.isEntry(e)?u.findEntryWithChild(m,s):u.findEntryWithLevel(m,s),h={data:[{level:u.getPtId(c)}],traces:[f.index]},y={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(t._hoverlayer.node()),a.call("animate",r,h,y)}}))}},{"../../components/fx":629,"../../components/fx/helpers":626,"../../lib":716,"../../lib/events":706,"../../registry":845,"../pie/helpers":1097,"./helpers":1234,d3:164}],1234:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../lib/setcursor"),o=e("../pie/helpers");function s(e){return e.data.data.pid}r.findEntryWithLevel=function(e,t){var n;return t&&e.eachAfter((function(e){if(r.getPtId(e)===t)return n=e.copy()})),n||e},r.findEntryWithChild=function(e,t){var n;return e.eachAfter((function(e){for(var a=e.children||[],i=0;i0)},r.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},r.isHeader=function(e,t){return!(r.isLeaf(e)||e.depth===t._maxDepth-1)},r.getParent=function(e,t){return r.findEntryWithLevel(e,s(t))},r.listPath=function(e,t){var n=e.parent;if(!n)return[];var a=t?[n.data[t]]:[n];return r.listPath(n,t).concat(a)},r.getPath=function(e){return r.listPath(e,"label").join("/")+"/"},r.formatValue=o.formatPieValue,r.formatPercent=function(e,t){var r=n.formatPercent(e,0);return"0%"===r&&(r=o.formatPiePercent(e,t)),r}},{"../../components/color":591,"../../lib":716,"../../lib/setcursor":736,"../pie/helpers":1097}],1235:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"sunburst",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1136,"./attributes":1228,"./base_plot":1229,"./calc":1230,"./defaults":1232,"./layout_attributes":1236,"./layout_defaults":1237,"./plot":1238,"./style":1239}],1236:[function(e,t,r){"use strict";t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1237:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("sunburstcolorway",t.colorway),r("extendsunburstcolors")}},{"../../lib":716,"./layout_attributes":1236}],1238:[function(e,t,r){"use strict";var n=e("d3"),a=e("d3-hierarchy"),i=e("../../components/drawing"),o=e("../../lib"),s=e("../../lib/svg_text_utils"),l=e("../pie/plot").transformInsideText,u=e("./style").styleOne,c=e("./fx"),d=e("./constants"),p=e("./helpers");function h(e,t,h,f){var m=e._fullLayout,g=p.hasTransition(f),y=n.select(h).selectAll("g.slice"),v=t[0],_=v.trace,b=v.hierarchy,x=p.findEntryWithLevel(b,_.level),w=p.getMaxDepth(_),k=m._size,M=_.domain,T=k.w*(M.x[1]-M.x[0]),S=k.h*(M.y[1]-M.y[0]),C=.5*Math.min(T,S),L=v.cx=k.l+k.w*(M.x[1]+M.x[0])/2,A=v.cy=k.t+k.h*(1-M.y[0])-S/2;if(!x)return y.remove();var E=null,D={};g&&y.each((function(e){D[p.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!E&&p.isEntry(e)&&(E=e)}));var P=function(e){return a.partition().size([2*Math.PI,e.height+1])(e)}(x).descendants(),I=x.height+1,O=0,F=w;v.hasMultipleRoots&&p.isHierarchyRoot(x)&&(P=P.slice(1),I-=1,O=1,F+=1),P=P.filter((function(e){return e.y1<=F}));var R=Math.min(I,w),z=function(e){return(e-O)/R*C},N=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},B=function(e){return o.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,L,A)},j=function(e){return L+e.pxmid[0]*e.transform.rCenter+(e.transform.x||0)},Y=function(e){return A+e.pxmid[1]*e.transform.rCenter+(e.transform.y||0)};(y=y.data(P,p.getPtId)).enter().append("g").classed("slice",!0),g?y.exit().transition().each((function(){var e=n.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,r=p.getPtId(e),a=D[r],i=D[p.getPtId(x)];if(i){var o=e.x1>i.x1?2*Math.PI:0;t=e.rpx1H?2*Math.PI:0;t={x0:i,x1:i}}else t={rpx0:C,rpx1:C},o.extendFlat(t,W(e));else t={rpx0:0,rpx1:0};else t={x0:0,x1:0};return n.interpolate(t,a)}(e);return function(e){return B(t(e))}})):f.attr("d",B),h.call(c,x,e,t,{eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(p.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),f.call(u,a,_);var y=o.ensureSingle(h,"g","slicetext"),b=o.ensureSingle(y,"text","",(function(e){e.attr("data-notex",1)}));b.text(r.formatSliceLabel(a,x,_,t,m)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,p.determineTextFont(_,a,m.font)).call(s.convertToTspans,e);var w=i.bBox(b.node());a.transform=l(w,a,v),a.translateX=j(a),a.translateY=Y(a);var k=function(e,t){return"translate("+e.translateX+","+e.translateY+")"+(e.transform.scale<1?"scale("+e.transform.scale+")":"")+(e.transform.rotate?"rotate("+e.transform.rotate+")":"")+"translate("+-(t.left+t.right)/2+","+-(t.top+t.bottom)/2+")"};g?b.transition().attrTween("transform",(function(e){var t=function(e){var t,r=D[p.getPtId(e)],a=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{scale:0,rotate:a.rotate,rCenter:a.rCenter,x:a.x,y:a.y}},E)if(e.parent)if(H){var i=e.x1>H?2*Math.PI:0;t.x0=t.x1=i}else o.extendFlat(t,W(e));else t.x0=t.x1=0;else t.x0=t.x1=0;var s=n.interpolate(t.rpx1,e.rpx1),l=n.interpolate(t.x0,e.x0),u=n.interpolate(t.x1,e.x1),c=n.interpolate(t.transform.scale,a.scale),d=n.interpolate(t.transform.rotate,a.rotate),h=0===a.rCenter?3:0===t.transform.rCenter?1/3:1,f=n.interpolate(t.transform.rCenter,a.rCenter);return function(e){var t=s(e),r=l(e),n=u(e),i=function(e){return f(Math.pow(e,h))}(e),o={pxmid:N(t,(r+n)/2),transform:{rCenter:i,x:a.x,y:a.y}};return{rpx1:s(e),translateX:j(o),translateY:Y(o),transform:{scale:c(e),rotate:d(e),rCenter:i}}}}(e);return function(e){return k(t(e),w)}})):b.attr("transform",k(a,w))}))}r.plot=function(e,t,r,a){var i,o,s=e._fullLayout._sunburstlayer,l=!r,u=p.hasTransition(r);(i=s.selectAll("g.trace.sunburst").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),i.order(),u?(a&&(o=a()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){s.selectAll("g.trace").each((function(t){h(e,t,this,r)}))}))):i.each((function(t){h(e,t,this,r)})),l&&i.exit().remove()},r.formatSliceLabel=function(e,t,r,n,a){var i=r.texttemplate,s=r.textinfo;if(!(i||s&&"none"!==s))return"";var l=a.separators,u=n[0],c=e.data.data,d=u.hierarchy,h=p.isHierarchyRoot(e),f=p.getParent(d,e),m=p.getValue(e);if(!i){var g,y=s.split("+"),v=function(e){return-1!==y.indexOf(e)},_=[];if(v("label")&&c.label&&_.push(c.label),c.hasOwnProperty("v")&&v("value")&&_.push(p.formatValue(c.v,l)),!h){v("current path")&&_.push(p.getPath(e.data));var b=0;v("percent parent")&&b++,v("percent entry")&&b++,v("percent root")&&b++;var x=b>1;if(b){var w,k=function(e){g=p.formatPercent(w,l),x&&(g+=" of "+e),_.push(g)};v("percent parent")&&!h&&(w=m/p.getValue(f),k("parent")),v("percent entry")&&(w=m/p.getValue(t),k("entry")),v("percent root")&&(w=m/p.getValue(d),k("root"))}}return v("text")&&(g=o.castOption(r,c.i,"text"),o.isValidTextValue(g)&&_.push(g)),_.join("
")}var M=o.castOption(r,c.i,"texttemplate");if(!M)return"";var T={};c.label&&(T.label=c.label),c.hasOwnProperty("v")&&(T.value=c.v,T.valueLabel=p.formatValue(c.v,l)),T.currentPath=p.getPath(e.data),h||(T.percentParent=m/p.getValue(f),T.percentParentLabel=p.formatPercent(T.percentParent,l),T.parent=p.getPtLabel(f)),T.percentEntry=m/p.getValue(t),T.percentEntryLabel=p.formatPercent(T.percentEntry,l),T.entry=p.getPtLabel(t),T.percentRoot=m/p.getValue(d),T.percentRootLabel=p.formatPercent(T.percentRoot,l),T.root=p.getPtLabel(d),c.hasOwnProperty("color")&&(T.color=c.color);var S=o.castOption(r,c.i,"text");return(o.isValidTextValue(S)||""===S)&&(T.text=S),T.customdata=o.castOption(r,c.i,"customdata"),o.texttemplateString(M,T,a._d3locale,T,r._meta||{})}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../pie/plot":1101,"./constants":1231,"./fx":1233,"./helpers":1234,"./style":1239,d3:164,"d3-hierarchy":158}],1239:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../../lib");function o(e,t,r){var n=t.data.data,o=!t.children,s=n.i,l=i.castOption(r,s,"marker.line.color")||a.defaultLine,u=i.castOption(r,s,"marker.line.width")||0;e.style("stroke-width",u).call(a.fill,n.color).call(a.stroke,l).style("opacity",o?r.leaf.opacity:null)}t.exports={style:function(e){e._fullLayout._sunburstlayer.selectAll(".trace").each((function(e){var t=n.select(this),r=e[0].trace;t.style("opacity",r.opacity),t.selectAll("path.surface").each((function(e){n.select(this).call(o,e,r)}))}))},styleOne:o}},{"../../components/color":591,"../../lib":716,d3:164}],1240:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l=e("../../plot_api/edit_types").overrideAll;function u(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var c=t.exports=l(s({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:u(),y:u(),z:u()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})},hoverinfo:s({},o.hoverinfo)}),"calc","nested");c.x.editType=c.y.editType=c.z.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/color":591,"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../../plots/template_attributes":840}],1241:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){t.surfacecolor?n(e,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):n(e,t,{vals:t.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":599}],1242:[function(e,t,r){"use strict";var n=e("gl-surface3d"),a=e("ndarray"),i=e("ndarray-homography"),o=e("ndarray-fill"),s=e("../../lib").isArrayOrTypedArray,l=e("../../lib/gl_format_color").parseColorScale,u=e("../../lib/str2rgbarray"),c=e("../../components/colorscale").extractOpts,d=e("../heatmap/interp2d"),p=e("../heatmap/find_empties");function h(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var f=h.prototype;f.getXat=function(e,t,r,n){var a=s(this.data.x)?s(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return void 0===r?a:n.d2l(a,0,r)},f.getYat=function(e,t,r,n){var a=s(this.data.y)?s(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return void 0===r?a:n.d2l(a,0,r)},f.getZat=function(e,t,r,n){var a=this.data.z[t][e];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[t][e]),void 0===r?a:n.d2l(a,0,r)},f.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var i=0;i<3;i++){var o=e.dataCoordinate[i];null!=o&&(e.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[a]&&void 0!==s[a][n]?e.textLabel=s[a][n]:e.textLabel=s||"",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};var m=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(e,t){if(e0){r=m[n];break}return r}function _(e,t){if(!(e<1||t<1)){for(var r=y(e),n=y(t),a=1,i=0;iw;)r--,r/=v(r),++r1?n:1},f.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],o=e[0].shape[1],s=0|Math.floor(e[0].shape[0]*t+1),l=0|Math.floor(e[0].shape[1]*r+1),u=1+n+1,c=1+o+1,d=a(new Float32Array(u*c),[u,c]),p=0;p0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(a[e]=!0,t=this.contourStart[e];ti&&(this.minValues[t]=i),this.maxValues[t]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},{}],1249:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../lib/extend").extendFlat,i=e("fast-isnumeric");function o(e){if(Array.isArray(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(n[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=i,s=u+1,i=0);return n}t.exports=function(e,t){var r=l(t.cells.values),h=function(e){return e.slice(t.header.values.length,e.length)},f=l(t.header.values);f.length&&!f[0].length&&(f[0]=[""],f=l(f));var m=f.concat(h(r).map((function(){return u((f[0]||[""]).length)}))),g=t.domain,y=Math.floor(e._fullLayout._size.w*(g.x[1]-g.x[0])),v=Math.floor(e._fullLayout._size.h*(g.y[1]-g.y[0])),_=t.header.values.length?m[0].map((function(){return t.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return t.cells.height})):[],x=_.reduce(s,0),w=p(b,v-x+n.uplift),k=d(p(_,x),[]),M=d(w,k),T={},S=t._fullInput.columnorder.concat(h(r.map((function(e,t){return t})))),C=m.map((function(e,r){var n=Array.isArray(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return i(n)?Number(n):1})),L=C.reduce(s,0);C=C.map((function(e){return e/L*y}));var A=Math.max(o(t.header.line.width),o(t.cells.line.width)),E={key:t.uid+e._context.staticPlot,translateX:g.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-g.y[1]),size:e._fullLayout._size,width:y,maxLineWidth:A,height:v,columnOrder:S,groupHeight:v,rowBlocks:M,headerRowBlocks:k,scrollY:0,cells:a({},t.cells,{values:r}),headerCells:a({},t.header,{values:m}),gdColumns:m.map((function(e){return e[0]})),gdColumnsOriginalOrder:m.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:m.map((function(e,t){var r=T[e];return T[e]=(r||0)+1,{key:e+"__"+T[e],label:e,specIndex:t,xIndex:S[t],xScale:c,x:void 0,calcdata:void 0,columnWidth:C[t]}}))};return E.columns.forEach((function(e){e.calcdata=E,e.x=c(e)})),E}},{"../../lib/extend":707,"./constants":1248,"fast-isnumeric":227}],1250:[function(e,t,r){"use strict";var n=e("../../lib/extend").extendFlat;r.splitToPanels=function(e){var t=[0,0],r=n({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:n({},e.calcdata,{cells:e.calcdata.headerCells})});return[n({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),r]},r.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}}))}},{"../../lib/extend":707}],1251:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../plots/domain").defaults;t.exports=function(e,t,r,o){function s(r,i){return n.coerce(e,t,a,r,i)}i(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),n.coerceFont(s,"header.font",n.extendFlat({},o.font)),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,a=r.slice(0,n),i=a.slice().sort((function(e,t){return e-t})),o=a.map((function(e){return i.indexOf(e)})),s=o.length;s/i),l=!o||s;e.mayHaveMarkup=o&&i.match(/[<&>]/);var u,c="string"==typeof(u=i)&&u.match(n.latexCheck);e.latex=c;var d,p,h=c?"":x(e.calcdata.cells.prefix,t,r)||"",f=c?"":x(e.calcdata.cells.suffix,t,r)||"",m=c?null:x(e.calcdata.cells.format,t,r)||null,g=h+(m?a.format(m)(e.value):e.value)+f;if(e.wrappingNeeded=!e.wrapped&&!l&&!c&&(d=b(g)),e.cellHeightMayIncrease=s||c||e.mayHaveMarkup||(void 0===d?b(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var y=(" "===n.wrapSplitCharacter?g.replace(/a&&n.push(i),a+=l}return n}(a,l,s);1===u.length&&(u[0]===a.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each((function(e,t){e.page=u[t],e.scrollY=l})),t.attr("transform",(function(e){return"translate(0 "+(I(e.rowBlocks,e.page)-e.scrollY)+")"})),e&&(L(e,r,t,u,n.prevPages,n,0),L(e,r,t,u,n.prevPages,n,1),y(r,e))}}function C(e,t,r,i){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter((function(e){return s.key===e.key})),u=r||s.scrollbarState.dragMultiplier,c=s.scrollY;s.scrollY=void 0===i?s.scrollY+u*a.event.dy:i;var d=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return S(e,d,l),s.scrollY===c}}function L(e,t,r,n,a,i,o){n[o]!==a[o]&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout((function(){var i=r.filter((function(e,t){return t===o&&n[t]!==a[t]}));v(e,t,i,r),a[o]=n[o]})))}function A(e,t,r,i){return function(){var o=a.select(t.parentNode);o.each((function(e){var t=e.fragments;o.selectAll("tspan.line").each((function(e,r){t[r].width=this.getComputedTextLength()}));var r,a,i=t[t.length-1].width,s=t.slice(0,-1),l=[],u=0,c=e.column.columnWidth-2*n.cellPad;for(e.value="";s.length;)u+(a=(r=s.shift()).width+i)>c&&(e.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],u=0),l.push(r.text),u+=a;u&&(e.value+=l.join(n.wrapSpacer)),e.wrapped=!0})),o.selectAll("tspan.line").remove(),_(o.select("."+n.cn.cellText),r,e,i),a.select(t.parentNode.parentNode).call(P)}}function E(e,t,r,i,o){return function(){if(!o.settledY){var s=a.select(t.parentNode),l=R(o),u=o.key-l.firstRowIndex,c=l.rows[u].rowHeight,d=o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*n.cellPad:c,p=Math.max(d,c);p-l.rows[u].rowHeight&&(l.rows[u].rowHeight=p,e.selectAll("."+n.cn.columnCell).call(P),S(null,e.filter(k),0),y(r,i,!0)),s.attr("transform",(function(){var e=this.parentNode.getBoundingClientRect(),t=a.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),i=t.top-e.top+(r?r.matrix.f:n.cellPad);return"translate("+D(o,a.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+i+")"})),o.settledY=!0}}}function D(e,t){switch(e.align){case"left":return n.cellPad;case"right":return e.column.columnWidth-(t||0)-n.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return n.cellPad}}function P(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+O(t,1/0)}),0);return"translate(0 "+(O(R(e),e.key)+t)+")"})).selectAll("."+n.cn.cellRect).attr("height",(function(e){return(t=R(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight;var t,r}))}function I(e,t){for(var r=0,n=t-1;n>=0;n--)r+=F(e[n]);return r}function O(e,t){for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:c({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:a({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:u.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:s.outsidetextfont,textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},domain:o({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/domain":789,"../../plots/template_attributes":840,"../pie/attributes":1092,"../sunburst/attributes":1228,"./constants":1257}],1255:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="treemap",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],1256:[function(e,t,r){"use strict";var n=e("../sunburst/calc");r.calc=function(e,t){return n.calc(e,t)},r.crossTraceCalc=function(e){return n._runCrossTraceCalc("treemap",e)}},{"../sunburst/calc":1230}],1257:[function(e,t,r){"use strict";t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1258:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../components/color"),o=e("../../plots/domain").defaults,s=e("../bar/defaults").handleText,l=e("../bar/constants").TEXTPAD,u=e("../../components/colorscale"),c=u.hasColorscale,d=u.handleDefaults;t.exports=function(e,t,r,u){function p(r,i){return n.coerce(e,t,a,r,i)}var h=p("labels"),f=p("parents");if(h&&h.length&&f&&f.length){var m=p("values");m&&m.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),"squarify"===p("tiling.packing")&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var g=p("text");p("texttemplate"),t.texttemplate||p("textinfo",Array.isArray(g)?"text+label":"label"),p("hovertext"),p("hovertemplate"),s(e,t,u,p,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var y=-1!==t.textposition.indexOf("bottom");p("marker.line.width")&&p("marker.line.color",u.paper_bgcolor);var v=p("marker.colors"),_=t._hasColorscale=c(e,"marker","colors");_?d(e,t,u,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(v||[]).length);var b=2*t.textfont.size;p("marker.pad.t",y?b/4:b),p("marker.pad.l",b/4),p("marker.pad.r",b/4),p("marker.pad.b",y?b:b/4),_&&d(e,t,u,p,{prefix:"marker.",cLetter:"c"}),t._hovered={marker:{line:{width:2,color:i.contrast(u.paper_bgcolor)}}},p("pathbar.visible")&&(n.coerceFont(p,"pathbar.textfont",u.font),p("pathbar.thickness",t.pathbar.textfont.size+2*l),p("pathbar.side"),p("pathbar.edgeshape")),o(t,u,p),t._length=null}else t.visible=!1}},{"../../components/color":591,"../../components/colorscale":603,"../../lib":716,"../../plots/domain":789,"../bar/constants":857,"../bar/defaults":859,"./attributes":1254}],1259:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../../lib/svg_text_utils"),s=e("./partition"),l=e("./style").styleOne,u=e("./constants"),c=e("../sunburst/helpers"),d=e("../sunburst/fx");t.exports=function(e,t,r,p,h){var f=h.barDifY,m=h.width,g=h.height,y=h.viewX,v=h.viewY,_=h.pathSlice,b=h.toMoveInsideSlice,x=h.strTransform,w=h.hasTransition,k=h.handleSlicesExit,M=h.makeUpdateSliceInterpolator,T=h.makeUpdateTextInterpolator,S={},C=e._fullLayout,L=t[0],A=L.trace,E=L.hierarchy,D=m/A._entryDepth,P=c.listPath(r.data,"id"),I=s(E.copy(),[m,g],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(I=I.filter((function(e){var t=P.indexOf(e.data.id);return-1!==t&&(e.x0=D*t,e.x1=D*(t+1),e.y0=f,e.y1=f+g,e.onPathbar=!0,!0)}))).reverse(),(p=p.data(I,c.getPtId)).enter().append("g").classed("pathbar",!0),k(p,!0,S,[m,g],_),p.order();var O=p;w&&(O=O.transition().each("end",(function(){var t=n.select(this);c.setSliceCursor(t,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),O.each((function(s){s._hoverX=y(s.x1-g/2),s._hoverY=v(s.y1-g/2);var p=n.select(this),h=a.ensureSingle(p,"path","surface",(function(e){e.style("pointer-events","all")}));w?h.transition().attrTween("d",(function(e){var t=M(e,!0,S,[m,g]);return function(e){return _(t(e))}})):h.attr("d",_),p.call(d,r,e,t,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),h.call(l,s,A,{hovered:!1}),s._text=(c.getPtLabel(s)||"").split("
").join(" ")||"";var f=a.ensureSingle(p,"g","slicetext"),k=a.ensureSingle(f,"text","",(function(e){e.attr("data-notex",1)}));k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,c.determineTextFont(A,s,C.font,A.pathdir)).call(o.convertToTspans,e),s.textBB=i.bBox(k.node()),s.transform=b(s,{onPathbar:!0}),c.isOutsideText(A,s)&&(s.transform.targetY-=c.getOutsideTextFontKey("size",A,s,C.font)-c.getInsideTextFontKey("size",A,s,C.font)),w?k.transition().attrTween("transform",(function(e){var t=T(e,!0,S,[m,g]);return function(e){return x(t(e))}})):k.attr("transform",x(s))}))}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../sunburst/fx":1233,"../sunburst/helpers":1234,"./constants":1257,"./partition":1264,"./style":1266,d3:164}],1260:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../../lib/svg_text_utils"),s=e("./partition"),l=e("./style").styleOne,u=e("./constants"),c=e("../sunburst/helpers"),d=e("../sunburst/fx"),p=e("../sunburst/plot").formatSliceLabel;t.exports=function(e,t,r,h,f){var m=f.width,g=f.height,y=f.viewX,v=f.viewY,_=f.pathSlice,b=f.toMoveInsideSlice,x=f.strTransform,w=f.hasTransition,k=f.handleSlicesExit,M=f.makeUpdateSliceInterpolator,T=f.makeUpdateTextInterpolator,S=f.prevEntry,C=e._fullLayout,L=t[0].trace,A=-1!==L.textposition.indexOf("left"),E=-1!==L.textposition.indexOf("right"),D=-1!==L.textposition.indexOf("bottom"),P=!D&&!L.marker.pad.t||D&&!L.marker.pad.b,I=s(r,[m,g],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),O=1/0,F=-1/0;I.forEach((function(e){var t=e.depth;t>=L._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),F=Math.max(F,t))})),h=h.data(I,c.getPtId),L._maxVisibleLayers=isFinite(F)?F-O+1:0,h.enter().append("g").classed("slice",!0),k(h,!1,{},[m,g],_),h.order();var R=null;if(w&&S){var z=c.getPtId(S);h.each((function(e){null===R&&c.getPtId(e)===z&&(R={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var N=function(){return R||{x0:0,x1:m,y0:0,y1:g}},B=h;return w&&(B=B.transition().each("end",(function(){var t=n.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){var h=c.isHeader(s,L);s._hoverX=y(s.x1-L.marker.pad.r),s._hoverY=v(D?s.y1-L.marker.pad.b/2:s.y0+L.marker.pad.t/2);var f=n.select(this),k=a.ensureSingle(f,"path","surface",(function(e){e.style("pointer-events","all")}));w?k.transition().attrTween("d",(function(e){var t=M(e,!1,N(),[m,g]);return function(e){return _(t(e))}})):k.attr("d",_),f.call(d,r,e,t,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),k.call(l,s,L,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h?P?"":c.getPtLabel(s)||"":p(s,r,L,t,C)||"";var S=a.ensureSingle(f,"g","slicetext"),I=a.ensureSingle(S,"text","",(function(e){e.attr("data-notex",1)}));I.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",E?"end":A||h?"start":"middle").call(i.font,c.determineTextFont(L,s,C.font)).call(o.convertToTspans,e),s.textBB=i.bBox(I.node()),s.transform=b(s,{isHeader:h}),w?I.transition().attrTween("transform",(function(e){var t=T(e,!1,N(),[m,g]);return function(e){return x(t(e))}})):I.attr("transform",x(s))})),R}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../sunburst/fx":1233,"../sunburst/helpers":1234,"../sunburst/plot":1238,"./constants":1257,"./partition":1264,"./style":1266,d3:164}],1261:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"treemap",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1136,"./attributes":1254,"./base_plot":1255,"./calc":1256,"./defaults":1258,"./layout_attributes":1262,"./layout_defaults":1263,"./plot":1265,"./style":1266}],1262:[function(e,t,r){"use strict";t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1263:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("treemapcolorway",t.colorway),r("extendtreemapcolors")}},{"../../lib":716,"./layout_attributes":1262}],1264:[function(e,t,r){"use strict";var n=e("d3-hierarchy");t.exports=function(e,t,r){var a,i=r.flipX,o=r.flipY,s="dice-slice"===r.packing,l=r.pad[o?"bottom":"top"],u=r.pad[i?"right":"left"],c=r.pad[i?"left":"right"],d=r.pad[o?"top":"bottom"];s&&(a=u,u=l,l=a,a=c,c=d,d=a);var p=n.treemap().tile(function(e,t){switch(e){case"squarify":return n.treemapSquarify.ratio(t);case"binary":return n.treemapBinary;case"dice":return n.treemapDice;case"slice":return n.treemapSlice;default:return n.treemapSliceDice}}(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(u).paddingRight(c).paddingTop(l).paddingBottom(d).size(s?[t[1],t[0]]:t)(e);return(s||i||o)&&function e(t,r,n){var a;n.swapXY&&(a=t.x0,t.x0=t.y0,t.y0=a,a=t.x1,t.x1=t.y1,t.y1=a),n.flipX&&(a=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-a),n.flipY&&(a=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-a);var i=t.children;if(i)for(var o=0;o-1?C+E:-(A+E):0,P={x0:L,x1:L,y0:D,y1:D+A},I=function(e,t,r){var n=m.tiling.pad,a=function(e){return e-n<=t.x0},i=function(e){return e+n>=t.x1},o=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return{x0:a(e.x0-n)?0:i(e.x0-n)?r[0]:e.x0,x1:a(e.x1+n)?0:i(e.x1+n)?r[0]:e.x1,y0:o(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:o(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},O=null,F={},R={},z=null,N=function(e,t){return t?F[p(e)]:R[p(e)]},B=function(e,t,r,n){if(t)return F[p(g)]||P;var a=R[m.level]||r;return function(e){return e.data.depth-y.data.depth=(n-=g.r-s)){var y=(r+n)/2;r=y-s,n=y+s}var v;c?a<(v=i-g.b)&&v"===J?(l.x-=i,u.x-=i,c.x-=i,d.x-=i):"/"===J?(c.x-=i,d.x-=i,o.x-=i/2,s.x-=i/2):"\\"===J?(l.x-=i,u.x-=i,o.x-=i/2,s.x-=i/2):"<"===J&&(o.x-=i,s.x-=i),X(l),X(d),X(o),X(u),X(c),X(s),"M"+K(l.x,l.y)+"L"+K(u.x,u.y)+"L"+K(s.x,s.y)+"L"+K(c.x,c.y)+"L"+K(d.x,d.y)+"L"+K(o.x,o.y)+"Z"},toMoveInsideSlice:$,makeUpdateSliceInterpolator:ee,makeUpdateTextInterpolator:te,handleSlicesExit:re,hasTransition:w,strTransform:ne})}t.exports=function(e,t,r,i){var o,s,l=e._fullLayout._treemaplayer,u=!r;(o=l.selectAll("g.trace.treemap").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("treemap",!0),o.order(),a(r)?(i&&(s=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){s&&s()})).each("interrupt",(function(){s&&s()})).each((function(){l.selectAll("g.trace").each((function(t){h(e,t,this,r)}))}))):o.each((function(t){h(e,t,this,r)})),u&&o.exit().remove()}},{"../../lib":716,"../bar/constants":857,"../bar/plot":866,"../sunburst/helpers":1234,"./constants":1257,"./draw_ancestors":1259,"./draw_descendants":1260,d3:164}],1266:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../../lib"),o=e("../sunburst/helpers");function s(e,t,r,n){var s,l,u=(n||{}).hovered,c=t.data.data,d=c.i,p=c.color,h=o.isHierarchyRoot(t),f=1;if(u)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(h&&"rgba(0,0,0,0)"===p)f=0,s="rgba(0,0,0,0)",l=0;else if(s=i.castOption(r,d,"marker.line.color")||a.defaultLine,l=i.castOption(r,d,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var m=r.marker.depthfade;if(m){var g,y=a.combine(a.addOpacity(r._backgroundColor,.75),p);if(!0===m){var v=o.getMaxDepth(r);g=isFinite(v)?o.isLeaf(t)?0:r._maxVisibleLayers-(t.data.depth-r._entryDepth):t.data.height+1}else g=t.data.depth-r._entryDepth,r._atRootLevel||g++;if(g>0)for(var _=0;_0){var v,_,b,x,w,k=e.xa,M=e.ya;"h"===p.orientation?(w=t,v="y",b=M,_="x",x=k):(w=r,v="x",b=k,_="y",x=M);var T=d[e.index];if(w>=T.span[0]&&w<=T.span[1]){var S=n.extendFlat({},e),C=x.c2p(w,!0),L=o.getKdeValue(T,p,w),A=o.getPositionOnKdePath(T,p,C),E=b._offset,D=b._length;S[v+"0"]=A[0],S[v+"1"]=A[1],S[_+"0"]=S[_+"1"]=C,S[_+"Label"]=_+": "+a.hoverLabelText(x,w)+", "+d[0].t.labels.kde+" "+L.toFixed(3),S.spikeDistance=y[0].spikeDistance;var P=v+"Spike";S[P]=y[0][P],y[0].spikeDistance=void 0,y[0][P]=void 0,S.hovertemplate=!1,g.push(S),(c={stroke:e.color})[v+"1"]=n.constrain(E+A[0],E,E+D),c[v+"2"]=n.constrain(E+A[1],E,E+D),c[_+"1"]=c[_+"2"]=x._offset+C}}f&&(g=g.concat(y))}-1!==h.indexOf("points")&&(u=i.hoverOnPoints(e,t,r));var I=l.selectAll(".violinline-"+p.uid).data(c?[0]:[]);return I.enter().append("line").classed("violinline-"+p.uid,!0).attr("stroke-width",1.5),I.exit().remove(),I.attr(c),"closest"===s?u?[u]:g:u?(g.push(u),g):g}},{"../../lib":716,"../../plots/cartesian/axes":764,"../box/hover":884,"./helpers":1271}],1273:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../box/select"),moduleType:"trace",name:"violin",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../box/defaults":882,"../box/select":889,"../scatter/style":1141,"./attributes":1267,"./calc":1268,"./cross_trace_calc":1269,"./defaults":1270,"./hover":1272,"./layout_attributes":1274,"./layout_defaults":1275,"./plot":1276,"./style":1277}],1274:[function(e,t,r){"use strict";var n=e("../box/layout_attributes"),a=e("../../lib").extendFlat;t.exports={violinmode:a({},n.boxmode,{}),violingap:a({},n.boxgap,{}),violingroupgap:a({},n.boxgroupgap,{})}},{"../../lib":716,"../box/layout_attributes":886}],1275:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes"),i=e("../box/layout_defaults");t.exports=function(e,t,r){i._supply(e,t,r,(function(r,i){return n.coerce(e,t,a,r,i)}),"violin")}},{"../../lib":716,"../box/layout_defaults":887,"./layout_attributes":1274}],1276:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../box/plot"),s=e("../scatter/line_points"),l=e("./helpers");t.exports=function(e,t,r,u){var c=e._fullLayout,d=t.xaxis,p=t.yaxis;function h(e){var t=s(e,{xaxis:d,yaxis:p,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return i.smoothopen(t[0],1)}a.makeTraceGroups(u,r,"trace violins").each((function(e){var r=n.select(this),i=e[0],s=i.t,u=i.trace;if(!0!==u.visible||s.empty)r.remove();else{var f=s.bPos,m=s.bdPos,g=t[s.valLetter+"axis"],y=t[s.posLetter+"axis"],v="both"===u.side,_=v||"positive"===u.side,b=v||"negative"===u.side,x=r.selectAll("path.violin").data(a.identity);x.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each((function(e){var t,r,a,i,o,l,d,p,x=n.select(this),w=e.density,k=w.length,M=y.c2l(e.pos+f,!0),T=y.l2p(M);if(u.width)t=s.maxKDE/m;else{var S=c._violinScaleGroupStats[u.scalegroup];t="count"===u.scalemode?S.maxKDE/m*(S.maxCount/e.pts.length):S.maxKDE/m}if(_){for(d=new Array(k),o=0;o")),u.color=function(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,o=r.line.width;return a(n)?n:a(i)&&o?i:void 0}(d,f),[u]}function w(e){return n(h,e)}}},{"../../components/color":591,"../../constants/delta.js":686,"../../plots/cartesian/axes":764,"../bar/hover":862}],1289:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../bar/select":867,"./attributes":1282,"./calc":1283,"./cross_trace_calc":1285,"./defaults":1286,"./event_data":1287,"./hover":1288,"./layout_attributes":1290,"./layout_defaults":1291,"./plot":1292,"./style":1293}],1290:[function(e,t,r){"use strict";t.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],1291:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){var i=!1;function o(r,i){return n.coerce(e,t,a,r,i)}for(var s=0;s0&&(m+=d?"M"+c[0]+","+h[1]+"V"+h[0]:"M"+c[1]+","+h[0]+"H"+c[0]),"between"!==p&&(r.isSum||o path").each((function(e){if(!e.isBlank){var t=l[e.dir].marker;n.select(this).call(i.fill,t.color).call(i.stroke,t.line.color).call(a.dashLine,t.line.dash,t.line.width).style("opacity",l.selectedpoints&&!e.selected?o:1)}})),s(r,l,e),r.selectAll(".lines").each((function(){var e=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},{"../../components/color":591,"../../components/drawing":612,"../../constants/interactions":691,"../bar/style":869,d3:164}],1294:[function(e,t,r){"use strict";var n=e("../plots/cartesian/axes"),a=e("../lib"),i=e("../plot_api/plot_schema"),o=e("./helpers").pointsAccessorFunction,s=e("../constants/numerical").BADNUM;r.moduleType="transform",r.name="aggregate";var l=r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},u=l.aggregations;function c(e,t,r,i){if(i.enabled){for(var o=i.target,l=a.nestedProperty(t,o),u=l.get(),c=function(e,t){var r=e.func,n=t.d2c,a=t.c2d;switch(r){case"count":return d;case"first":return p;case"last":return h;case"sum":return function(e,t){for(var r=0,i=0;ii&&(i=c,o=u)}}return i?a(o):s};case"rms":return function(e,t){for(var r=0,i=0,o=0;o":return function(e){return p(e)>s};case">=":return function(e){return p(e)>=s};case"[]":return function(e){var t=p(e);return t>=s[0]&&t<=s[1]};case"()":return function(e){var t=p(e);return t>s[0]&&t=s[0]&&ts[0]&&t<=s[1]};case"][":return function(e){var t=p(e);return t<=s[0]||t>=s[1]};case")(":return function(e){var t=p(e);return ts[1]};case"](":return function(e){var t=p(e);return t<=s[0]||t>s[1]};case")[":return function(e){var t=p(e);return t=s[1]};case"{}":return function(e){return-1!==s.indexOf(p(e))};case"}{":return function(e){return-1===s.indexOf(p(e))}}}(r,i.getDataToCoordFunc(e,t,s,a),p),_={},b={},x=0;f?(g=function(e){_[e.astr]=n.extendDeep([],e.get()),e.set(new Array(d))},y=function(e,t){var r=_[e.astr][t];e.get()[t]=r}):(g=function(e){_[e.astr]=n.extendDeep([],e.get()),e.set([])},y=function(e,t){var r=_[e.astr][t];e.get().push(r)}),M(g);for(var w=o(t.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=e.styles,u=o.styles=[];if(l)for(i=0;i1?r-1:0),a=1;a2&&void 0!==arguments[2]&&arguments[2];try{for(var n=this._props[t||this._language],a=e.split("."),i=0;i=20?"ste":"de")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},a={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,r,i,o){var s=n(t),l=a[e][n(t)];return 2===s&&(l=l[r?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,a,i,o){var s=r(t),l=n[e][r(t)];return 2===s&&(l=l[a?0:1]),l.replace(/%d/i,t)}},i=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,r){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var r=e%10;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n,a;return"m"===r?t?"хвіліна":"хвіліну":"h"===r?t?"гадзіна":"гадзіну":e+" "+(n=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[r].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&r<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},r={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,r){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},r={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,r){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[r],e)}e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n=e+" ";switch(r){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var r=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(r="a"),e+r},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),r="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),n=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],a=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function i(e){return e>1&&e<5&&1!=~~(e/10)}function o(e,t,r,n){var a=e+" ";switch(r){case"s":return t||n?"pár sekund":"pár sekundami";case"ss":return t||n?a+(i(e)?"sekundy":"sekund"):a+"sekundami";case"m":return t?"minuta":n?"minutu":"minutou";case"mm":return t||n?a+(i(e)?"minuty":"minut"):a+"minutami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?a+(i(e)?"hodiny":"hodin"):a+"hodinami";case"d":return t||n?"den":"dnem";case"dd":return t||n?a+(i(e)?"dny":"dní"):a+"dny";case"M":return t||n?"měsíc":"měsícem";case"MM":return t||n?a+(i(e)?"měsíce":"měsíců"):a+"měsíci";case"y":return t||n?"rok":"rokem";case"yy":return t||n?a+(i(e)?"roky":"let"):a+"lety"}}e.defineLocale("cs",{months:t,monthsShort:r,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[r][0]:a[r][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[r][0]:a[r][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[r][0]:a[r][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],r=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:r,weekdaysShort:r,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,r){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,r){return e>11?r?"μμ":"ΜΜ":r?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var r,n=this._calendarEl[e],a=t&&t.hours();return((r=n)instanceof Function||"[object Function]"===Object.prototype.toString.call(r))&&(n=n.apply(t)),n.replace("{}",a%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,r){return e>11?r?"p.t.m.":"P.T.M.":r?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?a[r][2]?a[r][2]:a[r][1]:n?a[r][0]:a[r][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},r={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,r){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),r=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function n(e,n,a,i){var o="";switch(a){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"ss":return i?"sekunnin":"sekuntia";case"m":return i?"minuutin":"minuutti";case"mm":o=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":o=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":o=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":o=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":o=i?"vuoden":"vuotta"}return o=function(e,n){return e<10?n?r[e]:t[e]:e}(e,i)+" "+o}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),r="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],monthsShort:["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],weekdaysShort:["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],weekdaysMin:["Do","Lu","Má","Ce","Dé","hA","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?a[r][0]:a[r][1]}e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},r={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,r){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?r?'לפנה"צ':"לפני הצהריים":e<18?r?'אחה"צ':"אחרי הצהריים":"בערב"}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n=e+" ";switch(r){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function r(e,t,r,n){var a=e;switch(r){case"s":return n||t?"néhány másodperc":"néhány másodperce";case"ss":return a+(n||t)?" másodperc":" másodperce";case"m":return"egy"+(n||t?" perc":" perce");case"mm":return a+(n||t?" perc":" perce");case"h":return"egy"+(n||t?" óra":" órája");case"hh":return a+(n||t?" óra":" órája");case"d":return"egy"+(n||t?" nap":" napja");case"dd":return a+(n||t?" nap":" napja");case"M":return"egy"+(n||t?" hónap":" hónapja");case"MM":return a+(n||t?" hónap":" hónapja");case"y":return"egy"+(n||t?" év":" éve");case"yy":return a+(n||t?" év":" éve")}return""}function n(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,r){return e<12?!0===r?"de":"DE":!0===r?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return n.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return n.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function r(e,r,n,a){var i=e+" ";switch(n){case"s":return r||a?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?i+(r||a?"sekúndur":"sekúndum"):i+"sekúnda";case"m":return r?"mínúta":"mínútu";case"mm":return t(e)?i+(r||a?"mínútur":"mínútum"):r?i+"mínúta":i+"mínútu";case"hh":return t(e)?i+(r||a?"klukkustundir":"klukkustundum"):i+"klukkustund";case"d":return r?"dagur":a?"dag":"degi";case"dd":return t(e)?r?i+"dagar":i+(a?"daga":"dögum"):r?i+"dagur":i+(a?"dag":"degi");case"M":return r?"mánuður":a?"mánuð":"mánuði";case"MM":return t(e)?r?i+"mánuðir":i+(a?"mánuði":"mánuðum"):r?i+"mánuður":i+(a?"mánuð":"mánuði");case"y":return r||a?"ár":"ári";case"yy":return t(e)?i+(r||a?"ár":"árum"):i+(r||a?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:r,ss:r,m:r,mm:r,h:"klukkustund",hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,r){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},r={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,r){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},r={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,r){return e<12?"오전":"오후"}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:n,monthsShort:n,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,r){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?a[r][0]:a[r][1]}function r(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return r(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return r(e)}return r(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return r(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return r(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,r){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function r(e,t,r,n){return t?a(r)[0]:n?a(r)[1]:a(r)[2]}function n(e){return e%10==0||e>10&&e<20}function a(e){return t[e].split("_")}function i(e,t,i,o){var s=e+" ";return 1===e?s+r(0,t,i[0],o):t?s+(n(e)?a(i)[1]:a(i)[0]):o?s+a(i)[1]:s+(n(e)?a(i)[1]:a(i)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,r,n){return t?"kelios sekundės":n?"kelių sekundžių":"kelias sekundes"},ss:i,m:r,mm:i,h:r,hh:i,d:r,dd:i,M:r,MM:i,y:r,yy:i},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function r(e,t,r){return r?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function n(e,n,a){return e+" "+r(t[a],e,n)}function a(e,n,a){return r(t[a],e,n)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:n,m:a,mm:n,h:a,hh:n,d:a,dd:n,M:a,MM:n,y:a,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,r,n){var a=t.words[n];return 1===n.length?r?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&r<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,r){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){switch(r){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,r){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function n(e,t,r,n){var a="";if(t)switch(r){case"s":a="काही सेकंद";break;case"ss":a="%d सेकंद";break;case"m":a="एक मिनिट";break;case"mm":a="%d मिनिटे";break;case"h":a="एक तास";break;case"hh":a="%d तास";break;case"d":a="एक दिवस";break;case"dd":a="%d दिवस";break;case"M":a="एक महिना";break;case"MM":a="%d महिने";break;case"y":a="एक वर्ष";break;case"yy":a="%d वर्षे"}else switch(r){case"s":a="काही सेकंदां";break;case"ss":a="%d सेकंदां";break;case"m":a="एका मिनिटा";break;case"mm":a="%d मिनिटां";break;case"h":a="एका तासा";break;case"hh":a="%d तासां";break;case"d":a="एका दिवसा";break;case"dd":a="%d दिवसां";break;case"M":a="एका महिन्या";break;case"MM":a="%d महिन्यां";break;case"y":a="एका वर्षा";break;case"yy":a="%d वर्षां"}return a.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},r={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,r){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),r="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),r="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},r={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),r="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function n(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function a(e,t,r){var a=e+" ";switch(r){case"ss":return a+(n(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return a+(n(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return a+(n(e)?"godziny":"godzin");case"MM":return a+(n(e)?"miesiące":"miesięcy");case"yy":return a+(n(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,n){return e?""===n?"("+r[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(n)?r[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:a,m:a,mm:a,h:a,hh:a,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:a,y:"rok",yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n=" ";return(e%100>=20||e>=100&&e%100==0)&&(n=" de "),e+n+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[r]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n,a;return"m"===r?t?"минута":"минуту":e+" "+(n=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[r].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],r=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:r,weekdaysShort:r,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,r){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,r){return e>11?r?"ප.ව.":"පස් වරු":r?"පෙ.ව.":"පෙර වරු"}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),r="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function n(e){return e>1&&e<5}function a(e,t,r,a){var i=e+" ";switch(r){case"s":return t||a?"pár sekúnd":"pár sekundami";case"ss":return t||a?i+(n(e)?"sekundy":"sekúnd"):i+"sekundami";case"m":return t?"minúta":a?"minútu":"minútou";case"mm":return t||a?i+(n(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":return t||a?i+(n(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||a?"deň":"dňom";case"dd":return t||a?i+(n(e)?"dni":"dní"):i+"dňami";case"M":return t||a?"mesiac":"mesiacom";case"MM":return t||a?i+(n(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||a?"rok":"rokom";case"yy":return t||a?i+(n(e)?"roky":"rokov"):i+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:r,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a=e+" ";switch(r){case"s":return t||n?"nekaj sekund":"nekaj sekundami";case"ss":return a+=1===e?t?"sekundo":"sekundi":2===e?t||n?"sekundi":"sekundah":e<5?t||n?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return a+=1===e?t?"minuta":"minuto":2===e?t||n?"minuti":"minutama":e<5?t||n?"minute":"minutami":t||n?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return a+=1===e?t?"ura":"uro":2===e?t||n?"uri":"urama":e<5?t||n?"ure":"urami":t||n?"ur":"urami";case"d":return t||n?"en dan":"enim dnem";case"dd":return a+=1===e?t||n?"dan":"dnem":2===e?t||n?"dni":"dnevoma":t||n?"dni":"dnevi";case"M":return t||n?"en mesec":"enim mesecem";case"MM":return a+=1===e?t||n?"mesec":"mesecem":2===e?t||n?"meseca":"mesecema":e<5?t||n?"mesece":"meseci":t||n?"mesecev":"meseci";case"y":return t||n?"eno leto":"enim letom";case"yy":return a+=1===e?t||n?"leto":"letom":2===e?t||n?"leti":"letoma":e<5?t||n?"leta":"leti":t||n?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,r){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,r,n){var a=t.words[n];return 1===n.length?r?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,r,n){var a=t.words[n];return 1===n.length?r?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,r){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},r={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,r){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,r){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function r(e,r,n,a){var i=function(e){var r=Math.floor(e%1e3/100),n=Math.floor(e%100/10),a=e%10,i="";return r>0&&(i+=t[r]+"vatlh"),n>0&&(i+=(""!==i?" ":"")+t[n]+"maH"),a>0&&(i+=(""!==i?" ":"")+t[a]),""===i?"pagh":i}(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:r,m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,r){switch(r){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return n?a[r][0]:t?a[r][0]:a[r][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,r){return e>11?r?"d'o":"D'O":r?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,r){var n=100*e+t;return n<600?"يېرىم كېچە":n<900?"سەھەر":n<1130?"چۈشتىن بۇرۇن":n<1230?"چۈش":n<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n,a;return"m"===r?t?"хвилина":"хвилину":"h"===r?t?"година":"годину":e+" "+(n=+e,a={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[r].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}function r(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var r={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?r.nominative.slice(1,7).concat(r.nominative.slice(0,1)):e?r[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:r.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:r("[Сьогодні "),nextDay:r("[Завтра "),lastDay:r("[Вчора "),nextWeek:r("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return r("[Минулої] dddd [").call(this);case 1:case 2:case 4:return r("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],r=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:r,weekdaysShort:r,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,r){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,r){return e<12?r?"sa":"SA":r?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(1))},function(e,t,r){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(1))},function(e,t,r){var n=r(205);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(9)(n,a);n.locals&&(e.exports=n.locals)},function(e){e.exports=JSON.parse('{"loremIpsum":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.","defaultClassNames":"Class {0}","defaultFeatureNames":"Sensitive feature {0}","defaultSingleFeatureName":"Sensitive feature","accuracyTab":"Fairness in Accuracy","opportunityTab":"Fairness in Opportunity","modelComparisonTab":"Model comparison","tableTab":"Detail View","dataSpecifications":"Data statistics","attributes":"Attributes","singleAttributeCount":"1 sensitive feature","attributesCount":"{0} sensitive features","instanceCount":"{0} instances","close":"Close","calculating":"Calculating...","accuracyMetric":"Accuracy metric","errorOnInputs":"Error with input. Sensitive features must be categorical values at this time. Please map values to binned categories and retry.","Accuracy":{"header":"How do you want to measure accuracy?","modelMakes":"model makes","modelsMake":"models make","body":"Your data contains {0} labels and your {2} {1} predictions. Based on that information, we recommend the following metrics. Please select one metric from the list.","binaryClassifier":"binary classifier","probabalisticRegressor":"probit regressor","regressor":"regressor","binary":"binary","continuous":"continuous"},"Parity":{"header":"Fairness measured in terms of disparity","body":"Disparity metrics quantify variation of your model\'s behavior across selected features. There are two kinds of disparity metrics: more to come...."},"Header":{"title":"fairlearn","documentation":"Documentation"},"Footer":{"back":"Back","next":"Next"},"Intro":{"welcome":"Welcome to the","fairlearnDashboard":"fairlearn dashboard","introBody":"The fairlearn dashboard enables you to assess tradeoffs between accuracy and fairness of your models","explanatoryStep":"To set up the assessment, you need to specify a sensitive feature and an accuracy metric.","getStarted":"Get started","features":"Sensitive features","featuresInfo":"Sensitive features are used to split your data into groups. Fairness of your model across these groups is measured by disparity metrics. Disparity metrics quantify how much your model\'s behavior varies across these groups.","accuracy":"Accuracy metric","accuracyInfo":"Accuracy metrics are used to evaluate the overall quality of your model as well as the quality of your model in each group. The difference between the extreme values of accuracy is reported as the disparity in accuracy."},"ModelComparison":{"title":"Model comparison","howToRead":"How to read this chart","lower":"lower","higher":"higher","howToReadText":"This chart represents each of the {0} models as a selectable point. The x-axis represents {1}, with {2} being better. The y-axis represents disparity, with lower being better.","insights":"Insights","insightsText1":"The chart shows {0} and disparity of {1} models.","insightsText2":"{0} ranges from {1} to {2}. The disparity ranges from {3} to {4}.","insightsText3":"The most accurate model achieves {0} of {1} and a disparity of {2}.","insightsText4":"The lowest-disparity model achieves {0} of {1} and a disparity of {2}.","disparityInOutcomes":"Disparity in predictions","disparityInAccuracy":"Disparity in {0}","howToMeasureDisparity":"How should disparity be measured?"},"Report":{"modelName":"Model {0}","title":"Disparity in accuracy","globalAccuracyText":"Is the overall {0}","accuracyDisparityText":"Is the disparity in {0}","editConfiguration":"Edit configuration","backToComparisons":"Multimodel view","outcomesTitle":"Disparity in predictions","minTag":"Min","maxTag":"Max","groupLabel":"Subgroup","underestimationError":"Underprediction","underpredictionExplanation":"(predicted = 0, true = 1)","overpredictionExplanation":"(predicted = 1, true = 0)","overestimationError":"Overprediction","classificationOutcomesHowToRead":"The bar chart shows the selection rate in each group, meaning the fraction of points classified as 1.","regressionOutcomesHowToRead":"Box plots show the distribution of predictions in each group. Individual data points are overlaid on top.","classificationAccuracyHowToRead1":"The bar chart shows the distribution of errors in each group.","classificationAccuracyHowToRead2":"Errors are split into overprediction errors (predicting 1 when the true label is 0), and underprediction errors (predicting 0 when the true label is 1).","classificationAccuracyHowToRead3":"The reported rates are obtained by dividing the number of errors by the overall group size.","probabilityAccuracyHowToRead1":"The bar chart shows mean absolute error in each group, split into overprediction and underprediction.","probabilityAccuracyHowToRead2":"On each example, we measure the difference between the prediction and the label. If it is positive, we call it overprediction and if it is negative, we call it underprediction.","probabilityAccuracyHowToRead3":"We report the sum of overprediction errors and the sum of underprediction errors divided by the overall group size.","regressionAccuracyHowToRead":"Error is the difference between the prediction and the label. Box plots show the distribution of errors in each group. Individual data points are overlaid on top.","distributionOfPredictions":"Distribution of predictions","distributionOfErrors":"Distribution of errors","tooltipPrediction":"Prediction: {0}","tooltipError":"Error: {0}"},"Feature":{"header":"Along which features would you like to evaluate your model\'s fairness?","body":"Fairness is evaluated in terms of disparities in your model\'s behavior. We will split your data according to values of each selected feature, and evaluate how your model\'s accuracy and predictions differ across these splits.","learnMore":"Learn more","summaryCategoricalCount":"This feature has {0} unique values","summaryNumericCount":"This numeric feature ranges from {0} to {1}, and is grouped into {2} bins.","showCategories":"Show all","hideCategories":"Collapse","categoriesOverflow":" and {0} additional categories","editBinning":"Edit groups","subgroups":"Subgroups"},"Metrics":{"accuracyScore":"Accuracy","precisionScore":"Precision","recallScore":"Recall","zeroOneLoss":"Zero-one loss","specificityScore":"Specificity score","missRate":"Miss rate","falloutRate":"Fallout rate","maxError":"Max error","meanAbsoluteError":"Mean absolute error","meanSquaredError":" MSE (mean squared error)","meanSquaredLogError":"Mean squared log error","medianAbsoluteError":"Median absolute error","average":"Average prediction","selectionRate":"Selection rate","overprediction":"Overprediction","underprediction":"Underprediction","r2_score":"R-squared score","rms_error":"RMSE (root mean squared error)","auc":"Area under ROC curve","balancedRootMeanSquaredError":"Balanced RMSE","accuracyDescription":"The fraction of data points classified correctly.","precisionDescription":"The fraction of data points classified correctly among those classified as 1.","recallDescription":"The fraction of data points classified correctly among those whose true label is 1. Alternative names: true positive rate, sensitivity.","rmseDescription":"Square root of the average of squared errors.","mseDescription":"The average of squared errors.","meanAbsoluteErrorDescription":"The average of absolute values of errors. More robust to outliers than MSE.","r2Description":"The fraction of variance in the labels explained by the model.","aucDescription":"The quality of the predictions, viewed as scores, in separating positive examples from negative examples.","balancedRMSEDescription":"Positive and negative examples are reweighted to have equal total weight. Suitable if the underlying data is highly imbalanced.","balancedAccuracy":"Balanced accuracy","balancedAccuracyDescription":"Positive and negative examples are reweighted to have equal total weight. Suitable if the underlying data is highly imbalanced."},"BinDialog":{"header":"Configure bins","makeCategorical":"Treat as categorical","save":"Save","cancel":"Cancel","numberOfBins":"Number of bins:","categoryHeader":"Bin values:"}}')},function(e){e.exports=JSON.parse('{"selectPoint":"Select a point to see its local explanation","defaultClassNames":"Class {0}","defaultFeatureNames":"Feature {0}","absoluteAverage":"Average of absolute value","predictedClass":"Predicted class","dataExploration":"Data Exploration","globalImportance":"Global Importance","explanationExploration":"Explanation Exploration","summaryImportance":"Summary Importance","featureImportance":"Feature Importance","perturbationExploration":"Perturbation Exploration","localFeatureImportance":"Local Feature Importance","ice":"ICE","clearSelection":"Clear selection","feature":"Feature:","intercept":"Intercept","ExplanationScatter":{"dataLabel":"Data : {0}","importanceLabel":"Importance : {0}","predictedY":"PredictedY","index":"Index","dataGroupLabel":"Data","output":"Output","probabilityLabel":"Probability : {0}","trueY":"True Y","class":"class","xValue":"X value:","yValue":"Y value:","colorValue":"Color:"},"CrossClass":{"label":"Cross-class weighting:","info":"Info","overviewInfo":"Multiclass models generate an independent feature importance vector for each class. Each class\'s feature importance vector demonstrates which features made a class more likely or less likely. You can select how the weights of the per-class feature importance vectors are summarized into a single value:","absoluteValInfo":"Average of absolute value: Shows the sum of the feature\'s importance across all possible classes, divided by number of classes","predictedClassInfo":"Predicted class: Shows the feature importance value for a given point\'s predicted class","enumeratedClassInfo":"Enumerated class names: Shows only the specified class\'s feature importance values across all data points.","close":"Close"},"AggregateImportance":{"scaledFeatureValue":"Scaled Feature Value","low":"Low","high":"High","featureLabel":"Feature: {0}","valueLabel":"Feature value: {0}","importanceLabel":"Importance: {0}","predictedClassTooltip":"Predicted Class: {0}","trueClassTooltip":"True Class: {0}","predictedOutputTooltip":"Predicted Output: {0}","trueOutputTooltip":"True Output: {0}","topKFeatures":"Top K Features:","scaledFeatureValues":"Scaled Feature Values","predictedValue":"Predicted Value","predictedClass":"Predicted Class","trueValue":"True Value","trueClass":"True Class","noColor":"None","tooManyRows":"The provided dataset is larger than this chart can support"},"BarChart":{"classLabel":"Class: {0}","sortBy":"Sort by","noData":"No Data","absoluteGlobal":"Absolute global","absoluteLocal":"Absolute local","calculatingExplanation":"Calculating explanation"},"IcePlot":{"numericError":"Must be numeric","integerError":"Must be an integer","prediction":"Prediction","predictedProbability":"Predicted probability","predictionLabel":"Prediction: {0}","probabilityLabel":"Probability: {0}","noModelError":"Please provide an operationalized model to explore predictions in ICE plots.","featurePickerLabel":"Feature:","minimumInputLabel":"Minimum:","maximumInputLabel":"Maximum:","stepInputLabel":"Steps:","loadingMessage":"Loading data...","submitPrompt":"Submit a range to view an ICE plot","topLevelErrorMessage":"Error in parameter","errorPrefix":"Error encountered: {0}"},"PerturbationExploration":{"loadingMessage":"Loading...","perturbationLabel":"Perturbation:"},"PredictionLabel":{"predictedValueLabel":"Predicted value : {0}","predictedClassLabel":"Predicted class : {0}"},"Violin":{"groupNone":"No grouping","groupPredicted":"Predicted Y","groupTrue":"True Y","groupBy":"Group by"},"FeatureImportanceWrapper":{"chartType":"Chart type:","violinText":"Violin","barText":"Bar","boxText":"Box","beehiveText":"Swarm","globalImportanceExplanation":"Global feature importance is calculated by averaging the absolute value of the feature importance of all points (L1 normalization). ","multiclassImportanceAddendum":"All points are included in calculating a feature\'s importance for all classes, no differential weighting is used. So a feature that has large negative importance for many points predicted to not be of \'Class A\' will greatly increase that feature\'s \'Class A\' importance."},"Fairness":{"accuracyTab":"Fairness in Accuracy","opportunityTab":"Fairness in Opportunity","modelComparisonTab":"Model Comparison","tableTab":"Detail View","dataSpecifications":"Data Specifications","attributes":"Attributes","attributesCount":"{0} attributes","instanceCount":"{0} instances","Accuracy":{"header":"How do you want to measure accuracy","body":"We have determined that your model generates {0} predictions. Based on the information, we recommend the following accuracy metrics:"},"Parity":{"header":"Fairness measured in terms of disparity","body":"Disparity metrics quantify variation of your model\'s behavior across selected features. There are two kinds of disparity metrics: more to come...."},"Footer":{"back":"Back","next":"Next"},"Report":{"title":"Accuracy and fairness assessment"}}}')},function(e,t,r){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,a){if(e===a)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(a))return!1;if(!0===t(e)){if(e.length!==a.length)return!1;for(var i=0;i":!0,"=":!0,"!":!0},g={" ":!0,"\t":!0,"\n":!0};function y(e){return e>="0"&&e<="9"||"-"===e}function v(){}v.prototype={tokenize:function(e){var t,r,n,a,i=[];for(this._current=0;this._current="a"&&a<="z"||a>="A"&&a<="Z"||"_"===a)t=this._current,r=this._consumeUnquotedIdentifier(e),i.push({type:"UnquotedIdentifier",value:r,start:t});else if(void 0!==f[e[this._current]])i.push({type:f[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(y(e[this._current]))n=this._consumeNumber(e),i.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),i.push(n);else if('"'===e[this._current])t=this._current,r=this._consumeQuotedIdentifier(e),i.push({type:"QuotedIdentifier",value:r,start:t});else if("'"===e[this._current])t=this._current,r=this._consumeRawStringLiteral(e),i.push({type:"Literal",value:r,start:t});else if("`"===e[this._current]){t=this._current;var o=this._consumeLiteral(e);i.push({type:"Literal",value:o,start:t})}else if(void 0!==m[e[this._current]])i.push(this._consumeOperator(e));else if(void 0!==g[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,i.push({type:"And",value:"&&",start:t})):i.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var s=new Error("Unknown character:"+e[this._current]);throw s.name="LexerError",s}t=this._current,this._current++,"|"===e[this._current]?(this._current++,i.push({type:"Or",value:"||",start:t})):i.push({type:"Pipe",value:"|",start:t})}return i},_consumeUnquotedIdentifier:function(e){var t,r=this._current;for(this._current++;this._current="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(r,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var r=e.length;'"'!==e[this._current]&&this._current"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var _={};function b(){}function x(e){this.runtime=e}function w(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[o]}]},avg:{_func:this._functionAvg,_signature:[{types:[p]}]},ceil:{_func:this._functionCeil,_signature:[{types:[o]}]},contains:{_func:this._functionContains,_signature:[{types:[l,u]},{types:[s]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[l]},{types:[l]}]},floor:{_func:this._functionFloor,_signature:[{types:[o]}]},length:{_func:this._functionLength,_signature:[{types:[l,u,c]}]},map:{_func:this._functionMap,_signature:[{types:[d]},{types:[u]}]},max:{_func:this._functionMax,_signature:[{types:[p,h]}]},merge:{_func:this._functionMerge,_signature:[{types:[c],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[u]},{types:[d]}]},sum:{_func:this._functionSum,_signature:[{types:[p]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[l]},{types:[l]}]},min:{_func:this._functionMin,_signature:[{types:[p,h]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[u]},{types:[d]}]},type:{_func:this._functionType,_signature:[{types:[s]}]},keys:{_func:this._functionKeys,_signature:[{types:[c]}]},values:{_func:this._functionValues,_signature:[{types:[c]}]},sort:{_func:this._functionSort,_signature:[{types:[h,p]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[u]},{types:[d]}]},join:{_func:this._functionJoin,_signature:[{types:[l]},{types:[h]}]},reverse:{_func:this._functionReverse,_signature:[{types:[l,u]}]},to_array:{_func:this._functionToArray,_signature:[{types:[s]}]},to_string:{_func:this._functionToString,_signature:[{types:[s]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[s]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[s],variadic:!0}]}}}_.EOF=0,_.UnquotedIdentifier=0,_.QuotedIdentifier=0,_.Rbracket=0,_.Rparen=0,_.Comma=0,_.Rbrace=0,_.Number=0,_.Current=0,_.Expref=0,_.Pipe=1,_.Or=2,_.And=3,_.EQ=5,_.GT=5,_.LT=5,_.GTE=5,_.LTE=5,_.NE=5,_.Flatten=9,_.Star=20,_.Filter=21,_.Dot=40,_.Not=45,_.Lbrace=50,_.Lbracket=55,_.Lparen=60,b.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=(new v).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e<_[n];)this._advance(),r=this.led(n,r),n=this._lookahead(0);return r},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,r;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var n={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(_.Not)]};case"Star":return t=null,{type:"ValueProjection",children:[{type:"Identity"},t="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(_.Star)]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[{type:"Identity"}]},t=this._parseProjectionRHS(_.Flatten)]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(_.Star)]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return{type:"ExpressionReference",children:[r=this.expression(_.Expref)]};case"Lparen":for(var a=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(r={type:"Current"},this._advance()):r=this.expression(0),a.push(r);return this._match("Rparen"),a[0];default:this._errorToken(e)}},led:function(e,t){var r;switch(e){case"Dot":var n=_.Dot;return"Star"!==this._lookahead(0)?{type:"Subexpression",children:[t,r=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,r=this._parseProjectionRHS(n)]});case"Pipe":return{type:"Pipe",children:[t,r=this.expression(_.Pipe)]};case"Or":return{type:"OrExpression",children:[t,r=this.expression(_.Or)]};case"And":return{type:"AndExpression",children:[t,r=this.expression(_.And)]};case"Lparen":for(var a,i=t.name,o=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(a={type:"Current"},this._advance()):a=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),o.push(a);return this._match("Rparen"),{type:"Function",name:i,children:o};case"Filter":var s=this.expression(0);return this._match("Rbracket"),{type:"FilterProjection",children:[t,r="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(_.Filter),s]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(_.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case"Lbracket":var l=this._lookaheadToken(0);return"Number"===l.type||"Colon"===l.type?(r=this._parseIndexExpression(),this._projectIfSlice(t,r)):(this._match("Star"),this._match("Rbracket"),{type:"Projection",children:[t,r=this._parseProjectionRHS(_.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),r=new Error("Expected "+e+", got: "+t.type);throw r.name="ParserError",r}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match("Rbracket"),e},_projectIfSlice:function(e,t){var r={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[r,this._parseProjectionRHS(_.Star)]}:r},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,r=this._lookahead(0);"Rbracket"!==r&&t<3;){if("Colon"===r)t++,this._advance();else{if("Number"!==r){var n=this._lookahead(0),a=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw a.name="Parsererror",a}e[t]=this._lookaheadToken(0).value,this._advance()}r=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(_[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return["UnquotedIdentifier","QuotedIdentifier","Star"].indexOf(t)>=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(_[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n=[],a=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),a.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),r={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(r),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:n}}},x.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,i){var o,s,l,u,c,d,p,h,f;switch(e.type){case"Field":return null===i?null:r(i)?void 0===(d=i[e.name])?null:d:null;case"Subexpression":for(l=this.visit(e.children[0],i),f=1;f0)for(f=v;f<_;f+=b)l.push(i[f]);else for(f=v;f>_;f+=b)l.push(i[f]);return l;case"Projection":var x=this.visit(e.children[0],i);if(!t(x))return null;for(h=[],f=0;fc;break;case"GTE":l=u>=c;break;case"LT":l=u=e&&(t=r<0?e-1:e),t}},w.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){var n,a,i,o;if(r[r.length-1].variadic){if(t.length=0;n--)r+=t[n];return r}var a=e[0].slice(0);return a.reverse(),a},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],a=e[1],i=0;i0){if(this._getTypeName(e[0][0])===o)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n0){if(this._getTypeName(e[0][0])===o)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;ns?1:os&&(s=r,t=a[u]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],a=e[0],i=this.createKeyFunction(n,[o,l]),s=1/0,u=0;u0&&c(t)}))}function c(e,t){i.loadStyles?i.loadStyles(h(e).styleString,e):function(e){if("undefined"==typeof document)return;var t=document.getElementsByTagName("head")[0],r=document.createElement("style"),n=h(e),o=n.styleString,s=n.themable;r.setAttribute("data-load-themed-styles","true"),r.type="text/css",a&&r.setAttribute("nonce",a);r.appendChild(document.createTextNode(o)),i.perf.count++,t.appendChild(r);var l=document.createEvent("HTMLEvents");l.initEvent("styleinsert",!0,!1),l.args={newStyle:r},document.dispatchEvent(l);var u={styleElement:r,themableStyle:e};s?i.registeredThemableStyles.push(u):i.registeredStyles.push(u)}(e)}function d(e){void 0===e&&(e=3),3!==e&&2!==e||(p(i.registeredStyles),i.registeredStyles=[]),3!==e&&1!==e||(p(i.registeredThemableStyles),i.registeredThemableStyles=[])}function p(e){e.forEach((function(e){var t=e&&e.styleElement;t&&t.parentElement&&t.parentElement.removeChild(t)}))}function h(e){var t=i.theme,r=!1;return{styleString:(e||[]).map((function(e){var n=e.theme;if(n){r=!0;var a=t?t[n]:void 0,i=e.defaultValue||"inherit";return!t||a||!console||n in t||"undefined"==typeof DEBUG||!DEBUG||console.warn('Theming value not provided for "'+n+'". Falling back to "'+i+'".'),a||i}return e.rawString})).join(""),themable:r}}function f(e){var t=[];if(e){for(var r=0,n=void 0;n=o.exec(e);){var a=n.index;a>r&&t.push({rawString:e.substring(r,a)}),t.push({theme:n[1],defaultValue:n[2]}),r=o.lastIndex}t.push({rawString:e.substring(r)})}return t}t.loadStyles=function(e,t){void 0===t&&(t=!1),l((function(){var r=Array.isArray(e)?e:f(e),n=i.runState,a=n.mode,o=n.buffer,s=n.flushTimer;t||1===a?(o.push(r),s||(i.runState.flushTimer=setTimeout((function(){i.runState.flushTimer=0,u()}),0))):c(r)}))},t.configureLoadStyles=function(e){i.loadStyles=e},t.configureRunMode=function(e){i.runState.mode=e},t.flush=u,t.loadTheme=function(e){i.theme=e,function(){if(i.theme){for(var e=[],t=0,r=i.registeredThemableStyles;t0&&(d(1),c([].concat.apply([],e)))}}()},t.clearStyles=d,t.detokenize=function(e){return e&&(e=h(f(e)).styleString),e},t.splitStyles=f}).call(this,r(28))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(173);t.version=n.version,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(174))},,,,,,,,function(e){e.exports=JSON.parse('{"name":"fairlearn-widget","version":"0.1.0","description":"Fairlearn widget for Jupyter notebooks","author":"Brandon Horn (rihorn@microsoft.com)","license":"MIT","main":"lib/index.js","types":"./lib/index.d.ts","repository":{"type":"git","url":"https://github.com/fairlearn/fairlearn"},"keywords":["jupyter","widgets","ipython","ipywidgets","jupyterlab-extension"],"files":["lib/**/*.js","dist/*.js"],"scripts":{"build":"npm run build:lib && npm run build:nbextension","build:labextension":"npm run clean:labextension && mkdirp fairlearn_widget/labextension && cd fairlearn_widget/labextension && npm pack ../..","build:lib":"tsc","build:nbextension":"webpack -p","build:all":"npm run build:lib && npm run build:labextension && npm run build:nbextension","clean":"npm run clean:lib && npm run clean:nbextension","clean:lib":"rimraf lib","clean:labextension":"rimraf fairlearn_widget/labextension","clean:nbextension":"rimraf fairlearn_widget/nbextension/static/index.js"},"devDependencies":{"@phosphor/application":"^1.6.0","@phosphor/widgets":"^1.6.0","@types/node":"^10.11.6","@types/react-dom":"^16.8.4","mkdirp":"^0.5.1","rimraf":"^2.6.1","source-map-loader":"^0.2.4","ts-loader":"^5.2.1","typescript":"~3.1.2","terser-webpack-plugin":"^1.4.2","serialize-javascript":">=2.1.1","webpack":"4.41.2","webpack-cli":"^3.3.1"},"dependencies":{"@jupyter-widgets/base":"^1.1.10","css-loader":"^2.1.1","lodash":"^4.17.11","fairlearn-dashboard":"0.0.16","react":"^16.8.6","react-dom":"^16.8.6","style-loader":"^0.23.1"},"jupyterlab":{"extension":"lib/labplugin"}}')},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(175),o=r(210),s=n(r(2)),l=a(r(0)),u=a(r(14));class c extends i.DOMWidgetModel{defaults(){return{_model_name:"FairlearnModel",_view_name:"FairlearnView",_model_module:"fairlearn-widget",_view_module:"fairlearn-widget",_model_module_version:"0.1.1",_view_module_version:"0.1.1",value:{},request:{},response:{}}}}t.FairlearnModel=c;class d extends i.DOMWidgetView{constructor(){super(...arguments),this.requestIndex=0,this.promiseDict={}}render(){this.el.style.cssText="width: 100%; overflow-x: 'auto'";let e=document.createElement("div");e.style.cssText="width: 100%; overflow-x: 'auto'",this.model.on("change:response",this.resolvePromise,this);const t=this.model.get("value");u.default.render(l.default.createElement(o.FairnessWizard,{dataSummary:{featureNames:t.features,classNames:t.classes},testData:t.dataset,predictedY:t.predicted_ys,trueY:t.true_y,modelNames:t.model_names,supportedBinaryClassificationAccuracyKeys:t.classification_methods,supportedRegressionAccuracyKeys:t.regression_methods,supportedProbabilityAccuracyKeys:t.probability_methods,requestMetrics:this.makeRequest.bind(this)}),e),this.el.appendChild(e)}makeRequest(e,t){return new Promise((r,n)=>{const a=s.cloneDeep(this.model.get("request")),i=this.requestIndex;this.requestIndex++;const o=window.setTimeout(()=>{this.promiseDict[i]&&(this.promiseDict[i].reject(new DOMException("Timeout: took longer than 3 minutes to process","TimeoutError")),delete this.promiseDict[i])},18e4);this.promiseDict[i]={resolve:r,reject:n,timeout:o},a[i]=e,this.model.set("request",a),this.touch(),this.refreshTimeout&&clearTimeout(this.refreshTimeout),this.refreshTimeout=window.setTimeout(()=>{if(void 0!==this.promiseDict[i]){const e=s.cloneDeep(this.model.get("request"));this.model.set("request",e),this.touch(),clearTimeout(this.refreshTimeout)}},3e3),t&&t.addEventListener("abort",()=>{clearTimeout(o),n(new DOMException("Aborted","AbortError")),delete this.promiseDict[i]})})}resolvePromise(){const e=this.model.get("response");void 0!==e&&Object.keys(e).forEach(t=>{const r=this.promiseDict[t],n=e[t];if(void 0!==r){if(void 0===n)r.reject("Null response");else if(void 0!==n.error)r.reject(new DOMException(n.error,"PythonError"));else{const e=Object.keys(n.bins),t=new Array(Math.max(...e)+1);e.forEach(e=>t[e]=n.bins[e]),n.bins=t,r.resolve(n)}clearTimeout(r.timeout),delete this.promiseDict[t]}})}}t.FairlearnView=d},function(t,r){t.exports=e},function(e,t,r){"use strict"; /** @license React v16.12.0 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n=r(31),a="function"==typeof Symbol&&Symbol.for,i=a?Symbol.for("react.element"):60103,o=a?Symbol.for("react.portal"):60106,s=a?Symbol.for("react.fragment"):60107,l=a?Symbol.for("react.strict_mode"):60108,u=a?Symbol.for("react.profiler"):60114,c=a?Symbol.for("react.provider"):60109,d=a?Symbol.for("react.context"):60110,p=a?Symbol.for("react.forward_ref"):60112,h=a?Symbol.for("react.suspense"):60113;a&&Symbol.for("react.suspense_list");var f=a?Symbol.for("react.memo"):60115,m=a?Symbol.for("react.lazy"):60116;a&&Symbol.for("react.fundamental"),a&&Symbol.for("react.responder"),a&&Symbol.for("react.scope");var g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;rD.length&&D.push(e)}function O(e,t,r){return null==e?0:function e(t,r,n,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case o:l=!0}}if(l)return n(a,t,""===r?"."+F(t,0):r),1;if(l=0,r=""===r?".":r+":",Array.isArray(t))for(var u=0;u=0?e.substring(0,r):e;return t[n]?n:Object.keys(t)[0]},t.validateTranslationKeys=function(e){var t=["_interfaceLanguage","_language","_defaultLanguage","_defaultLanguageFirstLevelKeys","_props"];e.forEach((function(e){if(-1!==t.indexOf(e))throw new Error(e+" cannot be used as a key. It is a reserved word.")}))},t.randomPseudo=function(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n>>((3&t)<<3)&255;return a}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,a=r;return[a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]]].join("")}},function(e,t,r){var n={"./af":33,"./af.js":33,"./ar":34,"./ar-dz":35,"./ar-dz.js":35,"./ar-kw":36,"./ar-kw.js":36,"./ar-ly":37,"./ar-ly.js":37,"./ar-ma":38,"./ar-ma.js":38,"./ar-sa":39,"./ar-sa.js":39,"./ar-tn":40,"./ar-tn.js":40,"./ar.js":34,"./az":41,"./az.js":41,"./be":42,"./be.js":42,"./bg":43,"./bg.js":43,"./bm":44,"./bm.js":44,"./bn":45,"./bn.js":45,"./bo":46,"./bo.js":46,"./br":47,"./br.js":47,"./bs":48,"./bs.js":48,"./ca":49,"./ca.js":49,"./cs":50,"./cs.js":50,"./cv":51,"./cv.js":51,"./cy":52,"./cy.js":52,"./da":53,"./da.js":53,"./de":54,"./de-at":55,"./de-at.js":55,"./de-ch":56,"./de-ch.js":56,"./de.js":54,"./dv":57,"./dv.js":57,"./el":58,"./el.js":58,"./en-SG":59,"./en-SG.js":59,"./en-au":60,"./en-au.js":60,"./en-ca":61,"./en-ca.js":61,"./en-gb":62,"./en-gb.js":62,"./en-ie":63,"./en-ie.js":63,"./en-il":64,"./en-il.js":64,"./en-nz":65,"./en-nz.js":65,"./eo":66,"./eo.js":66,"./es":67,"./es-do":68,"./es-do.js":68,"./es-us":69,"./es-us.js":69,"./es.js":67,"./et":70,"./et.js":70,"./eu":71,"./eu.js":71,"./fa":72,"./fa.js":72,"./fi":73,"./fi.js":73,"./fo":74,"./fo.js":74,"./fr":75,"./fr-ca":76,"./fr-ca.js":76,"./fr-ch":77,"./fr-ch.js":77,"./fr.js":75,"./fy":78,"./fy.js":78,"./ga":79,"./ga.js":79,"./gd":80,"./gd.js":80,"./gl":81,"./gl.js":81,"./gom-latn":82,"./gom-latn.js":82,"./gu":83,"./gu.js":83,"./he":84,"./he.js":84,"./hi":85,"./hi.js":85,"./hr":86,"./hr.js":86,"./hu":87,"./hu.js":87,"./hy-am":88,"./hy-am.js":88,"./id":89,"./id.js":89,"./is":90,"./is.js":90,"./it":91,"./it-ch":92,"./it-ch.js":92,"./it.js":91,"./ja":93,"./ja.js":93,"./jv":94,"./jv.js":94,"./ka":95,"./ka.js":95,"./kk":96,"./kk.js":96,"./km":97,"./km.js":97,"./kn":98,"./kn.js":98,"./ko":99,"./ko.js":99,"./ku":100,"./ku.js":100,"./ky":101,"./ky.js":101,"./lb":102,"./lb.js":102,"./lo":103,"./lo.js":103,"./lt":104,"./lt.js":104,"./lv":105,"./lv.js":105,"./me":106,"./me.js":106,"./mi":107,"./mi.js":107,"./mk":108,"./mk.js":108,"./ml":109,"./ml.js":109,"./mn":110,"./mn.js":110,"./mr":111,"./mr.js":111,"./ms":112,"./ms-my":113,"./ms-my.js":113,"./ms.js":112,"./mt":114,"./mt.js":114,"./my":115,"./my.js":115,"./nb":116,"./nb.js":116,"./ne":117,"./ne.js":117,"./nl":118,"./nl-be":119,"./nl-be.js":119,"./nl.js":118,"./nn":120,"./nn.js":120,"./pa-in":121,"./pa-in.js":121,"./pl":122,"./pl.js":122,"./pt":123,"./pt-br":124,"./pt-br.js":124,"./pt.js":123,"./ro":125,"./ro.js":125,"./ru":126,"./ru.js":126,"./sd":127,"./sd.js":127,"./se":128,"./se.js":128,"./si":129,"./si.js":129,"./sk":130,"./sk.js":130,"./sl":131,"./sl.js":131,"./sq":132,"./sq.js":132,"./sr":133,"./sr-cyrl":134,"./sr-cyrl.js":134,"./sr.js":133,"./ss":135,"./ss.js":135,"./sv":136,"./sv.js":136,"./sw":137,"./sw.js":137,"./ta":138,"./ta.js":138,"./te":139,"./te.js":139,"./tet":140,"./tet.js":140,"./tg":141,"./tg.js":141,"./th":142,"./th.js":142,"./tl-ph":143,"./tl-ph.js":143,"./tlh":144,"./tlh.js":144,"./tr":145,"./tr.js":145,"./tzl":146,"./tzl.js":146,"./tzm":147,"./tzm-latn":148,"./tzm-latn.js":148,"./tzm.js":147,"./ug-cn":149,"./ug-cn.js":149,"./uk":150,"./uk.js":150,"./ur":151,"./ur.js":151,"./uz":152,"./uz-latn":153,"./uz-latn.js":153,"./uz.js":152,"./vi":154,"./vi.js":154,"./x-pseudo":155,"./x-pseudo.js":155,"./yo":156,"./yo.js":156,"./zh-cn":157,"./zh-cn.js":157,"./zh-hk":158,"./zh-hk.js":158,"./zh-tw":159,"./zh-tw.js":159};function a(e){var t=i(e);return r(t)}function i(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}a.keys=function(){return Object.keys(n)},a.resolve=i,e.exports=a,a.id=180},function(e,t,r){var n=r(182);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(9)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(8)(!1)).push([e.i,".GridChart {\n height: 100%;\n width: 100%; }\n\n.centered {\n text-align: center; }\n\n.hidden {\n display: none; }\n\n.LoadingScreen {\n top: 50%;\n left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%); }\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(a=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}},function(e,t,r){var n=r(185);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(9)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(8)(!1)).push([e.i,'.tile {\n background-color: whitesmoke;\n margin: 15px;\n width: 200px;\n min-height: 120px;\n box-sizing: border-box;\n box-shadow: 0 0 15px -2px #ccc;\n padding: 5px;\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .tile .tile-label {\n font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n overflow-wrap: break-word;\n font-size: 20px;\n padding: 3px 4px 15px 4px; }\n .tile.edited {\n border: 2px solid #0078D4;\n padding: 3px;\n border-radius: 5px; }\n .tile.error {\n border: 2px solid #A80000;\n padding: 3px;\n border-radius: 5px; }\n',""])},function(e,t,r){"use strict"; /** @license React v16.12.0 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n=r(0),a=r(31),i=r(187);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r