diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a3fb8c96..15dcde0ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased +### Added +* [#543](https://github.com/plotly/dash-bio/pull/543) Added Dash Pileup component. + ## [0.6.1] - 2021-02-15 ### Fixed * [#544](https://github.com/plotly/dash-bio/pull/544) Miscellaneous fixes for NglMoleculeViewer component. diff --git a/MANIFEST.in b/MANIFEST.in index 64f06e956..63b583cad 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include dash_bio/bundle.js +include dash_bio/dash_bio-shared.js include dash_bio/async-*.js include dash_bio/async-*.js.map include dash_bio/metadata.json diff --git a/NAMESPACE b/NAMESPACE index 9496d8571..8c6bacc60 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -10,6 +10,7 @@ export(dashbioMolecule3dViewer) export(dashbioNeedlePlot) export(dashbioNglMoleculeViewer) export(dashbioOncoPrint) +export(dashbioPileup) export(dashbioSequenceViewer) export(dashbioSpeck) export(dashbioVolcano) diff --git a/R/dashbioPileup.R b/R/dashbioPileup.R new file mode 100644 index 000000000..9057c7eee --- /dev/null +++ b/R/dashbioPileup.R @@ -0,0 +1,18 @@ +# AUTO GENERATED FILE - DO NOT EDIT + +dashbioPileup <- function(id=NULL, style=NULL, className=NULL, range=NULL, reference=NULL, tracks=NULL) { + + props <- list(id=id, style=style, className=className, range=range, reference=reference, tracks=tracks) + if (length(props) > 0) { + props <- props[!vapply(props, is.null, logical(1))] + } + component <- list( + props = props, + type = 'Pileup', + namespace = 'dash_bio', + propNames = c('id', 'style', 'className', 'range', 'reference', 'tracks'), + package = 'dashBio' + ) + + structure(component, class = c('dash_component', 'list')) +} diff --git a/R/internal.R b/R/internal.R index b3e4b6a19..1db85d6cc 100644 --- a/R/internal.R +++ b/R/internal.R @@ -26,6 +26,12 @@ all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", version = "0.6.1", src = list(href = NULL, file = "deps"), meta = NULL, +script = 'async-pileup.js', +stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", +all_files = FALSE, async = TRUE), class = "html_dependency"), +`dash_bio` = structure(list(name = "dash_bio", +version = "0.6.1", src = list(href = NULL, +file = "deps"), meta = NULL, script = 'async-moleculeviewer2.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), @@ -92,6 +98,12 @@ all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", version = "0.6.1", src = list(href = NULL, file = "deps"), meta = NULL, +script = 'async-pileup.js.map', +stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", +all_files = FALSE, dynamic = TRUE), class = "html_dependency"), +`dash_bio` = structure(list(name = "dash_bio", +version = "0.6.1", src = list(href = NULL, +file = "deps"), meta = NULL, script = 'async-moleculeviewer2.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), @@ -136,6 +148,12 @@ version = "0.6.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'bundle.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", -all_files = FALSE), class = "html_dependency")) +all_files = FALSE), class = "html_dependency"), +`dash_bio-shared` = structure(list(name = "dash_bio-shared", +version = "0.6.1", src = list(href = NULL, +file = "deps"), meta = NULL, +script = 'dash_bio-shared.js', +stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", +all_files = FALSE, async = TRUE), class = "html_dependency")) return(deps_metadata) } diff --git a/dash_bio/Pileup.py b/dash_bio/Pileup.py new file mode 100644 index 000000000..34b5ebf82 --- /dev/null +++ b/dash_bio/Pileup.py @@ -0,0 +1,62 @@ +# AUTO GENERATED FILE - DO NOT EDIT + +from dash.development.base_component import Component, _explicitize_args + + +class Pileup(Component): + """A Pileup component. +The Pileup component is a genome visualization component +developed by the the Hammerlab. It uses an +example integration of pileup.js and React (https://www.npmjs.com/package/pileup). + +Keyword arguments: +- id (string; optional): The ID of this component, used to identify dash components in callbacks. +The ID needs to be unique across all of the components in an app. +- style (dict; optional): Generic style overrides on the plot div +- className (string; optional): className of the component div. +- range (dict; optional): Object defining genomic location. + Of the format: {contig: 'chr17', start: 7512384, stop: 7512544}. range has the following type: dict containing keys 'contig', 'start', 'stop'. +Those keys have the following types: + - contig (string; optional): Name of contig to display. (ie. chr17) + - start (number; optional): Start location to display + - stop (number; optional): Stop location to display +- reference (dict; optional): Object defining genomic reference. reference has the following type: dict containing keys 'label', 'url'. +Those keys have the following types: + - label (string; optional): Label to display by reference + - url (string; optional): Url of 2bit file. + https://genome.ucsc.edu/goldenPath/help/twoBit.html +- tracks (dict; optional): Array of configuration objects defining tracks initially displayed when app launches. + See https://github.com/hammerlab/pileup.js#usage. tracks has the following type: list of dicts containing keys 'viz', 'vizOptions', 'label', 'source', 'sourceOptions'. +Those keys have the following types: + - viz (optional): Name of visualization. Must be one of + (coverage, genome, genes, features, idiogram, location, scale, + variants, genotypes, or pileup) + See https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js + - vizOptions (optional): Options that define viz details. + Options depend on the viz type selected. + - label (string; optional): Label to display by track + - source (optional): Data source to visualize. Must be one of + (bam, vcf, alignmentJson, variantJson, featureJson, idiogramJson, cytoBand, + vcf, twoBit, bigBed, GAReadAlignment, GAVariant, GAFeature, GAGene) + See https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js + - sourceOptions (optional): Options that define data source. + Options depend on the source selected.""" + @_explicitize_args + def __init__(self, id=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, range=Component.UNDEFINED, reference=Component.UNDEFINED, tracks=Component.UNDEFINED, **kwargs): + self._prop_names = ['id', 'style', 'className', 'range', 'reference', 'tracks'] + self._type = 'Pileup' + self._namespace = 'dash_bio' + self._valid_wildcard_attributes = [] + self.available_properties = ['id', 'style', 'className', 'range', 'reference', 'tracks'] + self.available_wildcard_properties = [] + + _explicit_args = kwargs.pop('_explicit_args') + _locals = locals() + _locals.update(kwargs) # For wildcard attrs + args = {k: _locals[k] for k in _explicit_args if k != 'children'} + + for k in []: + if k not in args: + raise TypeError( + 'Required argument `' + k + '` was not specified.') + super(Pileup, self).__init__(**args) diff --git a/dash_bio/__init__.py b/dash_bio/__init__.py index d691c73f9..ba8bf3bde 100644 --- a/dash_bio/__init__.py +++ b/dash_bio/__init__.py @@ -37,6 +37,7 @@ 'circos', 'ideogram', 'igv', + 'pileup', 'moleculeviewer2', 'moleculeviewer3', 'needle', @@ -79,6 +80,18 @@ } ]) +_js_dist.extend([ + { + 'relative_package_path': 'dash_bio-shared.js', + 'external_url': ( + 'https://unpkg.com/dash-bio@{}' + '/' + package_name + '/dash_bio-shared.js' + ).format(__version__), + 'async': True, + 'namespace': 'dash_bio' + } +]) + _css_dist = [] diff --git a/dash_bio/_imports_.py b/dash_bio/_imports_.py index 2a6ebe143..d4d2f6db5 100644 --- a/dash_bio/_imports_.py +++ b/dash_bio/_imports_.py @@ -8,6 +8,7 @@ from .NeedlePlot import NeedlePlot from .NglMoleculeViewer import NglMoleculeViewer from .OncoPrint import OncoPrint +from .Pileup import Pileup from .SequenceViewer import SequenceViewer from .Speck import Speck @@ -22,6 +23,7 @@ "NeedlePlot", "NglMoleculeViewer", "OncoPrint", + "Pileup", "SequenceViewer", "Speck" ] \ No newline at end of file diff --git a/dash_bio/async-alignment.js b/dash_bio/async-alignment.js index 573bce00b..f4a957f56 100644 --- a/dash_bio/async-alignment.js +++ b/dash_bio/async-alignment.js @@ -1,12 +1,4 @@ -(window.webpackJsonpdash_bio=window.webpackJsonpdash_bio||[]).push([[0],Array(36).concat([function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var n=r(1),a=r.n(n),i=r(178),o=r(10),s=r(71);function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){return(c=Object.assign||function(t){for(var e=1;e - * 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="Expected a function",o="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",c="[object Array]",u="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Function]",d="[object GeneratorFunction]",g="[object Map]",v="[object Number]",m="[object Object]",y="[object RegExp]",x="[object Set]",b="[object String]",_="[object Symbol]",w="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",A="[object Float32Array]",M="[object Float64Array]",E="[object Int8Array]",S="[object Int16Array]",C="[object Int32Array]",L="[object Uint8Array]",O="[object Uint16Array]",P="[object Uint32Array]",I=/\b__p \+= '';/g,D=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,B=RegExp(R.source),N=RegExp(F.source),j=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,G=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(W.source),X=/^\s+|\s+$/g,Z=/^\s+/,J=/\s+$/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/\\(\\)?/g,rt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nt=/\w*$/,at=/^[-+]0x[0-9a-f]+$/i,it=/^0b[01]+$/i,ot=/^\[object .+?Constructor\]$/,st=/^0o[0-7]+$/i,lt=/^(?:0|[1-9]\d*)$/,ct=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,pt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ht="\\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",dt="[\\ud800-\\udfff]",gt="["+ht+"]",vt="["+pt+"]",mt="\\d+",yt="[\\u2700-\\u27bf]",xt="[a-z\\xdf-\\xf6\\xf8-\\xff]",bt="[^\\ud800-\\udfff"+ht+mt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_t="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",kt="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",At="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Mt="(?:"+xt+"|"+bt+")",Et="(?:"+At+"|"+bt+")",St="(?:"+vt+"|"+_t+")"+"?",Ct="[\\ufe0e\\ufe0f]?"+St+("(?:\\u200d(?:"+[wt,kt,Tt].join("|")+")[\\ufe0e\\ufe0f]?"+St+")*"),Lt="(?:"+[yt,kt,Tt].join("|")+")"+Ct,Ot="(?:"+[wt+vt+"?",vt,kt,Tt,dt].join("|")+")",Pt=RegExp("['’]","g"),It=RegExp(vt,"g"),Dt=RegExp(_t+"(?="+_t+")|"+Ot+Ct,"g"),zt=RegExp([At+"?"+xt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[gt,At,"$"].join("|")+")",Et+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[gt,At+Mt,"$"].join("|")+")",At+"?"+Mt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",At+"+(?:['’](?: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_])",mt,Lt].join("|"),"g"),Rt=RegExp("[\\u200d\\ud800-\\udfff"+pt+"\\ufe0e\\ufe0f]"),Ft=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bt=["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"],Nt=-1,jt={};jt[A]=jt[M]=jt[E]=jt[S]=jt[C]=jt[L]=jt["[object Uint8ClampedArray]"]=jt[O]=jt[P]=!0,jt[l]=jt[c]=jt[k]=jt[u]=jt[T]=jt[f]=jt[p]=jt[h]=jt[g]=jt[v]=jt[m]=jt[y]=jt[x]=jt[b]=jt[w]=!1;var Vt={};Vt[l]=Vt[c]=Vt[k]=Vt[T]=Vt[u]=Vt[f]=Vt[A]=Vt[M]=Vt[E]=Vt[S]=Vt[C]=Vt[g]=Vt[v]=Vt[m]=Vt[y]=Vt[x]=Vt[b]=Vt[_]=Vt[L]=Vt["[object Uint8ClampedArray]"]=Vt[O]=Vt[P]=!0,Vt[p]=Vt[h]=Vt[w]=!1;var Ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qt=parseFloat,Ht=parseInt,Gt="object"==typeof t&&t&&t.Object===Object&&t,Wt="object"==typeof self&&self&&self.Object===Object&&self,Yt=Gt||Wt||Function("return this")(),Xt=e&&!e.nodeType&&e,Zt=Xt&&"object"==typeof n&&n&&!n.nodeType&&n,Jt=Zt&&Zt.exports===Xt,Kt=Jt&&Gt.process,$t=function(){try{var t=Zt&&Zt.require&&Zt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),Qt=$t&&$t.isArrayBuffer,te=$t&&$t.isDate,ee=$t&&$t.isMap,re=$t&&$t.isRegExp,ne=$t&&$t.isSet,ae=$t&&$t.isTypedArray;function ie(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function oe(t,e,r,n){for(var a=-1,i=null==t?0:t.length;++a-1}function pe(t,e,r){for(var n=-1,a=null==t?0:t.length;++n-1;);return r}function De(t,e){for(var r=t.length;r--&&_e(e,t[r],0)>-1;);return r}function ze(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Re=Me({"À":"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"}),Fe=Me({"&":"&","<":"<",">":">",'"':""","'":"'"});function Be(t){return"\\"+Ut[t]}function Ne(t){return Rt.test(t)}function je(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Ve(t,e){return function(r){return t(e(r))}}function Ue(t,e){for(var r=-1,n=t.length,a=0,i=[];++r",""":'"',"'":"'"});var Xe=function t(e){var r,n=(e=null==e?Yt:Xe.defaults(Yt.Object(),e,Xe.pick(Yt,Bt))).Array,a=e.Date,pt=e.Error,ht=e.Function,dt=e.Math,gt=e.Object,vt=e.RegExp,mt=e.String,yt=e.TypeError,xt=n.prototype,bt=ht.prototype,_t=gt.prototype,wt=e["__core-js_shared__"],kt=bt.toString,Tt=_t.hasOwnProperty,At=0,Mt=(r=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Et=_t.toString,St=kt.call(gt),Ct=Yt._,Lt=vt("^"+kt.call(Tt).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Jt?e.Buffer:void 0,Dt=e.Symbol,Rt=e.Uint8Array,Ut=Ot?Ot.allocUnsafe:void 0,Gt=Ve(gt.getPrototypeOf,gt),Wt=gt.create,Xt=_t.propertyIsEnumerable,Zt=xt.splice,Kt=Dt?Dt.isConcatSpreadable:void 0,$t=Dt?Dt.iterator:void 0,ye=Dt?Dt.toStringTag:void 0,Me=function(){try{var t=Qa(gt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ze=e.clearTimeout!==Yt.clearTimeout&&e.clearTimeout,Je=a&&a.now!==Yt.Date.now&&a.now,Ke=e.setTimeout!==Yt.setTimeout&&e.setTimeout,$e=dt.ceil,Qe=dt.floor,tr=gt.getOwnPropertySymbols,er=Ot?Ot.isBuffer:void 0,rr=e.isFinite,nr=xt.join,ar=Ve(gt.keys,gt),ir=dt.max,or=dt.min,sr=a.now,lr=e.parseInt,cr=dt.random,ur=xt.reverse,fr=Qa(e,"DataView"),pr=Qa(e,"Map"),hr=Qa(e,"Promise"),dr=Qa(e,"Set"),gr=Qa(e,"WeakMap"),vr=Qa(gt,"create"),mr=gr&&new gr,yr={},xr=Mi(fr),br=Mi(pr),_r=Mi(hr),wr=Mi(dr),kr=Mi(gr),Tr=Dt?Dt.prototype:void 0,Ar=Tr?Tr.valueOf:void 0,Mr=Tr?Tr.toString:void 0;function Er(t){if(Ho(t)&&!Io(t)&&!(t instanceof Or)){if(t instanceof Lr)return t;if(Tt.call(t,"__wrapped__"))return Ei(t)}return new Lr(t)}var Sr=function(){function t(){}return function(e){if(!qo(e))return{};if(Wt)return Wt(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Cr(){}function Lr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Or(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Pr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function Zr(t,e,r,n,a,i){var o,s=1&e,c=2&e,p=4&e;if(r&&(o=a?r(t,n,a,i):r(t)),void 0!==o)return o;if(!qo(t))return t;var w=Io(t);if(w){if(o=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&Tt.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!s)return ma(t,o)}else{var I=ri(t),D=I==h||I==d;if(Fo(t))return fa(t,s);if(I==m||I==l||D&&!a){if(o=c||D?{}:ai(t),!s)return c?function(t,e){return ya(t,ei(t),e)}(t,function(t,e){return t&&ya(e,_s(e),t)}(o,t)):function(t,e){return ya(t,ti(t),e)}(t,Gr(o,t))}else{if(!Vt[I])return a?t:{};o=function(t,e,r){var n=t.constructor;switch(e){case k:return pa(t);case u:case f:return new n(+t);case T:return function(t,e){var r=e?pa(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case A:case M:case E:case S:case C:case L:case"[object Uint8ClampedArray]":case O:case P:return ha(t,r);case g:return new n;case v:case b:return new n(t);case y:return function(t){var e=new t.constructor(t.source,nt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new n;case _:return a=t,Ar?gt(Ar.call(a)):{}}var a}(t,I,s)}}i||(i=new Rr);var z=i.get(t);if(z)return z;i.set(t,o),Zo(t)?t.forEach((function(n){o.add(Zr(n,e,r,n,t,i))})):Go(t)&&t.forEach((function(n,a){o.set(a,Zr(n,e,r,a,t,i))}));var R=w?void 0:(p?c?Wa:Ga:c?_s:bs)(t);return se(R||t,(function(n,a){R&&(n=t[a=n]),Ur(o,a,Zr(n,e,r,a,t,i))})),o}function Jr(t,e,r){var n=r.length;if(null==t)return!n;for(t=gt(t);n--;){var a=r[n],i=e[a],o=t[a];if(void 0===o&&!(a in t)||!i(o))return!1}return!0}function Kr(t,e,r){if("function"!=typeof t)throw new yt(i);return xi((function(){t.apply(void 0,r)}),e)}function $r(t,e,r,n){var a=-1,i=fe,o=!0,s=t.length,l=[],c=e.length;if(!s)return l;r&&(e=he(e,Le(r))),n?(i=pe,o=!1):e.length>=200&&(i=Pe,o=!1,e=new zr(e));t:for(;++a-1},Ir.prototype.set=function(t,e){var r=this.__data__,n=qr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:new Pr,map:new(pr||Ir),string:new Pr}},Dr.prototype.delete=function(t){var e=Ka(this,t).delete(t);return this.size-=e?1:0,e},Dr.prototype.get=function(t){return Ka(this,t).get(t)},Dr.prototype.has=function(t){return Ka(this,t).has(t)},Dr.prototype.set=function(t,e){var r=Ka(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},zr.prototype.add=zr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},zr.prototype.has=function(t){return this.__data__.has(t)},Rr.prototype.clear=function(){this.__data__=new Ir,this.size=0},Rr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Rr.prototype.get=function(t){return this.__data__.get(t)},Rr.prototype.has=function(t){return this.__data__.has(t)},Rr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Ir){var n=r.__data__;if(!pr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Dr(n)}return r.set(t,e),this.size=r.size,this};var Qr=_a(ln),tn=_a(cn,!0);function en(t,e){var r=!0;return Qr(t,(function(t,n,a){return r=!!e(t,n,a)})),r}function rn(t,e,r){for(var n=-1,a=t.length;++n0&&r(s)?e>1?an(s,e-1,r,n,a):de(a,s):n||(a[a.length]=s)}return a}var on=wa(),sn=wa(!0);function ln(t,e){return t&&on(t,e,bs)}function cn(t,e){return t&&sn(t,e,bs)}function un(t,e){return ue(e,(function(e){return jo(t[e])}))}function fn(t,e){for(var r=0,n=(e=sa(e,t)).length;null!=t&&re}function gn(t,e){return null!=t&&Tt.call(t,e)}function vn(t,e){return null!=t&&e in gt(t)}function mn(t,e,r){for(var a=r?pe:fe,i=t[0].length,o=t.length,s=o,l=n(o),c=1/0,u=[];s--;){var f=t[s];s&&e&&(f=he(f,Le(e))),c=or(f.length,c),l[s]=!r&&(e||i>=120&&f.length>=120)?new zr(s&&f):void 0}f=t[0];var p=-1,h=l[0];t:for(;++p=s)return l;var c=r[n];return l*("desc"==c?-1:1)}}return t.index-e.index}(t,e,r)}))}function In(t,e,r){for(var n=-1,a=e.length,i={};++n-1;)s!==t&&Zt.call(s,l,1),Zt.call(t,l,1);return t}function zn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var a=e[r];if(r==n||a!==i){var i=a;oi(a)?Zt.call(t,a,1):Qn(t,a)}}return t}function Rn(t,e){return t+Qe(cr()*(e-t+1))}function Fn(t,e){var r="";if(!t||e<1||e>9007199254740991)return r;do{e%2&&(r+=t),(e=Qe(e/2))&&(t+=t)}while(e);return r}function Bn(t,e){return bi(di(t,e,Ws),t+"")}function Nn(t){return Br(Cs(t))}function jn(t,e){var r=Cs(t);return ki(r,Xr(e,0,r.length))}function Vn(t,e,r,n){if(!qo(t))return t;for(var a=-1,i=(e=sa(e,t)).length,o=i-1,s=t;null!=s&&++ai?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=n(i);++a>>1,o=t[i];null!==o&&!Ko(o)&&(r?o<=e:o=200){var c=e?null:Fa(t);if(c)return qe(c);o=!1,a=Pe,l=new zr}else l=e?[]:s;t:for(;++n=n?t:Gn(t,e,r)}var ua=Ze||function(t){return Yt.clearTimeout(t)};function fa(t,e){if(e)return t.slice();var r=t.length,n=Ut?Ut(r):new t.constructor(r);return t.copy(n),n}function pa(t){var e=new t.constructor(t.byteLength);return new Rt(e).set(new Rt(t)),e}function ha(t,e){var r=e?pa(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function da(t,e){if(t!==e){var r=void 0!==t,n=null===t,a=t==t,i=Ko(t),o=void 0!==e,s=null===e,l=e==e,c=Ko(e);if(!s&&!c&&!i&&t>e||i&&o&&l&&!s&&!c||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!c&&t1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(a--,i):void 0,o&&si(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),e=gt(e);++n-1?a[i?e[o]:o]:void 0}}function Ea(t){return Ha((function(e){var r=e.length,n=r,a=Lr.prototype.thru;for(t&&e.reverse();n--;){var o=e[n];if("function"!=typeof o)throw new yt(i);if(a&&!s&&"wrapper"==Xa(o))var s=new Lr([],!0)}for(n=s?n:r;++n1&&x.reverse(),f&&cs))return!1;var c=i.get(t);if(c&&i.get(e))return c==e;var u=-1,f=!0,p=2&r?new zr:void 0;for(i.set(t,e),i.set(e,t);++u-1&&t%1==0&&t1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(K,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return se(s,(function(r){var n="_."+r[0];e&r[1]&&!fe(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match($);return e?e[1].split(Q):[]}(n),r)))}function wi(t){var e=0,r=0;return function(){var n=sr(),a=16-(n-r);if(r=n,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ki(t,e){var r=-1,n=t.length,a=n-1;for(e=void 0===e?n:e;++r1?t[e-1]:void 0;return r="function"==typeof r?(t.pop(),r):void 0,Yi(t,r)}));function to(t){var e=Er(t);return e.__chain__=!0,e}function eo(t,e){return e(t)}var ro=Ha((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,a=function(e){return Yr(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Or&&oi(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:eo,args:[a],thisArg:void 0}),new Lr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(a)}));var no=xa((function(t,e,r){Tt.call(t,r)?++t[r]:Wr(t,r,1)}));var ao=Ma(Oi),io=Ma(Pi);function oo(t,e){return(Io(t)?se:Qr)(t,Ja(e,3))}function so(t,e){return(Io(t)?le:tn)(t,Ja(e,3))}var lo=xa((function(t,e,r){Tt.call(t,r)?t[r].push(e):Wr(t,r,[e])}));var co=Bn((function(t,e,r){var a=-1,i="function"==typeof e,o=zo(t)?n(t.length):[];return Qr(t,(function(t){o[++a]=i?ie(e,t,r):yn(t,e,r)})),o})),uo=xa((function(t,e,r){Wr(t,r,e)}));function fo(t,e){return(Io(t)?he:En)(t,Ja(e,3))}var po=xa((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var ho=Bn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&si(t,e[0],e[1])?e=[]:r>2&&si(e[0],e[1],e[2])&&(e=[e[0]]),Pn(t,an(e,1),[])})),go=Je||function(){return Yt.Date.now()};function vo(t,e,r){return e=r?void 0:e,Na(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function mo(t,e){var r;if("function"!=typeof e)throw new yt(i);return t=ns(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}var yo=Bn((function(t,e,r){var n=1;if(r.length){var a=Ue(r,Za(yo));n|=32}return Na(t,n,e,r,a)})),xo=Bn((function(t,e,r){var n=3;if(r.length){var a=Ue(r,Za(xo));n|=32}return Na(e,n,t,r,a)}));function bo(t,e,r){var n,a,o,s,l,c,u=0,f=!1,p=!1,h=!0;if("function"!=typeof t)throw new yt(i);function d(e){var r=n,i=a;return n=a=void 0,u=e,s=t.apply(i,r)}function g(t){return u=t,l=xi(m,e),f?d(t):s}function v(t){var r=t-c;return void 0===c||r>=e||r<0||p&&t-u>=o}function m(){var t=go();if(v(t))return y(t);l=xi(m,function(t){var r=e-(t-c);return p?or(r,o-(t-u)):r}(t))}function y(t){return l=void 0,h&&n?d(t):(n=a=void 0,s)}function x(){var t=go(),r=v(t);if(n=arguments,a=this,c=t,r){if(void 0===l)return g(c);if(p)return ua(l),l=xi(m,e),d(c)}return void 0===l&&(l=xi(m,e)),s}return e=is(e)||0,qo(r)&&(f=!!r.leading,o=(p="maxWait"in r)?ir(is(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),x.cancel=function(){void 0!==l&&ua(l),u=0,n=c=a=l=void 0},x.flush=function(){return void 0===l?s:y(go())},x}var _o=Bn((function(t,e){return Kr(t,1,e)})),wo=Bn((function(t,e,r){return Kr(t,is(e)||0,r)}));function ko(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new yt(i);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(ko.Cache||Dr),r}function To(t){if("function"!=typeof t)throw new yt(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ko.Cache=Dr;var Ao=la((function(t,e){var r=(e=1==e.length&&Io(e[0])?he(e[0],Le(Ja())):he(an(e,1),Le(Ja()))).length;return Bn((function(n){for(var a=-1,i=or(n.length,r);++a=e})),Po=xn(function(){return arguments}())?xn:function(t){return Ho(t)&&Tt.call(t,"callee")&&!Xt.call(t,"callee")},Io=n.isArray,Do=Qt?Le(Qt):function(t){return Ho(t)&&hn(t)==k};function zo(t){return null!=t&&Uo(t.length)&&!jo(t)}function Ro(t){return Ho(t)&&zo(t)}var Fo=er||il,Bo=te?Le(te):function(t){return Ho(t)&&hn(t)==f};function No(t){if(!Ho(t))return!1;var e=hn(t);return e==p||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Yo(t)}function jo(t){if(!qo(t))return!1;var e=hn(t);return e==h||e==d||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Vo(t){return"number"==typeof t&&t==ns(t)}function Uo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function qo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ho(t){return null!=t&&"object"==typeof t}var Go=ee?Le(ee):function(t){return Ho(t)&&ri(t)==g};function Wo(t){return"number"==typeof t||Ho(t)&&hn(t)==v}function Yo(t){if(!Ho(t)||hn(t)!=m)return!1;var e=Gt(t);if(null===e)return!0;var r=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&kt.call(r)==St}var Xo=re?Le(re):function(t){return Ho(t)&&hn(t)==y};var Zo=ne?Le(ne):function(t){return Ho(t)&&ri(t)==x};function Jo(t){return"string"==typeof t||!Io(t)&&Ho(t)&&hn(t)==b}function Ko(t){return"symbol"==typeof t||Ho(t)&&hn(t)==_}var $o=ae?Le(ae):function(t){return Ho(t)&&Uo(t.length)&&!!jt[hn(t)]};var Qo=Da(Mn),ts=Da((function(t,e){return t<=e}));function es(t){if(!t)return[];if(zo(t))return Jo(t)?We(t):ma(t);if($t&&t[$t])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[$t]());var e=ri(t);return(e==g?je:e==x?qe:Cs)(t)}function rs(t){return t?(t=is(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ns(t){var e=rs(t),r=e%1;return e==e?r?e-r:e:0}function as(t){return t?Xr(ns(t),0,4294967295):0}function is(t){if("number"==typeof t)return t;if(Ko(t))return NaN;if(qo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=qo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(X,"");var r=it.test(t);return r||st.test(t)?Ht(t.slice(2),r?2:8):at.test(t)?NaN:+t}function os(t){return ya(t,_s(t))}function ss(t){return null==t?"":Kn(t)}var ls=ba((function(t,e){if(fi(e)||zo(e))ya(e,bs(e),t);else for(var r in e)Tt.call(e,r)&&Ur(t,r,e[r])})),cs=ba((function(t,e){ya(e,_s(e),t)})),us=ba((function(t,e,r,n){ya(e,_s(e),t,n)})),fs=ba((function(t,e,r,n){ya(e,bs(e),t,n)})),ps=Ha(Yr);var hs=Bn((function(t,e){t=gt(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&si(e[0],e[1],a)&&(n=1);++r1),e})),ya(t,Wa(t),r),n&&(r=Zr(r,7,Ua));for(var a=e.length;a--;)Qn(r,e[a]);return r}));var As=Ha((function(t,e){return null==t?{}:function(t,e){return In(t,e,(function(e,r){return vs(t,r)}))}(t,e)}));function Ms(t,e){if(null==t)return{};var r=he(Wa(t),(function(t){return[t]}));return e=Ja(e),In(t,r,(function(t,r){return e(t,r[0])}))}var Es=Ba(bs),Ss=Ba(_s);function Cs(t){return null==t?[]:Oe(t,bs(t))}var Ls=Ta((function(t,e,r){return e=e.toLowerCase(),t+(r?Os(e):e)}));function Os(t){return Ns(ss(t).toLowerCase())}function Ps(t){return(t=ss(t))&&t.replace(ct,Re).replace(It,"")}var Is=Ta((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Ds=Ta((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),zs=ka("toLowerCase");var Rs=Ta((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var Fs=Ta((function(t,e,r){return t+(r?" ":"")+Ns(e)}));var Bs=Ta((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Ns=ka("toUpperCase");function js(t,e,r){return t=ss(t),void 0===(e=r?void 0:e)?function(t){return Ft.test(t)}(t)?function(t){return t.match(zt)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Vs=Bn((function(t,e){try{return ie(t,void 0,e)}catch(t){return No(t)?t:new pt(t)}})),Us=Ha((function(t,e){return se(e,(function(e){e=Ai(e),Wr(t,e,yo(t[e],t))})),t}));function qs(t){return function(){return t}}var Hs=Ea(),Gs=Ea(!0);function Ws(t){return t}function Ys(t){return kn("function"==typeof t?t:Zr(t,1))}var Xs=Bn((function(t,e){return function(r){return yn(r,t,e)}})),Zs=Bn((function(t,e){return function(r){return yn(t,r,e)}}));function Js(t,e,r){var n=bs(e),a=un(e,n);null!=r||qo(e)&&(a.length||!n.length)||(r=e,e=t,t=this,a=un(e,bs(e)));var i=!(qo(r)&&"chain"in r&&!r.chain),o=jo(t);return se(a,(function(r){var n=e[r];t[r]=n,o&&(t.prototype[r]=function(){var e=this.__chain__;if(i||e){var r=t(this.__wrapped__),a=r.__actions__=ma(this.__actions__);return a.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,de([this.value()],arguments))})})),t}function Ks(){}var $s=Oa(he),Qs=Oa(ce),tl=Oa(me);function el(t){return li(t)?Ae(Ai(t)):function(t){return function(e){return fn(e,t)}}(t)}var rl=Ia(),nl=Ia(!0);function al(){return[]}function il(){return!1}var ol=La((function(t,e){return t+e}),0),sl=Ra("ceil"),ll=La((function(t,e){return t/e}),1),cl=Ra("floor");var ul,fl=La((function(t,e){return t*e}),1),pl=Ra("round"),hl=La((function(t,e){return t-e}),0);return Er.after=function(t,e){if("function"!=typeof e)throw new yt(i);return t=ns(t),function(){if(--t<1)return e.apply(this,arguments)}},Er.ary=vo,Er.assign=ls,Er.assignIn=cs,Er.assignInWith=us,Er.assignWith=fs,Er.at=ps,Er.before=mo,Er.bind=yo,Er.bindAll=Us,Er.bindKey=xo,Er.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Io(t)?t:[t]},Er.chain=to,Er.chunk=function(t,e,r){e=(r?si(t,e,r):void 0===e)?1:ir(ns(e),0);var a=null==t?0:t.length;if(!a||e<1)return[];for(var i=0,o=0,s=n($e(a/e));ia?0:a+r),(n=void 0===n||n>a?a:ns(n))<0&&(n+=a),n=r>n?0:as(n);r>>0)?(t=ss(t))&&("string"==typeof e||null!=e&&!Xo(e))&&!(e=Kn(e))&&Ne(t)?ca(We(t),0,r):t.split(e,r):[]},Er.spread=function(t,e){if("function"!=typeof t)throw new yt(i);return e=null==e?0:ir(ns(e),0),Bn((function(r){var n=r[e],a=ca(r,0,e);return n&&de(a,n),ie(t,this,a)}))},Er.tail=function(t){var e=null==t?0:t.length;return e?Gn(t,1,e):[]},Er.take=function(t,e,r){return t&&t.length?Gn(t,0,(e=r||void 0===e?1:ns(e))<0?0:e):[]},Er.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?Gn(t,(e=n-(e=r||void 0===e?1:ns(e)))<0?0:e,n):[]},Er.takeRightWhile=function(t,e){return t&&t.length?ea(t,Ja(e,3),!1,!0):[]},Er.takeWhile=function(t,e){return t&&t.length?ea(t,Ja(e,3)):[]},Er.tap=function(t,e){return e(t),t},Er.throttle=function(t,e,r){var n=!0,a=!0;if("function"!=typeof t)throw new yt(i);return qo(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),bo(t,e,{leading:n,maxWait:e,trailing:a})},Er.thru=eo,Er.toArray=es,Er.toPairs=Es,Er.toPairsIn=Ss,Er.toPath=function(t){return Io(t)?he(t,Ai):Ko(t)?[t]:ma(Ti(ss(t)))},Er.toPlainObject=os,Er.transform=function(t,e,r){var n=Io(t),a=n||Fo(t)||$o(t);if(e=Ja(e,4),null==r){var i=t&&t.constructor;r=a?n?new i:[]:qo(t)&&jo(i)?Sr(Gt(t)):{}}return(a?se:ln)(t,(function(t,n,a){return e(r,t,n,a)})),r},Er.unary=function(t){return vo(t,1)},Er.union=qi,Er.unionBy=Hi,Er.unionWith=Gi,Er.uniq=function(t){return t&&t.length?$n(t):[]},Er.uniqBy=function(t,e){return t&&t.length?$n(t,Ja(e,2)):[]},Er.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?$n(t,void 0,e):[]},Er.unset=function(t,e){return null==t||Qn(t,e)},Er.unzip=Wi,Er.unzipWith=Yi,Er.update=function(t,e,r){return null==t?t:ta(t,e,oa(r))},Er.updateWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:ta(t,e,oa(r),n)},Er.values=Cs,Er.valuesIn=function(t){return null==t?[]:Oe(t,_s(t))},Er.without=Xi,Er.words=js,Er.wrap=function(t,e){return Mo(oa(e),t)},Er.xor=Zi,Er.xorBy=Ji,Er.xorWith=Ki,Er.zip=$i,Er.zipObject=function(t,e){return aa(t||[],e||[],Ur)},Er.zipObjectDeep=function(t,e){return aa(t||[],e||[],Vn)},Er.zipWith=Qi,Er.entries=Es,Er.entriesIn=Ss,Er.extend=cs,Er.extendWith=us,Js(Er,Er),Er.add=ol,Er.attempt=Vs,Er.camelCase=Ls,Er.capitalize=Os,Er.ceil=sl,Er.clamp=function(t,e,r){return void 0===r&&(r=e,e=void 0),void 0!==r&&(r=(r=is(r))==r?r:0),void 0!==e&&(e=(e=is(e))==e?e:0),Xr(is(t),e,r)},Er.clone=function(t){return Zr(t,4)},Er.cloneDeep=function(t){return Zr(t,5)},Er.cloneDeepWith=function(t,e){return Zr(t,5,e="function"==typeof e?e:void 0)},Er.cloneWith=function(t,e){return Zr(t,4,e="function"==typeof e?e:void 0)},Er.conformsTo=function(t,e){return null==e||Jr(t,e,bs(e))},Er.deburr=Ps,Er.defaultTo=function(t,e){return null==t||t!=t?e:t},Er.divide=ll,Er.endsWith=function(t,e,r){t=ss(t),e=Kn(e);var n=t.length,a=r=void 0===r?n:Xr(ns(r),0,n);return(r-=e.length)>=0&&t.slice(r,a)==e},Er.eq=Co,Er.escape=function(t){return(t=ss(t))&&N.test(t)?t.replace(F,Fe):t},Er.escapeRegExp=function(t){return(t=ss(t))&&Y.test(t)?t.replace(W,"\\$&"):t},Er.every=function(t,e,r){var n=Io(t)?ce:en;return r&&si(t,e,r)&&(e=void 0),n(t,Ja(e,3))},Er.find=ao,Er.findIndex=Oi,Er.findKey=function(t,e){return xe(t,Ja(e,3),ln)},Er.findLast=io,Er.findLastIndex=Pi,Er.findLastKey=function(t,e){return xe(t,Ja(e,3),cn)},Er.floor=cl,Er.forEach=oo,Er.forEachRight=so,Er.forIn=function(t,e){return null==t?t:on(t,Ja(e,3),_s)},Er.forInRight=function(t,e){return null==t?t:sn(t,Ja(e,3),_s)},Er.forOwn=function(t,e){return t&&ln(t,Ja(e,3))},Er.forOwnRight=function(t,e){return t&&cn(t,Ja(e,3))},Er.get=gs,Er.gt=Lo,Er.gte=Oo,Er.has=function(t,e){return null!=t&&ni(t,e,gn)},Er.hasIn=vs,Er.head=Di,Er.identity=Ws,Er.includes=function(t,e,r,n){t=zo(t)?t:Cs(t),r=r&&!n?ns(r):0;var a=t.length;return r<0&&(r=ir(a+r,0)),Jo(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&_e(t,e,r)>-1},Er.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var a=null==r?0:ns(r);return a<0&&(a=ir(n+a,0)),_e(t,e,a)},Er.inRange=function(t,e,r){return e=rs(e),void 0===r?(r=e,e=0):r=rs(r),function(t,e,r){return t>=or(e,r)&&t=-9007199254740991&&t<=9007199254740991},Er.isSet=Zo,Er.isString=Jo,Er.isSymbol=Ko,Er.isTypedArray=$o,Er.isUndefined=function(t){return void 0===t},Er.isWeakMap=function(t){return Ho(t)&&ri(t)==w},Er.isWeakSet=function(t){return Ho(t)&&"[object WeakSet]"==hn(t)},Er.join=function(t,e){return null==t?"":nr.call(t,e)},Er.kebabCase=Is,Er.last=Bi,Er.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var a=n;return void 0!==r&&(a=(a=ns(r))<0?ir(n+a,0):or(a,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,a):be(t,ke,a,!0)},Er.lowerCase=Ds,Er.lowerFirst=zs,Er.lt=Qo,Er.lte=ts,Er.max=function(t){return t&&t.length?rn(t,Ws,dn):void 0},Er.maxBy=function(t,e){return t&&t.length?rn(t,Ja(e,2),dn):void 0},Er.mean=function(t){return Te(t,Ws)},Er.meanBy=function(t,e){return Te(t,Ja(e,2))},Er.min=function(t){return t&&t.length?rn(t,Ws,Mn):void 0},Er.minBy=function(t,e){return t&&t.length?rn(t,Ja(e,2),Mn):void 0},Er.stubArray=al,Er.stubFalse=il,Er.stubObject=function(){return{}},Er.stubString=function(){return""},Er.stubTrue=function(){return!0},Er.multiply=fl,Er.nth=function(t,e){return t&&t.length?On(t,ns(e)):void 0},Er.noConflict=function(){return Yt._===this&&(Yt._=Ct),this},Er.noop=Ks,Er.now=go,Er.pad=function(t,e,r){t=ss(t);var n=(e=ns(e))?Ge(t):0;if(!e||n>=e)return t;var a=(e-n)/2;return Pa(Qe(a),r)+t+Pa($e(a),r)},Er.padEnd=function(t,e,r){t=ss(t);var n=(e=ns(e))?Ge(t):0;return e&&ne){var n=t;t=e,e=n}if(r||t%1||e%1){var a=cr();return or(t+a*(e-t+qt("1e-"+((a+"").length-1))),e)}return Rn(t,e)},Er.reduce=function(t,e,r){var n=Io(t)?ge:Ee,a=arguments.length<3;return n(t,Ja(e,4),r,a,Qr)},Er.reduceRight=function(t,e,r){var n=Io(t)?ve:Ee,a=arguments.length<3;return n(t,Ja(e,4),r,a,tn)},Er.repeat=function(t,e,r){return e=(r?si(t,e,r):void 0===e)?1:ns(e),Fn(ss(t),e)},Er.replace=function(){var t=arguments,e=ss(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Er.result=function(t,e,r){var n=-1,a=(e=sa(e,t)).length;for(a||(a=1,t=void 0);++n9007199254740991)return[];var r=4294967295,n=or(t,4294967295);t-=4294967295;for(var a=Ce(n,e=Ja(e));++r=i)return t;var s=r-Ge(n);if(s<1)return n;var l=o?ca(o,0,s).join(""):t.slice(0,s);if(void 0===a)return l+n;if(o&&(s+=l.length-s),Xo(a)){if(t.slice(s).search(a)){var c,u=l;for(a.global||(a=vt(a.source,ss(nt.exec(a))+"g")),a.lastIndex=0;c=a.exec(u);)var f=c.index;l=l.slice(0,void 0===f?s:f)}}else if(t.indexOf(Kn(a),s)!=s){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+n},Er.unescape=function(t){return(t=ss(t))&&B.test(t)?t.replace(R,Ye):t},Er.uniqueId=function(t){var e=++At;return ss(t)+e},Er.upperCase=Bs,Er.upperFirst=Ns,Er.each=oo,Er.eachRight=so,Er.first=Di,Js(Er,(ul={},ln(Er,(function(t,e){Tt.call(Er.prototype,e)||(ul[e]=t)})),ul),{chain:!1}),Er.VERSION="4.17.15",se(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Er[t].placeholder=Er})),se(["drop","take"],(function(t,e){Or.prototype[t]=function(r){r=void 0===r?1:ir(ns(r),0);var n=this.__filtered__&&!e?new Or(this):this.clone();return n.__filtered__?n.__takeCount__=or(r,n.__takeCount__):n.__views__.push({size:or(r,4294967295),type:t+(n.__dir__<0?"Right":"")}),n},Or.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),se(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Or.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ja(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),se(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Or.prototype[t]=function(){return this[r](1).value()[0]}})),se(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Or.prototype[t]=function(){return this.__filtered__?new Or(this):this[r](1)}})),Or.prototype.compact=function(){return this.filter(Ws)},Or.prototype.find=function(t){return this.filter(t).head()},Or.prototype.findLast=function(t){return this.reverse().find(t)},Or.prototype.invokeMap=Bn((function(t,e){return"function"==typeof t?new Or(this):this.map((function(r){return yn(r,t,e)}))})),Or.prototype.reject=function(t){return this.filter(To(Ja(t)))},Or.prototype.slice=function(t,e){t=ns(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Or(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),void 0!==e&&(r=(e=ns(e))<0?r.dropRight(-e):r.take(e-t)),r)},Or.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Or.prototype.toArray=function(){return this.take(4294967295)},ln(Or.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),a=Er[n?"take"+("last"==e?"Right":""):e],i=n||/^find/.test(e);a&&(Er.prototype[e]=function(){var e=this.__wrapped__,o=n?[1]:arguments,s=e instanceof Or,l=o[0],c=s||Io(e),u=function(t){var e=a.apply(Er,de([t],o));return n&&f?e[0]:e};c&&r&&"function"==typeof l&&1!=l.length&&(s=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=i&&!f,d=s&&!p;if(!i&&c){e=d?e:new Or(this);var g=t.apply(e,o);return g.__actions__.push({func:eo,args:[u],thisArg:void 0}),new Lr(g,f)}return h&&d?t.apply(this,o):(g=this.thru(u),h?n?g.value()[0]:g.value():g)})})),se(["pop","push","shift","sort","splice","unshift"],(function(t){var e=xt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Er.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var a=this.value();return e.apply(Io(a)?a:[],t)}return this[r]((function(r){return e.apply(Io(r)?r:[],t)}))}})),ln(Or.prototype,(function(t,e){var r=Er[e];if(r){var n=r.name+"";Tt.call(yr,n)||(yr[n]=[]),yr[n].push({name:e,func:r})}})),yr[Sa(void 0,2).name]=[{name:"wrapper",func:void 0}],Or.prototype.clone=function(){var t=new Or(this.__wrapped__);return t.__actions__=ma(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ma(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ma(this.__views__),t},Or.prototype.reverse=function(){if(this.__filtered__){var t=new Or(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Or.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Io(t),n=e<0,a=r?t.length:0,i=function(t,e,r){var n=-1,a=r.length;for(;++n=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Er.prototype.plant=function(t){for(var e,r=this;r instanceof Cr;){var n=Ei(r);n.__index__=0,n.__values__=void 0,e?a.__wrapped__=n:e=n;var a=n;r=r.__wrapped__}return a.__wrapped__=t,e},Er.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Or){var e=t;return this.__actions__.length&&(e=new Or(this)),(e=e.reverse()).__actions__.push({func:eo,args:[Ui],thisArg:void 0}),new Lr(e,this.__chain__)}return this.thru(Ui)},Er.prototype.toJSON=Er.prototype.valueOf=Er.prototype.value=function(){return ra(this.__wrapped__,this.__actions__)},Er.prototype.first=Er.prototype.head,$t&&(Er.prototype[$t]=function(){return this}),Er}();Yt._=Xe,void 0===(a=function(){return Xe}.call(e,r,e,n))||(n.exports=a)}).call(this)}).call(this,r(48),r(51)(t))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=r(58),i={};e.default=i,i.read=function(t,e){var r,n=(r=this,function(t,n,a){return i._onRetrieval(t,a,e,r)});return void 0===e?new Promise((function(r,i){e=function(t,e){t?i(t):r(e)},a(t,n)})):a(t,n)},i._onRetrieval=function(t,e,r,n){var a=void 0;return void 0!==t&&(a=n.parse(e)),r.call(n,t,a)},i.extend=function(t,e){return extend(i,t,e)},i.mixin=function(t){return"object"!==(void 0===t?"undefined":n(t))&&(t=t.prototype),["read"].forEach((function(e){t[e]=i[e]}),this),t}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(r(73)),a=i(r(77));function i(t){return t&&t.__esModule?t:{default:t}}var o=(0,n.default)(a.default);e.default=o},function(t,e,r){"use strict";var n=r(85);t.exports=Function.prototype.bind||n},function(t,e,r){"use strict";var n=Function.prototype.toString,a=/^\s*class\b/,i=function(t){try{var e=n.call(t);return a.test(e)}catch(t){return!1}},o=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(s)return function(t){try{return!i(t)&&(n.call(t),!0)}catch(t){return!1}}(t);if(i(t))return!1;var e=o.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={};e.default=n,n.getMeta=function(t){var e,r,n=!1,a=!1,i={},o={},s=t.split(" ");if(s.length>=1?(n=s.shift(),a=s.join(" ")):n=t,n){var l=n.split("|");for(e=l.pop(),o.en=e;0!=l.length;){var c=l.shift(),u=l.shift();i[c]=u}}else e=n;if(a){var f=a.split("=");if(f.length>1){var p,h;f.length;f.forEach((function(t){var e,n=(t=t.trim()).split(" ");if(n.length>1?(h=n.pop(),e=n.join(" ")):e=t,p){var a=p.toLowerCase();o[a]=e}else r=e;p=h}))}else r=f.shift()}var d={name:e,ids:i,details:o};return r&&(d.desc=r),d};var a={sp:{link:"http://www.uniprot.org/%s",name:"Uniprot"},tr:{link:"http://www.uniprot.org/%s",name:"Trembl"},gb:{link:"http://www.ncbi.nlm.nih.gov/nuccore/%s",name:"Genbank"},pdb:{link:"http://www.rcsb.org/pdb/explore/explore.do?structureId=%s",name:"PDB"}};n.buildLinks=function(t){var e={};return t=t||{},Object.keys(t).forEach((function(r){if(r in a){var n=a[r],i=n.link.replace("%s",t[r]);e[n.name]=i}})),e},n.contains=function(t,e){return-1!=="".indexOf.call(t,e,0)},n.splitNChars=function(t,e){var r,n;e=e||80;var a=[];for(r=0,n=t.length-1;r<=n;r+=e)a.push(t.substr(r,e));return a},n.reverse=function(t){return t.split("").reverse().join("")},n.complement=function(t){var e=t+"",r=[[/g/g,"0"],[/c/g,"1"],[/0/g,"c"],[/1/g,"g"],[/G/g,"0"],[/C/g,"1"],[/0/g,"C"],[/1/g,"G"],[/a/g,"0"],[/t/g,"1"],[/0/g,"t"],[/1/g,"a"],[/A/g,"0"],[/T/g,"1"],[/0/g,"T"],[/1/g,"A"]];for(var n in r)e=e.replace(r[n][0],r[n][1]);return e},n.reverseComplement=function(t){return n.reverse(n.complement(t))},n.model=function(t,e,r){this.seq=t,this.name=e,this.id=r,this.ids={}}},function(t,e){var r,n,a=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var l,c=[],u=!1,f=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):f=-1,c.length&&h())}function h(){if(!u){var t=s(p);u=!0;for(var e=c.length;e;){for(l=c,c=[];++f1)for(var r=1;rK&&(K=e):e=(0,c.getConservation)(t),e})),Z="entropy"===x?Z.map((function(t){return 1-t/K})):Z.map((function(t){return t/I}))),_&&(J=P.map((function(t){return o.default.countBy(t)["-"]/I}))),b)for(var $=0;$Bar weights",titlefont:{size:12},showgrid:!1,zeroline:!1,domain:[.75,1]}):3===p?(S.yaxis.domain=[0,.64],S.yaxis2={title:"Conservation",titlefont:{size:12},showgrid:!1,zeroline:!1,domain:[.65,.89]},S.yaxis3={title:"Gap",titlefont:{size:12},showgrid:!1,zeroline:!1,domain:[.9,1]}):S.yaxis.domain=[0,1],"heatmap"===m?(S.xaxis.rangeslider={autorange:!0},S.xaxis.tick0=x,S.xaxis.dtick=b,S.margin={t:20,r:20,b:20}):"slider"===m?S.sliders=[{currentvalue:{prefix:"Position ",suffix:""},steps:i}]:(S.xaxis.tick0=x,S.xaxis.dtick=b,S.margin={t:20,r:20,b:20}),{layout:S,width:e,height:n}}},{key:"componentDidMount",value:function(){var t=this.resetWindowing(this.props),e=t.xStart,r=t.xEnd;this.setState({xStart:e,xEnd:r})}},{key:"componentDidUpdate",value:function(t,e){if(this.props.data!==t.data){var r=this.resetWindowing(this.props),n=r.xStart,a=r.xEnd;this.setState({xStart:n,xEnd:a})}}},{key:"render",value:function(){var t=this.getData(),e=t.data,r=t.length,n=t.count,i=t.labels,o=t.tick,l=t.plotCount,c=this.getLayout({length:r,count:n,labels:i,tick:o,plotCount:l}),u=c.layout,f={style:{width:c.width,height:c.height},useResizeHandler:!0};return a.default.createElement("div",null,a.default.createElement(s.default,d({data:e,layout:u,onClick:this.handleChange,onHover:this.handleChange,onRelayout:this.handleChange},f)))}}])&&v(r.prototype,n),i&&v(r,i),e}(a.PureComponent);e.default=b,b.propTypes={data:i.default.string,extension:i.default.string,colorscale:i.default.oneOfType([i.default.string,i.default.object]),opacity:i.default.oneOfType([i.default.number,i.default.string]),textcolor:i.default.string,textsize:i.default.oneOfType([i.default.number,i.default.string]),showlabel:i.default.bool,showid:i.default.bool,showconservation:i.default.bool,conservationcolor:i.default.string,conservationcolorscale:i.default.oneOfType([i.default.string,i.default.array]),conservationopacity:i.default.oneOfType([i.default.number,i.default.string]),conservationmethod:i.default.oneOf(["conservation","entropy"]),correctgap:i.default.bool,showgap:i.default.bool,gapcolor:i.default.string,gapcolorscale:i.default.oneOfType([i.default.string,i.default.array]),gapopacity:i.default.oneOfType([i.default.number,i.default.string]),groupbars:i.default.bool,showconsensus:i.default.bool,tilewidth:i.default.number,tileheight:i.default.number,overview:i.default.oneOf(["heatmap","slider","none"]),numtiles:i.default.number,scrollskip:i.default.number,tickstart:i.default.oneOfType([i.default.number,i.default.string]),ticksteps:i.default.oneOfType([i.default.number,i.default.string]),width:i.default.oneOfType([i.default.number,i.default.string]),height:i.default.oneOfType([i.default.number,i.default.string])},b.defaultProps={extension:"fasta",colorscale:"clustal2",opacity:null,textcolor:null,textsize:10,showlabel:!0,showid:!0,showconservation:!0,conservationcolor:null,conservationcolorscale:"Viridis",conservationopacity:null,conservationmethod:"entropy",correctgap:!0,showgap:!0,gapcolor:"grey",gapcolorscale:null,gapopacity:null,groupbars:!1,showconsensus:!0,tilewidth:16,tileheight:16,numtiles:null,overview:"heatmap",scrollskip:10,tickstart:null,ticksteps:null,width:null,height:900}},function(t,e,r){"use strict";var n=r(81),a=r(82),i=r(83),o=r(99);function s(t,e,r){var n=t;return a(e)?(r=e,"string"==typeof t&&(n={uri:t})):n=o(e,{uri:t}),n.callback=r,n}function l(t,e,r){return c(e=s(t,e,r))}function c(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,r=function(r,n,a){e||(e=!0,t.callback(r,n,a))};function n(){var t=void 0;if(t=u.response?u.response:u.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(u),m)try{t=JSON.parse(t)}catch(t){}return t}function a(t){return clearTimeout(f),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,y)}function o(){if(!c){var e;clearTimeout(f),e=t.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var a=y,o=null;return 0!==e?(a={body:n(),statusCode:e,method:h,headers:{},url:p,rawRequest:u},u.getAllResponseHeaders&&(a.headers=i(u.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),r(o,a,a.body)}}var s,c,u=t.xhr||null;u||(u=t.cors||t.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var f,p=u.url=t.uri||t.url,h=u.method=t.method||"GET",d=t.body||t.data,g=u.headers=t.headers||{},v=!!t.sync,m=!1,y={body:void 0,headers:{},statusCode:0,method:h,url:p,rawRequest:u};if("json"in t&&!1!==t.json&&(m=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),d=JSON.stringify(!0===t.json?d:t.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(o,0)},u.onload=o,u.onerror=a,u.onprogress=function(){},u.onabort=function(){c=!0},u.ontimeout=a,u.open(h,p,!v,t.username,t.password),v||(u.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,u.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",a(t)}}),t.timeout)),u.setRequestHeader)for(s in g)g.hasOwnProperty(s)&&u.setRequestHeader(s,g[s]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(u.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(u),u.send(d||null),u}t.exports=l,t.exports.default=l,l.XMLHttpRequest=n.XMLHttpRequest||function(){},l.XDomainRequest="withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var r=0;r2?arguments[2]:{},i=n(e);a&&(i=o.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s0&&(n=(r=t.split(" "))[0],a=r[1].replace(/"/g,""),e[n]=a)})),e}function a(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function i(t,e,r){return 3===t.length?i(t[0],t[1],t[2]):"#"+a(t)+a(e)+a(r)}Object.defineProperty(e,"__esModule",{value:!0}),e.extractKeys=n,e.rgbToHex=i,e.default={extractKeys:n,rgbToHex:i}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getConsensus=e.getConservation=e.getEntropy=void 0;var n,a=(n=r(49))&&n.__esModule?n:{default:n};e.getEntropy=function(t){var e;e=a.default.isString(t)?t.split(""):t;var r={};return e.forEach((function(t){return r[t]?r[t]++:r[t]=1})),Object.keys(r).reduce((function(t,n){var a=r[n]/e.length;return t-a*Math.log(a)}),0)};e.getConservation=function(t){var e;return e=a.default.isString(t)?t.split(""):t,(0,a.default)(e).countBy().entries().maxBy("[1]")[1]};e.getConsensus=function(t){return t.map((function(t){return(0,a.default)(t).countBy().entries().maxBy("[1]")[0]}))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisualizations=e.getTicks=e.getHovertext=e.getWidth=e.SUBPLOT_RATIOS=void 0;var n,a=(n=r(49))&&n.__esModule?n:{default:n};e.SUBPLOT_RATIOS={1:1,2:.75,3:.65};e.getWidth=function(t){return a.default.isNumber(t)?t:t.includes("%")?parseFloat(t)/100*window.innerWidth:parseFloat(t)};e.getHovertext=function(t,e){for(var r=[],n=function(n){var a=[],i=0;t[n].forEach((function(t){i+=1;var r=["Name: ".concat(e[n].name),"Organism: ".concat(e[n].os?e[n].os:"N/A"),"ID: ".concat(e[n].id,"
"),"Position: (".concat(i,", ").concat(n,")"),"Letter: ".concat(t)].join("
");a.push(r)})),r.push(a)},i=0;i=0||(a[r]=t[r]);return a}(e,["children"]);if(delete n.in,delete n.mountOnEnter,delete n.unmountOnExit,delete n.appear,delete n.enter,delete n.exit,delete n.timeout,delete n.addEndListener,delete n.onEnter,delete n.onEntering,delete n.onEntered,delete n.onExit,delete n.onExiting,delete n.onExited,"function"==typeof r)return r(t,n);var i=a.default.Children.only(r);return a.default.cloneElement(i,n)},n}(a.default.Component);function c(){}l.contextTypes={transitionGroup:n.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:c,onEntering:c,onEntered:c,onExit:c,onExiting:c,onExited:c},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,o.polyfill)(l);e.default=u},function(t,e,r){"use strict";function n(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function a(t){this.setState(function(e){var r=this.constructor.getDerivedStateFromProps(t,e);return null!=r?r:null}.bind(this))}function i(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}function o(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var r=null,o=null,s=null;if("function"==typeof e.componentWillMount?r="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?s="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==r||null!==o||null!==s){var l=t.displayName||t.name,c="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=n,e.componentWillReceiveProps=a),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=i;var u=e.componentDidUpdate;e.componentDidUpdate=function(t,e,r){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:r;u.call(this,t,e,n)}}return t}r.r(e),r.d(e,"polyfill",(function(){return o})),n.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(t,e,r){"use strict";e.__esModule=!0,e.classNamesShape=e.timeoutsShape=void 0;var n;(n=r(0))&&n.__esModule;e.timeoutsShape=null;e.classNamesShape=null},function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=s(r(0)),a=s(r(1)),i=r(66),o=r(136);function s(t){return t&&t.__esModule?t:{default:t}}function l(){return(l=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,["component","childFactory"]),i=u(this.state.children).map(r);return delete n.appear,delete n.enter,delete n.exit,null===e?i:a.default.createElement(e,n,i)},n}(a.default.Component);f.childContextTypes={transitionGroup:n.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(t){return t}};var p=(0,i.polyfill)(f);e.default=p,t.exports=e.default},,,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AlignmentViewer",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"AlignmentChart",{enumerable:!0,get:function(){return a.default}});var n=i(r(72)),a=i(r(57));function i(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}(r(1)),i=u(r(0)),o=u(r(57)),s=r(123),l=r(64),c=r(137);function u(t){return t&&t.__esModule?t:{default:t}}function f(t){return(f="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function p(){return(p=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function d(t,e){for(var r=0;r: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":717}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1297}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":864}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":877}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":887}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":590}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":896}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":915}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":929}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":936}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":942}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":957}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":968}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":695}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":976}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1298}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":986}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":995}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1299}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":1008}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1017}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":1029}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":1035}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1039}],25:[function(t,e,r){"use strict";e.exports=t("../src/traces/image")},{"../src/traces/image":1046}],26:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./image"),t("./pie"),t("./sunburst"),t("./treemap"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar")]),n.register([t("./aggregate"),t("./filter"),t("./groupby"),t("./sort")]),n.register([t("./calendars")]),e.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(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":1054}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":1060}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":1065}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":1070}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":1079}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":1089}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":1100}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":1109}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":1115}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":1152}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1159}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":1167}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":1180}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1190}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1198}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1205}],43:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1213}],44:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1301}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1222}],46:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1230}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1238}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1247}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1255}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/treemap")},{"../src/traces/treemap":1264}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1276}],52:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1284}],53:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1292}],54:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),f=a(),p=i();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),p.setDistanceLimits(l[0],l[1]),p.lookAt(0,e,r,s),new o({turntable:u,orbit:f,matrix:p},c)};var n=t("turntable-camera-controller"),a=t("orbit-camera-controller"),i=t("matrix-camera-controller");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.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(t){for(var e=t[0],r=[],n=0;n1||a>1)}function M(t,e,r){return t.sort(S),t.forEach((function(n,a){var i,o,s=0;if(q(n,r)&&A(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}})),t}function E(t,r,a,i){var o=e.min(t.links,(function(t){return t.source.y0}));t.links.forEach((function(t){t.circular&&(t.circularPathData={})})),M(t.links.filter((function(t){return"top"==t.circularLinkType})),r,i),M(t.links.filter((function(t){return"bottom"==t.circularLinkType})),r,i),t.links.forEach((function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+10,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,q(e,i)&&A(e))e.circularPathData.leftSmallArcRadius=10+e.width/2,e.circularPathData.leftLargeArcRadius=10+e.width/2,e.circularPathData.rightSmallArcRadius=10+e.width/2,e.circularPathData.rightLargeArcRadius=10+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter((function(t){return t.source.column==s&&t.circularLinkType==l}));"bottom"==e.circularLinkType?c.sort(L):c.sort(C);var u=0;c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=10+e.width/2+u,e.circularPathData.leftLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),s=e.target.column,c=t.links.filter((function(t){return t.target.column==s&&t.circularLinkType==l})),"bottom"==e.circularLinkType?c.sort(P):c.sort(O),u=0,c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=10+e.width/2+u,e.circularPathData.rightLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(a,e.source.y1,e.target.y1)+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){return"top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY}(e);else{var f=n.linkHorizontal().source((function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]})).target((function(t){return[t.target.x0,t.y1]}));e.path=f(e)}}))}function S(t,e){return I(t)==I(e)?"bottom"==t.circularLinkType?L(t,e):C(t,e):I(e)-I(t)}function C(t,e){return t.y0-e.y0}function L(t,e){return e.y0-t.y0}function O(t,e){return t.y1-e.y1}function P(t,e){return e.y1-t.y1}function I(t){return t.target.column-t.source.column}function D(t){return t.target.x0-t.source.x1}function z(t,e){var r=k(t),n=D(e)/Math.tan(r);return"up"==U(t)?t.y1+n:t.y1-n}function R(t,e){var r=k(t),n=D(e)/Math.tan(r);return"up"==U(t)?t.y1-n:t.y1+n}function F(t,e,r,n){t.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++)t.nodes.forEach((function(o){if(o.column==i){var c,u=s/(l+1),f=Math.pow(1-u,3),p=3*u*Math.pow(1-u,2),h=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),g=f*a.y0+p*a.y0+h*a.y1+d*a.y1,v=g-a.width/2,m=g+a.width/2;v>o.y0&&vi.y0&&a.y0i.y0&&a.y1i.y1)&&B(t,c,e,r)}))):m>o.y0&&mo.y1&&B(t,c,e,r)}))):vo.y1&&(c=m-o.y0+10,o=B(o,c,e,r),t.nodes.forEach((function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&B(t,c,e,r)})))}}))}}))}function B(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach((function(t){t.y1=t.y1+e})),t.sourceLinks.forEach((function(t){t.y0=t.y0+e}))),t}function N(t,e,r,n){t.nodes.forEach((function(a){n&&a.y+(a.y1-a.y0)>e&&(a.y=a.y-(a.y+(a.y1-a.y0)-e));var i=t.links.filter((function(t){return b(t.source,r)==b(a,r)})),o=i.length;o>1&&i.sort((function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!V(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=R(e,t);return t.y1-r}if(e.target.column>t.target.column)return R(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0}));var s=a.y0;i.forEach((function(t){t.y0=s+t.width/2,s+=t.width})),i.forEach((function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort((function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!V(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function q(t,e){return b(t.source,e)==b(t.target,e)}function H(t,r,n){var a=t.nodes,i=t.links,o=!1,s=!1;if(i.forEach((function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)})),0==o||0==s){var l=e.min(a,(function(t){return t.y0})),c=(n-r)/(e.max(a,(function(t){return t.y1}))-l);a.forEach((function(t){var e=(t.y1-t.y0)*c;t.y0=(t.y0-l)*c,t.y1=t.y0+e})),i.forEach((function(t){t.y0=(t.y0-l)*c,t.y1=(t.y1-l)*c,t.width=t.width*c}))}}t.sankeyCircular=function(){var t,n,a=0,i=0,b=1,k=1,A=24,M=v,S=o,C=m,L=y,O=32,P=2,I=null;function D(){var t={nodes:C.apply(null,arguments),links:L.apply(null,arguments)};z(t),_(t,0,I),R(t),B(t),w(t,M),V(t,O,M),U(t);for(var e=4,r=0;r0?r+25+10:r,bottom:n=n>0?n+25+10:n,left:i=i>0?i+25+10:i,right:a=a>0?a+25+10:a}}(o),f=function(t,r){var n=e.max(t.nodes,(function(t){return t.column})),o=b-a,s=k-i,l=o/(o+r.right+r.left),c=s/(s+r.top+r.bottom);return a=a*l+r.left,b=0==r.right?b:b*l,i=i*c+r.top,k*=c,t.nodes.forEach((function(t){t.x0=a+t.column*((b-a-A)/n),t.x1=t.x0+A})),c}(o,u);l*=f,o.links.forEach((function(t){t.width=t.value*l})),c.forEach((function(t){var e=t.length;t.forEach((function(t,n){t.depth==c.length-1&&1==e?(t.y0=k/2-t.value*l,t.y1=t.y0+t.value*l):0==t.depth&&1==e?(t.y0=k/2-t.value*l,t.y1=t.y0+t.value*l):t.partOfCycle?0==T(t,r)?(t.y0=k/2+n,t.y1=t.y0+t.value*l):"top"==t.circularLinkType?(t.y0=i+n,t.y1=t.y0+t.value*l):(t.y0=k-t.value*l-n,t.y1=t.y0+t.value*l):0==u.top||0==u.bottom?(t.y0=(k-i)/e*n,t.y1=t.y0+t.value*l):(t.y0=(k-i)/2-e/2+n,t.y1=t.y0+t.value*l)}))}))}(l),y();for(var u=1,v=s;v>0;--v)m(u*=.99,l),y();function m(t,r){var n=c.length;c.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&&T(a,r)>0);else if(0==o&&1==i)s=a.y1-a.y0,a.y0=k/2-s/2,a.y1=k/2+s/2;else if(o==n-1&&1==i)s=a.y1-a.y0,a.y0=k/2-s/2,a.y1=k/2+s/2;else{var l=e.mean(a.sourceLinks,g),c=e.mean(a.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-h(a))*t;a.y0+=u,a.y1+=u}}))}))}function y(){c.forEach((function(e){var r,n,a,o=i,s=e.length;for(e.sort(f),a=0;a0&&(r.y0+=n,r.y1+=n),o=r.y1+t;if((n=o-t-k)>0)for(o=r.y0-=n,r.y1-=n,a=s-2;a>=0;--a)(n=(r=e[a]).y1+t-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}function U(t){t.nodes.forEach((function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)})),t.nodes.forEach((function(t){var e=t.y0,r=e,n=t.y1,a=n;t.sourceLinks.forEach((function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)})),t.targetLinks.forEach((function(t){t.circular?(t.y1=a-t.width/2,a-=t.width):(t.y1=r+t.width/2,r+=t.width)}))}))}return D.nodeId=function(t){return arguments.length?(M="function"==typeof t?t:s(t),D):M},D.nodeAlign=function(t){return arguments.length?(S="function"==typeof t?t:s(t),D):S},D.nodeWidth=function(t){return arguments.length?(A=+t,D):A},D.nodePadding=function(e){return arguments.length?(t=+e,D):t},D.nodes=function(t){return arguments.length?(C="function"==typeof t?t:s(t),D):C},D.links=function(t){return arguments.length?(L="function"==typeof t?t:s(t),D):L},D.size=function(t){return arguments.length?(a=i=0,b=+t[0],k=+t[1],D):[b-a,k-i]},D.extent=function(t){return arguments.length?(a=+t[0][0],b=+t[1][0],i=+t[0][1],k=+t[1][1],D):[[a,i],[b,k]]},D.iterations=function(t){return arguments.length?(O=+t,D):O},D.circularLinkGap=function(t){return arguments.length?(P=+t,D):P},D.nodePaddingRatio=function(t){return arguments.length?(n=+t,D):n},D.sortNodes=function(t){return arguments.length?(I=t,D):I},D.update=function(t){return w(t,M),U(t),t.links.forEach((function(t){t.circular&&(t.circularLinkType=t.y0+t.y1i&&(b=i);var o=e.min(a,(function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)}));a.forEach((function(t){t.forEach((function(t,e){t.y1=(t.y0=e)+t.value*o}))})),t.links.forEach((function(t){t.width=t.value*o}))}(),d();for(var i=1,o=A;o>0;--o)l(i*=.99),d(),s(i),d();function s(t){a.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,p)/e.sum(r.targetLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function l(t){a.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,h)/e.sum(r.sourceLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function d(){a.forEach((function(t){var e,r,a,i=n,o=t.length;for(t.sort(c),a=0;a0&&(e.y0+=r,e.y1+=r),i=e.y1+b;if((r=i-b-y)>0)for(i=e.y0-=r,e.y1-=r,a=o-2;a>=0;--a)(r=(e=t[a]).y1+b-i)>0&&(e.y0-=r,e.y1-=r),i=e.y0}))}}function O(t){t.nodes.forEach((function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)})),t.nodes.forEach((function(t){var e=t.y0,r=e;t.sourceLinks.forEach((function(t){t.y0=e+t.width/2,e+=t.width})),t.targetLinks.forEach((function(t){t.y1=r+t.width/2,r+=t.width}))}))}return M.update=function(t){return O(t),t},M.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),M):_},M.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),M):w},M.nodeWidth=function(t){return arguments.length?(x=+t,M):x},M.nodePadding=function(t){return arguments.length?(b=+t,M):b},M.nodes=function(t){return arguments.length?(k="function"==typeof t?t:o(t),M):k},M.links=function(t){return arguments.length?(T="function"==typeof t?t:o(t),M):T},M.size=function(e){return arguments.length?(t=n=0,a=+e[0],y=+e[1],M):[a-t,y-n]},M.extent=function(e){return arguments.length?(t=+e[0][0],a=+e[1][0],n=+e[0][1],y=+e[1][1],M):[[t,n],[a,y]]},M.iterations=function(t){return arguments.length?(A=+t,M):A},M},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,a)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=i,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":154,"d3-collection":155,"d3-shape":163}],57:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/meta");function a(t){var e=0;if(t&&t.length>0){e+=Math.abs(i(t[0]));for(var r=1;r2){for(s=0;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=f,r.lengthToRadians=p,r.lengthToDegrees=function(t,e){return h(p(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=h,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return f(p(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var a=r.areaFactors[e];if(!a)throw new Error("invalid original units");var i=r.areaFactors[n];if(!i)throw new Error("invalid final units");return t/a*i},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!d(t))throw new Error("bbox must only contain numbers")}))},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))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`")}},{}],61:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function a(t,e,r){if(null!==t)for(var n,i,o,s,l,c,u,f,p=0,h=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;yc||h>u||d>f)return l=a,c=r,u=h,f=d,void(o=0);var g=n.lineString([l,a],t.properties);if(!1===e(g,r,i,d,o))return!1;o++,l=a}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,a){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,r,a,0,0))return!1;break;case"Polygon":for(var s=0;sa&&(a=t[o]),t[o]=1?(n=s.shift(),a=s.join(" ")):n=t,n){var l=n.split("|");for(e=l.pop(),o.en=e;0!=l.length;){var c=l.shift(),u=l.shift();i[c]=u}}else e=n;if(a){var f=a.split("=");if(f.length>1){var p,h;f.length;f.forEach((function(t){var e,n=(t=t.trim()).split(" ");if(n.length>1?(h=n.pop(),e=n.join(" ")):e=t,p){var a=p.toLowerCase();o[a]=e}else r=e;p=h}))}else r=f.shift()}var d={name:e,ids:i,details:o};return r&&(d.desc=r),d};var a={sp:{link:"http://www.uniprot.org/%s",name:"Uniprot"},tr:{link:"http://www.uniprot.org/%s",name:"Trembl"},gb:{link:"http://www.ncbi.nlm.nih.gov/nuccore/%s",name:"Genbank"},pdb:{link:"http://www.rcsb.org/pdb/explore/explore.do?structureId=%s",name:"PDB"}};n.buildLinks=function(t){var e={};return t=t||{},Object.keys(t).forEach((function(r){if(r in a){var n=a[r],i=n.link.replace("%s",t[r]);e[n.name]=i}})),e},n.contains=function(t,e){return-1!=="".indexOf.call(t,e,0)},n.splitNChars=function(t,e){var r,n;e=e||80;var a=[];for(r=0,n=t.length-1;r<=n;r+=e)a.push(t.substr(r,e));return a},n.reverse=function(t){return t.split("").reverse().join("")},n.complement=function(t){var e=t+"",r=[[/g/g,"0"],[/c/g,"1"],[/0/g,"c"],[/1/g,"g"],[/G/g,"0"],[/C/g,"1"],[/0/g,"C"],[/1/g,"G"],[/a/g,"0"],[/t/g,"1"],[/0/g,"t"],[/1/g,"a"],[/A/g,"0"],[/T/g,"1"],[/0/g,"T"],[/1/g,"A"]];for(var n in r)e=e.replace(r[n][0],r[n][1]);return e},n.reverseComplement=function(t){return n.reverse(n.complement(t))},n.model=function(t,e,r){this.seq=t,this.name=e,this.id=r,this.ids={}}},127:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}(r(1)),i=p(r(0)),o=p(r(70)),s=p(r(99)),l=r(186),c=r(133),u=r(134),f=r(216);function p(t){return t&&t.__esModule?t:{default:t}}function h(t){return(h="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function d(){return(d=Object.assign||function(t){for(var e=1;eK&&(K=e):e=(0,c.getConservation)(t),e})),Z="entropy"===x?Z.map((function(t){return 1-t/K})):Z.map((function(t){return t/I}))),_&&(J=P.map((function(t){return o.default.countBy(t)["-"]/I}))),b)for(var $=0;$Bar weights",titlefont:{size:12},showgrid:!1,zeroline:!1,domain:[.75,1]}):3===p?(S.yaxis.domain=[0,.64],S.yaxis2={title:"Conservation",titlefont:{size:12},showgrid:!1,zeroline:!1,domain:[.65,.89]},S.yaxis3={title:"Gap",titlefont:{size:12},showgrid:!1,zeroline:!1,domain:[.9,1]}):S.yaxis.domain=[0,1],"heatmap"===m?(S.xaxis.rangeslider={autorange:!0},S.xaxis.tick0=x,S.xaxis.dtick=b,S.margin={t:20,r:20,b:20}):"slider"===m?S.sliders=[{currentvalue:{prefix:"Position ",suffix:""},steps:i}]:(S.xaxis.tick0=x,S.xaxis.dtick=b,S.margin={t:20,r:20,b:20}),{layout:S,width:e,height:n}}},{key:"componentDidMount",value:function(){var t=this.resetWindowing(this.props),e=t.xStart,r=t.xEnd;this.setState({xStart:e,xEnd:r})}},{key:"componentDidUpdate",value:function(t,e){if(this.props.data!==t.data){var r=this.resetWindowing(this.props),n=r.xStart,a=r.xEnd;this.setState({xStart:n,xEnd:a})}}},{key:"render",value:function(){var t=this.getData(),e=t.data,r=t.length,n=t.count,i=t.labels,o=t.tick,l=t.plotCount,c=this.getLayout({length:r,count:n,labels:i,tick:o,plotCount:l}),u=c.layout,f={style:{width:c.width,height:c.height},useResizeHandler:!0};return a.default.createElement("div",null,a.default.createElement(s.default,d({data:e,layout:u,onClick:this.handleChange,onHover:this.handleChange,onRelayout:this.handleChange},f)))}}])&&v(r.prototype,n),i&&v(r,i),e}(a.PureComponent);e.default=b,b.propTypes={data:i.default.string,extension:i.default.string,colorscale:i.default.oneOfType([i.default.string,i.default.object]),opacity:i.default.oneOfType([i.default.number,i.default.string]),textcolor:i.default.string,textsize:i.default.oneOfType([i.default.number,i.default.string]),showlabel:i.default.bool,showid:i.default.bool,showconservation:i.default.bool,conservationcolor:i.default.string,conservationcolorscale:i.default.oneOfType([i.default.string,i.default.array]),conservationopacity:i.default.oneOfType([i.default.number,i.default.string]),conservationmethod:i.default.oneOf(["conservation","entropy"]),correctgap:i.default.bool,showgap:i.default.bool,gapcolor:i.default.string,gapcolorscale:i.default.oneOfType([i.default.string,i.default.array]),gapopacity:i.default.oneOfType([i.default.number,i.default.string]),groupbars:i.default.bool,showconsensus:i.default.bool,tilewidth:i.default.number,tileheight:i.default.number,overview:i.default.oneOf(["heatmap","slider","none"]),numtiles:i.default.number,scrollskip:i.default.number,tickstart:i.default.oneOfType([i.default.number,i.default.string]),ticksteps:i.default.oneOfType([i.default.number,i.default.string]),width:i.default.oneOfType([i.default.number,i.default.string]),height:i.default.oneOfType([i.default.number,i.default.string])},b.defaultProps={extension:"fasta",colorscale:"clustal2",opacity:null,textcolor:null,textsize:10,showlabel:!0,showid:!0,showconservation:!0,conservationcolor:null,conservationcolorscale:"Viridis",conservationopacity:null,conservationmethod:"entropy",correctgap:!0,showgap:!0,gapcolor:"grey",gapcolorscale:null,gapopacity:null,groupbars:!1,showconsensus:!0,tilewidth:16,tileheight:16,numtiles:null,overview:"heatmap",scrollskip:10,tickstart:null,ticksteps:null,width:null,height:900}},128:function(t,e,r){"use strict";var n=r(189),a=r(190),i=r(191),o=r(207);function s(t,e,r){var n=t;return a(e)?(r=e,"string"==typeof t&&(n={uri:t})):n=o(e,{uri:t}),n.callback=r,n}function l(t,e,r){return c(e=s(t,e,r))}function c(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,r=function(r,n,a){e||(e=!0,t.callback(r,n,a))};function n(){var t=void 0;if(t=u.response?u.response:u.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(u),m)try{t=JSON.parse(t)}catch(t){}return t}function a(t){return clearTimeout(f),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,y)}function o(){if(!c){var e;clearTimeout(f),e=t.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var a=y,o=null;return 0!==e?(a={body:n(),statusCode:e,method:h,headers:{},url:p,rawRequest:u},u.getAllResponseHeaders&&(a.headers=i(u.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),r(o,a,a.body)}}var s,c,u=t.xhr||null;u||(u=t.cors||t.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var f,p=u.url=t.uri||t.url,h=u.method=t.method||"GET",d=t.body||t.data,g=u.headers=t.headers||{},v=!!t.sync,m=!1,y={body:void 0,headers:{},statusCode:0,method:h,url:p,rawRequest:u};if("json"in t&&!1!==t.json&&(m=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),d=JSON.stringify(!0===t.json?d:t.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(o,0)},u.onload=o,u.onerror=a,u.onprogress=function(){},u.onabort=function(){c=!0},u.ontimeout=a,u.open(h,p,!v,t.username,t.password),v||(u.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,u.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",a(t)}}),t.timeout)),u.setRequestHeader)for(s in g)g.hasOwnProperty(s)&&u.setRequestHeader(s,g[s]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(u.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(u),u.send(d||null),u}t.exports=l,t.exports.default=l,l.XMLHttpRequest=n.XMLHttpRequest||function(){},l.XDomainRequest="withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var r=0;r2?arguments[2]:{},i=n(e);a&&(i=o.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s0&&(n=(r=t.split(" "))[0],a=r[1].replace(/"/g,""),e[n]=a)})),e}function a(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function i(t,e,r){return 3===t.length?i(t[0],t[1],t[2]):"#"+a(t)+a(e)+a(r)}Object.defineProperty(e,"__esModule",{value:!0}),e.extractKeys=n,e.rgbToHex=i,e.default={extractKeys:n,rgbToHex:i}},133:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getConsensus=e.getConservation=e.getEntropy=void 0;var n,a=(n=r(70))&&n.__esModule?n:{default:n};e.getEntropy=function(t){var e;e=a.default.isString(t)?t.split(""):t;var r={};return e.forEach((function(t){return r[t]?r[t]++:r[t]=1})),Object.keys(r).reduce((function(t,n){var a=r[n]/e.length;return t-a*Math.log(a)}),0)};e.getConservation=function(t){var e;return e=a.default.isString(t)?t.split(""):t,(0,a.default)(e).countBy().entries().maxBy("[1]")[1]};e.getConsensus=function(t){return t.map((function(t){return(0,a.default)(t).countBy().entries().maxBy("[1]")[0]}))}},134:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisualizations=e.getTicks=e.getHovertext=e.getWidth=e.SUBPLOT_RATIOS=void 0;var n,a=(n=r(70))&&n.__esModule?n:{default:n};e.SUBPLOT_RATIOS={1:1,2:.75,3:.65};e.getWidth=function(t){return a.default.isNumber(t)?t:t.includes("%")?parseFloat(t)/100*window.innerWidth:parseFloat(t)};e.getHovertext=function(t,e){for(var r=[],n=function(n){var a=[],i=0;t[n].forEach((function(t){i+=1;var r=["Name: ".concat(e[n].name),"Organism: ".concat(e[n].os?e[n].os:"N/A"),"ID: ".concat(e[n].id,"
"),"Position: (".concat(i,", ").concat(n,")"),"Letter: ".concat(t)].join("
");a.push(r)})),r.push(a)},i=0;i=0||(a[r]=t[r]);return a}(e,["children"]);if(delete n.in,delete n.mountOnEnter,delete n.unmountOnExit,delete n.appear,delete n.enter,delete n.exit,delete n.timeout,delete n.addEndListener,delete n.onEnter,delete n.onEntering,delete n.onEntered,delete n.onExit,delete n.onExiting,delete n.onExited,"function"==typeof r)return r(t,n);var i=a.default.Children.only(r);return a.default.cloneElement(i,n)},n}(a.default.Component);function c(){}l.contextTypes={transitionGroup:n.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:c,onEntering:c,onEntered:c,onExit:c,onExiting:c,onExited:c},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,o.polyfill)(l);e.default=u},136:function(t,e,r){"use strict";function n(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function a(t){this.setState(function(e){var r=this.constructor.getDerivedStateFromProps(t,e);return null!=r?r:null}.bind(this))}function i(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}function o(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var r=null,o=null,s=null;if("function"==typeof e.componentWillMount?r="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?s="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==r||null!==o||null!==s){var l=t.displayName||t.name,c="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=n,e.componentWillReceiveProps=a),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=i;var u=e.componentDidUpdate;e.componentDidUpdate=function(t,e,r){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:r;u.call(this,t,e,n)}}return t}r.r(e),r.d(e,"polyfill",(function(){return o})),n.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},137:function(t,e,r){"use strict";e.__esModule=!0,e.classNamesShape=e.timeoutsShape=void 0;var n;(n=r(0))&&n.__esModule;e.timeoutsShape=null;e.classNamesShape=null},138:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=s(r(0)),a=s(r(1)),i=r(136),o=r(244);function s(t){return t&&t.__esModule?t:{default:t}}function l(){return(l=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,["component","childFactory"]),i=u(this.state.children).map(r);return delete n.appear,delete n.enter,delete n.exit,null===e?i:a.default.createElement(e,n,i)},n}(a.default.Component);f.childContextTypes={transitionGroup:n.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(t){return t}};var p=(0,i.polyfill)(f);e.default=p,t.exports=e.default},179:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AlignmentViewer",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"AlignmentChart",{enumerable:!0,get:function(){return a.default}});var n=i(r(180)),a=i(r(127));function i(t){return t&&t.__esModule?t:{default:t}}},180:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}(r(1)),i=u(r(0)),o=u(r(127)),s=r(231),l=r(134),c=r(245);function u(t){return t&&t.__esModule?t:{default:t}}function f(t){return(f="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function p(){return(p=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function d(t,e){for(var r=0;r: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":717}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1297}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":864}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":877}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":887}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":590}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":896}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":915}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":929}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":936}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":942}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":957}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":968}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":695}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":976}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1298}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":986}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":995}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1299}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":1008}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1017}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":1029}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":1035}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1039}],25:[function(t,e,r){"use strict";e.exports=t("../src/traces/image")},{"../src/traces/image":1046}],26:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./image"),t("./pie"),t("./sunburst"),t("./treemap"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar")]),n.register([t("./aggregate"),t("./filter"),t("./groupby"),t("./sort")]),n.register([t("./calendars")]),e.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(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":1054}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":1060}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":1065}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":1070}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":1079}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":1089}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":1100}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":1109}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":1115}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":1152}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1159}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":1167}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":1180}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1190}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1198}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1205}],43:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1213}],44:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1301}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1222}],46:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1230}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1238}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1247}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1255}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/treemap")},{"../src/traces/treemap":1264}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1276}],52:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1284}],53:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1292}],54:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),f=a(),p=i();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),p.setDistanceLimits(l[0],l[1]),p.lookAt(0,e,r,s),new o({turntable:u,orbit:f,matrix:p},c)};var n=t("turntable-camera-controller"),a=t("orbit-camera-controller"),i=t("matrix-camera-controller");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.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(t){for(var e=t[0],r=[],n=0;n1||a>1)}function M(t,e,r){return t.sort(S),t.forEach((function(n,a){var i,o,s=0;if(q(n,r)&&A(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}})),t}function E(t,r,a,i){var o=e.min(t.links,(function(t){return t.source.y0}));t.links.forEach((function(t){t.circular&&(t.circularPathData={})})),M(t.links.filter((function(t){return"top"==t.circularLinkType})),r,i),M(t.links.filter((function(t){return"bottom"==t.circularLinkType})),r,i),t.links.forEach((function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+10,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,q(e,i)&&A(e))e.circularPathData.leftSmallArcRadius=10+e.width/2,e.circularPathData.leftLargeArcRadius=10+e.width/2,e.circularPathData.rightSmallArcRadius=10+e.width/2,e.circularPathData.rightLargeArcRadius=10+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter((function(t){return t.source.column==s&&t.circularLinkType==l}));"bottom"==e.circularLinkType?c.sort(L):c.sort(C);var u=0;c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=10+e.width/2+u,e.circularPathData.leftLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),s=e.target.column,c=t.links.filter((function(t){return t.target.column==s&&t.circularLinkType==l})),"bottom"==e.circularLinkType?c.sort(P):c.sort(O),u=0,c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=10+e.width/2+u,e.circularPathData.rightLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(a,e.source.y1,e.target.y1)+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){return"top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY}(e);else{var f=n.linkHorizontal().source((function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]})).target((function(t){return[t.target.x0,t.y1]}));e.path=f(e)}}))}function S(t,e){return I(t)==I(e)?"bottom"==t.circularLinkType?L(t,e):C(t,e):I(e)-I(t)}function C(t,e){return t.y0-e.y0}function L(t,e){return e.y0-t.y0}function O(t,e){return t.y1-e.y1}function P(t,e){return e.y1-t.y1}function I(t){return t.target.column-t.source.column}function D(t){return t.target.x0-t.source.x1}function z(t,e){var r=k(t),n=D(e)/Math.tan(r);return"up"==U(t)?t.y1+n:t.y1-n}function R(t,e){var r=k(t),n=D(e)/Math.tan(r);return"up"==U(t)?t.y1-n:t.y1+n}function F(t,e,r,n){t.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++)t.nodes.forEach((function(o){if(o.column==i){var c,u=s/(l+1),f=Math.pow(1-u,3),p=3*u*Math.pow(1-u,2),h=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),g=f*a.y0+p*a.y0+h*a.y1+d*a.y1,v=g-a.width/2,m=g+a.width/2;v>o.y0&&vi.y0&&a.y0i.y0&&a.y1i.y1)&&B(t,c,e,r)}))):m>o.y0&&mo.y1&&B(t,c,e,r)}))):vo.y1&&(c=m-o.y0+10,o=B(o,c,e,r),t.nodes.forEach((function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&B(t,c,e,r)})))}}))}}))}function B(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach((function(t){t.y1=t.y1+e})),t.sourceLinks.forEach((function(t){t.y0=t.y0+e}))),t}function N(t,e,r,n){t.nodes.forEach((function(a){n&&a.y+(a.y1-a.y0)>e&&(a.y=a.y-(a.y+(a.y1-a.y0)-e));var i=t.links.filter((function(t){return b(t.source,r)==b(a,r)})),o=i.length;o>1&&i.sort((function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!V(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=R(e,t);return t.y1-r}if(e.target.column>t.target.column)return R(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0}));var s=a.y0;i.forEach((function(t){t.y0=s+t.width/2,s+=t.width})),i.forEach((function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort((function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!V(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function q(t,e){return b(t.source,e)==b(t.target,e)}function H(t,r,n){var a=t.nodes,i=t.links,o=!1,s=!1;if(i.forEach((function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)})),0==o||0==s){var l=e.min(a,(function(t){return t.y0})),c=(n-r)/(e.max(a,(function(t){return t.y1}))-l);a.forEach((function(t){var e=(t.y1-t.y0)*c;t.y0=(t.y0-l)*c,t.y1=t.y0+e})),i.forEach((function(t){t.y0=(t.y0-l)*c,t.y1=(t.y1-l)*c,t.width=t.width*c}))}}t.sankeyCircular=function(){var t,n,a=0,i=0,b=1,k=1,A=24,M=v,S=o,C=m,L=y,O=32,P=2,I=null;function D(){var t={nodes:C.apply(null,arguments),links:L.apply(null,arguments)};z(t),_(t,0,I),R(t),B(t),w(t,M),V(t,O,M),U(t);for(var e=4,r=0;r0?r+25+10:r,bottom:n=n>0?n+25+10:n,left:i=i>0?i+25+10:i,right:a=a>0?a+25+10:a}}(o),f=function(t,r){var n=e.max(t.nodes,(function(t){return t.column})),o=b-a,s=k-i,l=o/(o+r.right+r.left),c=s/(s+r.top+r.bottom);return a=a*l+r.left,b=0==r.right?b:b*l,i=i*c+r.top,k*=c,t.nodes.forEach((function(t){t.x0=a+t.column*((b-a-A)/n),t.x1=t.x0+A})),c}(o,u);l*=f,o.links.forEach((function(t){t.width=t.value*l})),c.forEach((function(t){var e=t.length;t.forEach((function(t,n){t.depth==c.length-1&&1==e?(t.y0=k/2-t.value*l,t.y1=t.y0+t.value*l):0==t.depth&&1==e?(t.y0=k/2-t.value*l,t.y1=t.y0+t.value*l):t.partOfCycle?0==T(t,r)?(t.y0=k/2+n,t.y1=t.y0+t.value*l):"top"==t.circularLinkType?(t.y0=i+n,t.y1=t.y0+t.value*l):(t.y0=k-t.value*l-n,t.y1=t.y0+t.value*l):0==u.top||0==u.bottom?(t.y0=(k-i)/e*n,t.y1=t.y0+t.value*l):(t.y0=(k-i)/2-e/2+n,t.y1=t.y0+t.value*l)}))}))}(l),y();for(var u=1,v=s;v>0;--v)m(u*=.99,l),y();function m(t,r){var n=c.length;c.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&&T(a,r)>0);else if(0==o&&1==i)s=a.y1-a.y0,a.y0=k/2-s/2,a.y1=k/2+s/2;else if(o==n-1&&1==i)s=a.y1-a.y0,a.y0=k/2-s/2,a.y1=k/2+s/2;else{var l=e.mean(a.sourceLinks,g),c=e.mean(a.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-h(a))*t;a.y0+=u,a.y1+=u}}))}))}function y(){c.forEach((function(e){var r,n,a,o=i,s=e.length;for(e.sort(f),a=0;a0&&(r.y0+=n,r.y1+=n),o=r.y1+t;if((n=o-t-k)>0)for(o=r.y0-=n,r.y1-=n,a=s-2;a>=0;--a)(n=(r=e[a]).y1+t-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}function U(t){t.nodes.forEach((function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)})),t.nodes.forEach((function(t){var e=t.y0,r=e,n=t.y1,a=n;t.sourceLinks.forEach((function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)})),t.targetLinks.forEach((function(t){t.circular?(t.y1=a-t.width/2,a-=t.width):(t.y1=r+t.width/2,r+=t.width)}))}))}return D.nodeId=function(t){return arguments.length?(M="function"==typeof t?t:s(t),D):M},D.nodeAlign=function(t){return arguments.length?(S="function"==typeof t?t:s(t),D):S},D.nodeWidth=function(t){return arguments.length?(A=+t,D):A},D.nodePadding=function(e){return arguments.length?(t=+e,D):t},D.nodes=function(t){return arguments.length?(C="function"==typeof t?t:s(t),D):C},D.links=function(t){return arguments.length?(L="function"==typeof t?t:s(t),D):L},D.size=function(t){return arguments.length?(a=i=0,b=+t[0],k=+t[1],D):[b-a,k-i]},D.extent=function(t){return arguments.length?(a=+t[0][0],b=+t[1][0],i=+t[0][1],k=+t[1][1],D):[[a,i],[b,k]]},D.iterations=function(t){return arguments.length?(O=+t,D):O},D.circularLinkGap=function(t){return arguments.length?(P=+t,D):P},D.nodePaddingRatio=function(t){return arguments.length?(n=+t,D):n},D.sortNodes=function(t){return arguments.length?(I=t,D):I},D.update=function(t){return w(t,M),U(t),t.links.forEach((function(t){t.circular&&(t.circularLinkType=t.y0+t.y1i&&(b=i);var o=e.min(a,(function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)}));a.forEach((function(t){t.forEach((function(t,e){t.y1=(t.y0=e)+t.value*o}))})),t.links.forEach((function(t){t.width=t.value*o}))}(),d();for(var i=1,o=A;o>0;--o)l(i*=.99),d(),s(i),d();function s(t){a.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,p)/e.sum(r.targetLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function l(t){a.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,h)/e.sum(r.sourceLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function d(){a.forEach((function(t){var e,r,a,i=n,o=t.length;for(t.sort(c),a=0;a0&&(e.y0+=r,e.y1+=r),i=e.y1+b;if((r=i-b-y)>0)for(i=e.y0-=r,e.y1-=r,a=o-2;a>=0;--a)(r=(e=t[a]).y1+b-i)>0&&(e.y0-=r,e.y1-=r),i=e.y0}))}}function O(t){t.nodes.forEach((function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)})),t.nodes.forEach((function(t){var e=t.y0,r=e;t.sourceLinks.forEach((function(t){t.y0=e+t.width/2,e+=t.width})),t.targetLinks.forEach((function(t){t.y1=r+t.width/2,r+=t.width}))}))}return M.update=function(t){return O(t),t},M.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),M):_},M.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),M):w},M.nodeWidth=function(t){return arguments.length?(x=+t,M):x},M.nodePadding=function(t){return arguments.length?(b=+t,M):b},M.nodes=function(t){return arguments.length?(k="function"==typeof t?t:o(t),M):k},M.links=function(t){return arguments.length?(T="function"==typeof t?t:o(t),M):T},M.size=function(e){return arguments.length?(t=n=0,a=+e[0],y=+e[1],M):[a-t,y-n]},M.extent=function(e){return arguments.length?(t=+e[0][0],a=+e[1][0],n=+e[0][1],y=+e[1][1],M):[[t,n],[a,y]]},M.iterations=function(t){return arguments.length?(A=+t,M):A},M},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,a)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=i,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":154,"d3-collection":155,"d3-shape":163}],57:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/meta");function a(t){var e=0;if(t&&t.length>0){e+=Math.abs(i(t[0]));for(var r=1;r2){for(s=0;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=f,r.lengthToRadians=p,r.lengthToDegrees=function(t,e){return h(p(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=h,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return f(p(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var a=r.areaFactors[e];if(!a)throw new Error("invalid original units");var i=r.areaFactors[n];if(!i)throw new Error("invalid final units");return t/a*i},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!d(t))throw new Error("bbox must only contain numbers")}))},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))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`")}},{}],61:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function a(t,e,r){if(null!==t)for(var n,i,o,s,l,c,u,f,p=0,h=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;yc||h>u||d>f)return l=a,c=r,u=h,f=d,void(o=0);var g=n.lineString([l,a],t.properties);if(!1===e(g,r,i,d,o))return!1;o++,l=a}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,a){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,r,a,0,0))return!1;break;case"Polygon":for(var s=0;sa&&(a=t[o]),t[o]=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a=(a+=t).substr(0,r)}},{}],503:[function(t,r,n){(function(t){r.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],504:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,a=e-2;a>=0;--a){var i=r,o=t[a];(l=o-((r=i+o)-i))&&(t[--n]=r,r=l)}var s=0;for(a=n;a>1;return["sum(",t(e.slice(0,r)),",",t(e.slice(r)),")"].join("")}(e);var n}function u(t){return new Function("sum","scale","prod","compress",["function robustDeterminant",t,"(m){return compress(",c(l(t)),")};return robustDeterminant",t].join(""))(a,i,n,o)}var f=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;f.length<6;)f.push(u(f.length));for(var t=[],r=["function robustDeterminant(m){switch(m.length){"],n=0;n<6;++n)t.push("det"+n),r.push("case ",n,":return det",n,"(m);");r.push("}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant"),t.push("CACHE","gen",r.join(""));var a=Function.apply(void 0,t);for(e.exports=a.apply(void 0,f.concat([f,u])),n=0;n>1;return["sum(",l(t.slice(0,e)),",",l(t.slice(e)),")"].join("")}function c(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return c(e,t)}function u(t){if(2===t.length)return[["diff(",c(t[0][0],t[1][1]),",",c(t[1][0],t[0][1]),")"].join("")];for(var e=[],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 ",e);var s=new Function("det",r.join(""));return s(t<6?n[t]:n)}var i=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;i.length<6;)i.push(a(i.length));for(var t=[],r=["function dispatchLinearSolve(A,b){switch(A.length){"],n=0;n<6;++n)t.push("s"+n),r.push("case ",n,":return s",n,"(A,b);");r.push("}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve"),t.push("CACHE","g",r.join(""));var o=Function.apply(void 0,t);for(e.exports=o.apply(void 0,i.concat([i,a])),n=0;n<6;++n)e.exports[n]=i[n]}()},{"robust-determinant":505}],509:[function(t,e,r){"use strict";var n=t("two-product"),a=t("robust-sum"),i=t("robust-scale"),o=t("robust-subtract");function s(t,e){for(var r=new Array(t.length-1),n=1;n>1;return["sum(",l(t.slice(0,e)),",",l(t.slice(e)),")"].join("")}function c(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],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:f(t,e,r)},function(t,e,r,n){var a=t[0]-n[0],i=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=i*c,g=o*l,v=o*s,m=a*c,y=a*l,x=i*s,b=u*(d-g)+f*(v-m)+h*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>_||-b>_?b:p(t,e,r,n)}];function d(t){var e=h[t.length];return e||(e=h[t.length]=u(t.length)),e.apply(void 0,t)}!function(){for(;h.length<=5;)h.push(u(h.length));for(var t=[],r=["slow"],n=0;n<=5;++n)t.push("a"+n),r.push("o"+n);var a=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=5;++n)a.push("case ",n,":return o",n,"(",t.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,t,e),l=n(a,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==i||0!==o||0!==s||0!==l||function(t,e,r,n){for(var a=0;a<2;++a){var i=t[a],o=e[a],s=Math.min(i,o),l=Math.max(i,o),c=r[a],u=n[a],f=Math.min(c,u);if(Math.max(c,u)=n?(a=f,(l+=1)=n?(a=f,(l+=1)0?1:0}},{}],516:[function(t,e,r){"use strict";e.exports=function(t){return a(n(t))};var n=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":97,"reduce-simplicial-complex":491}],517:[function(t,e,r){"use strict";e.exports=function(t,e,r,s){if(r=r||0,void 0===s&&(s=function(t){for(var e=t.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=t+1;i>1;--i){i>1,s=i(t[o],e);s<=0?(0===s&&(a=o),r=o+1):s>0&&(n=o-1)}return a}function u(t,e){for(var r=new Array(t.length),a=0,o=r.length;a=t.length||0!==i(t[v],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],a=(1<>>u&1&&c.push(a[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,a=2*(t+1),i=t;if(n0;){var r=y(t);if(!(r>=0&&e0){var t=T[0];return v(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=T[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}var T=[],A=new Array(i);for(f=0;f>1;f>=0;--f)x(f);for(;;){var E=_();if(E<0||c[E]>r)break;k(E)}var S=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],a=A[r];n!==a&&L.push([n,a])}})),a.unique(a.normalize(L)),{positions:S,edges:L}};var n=t("robust-orientation"),a=t("simplicial-complex")},{"robust-orientation":509,"simplicial-complex":521}],524:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,o,s;if(e[0][0]e[1][0]))return a(e,t);r=e[1],i=e[0]}if(t[0][0]t[1][0]))return-a(t,e);o=t[1],s=t[0]}var l=n(r,i,s),c=n(r,i,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,i),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return i[0]-s[0]};var n=t("robust-orientation");function a(t,e){var r,a,i,o;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return lu?s-u:l-u}r=e[1],a=e[0]}t[0][1]0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),a=-1;if(r&&(a=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?o(u.key,s)>0&&(s=u.key,a=u.value):(a=u.value,s=u.key))}var f=this.horizontal[e];if(f.length>0){var p=n.ge(f,t[1],l);if(p=f.length)return a;h=f[p]}}if(h.start)if(s){var d=i(s[0],s[1],[t[0],h.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(a=h.index)}else a=h.index;else h.y!==t[1]&&(a=h.index)}}}return a}},{"./lib/order-segments":524,"binary-search-bounds":93,"functional-red-black-tree":233,"robust-orientation":509}],526:[function(t,e,r){"use strict";var n=t("robust-dot-product"),a=t("robust-sum");function i(t,e){var r=a(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var a=-e/(n-e);a<0?a=0:a>1&&(a=1);for(var i=1-a,o=t.length,s=new Array(o),l=0;l0||a>0&&u<0){var f=o(s,u,l,a);r.push(f),n.push(f.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),a=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{"robust-dot-product":506,"robust-sum":514}],527:[function(t,e,r){!function(){"use strict";var t={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 e(t){return a(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function a(r,n){var a,i,o,s,l,c,u,f,p,h=1,d=r.length,g="";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()}t.json.test(s.type)?g+=a:(!t.number.test(s.type)||f&&!s.sign?p="":(p=f?"+":"-",a=a.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(p+a).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?p+a+l:"0"===c?p+l+a:l+p+a)}return g}var i=Object.create(null);function o(e){if(i[e])return i[e];for(var r,n=e,a=[],o=0;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push("%");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.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 i[e]=a}void 0!==r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],528:[function(t,e,r){"use strict";var n=t("parenthesis");e.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)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(t){return 1===t.length&&(t+=t),t})));var a=n.parse(t,{flat:!0,brackets:r.ignore}),i=a[0].split(e);if(r.escape){for(var o=[],s=0;s0;){e=c[c.length-1];var h=t[e];if(i[e]=0&&s[e].push(o[g])}i[e]=d}else{if(n[e]===r[e]){var v=[],m=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(a[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(v);var b=new Array(y);for(d=0;d c)|0 },"),"generic"===e&&i.push("getters:[0],");for(var s=[],l=[],c=0;c>>7){"),c=0;c<1<<(1<128&&c%128==0){f.length>0&&p.push("}}");var h="vExtra"+f.length;i.push("case ",c>>>7,":",h,"(m&0x7f,",l.join(),");break;"),p=["function ",h,"(m,",l.join(),"){switch(m){"],f.push(p)}p.push("case ",127&c,":");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;xx)&&!(c&1<<_)!=!(c&1<0&&(A="+"+v[b]+"*c");var M=d[b].length/y*.5,E=.5+m[b]/y*.5;T.push("d"+b+"-"+E+"-"+M+"*("+d[b].join("+")+A+")/("+g[b].join("+")+")")}p.push("a.push([",T.join(),"]);","break;")}i.push("}},"),f.length>0&&p.push("}}");var S=[];for(c=0;c<1<1&&(i=1),i<-1&&(i=-1),a*Math.acos(i)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,p=t.xAxisRotation,h=void 0===p?0:p,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===f)return[];var x=Math.sin(h*a/360),b=Math.cos(h*a/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);k>1&&(u*=Math.sqrt(k),f*=Math.sqrt(k));var T=function(t,e,r,n,i,o,l,c,u,f,p,h){var d=Math.pow(i,2),g=Math.pow(o,2),v=Math.pow(p,2),m=Math.pow(h,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*i/o*h,b=y*-o/i*p,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,k=(p-x)/i,T=(h-b)/o,A=(-p-x)/i,M=(-h-b)/o,E=s(1,0,k,T),S=s(k,T,A,M);return 0===c&&S>0&&(S-=a),1===c&&S<0&&(S+=a),[_,w,E,S]}(e,r,l,c,u,f,g,m,x,b,_,w),A=n(T,4),M=A[0],E=A[1],S=A[2],C=A[3],L=Math.abs(C)/(a/4);Math.abs(1-L)<1e-7&&(L=1);var O=Math.max(Math.ceil(L),1);C/=O;for(var P=0;Pe[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":63,assert:70,"is-svg-path":426,"normalize-svg-path":533,"parse-svg-path":462}],533:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,p=0,h=0,d=0,g=t.length;d4?(o=v[v.length-4],s=v[v.length-3]):(o=p,s=h),r.push(v)}return r};var n=t("svg-arc-to-cubic-bezier");function a(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,a,i){return["C",t/3+2/3*r,e/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}},{"svg-arc-to-cubic-bezier":531}],534:[function(t,e,r){"use strict";var n,a=t("svg-path-bounds"),i=t("parse-svg-path"),o=t("draw-svg-path"),s=t("is-svg-path"),l=t("bitmap-sdf"),c=document.createElement("canvas"),u=c.getContext("2d");e.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,f;e||(e={}),e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var p=Math.min(r,f),h=e.stroke||0,d=e.viewbox||e.viewBox||a(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],v=Math.min(g[0]||0,g[1]||0)/2;if(u.fillStyle="black",u.fillRect(0,0,r,f),u.fillStyle="white",h&&("number"!=typeof h&&(h=1),u.strokeStyle=h>0?"white":"black",u.lineWidth=Math.abs(h)),u.translate(.5*r,.5*f),u.scale(v,v),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var m=new Path2D(t);u.fill(m),h&&u.stroke(m)}else{var y=i(t);o(u,y),u.fill(),h&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*p})}},{"bitmap-sdf":95,"draw-svg-path":170,"is-svg-path":426,"parse-svg-path":462,"svg-path-bounds":532}],535:[function(t,e,r){(function(r){"use strict";e.exports=function t(e,r,a){a=a||{};var o=i[e];o||(o=i[e]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),a=0,i=0,o=0;o0&&(f+=.02);var h=new Float32Array(u),d=0,g=-.5*f;for(p=0;p1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=a=i=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),a=o(l,s,t),i=o(l,s,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,l,u),f=!0,p="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=C(i),{ok:f,format:e.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}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=l.format||u.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=u.ok,this._tc_id=a++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,a,i=s(t,e,r),l=o(t,e,r),c=(i+l)/2;if(i==l)n=a=0;else{var u=i-l;switch(a=c>.5?u/(2-i-l):u/(i+l),i){case t:n=(e-r)/u+(e>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(c(n));return i}function M(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:a,v:i})),i=(i+s)%1;return o}c.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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,a=this.toRgb();return e=a.r/255,r=a.g/255,n=a.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=i(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=i(360*t.h),r=i(100*t.s),n=i(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=i(360*t.h),r=i(100*t.s),n=i(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return p(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,a){var o=[I(i(t).toString(16)),I(i(e).toString(16)),I(i(r).toString(16)),I(z(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,t)},toHex8String:function(t){return"#"+this.toHex8(t)},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*L(this._r,255))+"%",g:i(100*L(this._g,255))+"%",b:i(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%)":"rgba("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var a=c(t);r="#"+h(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:D(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),a=c(e).toRgb(),i=r/100;return c({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})},c.readability=function(e,r){var n=c(e),a=c(r);return(t.max(n.getLuminance(),a.getLuminance())+.05)/(t.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,a,i,o,s,l=c.readability(t,e);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},c.mostReadable=function(t,e,r){var n,a,i,o,s=null,l=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],r))};var E=c.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"},S=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(E);function C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function O(t){return o(1,s(0,t))}function P(t){return parseInt(t,16)}function I(t){return 1==t.length?"0"+t:""+t}function D(t){return t<=1&&(t=100*t+"%"),t}function z(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return P(t)/255}var F,B,N,j=(B="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",N="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+N),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 V(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],537:[function(t,e,r){"use strict";e.exports=a,e.exports.float32=e.exports.float=a,e.exports.fract32=e.exports.fract=function(t){if(t.length){for(var e=a(t),r=0,n=e.length;rf&&(f=l[0]),l[1]p&&(p=l[1])}function a(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(a);break;case"Point":n(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(n)}}if(!e){var i,o,s=r(t),l=new Array(2),c=1/0,u=c,f=-c,p=-c;for(o in t.arcs.forEach((function(t){for(var e=-1,r=t.length;++ef&&(f=l[0]),l[1]p&&(p=l[1])})),t.objects)a(t.objects[o]);e=t.bbox=[c,u,f,p]}return e};function a(t,e){var r=e.id,n=e.bbox,a=null==e.properties?{}:e.properties,o=i(t,e);return null==r&&null==n?{type:"Feature",properties:a,geometry:o}:null==n?{type:"Feature",id:r,properties:a,geometry:o}:{type:"Feature",id:r,bbox:n,properties:a,geometry:o}}function i(t,e){var n=r(t),a=t.arcs;function i(t,e){e.length&&e.pop();for(var r=a[t<0?~t:t],i=0,o=r.length;i1)n=l(0,e,r);else for(a=0,n=new Array(i=t.arcs.length);a1)for(var i,s,c=1,u=l(a[0]);cu&&(s=a[0],a[0]=a[c],a[c]=s,u=i);return a}))}}var u=function(t,e){for(var r=0,n=t.length;r>>1;t[a]=2))throw new Error("n must be ≥2");if(t.transform)throw new Error("already quantized");var r,a=n(t),i=a[0],o=(a[2]-i)/(e-1)||1,s=a[1],l=(a[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-i)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"Point":c(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(c)}}for(r in t.arcs.forEach((function(t){for(var e,r,n,a=1,c=1,u=t.length,f=t[0],p=f[0]=Math.round((f[0]-i)/o),h=f[1]=Math.round((f[1]-s)/l);aMath.max(r,n)?a[2]=1:r>Math.max(e,n)?a[0]=1:a[1]=1;for(var i=0,o=0,l=0;l<3;++l)i+=t[l]*t[l],o+=a[l]*t[l];for(l=0;l<3;++l)a[l]-=o/i*t[l];return s(a,a),a}function p(t,e,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(t,e),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 c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var h=p.prototype;h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,a=0,i=0;i<3;++i)a+=e[i]*r[i],n+=e[i]*e[i];var l=Math.sqrt(n),u=0;for(i=0;i<3;++i)r[i]-=e[i]*a/n,u+=r[i]*r[i],e[i]/=l;var f=Math.sqrt(u);for(i=0;i<3;++i)r[i]/=f;var p=this.computedToward;o(p,e,r),s(p,p);var h=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,T=-v*x,A=-m*x,M=y,E=this.computedEye,S=this.computedMatrix;for(i=0;i<3;++i){var C=_*r[i]+w*p[i]+k*e[i];S[4*i+1]=T*r[i]+A*p[i]+M*e[i],S[4*i+2]=C,S[4*i+3]=0}var L=S[1],O=S[5],P=S[9],I=S[2],D=S[6],z=S[10],R=O*z-P*D,F=P*I-L*z,B=L*D-O*I,N=c(R,F,B);for(R/=N,F/=N,B/=N,S[0]=R,S[4]=F,S[8]=B,i=0;i<3;++i)E[i]=b[i]+S[2+4*i]*h;for(i=0;i<3;++i){u=0;for(var j=0;j<3;++j)u+=S[i+4*j]*E[j];S[12+i]=-u}S[15]=1},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];h.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var a=this.computedMatrix;d[0]=a[2],d[1]=a[6],d[2]=a[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)a[4*c]=o[c],a[4*c+1]=s[c],a[4*c+2]=l[c];for(i(a,a,n,d),c=0;c<3;++c)o[c]=a[4*c],s[c]=a[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var a=this.computedMatrix,i=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],s=a[9],l=c(i,o,s);i/=l,o/=l,s/=l;var u=a[0],f=a[4],p=a[8],h=u*i+f*o+p*s,d=c(u-=i*h,f-=o*h,p-=s*h),g=(u/=d)*e+i*r,v=(f/=d)*e+o*r,m=(p/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e,r,n){var i=1;"number"==typeof r&&(i=0|r),(i<0||i>3)&&(i=1);var o=(i+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[i],l=e[i+4],f=e[i+8];if(n){var p=Math.abs(s),h=Math.abs(l),d=Math.abs(f),g=Math.max(p,h,d);p===g?(s=s<0?-1:1,l=f=0):d===g?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var v=c(s,l,f);s/=v,l/=v,f/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,k=c(x-=s*w,b-=l*w,_-=f*w),T=l*(_/=k)-f*(b/=k),A=f*(x/=k)-s*_,M=s*b-l*x,E=c(T,A,M);if(T/=E,A/=E,M/=E,this.center.jump(t,H,G,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===i){var S=e[1],C=e[5],L=e[9],O=S*x+C*b+L*_,P=S*T+C*A+L*M;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,O)}else{var I=e[2],D=e[6],z=e[10],R=I*s+D*l+z*f,F=I*x+D*b+z*_,B=I*T+D*A+z*M;m=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;a(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,W=U[14]/q,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,G-j*Y,W-V*Y)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},h.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var a=(n=n||this.computedUp)[0],i=n[1],o=n[2],s=c(a,i,o);if(!(s<1e-6)){a/=s,i/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],p=e[2]-r[2],h=c(l,f,p);if(!(h<1e-6)){l/=h,f/=h,p/=h;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=a*g+i*v+o*m,x=c(g-=y*a,v-=y*i,m-=y*o);if(!(x<.01&&(x=c(g=i*p-o*f,v=o*l-a*p,m=a*f-i*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,a,i,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(h));var b=i*m-o*v,_=o*g-a*m,w=a*v-i*g,k=c(b,_,w),T=a*l+i*f+o*p,A=g*l+v*f+m*p,M=(b/=k)*l+(_/=k)*f+(w/=k)*p,E=Math.asin(u(T)),S=Math.atan2(M,A),C=this.angle._state,L=C[C.length-1],O=C[C.length-2];L%=2*Math.PI;var P=Math.abs(L+2*Math.PI-S),I=Math.abs(L-S),D=Math.abs(L-2*Math.PI-S);P0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function h(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function g(t){return new Int8Array(f(t),0,t)}function v(t){return new Int16Array(f(2*t),0,t)}function m(t){return new Int32Array(f(4*t),0,t)}function y(t){return new Float32Array(f(4*t),0,t)}function x(t){return new Float64Array(f(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(f(t),0,t):p(t)}function _(t){return new DataView(f(t),0,t)}function w(t){t=a.nextPow2(t);var e=a.log2(t),n=c[e];return n.length>0?n.pop():new r(t)}n.free=function(t){if(r.isBuffer(t))c[a.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,n=0|a.log2(e);l[n].push(t)}},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(t){u(t.buffer)},n.freeArrayBuffer=u,n.freeBuffer=function(t){c[a.log2(t.length)].push(t)},n.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return h(t);case"uint32":return d(t);case"int8":return g(t);case"int16":return v(t);case"int32":return m(t);case"float":case"float32":return y(t);case"double":case"float64":return x(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return _(t);default:return null}return null},n.mallocArrayBuffer=f,n.mallocUint8=p,n.mallocUint16=h,n.mallocUint32=d,n.mallocInt8=g,n.mallocInt16=v,n.mallocInt32=m,n.mallocFloat32=n.mallocFloat=y,n.mallocFloat64=n.mallocDouble=x,n.mallocUint8Clamped=b,n.mallocDataView=_,n.mallocBuffer=w,n.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":94,buffer:107,dup:172}],545:[function(t,e,r){"use strict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(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(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",p(function(t,e,r,n,i,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(h=0;h-1?parseInt(t[1+a]):0,l=i>-1?parseInt(r[1+i]):0;s!==l&&(n=n.replace(E(),"?px "),v*=Math.pow(.75,l-s),n=n.replace("?px ",E())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf("+"),u=r.indexOf("+"),f=c>-1?parseInt(t[1+c]):0,p=u>-1?parseInt(r[1+u]):0;f!==p&&(n=n.replace(E(),"?px "),v*=Math.pow(.75,p-f),n=n.replace("?px ",E())),g-=.25*x*(p-f)}if(!0===o.bolds){var h=t.indexOf("b|")>-1,d=r.indexOf("b|")>-1;!h&&d&&(n=m?n.replace("italic ","italic bold "):"bold "+n),h&&!d&&(n=n.replace("bold ",""))}if(!0===o.italics){var m=t.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!m&&y&&(n="italic "+n),m&&!y&&(n=n.replace("italic ",""))}e.font=n}for(p=0;p",i="",o=a.length,s=i.length,l="+"===e[0]||"-"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(a,c))&&-1!==(u=r.indexOf(i,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var p=n[f].indexOf(e[0]);-1===p?n[f]+=e:l&&(n[f]=n[f].substr(0,p+1)+(1+parseInt(n[f][p+1]))+n[f].substr(p+2))}var h=c+o,d=r.substr(h,u-h).indexOf(a);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?i(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var a=u(t,n),i=function(t,e,r){for(var n=e.textAlign||"start",a=e.textBaseline||"alphabetic",i=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l=0?e[i]:a}))},has___:{value:y((function(e){var n=m(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,a){var i,o=m(n);return o?o[r]=a:(i=t.indexOf(n))>=0?e[i]=a:(i=t.length,e[i]=a,t[i]=n),this}))},delete___:{value:y((function(n){var a,i,o=m(n);return o?r in o&&delete o[r]:!((a=t.indexOf(n))<0||(i=t.length-1,t[a]=void 0,e[a]=e[i],t[a]=t[i],t.length=i,e.length=i,0))}))}})};d.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof d||x();var e,n=new r,a=void 0,i=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(a||(a=new d),a.set(t,e)),this}:function(t,e){if(i)try{n.set(t,e)}catch(r){a||(a=new d),a.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return a?n.has(t)?n.get(t):a.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!a&&a.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return a&&a.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");i=!0}))}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function v(t){return!("weakmap:"==t.substr(0,"weakmap:".length)&&"___"===t.substr(t.length-3))}function m(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],552:[function(t,e,r){var n=t("./hidden-store.js");e.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},{"./hidden-store.js":553}],553:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],554:[function(t,e,r){var n=t("./create-store.js");e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},{"./create-store.js":552}],555:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":235}],556:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||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(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),a=t.month(),i=""+this.toChineseMonth(n,a);return e&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"闰"===e[0]&&(r=!0,e=e.substring(1)),"月"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(e);else{var a=e[e.length-1];r="i"===a||"I"===a}return this.toMonthIndex(t,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(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var a=this.intercalaryMonth(t);if(r&&e!==a||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&e<=a?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var a,o=this._validateYear(t,n.local.invalidyear),s=p[o-p[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(a=i.newDate(l,c,u)).add(4-(a.dayOfWeek()||7),"d");var f=this.toJD(t,e,r)-a.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(a.year()),e=a.month(),r=a.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,a){var i,o,s;if("object"==typeof t)o=t,i=e||{};else{var l;if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=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:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],h=u>>13;c=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return i.year=v.getFullYear(),i.month=1+v.getMonth(),i.day=v.getDate(),i}(t,s,r,o);return i.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=i.fromJD(t),r=function(t,e,r,n){var a,i;if("object"==typeof t)a=t,i=e||{};else{if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=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:t,month:e,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,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(a.year,a.month-1,a.day);l=Math.round((u-c)/864e5);var h,d=f[i.year-f[0]];for(h=0;h<13;h++){var g=d&1<<12-h?30:29;if(l>13;return!v||h=2&&n<=6},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year()+(a.year()<0?1:0),e=a.month(),(r=a.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},{"../main":570,"object-assign":456}],559:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return(t=a.year())<0&&t++,a.day()+30*(a.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,a=e-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":570,"object-assign":456}],560:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=i},{"../main":570,"object-assign":456}],561:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),t=t<=0?t+1:t,(r=a.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=i},{"../main":570,"object-assign":456}],562:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),r=a.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((e-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),s=e-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,s)}}),n.calendars.julian=i},{"../main":570,"object-assign":456}],563:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+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(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var a=this._validate(t,e,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(t){var e=o(8+(t-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s(20+(t-=this.jdEpoch),20),s(t+4,13)]},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=i},{"../main":570,"object-assign":456}],564:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidMonth);(t=a.year())<0&&t++;for(var i=a.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=i},{"../main":570,"object-assign":456}],565:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),a=e.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 c=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t-(t>=0?474:473),s=474+o(i,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,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 c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":570,"object-assign":456}],567:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(a.year()),i.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(a.year()),i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":570,"object-assign":456}],568:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(a.year()),i.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(a.year()),i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},{"../main":570,"object-assign":456}],569:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),s=i+1,l=a-12*i,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(t=null!=t.year?t.year:t)>=1276&&t<=1500),a},_validate:function(t,e,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":570,"object-assign":456}],570:[function(t,e,r){var n=t("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(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return"000000".substring(0,e-(t=""+t).length)+t}function s(){this.shortYearCutoff="+10"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}n(a.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,a){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":t[i]+e[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,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(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},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(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),a=t.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);a=t.day(),"y"===r?(t.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,t.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(t){for(;oe-1+t.minMonth;)i++,o-=e,e=t.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(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[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;e=this._add(t,r*a[0]+i*a[1],a[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),a="m"===r?e:t.month(),i="d"===r?e:t.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),t.date(n,a,i)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var a=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=a-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new a;c.cdate=i,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":456}],571:[function(t,e,r){var n=t("object-assign"),a=t("./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(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),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(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,i,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,f=r.monthNamesShort||this.local.monthNamesShort,p=r.monthNames||this.local.monthNames,h=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;w+n1}),d=function(t,e,r,n){var a=""+e;if(h(t,n))for(;a.length1},x=function(t,r){var n=y(t,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+i+"}"),s=e.substring(A).match(o);if(!s)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"==typeof l){y("m");var t=l.call(b,e.substring(A));return A+=t.length,t}return x("m")},w=function(t,r,n,i){for(var o=y(t,i)?n:r,s=0;s-1){h=1,d=g;for(var S=this.daysInMonth(p,h);d>S;S=this.daysInMonth(p,h))h++,d-=S}return f>-1?this.fromJD(f):this.newDate(p,h,d)},determineDate:function(t,e,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return i.parseDate(n,t,a)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:i.today().add(t,"d"):i.newDate(t)}})},{"./main":570,"object-assign":456}],572:[function(t,e,r){e.exports=t("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":148}],573:[function(t,e,r){"use strict";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t("./lib/zc-core")},{"./lib/zc-core":572}],574:[function(t,e,r){"use strict";e.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}]},{}],575:[function(t,e,r){"use strict";var n=t("./arrow_paths"),a=t("../../plots/font_attributes"),i=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;e.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":755,"../../plots/cartesian/constants":771,"../../plots/font_attributes":791,"./arrow_paths":574}],576:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)}))}function s(t,e){var r,n=e._id,i=n.charAt(0),o=t[i],s=t["a"+i],l=t[i+"ref"],c=t["a"+i+"ref"],u=t["_"+i+"padplus"],f=t["_"+i+"padminus"],p={x:1,y:-1}[i]*t[i+"shift"],h=3*t.arrowsize*t.arrowwidth||0,d=h+p,g=h-p,v=3*t.startarrowsize*t.arrowwidth||0,m=v+p,y=v-p;if(c===l){var x=a.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=a.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=a.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(f,g,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([i,o],t)}},{"../../lib":717,"../../plots/cartesian/axes":765,"./draw":581}],577:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("../../plot_api/plot_template").arrayEditor;function o(t,e){var r,n,a,i,o,l,c,u=t._fullLayout.annotations,f=[],p=[],h=[],d=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},p=t._fullLayout.annotations;if(c.length||u.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var H=!1,G=["x","y"],W=0;W1)&&(tt===Q?((ct=et.r2fraction(e["a"+$]))<0||ct>1)&&(H=!0):H=!0),Y=et._offset+et.r2p(e[$]),J=.5}else"x"===$?(Z=e[$],Y=b.l+b.w*Z):(Z=1-e[$],Y=b.t+b.h*Z),J=e.showarrow?.5:Z;if(e.showarrow){lt.head=Y;var ut=e["a"+$];K=nt*V(.5,e.xanchor)-at*V(.5,e.yanchor),tt===Q?(lt.tail=et._offset+et.r2p(ut),X=K):(lt.tail=Y+ut,X=K+ut),lt.text=lt.tail+K;var ft=x["x"===$?"width":"height"];if("paper"===Q&&(lt.head=o.constrain(lt.head,1,ft-1)),"pixel"===tt){var pt=-Math.max(lt.tail-3,lt.text),ht=Math.min(lt.tail+3,lt.text)-ft;pt>0?(lt.tail+=pt,lt.text+=pt):ht>0&&(lt.tail-=ht,lt.text-=ht)}lt.tail+=st,lt.head+=st}else X=K=it*V(J,ot),lt.text=Y+K;lt.text+=st,K+=st,X+=st,e["_"+$+"padplus"]=it/2+X,e["_"+$+"padminus"]=it/2-X,e["_"+$+"size"]=it,e["_"+$+"shift"]=K}if(H)I.remove();else{var dt=0,gt=0;if("left"!==e.align&&(dt=(w-m)*("center"===e.align?.5:1)),"top"!==e.valign&&(gt=(P-y)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:R+dt-1,y:R+gt}).call(c.setClipUrl,B?M:null,t);else{var vt=R+gt-d.top,mt=R+dt-d.left;U.call(f.positionText,mt,vt).call(c.setClipUrl,B?M:null,t)}N.select("rect").call(c.setRect,R,R,w,P),F.call(c.setRect,D/2,D/2,z-D,j-D),I.call(c.setTranslate,Math.round(E.x.text-z/2),Math.round(E.y.text-j/2)),L.attr({transform:"rotate("+S+","+E.x.text+","+E.y.text+")"});var yt,xt=function(r,n){C.selectAll(".annotation-arrow-g").remove();var u=E.x.head,f=E.y.head,p=E.x.tail+r,d=E.y.tail+n,m=E.x.text+r,y=E.y.text+n,x=o.rotationXYMatrix(S,m,y),w=o.apply2DTransform(x),M=o.apply2DTransform2(x),O=+F.attr("width"),P=+F.attr("height"),D=m-.5*O,z=D+O,R=y-.5*P,B=R+P,N=[[D,R,D,B],[D,B,z,B],[z,B,z,R],[z,R,D,R]].map(M);if(!N.reduce((function(t,e){return t^!!o.segmentsIntersect(u,f,u+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){N.forEach((function(t){var e=o.segmentsIntersect(p,d,u,f,t[0],t[1],t[2],t[3]);e&&(p=e.x,d=e.y)}));var j=e.arrowwidth,V=e.arrowcolor,U=e.arrowside,q=C.append("g").style({opacity:l.opacity(V)}).classed("annotation-arrow-g",!0),H=q.append("path").attr("d","M"+p+","+d+"L"+u+","+f).style("stroke-width",j+"px").call(l.stroke,l.rgb(V));if(g(H,U,e),_.annotationPosition&&H.node().parentNode&&!i){var G=u,W=f;if(e.standoff){var Y=Math.sqrt(Math.pow(u-p,2)+Math.pow(f-d,2));G+=e.standoff*(p-u)/Y,W+=e.standoff*(d-f)/Y}var X,Z,J=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(p-G)+","+(d-W),transform:"translate("+G+","+W+")"}).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:J.node(),gd:t,prepFn:function(){var t=c.getTranslate(I);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+".autorange",!0),v&&v.autorange&&k(v._name+".autorange",!0)},moveFn:function(t,r){var n=w(X,Z),a=n[0]+t,i=n[1]+r;I.call(c.setTranslate,a,i),T("x",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),T("y",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&T("ax",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&T("ay",v.p2r(v.r2p(e.ay)+r)),q.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+S+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&xt(0,0),O&&h.init({element:I.node(),gd:t,prepFn:function(){yt=L.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?T("ax",s.p2r(s.r2p(e.ax)+t)):T("ax",e.ax+t),e.ayref===e.yref?T("ay",v.p2r(v.r2p(e.ay)+r)):T("ay",e.ay+r),xt(t,r);else{if(i)return;var a,o;if(s)a=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;a=h.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,f=e.y-(e._yshift+e.yshift)/b.h-u/2;o=h.align(f-r/b.h,u,0,1,e.yanchor)}T("x",a),T("y",o),s&&v||(n=h.getCursor(s?.5:a,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+yt}),p(I,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){p(I),a.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,v=e.indexOf("end")>=0,m=f.backoff*h+r.standoff,y=p.backoff*d+r.startstandoff;if("line"===u.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},s={x:+t.attr("x2"),y:+t.attr("y2")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void O();if(m){if(m*m>x*x+b*b)return void O();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void O();var k=y*Math.cos(l),T=y*Math.sin(l);o.x-=k,o.y-=T,t.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var A=u.getTotalLength(),M="";if(A1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=a(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":814,"../annotations/draw":581}],588:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib");e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:t("./attributes")}}},layoutAttributes:t("./attributes"),handleDefaults:t("./defaults"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(t),s=0;s=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}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(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(n(t))},i.opacity=function(t){return t?n(t).getAlpha():0},i.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},i.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var a=n(e||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(t,e,r){var a=n(t);return 1!==a.getAlpha()&&(a=n(i.combine(t,l))),(a.isDark()?e?a.lighten(e):l:r?a.darken(r):s).toString()},i.stroke=function(t,e){var r=n(e);t.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(t,e){var r=n(e);t.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,r,n,a,o=Object.keys(t);for(e=0;e0?n>=l:n<=l));a++)n>u&&n0?n>=l:n<=l));a++)n>r[0]&&n1){var Z=Math.pow(10,Math.floor(Math.log(X)/Math.LN10));W*=Z*c.roundUp(X/Z,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(G.tick0=0)}G.dtick=W}G.domain=[U+N,U+R-N],G.setScale(),t.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var J,K=t.select("."+T.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),$=t.select("."+T.cbaxis),Q=0;function tt(n,a){var i={propContainer:G,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:o._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+s+",."+s+"-math-group").remove(),d.draw(r,n,u(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(A)){var t,r=l.l+(e.x+F)*l.w,n=G.title.font.size;t="top"===A?(1-(U+R-N))*l.h+l.t+3+.75*n:(1-(U+N))*l.h+l.t-3-.25*n,tt(G._id+"title",{attributes:{x:r,y:t,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(A)){var i=t.select("."+T.cbtitle),o=i.select("text"),u=[-e.outlinewidth/2,e.outlinewidth/2],f=i.select(".h"+G._id+"title-math-group").node(),h=15.6;if(o.node()&&(h=parseInt(o.node().style.fontSize,10)*_),f?(Q=p.bBox(f).height)>h&&(u[1]-=(Q-h)/2):o.node()&&!o.classed(T.jsPlaceholder)&&(Q=p.bBox(o.node()).height),Q){if(Q+=5,"top"===A)G.domain[1]-=Q/l.h,u[1]*=-1;else{G.domain[0]+=Q/l.h;var d=g.lineCount(o);u[1]+=(1-d)*h}i.attr("transform","translate("+u+")"),G.setScale()}}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-G.domain[1]))+")"),$.attr("transform","translate(0,"+Math.round(-l.t)+")");var m=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).data(O);m.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),m.exit().remove();var y=M.map(G.c2p).map(Math.round).sort((function(t,e){return t-e}));m.each((function(t,i){var o=[0===i?M[0]:(O[i]+O[i-1])/2,i===O.length-1?M[1]:(O[i]+O[i+1])/2].map(G.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,y[0],y[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(e._fillgradient)p.gradient(s,r,e._id,"vertical",e._fillgradient,"fill");else{var l=S(t).replace("e-","");s.attr("fill",a(l).toHexString())}}));var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(v.color&&v.width?P:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each((function(t){n.select(this).attr("d","M"+j+","+(Math.round(G.c2p(t))+v.width/2%1)+"h"+I).call(p.lineGroupStyle,v.width,E(t),v.dash)})),$.selectAll("g."+G._id+"tick,path").remove();var b=j+I+(e.outlinewidth||0)/2-("outside"===e.ticks?1:0),w=s.calcTicks(G),k=s.makeTransFn(G),C=s.getTickSigns(G)[2];return s.drawTicks(r,G,{vals:"inside"===G.ticks?s.clipEnds(G,w):w,layer:$,path:s.makeTickPath(G,b,C),transFn:k}),s.drawLabels(r,G,{vals:w,layer:$,transFn:k,labelFns:s.makeLabelFns(G,b)})},function(){if(-1===["top","bottom"].indexOf(A)){var t=G.title.font.size,e=G._offset+G._length/2,a=l.l+(G.position||0)*l.w+("right"===G.side?10+t*(G.showticklabels?1:.5):-10-t*(G.showticklabels?.5:0));tt("h"+G._id+"title",{avoid:{selection:n.select(r).selectAll("g."+G._id+"tick"),side:A,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:a,y:e,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},i.previousPromises,function(){var n=I+e.outlinewidth/2+p.bBox($.node()).width;if((J=K.select("text")).node()&&!J.classed(T.jsPlaceholder)){var a,o=K.select(".h"+G._id+"title-math-group").node();a=o&&-1!==["top","bottom"].indexOf(A)?p.bBox(o).width:p.bBox(K.node()).right-j-l.l,n=Math.max(n,a)}var s=2*e.xpad+n+e.borderwidth+e.outlinewidth/2,c=q-H;t.select("."+T.cbbg).attr({x:j-e.xpad-(e.borderwidth+e.outlinewidth)/2,y:H-B,width:Math.max(s,2),height:Math.max(c+2*B,2)}).call(h.fill,e.bgcolor).call(h.stroke,e.bordercolor).style("stroke-width",e.borderwidth),t.selectAll("."+T.cboutline).attr({x:j,y:H+e.ypad+("top"===A?Q:0),width:Math.max(I,2),height:Math.max(c-2*e.ypad-Q,2)}).call(h.stroke,e.outlinecolor).style({fill:"none","stroke-width":e.outlinewidth});var u=({center:.5,right:1}[e.xanchor]||0)*s;t.attr("transform","translate("+(l.l-u)+","+l.t+")");var f={},d=w[e.yanchor],g=k[e.yanchor];"pixels"===e.lenmode?(f.y=e.y,f.t=c*d,f.b=c*g):(f.t=f.b=0,f.yt=e.y+e.len*d,f.yb=e.y-e.len*g);var v=w[e.xanchor],m=k[e.xanchor];if("pixels"===e.thicknessmode)f.x=e.x,f.l=s*v,f.r=s*m;else{var y=s-I;f.l=y*v,f.r=y*m,f.xl=e.x-e.thickness*v,f.xr=e.x+e.thickness*m}i.autoMargin(r,e._id,f)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,a,i,s=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),f(t)},moveFn:function(r,o){t.attr("transform",n+" translate("+r+","+o+")"),a=l.align(e._xLeftFrac+r/s.w,e._thickFrac,0,1,e.xanchor),i=l.align(e._yBottomFrac-o/s.h,e._lenFrac,0,1,e.yanchor);var c=l.getCursor(a,i,e.xanchor,e.yanchor);f(t,c)},doneFn:function(){if(f(t),void 0!==a&&void 0!==i){var n={};n[e._propPrefix+"x"]=a,n[e._propPrefix+"y"]=i,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){i.autoMargin(t,e._id)})).remove(),e.order()}}},{"../../constants/alignment":686,"../../lib":717,"../../lib/extend":708,"../../lib/setcursor":737,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../plots/cartesian/axis_defaults":767,"../../plots/cartesian/layout_attributes":777,"../../plots/cartesian/position_defaults":780,"../../plots/plots":826,"../../registry":846,"../color":592,"../colorscale/helpers":603,"../dragelement":610,"../drawing":613,"../titles":679,"./constants":594,d3:165,tinycolor2:536}],597:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":717}],598:[function(t,e,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:t("./attributes"),supplyDefaults:t("./defaults"),draw:t("./draw").draw,hasColorbar:t("./has_colorbar")}},{"./attributes":593,"./defaults":595,"./draw":596,"./has_colorbar":597}],599:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),a=t("../../lib/regex").counter,i=t("./scales.js").scales;function o(t){return"`"+t+"`"}Object.keys(i),e.exports=function(t,e){t=t||"";var r,s=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),c="showScaleDflt"in e?e.showScaleDflt:"z"===s,u="string"==typeof e.colorscaleDflt?i[e.colorscaleDflt]:null,f=e.editTypeOverride||"",p=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):o(p+(r={z:"z",c:"color"}[s]));var h=s+"auto",d=s+"min",g=s+"max",v=s+"mid",m=(o(p+h),o(p+d),o(p+g),{});m[d]=m[g]=void 0;var y={};y[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},x[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":733,"../colorbar/attributes":593,"./scales.js":607}],600:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("./helpers").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?a.nestedProperty(e,c).get():e,f=i(u),p=!1!==f.auto,h=f.min,d=f.max,g=f.mid,v=function(){return a.aggNums(Math.min,null,l)},m=function(){return a.aggNums(Math.max,null,l)};void 0===h?h=v():p&&(h=u._colorAx&&n(h)?Math.min(h,v()):v()),void 0===d?d=m():p&&(d=u._colorAx&&n(d)?Math.max(d,m()):m()),p&&void 0!==g&&(d-g>g-h?h=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},{"../../lib":717,"./helpers":603,"fast-isnumeric":228}],601:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./helpers").hasColorscale,i=t("./helpers").extractOpts;e.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,a){var o=a.container?n.nestedProperty(t,a.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[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=t[n];r[a]=[1-i[0],i[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],609:[function(t,e,r){"use strict";var n=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,i){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":717}],610:[function(t,e,r){"use strict";var n=t("mouse-event-offset"),a=t("has-hover"),i=t("has-passive-events"),o=t("../../lib").removeElement,s=t("../../plots/cartesian/constants"),l=e.exports={};l.align=t("./align"),l.getCursor=t("./cursor");var c=t("./unhover");function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,p,h,d,g,v=t.gd,m=1,y=v._context.doubleClickDelay,x=t.element;v._mouseDownTime||(v._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(m=Math.max(m-1,1)),v._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,h),!g){var r;try{r=new MouseEvent("click",e)}catch(t){var n=f(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},l.coverSlip=u},{"../../lib":717,"../../plots/cartesian/constants":771,"./align":608,"./cursor":609,"./unhover":611,"has-hover":412,"has-passive-events":413,"mouse-event-offset":438}],611:[function(t,e,r){"use strict";var n=t("../../lib/events"),a=t("../../lib/throttle"),i=t("../../lib/dom").getGraphDiv,o=t("../fx/constants"),s=e.exports={};s.wrapped=function(t,e,r){(t=i(t))._fullLayout&&a.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/dom":706,"../../lib/events":707,"../../lib/throttle":742,"../fx/constants":625}],612:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],613:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("tinycolor2"),o=t("../../registry"),s=t("../color"),l=t("../colorscale"),c=t("../../lib"),u=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),p=t("../../constants/alignment").LINE_SPACING,h=t("../../constants/interactions").DESELECTDIM,d=t("../../traces/scatter/subtypes"),g=t("../../traces/scatter/make_bubble_size_func"),v=t("../../components/fx/helpers").appendArrayPointValue,m=e.exports={};m.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(s.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,a){t.call(m.setPosition,e,r).call(m.setSize,n,a)},m.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform","translate("+i+","+o+")"),!0)},m.translatePoints=function(t,e,r){t.each((function(t){var a=n.select(this);m.translatePoint(t,a,e,r)}))},m.hideOutsideRangePoint=function(t,e,r,n,a,i){e.attr("display",r.isPtWithinRange(t,a)&&n.isPtWithinRange(t,i)?null:"none")},m.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,a=e.yaxis;t.each((function(e){var i=e[0].trace,s=i.xcalendar,l=i.ycalendar,c=o.traceIs(i,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){m.hideOutsideRangePoint(t,n.select(this),r,a,s,l)}))}))}},m.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,a){e.style("fill","none");var i=(((t||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";s.stroke(e,n||i.color),m.dashLine(e,l,o)},m.lineGroupStyle=function(t,e,r,a){t.style("fill","none").each((function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,l=a||i.dash||"";n.select(this).call(s.stroke,r||i.color).call(m.dashLine,l,o)}))},m.dashLine=function(t,e,r){r=+r||0,e=m.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},m.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},m.fillGroupStyle=function(t){t.style("stroke-width",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(s.fill,t[0].trace.fillcolor)}))};var y=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolNoFill={},m.symbolList=[],Object.keys(y).forEach((function(t){var e=y[t],r=e.n;m.symbolList.push(r,t,r+100,t+"-open"),m.symbolNames[r]=t,m.symbolFuncs[r]=e.f,e.needLine&&(m.symbolNeedLines[r]=!0),e.noDot?m.symbolNoDot[r]=!0:m.symbolList.push(r+200,t+"-dot",r+300,t+"-open-dot"),e.noFill&&(m.symbolNoFill[r]=!0)}));var x=m.symbolNames.length;function b(t,e){var r=t%100;return m.symbolFuncs[r](e)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=m.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=x||t>=400?0:Math.floor(Math.max(t,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},k=n.format("~.1f"),T={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:_},horizontalreversed:{node:"linearGradient",attrs:_,reversed:!0},vertical:{node:"linearGradient",attrs:w},verticalreversed:{node:"linearGradient",attrs:w,reversed:!0}};m.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=T[a],p=new Array(u),h=0;h"+m(t);d._gradientUrlQueryParts[y]=1},m.initGradients=function(t){var e=t._fullLayout;c.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),e._gradientUrlQueryParts={}},m.pointStyle=function(t,e,r){if(t.size()){var a=m.makePointStyleFns(e);t.each((function(t){m.singlePointStyle(t,n.select(this),e,a,r)}))}},m.singlePointStyle=function(t,e,r,n,a){var i=r.marker,o=i.line;if(e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?i.opacity:t.mo),n.ms2mrc){var l;l="various"===t.ms||"various"===i.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&&(l=t.mrc=n.selectedSizeFn(t));var u=m.symbolNumber(t.mx||i.symbol)||0;t.om=u%200>=100,e.attr("d",b(u,l))}var f,p,h,d=!1;if(t.so)h=o.outlierwidth,p=o.outliercolor,f=i.outliercolor;else{var g=(o||{}).width;h=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(i.color)&&(f=s.defaultLine,d=!0),f="mc"in t?t.mcc=n.markerScale(t.mc):i.color||"rgba(0,0,0,0)",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,f).style({"stroke-width":(h||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:h)+"px");var v=i.gradient,y=t.mgt;if(y?d=!0:y=v&&v.type,Array.isArray(y)&&(y=y[0],T[y]||(y=0)),y&&"none"!==y){var x=t.mgc;x?d=!0:x=v.color;var _=r.uid;d&&(_+="-"+t.i),m.gradient(e,a,_,y,[[0,x],[1,f]],"fill")}else s.fill(e,f);h&&s.stroke(e,p)}},m.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=m.tryColorscale(r,""),e.lineScale=m.tryColorscale(r,"line"),o.traceIs(t,"symbols")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,m.makeSelectedPointStyleFns(t)),e},m.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},i=r.marker||{},s=n.marker||{},l=a.opacity,u=i.opacity,f=s.opacity,p=void 0!==u,d=void 0!==f;(c.isArrayOrTypedArray(l)||p||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?p?u:e:d?f:h*e});var g=a.color,v=i.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=a.size,x=i.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},m.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,c=i.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,h))},e},m.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=m.makeSelectedPointStyleFns(e),a=e.marker||{},i=[];r.selectedOpacityFn&&i.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&i.push((function(t,e){s.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&i.push((function(t,e){var n=e.mx||a.symbol||0,i=r.selectedSizeFn(e);t.attr("d",b(m.symbolNumber(n),i)),e.mrc2=i})),i.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function S(t,e,r,a){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(i*i+o*o,.25),u=Math.pow(s*s+l*l,.25),f=(u*u*i-c*c*s)*a,p=(u*u*o-c*c*l)*a,h=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(h&&f/h),2),n.round(e[1]+(h&&p/h),2)],[n.round(e[0]-(d&&f/d),2),n.round(e[1]-(d&&p/d),2)]]}m.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=m.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var o=e.texttemplate,s=r._fullLayout;t.each((function(t){var i=n.select(this),l=o?c.extractOption(t,e,"txt","texttemplate"):c.extractOption(t,e,"tx","text");if(l||0===l){if(o){var f=e._module.formatLabels?e._module.formatLabels(t,e,s):{},p={};v(p,e,t.i);var h=e._meta||{};l=c.texttemplateString(l,f,s._d3locale,p,t,h)}var d=t.tp||e.textposition,g=E(t,e),y=a?a(t):t.tc||e.textfont.color;i.call(m.font,t.tf||e.textfont.family,g,y).text(l).call(u.convertToTspans,r).call(M,d,g,t.mrc)}else i.remove()}))}},m.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=m.makeSelectedTextStyleFns(e);t.each((function(t){var a=n.select(this),i=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=E(t,e);s.fill(a,i),M(a,o,l,t.mrc2||t.mrc)}))}},m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(m.savedBBoxes={},O=0),r&&(m.savedBBoxes[r]=v),O++,c.extendFlat({},v)},m.setClipUrl=function(t,e,r){t.attr("clip-path",I(e,r))},m.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=" translate("+e+", "+r+")").trim(),t[a]("transform",i),i},m.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+=" scale("+e+", "+r+")").trim(),t[a]("transform",i),i};var D=/\s*sc.*/;m.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":" scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(D,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var z=/translate\([^)]*\)\s*$/;m.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,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);t=1===e&&1===r?[]:["translate("+o+","+s+")","scale("+e+","+r+")","translate("+-o+","+-s+")"],l&&t.push(l),a.attr("transform",t.join(" "))}}))}},{"../../components/fx/helpers":627,"../../constants/alignment":686,"../../constants/interactions":692,"../../constants/xmlns_namespaces":694,"../../lib":717,"../../lib/svg_text_utils":741,"../../registry":846,"../../traces/scatter/make_bubble_size_func":1137,"../../traces/scatter/subtypes":1144,"../color":592,"../colorscale":604,"./symbol_defs":614,d3:165,"fast-isnumeric":228,tinycolor2:536}],614:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,a="l"+e+",-"+e,i="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+a+i+a+i+o+i+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),a=n.round(-t,2),i=n.round(-.309*t,2);return"M"+e+","+i+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+e+"L-"+a+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+e+",0L"+r+",-"+a+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),a=n.round(.951*e,2),i=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return"M"+r+","+l+"H"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+n.round(.382*e,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),a=n.round(.76*t,2);return"M-"+a+",0l-"+r+",-"+e+"h"+a+"l"+r+",-"+e+"l"+r+","+e+"h"+a+"l-"+r+","+e+"l"+r+","+e+"h-"+a+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+a+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+a+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:165}],615:[function(t,e,r){"use strict";e.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"}}}},{}],616:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../registry"),i=t("../../plots/cartesian/axes"),o=t("../../lib"),s=t("./compute_error");function l(t,e,r,a){var l=e["error_"+a]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,p=e[0].trace,h=p.error_x||{},d=p.error_y||{};p.ids&&(f=function(t){return t.id});var g=o.hasMarkers(p)&&p.marker.maxdisplayed>0;d.visible||h.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,f);if(v.exit().remove(),e.length){h.visible||v.selectAll("path.xerror").remove(),d.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var m=v.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),a(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!g||t.vis){var i,o=e.select("path.yerror");if(d.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var f=d.width;i="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(i+="m-"+f+",0h"+2*f),o.size()?u&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var p=e.select("path.xerror");if(h.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var v=(h.copy_ystyle?d:h).width;i="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(i+="m0,-"+v+"v"+2*v),p.size()?u&&(p=p.transition().duration(s.duration).ease(s.easing)):p=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),p.attr("d",i)}else p.remove()}}))}}))}},{"../../traces/scatter/subtypes":1144,"../drawing":613,d3:165,"fast-isnumeric":228}],621:[function(t,e,r){"use strict";var n=t("d3"),a=t("../color");e.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},i=e.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":592,d3:165}],622:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("./layout_attributes").hoverlabel,i=t("../../lib/extend").extendFlat;e.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":708,"../../plots/font_attributes":791,"./layout_attributes":631}],623:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry");function i(t,e,r,a){a=a||n.identity,Array.isArray(t)&&(e[0][r]=a(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s=0&&r.index_[0]._length||Q<0||Q>w[0]._length)return p.unhoverRaw(t,e)}else $="xpx"in e?e.xpx:_[0]._length/2,Q="ypx"in e?e.ypx:w[0]._length/2;if(e.pointerX=$+_[0]._offset,e.pointerY=Q+w[0]._offset,I="xval"in e?g.flat(l,e.xval):g.p2c(_,$),D="yval"in e?g.flat(l,e.yval):g.p2c(w,Q),!a(I[0])||!a(D[0]))return o.warn("Fx.hover failed",e,t),p.unhoverRaw(t,e)}var et=1/0;for(R=0;RG&&(X.splice(0,G),et=X[0].distance),m&&0!==Y&&0===X.length){H.distance=Y,H.index=!1;var ot=B._module.hoverPoints(H,U,q,"closest",u._hoverlayer);if(ot&&(ot=ot.filter((function(t){return t.spikeDistance<=Y}))),ot&&ot.length){var st,lt=ot.filter((function(t){return t.xa.showspikes}));if(lt.length){var ct=lt[0];a(ct.x0)&&a(ct.y0)&&(st=ht(ct),(!J.vLinePoint||J.vLinePoint.spikeDistance>st.spikeDistance)&&(J.vLinePoint=st))}var ut=ot.filter((function(t){return t.ya.showspikes}));if(ut.length){var ft=ut[0];a(ft.x0)&&a(ft.y0)&&(st=ht(ft),(!J.hLinePoint||J.hLinePoint.spikeDistance>st.spikeDistance)&&(J.hLinePoint=st))}}}}function pt(t,e){for(var r,n=null,a=1/0,i=0;i1||X.length>1)||"closest"===P&&K&&X.length>1,Mt=f.combine(u.plot_bgcolor||f.background,u.paper_bgcolor),Et={hovermode:P,rotateLabels:At,bgColor:Mt,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},St=A(X,Et,t);if(function(t,e,r){var n,a,i,o,s,l,c,u=0,f=1,p=t.size(),h=new Array(p),d=0;function g(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,i=r.pos+r.dp+r.size-e.pmax,a>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=i;n=!1}if(n){var c=0;for(o=0;oe.pmax&&c++;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,c--);for(o=0;o=0;s--)t[s].dp-=i;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}for(t.each((function(t){var n=t[e],a="x"===n._id.charAt(0),i=n.range;0===d&&i&&i[0]>i[1]!==a&&(f=-1),h[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?x:1)/2,pmin:0,pmax:a?r.width:r.height}]})),h.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));!n&&u<=p;){for(u++,n=!0,o=0;o.01&&y.pmin===b.pmin&&y.pmax===b.pmax){for(s=m.length-1;s>=0;s--)m[s].dp+=a;for(v.push.apply(v,m),h.splice(o+1,1),c=0,s=v.length-1;s>=0;s--)c+=v[s].dp;for(i=c/v.length,s=v.length-1;s>=0;s--)v[s].dp-=i;n=!1}else o++}h.forEach(g)}for(o=h.length-1;o>=0;o--){var _=h[o];for(s=_.length-1;s>=0;s--){var w=_[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(St,At?"xa":"ya",u),M(St,At),e.target&&e.target.tagName){var Ct=d.getComponentMethod("annotations","hasClickToShow")(t,_t);c(n.select(e.target),Ct?"pointer":"")}e.target&&!i&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=t._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(t,0,bt)&&(bt&&t.emit("plotly_unhover",{event:e,points:bt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:I,yvals:D}))}(t,e,r,i)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var a=t.map((function(t){return{color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,eventData:t.eventData||!1,hovertemplateLabels:t.hovertemplateLabels||!1}})),i=n.select(e.container),o=e.outerContainer?n.select(e.outerContainer):i,s={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||f.background,container:i,outerContainer:o},l=A(a,s,e.gd),c=0,u=0;return l.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function A(t,e,r){var a=r._fullLayout,i=e.hovermode,s=e.rotateLabels,c=e.bgColor,p=e.container,h=e.outerContainer,d=e.commonLabelOpts||{},g=e.fontFamily||v.HOVERFONT,y=e.fontSize||v.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,A="y"===i?"yLabel":"xLabel",M=x[A],E=(String(M)||"").split(" ")[0],S=h.node().getBoundingClientRect(),C=S.top,O=S.width,P=S.height,I=void 0!==M&&x.distance<=e.hoverdistance&&("x"===i||"y"===i);if(I){var D,z,R=!0;for(D=0;Da.width-P?(T=a.width-P,s.attr("d","M"+(P-w)+",0L"+P+","+O+w+"v"+O+(2*k+L.height)+"H-"+P+"V"+O+w+"H"+(P-2*w)+"Z")):s.attr("d","M0,0L"+w+","+O+w+"H"+(k+L.width/2)+"v"+O+(2*k+L.height)+"H-"+(k+L.width/2)+"V"+O+w+"H-"+w+"Z")}else{var I,D,z;"right"===_.side?(I="start",D=1,z="",T=b._offset+b._length):(I="end",D=-1,z="-",T=b._offset),S=_._offset+(x.y0+x.y1)/2,c.attr("text-anchor",I),s.attr("d","M0,0L"+z+w+","+w+"V"+(k+L.height/2)+"h"+z+(2*k+L.width)+"V-"+(k+L.height/2)+"H"+z+w+"V-"+w+"Z");var R,F=L.height/2,B=C-L.top-F,N="clip"+a._uid+"commonlabel"+_._id;if(T"),void 0!==t.yLabel&&(h+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(h+=(h?"z: ":"")+t.zLabel)):I&&t[i+"Label"]===M?h=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(h=t.yLabel):h=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(h+=(h?"
":"")+t.text),void 0!==t.extraText&&(h+=(h?"
":"")+t.extraText),""!==h||t.hovertemplate||(""===p&&e.remove(),h=p);var _=a._d3locale,A=t.hovertemplate||!1,E=t.hovertemplateLabels||t,S=t.eventData[0]||{};A&&(h=(h=o.hovertemplateString(A,E,_,S,t.trace._meta)).replace(T,(function(e,r){return p=L(r,t.nameLength),""})));var D=e.select("text.nums").call(u.font,t.fontFamily||g,t.fontSize||y,t.fontColor||b).text(h).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),z=e.select("text.name"),R=0,F=0;if(p&&p!==h){z.call(u.font,t.fontFamily||g,t.fontSize||y,x).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var B=z.node().getBoundingClientRect();R=B.width+2*k,F=B.height+2*k}else z.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:b});var N,j,V=D.node().getBoundingClientRect(),U=t.xa._offset+(t.x0+t.x1)/2,q=t.ya._offset+(t.y0+t.y1)/2,H=Math.abs(t.x1-t.x0),G=Math.abs(t.y1-t.y0),W=V.width+w+k+R;if(t.ty0=C-V.top,t.bx=V.width+2*k,t.by=Math.max(V.height+2*k,F),t.anchor="start",t.txwidth=V.width,t.tx2width=R,t.offset=0,s)t.pos=U,N=q+G/2+W<=P,j=q-G/2-W>=0,"top"!==t.idealAlign&&N||!j?N?(q+=G/2,t.anchor="start"):t.anchor="middle":(q-=G/2,t.anchor="end");else if(t.pos=q,N=U+H/2+W<=O,j=U-H/2-W>=0,"left"!==t.idealAlign&&N||!j)if(N)U+=H/2,t.anchor="start";else{t.anchor="middle";var Y=W/2,X=U+Y-O,Z=U-Y;X>0&&(U-=X),Z<0&&(U+=-Z)}else U-=H/2,t.anchor="end";D.attr("text-anchor",t.anchor),R&&z.attr("text-anchor",t.anchor),e.attr("transform","translate("+U+","+q+")"+(s?"rotate("+m+")":""))})),N}function M(t,e){t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var a=r.select("text.nums"),i=t.anchor,o="end"===i?-1:1,s={start:1,end:-1,middle:0}[i],c=s*(w+k),f=c+s*(t.txwidth+k),p=0,h=t.offset;"middle"===i&&(c-=t.tx2width/2,f+=t.txwidth/2+k),e&&(h*=-_,p=t.offset*b),r.select("path").attr("d","middle"===i?"M-"+(t.bx/2+t.tx2width/2)+","+(h-t.by/2)+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(o*w+p)+","+(w+h)+"v"+(t.by/2-w)+"h"+o*t.bx+"v-"+t.by+"H"+(o*w+p)+"V"+(h-w)+"Z");var d=c+p,g=h+t.ty0-t.by/2+k,v=t.textAlign||"auto";"auto"!==v&&("left"===v&&"start"!==i?(a.attr("text-anchor","start"),d="middle"===i?-t.bx/2-t.tx2width/2+k:-t.bx-k):"right"===v&&"end"!==i&&(a.attr("text-anchor","end"),d="middle"===i?t.bx/2-t.tx2width/2-k:t.bx+k)),a.call(l.positionText,d,g),t.tx2width&&(r.select("text.name").call(l.positionText,f+s*k+p,h+t.ty0-t.by/2+k),r.select("rect").call(u.setRect,f+(s-1)*t.tx2width/2+p,h-t.by/2-1,t.tx2width,t.by+2))}))}function E(t,e){var r=t.index,n=t.trace||{},i=t.cd[0],s=t.cd[r]||{};function l(t){return t||a(t)&&0===t}var c=Array.isArray(r)?function(t,e){var a=o.castOption(i,r,t);return l(a)?a:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var a=c(r,n);l(a)&&(t[e]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:h.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:h.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=h.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+h.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var p=h.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+p+" / -"+h.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+p,"y"===e&&(t.distance+=1)}var d=t.hoverinfo||t.trace.hoverinfo;return d&&"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===d.indexOf("y")&&(t.yLabel=void 0),-1===d.indexOf("z")&&(t.zLabel=void 0),-1===d.indexOf("text")&&(t.text=void 0),-1===d.indexOf("name")&&(t.name=void 0)),t}function S(t,e,r){var n,a,o=r.container,s=r.fullLayout,l=s._size,c=r.event,p=!!e.hLinePoint,d=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),d||p){var g=f.combine(s.plot_bgcolor,s.paper_bgcolor);if(p){var v,m,y=e.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(v=c.pointerX,m=c.pointerY):(v=n._offset+y.x,m=a._offset+y.y);var x,b,_=i.readability(y.color,g)<1.5?f.contrast(g):y.color,w=a.spikemode,k=a.spikethickness,T=a.spikecolor||_,A=h.getPxPosition(t,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=v),-1!==w.indexOf("across")){var M=a._counterDomainMin,E=a._counterDomainMax;"free"===a.anchor&&(M=Math.min(M,a.position),E=Math.max(E,a.position)),x=l.l+M*l.w,b=l.l+E*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k,stroke:T,"stroke-dasharray":u.dashStyle(a.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k+2,stroke:g}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==a.side?k:-k),cy:m,r:k,fill:T}).classed("spikeline",!0)}if(d){var S,C,L=e.vLinePoint;n=L&&L.xa,a=L&&L.ya,"cursor"===n.spikesnap?(S=c.pointerX,C=c.pointerY):(S=n._offset+L.x,C=a._offset+L.y);var O,P,I=i.readability(L.color,g)<1.5?f.contrast(g):L.color,D=n.spikemode,z=n.spikethickness,R=n.spikecolor||I,F=h.getPxPosition(t,n);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(O=F,P=C),-1!==D.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),O=l.t+(1-N)*l.h,P=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z,stroke:R,"stroke-dasharray":u.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z+2,stroke:g}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==n.side?z:-z),r:z,fill:R}).classed("spikeline",!0)}}}function C(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function L(t,e){return l.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}},{"../../lib":717,"../../lib/events":707,"../../lib/override_cursor":728,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../registry":846,"../color":592,"../dragelement":610,"../drawing":613,"./constants":625,"./helpers":627,d3:165,"fast-isnumeric":228,tinycolor2:536}],629:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,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":717}],630:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../dragelement"),o=t("./helpers"),s=t("./layout_attributes"),l=t("./hover");e.exports={moduleType:"component",name:"fx",constants:t("./constants"),schema:{layout:s},attributes:t("./attributes"),layoutAttributes:s,supplyLayoutGlobalDefaults:t("./layout_global_defaults"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return a.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return a.castOption(t,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:i.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=a.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:t("./click")}},{"../../lib":717,"../dragelement":610,"./attributes":622,"./calc":623,"./click":624,"./constants":625,"./defaults":626,"./helpers":627,"./hover":628,"./layout_attributes":631,"./layout_defaults":632,"./layout_global_defaults":633,d3:165}],631:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../plots/font_attributes")({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,e.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":791,"./constants":625}],632:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}var o,s=i("clickmode");"select"===i("dragmode")&&i("selectdirection"),e._has("cartesian")?s.indexOf("select")>-1?o="closest":(e._isHoriz=function(t,e){for(var r=e._scatterStackOpts||{},n=0;n1){p||h||d||"independent"===T("pattern")&&(p=!0),v._hasSubplotGrid=p;var x,b,_="top to bottom"===T("roworder"),w=p?.2:.1,k=p?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u("x",T,w,x,y),y:u("y",T,k,b,m,_)}}else delete e.grid}function T(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,a,i,o,s,l,u,p=t.grid||{},h=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m="independent"===r.pattern,y=r._axisMap={};if(d){var x=p.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1!==g||c.uirevision){var v=i.newContainer(e,"legend");if(_("uirevision",e.uirevision),!1!==g){_("bgcolor",e.paper_bgcolor),_("bordercolor"),_("borderwidth"),a.coerceFont(_,"font",e.font);var m,y,x,b=_("orientation");"h"===b?(m=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(y=1.1,x="bottom"):(y=-.1,x="top")):(m=1.02,y=1,x="auto"),_("traceorder",p),l.isGrouped(e.legend)&&_("tracegroupgap"),_("itemsizing"),_("itemclick"),_("itemdoubleclick"),_("x",m),_("xanchor"),_("y",y),_("yanchor",x),_("valign"),a.noneOrAll(c,v,["x","y"]),_("title.text")&&(_("title.side","h"===b?"left":"top"),a.coerceFont(_,"title.font",e.font))}}function _(t,e){return a.coerce(c,v,o,t,e)}}},{"../../lib":717,"../../plot_api/plot_template":755,"../../plots/layout_attributes":817,"../../registry":846,"./attributes":640,"./helpers":646}],643:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),f=t("../../lib/svg_text_utils"),p=t("./handle_click"),h=t("./constants"),d=t("../../constants/alignment"),g=d.LINE_SPACING,v=d.FROM_TL,m=d.FROM_BR,y=t("./get_legend_data"),x=t("./style"),b=t("./helpers");function _(t,e,r,n,a){var i=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};i._group&&(l.group=i._group),o.traceIs(i,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l)&&(1===n?e._clickTimeout=setTimeout((function(){p(r,t,n)}),t._context.doubleClickDelay):2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&p(r,t,n)))}function w(t,e){var r=t.data()[0][0],n=e._fullLayout.legend,i=r.trace,s=o.traceIs(i,"pie-like"),l=i.index,u=e._context.edits.legendText&&!s,p=n._maxNameLength,d=s?r.label:i.name;i._meta&&(d=a.templateString(d,i._meta));var g=a.ensureSingle(t,"text","legendtext");g.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,n.font).text(u?k(d,p):d),f.positionText(g,h.textGap,0),u?g.call(f.makeEditable,{gd:e,text:d}).call(A,t,e).on("edit",(function(n){this.text(k(n,p)).call(A,t,e);var i=r.trace._fullInput||{},s={};if(o.hasTransform(i,"groupby")){var c=o.getTransformIndices(i,"groupby"),u=c[c.length-1],f=a.keyedContainer(i,"transforms["+u+"].styles","target","value.name");f.set(r.trace._group,n),s=f.constructUpdate()}else s.name=n;return o.call("_guiRestyle",e,s,l)})):A(g,t,e)}function k(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function T(t,e){var r,i=e._context.doubleClickDelay,o=1,s=a.ensureSingle(t,"rect","legendtoggle",(function(t){t.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")}));s.on("mousedown",(function(){(r=(new Date).getTime())-e._legendMouseDownTimei&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}}))}function A(t,e,r){f.convertToTspans(t,r,(function(){!function(t,e){var r=t.data()[0][0];if(!r||r.trace.showlegend){var n,a,i=t.select("g[class*=math-group]"),o=i.node(),s=e._fullLayout.legend.borderwidth,l=e._fullLayout.legend,u=(r?l:l.title).font.size*g;if(o){var p=c.bBox(o);n=p.height,a=p.width,r?c.setTranslate(i,0,.25*n):c.setTranslate(i,s,.75*n+s)}else{var d=t.select(r?".legendtext":".legendtitletext"),v=f.lineCount(d),m=d.node();n=u*v,a=m?c.bBox(m).width:0;var y=u*((v-1)/2-.3);r?f.positionText(d,h.textGap,-y):f.positionText(d,h.titlePad+s,u+s)}r?(r.lineHeight=u,r.height=Math.max(n,16)+3,r.width=a):(l._titleWidth=a,l._titleHeight=n)}else t.remove()}(e,r)}))}function M(t){return a.isRightAnchor(t)?"right":a.isCenterAnchor(t)?"center":"left"}function E(t){return a.isBottomAnchor(t)?"bottom":a.isMiddleAnchor(t)?"middle":"top"}e.exports=function(t){var e=t._fullLayout,r="legend"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,f=e.showlegend&&y(t.calcdata,s),p=e.hiddenlabels||[];if(!e.showlegend||!f.length)return e._infolayer.selectAll(".legend").remove(),e._topdefs.select("#"+r).remove(),i.autoMargin(t,"legend");var d=a.ensureSingle(e._infolayer,"g","legend",(function(t){t.attr("pointer-events","all")})),g=a.ensureSingleById(e._topdefs,"clipPath",r,(function(t){t.append("rect")})),k=a.ensureSingle(d,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));k.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style("stroke-width",s.borderwidth+"px");var S=a.ensureSingle(d,"g","scrollbox"),C=s.title;if(s._titleWidth=0,s._titleHeight=0,C.text){var L=a.ensureSingle(S,"text","legendtitletext");L.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,C.font).text(C.text),A(L,S,t)}var O=a.ensureSingle(d,"rect","scrollbar",(function(t){t.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),P=S.selectAll("g.groups").data(f);P.enter().append("g").attr("class","groups"),P.exit().remove();var I=P.selectAll("g.traces").data(a.identity);I.enter().append("g").attr("class","traces"),I.exit().remove(),I.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==p.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(w,t)})).call(x,t).each((function(){n.select(this).call(T,t)})),a.syncOrAsync([i.previousPromises,function(){return function(t,e,r){var a=t._fullLayout,i=a.legend,o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,p=h.textGap,d=h.itemGap,g=2*(u+d),v=E(i),m=i.y<0||0===i.y&&"top"===v,y=i.y>1||1===i.y&&"bottom"===v;i._maxHeight=Math.max(m||y?a.height/2:o.h,30);var x=0;i._width=0,i._height=0;var _=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+_[0],u+_[1]+i._height+e/2+d),i._height+=e,i._width=Math.max(i._width,t[0].width)})),x=p+i._width,i._width+=d+p+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var w=M(i),k=i.x<0||0===i.x&&"right"===w,T=i.x>1||1===i.x&&"left"===w,A=y||m,S=a.width/2;i._maxWidth=Math.max(k?A&&"left"===w?o.l+o.w:S:T?A&&"right"===w?o.r+o.w:S:o.w,2*p);var C=0,L=0;r.each((function(t){var e=t[0].width+p;C=Math.max(C,e),L+=e})),x=null;var O=0;if(l){var P=0,I=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=r[0].height;c.setTranslate(this,_[0],_[1]+u+d+n/2+e),e+=n,t=Math.max(t,p+r[0].width)})),P=Math.max(P,e);var r=t+d;r+u+I>i._maxWidth&&(O=Math.max(O,I),I=0,D+=P+i.tracegroupgap,P=e),c.setTranslate(this,I,D),I+=r})),i._width=Math.max(O,I)+u,i._height=D+P+g}else{var z=r.size(),R=L+f+(z-1)*di._maxWidth&&(O=Math.max(O,j),B=0,N+=F,i._height+=F,F=0),c.setTranslate(this,_[0]+u+B,_[1]+u+N+e/2+d),j=B+r+d,B+=n,F=Math.max(F,e)})),R?(i._width=B+f,i._height=F+g):(i._width=Math.max(O,j)+f,i._height+=F+g)}}i._width=Math.ceil(Math.max(i._width+_[0],i._titleWidth+2*(u+h.titlePad))),i._height=Math.ceil(Math.max(i._height+_[1],i._titleHeight+2*(u+h.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,U=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,a=U?p:x||p+t[0].width;s||(a+=d/2),c.setRect(e,0,-r/2,a,r)}))}(t,P,I)},function(){if(!function(t){var e=t._fullLayout.legend,r=M(e),n=E(e);return i.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*v[r],r:e._width*m[r],b:e._effHeight*m[n],t:e._effHeight*v[n]})}(t)){var u,f,p,y,x=e._size,b=s.borderwidth,w=x.l+x.w*s.x-v[M(s)]*s._width,T=x.t+x.h*(1-s.y)-v[E(s)]*s._effHeight;if(e.margin.autoexpand){var A=w,C=T;w=a.constrain(w,0,e.width-s._width),T=a.constrain(T,0,e.height-s._effHeight),w!==A&&a.log("Constrain legend.x to make legend fit inside graph"),T!==C&&a.log("Constrain legend.y to make legend fit inside graph")}if(c.setTranslate(d,w,T),O.on(".drag",null),d.on("wheel",null),s._height<=s._maxHeight||t._context.staticPlot)k.attr({width:s._width-b,height:s._effHeight-b,x:b/2,y:b/2}),c.setTranslate(S,0,0),g.select("rect").attr({width:s._width-2*b,height:s._effHeight-2*b,x:b,y:b}),c.setClipUrl(S,r,t),c.setRect(O,0,0,0,0),delete s._scrollY;else{var L,P,I,D=Math.max(h.scrollBarMinHeight,s._effHeight*s._effHeight/s._height),z=s._effHeight-D-2*h.scrollBarMargin,R=s._height-s._effHeight,F=z/R,B=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}),g.select("rect").attr({width:s._width-2*b+h.scrollBarWidth+h.scrollBarMargin,height:s._effHeight-2*b,x:b,y:b+B}),c.setClipUrl(S,r,t),V(B,D,F),d.on("wheel",(function(){V(B=a.constrain(s._scrollY+n.event.deltaY/z*R,0,R),D,F),0!==B&&B!==R&&n.event.preventDefault()}));var N=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;L="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,I=B})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(P="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,V(B=function(t,e,r){var n=(r-e)/F+t;return a.constrain(n,0,R)}(I,L,P),D,F))}));O.call(N);var j=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(L=t.changedTouches[0].clientY,I=B)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(P=t.changedTouches[0].clientY,V(B=function(t,e,r){var n=(e-r)/F+t;return a.constrain(n,0,R)}(I,L,P),D,F))}));S.call(j)}t._context.edits.legendPosition&&(d.classed("cursor-move",!0),l.init({element:d.node(),gd:t,prepFn:function(){var t=c.getTranslate(d);p=t.x,y=t.y},moveFn:function(t,e){var r=p+t,n=y+e;c.setTranslate(d,r,n),u=l.align(r,0,x.l,x.l+x.w,s.xanchor),f=l.align(n,0,x.t+x.h,x.t,s.yanchor)},doneFn:function(){void 0!==u&&void 0!==f&&o.call("_guiRelayout",t,{"legend.x":u,"legend.y":f})},clickFn:function(r,n){var a=e._infolayer.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom}));a.size()>0&&_(t,d,a,r,n)}}))}function V(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(S,0,-e),c.setRect(O,s._width,h.scrollBarMargin+e*n,h.scrollBarWidth,r),g.select("rect").attr("y",b+e)}}],t)}}},{"../../constants/alignment":686,"../../lib":717,"../../lib/events":707,"../../lib/svg_text_utils":741,"../../plots/plots":826,"../../registry":846,"../color":592,"../dragelement":610,"../drawing":613,"./constants":641,"./get_legend_data":644,"./handle_click":645,"./helpers":646,"./style":648,d3:165}],644:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("./helpers");e.exports=function(t,e){var r,i,o={},s=[],l=!1,c={},u=0,f=0;function p(t,r){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r0))return 0;a=e.width}return h?n:Math.min(a,r)};function g(t,e,r){var i=t[0].trace,o=i.marker||{},l=o.line||{},c=r?i.visible&&i.type===r:a.traceIs(i,"bar"),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(c?[t]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.each((function(t){var e=n.select(this),r=t[0],a=d(r.mlw,o.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.mc||o.color),a&&s.stroke(e,r.mlc||l.color)}))}function v(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:a.traceIs(s,r),c=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),c.exit().remove(),c.size()){var p=(s.marker||{}).line,h=d(f(p.width,o.pts),p,5,2),g=i.minExtend(s,{marker:{line:{width:h}}});g.marker.line.color=p.color;var v=i.minExtend(o,{trace:g});u(c,v,g)}}t.each((function(t){var e=n.select(this),a=i.ensureSingle(e,"g","layers");a.style("opacity",t[0].trace.opacity);var o=r.valign,s=t[0].lineHeight,l=t[0].height;if("middle"!==o&&s&&l){var c={top:1,bottom:-1}[o]*(.5*(s-l+3));a.attr("transform","translate(0,"+c+")")}else a.attr("transform",null);a.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var u=a.selectAll("g.legendsymbols").data([t]);u.enter().append("g").classed("legendsymbols",!0),u.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,a=t[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":c=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":c=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":c=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":c=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,c){var u,f=n.select(this),h=l(a),d=h.colorscale,g=h.reversescale;if(d){if(!r){var v=d.length;u=0===c?d[g?v-1:0][1]:1===c?d[g?0:v-1][1]:d[Math.floor((v-1)/2)][1]}}else{var m=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(m)?m[c]||m[0]:m}f.attr("d",t[0]),u?f.call(s.fill,u):f.call((function(t){if(t.size()){var n="legendfill-"+a.uid;o.gradient(t,e,n,p(g,"radial"===r),d,"fill")}}))}))})).each((function(t){var e=t[0].trace,r=[];e.visible&&"waterfall"===e.type&&(r=t[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(t){var r=n.select(this),a=e[t[0]].marker,i=d(void 0,a.line,5,2);r.attr("d",t[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(t){g(t,this,"funnel")})).each((function(t){g(t,this)})).each((function(t){var r=t[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[t]:[]);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 t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=d(void 0,r.line,5,2);t.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(t,r.line.color)}else{var c=i.minExtend(r,{marker:{size:h?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,e)}}))})).each((function(t){v(t,this,"funnelarea")})).each((function(t){v(t,this,"pie")})).each((function(t){var r,a,s=t[0],u=s.trace,f=u.visible&&u.fill&&"none"!==u.fill,h=c.hasLines(u),g=u.contours,v=!1,m=!1,y=l(u),x=y.colorscale,b=y.reversescale;if(g){var _=g.coloring;"lines"===_?v=!0:h="none"===_||"heatmap"===_||g.showlines,"constraint"===g.type?f="="!==g._operation:"fill"!==_&&"heatmap"!==_||(m=!0)}var w=c.hasMarkers(u)||c.hasText(u),k=f||m,T=h||v,A=w||!k?"M5,0":T?"M5,-2":"M5,-3",M=n.select(this),E=M.select(".legendfill").selectAll("path").data(f||m?[t]:[]);if(E.enter().append("path").classed("js-fill",!0),E.exit().remove(),E.attr("d",A+"h30v6h-30z").call(f?o.fillGroupStyle:function(t){if(t.size()){var r="legendfill-"+u.uid;o.gradient(t,e,r,p(b),x,"fill")}}),h||v){var S=d(void 0,u.line,10,5);a=i.minExtend(u,{line:{width:S}}),r=[i.minExtend(s,{trace:a})]}var C=M.select(".legendlines").selectAll("path").data(h||v?[r]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(v?"l30,0.0001":"h30")).call(h?o.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+u.uid;o.lineGroupStyle(t),o.gradient(t,e,r,p(b),x,"stroke")}})})).each((function(t){var r,a,s=t[0],l=s.trace,u=c.hasMarkers(l),f=c.hasText(l),p=c.hasLines(l);function d(t,e,r,n){var a=i.nestedProperty(l,t).get(),o=i.isArrayOrTypedArray(a)&&e?e(a):a;if(h&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function g(t){return t[0]}if(u||f||p){var v={},m={};if(u){v.mc=d("marker.color",g),v.mx=d("marker.symbol",g),v.mo=d("marker.opacity",i.mean,[.2,1]),v.mlc=d("marker.line.color",g),v.mlw=d("marker.line.width",i.mean,[0,5],2),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var y=d("marker.size",i.mean,[2,16],12);v.ms=y,m.marker.size=y}p&&(m.line={width:d("line.width",g,[0,10],5)}),f&&(v.tx="Aa",v.tp=d("textposition",g),v.ts=10,v.tc=d("textfont.color",g),v.tf=d("textfont.family",g)),r=[i.minExtend(s,v)],(a=i.minExtend(l,m)).selectedpoints=null,a.texttemplate=null}var x=n.select(this).select("g.legendpoints"),b=x.selectAll("path.scatterpts").data(u?r:[]);b.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),b.exit().remove(),b.call(o.pointStyle,a,e),u&&(r[0].mrc=3);var _=x.selectAll("g.pointtext").data(f?r:[]);_.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),_.exit().remove(),_.selectAll("text").call(o.textPointStyle,a,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"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(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],o=d(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],l=d(void 0,i.line,5,2);a.style("fill","none").call(o.dashLine,i.line.dash,l),l&&s.stroke(a,i.line.color)}))}))}},{"../../lib":717,"../../registry":846,"../../traces/pie/helpers":1099,"../../traces/pie/style_one":1105,"../../traces/scatter/subtypes":1144,"../color":592,"../colorscale/helpers":603,"../drawing":613,d3:165}],649:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/plots"),i=t("../../plots/cartesian/axis_ids"),o=t("../../lib"),s=t("../../fonts/ploticon"),l=o._,c=e.exports={};function u(t,e){var r,a,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},f=i.list(t,null,!0),p=c._cartesianSpikesEnabled;if("zoom"===s){var h,d="in"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(a=0;a1?(A=["toggleHover"],M=["resetViews"]):p?(T=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],M=["resetGeo"]):f?(A=["hoverClosest3d"],M=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(T=["zoomInMapbox","zoomOutMapbox"],A=["toggleHover"],M=["resetViewMapbox"]):g?A=["hoverClosestGl2d"]:h?A=["hoverClosestPie"]:x?(A=["hoverClosestCartesian","hoverCompareCartesian"],M=["resetViewSankey"]):A=["toggleHover"],u&&(A=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),function(t){for(var e=0;e0)){var g=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),a=0,i=0;i0?p+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,a){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,f,p=1/0,h=-1/0,d=n.match(i.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lh&&(h=f)));return h>=p?[p,h]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o10?t/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:I?V(r.xanchor)+r.x0:V(r.x0),cy:D?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:I?V(r.xanchor)+r.x1:V(r.x1),cy:D?U(r.yanchor)-r.y1:U(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():e,W={element:G.node(),gd:t,prepFn:function(n){I&&(_=V(r.xanchor)),D&&(w=U(r.yanchor)),"path"===r.type?O=r.path:(m=I?r.x0:V(r.x0),y=D?r.y0:U(r.y0),x=I?r.x1:V(r.x1),b=D?r.y1:U(r.y1)),mb?(k=y,E="y0",T=b,S="y1"):(k=b,E="y1",T=y,S="y0"),Y(n),J(h,r),function(t,e,r){var n=e.xref,a=e.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),c="";"paper"===n||o.autorange||(c+=n),"paper"===a||l.autorange||(c+=a),s.setClipUrl(t,c?"clip"+r._fullLayout._uid+c:null,r)}(e,r,t),W.moveFn="move"===P?X:Z},doneFn:function(){u(e),K(h),d(e,t,r),n.call("_guiRelayout",t,F.getUpdateObj())},clickFn:function(){K(h)}};function Y(t){if(z)P="path"===t.target.tagName?"move":"start-point"===t.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=W.element.getBoundingClientRect(),n=r.right-r.left,a=r.bottom-r.top,i=t.clientX-r.left,o=t.clientY-r.top,s=!R&&n>10&&a>10&&!t.shiftKey?c.getCursor(i/n,1-o/a):"move";u(e,s),P=s.split("-")[0]}}function X(n,a){if("path"===r.type){var i=function(t){return t},o=i,s=i;I?B("xanchor",r.xanchor=q(_+n)):(o=function(t){return q(V(t)+n)},N&&"date"===N.type&&(o=p.encodeDate(o))),D?B("yanchor",r.yanchor=H(w+a)):(s=function(t){return H(U(t)+a)},j&&"date"===j.type&&(s=p.encodeDate(s))),B("path",r.path=v(O,o,s))}else I?B("xanchor",r.xanchor=q(_+n)):(B("x0",r.x0=q(m+n)),B("x1",r.x1=q(x+n))),D?B("yanchor",r.yanchor=H(w+a)):(B("y0",r.y0=H(y+a)),B("y1",r.y1=H(b+a)));e.attr("d",g(t,r)),J(h,r)}function Z(n,a){if(R){var i=function(t){return t},o=i,s=i;I?B("xanchor",r.xanchor=q(_+n)):(o=function(t){return q(V(t)+n)},N&&"date"===N.type&&(o=p.encodeDate(o))),D?B("yanchor",r.yanchor=H(w+a)):(s=function(t){return H(U(t)+a)},j&&"date"===j.type&&(s=p.encodeDate(s))),B("path",r.path=v(O,o,s))}else if(z){if("resize-over-start-point"===P){var l=m+n,c=D?y-a:y+a;B("x0",r.x0=I?l:q(l)),B("y0",r.y0=D?c:H(c))}else if("resize-over-end-point"===P){var u=x+n,f=D?b-a:b+a;B("x1",r.x1=I?u:q(u)),B("y1",r.y1=D?f:H(f))}}else{var d=~P.indexOf("n")?k+a:k,F=~P.indexOf("s")?T+a:T,G=~P.indexOf("w")?A+n:A,W=~P.indexOf("e")?M+n:M;~P.indexOf("n")&&D&&(d=k-a),~P.indexOf("s")&&D&&(F=T-a),(!D&&F-d>10||D&&d-F>10)&&(B(E,r[E]=D?d:H(d)),B(S,r[S]=D?F:H(F))),W-G>10&&(B(C,r[C]=I?G:q(G)),B(L,r[L]=I?W:q(W)))}e.attr("d",g(t,r)),J(h,r)}function J(t,e){(I||D)&&function(){var r="path"!==e.type,n=t.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(I?e.xanchor:a.midRange(r?[e.x0,e.x1]:p.extractPathCoords(e.path,f.paramIsX))),o=U(D?e.yanchor:a.midRange(r?[e.y0,e.y1]:p.extractPathCoords(e.path,f.paramIsY)));if(i=p.roundPositionForSharpStrokeRendering(i,1),o=p.roundPositionForSharpStrokeRendering(o,1),I&&D){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(I){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function K(t){t.selectAll(".visual-cue").remove()}c.init(W),G.node().onmousemove=Y}(t,x,r,e,h)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function g(t,e){var r,n,o,s,l,c,u,h,d=e.type,g=i.getFromId(t,e.xref),v=i.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=p.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=p.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},"path"===d)return g&&"date"===g.type&&(n=p.decodeDate(n)),v&&"date"===v.type&&(s=p.decodeDate(s)),function(t,e,r){var n=t.path,i=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(f.segmentRE,(function(t){var n=0,c=t.charAt(0),u=f.paramIsX[c],p=f.paramIsY[c],h=f.numParams[c],d=t.substr(1).replace(f.paramRE,(function(t){return u[n]?t="pixel"===i?e(s)+Number(t):e(t):p[n]&&(t="pixel"===o?r(l)-Number(t):r(t)),++n>h&&(t="X"),t}));return n>h&&(d=d.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+t)),c+d}))}(e,n,s);if("pixel"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if("pixel"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,h=x-e.y1}else u=s(e.y0),h=s(e.y1);if("line"===d)return"M"+l+","+u+"L"+c+","+h;if("rect"===d)return"M"+l+","+u+"H"+c+"V"+h+"H"+l+"Z";var b=(l+c)/2,_=(u+h)/2,w=Math.abs(b-l),k=Math.abs(_-u),T="A"+w+","+k,A=b+w+","+_;return"M"+A+T+" 0 1,1 "+b+","+(_-k)+T+" 0 0,1 "+A+"Z"}function v(t,e,r){return t.replace(f.segmentRE,(function(t){var n=0,a=t.charAt(0),i=f.paramIsX[a],o=f.paramIsY[a],s=f.numParams[a];return a+t.substr(1).replace(f.paramRE,(function(t){return n>=s?t:(i[n]?t=e(t):o[n]&&(t=r(t)),n++,t)}))}))}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var a=0;a0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform","translate("+(o-.5*u.gripWidth)+","+e._dims.currentValueTotalHeight+")")}}function E(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function S(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,a=s.ensureSingle(t,"rect",u.railTouchRectClass,(function(n){n.call(T,e,t,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function L(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,a=s.ensureSingle(t,"rect",u.railRectClass);a.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,e.bordercolor).call(i.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(a,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[u.name],n=[],a=0;a0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),a.autoMargin(t,g(e))}if(i.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),i.exit().each((function(){n.select(this).selectAll("g."+u.groupClassName).each(s)})).remove(),0!==r.length){var l=i.selectAll("g."+u.groupClassName).data(r,v);l.enter().append("g").classed(u.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||f<0){var v={left:[-h,0],right:[h,0],top:[0,-h],bottom:[0,h]}[x.side];e.attr("transform","translate("+v+")")}}}return D.call(z),P&&(E?D.on(".opacity",null):(T=0,A=!0,D.text(m).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))),D.call(u.makeEditable,{gd:t}).on("edit",(function(e){void 0!==y?o.call("_guiRestyle",t,v,e,y):o.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(z)})).on("input",(function(t){this.text(t||" ").call(u.positionText,b.x,b.y)}))),D.classed("js-placeholder",A),w}}},{"../../constants/alignment":686,"../../constants/interactions":692,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/plots":826,"../../registry":846,"../color":592,"../drawing":613,d3:165,"fast-isnumeric":228}],680:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),i=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=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}});e.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:c,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":708,"../../plot_api/edit_types":748,"../../plot_api/plot_template":755,"../../plots/font_attributes":791,"../../plots/pad_attributes":825,"../color/attributes":591}],681:[function(t,e,r){"use strict";e.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:"▼"}}},{}],682:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/array_container_defaults"),i=t("./attributes"),o=t("./constants").name,s=i.buttons;function l(t,e,r){function o(r,a){return n.coerce(t,e,i,r,a)}o("visible",a(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["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 c(t,e){function r(r,a){return n.coerce(t,e,s,r,a)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(t,e){a(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":717,"../../plots/array_container_defaults":761,"./attributes":680,"./constants":681}],683:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/plots"),i=t("../color"),o=t("../drawing"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../plot_api/plot_template").arrayEditor,u=t("../../constants/alignment").LINE_SPACING,f=t("./constants"),p=t("./scrollbox");function h(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,a,i,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?m(t,n,null,null,e):"dropdown"===e.type&&(a.attr(f.menuIndexAttrName,"-1"),v(t,n,a,i,e),s||m(t,n,a,i,e))}function v(t,e,r,n,a){var i=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=a._dims,c=a.active,u=a.buttons[c]||f.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(y,a,u,t).call(M,a,p,h),s.ensureSingle(e,"text",f.headerArrowClassName,(function(t){t.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,a.font).text(f.arrowSymbol[a.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+a.pad.l,y:l.headerHeight/2+f.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(E,String(d(r,a)?-1:a._index)),m(t,e,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(k,a)})),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,i,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),p=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===o.type?(p.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var d=0,v=0,m=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?v=m.headerHeight+f.gapButtonHeader:d=m.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(v=-f.gapButtonHeader+f.gapButton-m.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+v+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,i,-1),a.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,i,l),a.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(k,o),u.call(_,o)}))})),u.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,i&&(u.size()?function(t,e,r,n,a,i){var o,s,l,c=a.direction,u="up"===c||"down"===c,p=a._dims,h=a.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(i)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,h);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,E=d,S=v+m;S+M>c&&(S=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),T?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:E,y:S,width:A,height:M}),this._hbarXMin=E+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=m>k,O=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,I=d+g,D=v;I+O>l&&(I=l-O);var z=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),L?(this.vbar=z.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:D,width:O,height:P}),this._vbarYMin=D+P/2,this._vbarTranslateMax=k-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?f+O+.5:f+.5,N=p-.5,j=T?h+M+.5:h+.5,V=o._topdefs.selectAll("#"+R).data(T||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",R).append("rect"),T||L?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(i.setClipUrl,R,this.gd),this.bg.attr({x:d,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||L){var U=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(U);var q=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,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 t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=e+this._vbarYMin,s=i+this._vbarTranslateMax;e=(o.constrain(n.event.y,i,s)-i)/(s-i)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(i.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var a=t/r;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(i.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":717,"../color":592,"../drawing":613,d3:165}],686:[function(t,e,r){"use strict";e.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"}}},{}],687:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},{}],688:[function(t,e,r){"use strict";e.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"}},{}],689:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],690:[function(t,e,r){"use strict";e.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]}},{}],691:[function(t,e,r){"use strict";e.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},{}],692:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],693:[function(t,e,r){"use strict";e.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:"−"}},{}],694:[function(t,e,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}},{}],695:[function(t,e,r){"use strict";r.version="1.52.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config")();for(var n=t("./registry"),a=r.register=n.register,i=t("./plot_api"),o=Object.keys(i),s=0;splotly-logomark"}}},{}],698:[function(t,e,r){"use strict";r.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},{}],699:[function(t,e,r){"use strict";var n=t("./mod"),a=n.mod,i=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return i(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=a(n,s))&&(n+=s);var i=a(t,s),o=i+s;return i>=r&&i<=n||o>=r&&o<=n}function f(t,e,r,n,a,i,c){a=a||0,i=i||0;var u,f,p,h,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+a,i-t*Math.sin(e)]}g?(u=0,f=o,p=s):r=a&&t<=i);var a,i},pathArc:function(t,e,r,n,a){return f(null,t,e,r,n,a,0)},pathSector:function(t,e,r,n,a){return f(null,t,e,r,n,a,1)},pathAnnulus:function(t,e,r,n,a,i){return f(t,e,r,n,a,i,1)}}},{"./mod":724}],700:[function(t,e,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(t){return a.isView(t)&&!(t instanceof i)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,a=0;aa.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,a){t%1||!n(t)||void 0!==a.min&&ta.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var a="number"==typeof t;!0!==n.strict&&a?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){a(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return a(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var a=n.regex||c(r);"string"==typeof t&&a.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if("string"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var a=t.split("+"),i=0;i=n&&t<=a?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(e),m=t.charAt(0);!c||"G"!==m&&"g"!==m||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),E=Number(k[7]||0),S=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===T.length)return u;var L;T=Number(T);try{var O=v.getComponentMethod("calendars","getCal")(e);if(w){var P="i"===A.charAt(A.length-1);A=parseInt(A,10),L=O.newDate(T,O.toMonthIndex(T,A,P),M)}else L=O.newDate(T,Number(A),M)}catch(t){return u}return L?(L.toJD()-g)*f+E*p+S*h+C*d:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var I=new Date(Date.UTC(2e3,A,M,E,S));return I.setUTCFullYear(T),I.getUTCMonth()!==A?u:I.getUTCDate()!==M?u:I.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*f,T=3*p,A=5*h;function M(t,e,r,n,a){if((e||r||n||a)&&(t+=" "+w(e,2)+":"+w(r,2),(n||a)&&(t+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;t+="."+w(a,i)}return t}r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=a))return u;e||(e=0);var i,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var E=Math.floor(w/f)+g,S=Math.floor(l(t,f));try{i=v.getComponentMethod("calendars","getCal")(r).fromJD(E).formatDate("yyyy-mm-dd")}catch(t){i=m("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=e=n+f&&t<=a-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(i.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var E=/%\d?f/g;function S(t,e,r,n){t=t.replace(E,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(a)}var C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,a,i){if(a=_(a)&&a,!e)if("y"===r)e=i.year;else if("m"===r)e=i.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/p),2)+":"+w(l(Math.floor(r/h),60),2);if("M"!==e){o(e)||(e=0);var a=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(t,r)+"\n"+S(i.dayMonthYear,t,n,a);e=i.dayMonth+"\n"+i.year}return S(e,t,n,a)};var L=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var a=Math.round(t/f)+g,i=v.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return e%12?i.add(o,e,"m"):i.add(o,e/12,"y"),(o.toJD()-g)*f+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,a=0,i=0,s=0,l=0,c=_(e)&&v.getComponentMethod("calendars","getCal")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),a=0;ae?r[n++]=[t[a][0]+360,t[a][1]]:a===e?(r[n++]=t[a],r[n++]=[t[a][0],-90]):r[n++]=t[a];var i=p.tester(r);i.pts.pop(),l.push(i)}:function(t){l.push(p.tester(t))},i.type){case"MultiPolygon":for(r=0;ra&&(a=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete a[r]}switch(r.type){case"FeatureCollection":var p=r.features;for(n=0;n100?(clearInterval(i),n("Unexpected error while fetching from "+t)):void a++}),50)}))}for(var o=0;o0&&(r.push(a),a=[])}return a.length>0&&r.push(a),r},r.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r1||g<0||g>1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,a){var i=n*t+a*e;if(i<0)return n*n+a*a;if(i>r){var o=n-t,s=a-e;return o*o+s*s}var l=n*e-a*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,a,i,o,c){if(s(t,e,r,n,a,i,o,c))return 0;var u=r-t,f=n-e,p=o-a,h=c-i,d=u*u+f*f,g=p*p+h*h,v=Math.min(l(u,f,d,a-t,i-e),l(u,f,d,o-t,c-e),l(p,h,g,t-a,e-i),l(p,h,g,r-a,n-i));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===a&&s===i||(n={},a=t,i=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),p={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=p,p},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(t,e,r){var n,a,i=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function p(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(a=r);var c=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var h=p(c);h;){if((c+=h+r)>f)return;h=p(c)}for(h=p(f);h;){if(c>(f-=h+r))return;h=p(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var a,i,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,p=0,h=s;f0?h=a:p=a,f++}return i}},{"./mod":724}],714:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),i=t("color-normalize"),o=t("../components/colorscale"),s=t("../components/color/attributes").defaultLine,l=t("./array").isArrayOrTypedArray,c=i(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=i(t);return e.length?e:c}function p(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,a,s,h,d,g=t.color,v=l(g),m=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,a=v?function(t,e){return void 0===t[e]?c:i(n(t[e]))}:f,s=m?function(t,e){return void 0===t[e]?1:p(t[e])}:p,v||m)for(var b=0;bo?s:a(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&a(t)&&t>=0&&t%1==0},l.noop=t("./noop"),l.identity=t("./identity"),l.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var a=t.length,i=new Array(a),o=0;o=Math.pow(2,r)?a>10?(l.warn("randstr failed uniqueness"),c):t(e,r,n,(a||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,a,i,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=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+=t[a]*c[n];u[r]=i}return u},l.syncOrAsync=function(t,e,r){var n;function a(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(a).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,a=!1,i=!0;for(n=0;n0?e:0}))},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(t))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 C=/^\w*$/;l.templateString=function(t,e){var r={};return t.replace(l.TEMPLATE_STRING_REGEX,(function(t,n){var a;return C.test(n)?a=e[n]:(r[n]=r[n]||l.nestedProperty(e,n).get,a=r[n]()),l.isValidTextValue(a)?a:""}))};var L={max:10,count:0,name:"hovertemplate"};l.hovertemplateString=function(){return I.apply(L,arguments)};var O={max:10,count:0,name:"texttemplate"};l.texttemplateString=function(){return I.apply(O,arguments)};var P=/^[:|\|]/;function I(t,e,r){var a=this,i=arguments;e||(e={});var o={};return t.replace(l.TEMPLATE_STRING_REGEX,(function(t,s,c){var u,f,p,h;for(p=3;p=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(a=10*a+s-48),!l||!c){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var D=2e9;l.seedPseudoRandom=function(){D=2e9},l.pseudoRandom=function(){var t=D;return D=(69069*D+1)%4294967296,Math.abs(D-t)<429496729?l.pseudoRandom():D/4294967296},l.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},a=l.extractOption(t,e,"htx","hovertext");if(l.isValidTextValue(a))return n(a);var i=l.extractOption(t,e,"tx","text");return l.isValidTextValue(i)?n(i):void 0},l.isValidTextValue=function(t){return t||0===t},l.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,"translate("+(a-c*(r+o))+","+(i-c*(n+s))+")"+(c<1?"scale("+c+")":"")+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},l.ensureUniformFontSize=function(t,e){var r=l.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r}},{"../constants/numerical":693,"./anchor_utils":698,"./angles":699,"./array":700,"./clean_number":701,"./clear_responsive":703,"./coerce":704,"./dates":705,"./dom":706,"./extend":708,"./filter_unique":709,"./filter_visible":710,"./geometry2d":713,"./identity":716,"./is_plain_object":718,"./keyed_container":719,"./localize":720,"./loggers":721,"./make_trace_groups":722,"./matrix":723,"./mod":724,"./nested_property":725,"./noop":726,"./notifier":727,"./push_unique":731,"./regex":733,"./relative_attr":734,"./relink_private":735,"./search":736,"./stats":739,"./throttle":742,"./to_log_range":743,d3:165,"fast-isnumeric":228}],718:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],719:[function(t,e,r){"use strict";var n=t("./nested_property"),a=/^\w*$/;e.exports=function(t,e,r,i){var o,s,l;r=r||"name",i=i||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(o=0;o2)return c[e]=2|c[e],p.set(t,null);if(f){for(o=e;o1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},i.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},i.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},{"../plot_api/plot_config":753,"./notifier":727}],722:[function(t,e,r){"use strict";var n=t("d3");e.exports=function(t,e,r){var a=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(t){t[0][i]=n.select(this)})),a}},{d3:165}],723:[function(t,e,r){"use strict";r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],725:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./array").isArrayOrTypedArray;function i(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;li||c===a||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===a||li||c===a||cs)return!1;var u,f,p,h,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;uMath.max(f,v)||c>Math.max(p,m)))if(cu||Math.abs(n(o,p))>a)return!0;return!1},i.filter=function(t,e){var r=[t[0]],n=0,a=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},{"../constants/numerical":693,"./matrix":723}],730:[function(t,r,n){(function(e){"use strict";var n=t("./show_no_webgl_msg"),a=t("regl");r.exports=function(t,r){var i=t._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:t._context.plotGlPixelRatio||e.devicePixelRatio,extensions:r||[]})}catch(t){o=!1}o&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),o||n({container:i._glcontainer.node()}),o}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":738,regl:501}],731:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;na.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var i,u,f=0,p=e.length,h=0,d=p>1?(e[p-1]-e[0])/(p-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&a.log("Long binary search..."),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,a=e[n]-e[0]||1,i=a/(n||1)/1e4,o=[e[0]],s=0;se[s]+i&&(a=Math.min(a,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:a}},r.roundUp=function(t,e,r){for(var n,a=0,i=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(e)||(e=!1),a(i[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"./array":700,"fast-isnumeric":228}],740:[function(t,e,r){"use strict";var n=t("color-normalize");e.exports=function(t){return t?n(t):[0,0,0,1]}},{"color-normalize":122}],741:[function(t,e,r){"use strict";var n=t("d3"),a=t("../lib"),i=t("../constants/xmlns_namespaces"),o=t("../constants/alignment").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,A){var M=t.text(),S=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&M.match(l),C=n.select(t.node().parentNode);if(!C.empty()){var L=t.attr("class")?t.attr("class").split(" ")[0]:"text";return L+="-math",C.selectAll("svg."+L).remove(),C.selectAll("g."+L+"-group").remove(),t.style("display",null).attr({"data-unformatted":M,"data-math":"N"}),S?(e&&e._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),i={fontSize:r};!function(t,e,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":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(l.node())}),(function(){var e=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.",t),r();else{var o=l.select("svg").node().getBoundingClientRect();r(l.select(".MathJax_SVG"),e,o)}if(l.remove(),"SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)}))}(S[2],i,(function(n,a,i){C.selectAll("svg."+L).remove(),C.selectAll("g."+L+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return O(),void e();var l=C.append("g").classed(L+"-group",!0).attr({"pointer-events":"none","data-unformatted":M,"data-math":"Y"});l.node().appendChild(o.node()),a&&a.node()&&o.node().insertBefore(a.node().cloneNode(!0),o.node().firstChild),o.attr({class:L,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=t.node().style.fill||"black",u=o.select("g");u.attr({fill:c,stroke:c});var f=s(u,"width"),p=s(u,"height"),h=+t.attr("x")-f*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],d=-(r||s(t,"height"))/4;"y"===L[0]?(l.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-f/2,d-p/2]+")"}),o.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===L[0]?o.attr({x:t.attr("x"),y:d-p/2}):"a"===L[0]&&0!==L.indexOf("atitle")?o.attr({x:0,y:d}):o.attr({x:h,y:+t.attr("y")+d-p/2}),A&&A.call(t,l),e(l)}))}))):O(),t}function O(){C.empty()||(L=t.attr("class")+"-math",C.select("svg."+L).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(g," ");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(i.svg,"tspan");n.select(e).attr({class:"line",dy:c*o+"em"}),t.appendChild(e),r=e;var a=l;if(l=[{node:e}],a.length>1)for(var s=1;s doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else a.log("Ignoring unexpected end tag .",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var C=e.split(v),L=0;L|>|>)/g,f={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"},d=["http:","https:","mailto:","",void 0,":"],g=r.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,m=/<(\/?)([^ >]*)(\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,w=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var T=/(^|;)\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],a="...".length,i=t.split(v),o=[],s="",l=0,c=0;ca?o.push(u.substr(0,d-a)+"..."):o.push(u.substr(0,d));break}s=""}}return o.join("")};var A={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},M=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(M,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):A[e])||t}))}function S(t,e,r){var n,a,i,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),c=e.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()-c.top+"px",left:i()-c.left+"px","z-index":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each((function(){var t=n.select(this);function a(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var i=a("x",e),o=a("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:i,y:o})}))},r.makeEditable=function(t,e){var r=e.gd,a=e.delegate,i=n.dispatch("edit","input","cancel"),o=a||t;if(t.style({"pointer-events":a?"none":"all"}),1!==t.size())throw new Error("boo");function s(){var a,s,c,u,f;a=n.select(r).select(".svg-container"),s=a.append("div"),c=t.node().style,u=parseFloat(c.fontSize||12),void 0===(f=e.text)&&(f=t.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":c.fontFamily||"Arial","font-size":u,color:e.fill||c.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-u/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(f).call(S(t,a,e)).on("blur",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,a=n.select(this).attr("class");(e=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(t,o)})).on("focus",(function(){var t=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),i.cancel.call(t,this.textContent)):(i.input.call(t,this.textContent),n.select(this).call(S(t,a,e)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var p,h=o.attr("class");(p=h?"."+h.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(p).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,i,"on")}},{"../constants/alignment":686,"../constants/xmlns_namespaces":694,"../lib":717,d3:165}],742:[function(t,e,r){"use strict";var n={};function a(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var i=n[t],o=Date.now();if(!i){for(var s in n)n[s].tsi.ts+e?l():i.timer=setTimeout((function(){l(),i.timer=null}),e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},r.clear=function(t){if(t)a(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],743:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":228}],744:[function(t,e,r){"use strict";var n=e.exports={},a=t("../plots/geo/constants").locationmodeToLayer,i=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=a[t.locationmode],n=e.objects[r];return i(e,n).features}},{"../plots/geo/constants":793,"topojson-client":539}],745:[function(t,e,r){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],746:[function(t,e,r){"use strict";e.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"}}},{}],747:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var i=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,p=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=["x","y","z"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&i.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",f,y),!0;e.set(y)}return!g&&(p(v,m),h(t),!0)}var x,b,_,w,k,T,A,M,E=Object.keys(r).map(Number).sort(o),S=e.get(),C=S||[],L=u(m,f).get(),O=[],P=-1,I=C.length;for(x=0;xC.length-(A?0:1))i.warn("index out of range",f,_);else if(void 0!==T)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(T)?O.push(_):A?("add"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,T),-1===P&&(P=_);else for(b=0;b=0;x--)C.splice(O[x],1),L&&L.splice(O[x],1);if(C.length?S||e.set(C):e.set(null),g)return!1;if(p(v,m),d!==a){var D;if(-1===P)D=E;else{for(I=Math.max(C.length,I),D=[],x=0;x=P);x++)D.push(_);for(x=P;x=t.data.length||a<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(a,n+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function D(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),I(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function z(t,e,r,n,i){!function(t,e,r,n){var a=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))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 I(t,r,"indices"),e){if(!Array.isArray(e[i])||e[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!==e[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")}}(t,e,r,n);for(var l=function(t,e,r,n){var i,l,c,u,f,p=o.isPlainObject(n),h=[];for(var d in Array.isArray(r)||(r=[r]),r=P(r,t.data.length-1),e)for(var g=0;g-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(e,r){t[r]=t[e],delete t[e]}}function q(t,e,r){if(t=o.getGraphDiv(t),k.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var a=Z(t,n),i=a.flags;i.calc&&(t.calcdata=void 0);var s=[p.previousPromises];i.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(H(t,i,a)||p.supplyDefaults(t),i.legend&&s.push(T.doLegend),i.layoutstyle&&s.push(T.layoutStyles),i.axrange&&G(s,a.rangesAltered),i.ticks&&s.push(T.doTicksRelayout),i.modebar&&s.push(T.doModeBar),i.camera&&s.push(T.doCamera),i.colorbars&&s.push(T.doColorBars),s.push(S)),s.push(p.rehover,p.redrag),c.add(t,q,[t,a.undoit],q,[t,a.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",a.eventData),t}))}function H(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var a in e)if("axrange"!==a&&e[a])return!1;for(var i in r.rangesAltered){var o=d.id2name(i),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==i){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[],n=!0;for(var a in e){var i=d.getFromId(t,a);if(r.push(a),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o);i.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,X=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(t,e){var r,n,a,i=t.layout,l=t._fullLayout,c=l._guiEditing,p=N(l._preGUI,c),h=Object.keys(e),g=d.list(t),v=o.extendDeepAll({},e),m={};for(U(e),h=Object.keys(e),n=0;n0&&"string"!=typeof I.parts[z];)z--;var R=I.parts[z],F=I.parts[z-1]+"."+R,j=I.parts.slice(0,z).join("."),V=s(t.layout,j).get(),q=s(l,j).get(),H=I.get();if(void 0!==D){T[P]=D,E[P]="reverse"===R?D:B(H);var G=f.getLayoutValObject(l,I.parts);if(G&&G.impliedEdits&&null!==D)for(var Z in G.impliedEdits)S(o.relativeAttr(P,Z),G.impliedEdits[Z]);if(-1!==["width","height"].indexOf(P))if(D){S("autosize",null);var K="height"===P?"width":"height";S(K,l[K])}else l[P]=t._initialAutoSize[P];else if("autosize"===P)S("width",D?null:l.width),S("height",D?null:l.height);else if(F.match(W))O(F),s(l,j+"._inputRange").set(null);else if(F.match(Y)){O(F),s(l,j+"._inputRange").set(null);var $=s(l,j).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(X)&&s(l,j+"._inputDomain").set(null);if("type"===R){var Q=V,tt="linear"===q.type&&"log"===D,et="log"===q.type&&"linear"===D;if(tt||et){if(Q&&Q.range)if(q.autorange)tt&&(Q.range=Q.range[1]>Q.range[0]?[1,2]:[2,1]);else{var rt=Q.range[0],nt=Q.range[1];tt?(rt<=0&&nt<=0&&S(j+".autorange",!0),rt<=0?rt=nt/1e6:nt<=0&&(nt=rt/1e6),S(j+".range[0]",Math.log(rt)/Math.LN10),S(j+".range[1]",Math.log(nt)/Math.LN10)):(S(j+".range[0]",Math.pow(10,rt)),S(j+".range[1]",Math.pow(10,nt)))}else S(j+".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"],u.getComponentMethod("annotations","convertCoords")(t,q,D,S),u.getComponentMethod("images","convertCoords")(t,q,D,S)}else S(j+".autorange",!0),S(j+".range",null);s(l,j+"._inputRange").set(null)}else if(R.match(M)){var at=s(l,P).get(),it=(D||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,at,it,S),u.getComponentMethod("images","convertCoords")(t,at,it,S)}var ot=w.containerArrayMatch(P);if(ot){r=ot.array,n=ot.index;var st=ot.property,lt=G||{editType:"calc"};""!==n&&""===st&&(w.isAddVal(D)?E[P]=null:w.isRemoveVal(D)?E[P]=(s(i,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,lt),m[r]||(m[r]={});var ct=m[r][n];ct||(ct=m[r][n]={}),ct[st]=D,delete e[P]}else"reverse"===R?(V.range?V.range.reverse():(S(j+".autorange",!0),V.range=[1,0]),q.autorange?_.calc=!0:_.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===D||"select"===D)&&"lasso"!==H&&"select"!==H?_.plot=!0:l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,I.set(D))}}for(r in m)w.applyContainerArrayChanges(t,p(i,r),m[r],_,p)||(_.plot=!0);var ut=l._axisConstraintGroups||[];for(C in L)for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=a.length?a[0]:a[t]:a}function l(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return(void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){function f(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,p.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function h(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&f()};e()}var d,g,v=0;function m(t){return Array.isArray(a)?v>=a.length?t.transitionOpts=a[v]:t.transitionOpts=a[0]:t.transitionOpts=a,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(x||b||!o.isPlainObject(e)){if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&TT)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var a=0;a=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&"number"==typeof m&&y&&E<5&&(E++,o.warn('addFrames: overwriting frame "'+(u[v]||d[v]).name+'" with a frame whose name of type "number" also equates to "'+v+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===E&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[g]={name:g},h.push({frame:p.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}h.sort((function(t,e){return t.index>e.index?-1:t.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(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(i=0;i=0;r--)n=e[r],i.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:a[n]});var l=p.modifyFrames,u=p.modifyFrames,f=[t,s],h=[t,i];return c&&c.add(t,l,f,u,h),p.modifyFrames(t,i)},r.addTraces=function t(e,n,a){e=o.getGraphDiv(e);var i,s,l=[],u=r.deleteTraces,f=t,p=[e,l],h=[e,n];for(function(t,e,r){var n,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=i[a][o]}else t=i[a]}else t=i}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in d(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var a=0;a=l.length)return!1;a=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if("area"===t.type)a=u[o];else{var f=t._module;if(f||(f=(n.modules[t.type||i.type.dflt]||{})._module),!f)return!1;if(!(a=(r=f.attributes)&&r[o])){var p=f.basePlotModule;p&&p.attributes&&(a=p.attributes[o])}a||(a=i[o])}return b(a,e,s)},r.getLayoutValObject=function(t,e){return b(function(t,e){var r,a,i,s,l=t._basePlotModules;if(l){var c;for(r=0;r=a&&(r._input||{})._templateitemname;o&&(i=a);var s,l=e+"["+i+"]";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+"."+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var a=f();for(var i in a)n.nestedProperty(t,i).set(a[i])}}}},{"../lib":717,"../plots/attributes":762}],756:[function(t,e,r){"use strict";var n=t("d3"),a=t("../registry"),i=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),f=t("../components/modebar"),p=t("../plots/cartesian/axes"),h=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),g=d.enforce,v=d.clean,m=t("../plots/cartesian/autorange").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||a[1]<=t[0])&&i[0]e[0])return!0}return!1}function x(t){var e,a,s,u,d,g,v=t._fullLayout,m=v._size,x=m.p,_=p.list(t,"",!0);if(v._paperdiv.style({width:t._context.responsive&&v.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":v.width+"px",height:t._context.responsive&&v.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":v.height+"px"}).selectAll(".main-svg").call(c.setSize,v.width,v.height),t._context.setBackground(t,v.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!v._has("cartesian"))return i.previousPromises(t);function k(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-x-n:e._offset+e._length+x+n:m.t+m.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+x+n:e._offset-x-n:m.l+m.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var T=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=k(u,T,u.side),u._mainMirrorPosition=u.mirror&&T?k(u,T,h.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],E=[],S=1===l.opacity(v.paper_bgcolor)&&1===l.opacity(v.plot_bgcolor)&&v.paper_bgcolor===v.plot_bgcolor;for(a in v._plots)if((s=v._plots[a]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var C=s.xaxis.domain,L=s.yaxis.domain,O=s.plotgroup;if(y(C,L,E)){var P=O.node(),I=s.bg=o.ensureSingle(O,"rect","bg");P.insertBefore(I.node(),P.childNodes[0]),M.push(a)}else O.select("rect.bg").remove(),E.push([C,L]),S||(A.push(a),M.push(a))}var D,z,R,F,B,N,j,V,U,q,H,G,W,Y=v._bgLayer.selectAll(".bg").data(A);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each((function(t){v._plots[t].bg=n.select(this)})),e=0;ek?u.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var i=e[n],o=g(e,n,r);a(i)?(Array.isArray(e)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),t(i,o)):Array.isArray(i)&&v(i)&&t(i,o)}}({data:h,layout:p},""),u.length)return u.map(m)}},{"../lib":717,"../plots/attributes":762,"../plots/plots":826,"./plot_config":753,"./plot_schema":754,"./plot_template":755}],758:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./plot_api"),i=t("../lib"),o=t("../snapshot/helpers"),s=t("../snapshot/tosvg"),l=t("../snapshot/svgtoimg"),c={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}};e.exports=function(t,e){var r,u,f,p;function h(t){return!(t in e)||i.validate(e[t],c[t])}if(e=e||{},i.isPlainObject(t)?(r=t.data||[],u=t.layout||{},f=t.config||{},p={}):(t=i.getGraphDiv(t),r=i.extendDeep([],t.data),u=i.extendDeep({},t.layout),f=t._context,p=t._fullLayout||{}),!h("width")&&null!==e.width||!h("height")&&null!==e.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 d={};function g(t,r){return i.coerce(e,d,c,t,r)}var v=g("format"),m=g("width"),y=g("height"),x=g("scale"),b=g("setBackground"),_=g("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=i.extendFlat({},u);m?k.width=m:null===e.width&&n(p.width)&&(k.width=p.width),y?k.height=y:null===e.height&&n(p.height)&&(k.height=p.height);var T=i.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),A=o.getRedrawFunc(w);function M(){return new Promise((function(t){setTimeout(t,o.getDelay(w._fullLayout))}))}function E(){return new Promise((function(t,e){var r=s(w,v,x),n=w._fullLayout.width,c=w._fullLayout.height;if(a.purge(w),document.body.removeChild(w),"svg"===v)return t(_?r:o.encodeSVG(r));var u=document.createElement("canvas");u.id=i.randstr(),l({format:v,width:n,height:c,scale:x,canvas:u,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){a.plot(w,r,k,T).then(A).then(M).then(E).then((function(e){t(function(t){return _?t.replace(o.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},{"../lib":717,"../snapshot/helpers":850,"../snapshot/svgtoimg":852,"../snapshot/tosvg":854,"./plot_api":752,"fast-isnumeric":228}],759:[function(t,e,r){"use strict";var n=t("../lib"),a=t("../plots/plots"),i=t("./plot_schema"),o=t("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,a,i,o){o=o||[];for(var f=Object.keys(t),p=0;px.length&&a.push(d("unused",i,m.concat(x.length)));var A,M,E,S,C,L=x.length,O=Array.isArray(T);if(O&&(L=Math.min(L,T.length)),2===b.dimensions)for(M=0;Mx[M].length&&a.push(d("unused",i,m.concat(M,x[M].length)));var P=x[M].length;for(A=0;A<(O?Math.min(P,T[M].length):P);A++)E=O?T[M][A]:T,S=y[M][A],C=x[M][A],n.validate(S,E)?C!==S&&C!==+S&&a.push(d("dynamic",i,m.concat(M,A),S,C)):a.push(d("value",i,m.concat(M,A),S))}else a.push(d("array",i,m.concat(M),y[M]));else for(M=0;M1&&h.push(d("object","layout"))),a.supplyDefaults(g);for(var v=g._fullData,m=r.length,y=0;y0&&((b=A-o(v)-o(m))>M?_/b>E&&(y=v,x=m,E=_/b):_/A>E&&(y={val:v.val,pad:0},x={val:m.val,pad:0},E=_/A));if(p===h){var S=p-1,C=p+1;if(k)if(0===p)i=[0,1];else{var L=(p>0?f:u).reduce((function(t,e){return Math.max(t,o(e))}),0),O=p/(1-Math.min(.5,L/A));i=p>0?[0,O]:[O,0]}else i=T?[Math.max(0,S),Math.max(1,C)]:[S,C]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):T&&(y.val-E*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),E=(x.val-y.val)/(A-o(y)-o(x)),i=[y.val-E*o(y),x.val+E*o(x)];return d&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function l(t){var e=t._length/20;return"domain"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function c(t,e){var r,n,a,i=e._id,o=t._fullData,s=t._fullLayout,l=[],c=[];function p(t,e){for(r=0;r=r&&(c.extrapad||!o)){s=!1;break}a(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=i&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function h(t){return n(t)&&Math.abs(t)=e}e.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(t,e){if(e.setScale(),e.autorange){e.range=s(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var r=e._input,n={};n[e._attr+".range"]=e.range,n[e._attr+".autorange"]=e.autorange,o.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,n),r.range=e.range.slice(),r.autorange=e.autorange}var i=e._anchorAxis;if(i&&i.rangeslider){var l=i.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=s(t,e)),i._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t._m||t.setScale();var a,o,s,l,c,p,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,k=!1,T=r.vpadLinearized||!1;function A(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var M=A((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),E=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=A(r.vpadplus||r.vpad),C=A(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(a=0;a0&&(g=o),o>v&&o-i&&(g=o),o>v&&o=P;a--)O(a);return{min:m,max:y,opts:r}},concatExtremes:c}},{"../../constants/numerical":693,"../../lib":717,"../../registry":846,"fast-isnumeric":228}],765:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../components/titles"),u=t("../../components/color"),f=t("../../components/drawing"),p=t("./layout_attributes"),h=t("./clean_ticks"),d=t("../../constants/numerical"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t("../../constants/alignment"),T=k.MID_SHIFT,A=k.CAP_SHIFT,M=k.LINE_SPACING,E=k.OPPOSITE_SIDE,S=e.exports={};S.setConvert=t("./set_convert");var C=t("./axis_autotype"),L=t("./axis_ids");S.id2name=L.id2name,S.name2id=L.name2id,S.cleanId=L.cleanId,S.list=L.list,S.listIds=L.listIds,S.getFromId=L.getFromId,S.getFromTrace=L.getFromTrace;var O=t("./autorange");S.getAutoRange=O.getAutoRange,S.findExtremes=O.findExtremes,S.coerceRef=function(t,e,r,n,a,i){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=l[0]||i),i||(i=a),u[c]={valType:"enumerated",values:l.concat(i?[i]:[]),dflt:a},s.coerce(t,e,u,c)},S.coercePosition=function(t,e,r,n,a,i){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(a,i);else{var c=S.getFromId(e,n);l=r(a,i=c.fraction2r(i)),o=c.cleanPos}t[a]=o(l)},S.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:S.getFromId(e,r).cleanPos)(t)},S.redrawComponents=function(t,e){e=e||S.listIds(t);var r=t._fullLayout;function n(n,a,i,s){for(var l=o.getComponentMethod(n,a),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},S.saveRangeInitial=function(t,e){for(var r=S.list(t,"",!0),n=!1,a=0;a.3*p||u(n)||u(i))){var h=r.dtick/2;t+=t+h.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?t=S.tickIncrement(t,"M6","reverse")+1.5*m:i.exactMonths>.8?t=S.tickIncrement(t,"M1","reverse")+15.5*m:t-=m/2;var l=S.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,i)),v=x;v<=u;)v=S.tickIncrement(v,y,!1,i);return{start:e.c2r(x,0,i),end:e.c2r(v,0,i),size:y,_dataSpan:u-c}},S.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type||"multicategory"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),"radialaxis"===t._name&&(n*=2)),"array"===t.tickmode&&(n*=100),S.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),q(t)},S.calcTicks=function(t){S.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if("array"===t.tickmode)return function(t){var e=t.tickvals,r=t.ticktext,n=new Array(e.length),a=s.simpleMap(t.range,t.r2l),i=1.0001*a[0]-1e-4*a[1],o=1.0001*a[1]-1e-4*a[0],l=Math.min(i,o),c=Math.max(i,o),u=0;Array.isArray(r)||(r=[]);var f="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var p=0;pl&&h=n:f<=n)&&!(o.length>u||f===c);f=S.tickIncrement(f,t.dtick,i,t.calendar)){c=f;var p=!1;l&&f!==(0|f)&&(p=!0),o.push({minor:p,value:f})}ot(t)&&360===Math.abs(e[1]-e[0])&&o.pop(),t._tmax=(o[o.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;for(var h=new Array(o.length),d=0;d10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=m&&i<=10||e>=15*m)t._tickround="d";else if(e>=x&&i<=16||e>=y)t._tickround="M";else if(e>=b&&i<=19||e>=x)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,o)-20,t._tickround<0&&(t._tickround=4)}}else if(a(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);a(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(W(t.exponentformat)&&!Y(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function H(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}S.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar);var i=2*e;i>g?(e/=g,r=n(10),t.dtick="M"+12*U(e,r,z)):i>v?(e/=v,t.dtick="M"+U(e,1,R)):i>m?(t.dtick=U(e,m,B),t.tick0=s.dateTick0(t.calendar,!0)):i>y?t.dtick=U(e,y,R):i>x?t.dtick=U(e,x,F):i>b?t.dtick=U(e,b,F):(r=n(10),t.dtick=U(e,r,z))}else if("log"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick="L"+U(e,r,z)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):ot(t)?(t.tick0=0,r=1,t.dtick=U(e,r,V)):(t.tick0=0,r=n(10),t.dtick=U(e,r,z));if(0===t.dtick&&(t.dtick=1),!a(t.dtick)&&"string"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}},S.tickIncrement=function(t,e,r,i){var o=r?-1:1;if(a(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,i);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?j:N,f=t+.01*o,p=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,p),1))/Math.LN10}throw"unrecognized dtick "+String(e)},S.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),i=r[1]"+l,t._prevDateHead=l)),e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,i){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)e.text=X(Math.pow(10,l),t,i,n);else if(a(o)||"D"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),p=Math.abs(f),h=t.exponentformat;"power"===h||W(h)&&Y(f)?(e.text=0===f?1:1===f?"10":"10"+(f>1?"":_)+p+"",e.fontSize*=1.25):("e"===h||"E"===h)&&p>2?e.text="1"+h+(f>0?"+":_)+p:(e.text=X(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,g):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),a=t._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?e.text=o+" - "+i:(e.text=i,e.text2=o)}(t,o,r):ot(t)?function(t,e,r,n,a){if("radians"!==t.thetaunit||r)e.text=X(e.x,t,a,n);else{var i=e.x/180;if(0===i)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,a=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)e.text=X(s.deg2rad(e.x),t,a,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["",o[0],"","⁄","",o[1],"","π"].join(""),l&&(e.text=_+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,a){"never"===a?a="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide"),e.text=X(e.x,t,a,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),"boundaries"===t.tickson||t.showdividers){var v=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[v(o.x-.5),v(o.x+t.dtick-.5)]}return o},S.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return S.hoverLabelText(t,e)+" - "+S.hoverLabelText(t,r);var n="log"===t.type&&e<=0,a=S.tickText(t,t.c2l(n?-e:e),"hover").text;return n?0===e?"0":_+a:a};var G=["f","p","n","μ","m","","k","M","G","T"];function W(t){return"SI"===t||"B"===t}function Y(t){return t>14||t<-15}function X(t,e,r,n){var i=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=S.getTickFormat(e),f=e.separatethousands;if(n){var p={exponentformat:l,dtick:"none"===e.showexponent?e.dtick:a(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};q(p),o=(Number(p._tickround)||0)+4,c=p._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var h,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+h+"":"B"===l&&9===c?t+="B":W(l)&&(t+=G[c/3+5])),i?_+t:t}function Z(t,e){for(var r=[],n={},a=0;a1&&r=0,i=u(t,e[1])<=0;return(r||a)&&(n||i)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(a)))){r=n;break}break;case"log":for(e=0;e0?r.bottom-u:0,f)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var h=[0,1];if("x"===d){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?u-r.top:0,f),h.reverse()),r.width>0){var v=r.right-(e._offset+e._length);v>0&&(n.xr=1,n.r=v);var m=e._offset-r.left;m>0&&(n.xl=0,n.l=m)}}else if("l"===l?n[l]=e._depth=Math.max(r.height>0?u-r.left:0,f):(n[l]=e._depth=Math.max(r.height>0?r.right-u:0,f),h.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]="free"===e.anchor?e.position:e._anchorAxis.domain[h[0]],e.title.text!==p._dfltTitle[d]&&(n[l]+=K(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(a[c]+=f),!0===e.mirror||"ticks"===e.mirror?a[g]=e._anchorAxis.domain[h[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(a[g]=[e._counterDomainMin,e._counterDomainMax][h[1]]))}X&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),i.autoMargin(t,tt(e),n),i.autoMargin(t,et(e),a),i.autoMargin(t,rt(e),s)})),r.skipTitle||X&&"bottom"===e.side||W.push((function(){return function(t,e){var r,n=t._fullLayout,a=e._id,i=a.charAt(0),o=e.title.font.size;e.title.hasOwnProperty("standoff")?r=e._depth+e.title.standoff+K(e):(r="multicategory"===e.type?e._depth:10+1.5*o+(e.linewidth?e.linewidth-1:0),r+="x"===i?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0));var s,l,u,p,h=S.getPxPosition(t,e);if("x"===i?(l=e._offset+e._length/2,u="top"===e.side?h-r:h+r):(u=e._offset+e._length/2,l="right"===e.side?h+r:h-r,s={rotate:"-90",offset:0}),"multicategory"!==e.type){var d=e._selections[e._id+"tick"];if(p={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var g=f.getTranslate(d.node().parentNode);p.offsetLeft=g.x,p.offsetTop=g.y}e.title.hasOwnProperty("standoff")&&(p.pad=0)}return c.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[i],avoid:p,transform:s,attributes:{x:l,y:u,"text-anchor":"middle"}})}(t,e)})),s.syncOrAsync(W)}}function $(t){var r=h+(t||"tick");return w[r]||(w[r]=function(t,e){var r,n,a,i;return t._selections[e].size()?(r=1/0,n=-1/0,a=1/0,i=-1/0,t._selections[e].each((function(){var t=Q(this),e=f.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),a=Math.min(a,e.left),i=Math.max(i,e.right)}))):(r=0,n=0,a=0,i=0),{top:r,bottom:n,left:a,right:i,height:n-r,width:i-a}}(e,r)),w[r]}},S.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],n=t.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==t.ticks==("x"===e)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},S.makeTransFn=function(t){var e=t._id.charAt(0),r=t._offset;return"x"===e?function(e){return"translate("+(r+t.l2p(e.x))+",0)"}:function(e){return"translate(0,"+(r+t.l2p(e.x))+")"}},S.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var a=t._id.charAt(0),i=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+i*r)+"v"+n*r:"M"+(e+i*r)+",0h"+n*r},S.makeLabelFns=function(t,e,r){var n=t._id.charAt(0),i="boundaries"!==t.tickson&&"outside"===t.ticks,o=0,l=0;if(i&&(o+=t.ticklen),r&&"outside"===t.ticks){var c=s.deg2rad(r);o=t.ticklen*Math.cos(c)+1,l=t.ticklen*Math.sin(c)}t.showticklabels&&(i||t.showline)&&(o+=.2*t.tickfont.size);var u,f,p,h,d={labelStandoff:o+=(t.linewidth||1)/2,labelShift:l};return"x"===n?(h="bottom"===t.side?1:-1,u=l*h,f=e+o*h,p="bottom"===t.side?1:-.2,d.xFn=function(t){return t.dx+u},d.yFn=function(t){return t.dy+f+t.fontSize*p},d.anchorFn=function(t,e){return a(e)&&0!==e&&180!==e?e*h<0?"end":"start":"middle"},d.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side?-n:0}):"y"===n&&(h="right"===t.side?1:-1,u=o,f=-l*h,p=90===Math.abs(t.tickangle)?.5:0,d.xFn=function(t){return t.dx+e+(u+t.fontSize*p)*h},d.yFn=function(t){return t.dy+f+t.fontSize*T},d.anchorFn=function(e,r){return a(r)&&90===Math.abs(r)?"middle":"right"===t.side?"start":"end"},d.heightFn=function(e,r,n){return(r*="left"===t.side?1:-1)<-30?-n:r<30?-.5*n:0}),d},S.drawTicks=function(t,e,r){r=r||{};var n=e._id+"tick",a=r.layer.selectAll("path."+n).data(e.ticks?r.vals:[],J);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(u.stroke,e.tickcolor).style("stroke-width",f.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path),a.attr("transform",r.transFn)},S.drawGrid=function(t,e,r){r=r||{};var n=e._id+"grid",a=r.vals,i=r.counterAxis;if(!1===e.showgrid)a=[];else if(i&&S.shouldShowZeroLine(t,e,i))for(var o="array"===e.tickmode,s=0;s1)for(n=1;n2*o}(t,e)?"date":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s2*r}(t)?"category":function(t){if(!t)return!1;for(var e=0;en?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n0;o&&(a="array");var s,l=r("categoryorder",a);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=e.categoryorder="trace"),"trace"===l?e._initialCategories=[]:"array"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,a,i=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nl*x)||k)for(r=0;rI&&RO&&(O=R);h/=(O-L)/(2*P),L=c.l2r(L),O=c.l2r(O),c.range=c._input.range=E=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function D(t,e,r,n,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function z(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function R(t,e,r,n,a,i){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),F(t,e,a,i)}function F(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function B(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function N(t){E&&t.data&&t._context.showTips&&(s.notifier(s._(t,"Double-click to zoom back out"),"long"),E=!1)}function j(t){return"lasso"===t||"select"===t}function V(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,M)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function U(t,e,r,n){for(var a,i,o,l,c=!1,u={},f={},p=0;p-1&&w(a,t,X,Z,e.id,Et),i.indexOf("event")>-1&&f.click(t,a,e.id);else if(1===r&&ht){var s=E?G:F,c="s"===E||"w"===S?0:1,u=s._name+".range["+c+"]",p=function(t,e){var r,a=t.range[e],i=Math.abs(a-t.range[1-e]);return"date"===t.type?a:"log"===t.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,c),h="left",d="middle";if(s.fixedrange)return;E?(d="n"===E?"top":"bottom","right"===s.side&&(h="right")):"e"===S&&(h="right"),t._context.showAxisRangeEntryBoxes&&n.select(vt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(p),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:h,verticalAlign:d}).on("edit",(function(e){var r=s.d2r(e);void 0!==r&&o.call("_guiRelayout",t,u,r)}))}}function Lt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,e+mt)),a=Math.max(0,Math.min(Q,r+yt)),i=Math.abs(n-mt),o=Math.abs(a-yt);function s(){kt="",xt.r=xt.l,xt.t=xt.b,At.attr("d","M0,0Z")}if(xt.l=Math.min(mt,n),xt.r=Math.max(mt,n),xt.t=Math.min(yt,a),xt.b=Math.max(yt,a),tt.isSubplotConstrained)i>M||o>M?(kt="xy",i/$>o/Q?(o=i*Q/$,yt>a?xt.t=yt-o:xt.b=yt+o):(i=o*$/Q,mt>n?xt.l=mt-i:xt.r=mt+i),At.attr("d",V(xt))):s();else if(et.isSubplotConstrained)if(i>M||o>M){kt="xy";var l=Math.min(xt.l/$,(Q-xt.b)/Q),c=Math.max(xt.r/$,(Q-xt.t)/Q);xt.l=l*$,xt.r=c*$,xt.b=(1-l)*Q,xt.t=(1-c)*Q,At.attr("d",V(xt))}else s();else!nt||og[1]-1/4096&&(e.domain=s),a.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":717,"fast-isnumeric":228}],781:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*r;t.range=t._input.range=[t.l2r(i+(a[0]-i)*e),t.l2r(i+(a[1]-i)*e)]}},{"../../constants/alignment":686}],782:[function(t,e,r){"use strict";var n=t("polybooljs"),a=t("../../registry"),i=t("../../components/color"),o=t("../../components/fx"),s=t("../../lib"),l=t("../../lib/polygon"),c=t("../../lib/throttle"),u=t("../../components/fx/helpers").makeEventData,f=t("./axis_ids").getFromId,p=t("../../lib/clear_gl_canvases"),h=t("../../plot_api/subroutines").redrawReglTraces,d=t("./constants"),g=d.MINSELECT,v=l.filter,m=l.tester;function y(t){return t._id}function x(t,e,r,n,a,i,o){var s,l,c,u,f,p,h,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf("event")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){k(t,e,i);var x=function(t,e){var r,n,a=t[0],i=-1,o=[];for(n=0;n0?function(t,e){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(a=0;a1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(s)&&(p=E(x))){for(o&&o.remove(),g=0;g0?"M"+a.join("M")+"Z":"M0,0Z",e.attr("d",n)}function E(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,a=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(a)>-1}function S(t,e,r){var n,i,o,s;for(n=0;n-1&&x(e,E,a.xaxes,a.yaxes,a.subplot,a,G),"event"===r&&E.emit("plotly_selected",void 0);o.click(E,e)})).catch(s.error)},a.doneFn=function(){Y.remove(),c.done(X).then((function(){c.clear(X),a.gd.emit("plotly_selected",_),h&&a.selectionDefs&&(h.subtract=H,a.selectionDefs.push(h),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,p)),a.doneFnCompleted&&a.doneFnCompleted(Z)})).catch(s.error)}},clearSelect:L,selectOnClick:x}},{"../../components/color":592,"../../components/fx":630,"../../components/fx/helpers":627,"../../lib":717,"../../lib/clear_gl_canvases":702,"../../lib/polygon":729,"../../lib/throttle":742,"../../plot_api/subroutines":756,"../../registry":846,"./axis_ids":768,"./constants":771,polybooljs:475}],783:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../lib"),o=i.cleanNumber,s=i.ms2DateTime,l=i.dateTime2ms,c=i.ensureNumber,u=i.isArrayOrTypedArray,f=t("../../constants/numerical"),p=f.FP_SAFE,h=f.BADNUM,d=f.LOG_CLIP,g=t("./constants"),v=t("./axis_ids");function m(t){return Math.pow(10,t)}function y(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",f=r.charAt(0);function x(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],a=t.range[1];return.5*(n+a-2*d*Math.abs(n-a))}return h}function b(e,r,n){var o=l(e,n||t.calendar);if(o===h){if(!a(e))return h;e=+e;var s=Math.floor(10*i.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function _(e,r,n){return s(e,r,n||t.calendar)}function w(e){return t._categories[Math.round(e)]}function k(e){if(y(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return h}function T(e){if(t._categoriesMap)return t._categoriesMap[e]}function A(t){var e=T(t);return void 0!==e?e:a(t)?+t:void 0}function M(e){return a(e)?n.round(t._b+t._m*e,2):h}function E(e){return(e-t._b)/t._m}t.c2l="log"===t.type?x:c,t.l2c="log"===t.type?m:c,t.l2p=M,t.p2l=E,t.c2p="log"===t.type?function(t,e){return M(x(t,e))}:M,t.p2c="log"===t.type?function(t){return m(E(t))}:E,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=E,t.cleanPos=c):"log"===t.type?(t.d2r=t.d2l=function(t,e){return x(o(t),e)},t.r2d=t.r2c=function(t){return m(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=x,t.l2d=m,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return m(E(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=E,t.cleanPos=c):"date"===t.type?(t.d2r=t.r2d=i.identity,t.d2c=t.r2c=t.d2l=t.r2l=b,t.c2d=t.c2r=t.l2d=t.l2r=_,t.d2p=t.r2p=function(e,r,n){return t.l2p(b(e,0,n))},t.p2d=t.p2r=function(t,e,r){return _(E(t),e,r)},t.cleanPos=function(e){return i.cleanDate(e,h,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=k,t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(E(t))},t.r2p=t.d2p,t.p2r=E,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:c(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=T,t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(E(t))},t.r2p=t.d2p,t.p2r=E,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:c(t)},t.setupMultiCategory=function(n){var a,o,s=t._traceIndices,l=e._axisMatchGroups;if(l&&l.length&&0===t._categories.length)for(a=0;ap&&(s[n]=p),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else i.nestedProperty(t,e).set(o)},t.setScale=function(r){var n=e._size;if(t.overlaying){var a=v.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var i=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(i);var s=t.r2l(t[i][0],o),l=t.r2l(t[i][1],o);if("y"===f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.makeCalcdata=function(e,r){var n,a,o,s,l=t.type,c="date"===l&&e[r+"calendar"];if(r in e){if(n=e[r],s=e._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(t,e){for(var r=new Array(e),n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function v(e,r){var n=e.plotinfo,a=n.xaxis,l=n.yaxis,c=a._length,u=l._length,f=!!e.xr1,p=!!e.yr1,h=[];if(f){var d=i.simpleMap(e.xr0,a.r2l),g=i.simpleMap(e.xr1,a.r2l),v=d[1]-d[0],m=g[1]-g[0];h[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,h[2]=c*(1-r+r*m/v),a.range[0]=a.l2r(d[0]*(1-r)+r*g[0]),a.range[1]=a.l2r(d[1]*(1-r)+r*g[1])}else h[0]=0,h[2]=c;if(p){var y=i.simpleMap(e.yr0,l.r2l),x=i.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];h[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*_/b),l.range[0]=a.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=u;s.drawOne(t,a,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[a._id,l._id]);var w=f?c/h[2]:1,k=p?u/h[3]:1,T=f?h[0]:0,A=p?h[1]:0,M=f?h[0]/h[2]*c:0,E=p?h[1]/h[3]*u:0,S=a._offset-M,C=l._offset-E;n.clipRect.call(o.setTranslate,T,A).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,S,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(t)}},{"../../components/drawing":613,"../../lib":717,"../../registry":846,"./axes":765,d3:165}],788:[function(t,e,r){"use strict";var n=t("../../registry").traceIs,a=t("./axis_autotype");function i(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=i(t),a=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return a&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}e.exports=function(t,e,r,s){"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[e])return a;if((a[r+"axis"]||r)===e){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var u=l+"calendar",f=c[u],p={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(p.noMultiCategory=!0),o(c,l)){var h=i(c),d=[];for(r=0;r0?".":"")+i;a.isPlainObject(o)?l(o,e,s,n+1):e(s,i,o)}}))}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){i(t,c,s.cache),s.check=function(){if(l){var e=i(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0&&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]]]}}e.exports=function(t){return new b(t)},_.plot=function(t,e,r){var n=this,a=e[this.id],i=[],o=!1;for(var s in v.layerNameToAdjective)if("frame"!==s&&a["show"+s]){o=!0;break}for(var l=0;l0&&i._module.calcGeoJSON(a,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),c.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=o.selectAll(".point"),this.dataPoints.text=o.selectAll("text"),this.dataPaths.line=o.selectAll(".js-line");var s=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=s.selectAll("path"),this.render()}},_.updateProjection=function(t,e){var r=this.graphDiv,o=e[this.id],s=e._size,l=o.domain,c=o.projection,u=o.lonaxis,p=o.lataxis,h=u._ax,d=p._ax,g=this.projection=function(t){for(var e=t.projection.type,r=n.geo[v.projNames[e]](),a=t._isClipped?v.lonaxisSpan[e]/2:null,i=["center","rotate","parallels","clipExtent"],o=function(t){return t?r:[]},s=0;sa*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],a=t[1][1]-t[0][1],i=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),i&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),a/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(a-s*(o[1][1]+o[0][1]))/2;return i&&r.clipExtent(i),r.scale(150*s).translate([l,c])},r.precision(v.precision),a&&r.clipAngle(a-v.clipPad),r}(o),m=[[s.l+s.w*l.x[0],s.t+s.h*(1-l.y[1])],[s.l+s.w*l.x[1],s.t+s.h*(1-l.y[0])]],y=o.center||{},x=c.rotation||{},b=u.range||[],_=p.range||[];if(o.fitbounds){h._length=m[1][0]-m[0][0],d._length=m[1][1]-m[0][1],h.range=f(r,h),d.range=f(r,d);var k=(h.range[0]+h.range[1])/2,T=(d.range[0]+d.range[1])/2;if(o._isScoped)y={lon:k,lat:T};else if(o._isClipped){y={lon:k,lat:T},x={lon:k,lat:T,roll:x.roll};var A=c.type,M=v.lonaxisSpan[A]/2||180,E=v.lataxisSpan[A]/2||180;b=[k-M,k+M],_=[T-E,T+E]}else y={lon:k,lat:T},x={lon:k,lat:x.lat,roll:x.roll}}g.center([y.lon-x.lon,y.lat-x.lat]).rotate([-x.lon,-x.lat,x.roll]).parallels(c.parallels);var S=w(b,_);g.fitExtent(m,S);var C=this.bounds=g.getBounds(S),L=this.fitScale=g.scale(),O=g.translate();if(!isFinite(C[0][0])||!isFinite(C[0][1])||!isFinite(C[1][0])||!isFinite(C[1][1])||isNaN(O[0])||isNaN(O[0])){for(var P=["fitbounds","projection.rotation","center","lonaxis.range","lataxis.range"],I="Invalid geo settings, relayout'ing to default view.",D={},z=0;z-1&&d(n.event,i,[r.xaxis],[r.yaxis],r.id,f),c.indexOf("event")>-1&&l.click(i,n.event))}))}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},_.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,a="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",a),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(s.setClipUrl,a,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(t.mockAxis,r)},_.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,a=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":a.lon,"projection.rotation.lat":a.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":a.lon},i.extendFlat(this.viewInitial,e)},_.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function a(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",a).attr("transform",n)}},{"../../components/color":592,"../../components/dragelement":610,"../../components/drawing":613,"../../components/fx":630,"../../lib":717,"../../lib/geo_location_utils":711,"../../lib/topojson_utils":744,"../../registry":846,"../cartesian/autorange":764,"../cartesian/axes":765,"../cartesian/select":782,"../plots":826,"./constants":793,"./projections":798,"./zoom":799,d3:165,"topojson-client":539}],795:[function(t,e,r){"use strict";var n=t("../../plots/get_data").getSubplotCalcData,a=t("../../lib").counterRegex,i=t("./geo"),o="geo",s=a(o),l={};l.geo={valType:"subplotid",dflt:o,editType:"calc"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t("./layout_attributes"),supplyLayoutDefaults:t("./layout_defaults"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,a=e._subplots.geo,s=0;s0&&L<0&&(L+=360);var O,P,I,D=(C+L)/2;if(!h){var z=d?f.projRotate:[D,0,0];O=r("projection.rotation.lon",z[0]),r("projection.rotation.lat",z[1]),r("projection.rotation.roll",z[2]),r("showcoastlines",!d&&y)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!y&&void 0)&&r("oceancolor")}h?(P=-96.6,I=38.7):(P=d?D:O,I=(S[0]+S[1])/2),r("center.lon",P),r("center.lat",I),g&&r("projection.parallels",f.projParallels||[0,60]),r("projection.scale"),r("showland",!!y&&void 0)&&r("landcolor"),r("showlakes",!!y&&void 0)&&r("lakecolor"),r("showrivers",!!y&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==u&&y)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",y),r("subunitcolor"),r("subunitwidth")),d||r("showframe",y)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){a(t,e,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},{"../../lib":717,"../get_data":800,"../subplot_defaults":840,"./constants":793,"./layout_attributes":796}],798:[function(t,e,r){"use strict";e.exports=function(t){function e(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if("GeometryCollection"===e.type)return{type:"GeometryCollection",geometries:object.geometries.map((function(t){return r(t,n)}))};if(!c.hasOwnProperty(e.type))return null;var a=c[e.type];return t.geo.stream(e,n(a)),a.result()}t.geo.project=function(t,e){var a=e.stream;if(!a)throw new Error("not yet supported");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,a)};var n={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map((function(t){return e(t,r)}))}}},a=[],i=[],o={point:function(t,e){a.push([t,e])},result:function(){var t=a.length?a.length<2?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a}:null;return a=[],t}},s={lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){a.length&&(i.push(a),a=[])},result:function(){var t=i.length?i.length<2?{type:"LineString",coordinates:i[0]}:{type:"MultiLineString",coordinates:i}:null;return i=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){var t=a.length;if(t){do{a.push(a[0].slice())}while(++t<4);i.push(a),a=[]}},polygonEnd:u,result:function(){if(!i.length)return null;var t=[],e=[];return i.forEach((function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++rn^h>n&&r<(p-c)*(n-u)/(h-u)+c&&(a=!a)}return a}(t[0],r))return t.push(e),!0}))||t.push([e])})),i=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var f=1e-6,p=Math.PI,h=p/2,d=(Math.sqrt(p),p/180),g=180/p;function v(t){return t>1?h:t<-1?-h:Math.asin(t)}function m(t){return t>1?0:t<-1?p:Math.acos(t)}var y=t.geo.projection,x=t.geo.projectionMutator;function b(t,e){var r=(2+h)*Math.sin(e);e/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>f;n++){var i=Math.cos(e);e-=a=(e+Math.sin(e)*(i+2)-r)/(2*i*(1+i))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,h],[p,0]]],[[[-p,0],[0,-h],[p,0]]]];function a(t,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=e(t-i[o][1][0],r);return l[0]+=e(i[o][1][0],a*r>a*i[o][0][1]?i[o][0][1]:r)[0],l}function i(){r=n.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],a=e(t[2][0],t[2][1])[0],i=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return i>o&&(r=i,i=o,o=r),[[n,i],[a,o]]}))}))}e.invert&&(a.invert=function(t,i){for(var o=r[+(i<0)],s=n[+(i<0)],l=0,u=o.length;l=0;--a){var h;o=180*(h=n[1][a])[0][0]/p,s=180*h[0][1]/p,c=180*h[1][1]/p,u=180*h[2][0]/p,f=180*h[2][1]/p,r.push(l([[u-e,f-e],[u-e,c+e],[o+e,c+e],[o+e,s-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}(),i)},a},o.lobes=function(t){return arguments.length?(n=t.map((function(t){return t.map((function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]}))})),i(),o):n.map((function(t){return t.map((function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]}))}))},o},b.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=v(r),a=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+a)),v((n+r*(a+2))/(2+h))]},(t.geo.eckert4=function(){return y(b)}).raw=b;var _=t.geo.azimuthalEqualArea.raw;function w(t,e){if(arguments.length<2&&(e=t),1===e)return _;if(e===1/0)return k;function r(r,n){var a=_(r/e,n);return a[0]*=t,a}return r.invert=function(r,n){var a=_.invert(r/t,n);return a[0]*=e,a},r}function k(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function T(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function A(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function M(t){return function(e){var r,n=t*Math.sin(e),a=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>f&&--a>0);return e/2}}k.invert=function(t,e){var r=2*v(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=x(w),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=w,T.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return y(T)}).raw=T,A.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return y(A)}).raw=A,M(p);var E=function(t,e,r){var n=M(r);function a(r,a){return[t*r*Math.cos(a=n(a)),e*Math.sin(a)]}return a.invert=function(n,a){var i=v(a/e);return[n/(t*Math.cos(i)),v((2*i+Math.sin(2*i))/r)]},a}(Math.SQRT2/h,Math.SQRT2,p);function S(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return y(E)}).raw=E,S.invert=function(t,e){var r,n=e,a=25;do{var i=n*n,o=i*i;n-=r=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-e)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(Math.abs(r)>f&&--a>0);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return y(S)}).raw=S;var C=[[.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 L(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),a=Math.floor(n),i=n-a,o=(r=C[a])[0],s=r[1],l=(r=C[++a])[0],c=r[1],u=(r=C[Math.min(19,++a)])[0],f=r[1];return[t*(l+i*(u-o)/2+i*i*(u-2*l+o)/2),(e>0?h:-h)*(c+i*(f-s)/2+i*i*(f-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function P(t,e){var r,n=Math.cos(e),a=(r=m(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*a,Math.sin(e)*a]}function I(t,e){var r=P(t,e);return[(r[0]+t/h)/2,(r[1]+e)/2]}C.forEach((function(t){t[1]*=1.0144})),L.invert=function(t,e){var r=e/h,n=90*r,a=Math.min(18,Math.abs(n/5)),i=Math.max(0,Math.floor(a));do{var o=C[i][1],s=C[i+1][1],l=C[Math.min(19,i+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,p=u/c,v=f*(1-p*f*(1-2*p*f));if(v>=0||1===i){n=(e>=0?5:-5)*(v+a);var m,y=50;do{v=(a=Math.min(18,Math.abs(n)/5))-(i=Math.floor(a)),o=C[i][1],s=C[i+1][1],l=C[Math.min(19,i+2)][1],n-=(m=(e>=0?h:-h)*(s+v*(l-o)/2+v*v*(l-2*s+o)/2)-e)*g}while(Math.abs(m)>1e-12&&--y>0);break}}while(--i>=0);var x=C[i][0],b=C[i+1][0],_=C[Math.min(19,i+2)][0];return[t/(b+v*(_-x)/2+v*v*(_-2*b+x)/2),n*d]},(t.geo.robinson=function(){return y(L)}).raw=L,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return y(O)}).raw=O,P.invert=function(t,e){if(!(t*t+4*e*e>p*p+f)){var r=t,n=e,a=25;do{var i,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),h=Math.sin(2*n),d=c*c,g=u*u,v=s*s,y=1-g*l*l,x=y?m(u*l)*Math.sqrt(i=1/y):i=0,b=2*x*u*s-t,_=x*c-e,w=i*(g*v+x*u*l*d),k=i*(.5*o*h-2*x*c*s),T=.25*i*(h*s-x*c*g*o),A=i*(d*l+x*v*u),M=k*T-A*w;if(!M)break;var E=(_*k-b*A)/M,S=(b*T-_*w)/M;r-=E,n-=S}while((Math.abs(E)>f||Math.abs(S)>f)&&--a>0);return[r,n]}},(t.geo.aitoff=function(){return y(P)}).raw=P,I.invert=function(t,e){var r=t,n=e,a=25;do{var i,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,p=Math.sin(r),d=Math.cos(r/2),g=Math.sin(r/2),v=g*g,y=1-u*d*d,x=y?m(o*d)*Math.sqrt(i=1/y):i=0,b=.5*(2*x*o*g+r/h)-t,_=.5*(x*s+n)-e,w=.5*i*(u*v+x*o*d*c)+.5/h,k=i*(p*l/4-x*s*g),T=.125*i*(l*g-x*s*u*p),A=.5*i*(c*d+x*v*o)+.5,M=k*T-A*w,E=(_*k-b*A)/M,S=(b*T-_*w)/M;r-=E,n-=S}while((Math.abs(E)>f||Math.abs(S)>f)&&--a>0);return[r,n]},(t.geo.winkel3=function(){return y(I)}).raw=I}},{}],799:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../registry"),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},p={};function h(t,e){f[n+"."+t]=a.nestedProperty(l,t).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,f);var r=a.nestedProperty(u,t);r.get()!==e&&(r.set(e),a.nestedProperty(l,t).set(e),p[n+"."+t]=e)}r(h),h("projection.scale",e.scale()/t.fitScale),h("fitbounds",!1),o.emit("plotly_relayout",p)}function p(t,e){var r=u(0,e);function a(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),f(t,e,a)})),r}function h(t,e){var r,a,i,o,s,p,h,d,g,v=u(0,e);function m(t){return e.invert(t)}function y(r){var n=e.rotate(),a=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",a[0]),r("center.lat",a[1])}return v.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),a=e.rotate(),i=e.translate(),o=a,s=m(r)})).on("zoom",(function(){if(p=n.mouse(this),function(t){var r=m(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([i[0],n.event.translate[1]]),s?m(p)&&(d=m(p),h=[o[0]+(d[0]-s[0]),a[1],a[2]],e.rotate(h),o=h):s=m(r=p),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),g&&f(t,e,y)})),v}function d(t,e){var r,a={r:e.rotate(),k:e.scale()},i=u(0,e),o=function(t){for(var e=0,r=arguments.length,a=[];++ed?(i=(f>0?90:-90)-h,a=0):(i=Math.asin(f/d)*s-h,a=Math.sqrt(d*d-f*f));var g=180-i-2*h,v=(Math.atan2(p,u)-Math.atan2(c,a))*s,m=(Math.atan2(p,u)-Math.atan2(c,-a))*s;return b(r[0],r[1],i,v)<=b(r[0],r[1],g,m)?[i,v,r[2]]:[g,m,r[2]]}function b(t,e,r,n){var a=_(r-t),i=_(n-e);return Math.sqrt(a*a+i*i)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,a=t.slice(),i=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return a[i]=t[i]*l-t[s]*c,a[s]=t[s]*l+t[i]*c,a}function k(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function T(t,e){for(var r=0,n=0,a=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(i)*_*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(i>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(i=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],i||s?(i&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=a),Math.abs(c.dragStart[0]-n).999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var a=e._basePlotModules.length>1;o(t,e,r,{type:"gl3d",attributes:l,handleDefaults:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!a)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":592,"../../../lib":717,"../../../registry":846,"../../get_data":800,"../../subplot_defaults":840,"./axis_defaults":808,"./layout_attributes":811}],811:[function(t,e,r){"use strict";var n=t("./axis_attributes"),a=t("../../domain").attributes,i=t("../../../lib/extend").extendFlat,o=t("../../../lib").counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.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":717,"../../../lib/extend":708,"../../domain":790,"./axis_attributes":807}],812:[function(t,e,r){"use strict";var n=t("../../../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(t){for(var e=0;e<3;++e){var r=t[a[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new i;return e.merge(t),e}},{"../../../lib/str2rgbarray":740}],813:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[i[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var p=u.nticks||a.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/p)}for(var h=n.calcTicks(u),d=0;d/g," "));l[c]=h,u.tickmode=f}}for(e.ticks=l,c=0;c<3;++c)for(o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],a=new Array(n.length),i=0;i1&&(e=!0),e}();function w(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.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=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(e,e[this.id]),this.spikeOptions=y(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var k=w.prototype;k.tryCreatePlot=function(){var t={canvas:this.canvas,gl:this.gl,glOptions:{preserveDrawingBuffer:_,premultipliedAlpha:!0,antialias:!0},container:this.container,axes:this.axesOptions,spikes:this.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:this.camera,pixelRatio:this.pixelRatio};if(this.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");t.gl=a,t.canvas=n}var e=0;try{this.glplot=s(t)}catch(r){e++;try{this.glplot=s(t)}catch(t){e++}}return e<2},k.initializeGLCamera=function(){var t=this.fullSceneLayout.camera,e="orthographic"===t.projection.type;this.camera=o(this.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:e,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio()),e},a=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas.addEventListener("mouseup",(function(){a(t)})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,i=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*i.x,y:n*i.y,z:n*i.z})}a(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},k.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,a=e.container.getBoundingClientRect(),i=a.width,o=a.height;n.setAttributeNS(null,"viewBox","0 0 "+i+" "+o),n.setAttributeNS(null,"width",i),n.setAttributeNS(null,"height",o),x(e),e.glplot.axes.update(e.axesOptions);for(var s,l=Object.keys(e.traces),c=null,u=e.glplot.selection,d=0;d")):"isosurface"===t.type||"volume"===t.type?(w.valueLabel=p.tickText(e._mockAxis,e._mockAxis.d2l(u.traceCoordinate[3]),"hover").text,M.push("value: "+w.valueLabel),u.textLabel&&M.push(u.textLabel),y=M.join("
")):y=u.textLabel;var E={x:u.traceCoordinate[0],y:u.traceCoordinate[1],z:u.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:_};h.appendArrayPointValue(E,b,_),t._module.eventData&&(E=b._module.eventData(E,u,b,{},_));var S={points:[E]};e.fullSceneLayout.hovermode&&h.loneHover({trace:b,x:(.5+.5*m[0]/m[3])*i,y:(.5-.5*m[1]/m[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:y,name:c.name,color:h.castHoverOption(b,_,"bgcolor")||c.color,borderColor:h.castHoverOption(b,_,"bordercolor"),fontFamily:h.castHoverOption(b,_,"font.family"),fontSize:h.castHoverOption(b,_,"font.size"),fontColor:h.castHoverOption(b,_,"font.color"),nameLength:h.castHoverOption(b,_,"namelength"),textAlign:h.castHoverOption(b,_,"align"),hovertemplate:f.castOption(b,_,"hovertemplate"),hovertemplateLabels:f.extendFlat({},E,w),eventData:[E]},{container:n,gd:r}),u.buttons&&u.distance<5?r.emit("plotly_click",S):r.emit("plotly_hover",S),s=S}else h.loneUnhover(n),r.emit("plotly_unhover",s);e.drawAnnotations(e)},k.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var T=["xaxis","yaxis","zaxis"];function A(t,e,r){for(var n=t.fullSceneLayout,a=0;a<3;a++){var i=T[a],o=i.charAt(0),s=n[i],l=e[o],c=e[o+"calendar"],u=e["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var p,h=0;h<(u||l.length);h++)if(f.isArrayOrTypedArray(l[h]))for(var d=0;dg[1][i])g[0][i]=-1,g[1][i]=1;else{var S=g[1][i]-g[0][i];g[0][i]-=S/32,g[1][i]+=S/32}if("reversed"===s.autorange){var C=g[0][i];g[0][i]=g[1][i],g[1][i]=C}}else{var L=s.range;g[0][i]=s.r2l(L[0]),g[1][i]=s.r2l(L[1])}g[0][i]===g[1][i]&&(g[0][i]-=1,g[1][i]+=1),v[i]=g[1][i]-g[0][i],this.glplot.setBounds(i,{min:g[0][i]*p[i],max:g[1][i]*p[i]})}var O,P=[1,1,1];for(i=0;i<3;++i){var I=m[l=(s=c[T[i]]).type];P[i]=Math.pow(I.acc,1/I.count)/p[i]}if("auto"===c.aspectmode)O=Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1];else if("cube"===c.aspectmode)O=[1,1,1];else if("data"===c.aspectmode)O=P;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var D=c.aspectratio;O=[D.x,D.y,D.z]}c.aspectratio.x=u.aspectratio.x=O[0],c.aspectratio.y=u.aspectratio.y=O[1],c.aspectratio.z=u.aspectratio.z=O[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z});var z=c.domain||null,R=e._size||null;if(z&&R){var F=this.container.style;F.position="absolute",F.left=R.l+z.x[0]*R.w+"px",F.top=R.t+(1-z.y[1])*R.h+"px",F.width=R.w*(z.x[1]-z.x[0])+"px",F.height=R.h*(z.y[1]-z.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=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},k.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},k.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),this.glplot.setAspectratio(t.aspectratio),"orthographic"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},k.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var a=["up","center","eye"],i=["x","y","z"];return e[a[r]]&&t[a[r]][i[n]]===e[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(e,r,i,o)){a=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(a=!0)}return a},k.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},k.saveLayout=function(t){var e,r,n,a,i,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),p=l||c;if(p){var h={};l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+".camera")).get(),h[this.id+".camera"]=n),c&&(a=this.glplot.getAspectratio(),o=(i=f.nestedProperty(t,this.id+".aspectratio")).get(),h[this.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",t,s._preGUI,h),l&&(r.set(e),f.nestedProperty(s,this.id+".camera").set(e)),c&&(i.set(a),f.nestedProperty(s,this.id+".aspectratio").set(a),this.glplot.redraw())}return p},k.updateFx=function(t,e){var r=this.camera;if(r)if("orbit"===t)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===t){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 c=this.id+".camera.up",p={x:0,y:0,z:1},h={};h[c]=p;var d=n.layout;u.call("_storeDirectGUIEdit",d,a._preGUI,h),i.up=p,f.nestedProperty(d,c).set(p)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},k.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,a=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*a*4);e.readPixels(0,0,r,a,e.RGBA,e.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);e.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\')'}}},{}],819:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r=t.split(" "),a=r[0],i=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(a){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(i){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},{"../../lib":717}],820:[function(t,e,r){"use strict";var n=t("mapbox-gl"),a=t("../../lib"),i=t("../../plots/get_data").getSubplotCalcData,o=t("../../constants/xmlns_namespaces"),s=t("d3"),l=t("../../components/drawing"),c=t("../../lib/svg_text_utils"),u=t("./mapbox"),f=r.constants=t("./constants");function p(t){return"string"==typeof t&&(-1!==f.styleValuesMapbox.indexOf(t)||0===t.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=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==f.requiredVersion)throw new Error(f.wrongVersionErrorMsg);var s=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],i=[],o=!1,s=!1,l=0;l1&&a.warn(f.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(" ")),"")}(t,o);n.accessToken=s;for(var l=0;lx/2){var b=g.split("|").join("
");m.text(b).attr("data-unformatted",b).call(c.convertToTspans,t),y=l.bBox(m.node())}m.attr("transform","translate(-3, "+(8-y.height)+")"),v.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var _=1;y.width+6>x&&(_=x/(y.width+6));var w=[n.l+n.w*u.x[1],n.t+n.h*(1-u.y[0])];v.attr("transform","translate("+w[0]+","+w[1]+") scale("+_+")")}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function c(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"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":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}s.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=l(t)},s.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates})},s.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,l(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=t.sourceattribution),a}(t);e.addSource(this.idSource,r)}},s.updateLayer=function(t){var e,r=this.subplot,n=c(t),a=this.subplot.belowLookup["layout-"+this.index];if("traces"===a)for(var o=r.getMapLayers(),s=0;s1)for(r=0;r-1&&f(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&a.click(n,e.originalEvent)}}},g.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a="select"===o?function(t,r){(t.range={})[e.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(l)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),"select"===o||"lasso"===o?(r.dragPan.disable(),r.on("zoomstart",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){u(t,r,n,e.dragOptions,o)},c.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearSelect),e.div.onmousedown=null,e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function l(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},g.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},g.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=e._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){m.sendDataToCloud(t)}));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})}}(t,o),s.text(o.text()&&u.text()?" - ":"")}},m.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=m.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],_=["year","month","dayMonth","dayMonthYear"];function w(t,e){var r=t._context.locale,n=!1,a={};function o(t){for(var r=!0,i=0;i1&&P.length>1){for(i.getComponentMethod("grid","sizeDefaults")(c,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"),m.linkSubplots(f,s,u,a),m.cleanPlot(f,s,u,a),a._zoomlayer&&!t._dragging&&a._zoomlayer.selectAll(".select-outline").remove(),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var a=0;a0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var p=m.layoutAttributes.width.min,h=m.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),m.sanitizeMargins(r)},m.supplyLayoutModuleDefaults=function(t,e,r,n){var a,o,s,c=i.componentsRegistry,u=e._basePlotModules,f=i.subplotsRegistry.cartesian;for(a in c)(s=c[a]).includeBasePlot&&s.includeBasePlot(t,e);for(var p in u.length||u.push(f),e._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[p].sort(l.subplotSort);for(o=0;o.5*n.width&&(l.log("Margin push",e,"is too big in x, dropping"),r.l=r.r=0),r.b+r.t>.5*n.height&&(l.log("Margin push",e,"is too big in y, dropping"),r.b=r.t=0);var c=void 0!==r.xl?r.xl:r.x,u=void 0!==r.xr?r.xr:r.x,f=void 0!==r.yt?r.yt:r.y,p=void 0!==r.yb?r.yb:r.y;a[e]={l:{val:c,size:r.l+o},r:{val:u,size:r.r+o},b:{val:p,size:r.b+o},t:{val:f,size:r.t+o}},i[e]=1}else delete a[e],delete i[e];if(!n._replotting)return m.doAutoMargin(t)}},m.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),M(e);var r=e._size,n=e.margin,o=l.extendFlat({},r),s=n.l,c=n.r,u=n.t,f=n.b,p=e.width,h=e.height,d=e._pushmargin,g=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in d)g[v]||delete d[v];for(var y in d.base={l:{val:0,size:s},r:{val:1,size:c},t:{val:1,size:u},b:{val:0,size:f}},d){var x=d[y].l||{},b=d[y].b||{},_=x.val,w=x.size,k=b.val,T=b.size;for(var A in d){if(a(w)&&d[A].r){var E=d[A].r.val,S=d[A].r.size;if(E>_){var C=(w*E+(S-p)*_)/(E-_),L=(S*(1-_)+(w-p)*(1-E))/(E-_);C>=0&&L>=0&&p-(C+L)>0&&C+L>s+c&&(s=C,c=L)}}if(a(T)&&d[A].t){var O=d[A].t.val,P=d[A].t.size;if(O>k){var I=(T*O+(P-h)*k)/(O-k),D=(P*(1-k)+(T-h)*(1-O))/(O-k);I>=0&&D>=0&&h-(D+I)>0&&I+D>f+u&&(f=I,u=D)}}}}}if(r.l=Math.round(s),r.r=Math.round(c),r.t=Math.round(u),r.b=Math.round(f),r.p=Math.round(n.pad),r.w=Math.round(p)-r.l-r.r,r.h=Math.round(h)-r.t-r.b,!e._replotting&&m.didMarginChange(o,r)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var z=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return i.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var o=0,s=0;function l(){return o++,function(){var e;s++,n||s!==o||(e=a,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return i.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(l),setTimeout(l())}))}],o=l.syncOrAsync(a,t);return o&&o.then||(o=Promise.resolve()),o.then((function(){return t}))}m.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},m.graphJson=function(t,e,r,n,a){(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&m.supplyDefaults(t);var i=a?t._fullData:t.data,o=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if("function"==typeof t)return null;if(l.isPlainObject(t)){var e,n,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;a[e]=c(t[e])}return a}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(i||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),"object"===n?u:JSON.stringify(u)},m.modifyFrames=function(t,e){var r,n,a,i=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(i=n.calc(t,r))}Array.isArray(i)&&i[0]||(i=[{x:u,y:u}]),i[0].t||(i[0].t={}),i[0].trace=r,d[e]=i}}for(L(c,p,h),a=0;a1e-10?t:0}function p(t,e,r){e=e||0,r=r||0;for(var n=t.length,a=new Array(n),i=0;i0?r:1/0})),a=n.mod(r+1,e.length);return[e[r],e[a]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var a=-e*r,i=e*e+1,o=2*(e*a-r),s=a*a+r*r-t*t,l=Math.sqrt(o*o-4*i*s),c=(-o+l)/(2*i),u=(-o-l)/(2*i);return[[c,e*c+a+n],[u,e*u+a+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,a,i){return"M"+p(u(t,e,r,n),a,i).join("L")},pathPolygonAnnulus:function(t,e,r,n,a,i,o){var s,l;t=0?p.angularAxis.domain:n.extent(k),S=Math.abs(k[1]-k[0]);A&&!T&&(S=0);var C=E.slice();M&&T&&(C[1]+=S);var L=p.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),p.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var O=p.angularAxis.ticksStep||(C[1]-C[0])/(L*(p.minorTicks+1));w&&(O=Math.max(Math.round(O),1)),C[2]||(C[2]=O);var P=n.range.apply(this,C);if(P=P.map((function(t,e){return parseFloat(t.toPrecision(12))})),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===p.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=M?S:0,void 0===(t=n.select(this).select("svg.chart-root"))||t.empty()){var I=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),D=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(D)}t.select(".guides-group").style({"pointer-events":"none"}),t.select(".angular.axis-group").style({"pointer-events":"none"}),t.select(".radial.axis-group").style({"pointer-events":"none"});var z,R=t.select(".chart-group"),F={fill:"none",stroke:p.tickColor},B={"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(t,e){return" "+t+" 0 "+p.font.outlineColor})).join(",")};if(p.showLegend){z=t.select(".legend-group").attr({transform:"translate("+[x,p.margin.top]+")"}).style({display:"block"});var N=h.map((function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r}));o.Legend().config({data:h.map((function(t,e){return t.name||"Element"+e})),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:z,elements:N,reverseOrder:p.legend.reverseOrder})})();var j=z.node().getBBox();x=Math.min(p.width-j.width-p.margin.left-p.margin.right,p.height-p.margin.top-p.margin.bottom)/2,x=Math.max(10,x),_=[p.margin.left+x,p.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),z.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else z=t.select(".legend-group").style({display:"none"});t.attr({width:p.width,height:p.height}).style({opacity:p.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(p.width-(p.margin.left+p.margin.right+2*x+(j?j.width:0)))/2,(p.height-(p.margin.top+p.margin.bottom+2*x))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),t.select(".outer-group").attr("transform","translate("+V+")"),p.title&&p.title.text){var U=t.select("g.title-group text").style(B).text(p.title.text),q=U.node().getBBox();U.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(".radial.axis-group");if(p.radialAxis.gridLinesVisible){var G=H.selectAll("circle.grid-circle").data(r.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",r),G.exit().remove()}H.select("circle.outside-circle").attr({r:x}).style(F);var W=t.select("circle.background-circle").attr({r:x}).style({fill:p.backgroundColor,stroke:p.stroke});function Y(t,e){return s(t)%360+p.orientation}if(p.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:"rotate("+p.radialAxis.orientation+")"}),H.selectAll(".domain").style(F),H.selectAll("g>text").text((function(t,e){return this.textContent+p.radialAxis.ticksSuffix})).style(B).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===p.radialAxis.tickOrientation?"rotate("+-p.radialAxis.orientation+") translate("+[0,B["font-size"]]+")":"translate("+[0,B["font-size"]]+")"}}),H.selectAll("g>line").style({stroke:"black"})}var Z=t.select(".angular.axis-group").selectAll("g.angular-tick").data(P),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+Y(t)+")"}}).style({display:p.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",(function(t,e){return e%(p.minorTicks+1)==0})).classed("minor",(function(t,e){return!(e%(p.minorTicks+1)==0)})).style(F),J.selectAll(".minor").style({stroke:p.minorTickColor}),Z.select("line.grid-line").attr({x1:p.tickLength?x-p.tickLength:0,x2:x}).style({display:p.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(B);var K=Z.select("text.axis-text").attr({x:x+p.labelOffset,dy:i+"em",transform:function(t,e){var r=Y(t),n=x+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(t,e){return e%(p.minorTicks+1)!=0?"":w?w[t]+p.angularAxis.ticksSuffix:t+p.angularAxis.ticksSuffix})).style(B);p.angularAxis.rewriteTicks&&K.text((function(t,e){return e%(p.minorTicks+1)!=0?"":p.angularAxis.rewriteTicks(this.textContent,e)}));var $=n.max(R.selectAll(".angular-tick text")[0].map((function(t,e){return t.getCTM().e+t.getBBox().width})));z.attr({transform:"translate("+[x+$,p.margin.top]+")"});var Q=t.select("g.geometry-group").selectAll("g").size()>0,tt=t.select("g.geometry-group").selectAll("g.geometry").data(h);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),h[0]||Q){var et=[];h.forEach((function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter((function(t,r){return r==e})),n.geometry=t.geometry,n.orientation=p.orientation,n.direction=p.direction,n.index=e,et.push({data:t,geometryConfig:n})}));var rt=n.nest().key((function(t,e){return void 0!==t.data.groupId||"unstacked"})).entries(et),nt=[];rt.forEach((function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map((function(t,e){return[t]}))):nt.push(t.values)})),nt.forEach((function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map((function(t,e){return a(o[r].defaultConfig(),t)}));o[r]().config(n)()}))}var at,it,ot=t.select(".guides-group"),st=t.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!T){var ft=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",(function(t,e){var r=o.util.getMousePos(W).angle;ft.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-p.orientation)%360;at=s.invert(n);var a=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(at)).move([a[0]+_[0],a[1]+_[1]])})).on("mouseout.angular-guide",(function(t,e){ot.select("line").style({opacity:0})}))}var pt=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",(function(t,e){var n=o.util.getMousePos(W).radius;pt.attr({r:n}).style({opacity:.5}),it=r.invert(o.util.getMousePos(W).radius);var a=o.util.convertToCartesian(n,p.radialAxis.orientation);ct.text(o.util.round(it)).move([a[0]+_[0],a[1]+_[1]])})).on("mouseout.radial-guide",(function(t,e){pt.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()})),t.selectAll(".geometry-group .mark").on("mouseover.tooltip",(function(e,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 c={t:o.util.round(e[0]),r:o.util.round(e[1])};T&&(c.t=w[e[0]]);var u="t: "+c.t+", r: "+c.r,f=this.getBoundingClientRect(),p=t.node().getBoundingClientRect(),h=[f.left+f.width/2-V[0]-p.left,f.top+f.height/2-V[1]-p.top];ut.config({color:s}).text(u),ut.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(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()})).on("mouseout.tooltip",(function(t,e){ut.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")})}))}))}(c),this},config:function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach((function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)})),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},getLiveConfig:function(){return u},getinputConfig:function(){return c},radialScale:function(t){return r},angularScale:function(t){return s},svg:function(){return t}};return n.rebind(p,f,"on"),p},o.Axis.defaultConfig=function(t,e){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(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map((function(e,r){var n=e*Math.PI/180;return[e,t(n)]}))},o.util.dataFromEquation=function(t,e,r){var a=e||6,i=[],o=[];n.range(0,360+a,a).forEach((function(e,r){var n=e*Math.PI/180,a=t(n);i.push(e),o.push(a)}));var s={t:i,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map((function(t,e){return r[e]||r[0]}))},o.util.fillArrays=function(t,e,r){return e.forEach((function(e,n){t[e]=o.util.ensureArray(t[e],r)})),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map((function(t,e){return n.sum(t)}))},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter((function(t,e,r){return r.indexOf(t)==e}))},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],a=e[1],i={};return i.x=r,i.y=a,i.pos=e,i.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,i.radius=Math.sqrt(r*r+a*a),i},o.util.duplicatesCount=function(t){for(var e,r={},n={},a=0,i=t.length;a0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(t,r){return"rotate("+(e.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return d.fill(r,a,i)},"fill-opacity":0,stroke:function(t,e){return d.stroke(r,a,i)},"stroke-width":function(t,e){return d["stroke-width"](r,a,i)},"stroke-dasharray":function(t,e){return d["stroke-dasharray"](r,a,i)},opacity:function(t,e){return d.opacity(r,a,i)},display:function(t,e){return d.display(r,a,i)}})}};var f=e.angularScale.range(),p=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,h=n.svg.arc().startAngle((function(t){return-p/2})).endAngle((function(t){return p/2})).innerRadius((function(t){return e.radialScale(l+(t[2]||0))})).outerRadius((function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])}));c.arc=function(t,r,a){n.select(this).attr({class:"mark arc",d:h,transform:function(t,r){return"rotate("+(e.orientation+s(t[0])+90)+")"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},"stroke-width":function(e,r,n){return t[n].data.strokeSize+"px"},"stroke-dasharray":function(e,n,a){return r[t[a].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return void 0===t[n].data.visible||t[n].data.visible?"block":"none"}},g=n.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var v=g.selectAll("path.mark").data((function(t,e){return t}));v.enter().append("path").attr({class:"mark"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()}))}return i.config=function(e){return arguments.length?(e.forEach((function(e,r){t[r]||(t[r]={}),a(t[r],o.PolyChart.defaultConfig()),a(t[r],e)})),this):t},i.getColorScale=function(){},n.rebind(i,e,"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 t=o.Legend.defaultConfig(),e=n.dispatch("hover");function r(){var e=t.legendConfig,i=t.data.map((function(t,r){return[].concat(t).map((function(t,n){var i=a({},e.elements[r]);return i.name=t,i.color=[].concat(e.elements[r].color)[n],i}))})),o=n.merge(i);o=o.filter((function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||void 0===e.elements[r].visibleInLegend)})),e.reverseOrder&&(o=o.reverse());var s=e.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map((function(t,e){return t.color})),c=e.fontSize,u=null==e.isContinuous?"number"==typeof o[0]:e.isContinuous,f=u?e.height:c*o.length,p=s.classed("legend-group",!0).selectAll("svg").data([0]),h=p.enter().append("svg").attr({width:300,height:f+c,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 d=n.range(o.length),g=n.scale[u?"linear":"ordinal"]().domain(d).range(l),v=n.scale[u?"linear":"ordinal"]().domain(d)[u?"range":"rangePoints"]([0,f]);if(u){var m=p.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);m.enter().append("stop"),m.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),p.append("rect").classed("legend-mark",!0).attr({height:e.height,width:e.colorBandWidth,fill:"url(#grad1)"})}else{var y=p.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r,a,i,o=t.symbol;return i=3*(a=c),"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(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient("right"),b=p.select("g.legend-axis").attr({transform:"translate("+[u?e.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?e.textColor:"none"}),b.selectAll("text").style({fill:e.textColor,"font-size":e.fontSize}).text((function(t,e){return o[e].name})),r}return r.config=function(e){return arguments.length?(a(t,e),this):t},n.rebind(r,e,"on"),r},o.Legend.defaultConfig=function(t,e){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 t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=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"}),e=n.append("text").attr({dx:i.padding+l,dy:.3*+i.fontSize}),c};return c.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",f=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(f);var p=i.padding,h=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},g=h.width+2*p+l,v=h.height+2*p;return r.attr({d:"M"+[[l,-v/2],[l,-v/4],[i.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[l,-v/2+2*p]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return a(i,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map((function(t,r){var n=a({},t);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(t,r){o.util.translator.apply(null,t.concat(e))})),e||delete n.marker,e&&delete n.groupId,e?("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})),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map((function(t,e){return t.geometry})));r.data.forEach((function(t,e){var n=i.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)}))}if(t.layout){var s=a({},t.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(t,r){o.util.translator.apply(null,t.concat(e))})),e?(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"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach((function(t,e){u[c[l.indexOf(t.key)]]=t.value})),s.margin=u}e&&(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 t}},{"../../../constants/alignment":686,"../../../lib":717,d3:165}],836:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../../lib"),i=t("../../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=a.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,a,i,u,f=new s;function p(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),e=e?l(e,r):r,a||(a=o.Axis()),i=o.adapter.plotly().convert(e),a.config(i).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return p.isPolar=!0,p.svg=function(){return a.svg()},p.getConfig=function(){return e},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 t,n,a=this,i=o.util.cloneJson(e);t=i,n=r,f.add({undo:function(){n&&a(n)},redo:function(){a(t)}}),r=o.util.cloneJson(i)},p.undo=function(){f.undo()},p.redo=function(){f.redo()},p},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:i.background,_container:e,_paperdiv:r,_paper:a};t._fullLayout=l(o,t.layout)}},{"../../../components/color":592,"../../../lib":717,"./micropolar":835,"./undo_manager":837,d3:165}],837:[function(t,e,r){"use strict";e.exports=function(){var t,e=[],r=-1,n=!1;function a(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(a(n,"undo"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(a(n,"redo"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&p<=0?0:Math.max(u,p),e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f),r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&p>=0?0:Math.min(u,p),n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f),[e,r,n,a]}(p),x=y[2]-y[0],b=y[3]-y[1],_=f/u,w=Math.abs(b/x);_>w?(h=u,m=(f-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=f,m=(u-(h=f/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=h,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],T=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=h/x,M=this.innerRadius=e.hole*A,E=this.cx=k-A*y[0],L=this.cy=T+A*y[3],O=this.cxx=E-k,P=this.cyy=L-T;this.radialAxis=this.mockAxis(t,e,a,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[a.side],domain:[M/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,i,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:"x",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var I=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",I).attr("transform",R(O,P)),r.frontplot.attr("transform",R(k,T)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",I).attr("transform",R(E,L)).call(s.fill,e.bgcolor)},P.mockAxis=function(t,e,r,n){var a=o.extendFlat({},r,n);return p(a,e,t),a},P.mockCartesianAxis=function(t,e,r){var n=this,a=r._id,i=o.extendFlat({type:"linear"},r);f(i,t);var s={x:[0,2],y:[1,3]};return i.setRange=function(){var t=n.sectorBBox,r=s[a],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);i.range=[t[r[0]]*l,t[r[1]]*l]},i.isPtWithinRange="x"===a?function(t){return n.isPtInside(t)}:function(){return!0},i.setRange(),i.setScale(),i},P.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,a=e.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(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,f=r.cy,p=e.radialaxis,h=S(e.sector[0],360),d=r.radialAxis,g=l90&&h<=270&&(d.tickangle=180);var v=function(t){return"translate("+(d.l2p(t.x)+l)+",0)"},m=I(p);if(r.radialTickLayout!==m&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),g){d.setScale();var y=u.calcTicks(d),x=u.clipEnds(d,y),b=u.getTickSigns(d)[2];u.drawTicks(n,d,{vals:y,layer:a["radial-axis"],path:u.makeTickPath(d,0,b),transFn:v,crisp:!1}),u.drawGrid(n,d,{vals:x,layer:a["radial-grid"],path:function(t){return r.pathArc(d.r2p(t.x)+l)},transFn:o.noop,crisp:!1}),u.drawLabels(n,d,{vals:y,layer:a["radial-axis"],transFn:v,labelFns:u.makeLabelFns(d,0)})}var _=r.radialAxisAngle=r.vangles?L(D(C(p.angle),r.vangles)):p.angle,w=R(c,f),k=w+F(-_);z(a["radial-axis"],g&&(p.showticklabels||p.ticks),{transform:k}),z(a["radial-grid"],g&&p.showgrid,{transform:w}),z(a["radial-line"].select("line"),g&&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(t,e,r){var n=this.gd,a=this.radius,i=this.cx,o=this.cy,s=e.radialaxis,c=this.id+"title",u=void 0!==r?r:this.radialAxisAngle,f=C(u),p=Math.cos(f),h=Math.sin(f),d=0;if(s.title){var g=l.bBox(this.layers["radial-axis"].node()).height,v=s.title.font.size;d="counterclockwise"===s.side?-g-.4*v:g+.8*v}this.layers["radial-axis-title"]=m.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:E(n,"Click to enter radial axis title"),attributes:{x:i+a/2*p+d*h,y:o-a/2*h+d*p,"text-anchor":"middle"},transform:{rotate:-u}})},P.updateAngularAxis=function(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,f=r.cy,p=e.angularaxis,h=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",p.rotation),h.setGeometry(),h.setScale();var d=function(t){return h.t2g(t.x)};"linear"===h.type&&"radians"===h.thetaunit&&(h.tick0=L(h.tick0),h.dtick=L(h.dtick));var g=function(t){return R(c+i*Math.cos(t),f-i*Math.sin(t))},v=u.makeLabelFns(h,0).labelStandoff,m={xFn:function(t){var e=d(t);return Math.cos(e)*v},yFn:function(t){var e=d(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(v+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*T)},anchorFn:function(t){var e=d(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=d(t);return-.5*(1+Math.sin(n))*r}},y=I(p);r.angularTickLayout!==y&&(a["angular-axis"].selectAll("."+h._id+"tick").remove(),r.angularTickLayout=y);var x,b=u.calcTicks(h);if("linear"===e.gridshape?(x=b.map(d),o.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,"category"===h.type&&(b=b.filter((function(t){return o.isAngleInsideSector(d(t),r.sectorInRad)}))),h.visible){var _="inside"===h.ticks?-1:1,w=(h.linewidth||1)/2;u.drawTicks(n,h,{vals:b,layer:a["angular-axis"],path:"M"+_*w+",0h"+_*h.ticklen,transFn:function(t){var e=d(t);return g(e)+F(-L(e))},crisp:!1}),u.drawGrid(n,h,{vals:b,layer:a["angular-grid"],path:function(t){var e=d(t),r=Math.cos(e),n=Math.sin(e);return"M"+[c+l*r,f-l*n]+"L"+[c+i*r,f-i*n]},transFn:o.noop,crisp:!1}),u.drawLabels(n,h,{vals:b,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:function(t){return g(d(t))},labelFns:m})}z(a["angular-line"].select("path"),p.showline,{d:r.pathSubplot(),transform:R(c,f)}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},P.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},P.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,f=e.innerRadius,p=e.cx,h=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,T=e.radialAxis,E=M.clampTiny,S=M.findXYatLength,C=M.findEnclosingVertexAngles,L=A.cornerHalfWidth,O=A.cornerLen/2,P=d.makeDragger(o,"path","maindrag","crosshair");n.select(P).attr("d",e.pathSubplot()).attr("transform",R(p,h));var I,D,z,F,B,N,j,V,U,q={element:P,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function W(t,e){return Math.atan2(_-e,t-m)}function Y(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=O/t,a=r-n,i=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return"M"+Y(s,a)+"A"+[s,s]+" 0,0,0 "+Y(s,i)+"L"+Y(l,i)+"A"+[l,l]+" 0,0,1 "+Y(l,a)+"Z"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var a,i,o=Y(t,r),s=Y(t,n),l=E((o[0]+s[0])/2),c=E((o[1]+s[1])/2);if(l&&c){var u=c/l,f=-1/u,p=S(L,u,l,c);a=S(O,f,p[0][0],p[0][1]),i=S(O,f,p[1][0],p[1][1])}else{var h,d;c?(h=O,d=L):(h=L,d=O),a=[[l-h,c-d],[l+h,c-d]],i=[[l-h,c+d],[l+h,c+d]]}return"M"+a.join("L")+"L"+i.reverse().join("L")+"Z"}function J(t,e){return e=Math.max(Math.min(e,u),f),tl?(t-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),a.indexOf("event")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,i){var o=r._fullLayout.dragmode,l=P.getBoundingClientRect();if(I=n-l.left,D=i-l.top,k){var c=M.findPolygonOffset(u,w[0],w[1],k);I+=m+c[0],D+=_+c[1]}switch(o){case"zoom":q.moveFn=k?tt:$,q.clickFn=nt,q.doneFn=et,function(){z=null,F=null,B=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=a(t.bgcolor).getLuminance(),(V=d.makeZoombox(s,j,p,h,B)).attr("fill-rule","evenodd"),U=d.makeCorners(s,p,h),b(r)}();break;case"select":case"lasso":y(t,n,i,q,o)}},P.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=P,r._fullLayout._hoversubplot=e.id},P.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},P.updateRadialDrag=function(t,e,r){var a=this,s=a.gd,l=a.layers,c=a.radius,u=a.innerRadius,f=a.cx,p=a.cy,h=a.radialAxis,v=A.radialDragBoxSize,m=v/2;if(h.visible){var y,x,_,T=C(a.radialAxisAngle),M=h._rl,E=M[0],S=M[1],O=M[r],P=.75*(M[1]-M[0])/(1-e.hole)/c;r?(y=f+(c+m)*Math.cos(T),x=p-(c+m)*Math.sin(T),_="radialdrag"):(y=f+(u-m)*Math.cos(T),x=p-(u-m)*Math.sin(T),_="radialdrag-inner");var I,B,N,j=d.makeRectDragger(l,_,"crosshair",-m,-m,v,v),V={element:j,gd:s};z(n.select(j),h.visible&&u0==(r?N>E:Nn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*i},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var a=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?i(t):t}(a(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,a){var i,o,s=e[a],l=e._length,c=function(r){return t.d2c(r,e.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=u&&(h.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,n){var a=f[e._name];function o(r,n){return i.coerce(t,e,a,r,n)}o("uirevision",n.uirevision),e.type="linear";var p=o("color"),h=p!==a.color.dflt?p:r.font.color,d=e._name.charAt(0).toUpperCase(),g="Component "+d,v=o("title.text",g);e._hovertitle=v===g?v:d,i.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:h}),o("min"),c(t,e,o,"linear"),s(t,e,o,"linear",{}),l(t,e,o,{outerTicks:!0}),o("showticklabels")&&(i.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:h}),o("tickangle"),o("tickformat")),u(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}e.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:f,handleDefaults:h,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":592,"../../lib":717,"../../plot_api/plot_template":755,"../cartesian/line_grid_defaults":779,"../cartesian/tick_label_defaults":784,"../cartesian/tick_mark_defaults":785,"../cartesian/tick_value_defaults":786,"../subplot_defaults":840,"./layout_attributes":843}],845:[function(t,e,r){"use strict";var n=t("d3"),a=t("tinycolor2"),i=t("../../registry"),o=t("../../lib"),s=o._,l=t("../../components/color"),c=t("../../components/drawing"),u=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,p=t("../plots"),h=t("../cartesian/axes"),d=t("../../components/dragelement"),g=t("../../components/fx"),v=t("../../components/titles"),m=t("../cartesian/select").prepSelect,y=t("../cartesian/select").selectOnClick,x=t("../cartesian/select").clearSelect,b=t("../cartesian/constants");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var a=0;ak*x?a=(i=x)*k:i=(a=y)/k,o=v*a/y,s=m*i/x,r=e.l+e.w*d-a/2,n=e.t+e.h*(1-g)-i/2,p.x0=r,p.y0=n,p.w=a,p.h=i,p.sum=b,p.xaxis={type:"linear",range:[_+2*T-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:"x"},u(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[_,b-w-T],domain:[g-s/2,g+s/2],_id:"y"},u(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=f({},t.aaxis,{range:[_,b-w-T],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(M,p.graphDiv._fullLayout),M.setScale();var E=p.baxis=f({},t.baxis,{range:[b-_-T,w],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});u(E,p.graphDiv._fullLayout),E.setScale();var S=p.caxis=f({},t.caxis,{range:[b-_-w,T],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(S,p.graphDiv._fullLayout),S.setScale();var C="M"+r+","+(n+i)+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDef.select("path").attr("d",C),p.layers.plotbg.select("path").attr("d",C);var L="M0,"+i+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDefRelative.select("path").attr("d",L);var O="translate("+r+","+n+")";p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",O),p.clipDefRelative.select("path").attr("transform",null);var P="translate("+(r-E._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,"+-M._offset+")";p.layers.aaxis.attr("transform",I),p.layers.agrid.attr("transform",I);var D="translate("+(r+a/2)+","+n+")rotate(-30)translate(0,"+-S._offset+")";p.layers.caxis.attr("transform",D),p.layers.cgrid.attr("transform",D),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+i)+"l"+a/2+",-"+i:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",E.showline?"M"+r+","+(n+i)+"h"+a:"M0,0").call(l.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",S.showline?"M"+(r+a/2)+","+n+"l"+a/2+","+i:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},w.drawAxes=function(t){var e=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),t){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)),c=(i.showticklabels?i.tickfont.size:0)+("outside"===i.ticks?i.ticklen:0)+3;n["a-title"]=v.draw(e,"a"+r,{propContainer:a,propName:this.id+".aaxis.title",placeholder:s(e,"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"]=v.draw(e,"b"+r,{propContainer:i,propName:this.id+".baxis.title",placeholder:s(e,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*i.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=v.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(e,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,"text-anchor":"middle"}})}},w.drawAx=function(t){var e,r=this.graphDiv,n=t._name,a=n.charAt(0),i=t._id,s=this.layers[n],l=a+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll("."+i+"tick").remove(),this[l]=c),t.setScale();var u=h.calcTicks(t),f=h.clipEnds(t,u),p=h.makeTransFn(t),d=h.getTickSigns(t)[2],g=o.deg2rad(30),v=d*(t.linewidth||1)/2,m=d*t.ticklen,y=this.w,x=this.h,b="b"===a?"M0,"+v+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+v+",0l"+Math.cos(g)*m+","+-Math.sin(g)*m,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[a];h.drawTicks(r,t,{vals:"inside"===t.ticks?f:u,layer:s,path:b,transFn:p,crisp:!1}),h.drawGrid(r,t,{vals:f,layer:this.layers[a+"grid"],path:_,transFn:p,crisp:!1}),h.drawLabels(r,t,{vals:u,layer:s,transFn:p,labelFns:h.makeLabelFns(t,0,30)})};var T=b.MINZOOM/2+.87,A="m-0.87,.5h"+T+"v3h-"+(T+5.2)+"l"+(T/2+2.6)+",-"+(.87*T+4.5)+"l2.6,1.5l-"+T/2+","+.87*T+"Z",M="m0.87,.5h-"+T+"v3h"+(T+5.2)+"l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-2.6,1.5l"+T/2+","+.87*T+"Z",E="m0,1l"+T/2+","+.87*T+"l2.6,-1.5l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-"+(T/2+2.6)+","+(.87*T+4.5)+"l2.6,1.5l"+T/2+",-"+.87*T+"Z",S=!0;function C(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var t,e,r,n,u,f,p,h,v,_,w=this,T=w.layers.plotbg.select("path").node(),L=w.graphDiv,O=L._fullLayout._zoomlayer,P={element:T,gd:L,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(i,o,s){P.xaxes=[w.xaxis],P.yaxes=[w.yaxis];var c=L._fullLayout.dragmode;P.minDrag="lasso"===c?1:void 0,"zoom"===c?(P.moveFn=B,P.clickFn=D,P.doneFn=N,function(i,o,s){var c=T.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,f=a(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),p="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",h=!1,v=O.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",p),_=O.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"),x(L)}(0,o,s)):"pan"===c?(P.moveFn=j,P.clickFn=D,P.doneFn=V,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(L)):"select"!==c&&"lasso"!==c||m(i,o,s,P,c)}};function I(t){var e={};return e[w.id+".aaxis.min"]=t.a,e[w.id+".baxis.min"]=t.b,e[w.id+".caxis.min"]=t.c,e}function D(t,e){var r=L._fullLayout.clickmode;C(L),2===t&&(L.emit("plotly_doubleclick",null),i.call("_guiRelayout",L,I({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&y(e,L,[w.xaxis],[w.yaxis],w.id,P),r.indexOf("event")>-1&&g.click(L,e,w.id)}function z(t,e){return 1-e/w.h}function R(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function F(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function B(a,i){var o=t+a,s=e+i,l=Math.max(0,Math.min(1,z(0,e),z(0,s))),c=Math.max(0,Math.min(1,R(t,e),R(o,s))),d=Math.max(0,Math.min(1,F(t,e),F(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,T=(1-l)*w.h,S=T-x/k;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),h=!0),L.emit("plotly_relayouting",I(u))}function N(){C(L),u!==r&&(i.call("_guiRelayout",L,I(u)),S&&L.data&&L._context.showTips&&(o.notifier(s(L,"Double-click to zoom back out"),"long"),S=!1))}function j(t,e){var n=t/w.xaxis._m,a=e/w.yaxis._m,i=[(u={a:r.a-a,b:r.b+(n+a)/2,c:r.c-(n-a)/2}).a,u.b,u.c].sort(),o=i.indexOf(u.a),s=i.indexOf(u.b),l=i.indexOf(u.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),u={a:i[o],b:i[s],c:i[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var f="translate("+(w.x0+t)+","+(w.y0+e)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",f);var p="translate("+-t+","+-e+")";w.clipDefRelative.select("path").attr("transform",p),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,w),L.emit("plotly_relayouting",I(u))}function V(){i.call("_guiRelayout",L,I(u))}T.onmousemove=function(t){g.hover(L,t,w.id),L._fullLayout._lasthover=T,L._fullLayout._hoversubplot=w.id},T.onmouseout=function(t){L._dragging||d.unhover(L,t)},d.init(P)}},{"../../components/color":592,"../../components/dragelement":610,"../../components/drawing":613,"../../components/fx":630,"../../components/titles":679,"../../lib":717,"../../lib/extend":708,"../../registry":846,"../cartesian/axes":765,"../cartesian/constants":771,"../cartesian/select":782,"../cartesian/set_convert":783,"../plots":826,d3:165,tinycolor2:536}],846:[function(t,e,r){"use strict";var n=t("./lib/loggers"),a=t("./lib/noop"),i=t("./lib/push_unique"),o=t("./lib/is_plain_object"),s=t("./lib/dom").addStyleRule,l=t("./lib/extend"),c=t("./plots/attributes"),u=t("./plots/layout_attributes"),f=l.extendFlat,p=l.extendDeepAll;function h(t){var e=t.name,a=t.categories,i=t.meta;if(r.modules[e])n.log("Type "+e+" already registered");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])n.log("Plot type "+e+" already registered.");else for(var a in m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(a,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[h[r]].title={text:""});for(r=0;r")?"":e.html(t).text()}));return e.remove(),r}(k)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(k=(k=(k=k.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),k}},{"../components/color":592,"../components/drawing":613,"../constants/xmlns_namespaces":694,"../lib":717,d3:165}],855:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r0&&f.s>0||(c=!1)}o._extremes[t._id]=s.findExtremes(t,l,{tozero:!c,padded:!0})}}function m(t){for(var e=t.traces,r=0;rf+c||!n(u))}for(var h=0;h0&&_.s>0||(m=!1)}}g._extremes[t._id]=s.findExtremes(t,v,{tozero:!m,padded:y})}}function x(t){return t._id.charAt(0)}e.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,a=t._fullLayout,i=t._fullData,s=t.calcdata,l=[],c=[],f=0;fi))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return a(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e0?a+=i:e<0&&(a-=i)}return n.inbox(r-e,a-e,x+(a-e)/(a-r)-1)}"h"===g.orientation?(i=r,s=e,c="y",u="x",f=E,p=M):(i=e,s=r,c="x",u="y",p=E,f=M);var S=t[c+"a"],C=t[u+"a"];h=Math.abs(S.r2c(S.range[1])-S.r2c(S.range[0]));var L=n.getDistanceFunction(a,f,p,(function(t){return(f(t)+p(t))/2}));if(n.getClosest(d,L,t),!1!==t.index){m||(k=function(t){return Math.min(_(t),t.p-v.bargroupwidth/2)},T=function(t){return Math.max(w(t),t.p+v.bargroupwidth/2)});var O=d[t.index],P=g.base?O.b+O.s:O.s;t[u+"0"]=t[u+"1"]=C.c2p(O[u],!0),t[u+"LabelVal"]=P;var I=v.extents[v.extents.round(O.p)];return t[c+"0"]=S.c2p(m?k(O):I[0],!0),t[c+"1"]=S.c2p(m?T(O):I[1],!0),t[c+"LabelVal"]=O.p,t.labelLabel=l(S,t[c+"LabelVal"]),t.valueLabel=l(C,t[u+"LabelVal"]),t.spikeDistance=(E(O)+function(t){return A(_(t),w(t))}(O))/2+b-x,t[c+"Spike"]=S.c2p(O.p,!0),o(O,g,t),t.hovertemplate=g.hovertemplate,t}}function u(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,a=s(t,e);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}e.exports={hoverPoints:function(t,e,r,n){var i=c(t,e,r,n);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=u(s,l),a.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}},hoverOnBars:c,getTraceColor:u}},{"../../components/color":592,"../../components/fx":630,"../../lib":717,"../../plots/cartesian/axes":765,"../../registry":846,"./helpers":862}],864:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc").crossTraceCalc,colorbar:t("../scatter/marker_colorbar"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"bar",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":776,"../scatter/marker_colorbar":1138,"./arrays_to_calcdata":855,"./attributes":856,"./calc":857,"./cross_trace_calc":859,"./defaults":860,"./event_data":861,"./hover":863,"./layout_attributes":865,"./layout_defaults":866,"./plot":867,"./select":868,"./style":870}],865:[function(t,e,r){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],866:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/cartesian/axes"),i=t("../../lib"),o=t("./layout_attributes");e.exports=function(t,e,r){function s(r,n){return i.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},p=s("barmode"),h=0;h0}function E(t){return"auto"===t?0:t}function S(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:t.width*a+t.height*n,y:t.width*n+t.height*a}}function C(t,e,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,c=i.anchor||"end",u="end"===c,f="start"===c,p=((i.leftToRight||0)+1)/2,h=1-p,d=a.width,g=a.height,v=Math.abs(e-t),m=Math.abs(n-r),y=v>2*_&&m>2*_?_:0;v-=2*y,m-=2*y;var x=E(l);"auto"!==l||d<=v&&g<=m||!(d>v||g>m)||(d>m||g>v)&&d.01?Y:function(t,e){return Math.abs(t-e)>=2?Y(t):t>e?Math.ceil(t):Math.floor(t)};q&&(R=X(R,F),F=X(F,R)),H&&(B=X(B,N),N=X(N,B))}var Z=A(i.ensureSingle(k,"path"),O,v,m);if(Z.style("vector-effect","non-scaling-stroke").attr("d","M"+R+","+B+"V"+N+"H"+F+"V"+B+"Z").call(l.setClipUrl,e.layerClipId,t),!O.uniformtext.mode&&M(v)){var J=l.makePointStyleFns(f);l.singlePointStyle(c,Z,f,J,t)}!function(t,e,r,n,a,s,c,f,h,v,m){var w,k=e.xaxis,M=e.yaxis,L=t._fullLayout;function O(e,r,n){return i.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t)}var P=n[0].trace,I="h"===P.orientation,D=function(t,e,r,n,a){var o,s=e[0].trace;return o=s.texttemplate?function(t,e,r,n,a){var o=e[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l,c,f,p,h="waterfall"===o.type,d="funnel"===o.type;function g(t){return u(p,+t,!0).text}"h"===o.orientation?(l="y",c=a,f="x",p=n):(l="x",c=n,f="y",p=a);var v,m=e[r],y={};y.label=m.p,y.labelLabel=y[l+"Label"]=(v=m.p,u(c,v,!0).text);var x=i.castOption(o,m.i,"text");(0===x||x)&&(y.text=x),y.value=m.s,y.valueLabel=y[f+"Label"]=g(m.s);var _={};b(_,o,m.i),h&&(y.delta=+m.rawS||m.s,y.deltaLabel=g(y.delta),y.final=m.v,y.finalLabel=g(y.final),y.initial=y.final-y.delta,y.initialLabel=g(y.initial)),d&&(y.value=m.s,y.valueLabel=g(y.value),y.percentInitial=m.begR,y.percentInitialLabel=i.formatPercent(m.begR),y.percentPrevious=m.difR,y.percentPreviousLabel=i.formatPercent(m.difR),y.percentTotal=m.sumR,y.percenTotalLabel=i.formatPercent(m.sumR));var w=i.castOption(o,m.i,"customdata");return w&&(y.customdata=w),i.texttemplateString(s,y,t._d3locale,_,y,o._meta||{})}(t,e,r,n,a):s.textinfo?function(t,e,r,n){var a=t[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function c(t){return u(o?r:n,+t,!0).text}var f,p,h=a.textinfo,d=t[e],g=h.split("+"),v=[],m=function(t){return-1!==g.indexOf(t)};if(m("label")&&v.push((p=t[e].p,u(o?n:r,p,!0).text)),m("text")&&(0===(f=i.castOption(a,d.i,"text"))||f)&&v.push(f),s){var y=+d.rawS||d.s,x=d.v,b=x-y;m("initial")&&v.push(c(b)),m("delta")&&v.push(c(y)),m("final")&&v.push(c(x))}if(l){m("value")&&v.push(c(d.s));var _=0;m("percent initial")&&_++,m("percent previous")&&_++,m("percent total")&&_++;var w=_>1;m("percent initial")&&(f=i.formatPercent(d.begR),w&&(f+=" of initial"),v.push(f)),m("percent previous")&&(f=i.formatPercent(d.difR),w&&(f+=" of previous"),v.push(f)),m("percent total")&&(f=i.formatPercent(d.sumR),w&&(f+=" of total"),v.push(f))}return v.join("
")}(e,r,n,a):g.getValue(s.text,r),g.coerceString(y,o)}(L,n,a,k,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(P,a);var z="stack"===v.mode||"relative"===v.mode,R=n[a],F=!z||R._outmost;if(D&&"none"!==w&&(!R.isBlank&&s!==c&&f!==h||"auto"!==w&&"inside"!==w)){var B=L.font,N=d.getBarColor(n[a],P),j=d.getInsideTextFont(P,a,B,N),V=d.getOutsideTextFont(P,a,B),U=r.datum();I?"log"===k.type&&U.s0<=0&&(s=k.range[0]=G*(Z/W):Z>=W*(X/G);G>0&&W>0&&(J||K||$)?w="inside":(w="outside",q.remove(),q=null)}else w="inside";if(!q){Y=i.ensureUniformFontSize(t,"outside"===w?V:j);var Q=(q=O(r,D,Y)).attr("transform");if(q.attr("transform",""),H=l.bBox(q.node()),G=H.width,W=H.height,q.attr("transform",Q),G<=0||W<=0)return void q.remove()}var tt,et,rt=P.textangle;"outside"===w?(et="both"===P.constraintext||"outside"===P.constraintext,tt=function(t,e,r,n,a,i){var o,s=!!i.isHorizontal,l=!!i.constrained,c=i.angle||0,u=a.width,f=a.height,p=Math.abs(e-t),h=Math.abs(n-r);o=s?h>2*_?_:0:p>2*_?_:0;var d=1;l&&(d=s?Math.min(1,h/f):Math.min(1,p/u));var g=E(c),v=S(a,g),m=(s?v.x:v.y)/2,y=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(t+e)/2,w=(r+n)/2,k=0,A=0,M=s?T(e,t):T(r,n);return s?(b=e-M*o,k=M*m):(w=n+M*o,A=-M*m),{textX:y,textY:x,targetX:b,targetY:w,anchorX:k,anchorY:A,scale:d,rotate:g}}(s,c,f,h,H,{isHorizontal:I,constrained:et,angle:rt})):(et="both"===P.constraintext||"inside"===P.constraintext,tt=C(s,c,f,h,H,{isHorizontal:I,constrained:et,angle:rt,anchor:P.insidetextanchor})),tt.fontSize=Y.size,p(P.type,tt,L),R.transform=tt,A(q,L,v,m).attr("transform",i.getTextTransform(tt))}else r.select("text").remove()}(t,e,k,r,h,R,F,B,N,v,m),e.layerClipId&&l.hideOutsideRangePoint(c,k.select("text"),w,L,f.xcalendar,f.ycalendar)}));var N=!1===f.cliponaxis;l.setClipUrl(c,N?null:e.layerClipId,t)}));c.getComponentMethod("errorbars","plot")(t,P,e,v)},toMoveInsideBar:C}},{"../../components/color":592,"../../components/drawing":613,"../../components/fx/helpers":627,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../registry":846,"./attributes":856,"./constants":858,"./helpers":862,"./style":870,"./uniform_text":872,d3:165,"fast-isnumeric":228}],868:[function(t,e,r){"use strict";function n(t,e,r,n,a){var i=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return a?[(i+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(i+o)/2,l]}e.exports=function(t,e){var r,a=t.cd,i=t.xaxis,o=t.yaxis,s=a[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===a.bargap&&0===a.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var a=e[0].trace;a.selectedpoints?function(t,e,r){i.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each((function(t){var a,s=n.select(this);if(t.selected){a=o.ensureUniformFontSize(r,v(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(a.color=l),i.font(s,a)}else i.selectedTextStyle(s,e)}))}(t.selectAll("text"),e,r)}(r,a,t):(d(r,a,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{"../../components/color":592,"../../components/drawing":613,"../../lib":717,"../../registry":846,"./attributes":856,"./helpers":862,"./uniform_text":872,d3:165}],871:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),a(t,"marker")&&i(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(t,"marker.line")&&i(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":592,"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603}],872:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib");function i(t){return"_"+t+"Text_minsize"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=i(t),a=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=op.range[1]&&(x+=Math.PI),n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=a.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.hovertemplate=u.hovertemplate,t.color=i(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":630,"../../lib":717,"../../plots/polar/helpers":828,"../bar/hover":863,"../scatterpolar/hover":1197}],877:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("../scatterpolar/format_labels"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":829,"../bar/select":868,"../bar/style":870,"../scatter/marker_colorbar":1138,"../scatterpolar/format_labels":1196,"./attributes":873,"./calc":874,"./defaults":875,"./hover":876,"./layout_attributes":878,"./layout_defaults":879,"./plot":880}],878:[function(t,e,r){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],879:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i,o={};function s(r,o){return n.coerce(t[i]||{},e[i],a,r,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,a,c,u,f,e,r)}:function(t,n,a,o){return i.pathAnnulus(t,n,a,o,e,r)}}(e),h=e.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(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),h=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(a(o)&&a(s)&&a(h)&&a(d)&&o!==s&&h!==d){var g=u.c2g(t.s1),v=(h+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=p(o,s,h,d)}else e="M0,0Z";i.ensureSingle(r,"path").attr("d",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},{"../../components/drawing":613,"../../lib":717,"../../plots/polar/helpers":828,d3:165,"fast-isnumeric":228}],881:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../bar/attributes"),i=t("../../components/color/attributes"),o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../lib/extend").extendFlat,l=n.marker,c=l.line;e.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"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},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({},c.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:s({},c.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,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":591,"../../lib/extend":708,"../../plots/template_attributes":841,"../bar/attributes":856,"../scatter/attributes":1120}],882:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../plots/cartesian/axes"),i=t("../../lib"),o=t("../../constants/numerical").BADNUM,s=i._;e.exports=function(t,e){var r,l,m,y,x,b,_=t._fullLayout,w=a.getFromId(t,e.xaxis||"x"),k=a.getFromId(t,e.yaxis||"y"),T=[],A="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(m=w,y="x",x=k,b="y"):(m=k,y="y",x=w,b="x");var M,E,S,C,L,O,P=function(t,e,r,a){var o,s=e+"0"in t,l="d"+e in t;if(e in t||s&&l)return r.makeCalcdata(t,e);o=s?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||i.isDateTime(t.name)&&"date"===r.type)?t.name:a;for(var c="multicategory"===r.type?r.r2c_just_indices(o):r.d2c(o,0,t[e+"calendar"]),u=t._length,f=new Array(u),p=0;pM.uf};if(e._hasPreCompStats){var F=e[y],B=function(t){return m.d2c((e[t]||[])[r])},N=1/0,j=-1/0;for(r=0;r=M.q1&&M.q3>=M.med){var U=B("lowerfence");M.lf=U!==o&&U<=M.q1?U:p(M,S,C);var q=B("upperfence");M.uf=q!==o&&q>=M.q3?q:h(M,S,C);var H=B("mean");M.mean=H!==o?H:C?i.mean(S,C):(M.q1+M.q3)/2;var G=B("sd");M.sd=H!==o&&G>=0?G:C?i.stdev(S,C,M.mean):M.q3-M.q1,M.lo=d(M),M.uo=g(M);var W=B("notchspan");W=W!==o&&W>0?W:v(M,C),M.ln=M.med-W,M.un=M.med+W;var Y=M.lf,X=M.uf;e.boxpoints&&S.length&&(Y=Math.min(Y,S[0]),X=Math.max(X,S[C-1])),e.notched&&(Y=Math.min(Y,M.ln),X=Math.max(X,M.un)),M.min=Y,M.max=X}else{var Z;i.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+M.q1,"median = "+M.med,"q3 = "+M.q3].join("\n")),Z=M.med!==o?M.med:M.q1!==o?M.q3!==o?(M.q1+M.q3)/2:M.q1:M.q3!==o?M.q3:0,M.med=Z,M.q1=M.q3=Z,M.lf=M.uf=Z,M.mean=M.sd=Z,M.ln=M.un=Z,M.min=M.max=Z}N=Math.min(N,M.min),j=Math.max(j,M.max),M.pts2=E.filter(R),T.push(M)}}e._extremes[m._id]=a.findExtremes(m,[N,j],{padded:!0})}else{var J=m.makeCalcdata(e,y),K=function(t,e){for(var r=t.length,n=new Array(r+1),a=0;a=0&&tt<$&&(c(L={v:O,i:r},e,r),Q[tt].push(L))}var et=1/0,rt=-1/0,nt=e.quartilemethod,at="exclusive"===nt,it="inclusive"===nt;for(r=0;r<$;r++)if(Q[r].length>0){var ot,st;(M={}).pos=M[b]=D[r],E=M.pts=Q[r].sort(u),C=(S=M[y]=E.map(f)).length,M.min=S[0],M.max=S[C-1],M.mean=i.mean(S,C),M.sd=i.stdev(S,C,M.mean),M.med=i.interp(S,.5),C%2&&(at||it)?(at?(ot=S.slice(0,C/2),st=S.slice(C/2+1)):it&&(ot=S.slice(0,C/2+1),st=S.slice(C/2)),M.q1=i.interp(ot,.5),M.q3=i.interp(st,.5)):(M.q1=i.interp(S,.25),M.q3=i.interp(S,.75)),M.lf=p(M,S,C),M.uf=h(M,S,C),M.lo=d(M),M.uo=g(M);var lt=v(M,C);M.ln=M.med-lt,M.un=M.med+lt,et=Math.min(et,M.ln),rt=Math.max(rt,M.un),M.pts2=E.filter(R),T.push(M)}e._extremes[m._id]=a.findExtremes(m,e.notched?J.concat([et,rt]):J,{padded:!0})}return function(t,e){if(i.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(T[0].t={num:_[A],dPos:z,posLetter:b,valLetter:y,labels:{med:s(t,"median:"),min:s(t,"min:"),q1:s(t,"q1:"),q3:s(t,"q3:"),max:s(t,"max:"),mean:"sd"===e.boxmean?s(t,"mean ± σ:"):s(t,"mean:"),lf:s(t,"lower fence:"),uf:s(t,"upper fence:")}},_[A]++,T):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(t,e,r){for(var n in l)i.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?i.isArrayOrTypedArray(e[n][r[0]])&&(t[l[n]]=e[n][r[0]][r[1]]):t[l[n]]=e[n][r])}function u(t,e){return t.v-e.v}function f(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(i.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function h(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(i.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function d(t){return 4*t.q1-3*t.q3}function g(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{"../../constants/numerical":693,"../../lib":717,"../../plots/cartesian/axes":765,"fast-isnumeric":228}],883:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib"),i=t("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,p=o._id,h=p.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+"gap"],_=1-f[t+"groupgap"];for(s=0;s0){var H=S.pointpos,G=S.jitter,W=S.marker.size/2,Y=0;H+G>=0&&((Y=U*(H+G))>M?(q=!0,j=W,B=Y):Y>R&&(j=W,B=M)),Y<=M&&(B=M);var X=0;H-G<=0&&((X=-U*(H-G))>E?(q=!0,V=W,N=X):X>F&&(V=W,N=E)),X<=E&&(N=E)}else B=M,N=E;var Z=new Array(c.length);for(l=0;l0?(v="v",m=x>0?Math.min(_,b):Math.min(b)):x>0?(v="h",m=Math.min(_)):m=0;if(m){e._length=m;var A=r("orientation",v);e._hasPreCompStats?"v"===A&&0===x?(r("x0",0),r("dx",1)):"h"===A&&0===y&&(r("y0",0),r("dy",1)):"v"===A&&0===x?r("x0"):"h"===A&&0===y&&r("y0"),a.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],i)}else e.visible=!1}function u(t,e,r,a){var i=a.prefix,o=n.coerce2(t,e,l,"marker.outliercolor"),s=r("marker.line.outliercolor"),c="outliers";e._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=r(i+"points",c);u?(r("jitter","all"===u?.3:0),r("pointpos","all"===u?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.color",e.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===u&&(r("marker.line.outliercolor",e.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete e.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,a){function o(r,a){return n.coerce(t,e,l,r,a)}if(c(t,e,o,a),!1!==e.visible){var s=e._hasPreCompStats;s&&(o("lowerfence"),o("upperfence")),o("line.color",(t.marker||{}).color||r),o("line.width"),o("fillcolor",i.addOpacity(e.line.color,.5));var f=!1;if(s){var p=o("mean"),h=o("sd");p&&p.length&&(f=!0,h&&h.length&&(f="sd"))}o("boxmean",f),o("whiskerwidth"),o("width"),o("quartilemethod");var d=!1;if(s){var g=o("notchspan");g&&g.length&&(d=!0)}else n.validate(t.notchwidth,l.notchwidth)&&(d=!0);o("notched",d)&&o("notchwidth"),u(t,e,o,{prefix:"box"})}},crossTraceDefaults:function(t,e){var r,a;function i(t){return n.coerce(a._input,a,l,t)}for(var s=0;st.lo&&(x.so=!0)}return i}));p.enter().append("path").classed("point",!0),p.exit().remove(),p.call(i.translatePoints,o,s)}function l(t,e,r,i){var o,s,l=e.pos,c=e.val,u=i.bPos,f=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=t.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(t){var e=l.c2l(t.pos+u,!0),a=l.l2p(e)+f,i=l.l2p(e-o)+f,h=l.l2p(e+s)+f,d=c.c2p(t.mean,!0),g=c.c2p(t.mean-t.sd,!0),v=c.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+d+","+i+"V"+h+("sd"===p?"m0,0L"+g+","+a+"L"+d+","+i+"L"+v+","+a+"Z":"")):n.select(this).attr("d","M"+i+","+d+"H"+h+("sd"===p?"m0,0L"+a+","+g+"L"+i+","+d+"L"+a+","+v+"Z":""))}))}e.exports={plot:function(t,e,r,i){var c=e.xaxis,u=e.yaxis;a.makeTraceGroups(i,r,"trace boxes").each((function(t){var e,r,a=n.select(this),i=t[0],f=i.t,p=i.trace;f.wdPos=f.bdPos*p.whiskerwidth,!0!==p.visible||f.empty?a.remove():("h"===p.orientation?(e=u,r=c):(e=c,r=u),o(a,{pos:e,val:r},p,f),s(a,{x:c,y:u},p,f),l(a,{pos:e,val:r},p,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{"../../components/drawing":613,"../../lib":717,d3:165}],891:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,a=t.cd,i=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;for(var a=1/0,i=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,I=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,z=O(E+L),R=P(S-L),F=[[f=M(E)]];for(i=z;i*C=0;a--)i[u-a]=t[f][a],o[u-a]=e[f][a];for(s.push({x:i,y:o,bicubic:l}),a=f,i=[],o=[];a>=0;a--)i[f-a]=t[a][0],o[f-a]=e[a][0];return s.push({x:i,y:o,bicubic:c}),s}},{}],905:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e,r){var i,o,s,l,c,u,f,p,h,d,g,v,m,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,E=t._yctrl,S=M[0].length,C=M.length,L=t._a.length,O=t._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,c,u,f,h,d,g,v,m=[],y=[],x={};if("b"===e)for(i=t.b2j(n),o=Math.floor(Math.max(0,Math.min(O-2,i))),s=i-o,x.length=O,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,i)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},a=0;a0&&(h=t.dxydi([],a-1,o,0,s),m.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),d=t.dxydi([],a-1,o,1,s),m.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),m.push(f[0]),y.push(f[1]),l=f;else for(a=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,a))),u=a-c,x.length=L,x.crossLength=O,x.xy=function(e){return t.evalxy([],a,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},i=0;i0&&(g=t.dxydj([],c,i-1,u,0),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,i-1,u,1),m.push(f[0]-v[0]/3),y.push(f[1]-v[1]/3)),m.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=p,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function D(n){var a,i,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=T.length,"b"===e)for(o=Math.max(0,Math.min(O-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},a=0;ax.length-1||_.push(a(D(o),{color:b.gridcolor,width:b.gridwidth}));for(p=u;px.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],i=0;ix[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(D(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=c[1],p=u;p<=f;p++)h=b.tick0+b.dtick*p,_.push(a(I(h),{color:b.gridcolor,width:b.gridwidth}));for(p=u-1;px[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":708,"../../plots/cartesian/axes":765}],906:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,i,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],a=0;a90&&(h-=180,l=-l),{angle:h,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],920:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=t("../../constants/alignment");function f(t,e,r,a,s,l){var c="const-"+s+"-lines",u=r.selectAll("."+c).data(l);u.enter().append("path").classed(c,!0).style("vector-effect","non-scaling-stroke"),u.each((function(r){var a=r,s=a.x,l=a.y,c=i([],s,t.c2p),u=i([],l,e.c2p),f="M"+o(c,u,a.smoothing);n.select(this).attr("d",f).style("stroke-width",a.width).style("stroke",a.color).style("fill","none")})),u.exit().remove()}function p(t,e,r,i,o,c,u,f){var p=c.selectAll("text."+f).data(u);p.enter().append("text").classed(f,!0);var h=0,d={};return p.each((function(o,c){var u;if("auto"===o.axis.tickangle)u=s(i,e,r,o.xy,o.dxy);else{var f=(o.axis.tickangle+180)*Math.PI/180;u=s(i,e,r,o.xy,[Math.cos(f),Math.sin(f)])}c||(d={angle:u.angle,flip:u.flip});var p=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(l.convertToTspans,t),v=a.bBox(this);g.attr("transform","translate("+u.p[0]+","+u.p[1]+") rotate("+u.angle+")translate("+o.axis.labelpadding*p+","+.3*v.height+")"),h=Math.max(h,v.width+o.axis.labelpadding)})),p.exit().remove(),d.maxExtent=h,d}e.exports=function(t,e,r,a){var l=e.xaxis,u=e.yaxis,h=t._fullLayout._clips;c.makeTraceGroups(a,r,"trace").each((function(e){var r=n.select(this),a=e[0],d=a.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",d.opacity),f(l,u,x,0,"a",v._gridlines),f(l,u,x,0,"b",m._gridlines),f(l,u,y,0,"a",v._minorgridlines),f(l,u,y,0,"b",m._minorgridlines),f(l,u,b,0,"a-boundary",v._boundarylines),f(l,u,b,0,"b-boundary",m._boundarylines);var w=p(t,l,u,d,0,_,v._labels,"a-label"),k=p(t,l,u,d,0,_,m._labels,"b-label");!function(t,e,r,n,a,i,o,l){var u,f,p,h,d=c.aggNums(Math.min,null,r.a),v=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+v),f=m,p=r.ab2xy(u,f,!0),h=r.dxyda_rough(u,f),void 0===o.angle&&c.extendFlat(o,s(r,a,i,p,r.dxydb_rough(u,f))),g(t,e,r,0,p,h,r.aaxis,a,i,o,"a-title"),u=d,f=.5*(m+y),p=r.ab2xy(u,f,!0),h=r.dxydb_rough(u,f),void 0===l.angle&&c.extendFlat(l,s(r,a,i,p,r.dxyda_rough(u,f))),g(t,e,r,0,p,h,r.baxis,a,i,l,"b-title")}(t,_,d,0,l,u,w,k),function(t,e,r,n,a){var s,l,u,f,p=r.select("#"+t._clipPathId);p.size()||(p=r.append("clipPath").classed("carpetclip",!0));var h=c.ensureSingle(p,"path","carpetboundary"),d=e.clipsegments,g=[];for(f=0;f90&&v<270,y=n.select(this);y.text(u.title.text).call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*h*i-x),y.attr("transform","translate("+e.p[0]+","+e.p[1]+") rotate("+e.angle+") translate(0,"+x+")").classed("user-select-none",!0).attr("text-anchor","middle").call(a.font,u.title.font)})),y.exit().remove()}},{"../../components/drawing":613,"../../constants/alignment":686,"../../lib":717,"../../lib/svg_text_utils":741,"./makepath":917,"./map_1d_array":918,"./orient_text":919,d3:165}],921:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/search").findBin,i=t("./compute_control_points"),o=t("./create_spline_evaluator"),s=t("./create_i_derivative_evaluator"),l=t("./create_j_derivative_evaluator");e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,p=t.baxis,h=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;h-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>h&&tg&&ed||ev},t.setScale=function(){var e=t._x,r=t._y,n=i(t._xctrl,t._yctrl,e,r,f.smoothing,p.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,p.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,p.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,p.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(a(t,e),c-2)),n=e[r],i=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(i-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(a(t,r),u-2)),n=r[e],i=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(i-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,a,i){if(!i&&(ne[c-1]|ar[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(a),l=t.evalxy([],o,s);if(i){var f,p,h,d,g=0,v=0,m=[];ne[c-1]?(f=c-2,p=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):p=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),ar[u-1]?(h=u-2,d=1,v=(a-r[u-1])/(r[u-1]-r[u-2])):d=s-(h=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,f,h,p,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,f,h,p,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,a){var i=t.dxydi(null,e,r,n,a),o=t.dadi(e,n);return[i[0]/o,i[1]/o]},t.dxydb=function(e,r,n,a){var i=t.dxydj(null,e,r,n,a),o=t.dbdj(r,a);return[i[0]/o,i[1]/o]},t.dxyda_rough=function(e,r,n){var a=m*(n||.1),i=t.ab2xy(e+a,r,!0),o=t.ab2xy(e-a,r,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dxydb_rough=function(e,r,n){var a=y*(n||.1),i=t.ab2xy(e,r+a,!0),o=t.ab2xy(e,r-a,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":736,"./compute_control_points":909,"./constants":910,"./create_i_derivative_evaluator":911,"./create_j_derivative_evaluator":912,"./create_spline_evaluator":913}],922:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var a,i,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,a=0,i=0;return e>0&&void 0!==(n=t[r][e-1])&&(i++,a+=n),e0&&void 0!==(n=t[r-1][e])&&(i++,a+=n),r0&&i0&&a1e-5);return n.log("Smoother converged to",T,"after",A,"iterations"),t}},{"../../lib":717}],923:[function(t,e,r){"use strict";var n=t("../../lib").isArray1D;e.exports=function(t,e,r){var a=r("x"),i=a&&a.length,o=r("y"),s=o&&o.length;if(!i&&!s)return!1;if(e._cheater=!a,i&&!n(a)||s&&!n(o))e._length=null;else{var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{"../../lib":717}],924:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../scattergeo/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../plots/attributes"),s=t("../../components/color/attributes").defaultLine,l=t("../../lib/extend").extendFlat,c=a.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},a.geojson,{}),featureidkey:a.featureidkey,text:l({},a.text,{}),hovertext:l({},a.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.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(),showlegend:l({},o.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":591,"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scattergeo/attributes":1161}],925:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../constants/numerical").BADNUM,i=t("../../components/colorscale/calc"),o=t("../scatter/arrays_to_calcdata"),s=t("../scatter/calc_selection");function l(t){return t&&"string"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f")}}(t,f,o,p.mockAxis),[t]}},{"../../lib":717,"../../plots/cartesian/axes":765,"./attributes":924}],929:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"choropleth",basePlotModule:t("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":795,"../heatmap/colorbar":1003,"./attributes":924,"./calc":925,"./defaults":926,"./event_data":927,"./hover":928,"./plot":930,"./select":931,"./style":932}],930:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../lib/geo_location_utils"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../plots/cartesian/autorange").findExtremes,l=t("./style").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],a=n._subplot,l=r.locationmode,c=r._length,u="geojson-id"===l?i.extractTraceFeature(t):o(r,a.topojson),f=[],p=[],h=0;h=0;n--){var a=r[n].id;if("string"==typeof a&&0===a.indexOf("water"))for(var i=n+1;i=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,a=new o(t,r.uid),i=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(i,{type:"geojson",data:s.geojson}),a._addLayers(s,l),e[0].trace._glTrace=a,a}},{"../../plots/mapbox/constants":818,"./convert":934}],938:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../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"]}),showlegend:s({},o.showlegend,{dflt:!1})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(t){l[t]=i[t]})),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,e.exports=l},{"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../mesh3d/attributes":1061}],939:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,a=e.v,i=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,a.length,i.length),s=-1/0,l=1/0,c=0;co.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,c=-1/0,u=1/0;for(r=0;r":h>c&&(n.prefixBoundary=!0);break;case"<":(hc||n.starts.length&&p===u)&&(n.prefixBoundary=!0);break;case"][":f=Math.min(h[0],h[1]),p=Math.max(h[0],h[1]),fc&&(n.prefixBoundary=!0)}}}},{}],946:[function(t,e,r){"use strict";var n=t("../../components/colorscale"),a=t("./make_color_map"),i=t("./end_plus");e.exports={min:"zmin",max:"zmax",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=a(e,{isColorbar:!0});if("heatmap"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:i(o),size:l}}}},{"../../components/colorscale":604,"./end_plus":954,"./make_color_map":959}],947:[function(t,e,r){"use strict";e.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}}},{}],948:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./label_defaults"),i=t("../../components/color"),o=i.addOpacity,s=i.opacity,l=t("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,i,l,f){var p,h,d,g=e.contours,v=r("contours.operation");g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),"="===v?p=g.showlines=!0:(p=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),p&&(h=r("line.color",d&&s(d)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash")),r("line.smoothing"),a(r,i,h,f)}},{"../../components/color":592,"../../constants/filter_ops":689,"./label_defaults":958,"fast-isnumeric":228}],949:[function(t,e,r){"use strict";var n=t("../../constants/filter_ops"),a=t("fast-isnumeric");function i(t,e){var r,i=Array.isArray(e);function o(t){return a(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(i?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=i?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=i?e.map(o):[o(e)]),r}function o(t){return function(e){e=i(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=i(t,e),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":689,"fast-isnumeric":228}],950:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=n("contours.start"),i=n("contours.end"),o=!1===a||!1===i,s=r("contours.size");!(o?e.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],951:[function(t,e,r){"use strict";var n=t("../../lib");function a(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}e.exports=function(t,e){var r,i,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),i=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":717,"./constraint_mapping":949,"./end_plus":954}],954:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],955:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./constants");function i(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(t)?i=1:-1!==a.LEFTSTART.indexOf(t)?n=1:-1!==a.TOPSTART.indexOf(t)?i=-1:n=-1,[n,i]}(f,r,e),h=[s(t,e,[-p[0],-p[1]])],d=t.z.length,g=t.z[0].length,v=e.slice(),m=p.slice();for(c=0;c<1e4;c++){if(f>20?(f=a.CHOOSESADDLE[f][(p[0]||p[1])<0?0:1],t.crossings[u]=a.SADDLEREMAINDER[f]):delete t.crossings[u],!(p=a.NEWDELTA[f])){n.log("Found bad marching index:",f,e,t.level);break}h.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],u=e.join(","),i(h[h.length-1],h[h.length-2],o,l)&&h.pop();var y=p[0]&&(e[0]<0||e[0]>g-2)||p[1]&&(e[1]<0||e[1]>d-2);if(e[0]===v[0]&&e[1]===v[1]&&p[0]===m[0]&&p[1]===m[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,k,T,A,M,E,S,C,L,O,P,I,D=i(h[0],h[h.length-1],o,l),z=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&E--,t.edgepaths[E]=C.concat(h,S));break}U||(t.edgepaths[M]=h.concat(S))}for(M=0;Mt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,i,o,s,l,c,u,f,p=t[0].z,h=p.length,d=p[0].length,g=2===h||2===d;for(r=0;r=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):a.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;f+="L"+n}if(s===t.edgepaths.length){a.log("unclosed perimeter path");break}p=s,(d=-1===h.indexOf(p))&&(p=h[0],f+="Z")}for(p=0;pn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),h=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(p<1||h<1)return 1/0;var d=m.EDGECOST*(1/(p-1)+1/(h-1));d+=m.ANGLECOST*c*c;for(var g=s-u,v=l-f,y=s+u,x=l+f,b=0;b2*m.MAXCOST)break;h&&(s/=2),l=(o=c-s/2)+1.5*s}if(p<=m.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var a=e.width/2,i=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),f=a*u,p=i*c,h=a*c,d=-i*u,g=[[o-f-p,s-h-d],[o+f-p,s+h-d],[o+f+p,s+h+d],[o-f+p,s-h+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,i,o){var l=t.selectAll("text").data(e,(function(t){return t.text+","+t.x+","+t.y+","+t.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(t){var e=t.x+Math.sin(t.theta)*t.dy,a=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:a,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+a+")"}).call(s.convertToTspans,r)})),o){for(var c="",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),a.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,f=r.end,p=t._input.contours;u>f&&(r.start=p.start=f,f=r.end=p.end=u,u=r.start),r.size>0||(c=u===f?1:i(u,f,t.ncontours).dtick,p.size=r.size=c)}}},{"../../lib":717,"../../plots/cartesian/axes":765}],963:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("../heatmap/style"),o=t("./make_color_map");e.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",(function(t){return t[0].trace.opacity})),e.each((function(t){var e=n.select(this),r=t[0].trace,i=r.contours,s=r.line,l=i.size||1,c=i.start,u="constraint"===i.type,f=!u&&"lines"===i.coloring,p=!u&&"fill"===i.coloring,h=f||p?o(r):null;e.selectAll("g.contourlevel").each((function(t){n.select(this).selectAll("path").call(a.lineGroupStyle,s.width,f?h(t.level):s.color,s.dash)}));var d=i.labelfont;if(e.selectAll("g.contourlabels text").each((function(t){a.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?h(t.level):s.color)})})),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(p){var g;e.selectAll("g.contourfill path").style("fill",(function(t){return void 0===g&&(g=t.level),h(t.level+.5*l)})),void 0===g&&(g=c),e.selectAll("g.contourbg path").style("fill",h(g-.5*l))}})),i(t)}},{"../../components/drawing":613,"../heatmap/style":1012,"./make_color_map":959,d3:165}],964:[function(t,e,r){"use strict";var n=t("../../components/colorscale/defaults"),a=t("./label_defaults");e.exports=function(t,e,r,i,o){var s,l=r("contours.coloring"),c="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,i,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),a(r,i,c,o)}},{"../../components/colorscale/defaults":602,"./label_defaults":958}],965:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),a=t("../contour/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../lib/extend").extendFlat,s=a.contours;e.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":599,"../../lib/extend":708,"../contour/attributes":943,"../heatmap/attributes":1e3}],966:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),a=t("../../lib"),i=t("../heatmap/convert_column_xyz"),o=t("../heatmap/clean_2d_array"),s=t("../heatmap/interp2d"),l=t("../heatmap/find_empties"),c=t("../heatmap/make_bound_array"),u=t("./defaults"),f=t("../carpet/lookup_carpetid"),p=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var h=t.data[r.index],d=t.data[e.index];d.a||(d.a=h.a),d.b||(d.b=h.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,p,h,d,g,v=e._carpetTrace,m=v.aaxis,y=v.baxis;m._minDtick=0,y._minDtick=0,a.isArray1D(e.z)&&i(e,m,y,"a","b",["z"]),r=e._a=e._a||e.a,p=e._b=e._b||e.b,r=r?m.makeCalcdata(e,"_a"):[],p=p?y.makeCalcdata(e,"_b"):[],u=e.a0||0,f=e.da||1,h=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=a.maxRowLength(g),b="scaled"===e.xtype?"":r,_=c(e,b,u,f,x,m),w="scaled"===e.ytype?"":p,k=c(e,w,h,d,g.length,y),T={a:_,b:k,z:g};return"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:"",cLetter:"z"}),[T]}(t,e);return p(e,e._z),g}}},{"../../components/colorscale/calc":600,"../../lib":717,"../carpet/lookup_carpetid":916,"../contour/set_contours":962,"../heatmap/clean_2d_array":1002,"../heatmap/convert_column_xyz":1004,"../heatmap/find_empties":1006,"../heatmap/interp2d":1009,"../heatmap/make_bound_array":1010,"./defaults":967}],967:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../heatmap/xyz_defaults"),i=t("./attributes"),o=t("../contour/constraint_defaults"),s=t("../contour/contours_defaults"),l=t("../contour/style_defaults");e.exports=function(t,e,r,c){function u(r,a){return n.coerce(t,e,i,r,a)}if(u("carpet"),t.a&&t.b){if(!a(t,e,u,c,"a","b"))return void(e.visible=!1);u("text"),"constraint"===u("contours.type")?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,(function(r){return n.coerce2(t,e,i,r)})),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{"../../lib":717,"../contour/constraint_defaults":948,"../contour/contours_defaults":950,"../contour/style_defaults":964,"../heatmap/xyz_defaults":1014,"./attributes":965}],968:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../contour/colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":776,"../contour/colorbar":946,"../contour/style":963,"./attributes":965,"./calc":966,"./defaults":967,"./plot":969}],969:[function(t,e,r){"use strict";var n=t("d3"),a=t("../carpet/map_1d_array"),i=t("../carpet/makepath"),o=t("../../components/drawing"),s=t("../../lib"),l=t("../contour/make_crossings"),c=t("../contour/find_all_paths"),u=t("../contour/plot"),f=t("../contour/constants"),p=t("../contour/convert_to_constraints"),h=t("../contour/empty_pathinfo"),d=t("../contour/close_boundaries"),g=t("../carpet/lookup_carpetid"),v=t("../carpet/axis_aligned_line");function m(t,e,r){var n=t.getPointAtLength(e),a=t.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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),k=r[0],T=k.trace,A=T._carpetTrace=g(t,T),M=t.calcdata[A.index][0];if(A.visible&&"legendonly"!==A.visible){var E=k.a,S=k.b,C=T.contours,L=h(C,e,k),O="constraint"===C.type,P=C._operation,I=O?"="===P?"lines":"fill":C.coloring,D=[[E[0],S[S.length-1]],[E[E.length-1],S[S.length-1]],[E[E.length-1],S[0]],[E[0],S[0]]];l(L);var z=1e-8*(E[E.length-1]-E[0]),R=1e-8*(S[S.length-1]-S[0]);c(L,z,R);var F,B,N,j,V=L;"constraint"===C.type&&(V=p(L,P)),function(t,e){var r,n,a,i,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=a([],F.x,_.c2p),N=a([],F.y,w.c2p),B.reverse(),N.reverse(),U.push(i(B,N,F.bicubic));var q="M"+U.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,f,p,h=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);h.enter().append("path"),h.exit().remove();var d=[];for(p=0;p=0&&(p=C,d=g):Math.abs(f[1]-p[1])=0&&(p=C,d=g):s.log("endpt to newendpt is not vert. or horz.",f,p,C)}if(d>=0)break;y+=E(f,p),f=p}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=E(f,p)+"Z",f=null)}for(u=0;ug&&(n.max=g),n.len=n.max-n.min}function v(t,e){var r,n=0;return(Math.abs(t[0]-l)<.1||Math.abs(t[0]-c)<.1)&&(r=y(a.dxydb_rough(t[0],t[1],.1)),n=Math.max(n,i*x(e,r)/2)),(Math.abs(t[1]-u)<.1||Math.abs(t[1]-f)<.1)&&(r=y(a.dxyda_rough(t[0],t[1],.1)),n=Math.max(n,i*x(e,r)/2)),n}}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var a=Math.min(Math.ceil(n.len/P),f.LABELMAX),i=0;i0?+h[u]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:m},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u<_.length;u++)k.push(_[u][0],_[u][1]);var T=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return a.extendFlat(c.heatmap.paint,{"heatmap-weight":d?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":g?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:f},c.heatmap.layout.visibility="visible",c}},{"../../components/color":592,"../../components/colorscale":604,"../../constants/numerical":693,"../../lib":717,"../../lib/geojson_utils":712,"fast-isnumeric":228}],973:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/colorscale/defaults"),i=t("./attributes");e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(e._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),a(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":602,"../../lib":717,"./attributes":970}],974:[function(t,e,r){"use strict";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],975:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("../scattermapbox/hover");e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=a.tickText(f,f.c2l(u.z),"hover").text}return s.extraText=function(t,e,r){if(!t.hovertemplate){var a=(e.hi||t.hoverinfo).split("+"),i=-1!==a.indexOf("all"),o=-1!==a.indexOf("lon"),s=-1!==a.indexOf("lat"),l=e.lonlat,c=[];return i||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(i||-1!==a.indexOf("text"))&&n.fillText(e,t,c),c.join("
")}function u(t){return t+"°"}}(c,u,l[0].t.labels),[s]}}},{"../../lib":717,"../../plots/cartesian/axes":765,"../scattermapbox/hover":1189}],976:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),formatLabels:t("../scattermapbox/format_labels"),calc:t("./calc"),plot:t("./plot"),hoverPoints:t("./hover"),eventData:t("./event_data"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,a=new i(t,r.uid),o=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}},{"../../plots/mapbox/constants":818,"./convert":972}],978:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),s.color=function(t,e){var r=t.marker,a=e.mc||r.color,i=e.mlc||r.line.color,o=e.mlw||r.line.width;return n(a)?a:n(i)&&o?i:void 0}(c,f),[s]}}},{"../../components/color":592,"../../lib":717,"../bar/hover":863}],986:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../bar/select":868,"./attributes":979,"./calc":980,"./cross_trace_calc":982,"./defaults":983,"./event_data":984,"./hover":985,"./layout_attributes":987,"./layout_defaults":988,"./plot":989,"./style":990}],987:[function(t,e,r){"use strict";e.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"}}},{}],988:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s path").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(i.fill,t.mc||e.color).call(i.stroke,t.mlc||e.line.color).call(a.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(i.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var t=s.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":592,"../../components/drawing":613,"../../constants/interactions":692,"../bar/style":870,"../bar/uniform_text":872,d3:165}],991:[function(t,e,r){"use strict";var n=t("../pie/attributes"),a=t("../../plots/attributes"),i=t("../../plots/domain").attributes,o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../plots/template_attributes").texttemplateAttrs,l=t("../../lib/extend").extendFlat;e.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":708,"../../plots/attributes":762,"../../plots/domain":790,"../../plots/template_attributes":841,"../pie/attributes":1094}],992:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="funnelarea",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":826}],993:[function(t,e,r){"use strict";var n=t("../pie/calc");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:"funnelarea"})}}},{"../pie/calc":1096}],994:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText,s=t("../pie/defaults").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,a,r,i)}var u=c("labels"),f=c("values"),p=s(u,f),h=p.len;if(e._hasLabels=p.hasLabels,e._hasValues=p.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),h){e._length=h,c("marker.line.width")&&c("marker.line.color",l.paper_bgcolor),c("marker.colors"),c("scalegroup");var d,g=c("text"),v=c("texttemplate");if(v||(d=c("textinfo",Array.isArray(g)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),v||d&&"none"!==d){var m=c("textposition");o(t,e,l,c,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}i(e,l,c),c("title.text")&&(c("title.position"),n.coerceFont(c,"title.font",l.font)),c("aspectratio"),c("baseratio")}else e.visible=!1}},{"../../lib":717,"../../plots/domain":790,"../bar/defaults":860,"../pie/defaults":1097,"./attributes":991}],995:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:t("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style"),styleOne:t("../pie/style_one"),meta:{}}},{"../pie/style_one":1105,"./attributes":991,"./base_plot":992,"./calc":993,"./defaults":994,"./layout_attributes":996,"./layout_defaults":997,"./plot":998,"./style":999}],996:[function(t,e,r){"use strict";var n=t("../pie/layout_attributes").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":1101}],997:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},{"../../lib":717,"./layout_attributes":996}],998:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("../../lib"),o=t("../../lib/svg_text_utils"),s=t("../bar/plot").toMoveInsideBar,l=t("../bar/uniform_text"),c=l.recordMinTextSize,u=l.clearMinTextSize,f=t("../pie/helpers"),p=t("../pie/plot"),h=p.attachFxHandlers,d=p.determineInsideTextFont,g=p.layoutAreas,v=p.prerenderTitles,m=p.positionTitleOutside,y=p.formatSliceLabel;function x(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;u("funnelarea",r),v(e,t),g(e,r._size),i.makeTraceGroups(r._funnelarealayer,e,"trace").each((function(e){var l=n.select(this),u=e[0],p=u.trace;!function(t){if(t.length){var e=t[0],r=e.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i,o,s,l=Math.pow(a,2),c=e.vTotal,u=c,f=c*l/(1-l)/c,p=[];for(p.push(S()),o=t.length-1;o>-1;o--)if(!(s=t[o]).hidden){var h=s.v/u;f+=h,p.push(S())}var d=1/0,g=-1/0;for(o=0;o-1;o--)if(!(s=t[o]).hidden){var M=p[A+=1][0],E=p[A][1];s.TL=[-M,E],s.TR=[M,E],s.BL=k,s.BR=T,s.pxmid=(_=s.TR,w=s.BR,[.5*(_[0]+w[0]),.5*(_[1]+w[1])]),k=s.TL,T=s.TR}}function S(){var t,e={x:t=Math.sqrt(f),y:-t};return[e.x,e.y]}}(e),l.each((function(){var l=n.select(this).selectAll("g.slice").data(e);l.enter().append("g").classed("slice",!0),l.exit().remove(),l.each((function(l,g){if(l.hidden)n.select(this).selectAll("path,g").remove();else{l.pointNumber=l.i,l.curveNumber=p.index;var v=u.cx,m=u.cy,b=n.select(this),_=b.selectAll("path.surface").data([l]);_.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),b.call(h,t,e);var w="M"+(v+l.TR[0])+","+(m+l.TR[1])+x(l.TR,l.BR)+x(l.BR,l.BL)+x(l.BL,l.TL)+"Z";_.attr("d",w),y(t,l,u);var k=f.castOption(p.textposition,l.pts),T=b.selectAll("g.slicetext").data(l.text&&"none"!==k?[0]:[]);T.enter().append("g").classed("slicetext",!0),T.exit().remove(),T.each((function(){var u=i.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),f=i.ensureUniformFontSize(t,d(p,l,r.font));u.text(l.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,f).call(o.convertToTspans,t);var h,y,x,b=a.bBox(u.node()),_=Math.min(l.BL[1],l.BR[1])+m,w=Math.max(l.TL[1],l.TR[1])+m;y=Math.max(l.TL[0],l.BL[0])+v,x=Math.min(l.TR[0],l.BR[0])+v,(h=s(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=f.size,c(p.type,h,r),e[g].transform=h,u.attr("transform",i.getTextTransform(h))}))}}));var g=n.select(this).selectAll("g.titletext").data(p.title.text?[0]:[]);g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each((function(){var e=i.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),s=p.title.text;p._meta&&(s=i.templateString(s,p._meta)),e.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,p.title.font).call(o.convertToTspans,t);var l=m(u,r._size);e.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")}))}))}))}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../bar/plot":867,"../bar/uniform_text":872,"../pie/helpers":1099,"../pie/plot":1103,d3:165}],999:[function(t,e,r){"use strict";var n=t("d3"),a=t("../pie/style_one"),i=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(".trace");i(t,e,"funnelarea"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(a,t,e)}))}))}},{"../bar/uniform_text":872,"../pie/style_one":1105,d3:165}],1e3:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../components/colorscale/attributes"),s=(t("../../constants/docs").FORMAT_LINK,t("../../lib/extend").extendFlat);e.exports=s({z:{valType:"data_array",editType:"calc"},x:s({},n.x,{impliedEdits:{xtype:"array"}}),x0:s({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:s({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:s({},n.y,{impliedEdits:{ytype:"array"}}),y0:s({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:s({},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:i(),showlegend:s({},a.showlegend,{dflt:!1})},{transforms:void 0},o("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":599,"../../constants/docs":688,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scatter/attributes":1120}],1001:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../histogram2d/calc"),s=t("../../components/colorscale/calc"),l=t("./convert_column_xyz"),c=t("./clean_2d_array"),u=t("./interp2d"),f=t("./find_empties"),p=t("./make_bound_array");e.exports=function(t,e){var r,h,d,g,v,m,y,x,b,_=i.getFromId(t,e.xaxis||"x"),w=i.getFromId(t,e.yaxis||"y"),k=n.traceIs(e,"contour"),T=n.traceIs(e,"histogram"),A=n.traceIs(e,"gl2d"),M=k?"best":e.zsmooth;if(_._minDtick=0,w._minDtick=0,T)r=(b=o(t,e)).x,h=b.x0,d=b.dx,g=b.y,v=b.y0,m=b.dy,y=b.z;else{var E=e.z;a.isArray1D(E)?(l(e,_,w,"x","y",["z"]),r=e._x,g=e._y,E=e._z):(r=e._x=e.x?_.makeCalcdata(e,"x"):[],g=e._y=e.y?w.makeCalcdata(e,"y"):[]),h=e.x0,d=e.dx,v=e.y0,m=e.dy,y=c(E,e,_,w),(k||e.connectgaps)&&(e._emptypoints=f(y),u(y,e._emptypoints))}function S(t){M=e._input.zsmooth=e.zsmooth=!1,a.warn('cannot use zsmooth: "fast": '+t)}if("fast"===M)if("log"===_.type||"log"===w.type)S("log axis found");else if(!T){if(r.length){var C=(r[r.length-1]-r[0])/(r.length-1),L=Math.abs(C/100);for(x=0;xL){S("x scale is not linear");break}}if(g.length&&"fast"===M){var O=(g[g.length-1]-g[0])/(g.length-1),P=Math.abs(O/100);for(x=0;xP){S("y scale is not linear");break}}}var I=a.maxRowLength(y),D="scaled"===e.xtype?"":r,z=p(e,D,h,d,I,_),R="scaled"===e.ytype?"":g,F=p(e,R,v,m,y.length,w);A||(e._extremes[_._id]=i.findExtremes(_,z),e._extremes[w._id]=i.findExtremes(w,F));var B={x:z,y:F,z:y,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(D&&D.length===z.length-1&&(B.xCenter=D),R&&R.length===F.length-1&&(B.yCenter=R),T&&(B.xRanges=b.xRanges,B.yRanges=b.yRanges,B.pts=b.pts),k||s(t,e,{vals:y,cLetter:"z"}),k&&e.contours&&"heatmap"===e.contours.coloring){var N={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};B.xfill=p(N,D,h,d,I,_),B.yfill=p(N,R,v,m,y.length,w)}return[B]}},{"../../components/colorscale/calc":600,"../../lib":717,"../../plots/cartesian/axes":765,"../../registry":846,"../histogram2d/calc":1032,"./clean_2d_array":1002,"./convert_column_xyz":1004,"./find_empties":1006,"./interp2d":1009,"./make_bound_array":1010}],1002:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,p;function h(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=0;o--)(s=((f[[(r=(i=p[o])[0])-1,a=i[1]]]||g)[2]+(f[[r+1,a]]||g)[2]+(f[[r,a-1]]||g)[2]+(f[[r,a+1]]||g)[2])/20)&&(l[i]=[r,a,s],p.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(i in l)f[i]=l[i],u.push(l[i])}return u.sort((function(t,e){return e[2]-t[2]}))}},{"../../lib":717}],1007:[function(t,e,r){"use strict";var n=t("../../components/fx"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../../components/colorscale").extractOpts;e.exports=function(t,e,r,s,l,c){var u,f,p,h,d=t.cd[0],g=d.trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,k=d.zmask,T=g.zhoverformat,A=y,M=x;if(!1!==t.index){try{p=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index)}if(p<0||p>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(c){var E;for(A=[2*y[0]-y[1]],E=1;Eg&&(m=Math.max(m,Math.abs(t[i][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,a=1;for(o(t,e),r=0;r.01;r++)a=o(t,e,i(a));return a>.01&&n.log("interp2d didn't converge quickly",a),t}},{"../../lib":717}],1010:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib").isArrayOrTypedArray;e.exports=function(t,e,r,i,o,s){var l,c,u,f=[],p=n.traceIs(t,"contour"),h=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(a(e)&&e.length>1&&!h&&"category"!==s.type){var g=e.length;if(!(g<=o))return p?e.slice(0,o):e.slice(0,o+1);if(p||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u0;)p=h.c2p(k[y]),y--;for(p0;)m=d.c2p(T[y]),y--;if(m0&&(i=!0);for(var l=0;li){var o=i-r[t];return r[t]=i,o}}return 0},max:function(t,e,r,a){var i=a[e];if(n(i)){if(i=Number(i),!n(r[t]))return r[t]=i,i;if(r[t]c?t>o?t>1.1*a?a:t>1.1*i?i:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function h(t,e,r,n,i,s){if(n&&t>o){var l=d(e,i,s),c=d(r,i,s),u=t===a?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(t,e,r,n,i){var s,l,c=-1.1*e,p=-.1*e,h=t-p,d=r[0],g=r[1],v=Math.min(f(d+p,d+h,n,i),f(g+p,g+h,n,i)),m=Math.min(f(d+c,d+p,n,i),f(g+c,g+p,n,i));if(v>m&&mo){var y=s===a?1:6,x=s===a?"M12":"M1";return function(e,r){var o=n.c2d(e,a,i),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,i);if(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,h)),D.start=r.l2r(j),F||a.nestedProperty(e,m+".start").set(D.start)}var V=b.end,U=r.r2l(I.end),q=void 0!==U;if((b.endFound||q)&&U!==r.r2l(V)){var H=q?U:a.aggNums(Math.max,null,d);D.end=r.l2r(H),q||a.nestedProperty(e,m+".start").set(D.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[m]=a.extendFlat({},e[m]||{}),delete e._input[G],delete e[G]),[D,d]}e.exports={calc:function(t,e){var r,i,h,d,g=[],v=[],m=o.getFromId(t,"h"===e.orientation?e.yaxis:e.xaxis),y="h"===e.orientation?"y":"x",x={x:"y",y:"x"}[y],b=e[y+"calendar"],_=e.cumulative,w=p(t,e,m,y),k=w[0],T=w[1],A="string"==typeof k.size,M=[],E=A?M:k,S=[],C=[],L=[],O=0,P=e.histnorm,I=e.histfunc,D=-1!==P.indexOf("density");_.enabled&&D&&(P=P.replace(/ ?density$/,""),D=!1);var z,R="max"===I||"min"===I?null:0,F=l.count,B=c[P],N=!1,j=function(t){return m.r2c(t,0,b)};for(a.isArrayOrTypedArray(e[x])&&"count"!==I&&(z=e[x],N="avg"===I,F=l[I]),r=j(k.start),h=j(k.end)+(r-o.tickIncrement(r,k.size,!1,b))/1e6;r=0&&d=0;n--)s(n);else if("increasing"===e){for(n=1;n=0;n--)t[n]+=t[n+1];"exclude"===r&&(t.push(0),t.shift())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],J=0,K=X-1;for(r=0;r=J;r--)if(v[r]){K=r;break}for(r=J;r<=K;r++)if(n(g[r])&&n(v[r])){var $={p:g[r],s:v[r],b:0};_.enabled||($.pts=L[r],q?$.ph0=$.ph1=L[r].length?T[L[r][0]]:g[r]:($.ph0=V(M[r]),$.ph1=V(M[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,e),a.isArrayOrTypedArray(e.selectedpoints)&&a.tagSelected(Z,e,W),Z},calcAllAutoBins:p}},{"../../lib":717,"../../plots/cartesian/axes":765,"../../registry":846,"../bar/arrays_to_calcdata":855,"./average":1019,"./bin_functions":1021,"./bin_label_vals":1022,"./norm_functions":1030,"fast-isnumeric":228}],1024:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],1025:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axis_ids"),i=t("../../registry").traceIs,o=t("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=a.getAxisGroup,c=[{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"}],u=["x","y"];e.exports=function(t,e){var r,f,p,h,d,g,v,m=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return"v"===t.orientation?"x":"y"}function k(t,r,i){var o=t.uid+"__"+i;r||(r=o);var s=function(t,r){return a.getFromTrace({_fullLayout:e},t,r).type}(t,i),l=t[i+"calendar"]||"",c=m[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(i)):(r=o,s!==c.axType&&n.warn(["Attempted to group the bins of trace",t.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&n.warn(["Attempted to group the bins of trace",t.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(m[r]={traces:[t],dirs:[i],axType:s,calendar:t[i+"calendar"]||""}),t["_"+i+"bingroup"]=r}for(d=0;dE&&k.splice(E,k.length-E),M.length>E&&M.splice(E,M.length-E);var S=[],C=[],L=[],O="string"==typeof w.size,P="string"==typeof A.size,I=[],D=[],z=O?I:w,R=P?D:A,F=0,B=[],N=[],j=e.histnorm,V=e.histfunc,U=-1!==j.indexOf("density"),q="max"===V||"min"===V?null:0,H=i.count,G=o[j],W=!1,Y=[],X=[],Z="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";Z&&"count"!==V&&(W="avg"===V,H=i[V]);var J=w.size,K=x(w.start),$=x(w.end)+(K-a.tickIncrement(K,J,!1,m))/1e6;for(r=K;r<$;r=a.tickIncrement(r,J,!1,m))C.push(q),I.push(r),W&&L.push(0);I.push(r);var Q,tt=C.length,et=(r-K)/tt,rt=(Q=K+et/2,g.c2r(Q,0,m)),nt=A.size,at=b(A.start),it=b(A.end)+(at-a.tickIncrement(at,nt,!1,y))/1e6;for(r=at;r=0&&h=0&&d0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u=Math.floor((e-o.x0)/s.dx),f=Math.floor(Math.abs(r-o.y0)/s.dy);if(o.z[f][u]){var p,h=o.hi||s.hoverinfo;if(h){var d=h.split("+");-1!==d.indexOf("all")&&(d=["color"]),-1!==d.indexOf("color")&&(p=!0)}var g,v=s.colormodel,m=v.length,y=s._scaler(o.z[f][u]),x=i.colormodel[v].suffix,b=[];(s.hovertemplate||p)&&(b.push("["+[y[0]+x[0],y[1]+x[1],y[2]+x[2]].join(", ")),4===m&&b.push(", "+y[3]+x[3]),b.push("]"),b=b.join(""),t.extraText=v.toUpperCase()+": "+b),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[f])?g=s.hovertext[f][u]:Array.isArray(s.text)&&Array.isArray(s.text[f])&&(g=s.text[f][u]);var _=c.c2p(o.y0+(f+.5)*s.dy),w=o.x0+(u+.5)*s.dx,k=o.y0+(f+.5)*s.dy,T="["+o.z[f][u].slice(0,s.colormodel.length).join(", ")+"]";return[a.extendFlat(t,{index:[f,u],x0:l.c2p(o.x0+u*s.dx),x1:l.c2p(o.x0+(u+1)*s.dx),y0:_,y1:_,color:y,xVal:w,xLabelVal:w,yVal:k,yLabelVal:k,zLabelVal:T,text:g,hovertemplateLabels:{zLabel:T,colorLabel:b,"color[0]Label":y[0]+x[0],"color[1]Label":y[1]+x[1],"color[2]Label":y[2]+x[2],"color[3]Label":y[3]+x[3]}})]}}}},{"../../components/fx":630,"../../lib":717,"./constants":1042}],1046:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover"),eventData:t("./event_data"),moduleType:"trace",name:"image",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":776,"./attributes":1040,"./calc":1041,"./defaults":1043,"./event_data":1044,"./hover":1045,"./plot":1047,"./style":1048}],1047:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../constants/xmlns_namespaces"),o=t("./constants");e.exports=function(t,e,r,s){var l=e.xaxis,c=e.yaxis;a.makeTraceGroups(s,r,"im").each((function(t){var e,r,s,u,f,p,h=n.select(this),d=t[0],g=d.trace,v=d.z,m=d.x0,y=d.y0,x=d.w,b=d.h,_=g.dx,w=g.dy;for(p=0;void 0===e&&p0;)r=l.c2p(m+p*_),p--;for(p=0;void 0===u&&p0;)f=c.c2p(y+p*w),p--;r0}function x(t){t.each((function(t){d.stroke(n.select(this),t.line.color)})).each((function(t){d.fill(n.select(this),t.color)})).style("stroke-width",(function(t){return t.line.width}))}function b(t,e,r){var n=t._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),o={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return a.coerce(i,o,h,t,e)}return f(i,o,l,s,n),p(i,o,l,s),o}function _(t,e){return"translate("+t+","+e+")"}function w(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function k(t,e,r,a){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(i);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(c.convertToTspans,a).call(s.font,e),s.bBox(o.node())}function T(t,e,r,n,i,o){var s="_cache"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=a.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,f){var p,h=t._fullLayout;y(r)&&f&&(p=f()),a.makeTraceGroups(h._indicatorlayer,e,"trace").each((function(e){var f,A,M,E,S,C=e[0].trace,L=n.select(this),O=C._hasGauge,P=C._isAngular,I=C._isBullet,D=C.domain,z={w:h._size.w*(D.x[1]-D.x[0]),h:h._size.h*(D.y[1]-D.y[0]),l:h._size.l+h._size.w*D.x[0],r:h._size.r+h._size.w*(1-D.x[1]),t:h._size.t+h._size.h*(1-D.y[1]),b:h._size.b+h._size.h*D.y[0]},R=z.l+z.w/2,F=z.t+z.h/2,B=Math.min(z.w/2,z.h),N=l.innerRadius*B,j=C.align||"center";if(A=F,O){if(P&&(f=R,A=F+B/2,M=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*N)}),I){var V=l.bulletPadding,U=1-l.bulletNumberDomainSize+V;f=z.l+(U+(1-U)*v[j])*z.w,M=function(t){return w(t,(l.bulletNumberDomainSize-V)*z.w,z.h)}}}else f=z.l+v[j]*z.w,M=function(t){return w(t,z.w,z.h)};!function(t,e,r,i){var o,l,f,p=r[0].trace,h=i.numbersX,x=i.numbersY,w=p.align||"center",A=g[w],M=i.transitionOpts,E=i.onComplete,S=a.ensureSingle(e,"g","numbers"),C=[];p._hasNumber&&C.push("number"),p._hasDelta&&(C.push("delta"),"left"===p.delta.position&&C.reverse());var L=S.selectAll("text").data(C);function O(e,r,n,a){if(!e.match("s")||n>=0==a>=0||r(n).slice(-1).match(m)||r(a).slice(-1).match(m))return r;var i=e.slice().replace("s","f").replace(/\d+/,(function(t){return parseInt(t)-1})),o=b(t,{tickformat:i});return function(t){return Math.abs(t)<1?u.tickText(o,t).text:r(t)}}L.enter().append("text"),L.attr("text-anchor",(function(){return A})).attr("class",(function(t){return t})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),L.exit().remove();var P,I=p.mode+p.align;if(p._hasDelta&&(P=function(){var e=b(t,{tickformat:p.delta.valueformat},p._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=function(t){return p.delta.relative?t.relativeDelta:t.delta},o=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?p.delta.increasing.symbol:p.delta.decreasing.symbol)+e(t)},f=function(t){return t.delta>=0?p.delta.increasing.color:p.delta.decreasing.color};void 0===p._deltaLastValue&&(p._deltaLastValue=i(r[0]));var h=S.select("text.delta");function g(){h.text(o(i(r[0]),a)).call(d.fill,f(r[0])).call(c.convertToTspans,t)}return h.call(s.font,p.delta.font).call(d.fill,f({delta:p._deltaLastValue})),y(M)?h.transition().duration(M.duration).ease(M.easing).tween("text",(function(){var t=n.select(this),e=i(r[0]),s=p._deltaLastValue,l=O(p.delta.valueformat,a,s,e),c=n.interpolateNumber(s,e);return p._deltaLastValue=e,function(e){t.text(o(c(e),l)),t.call(d.fill,f({delta:c(e)}))}})).each("end",(function(){g(),E&&E()})).each("interrupt",(function(){g(),E&&E()})):g(),l=k(o(i(r[0]),a),p.delta.font,A,t),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,f=l),p._hasNumber&&(function(){var e=b(t,{tickformat:p.number.valueformat},p._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=p.number.suffix,l=p.number.prefix,f=S.select("text.number");function h(){var e="number"==typeof r[0].y?l+a(r[0].y)+i:"-";f.text(e).call(s.font,p.number.font).call(c.convertToTspans,t)}y(M)?f.transition().duration(M.duration).ease(M.easing).each("end",(function(){h(),E&&E()})).each("interrupt",(function(){h(),E&&E()})).attrTween("text",(function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);p._lastValue=r[0].y;var o=O(p.number.valueformat,a,r[0].lastY,r[0].y);return function(r){t.text(l+o(e(r))+i)}})):h(),o=k(l+a(r[0].y)+i,p.number.font,A,t)}(),I+=p.number.font.size+p.number.font.family+p.number.valueformat+p.number.suffix+p.number.prefix,f=o),p._hasDelta&&p._hasNumber){var D,z,R=[(o.left+o.right)/2,(o.top+o.bottom)/2],F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=.75*p.delta.font.size;"left"===p.delta.position&&(D=T(p,"deltaPos",0,-1*(o.width*v[p.align]+l.width*(1-v[p.align])+B),I,Math.min),z=R[1]-F[1],f={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:l.left+D,right:o.right,top:Math.min(o.top,l.top+z),bottom:Math.max(o.bottom,l.bottom+z)}),"right"===p.delta.position&&(D=T(p,"deltaPos",0,o.width*(1-v[p.align])+l.width*v[p.align]+B,I,Math.max),z=R[1]-F[1],f={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:o.left,right:l.right+D,top:Math.min(o.top,l.top+z),bottom:Math.max(o.bottom,l.bottom+z)}),"bottom"===p.delta.position&&(D=null,z=l.height,f={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&&(D=null,z=o.top,f={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:D,dy:z})}(p._hasNumber||p._hasDelta)&&S.attr("transform",(function(){var t=i.numbersScaler(f);I+=t[2];var e,r=T(p,"numbersScale",1,t[0],I,Math.min);p._scaleNumbers||(r=1),e=p._isAngular?x-r*f.bottom:x-r*(f.top+f.bottom)/2,p._numbersTop=r*f.top+e;var n=f[w];"center"===w&&(n=(f.left+f.right)/2);var a=h-r*n;return _(a=T(p,"numbersTranslate",0,a,I,Math.max),e)+" scale("+r+")"}))}(t,L,e,{numbersX:f,numbersY:A,numbersScaler:M,transitionOpts:r,onComplete:p}),O&&(E={range:C.gauge.axis.range,color:C.gauge.bgcolor,line:{color:C.gauge.bordercolor,width:0},thickness:1},S={range:C.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:C.gauge.bordercolor,width:C.gauge.borderwidth},thickness:1});var q=L.selectAll("g.angular").data(P?e:[]);q.exit().remove();var H=L.selectAll("g.angularaxis").data(P?e:[]);H.exit().remove(),P&&function(t,e,r,a){var s,l,c,f,p=r[0].trace,h=a.size,d=a.radius,g=a.innerRadius,v=a.gaugeBg,m=a.gaugeOutline,w=[h.l+h.w/2,h.t+h.h/2+d/2],k=a.gauge,T=a.layer,A=a.transitionOpts,M=a.onComplete,E=Math.PI/2;function S(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((g+d)/2-t/2*(d-g)).outerRadius((g+d)/2+t/2*(d-g)).startAngle(-E)}function L(t){t.attr("d",(function(t){return C(t.thickness).startAngle(S(t.range[0])).endAngle(S(t.range[1]))()}))}k.enter().append("g").classed("angular",!0),k.attr("transform",_(w[0],w[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),(s=b(t,p.gauge.axis)).type="linear",s.range=p.gauge.axis.range,s._id="xangularaxis",s.setScale();var O=function(t){return(s.range[0]-t.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},P={},I=u.makeLabelFns(s,0).labelStandoff;P.xFn=function(t){var e=O(t);return Math.cos(e)*I},P.yFn=function(t){var e=O(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(I+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*o)},P.anchorFn=function(t){var e=O(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},P.heightFn=function(t,e,r){var n=O(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return _(w[0]+d*Math.cos(t),w[1]-d*Math.sin(t))};if(c=function(t){return D(O(t))},l=u.calcTicks(s),f=u.getTickSigns(s)[2],s.visible){f="inside"===s.ticks?-1:1;var z=(s.linewidth||1)/2;u.drawTicks(t,s,{vals:l,layer:T,path:"M"+f*z+",0h"+f*s.ticklen,transFn:function(t){var e=O(t);return D(e)+"rotate("+-i(e)+")"}}),u.drawLabels(t,s,{vals:l,layer:T,transFn:c,labelFns:P})}var R=[v].concat(p.gauge.steps),F=k.selectAll("g.bg-arc").data(R);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(x),F.exit().remove();var B=C(p.gauge.bar.thickness),N=k.selectAll("g.value-arc").data([p.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var j,V,U,q=N.select("path");y(A)?(q.transition().duration(A.duration).ease(A.easing).each("end",(function(){M&&M()})).each("interrupt",(function(){M&&M()})).attrTween("d",(j=B,V=S(r[0].lastY),U=S(r[0].y),function(){var t=n.interpolate(V,U);return function(e){return j.endAngle(t(e))()}})),p._lastValue=r[0].y):q.attr("d","number"==typeof r[0].y?B.endAngle(S(r[0].y)):"M0,0Z"),q.call(x),N.exit().remove(),R=[];var H=p.gauge.threshold.value;H&&R.push({range:[H,H],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var G=k.selectAll("g.threshold-arc").data(R);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(L).call(x),G.exit().remove();var W=k.selectAll("g.gauge-outline").data([m]);W.enter().append("g").classed("gauge-outline",!0).append("path"),W.select("path").call(L).call(x),W.exit().remove()}(t,0,e,{radius:B,innerRadius:N,gauge:q,layer:H,size:z,gaugeBg:E,gaugeOutline:S,transitionOpts:r,onComplete:p});var G=L.selectAll("g.bullet").data(I?e:[]);G.exit().remove();var W=L.selectAll("g.bulletaxis").data(I?e:[]);W.exit().remove(),I&&function(t,e,r,n){var a,i,o,s,c,f=r[0].trace,p=n.gauge,h=n.layer,g=n.gaugeBg,v=n.gaugeOutline,m=n.size,_=f.domain,w=n.transitionOpts,k=n.onComplete;p.enter().append("g").classed("bullet",!0),p.attr("transform","translate("+m.l+", "+m.t+")"),h.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),h.selectAll("g.xbulletaxistick,path,text").remove();var T=m.h,A=f.gauge.bar.thickness*T,M=_.x[0],E=_.x[0]+(_.x[1]-_.x[0])*(f._hasNumber||f._hasDelta?1-l.bulletNumberDomainSize:1);function S(t){t.attr("width",(function(t){return Math.max(0,a.c2p(t.range[1])-a.c2p(t.range[0]))})).attr("x",(function(t){return a.c2p(t.range[0])})).attr("y",(function(t){return.5*(1-t.thickness)*T})).attr("height",(function(t){return t.thickness*T}))}(a=b(t,f.gauge.axis))._id="xbulletaxis",a.domain=[M,E],a.setScale(),i=u.calcTicks(a),o=u.makeTransFn(a),s=u.getTickSigns(a)[2],c=m.t+m.h,a.visible&&(u.drawTicks(t,a,{vals:"inside"===a.ticks?u.clipEnds(a,i):i,layer:h,path:u.makeTickPath(a,c,s),transFn:o}),u.drawLabels(t,a,{vals:i,layer:h,transFn:o,labelFns:u.makeLabelFns(a,c)}));var C=[g].concat(f.gauge.steps),L=p.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(S).call(x),L.exit().remove();var O=p.selectAll("g.value-bullet").data([f.gauge.bar]);O.enter().append("g").classed("value-bullet",!0).append("rect"),O.select("rect").attr("height",A).attr("y",(T-A)/2).call(x),y(w)?O.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(f.gauge.axis.range[1],r[0].y)))):O.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,a.c2p(Math.min(f.gauge.axis.range[1],r[0].y))):0),O.exit().remove();var P=r.filter((function(){return f.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(f.gauge.threshold.value)).attr("x2",a.c2p(f.gauge.threshold.value)).attr("y1",(1-f.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-f.gauge.threshold.thickness)/2)*T).call(d.stroke,f.gauge.threshold.line.color).style("stroke-width",f.gauge.threshold.line.width),I.exit().remove();var D=p.selectAll("g.gauge-outline").data([v]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(S).call(x),D.exit().remove()}(t,0,e,{gauge:G,layer:W,size:z,gaugeBg:E,gaugeOutline:S,transitionOpts:r,onComplete:p});var Y=L.selectAll("text.title").data(e);Y.exit().remove(),Y.enter().append("text").classed("title",!0),Y.attr("text-anchor",(function(){return I?g.right:g[C.title.align]})).text(C.title.text).call(s.font,C.title.font).call(c.convertToTspans,t),Y.attr("transform",(function(){var t,e=z.l+z.w*v[C.title.align],r=l.titlePadding,n=s.bBox(Y.node());return O?(P&&(t=C.gauge.axis.visible?s.bBox(H.node()).top-r-n.bottom:z.t+z.h/2-B/2-n.bottom-r),I&&(t=A-(n.top+n.bottom)/2,e=z.l-l.bulletPadding*z.w)):t=C._numbersTop-r-n.bottom,_(e,t)}))}))}},{"../../components/color":592,"../../components/drawing":613,"../../constants/alignment":686,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../plots/cartesian/axis_defaults":767,"../../plots/cartesian/layout_attributes":777,"../../plots/cartesian/position_defaults":780,"./constants":1052,d3:165}],1056:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll,c=e.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(),showlegend:s({},o.showlegend,{dflt:!1})},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");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plot_api/edit_types":748,"../../plots/attributes":762,"../../plots/template_attributes":841,"../mesh3d/attributes":1061}],1057:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),a=t("../streamtube/calc").processGrid,i=t("../streamtube/calc").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=i(e.x,e._len),e._y=i(e.y,e._len),e._z=i(e.z,e._len),e._value=i(e.value,e._len);var r=a(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),a=Math.max(e[r],e[r-1]);if(a>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){L();var a,i,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],a=t[2],i=function(t,e,r){for(var n=[],a=0;a-1?n[h]:C(d,g,m);p[h]=x>-1?x:P(d,g,m,R(e,y))}a=p[0],i=p[1],o=p[2],t._meshI.push(a),t._meshJ.push(i),t._meshK.push(o),++v}}function B(t,e,r,n){var a=t[3];an&&(a=n);for(var i=(t[3]-a)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-i)*t[s]+i*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(S-E);return t>=E-e&&t<=S+e}function V(e){for(var r=[],n=0;n<4;n++){var a=e[n];r.push([t._x[a],t._y[a],t._z[a],t._value[a]])}return r}function U(t,e,r,n,a,i){i||(i=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,a),N(e[1][3],n,a),N(e[2][3],n,a)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):i<3&&U(t,e,r,E,S,++i)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(i){if(s[i[0]]&&s[i[1]]&&!s[i[2]]){var u=e[i[0]],f=e[i[1]],p=e[i[2]],h=B(p,u,n,a),d=B(p,f,n,a);o=l(t,[d,h,u],[-1,-1,r[i[0]]])||o,o=l(t,[u,f,d],[r[i[0]],r[i[1]],-1])||o,c=!0}})),c?o:([[0,1,2],[1,2,0],[2,0,1]].forEach((function(i){if(s[i[0]]&&!s[i[1]]&&!s[i[2]]){var u=e[i[0]],f=e[i[1]],p=e[i[2]],h=B(f,u,n,a),d=B(p,u,n,a);o=l(t,[d,h,u],[-1,-1,r[i[0]]])||o,c=!0}})),o)}function q(t,e,r,n){var a=!1,i=V(e),o=[N(i[0][3],r,n),N(i[1][3],r,n),N(i[2][3],r,n),N(i[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return a;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(a=function(t,e,r){var n=function(n,a,i){F(t,[e[n],e[a],e[i]],[r[n],r[a],r[i]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,i,e)||a),a;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=i[l[0]],u=i[l[1]],f=i[l[2]],p=i[l[3]];if(g)a=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||a;else{var h=B(p,c,r,n),d=B(p,u,r,n),v=B(p,f,r,n);a=F(null,[h,d,v],[-1,-1,-1])||a}s=!0}})),s?a:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=i[l[0]],u=i[l[1]],f=i[l[2]],p=i[l[3]],h=B(f,c,r,n),d=B(f,u,r,n),v=B(p,u,r,n),m=B(p,c,r,n);g?(a=F(t,[c,m,h],[e[l[0]],-1,-1])||a,a=F(t,[u,d,v],[e[l[1]],-1,-1])||a):a=function(t,e,r){var n=function(n,a,i){F(t,[e[n],e[a],e[i]],[r[n],r[a],r[i]])};n(0,1,2),n(2,3,0)}(null,[h,d,v,m],[-1,-1,-1,-1])||a,s=!0}})),s?a:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=i[l[0]],u=i[l[1]],f=i[l[2]],p=i[l[3]],h=B(u,c,r,n),d=B(f,c,r,n),v=B(p,c,r,n);g?(a=F(t,[c,h,d],[e[l[0]],-1,-1])||a,a=F(t,[c,d,v],[e[l[0]],-1,-1])||a,a=F(t,[c,v,h],[e[l[0]],-1,-1])||a):a=F(null,[h,d,v],[-1,-1,-1])||a,s=!0}})),a))}function H(t,e,r,n,a,i,o,s,l,c,u){var f=!1;return d&&(z(t,"A")&&(f=q(null,[e,r,n,i],c,u)||f),z(t,"B")&&(f=q(null,[r,n,a,l],c,u)||f),z(t,"C")&&(f=q(null,[r,i,o,l],c,u)||f),z(t,"D")&&(f=q(null,[n,i,s,l],c,u)||f),z(t,"E")&&(f=q(null,[r,n,i,l],c,u)||f)),g&&(f=q(t,[r,n,i,l],c,u)||f),f}function G(t,e,r,n,a,i,o,s){return[!0===s[0]||U(t,V([e,r,n]),[e,r,n],i,o),!0===s[1]||U(t,V([n,a,e]),[n,a,e],i,o)]}function W(t,e,r,n,a,i,o,s,l){return s?G(t,e,r,a,n,i,o,l):G(t,r,a,n,e,i,o,l)}function Y(t,e,r,n,a,i,o){var s,l,c,u,f=!1,p=function(){f=U(t,[s,l,c],[-1,-1,-1],a,i)||f,f=U(t,[c,u,s],[-1,-1,-1],a,i)||f},h=o[0],d=o[1],g=o[2];return h&&(s=I(V([T(e,r-0,n-0)])[0],V([T(e-1,r-0,n-0)])[0],h),l=I(V([T(e,r-0,n-1)])[0],V([T(e-1,r-0,n-1)])[0],h),c=I(V([T(e,r-1,n-1)])[0],V([T(e-1,r-1,n-1)])[0],h),u=I(V([T(e,r-1,n-0)])[0],V([T(e-1,r-1,n-0)])[0],h),p()),d&&(s=I(V([T(e-0,r,n-0)])[0],V([T(e-0,r-1,n-0)])[0],d),l=I(V([T(e-0,r,n-1)])[0],V([T(e-0,r-1,n-1)])[0],d),c=I(V([T(e-1,r,n-1)])[0],V([T(e-1,r-1,n-1)])[0],d),u=I(V([T(e-1,r,n-0)])[0],V([T(e-1,r-1,n-0)])[0],d),p()),g&&(s=I(V([T(e-0,r-0,n)])[0],V([T(e-0,r-0,n-1)])[0],g),l=I(V([T(e-0,r-1,n)])[0],V([T(e-0,r-1,n-1)])[0],g),c=I(V([T(e-1,r-1,n)])[0],V([T(e-1,r-1,n-1)])[0],g),u=I(V([T(e-1,r-0,n)])[0],V([T(e-1,r-0,n-1)])[0],g),p()),f}function X(t,e,r,n,a,i,o,s,l,c,u,f){var p=t;return f?(d&&"even"===t&&(p=null),H(p,e,r,n,a,i,o,s,l,c,u)):(d&&"odd"===t&&(p=null),H(p,l,s,o,i,a,n,r,e,c,u))}function Z(t,e,r,n,a){for(var i=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];Q(e,k[0],k[1])}}var C=[[Math.min(E,M),Math.max(E,M)],[Math.min(A,S),Math.max(A,S)]];["x","y","z"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(h.id),"x"===e?f.push([h.distRatio,0,0]):"y"===e?f.push([0,h.distRatio,0]):f.push([0,0,h.distRatio]))}else c=nt(1,"x"===e?b-1:"y"===e?_-1:w-1);u.length>0&&(r[a]="x"===e?tt(null,u,i,o,f,r[a]):"y"===e?et(null,u,i,o,f,r[a]):rt(null,u,i,o,f,r[a]),a++),c.length>0&&(r[a]="x"===e?Z(null,c,i,o,r[a]):"y"===e?J(null,c,i,o,r[a]):K(null,c,i,o,r[a]),a++)}var d=t.caps[e];d.show&&d.fill&&(D(d.fill),r[a]="x"===e?Z(null,[0,b-1],i,o,r[a]):"y"===e?J(null,[0,_-1],i,o,r[a]):K(null,[0,w-1],i,o,r[a]),a++)}})),0===v&&O(),t._meshX=n,t._meshY=a,t._meshZ=i,t._meshIntensity=o,t._Xs=m,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:p,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,a=n({gl:r}),i=new c(t,a,e.uid);return a._trace=i,i.update(e),t.glplot.add(a),i}}},{"../../components/colorscale":604,"../../lib/gl_format_color":714,"../../lib/str2rgbarray":740,"../../plots/gl3d/zip3":816,"gl-mesh3d":283}],1059:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("../../components/colorscale/defaults");function s(t,e,r,n,i){var s=i("isomin"),l=i("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=i("x"),u=i("y"),f=i("z"),p=i("value");c&&c.length&&u&&u.length&&f&&f.length&&p&&p.length?(a.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),["x","y","z"].forEach((function(t){var e="caps."+t;i(e+".show")&&i(e+".fill");var r="slices."+t;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(t){i(t)})),o(t,e,n,i,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,a){s(t,e,0,a,(function(r,a){return n.coerce(t,e,i,r,a)}))},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":602,"../../lib":717,"../../registry":846,"./attributes":1056}],1060:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,calc:t("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:t("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":805,"./attributes":1056,"./calc":1057,"./convert":1058,"./defaults":1059}],1061:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../surface/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat;e.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"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",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"}),showlegend:s({},o.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../surface/attributes":1243}],1062:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":600}],1063:[function(t,e,r){"use strict";var n=t("gl-mesh3d"),a=t("delaunay-triangulate"),i=t("alpha-shape"),o=t("convex-hull"),s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p=f.prototype;function h(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}p.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},p.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,p=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!v(t.i,f)||!v(t.j,f)||!v(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(p):t.alphahull>0?i(t.alphahull,p):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],i=e.length,o=0;ov):g=k>b,v=k;var T=l(b,_,w,k);T.pos=x,T.yc=(b+k)/2,T.i=y,T.dir=g?"increasing":"decreasing",T.x=T.pos,T.y=[w,_],h&&(T.tx=e.text[y]),d&&(T.htx=e.hovertext[y]),m.push(T)}else m.push({pos:x,empty:!0})}return e._extremes[s._id]=i.findExtremes(s,n.concat(f,u),{padded:!0}),m.length&&(m[0].t={labels:{open:a(t,"open:")+" ",high:a(t,"high:")+" ",low:a(t,"low:")+" ",close:a(t,"close:")+" "}}),m}e.exports={calc:function(t,e){var r=i.getFromId(t,e.xaxis),a=i.getFromId(t,e.yaxis),o=function(t,e,r){var a=r._minDiff;if(!a){var i,o=t._fullData,s=[];for(a=1/0,i=0;i"+c.labels[x]+n.hoverLabelText(s,b):((y=a.extendFlat({},p)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name="",f.push(y),v[b]=y)}return f}function p(t,e,r,a){var i=t.cd,o=t.ya,l=i[0].trace,f=i[0].t,p=u(t,e,r,a);if(!p)return[];var h=i[p.index],d=p.index=h.i,g=h.dir;function v(t){return f.labels[t]+n.hoverLabelText(o,l[t][d])}var m=h.hi||l.hoverinfo,y=m.split("+"),x="all"===m,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[v("open"),v("high"),v("low"),v("close")+" "+c[g]]:[];return _&&s(h,l,w),p.extraText=w.join("
"),p.y0=p.y1=o.c2p(h.yc,!0),[p]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):p(t,e,r,n)},hoverSplit:f,hoverOnPoints:p}},{"../../components/color":592,"../../components/fx":630,"../../constants/delta.js":687,"../../lib":717,"../../plots/cartesian/axes":765}],1070:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc").calc,plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover").hoverPoints,selectPoints:t("./select")}},{"../../plots/cartesian":776,"./attributes":1066,"./calc":1067,"./defaults":1068,"./hover":1069,"./plot":1072,"./select":1073,"./style":1074}],1071:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib");e.exports=function(t,e,r,i){var o=r("x"),s=r("open"),l=r("high"),c=r("low"),u=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x"],i),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,a.minRowLength(o))),e._length=f,f}}},{"../../lib":717,"../../registry":846}],1072:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib");e.exports=function(t,e,r,i){var o=e.xaxis,s=e.yaxis;a.makeTraceGroups(i,r,"trace ohlc").each((function(t){var e=n.select(this),r=t[0],i=r.t;if(!0!==r.trace.visible||i.empty)e.remove();else{var l=i.tickLen,c=e.selectAll("path").data(a.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",(function(t){if(t.empty)return"M0,0Z";var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-l,!0),n=o.c2p(t.pos+l,!0);return"M"+r+","+s.c2p(t.o,!0)+"H"+e+"M"+e+","+s.c2p(t.h,!0)+"V"+s.c2p(t.l,!0)+"M"+n+","+s.c2p(t.c,!0)+"H"+e}))}}))}},{"../../lib":717,d3:165}],1073:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map((function(t){return t.displayindex}))))for(e=0;e0;c&&(o="array");var u=r("categoryorder",o);"array"===u?(r("categoryarray"),r("ticktext")):(delete t.categoryarray,delete t.ticktext),c||"array"!==u||(e.categoryorder="trace")}}e.exports=function(t,e,r,f){function p(r,a){return n.coerce(t,e,l,r,a)}var h=s(t,e,{name:"dimensions",handleItemDefaults:u}),d=function(t,e,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,p);o(e,f,p),Array.isArray(h)&&h.length||(e.visible=!1),c(e,h,"values",d),p("hoveron"),p("hovertemplate"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var g={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(p,"labelfont",g);var v={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(p,"tickfont",v)}},{"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"../../lib":717,"../../plots/array_container_defaults":761,"../../plots/domain":790,"../parcoords/merge_length":1091,"./attributes":1075}],1079:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:t("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1075,"./base_plot":1076,"./calc":1077,"./defaults":1078,"./plot":1081}],1080:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plot_api/plot_api"),i=t("../../components/fx"),o=t("../../lib"),s=t("../../components/drawing"),l=t("tinycolor2"),c=t("../../lib/svg_text_utils");function u(t,e,r,a){var i=t.map(z.bind(0,e,r)),l=a.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=l.selectAll("g.trace.parcats").data(i,f),v=u.enter().append("g").attr("class","trace parcats");u.attr("transform",(function(t){return"translate("+t.x+", "+t.y+")"})),v.append("g").attr("class","paths");var m=u.select("g.paths").selectAll("path.path").data((function(t){return t.paths}),f);m.attr("fill",(function(t){return t.model.color}));var b=m.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(t){return t.model.color})).attr("fill-opacity",0);x(b),m.attr("d",(function(t){return t.svgD})),b.empty()||m.sort(h),m.exit().remove(),m.on("mouseover",d).on("mouseout",g).on("click",y),v.append("g").attr("class","dimensions");var k=u.select("g.dimensions").selectAll("g.dimension").data((function(t){return t.dimensions}),f);k.enter().append("g").attr("class","dimension"),k.attr("transform",(function(t){return"translate("+t.x+", 0)"})),k.exit().remove();var T=k.selectAll("g.category").data((function(t){return t.categories}),f),A=T.enter().append("g").attr("class","category");T.attr("transform",(function(t){return"translate(0, "+t.y+")"})),A.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})),_(A);var M=T.selectAll("rect.bandrect").data((function(t){return t.bands}),f);M.each((function(){o.raiseToTop(this)})),M.attr("fill",(function(t){return t.color}));var P=M.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(t){return t.color})).attr("fill-opacity",0);M.attr("fill",(function(t){return t.color})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return t.y})).attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"})),w(P),M.exit().remove(),A.append("text").attr("class","catlabel").attr("pointer-events","none");var I=e._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",(function(t){return p(t)?"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(t){return p(t)?t.width+5:-5})).attr("y",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)})),A.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(t){return t.width/2})).attr("y",-5).text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})).each((function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)})),T.selectAll("rect.bandrect").on("mouseover",E).on("mouseout",S),T.exit().remove(),k.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on("dragstart",C).on("drag",L).on("dragend",O)),u.each((function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),u.exit().remove()}function f(t){return t.key}function p(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function h(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),C=n.mouse(f)[0];i.loneHover({trace:p,x:_-d.left+g.left,y:w-d.top+g.top,text:S,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:C<_?"right":"left",hovertemplate:(p.line||{}).hovertemplate,hovertemplateLabels:M,eventData:[{data:p._input,fullData:p,count:T,probability:A}]},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:f})}}}function g(t){if(!t.parcatsViewModel.dragDimension&&(x(n.select(this)),i.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),t.parcatsViewModel.pathSelection.sort(h),-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var e=v(t),r=m(t);t.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:e,event:n.event,constraints:r})}}function v(t){for(var e=[],r=P(t.parcatsViewModel),n=0;n1&&c.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,d=p/s.parcatsViewModel.model.count,g={countLabel:p,categoryLabel:h,probabilityLabel:d.toFixed(3)},v=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&v.push(["Count:",g.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&v.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var m=v.join("
");return{trace:u,x:r-t.left,y:f-t.top,text:m,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:u.hovertemplate,hovertemplateLabels:g,eventData:[{data:u._input,fullData:u,count:p,category:h,probability:d}]}}function E(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,a=r._fullLayout,s=a._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;"color"===c?(function(t){var e=n.select(t).datum(),r=k(e);b(r),r.each((function(){o.raiseToTop(this)})),n.select(t.parentNode).selectAll("rect.bandrect").filter((function(t){return t.color===e.color})).each((function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(this),A(this,"plotly_hover",n.event)):(function(t){n.select(t.parentNode).selectAll("rect.bandrect").each((function(t){var e=k(t);b(e),e.each((function(){o.raiseToTop(this)}))})),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),T(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===c?e=M(s,this):"color"===c?e=function(t,e){var r,a,i=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],f=c.trace,p=i.y+i.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=i.left,a="left"):(r=i.left+i.width,a="right");var h=s.model.categoryLabel,d=o.parcatsViewModel.model.count,g=0;o.categoryViewModel.bands.forEach((function(t){t.color===o.color&&(g+=t.count)}));var v=s.model.count,m=0;c.pathSelection.each((function(t){t.model.color===o.color&&(m+=t.model.count)}));var y=g/d,x=g/m,b=g/v,_={countLabel:d,categoryLabel:h,probabilityLabel:y.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color ∩ "+h+"): "+_.probabilityLabel),w.push("P("+h+" | color): "+x.toFixed(3)),w.push("P(color | "+h+"): "+b.toFixed(3)));var k=w.join("
"),T=l.mostReadable(o.color,["black","white"]);return{trace:f,x:r-t.left,y:p-t.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:T,fontSize:10,idealAlign:a,hovertemplate:f.hovertemplate,hovertemplateLabels:_,eventData:[{data:f._input,fullData:f,category:h,count:d,probability:y,categorycount:v,colorcount:m,bandcolorcount:g}]}}(s,this):"dimension"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){r.push(M(t,this))})),r}(s,this)),e&&i.loneHover(e,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r}))}}function S(t){var e=t.parcatsViewModel;e.dragDimension||(x(e.pathSelection),_(e.dimensionSelection.selectAll("g.category")),w(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),i.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(h),-1!==e.hoverinfoItems.indexOf("skip"))||("color"===t.parcatsViewModel.hoveron?A(this,"plotly_unhover",n.event):T(this,"plotly_unhover",n.event))}function C(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(e){var r=n.mouse(this)[0],a=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=a&&a<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map((function(t){return t.displayInd})),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(e){e.yf.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){i.model.dragX=n.event.x;var p=t.parcatsViewModel.dimensions[r],h=t.parcatsViewModel.dimensions[a];void 0!==p&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=i.model.displayInd}B(t.parcatsViewModel),F(t.parcatsViewModel),D(t.parcatsViewModel),I(t.parcatsViewModel)}}function O(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=P(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.forEach((function(r,n){var a=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+a+"].displayindex"]=r}));var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map((function(t){return t.displayInd}));if(s=t.initialDragCategoryDisplayInds.some((function(t,e){return t!==l[e]}))){var c=t.model.categories.slice().sort((function(t,e){return t.displayInd-e.displayInd})),u=c.map((function(t){return t.categoryValue})),f=c.map((function(t){return t.categoryLabel}));e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[f],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?A(t.potentialClickBand,"plotly_click",n.event.sourceEvent):T(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd&&(t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null),t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,B(t.parcatsViewModel),F(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){D(t.parcatsViewModel,!0),I(t.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function P(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+a)+" "+l[s]+","+(e[s]+a)+" "+(t[s]+r[s])+","+(e[s]+a),u+="l-"+r[s]+",0 ";return u+="Z"}function F(t){var e=t.dimensions,r=t.model,n=e.map((function(t){return t.categories.map((function(t){return t.y}))})),a=t.model.dimensions.map((function(t){return t.categories.map((function(t){return t.displayInd}))})),i=t.model.dimensions.map((function(t){return t.displayInd})),o=t.dimensions.map((function(t){return t.model.dimensionInd})),s=e.map((function(t){return t.x})),l=e.map((function(t){return t.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function f(t){var e=t.categoryInds.map((function(t,e){return a[e][t]}));return o.map((function(t){return e[t]}))}c.sort((function(e,r){var n=f(e),a=f(r);return"backward"===t.sortpaths&&(n.reverse(),a.reverse()),n.push(e.valueInds[0]),a.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),a.unshift(r.rawColor)),na?1:0}));for(var p=new Array(c.length),h=e[0].model.count,d=e[0].categories.map((function(t){return t.height})).reduce((function(t,e){return t+e})),g=0;g0?d*(m.count/h):0;for(var y,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*a;var i,o,s,l,c,u=[],f=t.model.maxCats,p=e.categories.length,h=e.count,d=t.height-8*(f-1),g=8*(f-p)/2,v=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(v.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?o.count/h*d:0,s={key:o.valueInds[0],model:o,width:16,height:i,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+i+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){u(r,t,n,e)}},{"../../components/drawing":613,"../../components/fx":630,"../../lib":717,"../../lib/svg_text_utils":741,"../../plot_api/plot_api":752,d3:165,tinycolor2:536}],1081:[function(t,e,r){"use strict";var n=t("./parcats");e.exports=function(t,e,r,a){var i=t._fullLayout,o=i._paper,s=i._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,a)}},{"./parcats":1080}],1082:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/cartesian/layout_attributes"),i=t("../../plots/font_attributes"),o=t("../../plots/domain").attributes,s=t("../../lib/extend").extendFlat,l=t("../../plot_api/plot_template").templatedArray;e.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":599,"../../lib/extend":708,"../../plot_api/plot_template":755,"../../plots/cartesian/layout_attributes":777,"../../plots/domain":790,"../../plots/font_attributes":791}],1083:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function f(t,e){return t*(1-u)+e*u}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var a=t?-1:1,i=0,o=e.length-1;if(a<0){var s=i;i=o,o=s}for(var l=e[i],u=l,p=i;a*pe){p=r;break}}if(i=u,isNaN(i)&&(i=isNaN(f)||isNaN(p)?isNaN(f)?p:f:e-c[f][1]t[1]+r||e=.9*t[1]+.1*t[0]?"n":e<=.9*t[0]+.1*t[1]?"s":"ns"}(d,e);g&&(o.interval=l[i],o.intervalPix=d,o.region=g)}}if(t.ordinal&&!o.region){var m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function _(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(e.unitToPaddedPx.invert):i.newExtent=[i.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(e),x(t.parentNode)}function w(t,e){var r=b(e,e.height-a.mouse(t)[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(t){t.on("mousemove",(function(t){a.event.preventDefault(),t.parent.inBrushDrag||w(this,t)})).on("mouseleave",(function(t){t.parent.inBrushDrag||m()})).call(a.behavior.drag().on("dragstart",(function(t){!function(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.unitToPaddedPx.invert(r),o=e.brush,s=b(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:i,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on("drag",(function(t){_(this,t)})).on("dragend",(function(t){!function(t,e){var r=e.brush,n=r.filter,i=r.svgBrush;i._dragging||(w(t,e),_(t,e),e.brush.svgBrush.wasDragged=!1),i._dragging=!1,a.event.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,e.parent.inBrushDrag=!1,m(),!i.wasDragged)return i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&e.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,0===i.extent.length&&A(r)):A(r),i.brushCallback(e),x(t.parentNode),void i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(c?[i.newExtent]:[]),i.extent.length||A(r),i.brushCallback(e),c?x(t.parentNode,s):(s(),x(t.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function T(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function M(t){for(var e,r=t.slice(),n=[],a=r.shift();a;){for(e=a.slice();(a=r.shift())&&a[0]<=e[1];)e[1]=Math.max(e[1],a[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,a,i){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=M(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=a,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e).slice();e.filter.set(r),o()}),brushEndCallback:i}}},ensureAxisBrush:function(t){var e=t.selectAll("."+n.cn.axisBrush).data(o,i);e.enter().append("g").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(".background").data(o);e.enter().append("rect").classed("background",!0).call(h).call(d).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),e.call(k).attr("height",(function(t){return t.height-n.verticalPadding}));var r=t.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(t){return t.height})).call(y);var a=t.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(t){return t.height})).call(y)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?M(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},{"../../lib":717,"../../lib/gup":715,"./constants":1086,d3:165}],1084:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/get_data").getModuleCalcData,i=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=a(t.calcdata,"parcoords")[0];e.length&&i(t,e)},r.clean=function(t,e,r,n){var a=n._has&&n._has("parcoords"),i=e._has&&e._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,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":694,"../../plots/get_data":800,"./plot":1093,d3:165}],1085:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale"),i=t("../../lib/gup").wrap;e.exports=function(t,e){var r,o;return a.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=a.extractOpts(e.line).colorscale,a.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),d.splice(f));var g=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:h}),v=function(t,e,r,o,s){var l=s("line.color",r);if(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),p(e,g,"values",v);var m={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",m),n.coerceFont(u,"tickfont",m),n.coerceFont(u,"rangefont",m),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"../../lib":717,"../../plots/array_container_defaults":761,"../../plots/cartesian/axes":765,"../../plots/domain":790,"./attributes":1082,"./axisbrush":1083,"./constants":1086,"./merge_length":1091}],1088:[function(t,e,r){"use strict";var n=t("../../lib").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!("visible"in t)}},{"../../lib":717}],1089:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:t("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":1082,"./base_plot":1084,"./calc":1085,"./defaults":1087,"./plot":1093}],1090:[function(t,e,r){"use strict";var n=t("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=t("./constants").maxDimensionCount,s=t("../../lib"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(t,e,r,n,a){var i=t._gl;i.enable(i.SCISSOR_TEST),i.scissor(e,r,n,a),t.clear({color:[0,0,0,0],depth:1})}function p(t,e,r,n,a,i){var o=i.key;r.drawCompleted||(function(t){t.read({x:0,y:0,width:1,height:1,data:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,a-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),r.clearOnly||(i.count=2*c,i.offset=2*l*n,e(i),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),a=0,i=0;iu&&(u=t[a].dim1.canvasX,o=a);0===s&&f(k,0,0,r.canvasWidth,r.canvasHeight);var h=function(t){var e,r,n,a=[[],[]];for(n=0;n<64;n++){var i=!t&&na._length&&(E=E.slice(0,a._length));var S,C=a.tickvals;function L(t,e){return{val:t,text:S[e]}}function O(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){S=a.ticktext,Array.isArray(S)&&S.length?S.length>C.length?S=S.slice(0,C.length):C.length>S.length&&(C=C.slice(0,S.length)):S=C.map(n.format(a.tickformat));for(var P=1;P=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,p={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==D&&(u?a.hover(p):a.unhover&&a.unhover(p),D=f)}})),I.style("opacity",(function(t){return t.pick?0:1})),u.style("background","rgba(255, 255, 255, 0)");var z=u.selectAll("."+g.cn.parcoords).data(T,f);z.exit().remove(),z.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),z.attr("transform",(function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"}));var R=z.selectAll("."+g.cn.parcoordsControlView).data(p,f);R.enter().append("g").classed(g.cn.parcoordsControlView,!0),R.attr("transform",(function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"}));var F=R.selectAll("."+g.cn.yAxis).data((function(t){return t.dimensions}),f);F.enter().append("g").classed(g.cn.yAxis,!0),R.each((function(t){L(F,t)})),I.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=m(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),F.attr("transform",(function(t){return"translate("+t.xScale(t.xIndex)+", 0)"})),F.call(n.behavior.drag().origin((function(t){return t})).on("drag",(function(t){var e=t.parent;k.linePickActive(!1),t.x=Math.max(-g.overdrag,Math.min(t.model.width+g.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,F.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),L(F,e),F.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr("transform",(function(t){return"translate("+t.xScale(t.xIndex)+", 0)"})),n.select(this).attr("transform","translate("+t.x+", 0)"),F.each((function(r,n,a){a===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!A(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,L(F,e),n.select(this).attr("transform",(function(t){return"translate("+t.x+", 0)"})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!A(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),k.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),F.exit().remove();var B=F.selectAll("."+g.cn.axisOverlays).data(p,f);B.enter().append("g").classed(g.cn.axisOverlays,!0),B.selectAll("."+g.cn.axis).remove();var N=B.selectAll("."+g.cn.axis).data(p,f);N.enter().append("g").classed(g.cn.axis,!0),N.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,a=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?a:null).tickFormat((function(e){return d.isOrdinal(t)?e:O(t.model.dimensions[t.visibleIndex],e)})).scale(r)),l.font(N.selectAll("text"),t.model.tickFont)})),N.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),N.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=B.selectAll("."+g.cn.axisHeading).data(p,f);j.enter().append("g").classed(g.cn.axisHeading,!0);var V=j.selectAll("."+g.cn.axisTitle).data(p,f);V.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),V.text((function(t){return t.label})).each((function(e){var r=n.select(this);l.font(r,e.model.labelFont),s.convertToTspans(r,t)})).attr("transform",(function(t){var e=C(t.model.labelAngle,t.model.labelSide),r=g.axisTitleOffset;return(e.dir>0?"":"translate(0,"+(2*r+t.model.height)+")")+"rotate("+e.degrees+")translate("+-r*e.dx+","+-r*e.dy+")"})).attr("text-anchor",(function(t){var e=C(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var U=B.selectAll("."+g.cn.axisExtent).data(p,f);U.enter().append("g").classed(g.cn.axisExtent,!0);var q=U.selectAll("."+g.cn.axisExtentTop).data(p,f);q.enter().append("g").classed(g.cn.axisExtentTop,!0),q.attr("transform","translate(0,"+-g.axisExtentOffset+")");var H=q.selectAll("."+g.cn.axisExtentTopText).data(p,f);H.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(S),H.text((function(t){return P(t,!0)})).each((function(t){l.font(n.select(this),t.model.rangeFont)}));var G=U.selectAll("."+g.cn.axisExtentBottom).data(p,f);G.enter().append("g").classed(g.cn.axisExtentBottom,!0),G.attr("transform",(function(t){return"translate(0,"+(t.model.height+g.axisExtentOffset)+")"}));var W=G.selectAll("."+g.cn.axisExtentBottomText).data(p,f);W.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(S),W.text((function(t){return P(t,!1)})).each((function(t){l.font(n.select(this),t.model.rangeFont)})),v.ensureAxisBrush(B)}},{"../../components/colorscale":604,"../../components/drawing":613,"../../lib":717,"../../lib/gup":715,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"./axisbrush":1083,"./constants":1086,"./helpers":1088,"./lines":1090,"color-rgba":124,d3:165}],1093:[function(t,e,r){"use strict";var n=t("./parcoords"),a=t("../../lib/prepare_regl"),i=t("./helpers").isVisible;function o(t,e,r){var n=e.indexOf(r),a=t.indexOf(n);return-1===a&&(a+=e.length),a}e.exports=function(t,e){var r=t._fullLayout;if(a(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var a=u[r]=n._fullInput.index;s[r]=t.data[a].dimensions,l[r]=t.data[a].dimensions.slice()})),n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,a){var i=l[e][n],o=a.map((function(t){return t.slice()})),s="dimensions["+n+"].constraintrange",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var p=i.constraintrange;f[s]=p||null}var h=t._fullData[c[e]].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 d={};d[s]=o,t.emit("plotly_restyle",[d,[u[e]]])},hover:function(e){t.emit("plotly_hover",e)},unhover:function(e){t.emit("plotly_unhover",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(i));s[e].sort(n),l[e].filter((function(t){return!i(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit("plotly_restyle",[{dimensions:[s[e]]},[u[e]]])}})}}},{"../../lib/prepare_regl":730,"./helpers":1088,"./parcoords":1092}],1094:[function(t,e,r){"use strict";var n=t("../../plots/attributes"),a=t("../../plots/domain").attributes,i=t("../../plots/font_attributes"),o=t("../../components/color/attributes"),s=t("../../plots/template_attributes").hovertemplateAttrs,l=t("../../plots/template_attributes").texttemplateAttrs,c=t("../../lib/extend").extendFlat,u=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});e.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:c({},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:c({},u,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),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:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":591,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/domain":790,"../../plots/font_attributes":791,"../../plots/template_attributes":841}],1095:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="pie",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":826}],1096:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),i=t("../../components/color"),o={};function s(t){return function(e,r){return!!e&&!!(e=a(e)).isValid()&&(e=i.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e)}}function l(t,e){var r,n=JSON.stringify(t),i=e[n];if(!i){for(i=t.slice(),r=0;r0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:i,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return a.coerce(t,e,i,r,n)}var u=l(c("labels"),c("values")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),f){e._length=f,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var p,h=c("text"),d=c("texttemplate");if(d||(p=c("textinfo",Array.isArray(h)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),d||p&&"none"!==p){var g=c("textposition");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&c("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&c("insidetextorientation")}o(e,n,c);var v=c("hole");if(c("title.text")){var m=c("title.position",v?"middle center":"top center");v||"middle center"!==m||(e.title.position="top center"),a.coerceFont(c,"title.font",n.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else e.visible=!1}}},{"../../lib":717,"../../plots/domain":790,"../bar/defaults":860,"./attributes":1094,"fast-isnumeric":228}],1098:[function(t,e,r){"use strict";var n=t("../../components/fx/helpers").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),"funnelarea"===e.type&&(delete r.v,delete r.i),r}},{"../../components/fx/helpers":627}],1099:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r"),name:u.hovertemplate||-1!==f.indexOf("name")?u.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:h.castOption(b.bgcolor,t.pts)||t.color,borderColor:h.castOption(b.bordercolor,t.pts),fontFamily:h.castOption(_.family,t.pts),fontSize:h.castOption(_.size,t.pts),fontColor:h.castOption(_.color,t.pts),nameLength:h.castOption(b.namelength,t.pts),textAlign:h.castOption(b.align,t.pts),hovertemplate:h.castOption(u.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[d(t,u)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[d(t,u)],event:n.event})}})),t.on("mouseout",(function(t){var r=e._fullLayout,a=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[d(s,a)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)})),t.on("click",(function(t){var r=e._fullLayout,a=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[d(t,a)],i.click(e,n.event))}))}function m(t,e,r){var n=h.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=h.castOption(t._input.textfont.color,e.pts));var a=h.castOption(t.insidetextfont.family,e.pts)||h.castOption(t.textfont.family,e.pts)||r.family,i=h.castOption(t.insidetextfont.size,e.pts)||h.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:a,size:i}}function y(t,e){for(var r,n,a=0;ae&&e>n||r=-4;m-=2)y(Math.PI*m,"tan");for(m=4;m>=-4;m-=2)y(Math.PI*(m+1),"tan")}if(f||h){for(m=4;m>=-4;m-=2)y(Math.PI*(m+1.5),"rad");for(m=4;m>=-4;m-=2)y(Math.PI*(m+.5),"rad")}}if(g||d||f){if((n={scale:l*c*2/a,rCenter:1-l,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,n.scale>=1)return n;v.push(n)}(d||h)&&((n=b(t,c,s,i,o)).textPosAngle=(e.startangle+e.stopangle)/2,v.push(n)),(d||p)&&((n=_(t,c,s,i,o)).textPosAngle=(e.startangle+e.stopangle)/2,v.push(n));for(var x=0,w=0,k=0;k=1)break}return v[x]}function b(t,e,r,n,a){var i=t.width/t.height,o=T(i,n,e,r);return{scale:2*o/t.height,rCenter:w(i,o/e),rotate:k(a)}}function _(t,e,r,n,a){var i=t.height/t.width,o=T(i,n,e,r);return{scale:2*o/t.width,rCenter:w(i,o/e),rotate:k(a+Math.PI/2)}}function w(t,e){return Math.cos(e)-t*e}function k(t){return(180/Math.PI*t+720)%180-90}function T(t,e,r,n){var a=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(a*a+.5)+a),n/(Math.sqrt(t*t+n/2)+t))}function A(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function M(t,e){var r=e.pxmid[0],n=e.pxmid[1],a=t.width/2,i=t.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,e){var r,n,a,i=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=C(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*t.r,s.ty-=t.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(f+=u,o.x-=(1+a)*u,s.tx+=t.titleBox.width/2):-1!==i.title.position.indexOf("center")?f*=2:-1!==i.title.position.indexOf("right")&&(f+=u,o.x+=(1+a)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=S(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function S(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function C(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function L(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/a.aspectratio):(u=r.r,c=u*a.aspectratio),c*=(1+a.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(i){var x=l.castOption(a,e.i,"texttemplate");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:h.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:h.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(a,t.i,"customdata")}}(e),_=h.getFirstFilled(a.text,e.pts);(g(_)||""===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,a._meta||{})}else e.text=""}}function I(t,e){var r=t.rotate,n=t.scale;n>1&&(n=1);var a=r*Math.PI/180,i=Math.cos(a),o=Math.sin(a),s=(e.left+e.right)/2,l=(e.top+e.bottom)/2;t.textX=s*i-l*o,t.textY=s*o+l*i,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,i=r._size;p("pie",r),y(e,t),L(e,i);var u=l.makeTraceGroups(r._pielayer,e,"trace").each((function(e){var u=n.select(this),p=e[0],d=p.trace;!function(t){var e,r,n,a=t[0],i=a.r,o=a.trace,s=o.rotation*Math.PI/180,l=2*Math.PI/a.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(e=0;ea.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-o.hole,r.rInscribed=A(r,a))}(e),u.attr("stroke-linejoin","round"),u.each((function(){var g=n.select(this).selectAll("g.slice").data(e);g.enter().append("g").classed("slice",!0),g.exit().remove();var y=[[[],[]],[[],[]]],b=!1;g.each((function(a,i){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=d.index,y[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var o=p.cx,u=p.cy,g=n.select(this),_=g.selectAll("path.surface").data([a]);if(_.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),g.call(v,t,e),d.pull){var w=+h.castOption(d.pull,a.pts)||0;w>0&&(o+=w*a.pxmid[0],u+=w*a.pxmid[1])}a.cxFinal=o,a.cyFinal=u;var k=d.hole;if(a.v===p.vTotal){var T="M"+(o+a.px0[0])+","+(u+a.px0[1])+L(a.px0,a.pxmid,!0,1)+L(a.pxmid,a.px0,!0,1)+"Z";k?_.attr("d","M"+(o+k*a.px0[0])+","+(u+k*a.px0[1])+L(a.px0,a.pxmid,!1,k)+L(a.pxmid,a.px0,!1,k)+"Z"+T):_.attr("d",T)}else{var A=L(a.px0,a.px1,!0,1);if(k){var E=1-k;_.attr("d","M"+(o+k*a.px1[0])+","+(u+k*a.px1[1])+L(a.px1,a.px0,!1,k)+"l"+E*a.px0[0]+","+E*a.px0[1]+A+"Z")}else _.attr("d","M"+o+","+u+"l"+a.px0[0]+","+a.px0[1]+A+"Z")}P(t,a,p);var S=h.castOption(d.textposition,a.pts),C=g.selectAll("g.slicetext").data(a.text&&"none"!==S?[0]:[]);C.enter().append("g").classed("slicetext",!0),C.exit().remove(),C.each((function(){var g=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),v=l.ensureUniformFontSize(t,"outside"===S?function(t,e,r){var n=h.castOption(t.outsidetextfont.color,e.pts)||h.castOption(t.textfont.color,e.pts)||r.color,a=h.castOption(t.outsidetextfont.family,e.pts)||h.castOption(t.textfont.family,e.pts)||r.family,i=h.castOption(t.outsidetextfont.size,e.pts)||h.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:a,size:i}}(d,a,r.font):m(d,a,r.font));g.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,v).call(c.convertToTspans,t);var y,_=s.bBox(g.node());if("outside"===S)y=M(_,a);else if(y=x(_,a,p),"auto"===S&&y.scale<1){var w=l.ensureUniformFontSize(t,d.outsidetextfont);g.call(s.font,w),y=M(_=s.bBox(g.node()),a)}var k=y.textPosAngle,T=void 0===k?a.pxmid:O(p.r,k);if(y.targetX=o+T[0]*y.rCenter+(y.x||0),y.targetY=u+T[1]*y.rCenter+(y.y||0),I(y,_),y.outside){var A=y.targetY;a.yLabelMin=A-_.height/2,a.yLabelMid=A,a.yLabelMax=A+_.height/2,a.labelExtraX=0,a.labelExtraY=0,b=!0}y.fontSize=v.size,f(d.type,y,r),e[i].transform=y,g.attr("transform",l.getTextTransform(y))}))}function L(t,e,r,n){var i=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return"a"+n*p.r+","+n*p.r+" 0 "+a.largeArc+(r?" 1 ":" 0 ")+i+","+o}}));var _=n.select(this).selectAll("g.titletext").data(d.title.text?[0]:[]);if(_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each((function(){var e,r=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),a=d.title.text;d._meta&&(a=l.templateString(a,d._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,d.title.font).call(c.convertToTspans,t),e="middle center"===d.title.position?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}(p):E(p,i),r.attr("transform","translate("+e.x+","+e.y+")"+(e.scale<1?"scale("+e.scale+")":"")+"translate("+e.tx+","+e.ty+")")})),b&&function(t,e){var r,n,a,i,o,s,l,c,u,f,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var a,c,u,p,d=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),g=n?t.yLabelMin:t.yLabelMax,v=n?t.yLabelMax:t.yLabelMin,m=t.cyFinal+o(t.px0[1],t.px1[1]),y=d-g;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(h.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-g-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(v+t.labelExtraY-m)*l>0&&(a=3*s*Math.abs(c-f.indexOf(t)),(p=u.cxFinal+i(u.px0[0],u.px1[0])+a-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=p)))}for(n=0;n<2;n++)for(a=n?v:m,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,(c=t[n][r]).sort(a),u=t[1-n][r],f=u.concat(c),d=[],p=0;pMath.abs(f)?s+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+c):s+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+c}else s+="V"+(t.yLabelMid+t.labelExtraY)+"h"+c;l.ensureSingle(r,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(g,d),b&&d.automargin){var w=s.bBox(u.node()),k=d.domain,T=i.w*(k.x[1]-k.x[0]),A=i.h*(k.y[1]-k.y[0]),S=(.5*T-p.r)/i.w,C=(.5*A-p.r)/i.h;a.autoMargin(t,"pie."+d.uid+".automargin",{xl:k.x[0]-S,xr:k.x[1]+S,yb:k.y[0]-C,yt:k.y[1]+C,l:Math.max(p.cx-p.r-w.left,0),r:Math.max(w.right-(p.cx+p.r),0),b:Math.max(w.bottom-(p.cy+p.r),0),t:Math.max(p.cy-p.r-w.top,0),pad:5})}}))}));setTimeout((function(){u.selectAll("tspan").each((function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))}))}),0)},formatSliceLabel:P,transformInsideText:x,determineInsideTextFont:m,positionTitleOutside:E,prerenderTitles:y,layoutAreas:L,attachFxHandlers:v,computeTransform:I}},{"../../components/color":592,"../../components/drawing":613,"../../components/fx":630,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/plots":826,"../bar/uniform_text":872,"./event_data":1098,"./helpers":1099,d3:165}],1104:[function(t,e,r){"use strict";var n=t("d3"),a=t("./style_one"),i=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(".trace");i(t,e,"pie"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(a,t,e)}))}))}},{"../bar/uniform_text":872,"./style_one":1105,d3:165}],1105:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("./helpers").castOption;e.exports=function(t,e,r){var i=r.marker.line,o=a(i.color,e.pts)||n.defaultLine,s=a(i.width,e.pts)||0;t.style("stroke-width",s).call(n.fill,e.color).call(n.stroke,o)}},{"../../components/color":592,"./helpers":1099}],1106:[function(t,e,r){"use strict";var n=t("../scatter/attributes");e.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":1120}],1107:[function(t,e,r){"use strict";var n=t("gl-pointcloud2d"),a=t("../../lib/str2rgbarray"),i=t("../../plots/cartesian/autorange").findExtremes,o=t("../scatter/get_trace_color");function s(t,e){this.scene=t,this.uid=e,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(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,p=t.xbounds&&t.ybounds,h=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,p)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(h)r=h;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=a(t.marker.color),v=a(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;null===y&&(y=c.length<100||u.length<100),this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=i(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=i(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../lib/str2rgbarray":740,"../../plots/cartesian/autorange":764,"../scatter/get_trace_color":1130,"gl-pointcloud2d":295}],1108:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}i("x"),i("y"),i("xbounds"),i("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.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"),e._length=null}},{"../../lib":717,"./attributes":1106}],1109:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("../scatter3d/calc"),plot:t("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:t("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":803,"../scatter3d/calc":1148,"./attributes":1106,"./convert":1107,"./defaults":1108}],1110:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../../plots/attributes"),i=t("../../components/color/attributes"),o=t("../../components/fx/attributes"),s=t("../../plots/domain").attributes,l=t("../../plots/template_attributes").hovertemplateAttrs,c=t("../../components/colorscale/attributes"),u=t("../../plot_api/plot_template").templatedArray,f=t("../../lib/extend").extendFlat,p=t("../../plot_api/edit_types").overrideAll;t("../../constants/docs").FORMAT_LINK,(e.exports=p({hoverinfo:f({},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:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:f(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":591,"../../components/colorscale/attributes":599,"../../components/fx/attributes":622,"../../constants/docs":688,"../../lib/extend":708,"../../plot_api/edit_types":748,"../../plot_api/plot_template":755,"../../plots/attributes":762,"../../plots/domain":790,"../../plots/font_attributes":791,"../../plots/template_attributes":841}],1111:[function(t,e,r){"use strict";var n=t("../../plot_api/edit_types").overrideAll,a=t("../../plots/get_data").getModuleCalcData,i=t("./plot"),o=t("../../components/fx/layout_attributes"),s=t("../../lib/setcursor"),l=t("../../components/dragelement"),c=t("../../plots/cartesian/select").prepSelect,u=t("../../lib"),f=t("../../registry");function p(t,e){var r=t._fullData[e],n=t._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:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},h={_id:"y",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:p,yaxis:h,fillRangeItems:u.noop},subplot:e,xaxes:[p],yaxes:[h],doneFnCompleted:function(r){var n,a=t._fullData[e],i=a.node.groups.slice(),o=[];function s(t){for(var e=a._sankey.graph.nodes,r=0;rm&&(m=i.source[e]),i.target[e]>m&&(m=i.target[e]);var y,x=m+1;t.node._count=x;var b=t.node.groups,_={};for(e=0;e0&&s(E,x)&&s(S,x)&&(!_.hasOwnProperty(E)||!_.hasOwnProperty(S)||_[E]!==_[S])){_.hasOwnProperty(S)&&(S=_[S]),_.hasOwnProperty(E)&&(E=_[E]),S=+S,f[E=+E]=f[S]=!0;var C="";i.label&&i.label[e]&&(C=i.label[e]);var L=null;C&&p.hasOwnProperty(C)&&(L=p[C]),c.push({pointNumber:e,label:C,color:u?i.color[e]:i.color,concentrationscale:L,source:E,target:S,value:+M}),A.source.push(E),A.target.push(S)}}var O=x+b.length,P=o(r.color),I=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:D,color:P?r.color[e]:r.color})}var z=!1;return function(t,e,r){for(var i=a.init2dArray(t,0),o=0;o1}))}(O,A.source,A.target)&&(z=!0),{circular:z,links:c,nodes:I,groups:b,groupLookup:_}}e.exports=function(t,e){var r=c(e);return i({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":604,"../../lib":717,"../../lib/gup":715,"strongly-connected-components":529}],1113:[function(t,e,r){"use strict";e.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"}}},{}],1114:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../components/color"),o=t("tinycolor2"),s=t("../../plots/domain").defaults,l=t("../../components/fx/hoverlabel_defaults"),c=t("../../plot_api/plot_template"),u=t("../../plots/array_container_defaults");function f(t,e){function r(r,i){return n.coerce(t,e,a.link.colorscales,r,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(t,e,r,p){function h(r,i){return n.coerce(t,e,a,r,i)}var d=n.extendDeep(p.hoverlabel,t.hoverlabel),g=t.node,v=c.newContainer(e,"node");function m(t,e){return n.coerce(g,v,a.node,t,e)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",t.hoverinfo),l(g,v,m,d),m("hovertemplate");var y=p.colorway;m("color",v.label.map((function(t,e){return i.addOpacity(function(t){return y[t%y.length]}(e),.8)})));var x=t.link||{},b=c.newContainer(e,"link");function _(t,e){return n.coerce(x,b,a.link,t,e)}_("label"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",t.hoverinfo),l(x,b,_,d),_("hovertemplate");var w,k=o(p.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(k,b.value.length)),u(x,b,{name:"colorscales",handleItemDefaults:f}),s(e,p,h),h("orientation"),h("valueformat"),h("valuesuffix"),v.x.length&&v.y.length&&(w="freeform"),h("arrangement",w),n.coerceFont(h,"textfont",n.extendFlat({},p.font)),e._length=null}},{"../../components/color":592,"../../components/fx/hoverlabel_defaults":629,"../../lib":717,"../../plot_api/plot_template":755,"../../plots/array_container_defaults":761,"../../plots/domain":790,"./attributes":1110,tinycolor2:536}],1115:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),moduleType:"trace",name:"sankey",basePlotModule:t("./base_plot"),selectPoints:t("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":1110,"./base_plot":1111,"./calc":1112,"./defaults":1114,"./plot":1116,"./select.js":1118}],1116:[function(t,e,r){"use strict";var n=t("d3"),a=t("./render"),i=t("../../components/fx"),o=t("../../components/color"),s=t("../../lib"),l=t("./constants").cn,c=s._;function u(t){return""!==t}function f(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function h(t){n.select(t).select("text.name").style("fill","black")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&f(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&f(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),a&&f(e,t).selectAll("."+l.sankeyLink).filter((function(t){return t.link.label===a})).style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),r&&f(e,t).selectAll("."+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(t){return t.tinyColorAlpha})),a&&f(e,t).selectAll("."+l.sankeyLink).filter((function(t){return t.link.label===a})).style("fill-opacity",(function(t){return t.tinyColorAlpha})),r&&f(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,f=r._size,d=0;d"),color:b(s,"bgcolor")||o.addOpacity(d.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:m,eventData:[a.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(y,.85),h(y)}}},unhover:function(e,a,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,a,o),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,t.emit("plotly_unhover",{event:n.event,points:[a.node]})),i.loneUnhover(r._hoverlayer.node()))},select:function(e,r,a){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,a),i.click(t,{target:!0})}}})}},{"../../components/color":592,"../../components/fx":630,"../../lib":717,"./constants":1113,"./render":1117,d3:165}],1117:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("tinycolor2"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("@plotly/d3-sankey"),c=t("@plotly/d3-sankey-circular"),u=t("d3-force"),f=t("../../lib"),p=t("../../lib/gup"),h=p.keyFun,d=p.repeat,g=p.unwrap,v=t("d3-interpolate").interpolateNumber,m=t("../../registry");function y(t,e,r){var a,o=g(e),s=o.trace,u=s.domain,p="h"===s.orientation,h=s.node.pad,d=s.node.thickness,v=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),y=o._nodes,x=o._links,b=o.circular;(a=b?c.sankeyCircular().circularLinkGap(0):l.sankey()).iterations(n.sankeyIterations).size(p?[v,m]:[m,v]).nodeWidth(d).nodePadding(h).nodeId((function(t){return t.pointNumber})).nodes(y).links(x);var _,w,k,T=a();for(var A in a.nodePadding()=a||(r=a-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),a=e.y1+h}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),a=[],i=-1,o=-1/0;for(_=0;_o+d&&(i+=1,e=s.x0),o=s.x0,a[i]||(a[i]=[]),a[i].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return a}(y=T.nodes)),a.update(T)}return{circular:b,key:r,trace:s,guid:f.randstr(),horizontal:p,width:v,height:m,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:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:p?m:v,dragPerpendicular:p?v:m,arrangement:s.arrangement,sankey:a,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function x(t,e,r){var n=i(e.color),a=e.source.label+"|"+e.target.label+"__"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:a,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:b,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function b(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,"top"===e.circularLinkType?"M "+n.targetX+" "+(n.targetY+r)+" L"+n.rightInnerExtent+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+n.rightInnerExtent+" "+(n.verticalFullExtent-r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 1 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY-n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.leftInnerExtent+" "+(n.sourceY-r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 0 "+(n.leftFullExtent-r)+" "+(n.sourceY-n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"L"+n.rightInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+n.rightInnerExtent+" "+(n.targetY-r)+"L"+n.targetX+" "+(n.targetY-r)+"Z":"M "+n.targetX+" "+(n.targetY-r)+" L"+n.rightInnerExtent+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+n.rightInnerExtent+" "+(n.verticalFullExtent+r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 0 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY+n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.leftInnerExtent+" "+(n.sourceY+r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 1 "+(n.leftFullExtent-r)+" "+(n.sourceY+n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"L"+n.rightInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+n.rightInnerExtent+" "+(n.targetY+r)+"L"+n.targetX+" "+(n.targetY+r)+"Z";var e,r,n,a=t.link.source.x1,i=t.link.target.x0,o=v(a,i),s=o(.5),l=o(.5),c=t.link.y0-t.link.width/2,u=t.link.y0+t.link.width/2,f=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return"M"+a+","+c+"C"+s+","+c+" "+l+","+f+" "+i+","+f+"L"+i+","+p+"C"+l+","+p+" "+s+","+u+" "+a+","+u+"Z"}}function _(t,e){var r=i(e.color),a=n.nodePadAcross,s=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var l=e.dx,c=Math.max(.5,e.dy),u="node_"+e.pointNumber;return e.group&&(u=f.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:u,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(l),visibleHeight:c,zoneX:-a,zoneY:-s,zoneWidth:l+2*a,zoneHeight:c+2*s,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:o.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,u].join("_"),interactionState:t.interactionState,figure:t}}function w(t){t.attr("transform",(function(t){return"translate("+t.node.x0.toFixed(3)+", "+t.node.y0.toFixed(3)+")"}))}function k(t){t.call(w)}function T(t,e){t.call(k),e.attr("d",b())}function A(t){t.attr("width",(function(t){return t.node.x1-t.node.x0})).attr("height",(function(t){return t.visibleHeight}))}function M(t){return t.link.width>1||t.linkLineWidth>0}function E(t){return"translate("+t.translateX+","+t.translateY+")"+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function S(t){return"translate("+(t.horizontal?0:t.labelY)+" "+(t.horizontal?t.labelY:0)+")"}function C(t){return a.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function L(t){return t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function O(t){return t.horizontal?"scale(1 1)":"scale(-1 1)"}function P(t){return t.darkBackground&&!t.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function I(t){return t.horizontal&&t.left?"100%":"0%"}function D(t,e,r){t.on(".basic",null).on("mouseover.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on("mousemove.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on("mouseout.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)})).on("click.basic",(function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)}))}function z(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(f.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(t){i._fullLayout._dragCover=t})),f.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(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(t,e,r,a){!function(t){for(var e=0;e0&&a.forceLayouts[e].alpha(0)}}(0,e,i,r)).stop()}(0,o,a),function(t,e,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)}}))}(t,e,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),F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),T(t.filter(B(r)),e))}})).on("dragend",(function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e5?t.node.label:""})).attr("text-anchor",(function(t){return t.horizontal&&t.left?"end":"start"})),q.transition().ease(n.ease).duration(n.duration).attr("startOffset",I).style("fill",P)}},{"../../components/color":592,"../../components/drawing":613,"../../lib":717,"../../lib/gup":715,"../../registry":846,"./constants":1113,"@plotly/d3-sankey":56,"@plotly/d3-sankey-circular":55,d3:165,"d3-force":158,"d3-interpolate":160,tinycolor2:536}],1118:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,a=n._sankey.graph.nodes,i=0;is&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;sM[u]&&u=0;a--){var i=t[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],1127:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./stack_defaults"),u=t("./marker_defaults"),f=t("./line_defaults"),p=t("./line_shape_defaults"),h=t("./text_defaults"),d=t("./fillcolor_defaults");e.exports=function(t,e,r,g){function v(r,a){return n.coerce(t,e,i,r,a)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&mG!=(F=P[L][1])>=G&&(D=P[L-1][0],z=P[L][0],F-R&&(I=D+(z-D)*(G-R)/(F-R),V=Math.min(V,I),U=Math.max(U,I)));V=Math.max(V,0),U=Math.min(U,p._length);var W=s.defaultLine;return s.opacity(f.fillcolor)?W=f.fillcolor:s.opacity((f.line||{}).color)&&(W=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:V,x1:U,y0:G,y1:G,color:W,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":592,"../../components/fx":630,"../../lib":717,"../../registry":846,"./get_trace_color":1130}],1132:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t("./attributes"),supplyDefaults:t("./defaults"),crossTraceDefaults:t("./cross_trace_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./cross_trace_calc"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot"),colorbar:t("./marker_colorbar"),formatLabels:t("./format_labels"),style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"./arrays_to_calcdata":1119,"./attributes":1120,"./calc":1121,"./cross_trace_calc":1125,"./cross_trace_defaults":1126,"./defaults":1127,"./format_labels":1129,"./hover":1131,"./marker_colorbar":1138,"./plot":1140,"./select":1141,"./style":1143,"./subtypes":1144}],1133:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;s("line.color",r),a(t,"line")?i(t,e,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r),s("line.width"),(l||{}).noDash||s("line.dash")}},{"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"../../lib":717}],1134:[function(t,e,r){"use strict";var n=t("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,s=i-.5,l=t("../../lib"),c=l.segmentsIntersect,u=l.constrain,f=t("./constants");e.exports=function(t,e){var r,n,i,p,h,d,g,v,m,y,x,b,_,w,k,T,A,M,E=e.xaxis,S=e.yaxis,C="log"===E.type,L="log"===S.type,O=E._length,P=S._length,I=e.connectGaps,D=e.baseTolerance,z=e.shape,R="linear"===z,F=e.fill&&"none"!==e.fill,B=[],N=f.minTolerance,j=t.length,V=new Array(j),U=0;function q(r){var n=t[r];if(!n)return!1;var i=e.linearized?E.l2p(n.x):E.c2p(n.x),l=e.linearized?S.l2p(n.y):S.c2p(n.y);if(i===a){if(C&&(i=E.c2p(n.x,!0)),i===a)return!1;L&&l===a&&(i*=Math.abs(E._m*P*(E._m>0?o:s)/(S._m*O*(S._m>0?o:s)))),i*=1e3}if(l===a){if(L&&(l=S.c2p(n.y,!0)),l===a)return!1;l*=1e3}return[i,l]}function H(t,e,r,n){var a=r-t,i=n-e,o=.5-t,s=.5-e,l=a*a+i*i,c=a*o+i*s;if(c>0&&crt||t[1]at)return[u(t[0],et,rt),u(t[1],nt,at)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||t[1]===e[1]&&(t[1]===nt||t[1]===at)||void 0}function lt(t,e,r){return function(n,a){var i=ot(n),o=ot(a),s=[];if(i&&o&&st(i,o))return s;i&&s.push(i),o&&s.push(o);var c=2*l.constrain((n[t]+a[t])/2,e,r)-((i||n)[t]+(o||a)[t]);return c&&((i&&o?c>0==i[t]>o[t]?i:o:i||o)[t]+=c),s}}function ct(t){var e=t[0],r=t[1],n=e===V[U-1][0],a=r===V[U-1][1];if(!n||!a)if(U>1){var i=e===V[U-2][0],o=r===V[U-2][1];n&&(e===et||e===rt)&&i?o?U--:V[U-1]=t:a&&(r===nt||r===at)&&o?i?U--:V[U-1]=t:V[U++]=t}else V[U++]=t}function ut(t){V[U-1][0]!==t[0]&&V[U-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/O,M=t[1]/P,Y=t[0]rt?rt:0,X=t[1]at?at:0,Y||X){if(U)if(K){var e=Q(K,t);e.length>1&&(ut(e[0]),V[U++]=e[1])}else $=Q(V[U-1],t)[0],V[U++]=$;else V[U++]=[Y||t[0],X||t[1]];var r=V[U-1];Y&&X&&(r[0]!==Y||r[1]!==X)?(K&&(Z!==Y&&J!==X?ct(Z&&J?(n=K,i=(a=t)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?et:rt,at]:[o>0?rt:et,nt]):[Z||Y,J||X]):Z&&J&&ct([Z,J])),ct([Y,X])):Z-Y&&J-X&&ct([Y||Z,X||J]),K=t,Z=Y,J=X}else K&&ut(Q(K,t)[0]),V[U++]=t;var n,a,i,o}for("linear"===z||"spline"===z?Q=function(t,e){for(var r=[],n=0,a=0;a<4;a++){var i=it[a],o=c(t[0],t[1],e[0],e[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&&W(o,t)G(d,pt))break;i=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,p=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(p)}K&&ct([Z||K[0],J||K[1]]),B.push(V.slice(0,U))}return B}},{"../../constants/numerical":693,"../../lib":717,"./constants":1124}],1135:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1136:[function(t,e,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var a,i,o,s,l,c={},u=!1,f=-1,p=0,h=-1;for(i=0;i=0?l=h:(l=h=p,p++),l0?Math.max(e,a):0}}},{"fast-isnumeric":228}],1138:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1139:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;c=c||{},f&&(r=f),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",r),a(t,"marker")&&i(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),a(t,"marker.line")&&i(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},{"../../components/color":592,"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"./subtypes":1144}],1140:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../registry"),i=t("../../lib"),o=i.ensureSingle,s=i.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),f=t("./link_traces"),p=t("../../lib/polygon").tester;function h(t,e,r,f,h,d,g){var v;!function(t,e,r,a,o){var s=r.xaxis,l=r.yaxis,u=n.extent(i.simpleMap(s.range,s.r2c)),f=n.extent(i.simpleMap(l.range,l.r2c)),p=a[0].trace;if(c.hasMarkers(p)){var h=p.marker.maxdisplayed;if(0!==h){var d=a.filter((function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]})),g=Math.ceil(d.length/h),v=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,k=n.select(d),T=o(k,"g","errorbars"),A=o(k,"g","lines"),M=o(k,"g","points"),E=o(k,"g","text");if(a.getComponentMethod("errorbars","plot")(t,T,r,g),!0===_.visible){var S,C;y(k).style("opacity",_.opacity);var L=_.fill.charAt(_.fill.length-1);"x"!==L&&"y"!==L&&(L=""),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var O,P,I="",D=[],z=_._prevtrace;z&&(I=z._prevRevpath||"",C=z._nextFill,D=z._polygons);var R,F,B,N,j,V,U,q="",H="",G=[],W=i.noop;if(S=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split("").reverse().join(""))):R=F="spline"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return"M"+t.join("L")},B=function(t){return F(t.reverse())},G=u(f,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),U=_._polygons=new Array(G.length),v=0;v1){var r=n.select(this);if(r.datum(f),t)y(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var a=y(r);a.attr("d",O),l.singleLineStyle(f,a)}}}}}var Y=A.selectAll(".js-line").data(G);y(Y.exit()).style("opacity",0).remove(),Y.each(W(!1)),Y.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(W(!0)),l.setClipUrl(Y,r.layerClipId,t),G.length?(S?(S.datum(f),N&&V&&(L?("y"===L?N[1]=V[1]=b.c2p(0,!0):"x"===L&&(N[0]=V[0]=x.c2p(0,!0)),y(S).attr("d","M"+V+"L"+N+"L"+q.substr(1)).call(l.singleFillStyle)):y(S).attr("d",q+"Z").call(l.singleFillStyle))):C&&("tonext"===_.fill.substr(0,6)&&q&&I?("tonext"===_.fill?y(C).attr("d",q+"Z"+I+"Z").call(l.singleFillStyle):y(C).attr("d",q+"L"+I.substr(1)+"Z").call(l.singleFillStyle),_._polygons=_._polygons.concat(D)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=U):(S?Z(S):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),M.datum(f),E.datum(f),function(e,a,i){var o,u=i[0].trace,f=c.hasMarkers(u),p=c.hasText(u),h=tt(u),d=et,g=et;if(f||p){var v=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?K:J:_&&!w&&(v=$),f&&(d=v),p&&(g=v)}var k,T=(o=e.selectAll("path.point").data(d,h)).enter().append("path").classed("point",!0);m&&T.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),f&&(k=l.makePointStyleFns(u)),o.each((function(e){var a=n.select(this),i=y(a);l.translatePoint(e,i,x,b)?(l.singlePointStyle(e,i,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,i,x,b,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):i.remove()})),m?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(g,h)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(t){var e=n.select(this),a=y(e.select("text"));l.translatePoint(t,a,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()})),o.selectAll("text").call(l.textPointStyle,u,t).each((function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll("tspan.line").each((function(){y(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(M,E,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(E,X,t)}function Z(t){y(t).attr("d","M0,0Z")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function $(t){return t.filter((function(t){return!t.gap}))}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,a,i,c){var u,p,d=!i,g=!!i&&i.duration>0,v=f(t,e,r);(u=a.selectAll("g.trace").data(v,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each((function(e){var a=o(n.select(this),"g","fills");l.setClipUrl(a,r.layerClipId,t);var i=e[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(t){i[t]=null})).remove(),u.order().each((function(t){i[t]=o(n.select(this),"path","js-fill")}))}))}(t,u,e),g?(c&&(p=c()),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(t,n,e,r,v,this,i)}))}))):u.each((function(r,n){h(t,n,e,r,v,this,i)})),d&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":613,"../../lib":717,"../../lib/polygon":729,"../../registry":846,"./line_points":1134,"./link_traces":1136,"./subtypes":1144,d3:165}],1141:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,a,i,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r0){var p=a.c2l(u);a._lowerLogErrorBound||(a._lowerLogErrorBound=p),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,p)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[a(t.x,t.error_x,e[0],r.xaxis),a(t.y,t.error_y,e[1],r.yaxis),a(t.z,t.error_z,e[2],r.zaxis)],i=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function b(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return h[t]}function k(t,e,r,n,a){var i=null;if(l.isArrayOrTypedArray(t)){i=[];for(var o=0;o=0){var g=function(t,e,r){var n,a=(r+1)%3,i=(r+2)%3,o=[],l=[];for(n=0;n=0&&f("surfacecolor",p||h);for(var d=["x","y","z"],g=0;g<3;++g){var v="projection."+d[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}var m=n.getComponentMethod("errorbars","supplyDefaults");m(t,e,p||h||r,{axis:"z"}),m(t,e,p||h||r,{axis:"y",inherit:"z"}),m(t,e,p||h||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":717,"../../registry":846,"../scatter/line_defaults":1133,"../scatter/marker_defaults":1139,"../scatter/subtypes":1144,"../scatter/text_defaults":1145,"./attributes":1147}],1152:[function(t,e,r){"use strict";e.exports={plot:t("./convert"),attributes:t("./attributes"),markerSymbols:t("../../constants/gl3d_markers"),supplyDefaults:t("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:t("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":691,"../../plots/gl3d":805,"./attributes":1147,"./calc":1148,"./convert":1150,"./defaults":1151}],1153:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/template_attributes").texttemplateAttrs,s=t("../../components/colorscale/attributes"),l=t("../../lib/extend").extendFlat,c=n.marker,u=n.line,f=c.line;e.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:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:"calc"},s("marker.line")),gradient:c.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":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scatter/attributes":1120}],1154:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&"legendonly"!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,p=e._length,h=new Array(p),d=!1;for(c=0;c")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,v.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":717,"../scatter/hover":1131}],1159:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:t("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../scatter/marker_colorbar":1138,"../scatter/select":1141,"../scatter/style":1143,"./attributes":1153,"./calc":1154,"./defaults":1155,"./event_data":1156,"./format_labels":1157,"./hover":1158,"./plot":1160}],1160:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../plots/cartesian/axes"),i=t("../../components/drawing");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f={xaxis:a.getFromId(t,u.xaxis||"x"),yaxis:a.getFromId(t,u.yaxis||"y"),plot:e.plot};for(n(t,f,r,o),s=0;s")}function h(t){return t+"°"}}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":630,"../../constants/numerical":693,"../../lib":717,"../scatter/get_trace_color":1130,"./attributes":1161}],1167:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style"),styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:t("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":795,"../scatter/marker_colorbar":1138,"../scatter/style":1143,"./attributes":1161,"./calc":1162,"./defaults":1163,"./event_data":1164,"./format_labels":1165,"./hover":1166,"./plot":1168,"./select":1169,"./style":1170}],1168:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../lib/topojson_utils").getTopojsonFeatures,o=t("../../lib/geojson_utils"),s=t("../../lib/geo_location_utils"),l=t("../../plots/cartesian/autorange").findExtremes,c=t("../../constants/numerical").BADNUM,u=t("../scatter/calc").calcMarkerSize,f=t("../scatter/subtypes"),p=t("./style");e.exports={calcGeoJSON:function(t,e){var r,n,a=t[0].trace,o=e[a.geo],f=o._subplot,p=a._length;if(Array.isArray(a.locations)){var h=a.locationmode,d="geojson-id"===h?s.extractTraceFeature(t):i(a,f.topojson);for(r=0;r=g,k=2*_,T={},A=e._x=y.makeCalcdata(e,"x"),M=e._y=x.makeCalcdata(e,"y"),E=new Array(k);for(r=0;r<_;r++)o=A[r],s=M[r],E[2*r]=o===d?NaN:o,E[2*r+1]=s===d?NaN:s;if("log"===y.type)for(r=0;r1&&a.extendFlat(s.line,p.linePositions(t,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(t,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(t,r,s.text,s.marker)),a.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),a.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,E,A,M),O=h(t,b);return u(m,e),w?L.marker&&(C=2*(L.marker.sizeAvg||Math.max(L.marker.size,3))):C=l(e,_),c(t,e,y,x,A,M,C),L.errorX&&v(e,y,L.errorX),L.errorY&&v(e,x,L.errorY),L.fill&&!O.fill2d&&(O.fill2d=!0),L.marker&&!O.scatter2d&&(O.scatter2d=!0),L.line&&!O.line2d&&(O.line2d=!0),!L.errorX&&!L.errorY||O.error2d||(O.error2d=!0),L.text&&!O.glText&&(O.glText=!0),L.marker&&(L.marker.snap=_),O.lineOptions.push(L.line),O.errorXOptions.push(L.errorX),O.errorYOptions.push(L.errorY),O.fillOptions.push(L.fill),O.markerOptions.push(L.marker),O.markerSelectedOptions.push(L.markerSel),O.markerUnselectedOptions.push(L.markerUnsel),O.textOptions.push(L.text),O.textSelectedOptions.push(L.textSel),O.textUnselectedOptions.push(L.textUnsel),O.selectBatch.push([]),O.unselectBatch.push([]),T._scene=O,T.index=O.count,T.x=A,T.y=M,T.positions=E,O.count++,[{x:!1,y:!1,t:T,trace:e}]}},{"../../constants/numerical":693,"../../lib":717,"../../plots/cartesian/autorange":764,"../../plots/cartesian/axis_ids":768,"../scatter/calc":1121,"../scatter/colorscale_calc":1123,"./constants":1173,"./convert":1174,"./scene_update":1182,"point-cluster":471}],1173:[function(t,e,r){"use strict";e.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]}}},{}],1174:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("svg-path-sdf"),i=t("color-normalize"),o=t("../../registry"),s=t("../../lib"),l=t("../../components/drawing"),c=t("../../plots/cartesian/axis_ids"),u=t("../../lib/gl_format_color").formatColor,f=t("../scatter/subtypes"),p=t("../scatter/make_bubble_size_func"),h=t("./helpers"),d=t("./constants"),g=t("../../constants/interactions").DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},m=t("../../components/fx/helpers").appendArrayPointValue;function y(t,e){var r,a=t._fullLayout,i=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,p=o.family,h={},d=e.texttemplate;if(d){h.text=[];var g=a._d3locale,v=Array.isArray(d),y=v?Math.min(d.length,i):i,x=v?function(t){return d[t]}:function(){return d};for(r=0;rd.TOO_MANY_POINTS?"rect":f.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var p=n[0],h=n[1];for(a=0;a1?l[a]:l[0]:l,d=Array.isArray(c)?c.length>1?c[a]:c[0]:c,g=v[h],m=v[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[a]=[g*y/p,x/p]}}return o}}},{"../../components/drawing":613,"../../components/fx/helpers":627,"../../constants/interactions":692,"../../lib":717,"../../lib/gl_format_color":714,"../../plots/cartesian/axis_ids":768,"../../registry":846,"../scatter/make_bubble_size_func":1137,"../scatter/subtypes":1144,"./constants":1173,"./helpers":1178,"color-normalize":122,"fast-isnumeric":228,"svg-path-sdf":534}],1175:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./helpers"),o=t("./attributes"),s=t("../scatter/constants"),l=t("../scatter/subtypes"),c=t("../scatter/xy_defaults"),u=t("../scatter/marker_defaults"),f=t("../scatter/line_defaults"),p=t("../scatter/fillcolor_defaults"),h=t("../scatter/text_defaults");e.exports=function(t,e,r,d){function g(r,a){return n.coerce(t,e,o,r,a)}var v=!!t.marker&&i.isOpenSymbol(t.marker.symbol),m=l.isBubble(t),y=c(t,e,d,g);if(y){var x=y100},r.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},{"./constants":1173}],1179:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),i=t("../scatter/get_trace_color");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,p={pointNumber:f,x:e[f],y:r[f]};p.tx=Array.isArray(o.text)?o.text[f]:o.text,p.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,p.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,p.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var h=o.textfont;h&&(p.ts=a.isArrayOrTypedArray(h.size)?h.size[f]:h.size,p.tc=Array.isArray(h.color)?h.color[f]:h.color,p.tf=Array.isArray(h.family)?h.family[f]:h.family);var d=o.marker;d&&(p.ms=a.isArrayOrTypedArray(d.size)?d.size[f]:d.size,p.mo=a.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,p.mx=a.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,p.mc=a.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(p.mlc=Array.isArray(g.color)?g.color[f]:g.color,p.mlw=a.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var v=d&&d.gradient;v&&"none"!==v.type&&(p.mgt=Array.isArray(v.type)?v.type[f]:v.type,p.mgc=Array.isArray(v.color)?v.color[f]:v.color);var m=s.c2p(p.x,!0),y=l.c2p(p.y,!0),x=p.mrc||1,b=o.hoverlabel;b&&(p.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,p.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,p.hts=a.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,p.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,p.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,p.hnl=a.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(p.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(p.ht=Array.isArray(w)?w[f]:w);var k={};k[t.index]=p;var T=a.extendFlat({},t,{color:i(o,p),x0:m-x,x1:m+x,xLabelVal:p.x,y0:y-x,y1:y+x,yLabelVal:p.y,cd:k,distance:c,spikeDistance:u,hovertemplate:p.ht});return p.htx?T.text=p.htx:p.tx?T.text=p.tx:o.text&&(T.text=o.text),a.fillText(p,o,T),n.getComponentMethod("errorbars","hoverInfo")(p,o,T),T}e.exports={hoverPoints:function(t,e,r,n){var a,i,s,l,c,u,f,p,h,d=t.cd,g=d[0].t,v=d[0].trace,m=t.xa,y=t.ya,x=g.x,b=g.y,_=m.c2p(e),w=y.c2p(r),k=t.distance;if(g.tree){var T=m.p2c(_-k),A=m.p2c(_+k),M=y.p2c(w-k),E=y.p2c(w+k);a="x"===n?g.tree.range(Math.min(T,A),Math.min(y._rl[0],y._rl[1]),Math.max(T,A),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(T,A),Math.min(M,E),Math.max(T,A),Math.max(M,E))}else a=g.ids;var S=k;if("x"===n)for(c=0;c-1;c--)s=x[a[c]],l=b[a[c]],u=m.c2p(s)-_,f=y.c2p(l)-w,(p=Math.sqrt(u*u+f*f))v.glText.length){var _=x-v.glText.length;for(h=0;h<_;h++)v.glText.push(new o(b))}else if(xr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,x),v.fill2d&&(v.fillOptions=v.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var a,i,o=n[0],s=o.trace,l=o.t,c=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,p,h=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(f=0;ff&&isNaN(d[p+1]);)p-=2;0!==d[f+1]&&(h=[d[f],0]),h=h.concat(d.slice(f,p+2)),0!==d[p+1]&&(h=h.concat([d[p],0]))}else if("tozerox"===s.fill){for(f=0;ff&&isNaN(d[p]);)p-=2;0!==d[f]&&(h=[0,d[f+1]]),h=h.concat(d.slice(f,p+2)),0!==d[p]&&(h=h.concat([0,d[p+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(h=[],a=0,i=0;i-1;for(h=0;h=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-h;if(n.getClosest(l,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=a.modHalf(e[0],360),i=e[1],o=p.project([n,i]),l=o.x-u.c2p([d,i]),c=o.y-f.c2p([n,r]),h=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-h,1-3/h)}),t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[a.modHalf(v[0],360)+h,v[1]],y=u.c2p(m),x=f.c2p(m),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:p};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=i(c,g),t.extraText=function(t,e,r){if(!t.hovertemplate){var n=(e.hi||t.hoverinfo).split("+"),a=-1!==n.indexOf("all"),i=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,c=[];return a||i&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):i?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(a||-1!==n.indexOf("text"))&&o(e,t,c),c.join("
")}function u(t){return t+"°"}}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":630,"../../constants/numerical":693,"../../lib":717,"../scatter/get_trace_color":1130}],1190:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:t("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":820,"../scatter/marker_colorbar":1138,"../scattergeo/calc":1162,"./attributes":1184,"./defaults":1186,"./event_data":1187,"./format_labels":1188,"./hover":1189,"./plot":1191,"./select":1192}],1191:[function(t,e,r){"use strict";var n=t("./convert"),a=t("../../plots/mapbox/constants").traceLayerPrefix,i=["fill","line","circle","symbol"];function o(t,e){this.type="scattermapbox",this.subplot=t,this.uid=e,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol"},this.layerIds={fill:a+e+"-fill",line:a+e+"-line",circle:a+e+"-circle",symbol:a+e+"-symbol"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:"geojson",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,a,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup["trace-"+this.uid];if(c!==this.below){for(e=i.length-1;e>=0;e--)r=i[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=i[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,a=new o(t,r.uid),s=n(t.gd,e),l=a.below=t.belowLookup["trace-"+r.uid],c=0;c")}}e.exports={hoverPoints:function(t,e,r,i){var o=n(t,e,r,i);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,a(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:a}},{"../scatter/hover":1131}],1198:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":829,"../scatter/marker_colorbar":1138,"../scatter/select":1141,"../scatter/style":1143,"./attributes":1193,"./calc":1194,"./defaults":1195,"./format_labels":1196,"./hover":1197,"./plot":1199}],1199:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){for(var i=e.layers.frontplot.select("g.scatterlayer"),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=e.radialAxis,l=e.angularAxis,c=0;c=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,h,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,h,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,h,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,h,y.text,y.markerUnsel))),y.fill&&!p.fill2d&&(p.fill2d=!0),y.marker&&!p.scatter2d&&(p.scatter2d=!0),y.line&&!p.line2d&&(p.line2d=!0),y.text&&!p.glText&&(p.glText=!0),p.lineOptions.push(y.line),p.fillOptions.push(y.fill),p.markerOptions.push(y.marker),p.markerSelectedOptions.push(y.markerSel),p.markerUnselectedOptions.push(y.markerUnsel),p.textOptions.push(y.text),p.textSelectedOptions.push(y.textSel),p.textUnselectedOptions.push(y.textUnsel),p.selectBatch.push([]),p.unselectBatch.push([]),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=p,d.index=p.count,p.count++}})),i(t,e,r)}}},{"../../lib":717,"../scattergl/constants":1173,"../scattergl/convert":1174,"../scattergl/plot":1181,"../scattergl/scene_update":1182,"fast-isnumeric":228,"point-cluster":471}],1207:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../../plots/template_attributes").texttemplateAttrs,i=t("../scatter/attributes"),o=t("../../plots/attributes"),s=t("../../components/colorscale/attributes"),l=t("../../components/drawing/attributes").dash,c=t("../../lib/extend").extendFlat,u=i.marker,f=i.line,p=u.line;e.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:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},i.hovertext,{}),line:{color:f.color,width:f.width,dash:l,shape:c({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:p.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":599,"../../components/drawing/attributes":612,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scatter/attributes":1120}],1208:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,u,f,p,h,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r"),o.hovertemplate=p.hovertemplate,i}function x(t,e){m.push(t._hovertitle+": "+e)}}},{"../scatter/hover":1131}],1213:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:t("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":842,"../scatter/marker_colorbar":1138,"../scatter/select":1141,"../scatter/style":1143,"./attributes":1207,"./calc":1208,"./defaults":1209,"./event_data":1210,"./format_labels":1211,"./hover":1212,"./plot":1214}],1214:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e,r){var a=e.plotContainer;a.select(".scatterlayer").selectAll("*").remove();var i={xaxis:e.xaxis,yaxis:e.yaxis,plot:a,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select("g.scatterlayer");n(t,i,r,o)}},{"../scatter/plot":1140}],1215:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../scattergl/attributes"),s=t("../../plots/cartesian/constants").idRegex,l=t("../../plot_api/plot_template").templatedArray,c=t("../../lib/extend").extendFlat,u=n.marker,f=u.line,p=c(a("marker.line",{editTypeOverride:"calc"}),{width:c({},f.width,{editType:"calc"}),editType:"calc"}),h=c(a("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:p,editType:"calc"});function d(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[t],editType:"plot"}}}h.color.editType=h.cmin.editType=h.cmax.editType="style",e.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:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:i(),marker:h,xaxes:d("x"),yaxes:d("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":599,"../../lib/extend":708,"../../plot_api/plot_template":755,"../../plots/cartesian/constants":771,"../../plots/template_attributes":841,"../scatter/attributes":1120,"../scattergl/attributes":1171}],1216:[function(t,e,r){"use strict";var n=t("regl-line2d"),a=t("../../registry"),i=t("../../lib/prepare_regl"),o=t("../../plots/get_data").getModuleCalcData,s=t("../../plots/cartesian"),l=t("../../plots/cartesian/axis_ids").getFromId,c=t("../../plots/cartesian/axes").shouldShowZeroLine;function u(t,e,r){for(var n=r.matrixOptions.data.length,a=e._visibleDims,i=r.viewOpts.ranges=new Array(n),o=0;op?2*(b.sizeAvg||Math.max(b.size,3)):i(e,x),h=0;hi&&l?r._splomSubplots[E]=1:a-1,A=!0;if("lasso"===y||"select"===y||p.selectedpoints||T){var M=p._length;if(p.selectedpoints){d.selectBatch=p.selectedpoints;var E=p.selectedpoints,S={};for(s=0;s1&&(u=g[y-1],p=v[y-1],d=m[y-1]),e=0;eu?"-":"+")+"x")).replace("y",(f>p?"-":"+")+"y")).replace("z",(h>d?"-":"+")+"z");var C=function(){y=0,M=[],E=[],S=[]};(!y||y2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function h(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,a=t.dataScale,u=e._len,f={};function d(t,e){var n=r[e],o=a[c[e]];return i.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,"xaxis"),d(e._v,"yaxis"),d(e._w,"zaxis"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,"xaxis"),v=d(e._Ys,"yaxis"),m=d(e._Zs,"zaxis");if(f.meshgrid=[g,v,m],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,"xaxis"),d(e._startsY,"yaxis"),d(e._startsZ,"zaxis"));else{for(var y=v[0],x=p(g),b=p(m),_=new Array(x.length*b.length),w=0,k=0;k=0};m?(r=Math.min(v.length,x.length),l=function(t){return A(v[t])&&M(t)},f=function(t){return String(v[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var E=0;E1){for(var O=i.randstr(),P=0;P"),name:T||I("name")?l.name:void 0,color:k("hoverlabel.bgcolor")||y.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:T,hovertemplateLabels:L,eventData:[f(a,l,p.eventDataKeys)]};v&&(R.x0=E-a.rInscribed*a.rpx1,R.x1=E+a.rInscribed*a.rpx1,R.idealAlign=a.pxmid[0]<0?"left":"right"),m&&(R.x=E,R.idealAlign=E<0?"left":"right"),o.loneHover(R,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}),d._hasHoverLabel=!0}if(m){var F=t.select("path.surface");p.styleOne(F,a,l,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:[f(a,l,p.eventDataKeys)],event:n.event})}})),t.on("mouseout",(function(e){var a=r._fullLayout,i=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[f(s,i,p.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),d._hasHoverLabel=!1),m){var l=t.select("path.surface");p.styleOne(l,s,i,{hovered:!1})}})),t.on("click",(function(t){var e=r._fullLayout,i=r._fullData[d.index],s=v&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),h=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),m=c.getPtId(h),y={points:[f(t,i,p.eventDataKeys)],event:n.event};s||(y.nextLevel=m);var x=l.triggerHandler(r,"plotly_"+d.type+"click",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,i,p.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){a.call("_storeDirectGUIEdit",i,e._tracePreGUI[i.uid],{level:i.level});var b={data:[{level:m}],traces:[d.index]},_={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),a.call("animate",r,b,_)}}))}},{"../../components/fx":630,"../../components/fx/helpers":627,"../../lib":717,"../../lib/events":707,"../../registry":846,"../pie/helpers":1099,"./helpers":1237,d3:165}],1237:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/color"),i=t("../../lib/setcursor"),o=t("../pie/helpers");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var a=t.children||[],i=0;i0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var a=e?[n.data[e]]:[n];return r.listPath(n,e).concat(a)},r.getPath=function(t){return r.listPath(t,"label").join("/")+"/"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return"0%"===r&&(r=o.formatPiePercent(t,e)),r}},{"../../components/color":592,"../../lib":717,"../../lib/setcursor":737,"../pie/helpers":1099}],1238:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot").plot,style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1138,"./attributes":1231,"./base_plot":1232,"./calc":1233,"./defaults":1235,"./layout_attributes":1239,"./layout_defaults":1240,"./plot":1241,"./style":1242}],1239:[function(t,e,r){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1240:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},{"../../lib":717,"./layout_attributes":1239}],1241:[function(t,e,r){"use strict";var n=t("d3"),a=t("d3-hierarchy"),i=t("../../components/drawing"),o=t("../../lib"),s=t("../../lib/svg_text_utils"),l=t("../bar/uniform_text"),c=l.recordMinTextSize,u=l.clearMinTextSize,f=t("../pie/plot"),p=f.computeTransform,h=f.transformInsideText,d=t("./style").styleOne,g=t("../bar/style").resizeText,v=t("./fx"),m=t("./constants"),y=t("./helpers");function x(t,e,l,u){var f=t._fullLayout,g=!f.uniformtext.mode&&y.hasTransition(u),x=n.select(l).selectAll("g.slice"),_=e[0],w=_.trace,k=_.hierarchy,T=y.findEntryWithLevel(k,w.level),A=y.getMaxDepth(w),M=f._size,E=w.domain,S=M.w*(E.x[1]-E.x[0]),C=M.h*(E.y[1]-E.y[0]),L=.5*Math.min(S,C),O=_.cx=M.l+M.w*(E.x[1]+E.x[0])/2,P=_.cy=M.t+M.h*(1-E.y[0])-C/2;if(!T)return x.remove();var I=null,D={};g&&x.each((function(t){D[y.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!I&&y.isEntry(t)&&(I=t)}));var z=function(t){return a.partition().size([2*Math.PI,t.height+1])(t)}(T).descendants(),R=T.height+1,F=0,B=A;_.hasMultipleRoots&&y.isHierarchyRoot(T)&&(z=z.slice(1),R-=1,F=1,B+=1),z=z.filter((function(t){return t.y1<=B}));var N=Math.min(R,A),j=function(t){return(t-F)/N*L},V=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},U=function(t){return o.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,P)},q=function(t){return O+b(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},H=function(t){return P+b(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(x=x.data(z,y.getPtId)).enter().append("g").classed("slice",!0),g?x.exit().transition().each((function(){var t=n.select(this);t.select("path.surface").transition().attrTween("d",(function(t){var e=function(t){var e,r=y.getPtId(t),a=D[r],i=D[y.getPtId(T)];if(i){var o=t.x1>i.x1?2*Math.PI:0;e=t.rpx1G?2*Math.PI:0;e={x0:i,x1:i}}else e={rpx0:L,rpx1:L},o.extendFlat(e,X(t));else e={rpx0:0,rpx1:0};else e={x0:0,x1:0};return n.interpolate(e,a)}(t);return function(t){return U(e(t))}})):u.attr("d",U),l.call(v,T,t,e,{eventDataKeys:m.eventDataKeys,transitionTime:m.CLICK_TRANSITION_TIME,transitionEasing:m.CLICK_TRANSITION_EASING}).call(y.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),u.call(d,a,w);var x=o.ensureSingle(l,"g","slicetext"),b=o.ensureSingle(x,"text","",(function(t){t.attr("data-notex",1)})),k=o.ensureUniformFontSize(t,y.determineTextFont(w,a,f.font));b.text(r.formatSliceLabel(a,T,w,e,f)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,k).call(s.convertToTspans,t);var A=i.bBox(b.node());a.transform=h(A,a,_),a.transform.targetX=q(a),a.transform.targetY=H(a);var M=function(t,e){var r=t.transform;return p(r,e),r.fontSize=k.size,c(w.type,r,f),o.getTextTransform(r)};g?b.transition().attrTween("transform",(function(t){var e=function(t){var e,r=D[y.getPtId(t)],a=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:a.textPosAngle,scale:0,rotate:a.rotate,rCenter:a.rCenter,x:a.x,y:a.y}},I)if(t.parent)if(G){var i=t.x1>G?2*Math.PI:0;e.x0=e.x1=i}else o.extendFlat(e,X(t));else e.x0=e.x1=0;else e.x0=e.x1=0;var s=n.interpolate(e.transform.textPosAngle,t.transform.textPosAngle),l=n.interpolate(e.rpx1,t.rpx1),u=n.interpolate(e.x0,t.x0),p=n.interpolate(e.x1,t.x1),h=n.interpolate(e.transform.scale,a.scale),d=n.interpolate(e.transform.rotate,a.rotate),g=0===a.rCenter?3:0===e.transform.rCenter?1/3:1,v=n.interpolate(e.transform.rCenter,a.rCenter);return function(t){var e=l(t),r=u(t),n=p(t),i=function(t){return v(Math.pow(t,g))}(t),o={pxmid:V(e,(r+n)/2),rpx1:e,transform:{textPosAngle:s(t),rCenter:i,x:a.x,y:a.y}};return c(w.type,a,f),{transform:{targetX:q(o),targetY:H(o),scale:h(t),rotate:d(t),rCenter:i}}}}(t);return function(t){return M(e(t),A)}})):b.attr("transform",M(a,A))}))}function b(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,a){var i,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,f=!s.uniformtext.mode&&y.hasTransition(r);u("sunburst",s),(i=l.selectAll("g.trace.sunburst").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),i.order(),f?(a&&(o=a()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(e){x(t,e,this,r)}))}))):(i.each((function(e){x(t,e,this,r)})),s.uniformtext.mode&&g(t,s._sunburstlayer.selectAll(".trace"),"sunburst")),c&&i.exit().remove()},r.formatSliceLabel=function(t,e,r,n,a){var i=r.texttemplate,s=r.textinfo;if(!(i||s&&"none"!==s))return"";var l=a.separators,c=n[0],u=t.data.data,f=c.hierarchy,p=y.isHierarchyRoot(t),h=y.getParent(f,t),d=y.getValue(t);if(!i){var g,v=s.split("+"),m=function(t){return-1!==v.indexOf(t)},x=[];if(m("label")&&u.label&&x.push(u.label),u.hasOwnProperty("v")&&m("value")&&x.push(y.formatValue(u.v,l)),!p){m("current path")&&x.push(y.getPath(t.data));var b=0;m("percent parent")&&b++,m("percent entry")&&b++,m("percent root")&&b++;var _=b>1;if(b){var w,k=function(t){g=y.formatPercent(w,l),_&&(g+=" of "+t),x.push(g)};m("percent parent")&&!p&&(w=d/y.getValue(h),k("parent")),m("percent entry")&&(w=d/y.getValue(e),k("entry")),m("percent root")&&(w=d/y.getValue(f),k("root"))}}return m("text")&&(g=o.castOption(r,u.i,"text"),o.isValidTextValue(g)&&x.push(g)),x.join("
")}var T=o.castOption(r,u.i,"texttemplate");if(!T)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=y.formatValue(u.v,l)),A.currentPath=y.getPath(t.data),p||(A.percentParent=d/y.getValue(h),A.percentParentLabel=y.formatPercent(A.percentParent,l),A.parent=y.getPtLabel(h)),A.percentEntry=d/y.getValue(e),A.percentEntryLabel=y.formatPercent(A.percentEntry,l),A.entry=y.getPtLabel(e),A.percentRoot=d/y.getValue(f),A.percentRootLabel=y.formatPercent(A.percentRoot,l),A.root=y.getPtLabel(f),u.hasOwnProperty("color")&&(A.color=u.color);var M=o.castOption(r,u.i,"text");return(o.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=o.castOption(r,u.i,"customdata"),o.texttemplateString(T,A,a._d3locale,A,r._meta||{})}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../bar/style":870,"../bar/uniform_text":872,"../pie/plot":1103,"./constants":1234,"./fx":1236,"./helpers":1237,"./style":1242,d3:165,"d3-hierarchy":159}],1242:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib"),o=t("../bar/uniform_text").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=i.castOption(r,s,"marker.line.color")||a.defaultLine,c=i.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",c).call(a.fill,n.color).call(a.stroke,l).style("opacity",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");o(t,e,"sunburst"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style("opacity",r.opacity),e.selectAll("path.surface").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{"../../components/color":592,"../../lib":717,"../bar/uniform_text":872,d3:165}],1243:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;function c(t){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 u=e.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:c(),y:c(),z:c()},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),showlegend:s({},o.showlegend,{dflt:!1})}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":592,"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plot_api/edit_types":748,"../../plots/attributes":762,"../../plots/template_attributes":841}],1244:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):n(t,e,{vals:e.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":600}],1245:[function(t,e,r){"use strict";var n=t("gl-surface3d"),a=t("ndarray"),i=t("ndarray-homography"),o=t("ndarray-fill"),s=t("../../lib").isArrayOrTypedArray,l=t("../../lib/gl_format_color").parseColorScale,c=t("../../lib/str2rgbarray"),u=t("../../components/colorscale").extractOpts,f=t("../heatmap/interp2d"),p=t("../heatmap/find_empties");function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,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 d=h.prototype;d.getXat=function(t,e,r,n){var a=s(this.data.x)?s(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?a:n.d2l(a,0,r)},d.getYat=function(t,e,r,n){var a=s(this.data.y)?s(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?a:n.d2l(a,0,r)},d.getZat=function(t,e,r,n){var a=this.data.z[e][t];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[e][t]),void 0===r?a:n.d2l(a,0,r)},d.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,a],t.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],t.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=t.dataCoordinate[i];null!=o&&(t.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]?t.textLabel=s[a][n]:t.textLabel=s||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var g=[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 v(t,e){if(t0){r=g[n];break}return r}function x(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),a=1,i=0;iw;)r--,r/=y(r),++r<_&&(r=w);var n=Math.round(r/t);return n>1?n:1},d.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],o=t[0].shape[1],s=0|Math.floor(t[0].shape[0]*e+1),l=0|Math.floor(t[0].shape[1]*r+1),c=1+n+1,u=1+o+1,f=a(new Float32Array(c*u),[c,u]),p=0;p0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(a[t]=!0,e=this.contourStart[t];ei&&(this.minValues[e]=i),this.maxValues[e]",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"}}},{}],1252:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/extend").extendFlat,i=t("fast-isnumeric");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||c===t.length-1)&&(n[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=i,s=c+1,i=0);return n}e.exports=function(t,e){var r=l(e.cells.values),h=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[""],d=l(d));var g=d.concat(h(r).map((function(){return c((d[0]||[""]).length)}))),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map((function(){return e.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return e.cells.height})):[],_=x.reduce(s,0),w=p(b,y-_+n.uplift),k=f(p(x,_),[]),T=f(w,k),A={},M=e._fullInput.columnorder.concat(h(r.map((function(t,e){return e})))),E=g.map((function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return i(n)?Number(n):1})),S=E.reduce(s,0);E=E.map((function(t){return t/S*m}));var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:y,columnOrder:M,groupHeight:y,rowBlocks:T,headerRowBlocks:k,scrollY:0,cells:a({},e.cells,{values:r}),headerCells:a({},e.header,{values:g}),gdColumns:g.map((function(t){return t[0]})),gdColumnsOriginalOrder:g.map((function(t){return t[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+"__"+A[t],label:t,specIndex:e,xIndex:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:E[e]}}))};return L.columns.forEach((function(t){t.calcdata=L,t.x=u(t)})),L}},{"../../lib/extend":708,"./constants":1251,"fast-isnumeric":228}],1253:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}}))}},{"../../lib/extend":708}],1254:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults;e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}i(e,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(t,e){for(var r=t.columnorder||[],n=t.header.values.length,a=r.slice(0,n),i=a.slice().sort((function(t,e){return t-e})),o=a.map((function(t){return i.indexOf(t)})),s=o.length;s/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u="string"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,p,h=u?"":_(t.calcdata.cells.prefix,e,r)||"",d=u?"":_(t.calcdata.cells.suffix,e,r)||"",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=h+(g?a.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?b(v):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(" "===n.wrapSplitCharacter?v.replace(/a&&n.push(i),a+=l}return n}(a,l,s);1===c.length&&(c[0]===a.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),e.each((function(t,e){t.page=c[e],t.scrollY=l})),e.attr("transform",(function(t){return"translate(0 "+(I(t.rowBlocks,t.page)-t.scrollY)+")"})),t&&(S(t,r,e,c,n.prevPages,n,0),S(t,r,e,c,n.prevPages,n,1),m(r,t))}}function E(t,e,r,i){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter((function(t){return s.key===t.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===i?s.scrollY+c*a.event.dy:i;var f=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return M(t,f,l),s.scrollY===u}}function S(t,e,r,n,a,i,o){n[o]!==a[o]&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout((function(){var i=r.filter((function(t,e){return e===o&&n[e]!==a[e]}));y(t,e,i,r),a[o]=n[o]})))}function C(t,e,r,i){return function(){var o=a.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll("tspan.line").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,a,i=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value="";s.length;)c+(a=(r=s.shift()).width+i)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=a;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0})),o.selectAll("tspan.line").remove(),x(o.select("."+n.cn.cellText),r,t,i),a.select(e.parentNode.parentNode).call(P)}}function L(t,e,r,i,o){return function(){if(!o.settledY){var s=a.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,f=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,p=Math.max(f,u);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll("."+n.cn.columnCell).call(P),M(null,t.filter(k),0),m(r,i,!0)),s.attr("transform",(function(){var t=this.parentNode.getBoundingClientRect(),e=a.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),i=e.top-t.top+(r?r.matrix.f:n.cellPad);return"translate("+O(o,a.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+i+")"})),o.settledY=!0}}}function O(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function P(t){t.attr("transform",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+D(e,1/0)}),0);return"translate(0 "+(D(R(t),t.key)+e)+")"})).selectAll("."+n.cn.cellRect).attr("height",(function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function I(t,e){for(var r=0,n=e-1;n>=0;n--)r+=z(t[n]);return r}function D(t,e){for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:a({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},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":599,"../../lib/extend":708,"../../plots/domain":790,"../../plots/template_attributes":841,"../pie/attributes":1094,"../sunburst/attributes":1231,"./constants":1260}],1258:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="treemap",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":826}],1259:[function(t,e,r){"use strict";var n=t("../sunburst/calc");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc("treemap",t)}},{"../sunburst/calc":1233}],1260:[function(t,e,r){"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1261:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../components/color"),o=t("../../plots/domain").defaults,s=t("../bar/defaults").handleText,l=t("../bar/constants").TEXTPAD,c=t("../../components/colorscale"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function p(r,i){return n.coerce(t,e,a,r,i)}var h=p("labels"),d=p("parents");if(h&&h.length&&d&&d.length){var g=p("values");g&&g.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),"squarify"===p("tiling.packing")&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var v=p("text");p("texttemplate"),e.texttemplate||p("textinfo",Array.isArray(v)?"text+label":"label"),p("hovertext"),p("hovertemplate");var m=p("pathbar.visible");s(t,e,c,p,"auto",{hasPathbar:m,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var y=-1!==e.textposition.indexOf("bottom");p("marker.line.width")&&p("marker.line.color",c.paper_bgcolor);var x=p("marker.colors"),b=e._hasColorscale=u(t,"marker","colors")||(t.marker||{}).coloraxis;b?f(t,e,c,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(x||[]).length);var _=2*e.textfont.size;p("marker.pad.t",y?_/4:_),p("marker.pad.l",_/4),p("marker.pad.r",_/4),p("marker.pad.b",y?_:_/4),b&&f(t,e,c,p,{prefix:"marker.",cLetter:"c"}),e._hovered={marker:{line:{width:2,color:i.contrast(c.paper_bgcolor)}}},m&&(p("pathbar.thickness",e.pathbar.textfont.size+2*l),p("pathbar.side"),p("pathbar.edgeshape")),o(e,c,p),e._length=null}else e.visible=!1}},{"../../components/color":592,"../../components/colorscale":604,"../../lib":717,"../../plots/domain":790,"../bar/constants":858,"../bar/defaults":860,"./attributes":1257}],1262:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx");e.exports=function(t,e,r,p,h){var d=h.barDifY,g=h.width,v=h.height,m=h.viewX,y=h.viewY,x=h.pathSlice,b=h.toMoveInsideSlice,_=h.strTransform,w=h.hasTransition,k=h.handleSlicesExit,T=h.makeUpdateSliceInterpolator,A=h.makeUpdateTextInterpolator,M={},E=t._fullLayout,S=e[0],C=S.trace,L=S.hierarchy,O=g/C._entryDepth,P=u.listPath(r.data,"id"),I=s(L.copy(),[g,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(I=I.filter((function(t){var e=P.indexOf(t.data.id);return-1!==e&&(t.x0=O*e,t.x1=O*(e+1),t.y0=d,t.y1=d+v,t.onPathbar=!0,!0)}))).reverse(),(p=p.data(I,u.getPtId)).enter().append("g").classed("pathbar",!0),k(p,!0,M,[g,v],x),p.order();var D=p;w&&(D=D.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),D.each((function(s){s._hoverX=m(s.x1-Math.min(g,v)/2),s._hoverY=y(s.y1-v/2);var p=n.select(this),h=a.ensureSingle(p,"path","surface",(function(t){t.style("pointer-events","all")}));w?h.transition().attrTween("d",(function(t){var e=T(t,!0,M,[g,v]);return function(t){return x(e(t))}})):h.attr("d",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),h.call(l,s,C,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var d=a.ensureSingle(p,"g","slicetext"),k=a.ensureSingle(d,"text","",(function(t){t.attr("data-notex",1)})),S=a.ensureUniformFontSize(t,u.determineTextFont(C,s,E.font,{onPathbar:!0}));k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,S).call(o.convertToTspans,t),s.textBB=i.bBox(k.node()),s.transform=b(s,{fontSize:S.size,onPathbar:!0}),s.transform.fontSize=S.size,w?k.transition().attrTween("transform",(function(t){var e=A(t,!0,M,[g,v]);return function(t){return _(e(t))}})):k.attr("transform",_(s))}))}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../sunburst/fx":1236,"../sunburst/helpers":1237,"./constants":1260,"./partition":1267,"./style":1269,d3:165}],1263:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx"),p=t("../sunburst/plot").formatSliceLabel;e.exports=function(t,e,r,h,d){var g=d.width,v=d.height,m=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,k=d.handleSlicesExit,T=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,E=t._fullLayout,S=e[0].trace,C=-1!==S.textposition.indexOf("left"),L=-1!==S.textposition.indexOf("right"),O=-1!==S.textposition.indexOf("bottom"),P=!O&&!S.marker.pad.t||O&&!S.marker.pad.b,I=s(r,[g,v],{packing:S.tiling.packing,squarifyratio:S.tiling.squarifyratio,flipX:S.tiling.flip.indexOf("x")>-1,flipY:S.tiling.flip.indexOf("y")>-1,pad:{inner:S.tiling.pad,top:S.marker.pad.t,left:S.marker.pad.l,right:S.marker.pad.r,bottom:S.marker.pad.b}}).descendants(),D=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=S._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(D=Math.min(D,e),z=Math.max(z,e))})),h=h.data(I,u.getPtId),S._maxVisibleLayers=isFinite(z)?z-D+1:0,h.enter().append("g").classed("slice",!0),k(h,!1,{},[g,v],x),h.order();var R=null;if(w&&M){var F=u.getPtId(M);h.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:v}},N=h;return w&&(N=N.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var h=u.isHeader(s,S);s._hoverX=m(s.x1-S.marker.pad.r),s._hoverY=y(O?s.y1-S.marker.pad.b/2:s.y0+S.marker.pad.t/2);var d=n.select(this),k=a.ensureSingle(d,"path","surface",(function(t){t.style("pointer-events","all")}));w?k.transition().attrTween("d",(function(t){var e=T(t,!1,B(),[g,v]);return function(t){return x(e(t))}})):k.attr("d",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),k.call(l,s,S,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h?P?"":u.getPtLabel(s)||"":p(s,r,S,e,E)||"";var M=a.ensureSingle(d,"g","slicetext"),I=a.ensureSingle(M,"text","",(function(t){t.attr("data-notex",1)})),D=a.ensureUniformFontSize(t,u.determineTextFont(S,s,E.font));I.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",L?"end":C||h?"start":"middle").call(i.font,D).call(o.convertToTspans,t),s.textBB=i.bBox(I.node()),s.transform=b(s,{fontSize:D.size,isHeader:h}),s.transform.fontSize=D.size,w?I.transition().attrTween("transform",(function(t){var e=A(t,!1,B(),[g,v]);return function(t){return _(e(t))}})):I.attr("transform",_(s))})),R}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../sunburst/fx":1236,"../sunburst/helpers":1237,"../sunburst/plot":1241,"./constants":1260,"./partition":1267,"./style":1269,d3:165}],1264:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"treemap",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1138,"./attributes":1257,"./base_plot":1258,"./calc":1259,"./defaults":1261,"./layout_attributes":1265,"./layout_defaults":1266,"./plot":1268,"./style":1269}],1265:[function(t,e,r){"use strict";e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1266:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("treemapcolorway",e.colorway),r("extendtreemapcolors")}},{"../../lib":717,"./layout_attributes":1265}],1267:[function(t,e,r){"use strict";var n=t("d3-hierarchy");e.exports=function(t,e,r){var a,i=r.flipX,o=r.flipY,s="dice-slice"===r.packing,l=r.pad[o?"bottom":"top"],c=r.pad[i?"right":"left"],u=r.pad[i?"left":"right"],f=r.pad[o?"top":"bottom"];s&&(a=c,c=l,l=a,a=u,u=f,f=a);var p=n.treemap().tile(function(t,e){switch(t){case"squarify":return n.treemapSquarify.ratio(e);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(c).paddingRight(u).paddingTop(l).paddingBottom(f).size(s?[e[1],e[0]]:e)(t);return(s||i||o)&&function t(e,r,n){var a;n.swapXY&&(a=e.x0,e.x0=e.y0,e.y0=a,a=e.x1,e.x1=e.y1,e.y1=a),n.flipX&&(a=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-a),n.flipY&&(a=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-a);var i=e.children;if(i)for(var o=0;o-1?S+O:-(L+O):0,I={x0:C,x1:C,y0:P,y1:P+L},D=function(t,e,r){var n=v.tiling.pad,a=function(t){return t-n<=e.x0},i=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return{x0:a(t.x0-n)?0:i(t.x0-n)?r[0]:t.x0,x1:a(t.x1+n)?0:i(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},z=null,R={},F={},B=null,N=function(t,e){return e?R[g(t)]:F[g(t)]},j=function(t,e,r,n){if(e)return R[g(m)]||I;var a=F[v.level]||r;return function(t){return t.data.depth-y.data.depth=(n-=m.r-o)){var y=(r+n)/2;r=y,n=y}var x;p?a<(x=i-m.b)&&x"===$?(l.x-=i,c.x-=i,u.x-=i,f.x-=i):"/"===$?(u.x-=i,f.x-=i,o.x-=i/2,s.x-=i/2):"\\"===$?(l.x-=i,c.x-=i,o.x-=i/2,s.x-=i/2):"<"===$&&(o.x-=i,s.x-=i),K(l),K(f),K(o),K(c),K(u),K(s),"M"+Z(l.x,l.y)+"L"+Z(c.x,c.y)+"L"+Z(s.x,s.y)+"L"+Z(u.x,u.y)+"L"+Z(f.x,f.y)+"L"+Z(o.x,o.y)+"Z"},toMoveInsideSlice:Q,makeUpdateSliceInterpolator:et,makeUpdateTextInterpolator:rt,handleSlicesExit:nt,hasTransition:k,strTransform:at}):b.remove()}e.exports=function(t,e,r,i){var o,s,l=t._fullLayout,c=l._treemaplayer,p=!r;u("treemap",l),(o=c.selectAll("g.trace.treemap").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("treemap",!0),o.order(),!l.uniformtext.mode&&a.hasTransition(r)?(i&&(s=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){s&&s()})).each("interrupt",(function(){s&&s()})).each((function(){c.selectAll("g.trace").each((function(e){v(t,e,this,r)}))}))):(o.each((function(e){v(t,e,this,r)})),l.uniformtext.mode&&f(t,l._treemaplayer.selectAll(".trace"),"treemap")),p&&o.exit().remove()}},{"../../lib":717,"../bar/constants":858,"../bar/plot":867,"../bar/style":870,"../bar/uniform_text":872,"../sunburst/helpers":1237,"./constants":1260,"./draw_ancestors":1262,"./draw_descendants":1263,d3:165}],1269:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib"),o=t("../sunburst/helpers"),s=t("../bar/uniform_text").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,p=u.color,h=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(h&&"rgba(0,0,0,0)"===p)d=0,s="rgba(0,0,0,0)",l=0;else if(s=i.castOption(r,f,"marker.line.color")||a.defaultLine,l=i.castOption(r,f,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var v,m=a.combine(a.addOpacity(r._backgroundColor,.75),p);if(!0===g){var y=o.getMaxDepth(r);v=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else v=e.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var x=0;x0){var y,x,b,_,w,k=t.xa,T=t.ya;"h"===p.orientation?(w=e,y="y",b=T,x="x",_=k):(w=r,y="x",b=k,x="y",_=T);var A=f[t.index];if(w>=A.span[0]&&w<=A.span[1]){var M=n.extendFlat({},t),E=_.c2p(w,!0),S=o.getKdeValue(A,p,w),C=o.getPositionOnKdePath(A,p,E),L=b._offset,O=b._length;M[y+"0"]=C[0],M[y+"1"]=C[1],M[x+"0"]=M[x+"1"]=E,M[x+"Label"]=x+": "+a.hoverLabelText(_,w)+", "+f[0].t.labels.kde+" "+S.toFixed(3),M.spikeDistance=m[0].spikeDistance;var P=y+"Spike";M[P]=m[0][P],m[0].spikeDistance=void 0,m[0][P]=void 0,M.hovertemplate=!1,v.push(M),(u={stroke:t.color})[y+"1"]=n.constrain(L+C[0],L,L+O),u[y+"2"]=n.constrain(L+C[1],L,L+O),u[x+"1"]=u[x+"2"]=_._offset+E}}d&&(v=v.concat(m))}-1!==h.indexOf("points")&&(c=i.hoverOnPoints(t,e,r));var I=l.selectAll(".violinline-"+p.uid).data(u?[0]:[]);return I.enter().append("line").classed("violinline-"+p.uid,!0).attr("stroke-width",1.5),I.exit().remove(),I.attr(u),"closest"===s?c?[c]:v:c?(v.push(c),v):v}},{"../../lib":717,"../../plots/cartesian/axes":765,"../box/hover":886,"./helpers":1274}],1276:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),crossTraceDefaults:t("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style"),styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../box/select"),moduleType:"trace",name:"violin",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../box/defaults":884,"../box/select":891,"../scatter/style":1143,"./attributes":1270,"./calc":1271,"./cross_trace_calc":1272,"./defaults":1273,"./hover":1275,"./layout_attributes":1277,"./layout_defaults":1278,"./plot":1279,"./style":1280}],1277:[function(t,e,r){"use strict";var n=t("../box/layout_attributes"),a=t("../../lib").extendFlat;e.exports={violinmode:a({},n.boxmode,{}),violingap:a({},n.boxgap,{}),violingroupgap:a({},n.boxgroupgap,{})}},{"../../lib":717,"../box/layout_attributes":888}],1278:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes"),i=t("../box/layout_defaults");e.exports=function(t,e,r){i._supply(t,e,r,(function(r,i){return n.coerce(t,e,a,r,i)}),"violin")}},{"../../lib":717,"../box/layout_defaults":889,"./layout_attributes":1277}],1279:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../box/plot"),s=t("../scatter/line_points"),l=t("./helpers");e.exports=function(t,e,r,c){var u=t._fullLayout,f=e.xaxis,p=e.yaxis;function h(t){var e=s(t,{xaxis:f,yaxis:p,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return i.smoothopen(e[0],1)}a.makeTraceGroups(c,r,"trace violins").each((function(t){var r=n.select(this),i=t[0],s=i.t,c=i.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,v=e[s.valLetter+"axis"],m=e[s.posLetter+"axis"],y="both"===c.side,x=y||"positive"===c.side,b=y||"negative"===c.side,_=r.selectAll("path.violin").data(a.identity);_.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each((function(t){var e,r,a,i,o,l,f,p,_=n.select(this),w=t.density,k=w.length,T=m.c2l(t.pos+d,!0),A=m.l2p(T);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e="count"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(k),o=0;o")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,i=r.line.color,o=r.line.width;return a(n)?n:a(i)&&o?i:void 0}(f,d),[c]}function w(t){return n(h,t)}}},{"../../components/color":592,"../../constants/delta.js":687,"../../plots/cartesian/axes":765,"../bar/hover":863}],1292:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../bar/select":868,"./attributes":1285,"./calc":1286,"./cross_trace_calc":1288,"./defaults":1289,"./event_data":1290,"./hover":1291,"./layout_attributes":1293,"./layout_defaults":1294,"./plot":1295,"./style":1296}],1293:[function(t,e,r){"use strict";e.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"}}},{}],1294:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s0&&(g+=f?"M"+u[0]+","+h[1]+"V"+h[0]:"M"+u[1]+","+h[0]+"H"+u[0]),"between"!==p&&(r.isSum||o path").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(i.fill,e.color).call(i.stroke,e.line.color).call(a.dashLine,e.line.dash,e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".lines").each((function(){var t=s.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":592,"../../components/drawing":613,"../../constants/interactions":692,"../bar/style":870,"../bar/uniform_text":872,d3:165}],1297:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),a=t("../lib"),i=t("../plot_api/plot_schema"),o=t("./helpers").pointsAccessorFunction,s=t("../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"},c=l.aggregations;function u(t,e,r,i){if(i.enabled){for(var o=i.target,l=a.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case"count":return f;case"first":return p;case"last":return h;case"sum":return function(t,e){for(var r=0,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o":return function(t){return p(t)>s};case">=":return function(t){return p(t)>=s};case"[]":return function(t){var e=p(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=p(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=p(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=p(t);return es[1]};case"](":return function(t){var e=p(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=p(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(p(t))};case"}{":return function(t){return-1===s.indexOf(p(t))}}}(r,i.getDataToCoordFunc(t,e,s,a),p),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(v);for(var w=o(e.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(i=0;iConsensus",en:"Consensus",id:"".concat(i.default.maxBy(r,"id").id+1,"")},u=(0,o.getConsensus)(t);a=[].concat(s(e),[u]),l=[].concat(s(r),[c])}return{sequencesArray:a,sequencesInfo:l}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.xhr=e.seqs=e.parser=e.newick=e.matrix=e.gff=e.fasta=e.clustal=void 0;var n=u(r(80)),a=u(r(100)),i=u(r(102)),o=u(r(104)),s=u(r(105)),l=u(r(50)),c=u(r(55));function u(t){return t&&t.__esModule?t:{default:t}}e.clustal=n.default,e.fasta=a.default,e.gff=i.default,e.matrix=o.default,e.newick=s.default,e.parser=l.default,e.seqs=c.default;var f=r(58);e.xhr=f;var p="imported";"undefined"!=typeof IO_VERSION&&(p=IO_VERSION);e.version=p},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(r(50)),a=i(r(55));function i(t){return t&&t.__esModule?t:{default:t}}var o;e.default=o={parse:function(t){var e=[];if("[object Array]"===Object.prototype.toString.call(t))var r=t;else r=t.split("\n");if(!1===r[0].slice(0,6))throw new Error("Invalid CLUSTAL Header");for(var n=0,i=1,o=0;n=e.length){var f=a.default.getMeta(c.trim());c=f.name;var p=new a.default.model(u,c,o);p.ids=f.ids||{},p.details=f.details||{};var h=Object.keys(p.ids);h.length>0&&(p.id=p.ids[h[0]]),e.push(p)}else e[o].seq+=u;o++}else console.log("parse error",s)}}else i=1;else i=1}return e}},n.default.mixin(o)},function(t,e,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,r(48))},function(t,e){t.exports=function(t){var e=r.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var r=Object.prototype.toString},function(t,e,r){var n=r(84),a=r(98);t.exports=function(t){if(!t)return{};var e={};return a(n(t).split("\n"),(function(t){var r,a=t.indexOf(":"),i=n(t.slice(0,a)).toLowerCase(),o=n(t.slice(a+1));void 0===e[i]?e[i]=o:(r=e[i],"[object Array]"===Object.prototype.toString.call(r)?e[i].push(o):e[i]=[e[i],o])})),e}},function(t,e,r){"use strict";var n=r(53),a=r(59),i=r(60),o=r(61),s=r(97),l=n.call(Function.call,o());a(l,{getPolyfill:o,implementation:i,shim:s}),t.exports=l},function(t,e,r){"use strict";var n="Function.prototype.bind called on incompatible ",a=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError(n+e);for(var r,o=a.call(arguments,1),s=function(){if(this instanceof r){var n=e.apply(this,o.concat(a.call(arguments)));return Object(n)===n?n:this}return e.apply(t,o.concat(a.call(arguments)))},l=Math.max(0,e.length-o.length),c=[],u=0;u0&&!n.call(t,0))for(var g=0;g0)for(var v=0;v=0&&"[object Function]"===n.call(t.callee)),r}},function(t,e,r){"use strict";var n=r(89),a=n("%Object%"),i=n("%TypeError%"),o=n("%String%"),s=r(90),l=r(91),c=r(92),u=r(93),f=r(54),p=r(94),h=r(96),d={ToPrimitive:p,ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var e=this.ToNumber(t);return s(e)?0:0!==e&&l(e)?c(e)*Math.floor(Math.abs(e)):e},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var e=this.ToNumber(t);if(s(e)||0===e||!l(e))return 0;var r=c(e)*Math.floor(Math.abs(e));return u(r,65536)},ToString:function(t){return o(t)},ToObject:function(t){return this.CheckObjectCoercible(t),a(t)},CheckObjectCoercible:function(t,e){if(null==t)throw new i(e||"Cannot call method on "+t);return t},IsCallable:f,SameValue:function(t,e){return t===e?0!==t||1/t==1/e:s(t)&&s(e)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(h(t,r)&&!e[r])return!1;var n=h(t,"[[Value]]"),a=h(t,"[[Get]]")||h(t,"[[Set]]");if(n&&a)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");return!(!h(t,"[[Get]]")&&!h(t,"[[Set]]"))},IsDataDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");return!(!h(t,"[[Value]]")&&!h(t,"[[Writable]]"))},IsGenericDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");return!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t)},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");if(this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new i("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new i("ToPropertyDescriptor requires an object");var e={};if(h(t,"enumerable")&&(e["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),h(t,"configurable")&&(e["[[Configurable]]"]=this.ToBoolean(t.configurable)),h(t,"value")&&(e["[[Value]]"]=t.value),h(t,"writable")&&(e["[[Writable]]"]=this.ToBoolean(t.writable)),h(t,"get")){var r=t.get;if(void 0!==r&&!this.IsCallable(r))throw new TypeError("getter must be a function");e["[[Get]]"]=r}if(h(t,"set")){var n=t.set;if(void 0!==n&&!this.IsCallable(n))throw new i("setter must be a function");e["[[Set]]"]=n}if((h(e,"[[Get]]")||h(e,"[[Set]]"))&&(h(e,"[[Value]]")||h(e,"[[Writable]]")))throw new i("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}};t.exports=d},function(t,e,r){"use strict";var n=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=Object.getPrototypeOf||function(t){return t.__proto__},o=void 0,s="undefined"==typeof Uint8Array?void 0:i(Uint8Array),l={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":a?i([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":o&&a&&Symbol.asyncIterator?o[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":a?i(i([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&a?i((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&a?i((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":a?i(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":a?Symbol:void 0,"$ %SymbolPrototype%":a?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":n,"$ %TypedArray%":s,"$ %TypedArrayPrototype%":s?s.prototype:void 0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype};t.exports=function(t,e){if(arguments.length>1&&"boolean"!=typeof e)throw new TypeError('"allowMissing" argument must be a boolean');var r="$ "+t;if(!(r in l))throw new SyntaxError("intrinsic "+t+" does not exist!");if(void 0===l[r]&&!e)throw new TypeError("intrinsic "+t+" exists, but is not available. Please file an issue!");return l[r]}},function(t,e){t.exports=Number.isNaN||function(t){return t!=t}},function(t,e){var r=Number.isNaN||function(t){return t!=t};t.exports=Number.isFinite||function(t){return"number"==typeof t&&!r(t)&&t!==1/0&&t!==-1/0}},function(t,e){t.exports=function(t){return t>=0?1:-1}},function(t,e){t.exports=function(t,e){var r=t%e;return Math.floor(r>=0?r:r+e)}},function(t,e,r){"use strict";var n=Object.prototype.toString,a=r(95),i=r(54),o=function(t){var e;if((e=arguments.length>1?arguments[1]:"[object Date]"===n.call(t)?String:Number)===String||e===Number){var r,o,s=e===String?["toString","valueOf"]:["valueOf","toString"];for(o=0;o1?o(t,arguments[1]):o(t)}},function(t,e){t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},function(t,e,r){"use strict";var n=r(53);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,r){"use strict";var n=r(59),a=r(61);t.exports=function(){var t=a();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},function(t,e,r){"use strict";var n=r(54),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(t,e,r){for(var n=0,a=t.length;n=3&&(i=r),"[object Array]"===a.call(t)?o(t,e,i):"string"==typeof t?s(t,e,i):l(t,e,i)}},function(t,e){t.exports=function(){for(var t={},e=0;e"===i[0]||";"===i[0]){var o=i.slice(1).trim(),l=r(o.trim());o=l.name;var c=l.id||e.length,u=new n.default.model("",l.name,c);u.ids=l.ids||{},u.details=l.details||{},e.push(u)}else u.seq+=i}return e},write:function(t,e){for(var r="",a=0;a"+i.name+"\n",r+=n.default.splitNChars(i.seq,80).join("\n"),r+="\n"}return r}},i.default.mixin(s)},function(t,e,r){"use strict";function n(t,e,r){for(var n=[],a=ti;a?o++:o--)n.push(o);return n}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){t=t||{};for(var e=n(0,arguments.length,!1),r=0;r=0)break;var s=o.split(/\t/),l=s[0].trim();if("GFF"===l)break;if(2===s.length)if("startgroup"===l)e=s[1].trim();else{if("endgroup"===l){e="";continue}r[s[0]]=a.parseColor(s[1])}else if(s.length>=5){var c=a.parseLine(s);e&&(c.attributes.Parent=e),i.push(c)}}return{offset:n,colors:r,features:i}},a.parseColor=function(t){return t.indexOf(",")>=0?(0,n.rgbToHex)(t.split(",").map((function(t){return parseInt(t)}))):6===t.length&&parseInt(t.charAt(0),16)<=16&&"bisque"!==t?"#"+t:t},a.parseLine=function(t){var e={attributes:{}};return e.attributes.Name=t[0].trim(),e.seqname=t[1].trim(),e.start=parseInt(t[3]),e.end=parseInt(t[4]),e.feature=t[5].trim(),"ID_NOT_SPECIFIED"===e.seqname&&(e.seqname=t[2].trim()),e}},function(t,e,r){"use strict";var n,a=r(50),i=(n=a)&&n.__esModule?n:{default:n};var o=function t(e){return this.constructor!=t?new t(e):(this.matrix={},this.parsingOrder=[],null!=e&&this.parse(e),this)};i.default.mixin(o),t.exports=o,o.prototype.parse=function(t){return t.split("\n").forEach(function(t){this.parseLine(t)}.bind(this)),this.buildMatrix(),this.matrix},o.read=function(t,e){return(new o).read(t,e)},o.parse=function(t){return(new o).parse(t)},o.prototype.parseLine=function(t){var e=t.charAt(0);if("#"!==e){this.parsingOrder.push(e);for(var r=t.substring(1).split(/\s+/).filter((function(t){return t.length>0})).map((function(t){return parseInt(t)})),n={},a=0;a=0;t--){var e=this.parsingOrder[t],r=this.matrix[e];for(var n in r)this.matrix[n][e]=r[n]}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseNhx=e.parse=void 0;var n=i(r(106)),a=i(r(107));function i(t){return t&&t.__esModule?t:{default:t}}var o={};o.parse=n.default,o.parseNhx=a.default,e.default=o,e.parse=n.default,e.parseNhx=a.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=[],r={},n=t.split(/\s*(;|\(|\)|,|:)\s*/),a=0;a1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n.default.isString(t)?(e=x[t]||g.default,b.includes(t)?(r="#ffffff",a=1):(r="#444444",a=.75)):(e=t,r="#ffffff",a=1),i&&(r=i),o&&(a=o);var s=_(e),l=s.colormap,c=s.colorscale;return{colormap:l,colorscale:c,textcolor:r,opacity:a}}},function(t,e,r){"use strict";t.exports={A:"#00a35c",R:"#00fc03",N:"#00eb14",D:"#00eb14",C:"#0000ff",Q:"#00f10e",E:"#00f10e",G:"#009d62",H:"#00d52a",I:"#0054ab",L:"#007b84",K:"#00ff00",M:"#009768",F:"#008778",P:"#00e01f",S:"#00d52a",T:"#00db24",W:"#00a857",Y:"#00e619",V:"#005fa0",B:"#00eb14",X:"#00b649",Z:"#00f10e"}},function(t,e,r){"use strict";t.exports={A:"#BBBBBB",B:"grey",C:"yellow",D:"red",E:"red",F:"magenta",G:"brown",H:"#00FFFF",I:"#BBBBBB",J:"#fff",K:"#00FFFF",L:"#BBBBBB",M:"#BBBBBB",N:"green",O:"#fff",P:"brown",Q:"green",R:"#00FFFF",S:"green",T:"green",U:"#fff",V:"#BBBBBB",W:"magenta",X:"grey",Y:"magenta",Z:"grey","-":"grey"}},function(t,e,r){"use strict";t.exports={A:"orange",B:"#fff",C:"green",D:"red",E:"red",F:"blue",G:"orange",H:"red",I:"green",J:"#fff",K:"red",L:"green",M:"green",N:"#fff",O:"#fff",P:"orange",Q:"#fff",R:"red",S:"orange",T:"orange",U:"#fff",V:"green",W:"blue",X:"#fff",Y:"blue",Z:"#fff"}},function(t,e,r){"use strict";t.exports={A:"#80a0f0",R:"#f01505",N:"#00ff00",D:"#c048c0",C:"#f08080",Q:"#00ff00",E:"#c048c0",G:"#f09048",H:"#15a4a4",I:"#80a0f0",L:"#80a0f0",K:"#f01505",M:"#80a0f0",F:"#80a0f0",P:"#ffff00",S:"#00ff00",T:"#00ff00",W:"#80a0f0",Y:"#15a4a4",V:"#80a0f0",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e,r){"use strict";t.exports={A:"#e718e7",R:"#6f906f",N:"#1be41b",D:"#778877",C:"#23dc23",Q:"#926d92",E:"#ff00ff",G:"#00ff00",H:"#758a75",I:"#8a758a",L:"#ae51ae",K:"#a05fa0",M:"#ef10ef",F:"#986798",P:"#00ff00",S:"#36c936",T:"#47b847",W:"#8a758a",Y:"#21de21",V:"#857a85",B:"#49b649",X:"#758a75",Z:"#c936c9"}},function(t,e,r){"use strict";t.exports={A:"#ad0052",B:"#0c00f3",C:"#c2003d",D:"#0c00f3",E:"#0c00f3",F:"#cb0034",G:"#6a0095",H:"#1500ea",I:"#ff0000",J:"#fff",K:"#0000ff",L:"#ea0015",M:"#b0004f",N:"#0c00f3",O:"#fff",P:"#4600b9",Q:"#0c00f3",R:"#0000ff",S:"#5e00a1",T:"#61009e",U:"#fff",V:"#f60009",W:"#5b00a4",X:"#680097",Y:"#4f00b0",Z:"#0c00f3"}},function(t,e,r){"use strict";t.exports={A:" orange",B:" #fff",C:" green",D:" red",E:" red",F:" green",G:" orange",H:" magenta",I:" green",J:" #fff",K:" red",L:" green",M:" green",N:" magenta",O:" #fff",P:" green",Q:" magenta",R:" red",S:" orange",T:" orange",U:" #fff",V:" green",W:" green",X:" #fff",Y:" green",Z:" #fff"}},function(t,e,r){"use strict";t.exports={A:" #77dd88",B:" #fff",C:" #99ee66",D:" #55bb33",E:" #55bb33",F:" #9999ff",G:" #77dd88",H:" #5555ff",I:" #66bbff",J:" #fff",K:" #ffcc77",L:" #66bbff",M:" #66bbff",N:" #55bb33",O:" #fff",P:" #eeaaaa",Q:" #55bb33",R:" #ffcc77",S:" #ff4455",T:" #ff4455",U:" #fff",V:" #66bbff",W:" #9999ff",X:" #fff",Y:" #9999ff",Z:" #fff"}},function(t,e,r){"use strict";t.exports={A:" #64F73F",C:" #FFB340",G:" #EB413C",T:" #3C88EE",U:" #3C88EE"}},function(t,e,r){"use strict";t.exports={A:" #FF83FA",C:" #40E0D0",G:" #FF83FA",R:" #FF83FA",T:" #40E0D0",U:" #40E0D0",Y:" #40E0D0"}},function(t,e,r){"use strict";t.exports={A:"#5858a7",R:"#6b6b94",N:"#64649b",D:"#2121de",C:"#9d9d62",Q:"#8c8c73",E:"#0000ff",G:"#4949b6",H:"#60609f",I:"#ecec13",L:"#b2b24d",K:"#4747b8",M:"#82827d",F:"#c2c23d",P:"#2323dc",S:"#4949b6",T:"#9d9d62",W:"#c0c03f",Y:"#d3d32c",V:"#ffff00",B:"#4343bc",X:"#797986",Z:"#4747b8"}},function(t,e,r){"use strict";t.exports={A:"#ccff00",R:"#0000ff",N:"#cc00ff",D:"#ff0000",C:"#ffff00",Q:"#ff00cc",E:"#ff0066",G:"#ff9900",H:"#0066ff",I:"#66ff00",L:"#33ff00",K:"#6600ff",M:"#00ff00",F:"#00ff66",P:"#ffcc00",S:"#ff3300",T:"#ff6600",W:"#00ccff",Y:"#00ffcc",V:"#99ff00",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e,r){"use strict";t.exports={A:"#2cd3d3",R:"#708f8f",N:"#ff0000",D:"#e81717",C:"#a85757",Q:"#3fc0c0",E:"#778888",G:"#ff0000",H:"#708f8f",I:"#00ffff",L:"#1ce3e3",K:"#7e8181",M:"#1ee1e1",F:"#1ee1e1",P:"#f60909",S:"#e11e1e",T:"#738c8c",W:"#738c8c",Y:"#9d6262",V:"#07f8f8",B:"#f30c0c",X:"#7c8383",Z:"#5ba4a4"}},function(t,e,r){"use strict";t.exports={A:"#ffafaf",R:"#6464ff",N:"#00ff00",D:"#ff0000",C:"#ffff00",Q:"#00ff00",E:"#ff0000",G:"#ff00ff",H:"#6464ff",I:"#ffafaf",L:"#ffafaf",K:"#6464ff",M:"#ffafaf",F:"#ffc800",P:"#ff00ff",S:"#00ff00",T:"#00ff00",W:"#ffc800",Y:"#ffc800",V:"#ffafaf",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownSelect=e.Caption=void 0;var n,a=o(r(1)),i=((n=r(0))&&n.__esModule,o(r(177)));function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}function s(){return(s=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var c=function(t){return a.default.createElement("div",{style:{marginTop:-8,marginBottom:-8}},a.default.createElement("p",{style:{fontSize:12,fontColor:"#444444"}},t.children))};e.Caption=c;e.DropdownSelect=function(t){var e=t.caption,r=t.isCreatable,n=t.outerStyle,o=l(t,["caption","isCreatable","outerStyle"]);return a.default.createElement("div",{style:n},e&&a.default.createElement(c,null,e),!e&&a.default.createElement(c,null," "),r&&a.default.createElement(i.Creatable,s({allowCreate:!0},o)),!r&&a.default.createElement(i.default,o))}},function(t,e,r){"use strict";(function(t){r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(176),a=void 0!==t?t:{},i=Object(n.a)(a),o=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),s=(i.keyframes,i.css);i.sheet,i.caches}).call(this,r(48))},function(t,e,r){t.exports=function(){"use strict";return function(t){function e(e){if(e)try{t(e+"}")}catch(t){}}return function(r,n,a,i,o,s,l,c,u,f){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return t(n+";"),"";break;case 2:if(0===c)return n+"/*|*/";break;case 3:switch(c){case 102:case 112:return t(a[0]+n),"";default:return n+(0===f?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(e)}}}}()},function(t,e,r){(function(e){for(var n=r(127),a="undefined"==typeof window?e:window,i=["moz","webkit"],o="AnimationFrame",s=a["request"+o],l=a["cancel"+o]||a["cancelRequest"+o],c=0;!s&&c=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(this.props,[]);return function(t){u.forEach((function(e){return delete t[e]}))}(a),a.className=this.props.inputClassName,a.id=this.state.inputId,a.style=r,o.default.createElement("div",{className:this.props.className,style:e},this.renderStyles(),o.default.createElement("input",n({},a,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:c},t),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),e}(i.Component);d.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},d.defaultProps={minWidth:1,injectStyles:!0},e.default=d},function(t,e,r){"use strict";var n=s(r(130)),a=s(r(135)),i=s(r(68)),o=s(r(65));function s(t){return t&&t.__esModule?t:{default:t}}t.exports={Transition:o.default,TransitionGroup:i.default,ReplaceTransition:a.default,CSSTransition:n.default}},function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;!function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}e.default=t}(r(0));var n=s(r(131)),a=s(r(134)),i=s(r(1)),o=s(r(65));r(67);function s(t){return t&&t.__esModule?t:{default:t}}function l(){return(l=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,["children","in"]),o=n.default.Children.toArray(e),s=o[0],l=o[1];return delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,n.default.createElement(i.default,a,r?n.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):n.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},o}(n.default.Component);s.propTypes={};var l=s;e.default=l,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0,e.getChildMapping=a,e.mergeChildMappings=i,e.getInitialChildMapping=function(t,e){return a(t.children,(function(r){return(0,n.cloneElement)(r,{onExited:e.bind(null,r),in:!0,appear:o(r,"appear",t),enter:o(r,"enter",t),exit:o(r,"exit",t)})}))},e.getNextChildMapping=function(t,e,r){var s=a(t.children),l=i(e,s);return Object.keys(l).forEach((function(a){var i=l[a];if((0,n.isValidElement)(i)){var c=a in e,u=a in s,f=e[a],p=(0,n.isValidElement)(f)&&!f.props.in;!u||c&&!p?u||!c||p?u&&c&&(0,n.isValidElement)(f)&&(l[a]=(0,n.cloneElement)(i,{onExited:r.bind(null,i),in:f.props.in,exit:o(i,"exit",t),enter:o(i,"enter",t)})):l[a]=(0,n.cloneElement)(i,{in:!1}):l[a]=(0,n.cloneElement)(i,{onExited:r.bind(null,i),in:!0,exit:o(i,"exit",t),enter:o(i,"enter",t)})}})),l};var n=r(1);function a(t,e){var r=Object.create(null);return t&&n.Children.map(t,(function(t){return t})).forEach((function(t){r[t.key]=function(t){return e&&(0,n.isValidElement)(t)?e(t):t}(t)})),r}function i(t,e){function r(r){return r in e?e[r]:t[r]}t=t||{},e=e||{};var n,a=Object.create(null),i=[];for(var o in t)o in e?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var l in e){if(a[l])for(n=0;n=4;)e=1540483477*(65535&(e=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(e>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(e=1540483477*(65535&(e^=e>>>24))+((1540483477*(e>>>16)&65535)<<16)),r-=4,++a;switch(r){case 3:n^=(255&t.charCodeAt(a+2))<<16;case 2:n^=(255&t.charCodeAt(a+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(a)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),((n^=n>>>15)>>>0).toString(36)};var o=function(t){function e(t,e,n){var a=e.trim().split(d);e=a;var i=a.length,o=t.length;switch(o){case 0:case 1:var s=0;for(t=0===o?"":t[0]+" ";sn&&(n=(e=e.trim()).charCodeAt(0)),n){case 38:return e.replace(g,"$1"+t.trim());case 58:return t.trim()+e.replace(g,"$1"+t.trim());default:if(0<1*r&&0l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0h)&&(N=(U=U.replace(" ",":")).length),01?a-1:0),o=1;o=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function E(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function S(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?E(t):e}function C(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e-1}function z(t){return D(t)?window.pageYOffset:t.scrollTop}function R(t,e){D(t)?window.scrollTo(0,e):t.scrollTop=e}function F(t,e,r,n){return r*((t=t/n-1)*t*t+1)+e}function B(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:L,a=z(t),i=e-a,o=10,s=0;function l(){var e=F(s+=o,a,i,r);R(t,e),s=h)return{placement:"bottom",maxHeight:e};if(k>=h&&!o)return i&&B(l,T,160),{placement:"bottom",maxHeight:e};if(!o&&k>=n||o&&_>=n)return i&&B(l,T,160),{placement:"bottom",maxHeight:o?_-y:k-y};if("auto"===a||o){var M=e,E=o?b:w;return E>=n&&(M=Math.min(E-y-s.controlHeight,e)),{placement:"top",maxHeight:M}}if("bottom"===a)return R(l,T),{placement:"bottom",maxHeight:e};break;case"top":if(b>=h)return{placement:"top",maxHeight:e};if(w>=h&&!o)return i&&B(l,A,160),{placement:"top",maxHeight:e};if(!o&&w>=n||o&&b>=n){var S=e;return(!o&&w>=n||o&&b>=n)&&(S=o?b-x:w-x),i&&B(l,A,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return c}var V=function(t){return"auto"===t?"bottom":t},U=function(t){function e(){var t,r;m(this,e);for(var n=arguments.length,a=new Array(n),i=0;i-1}},at=function(t){return a.a.createElement("span",_({className:Object(s.a)({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},t))},it=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=(t.in,t.out,t.onExited,t.appear,t.enter,t.exit,t.innerRef),r=(t.emotion,M(t,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return a.a.createElement("input",_({ref:e},r,{className:Object(s.a)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),e}(n.Component),ot=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(l.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),e}(n.Component),st=["boxSizing","height","overflow","paddingRight","position"],lt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ct(t){t.preventDefault()}function ut(t){t.stopPropagation()}function ft(){var t=this.scrollTop,e=this.scrollHeight,r=t+this.offsetHeight;0===t?this.scrollTop=1:r===e&&(this.scrollTop=t-1)}function pt(){return"ontouchstart"in window||navigator.maxTouchPoints}var ht=!("undefined"==typeof window||!window.document||!window.document.createElement),dt=0,gt=function(t){function e(){var t,r;m(this,e);for(var n=arguments.length,a=new Array(n),i=0;i0,d=u-f-c,g=!1;d>e&&r.isBottom&&(i&&i(t),r.isBottom=!1),h&&r.isTop&&(s&&s(t),r.isTop=!1),h&&e>d?(a&&!r.isBottom&&a(t),p.scrollTop=u,g=!0,r.isBottom=!0):!h&&-e>c&&(o&&!r.isTop&&o(t),p.scrollTop=0,g=!0,r.isTop=!0),g&&r.cancelScroll(t)})),b(E(E(r)),"onWheel",(function(t){r.handleEventDelta(t,t.deltaY)})),b(E(E(r)),"onTouchStart",(function(t){r.touchStart=t.changedTouches[0].clientY})),b(E(E(r)),"onTouchMove",(function(t){var e=r.touchStart-t.changedTouches[0].clientY;r.handleEventDelta(t,e)})),b(E(E(r)),"getScrollTarget",(function(t){r.scrollTarget=t})),r}return k(e,t),x(e,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(t){t&&(t.scrollHeight<=t.clientHeight||("function"==typeof t.addEventListener&&t.addEventListener("wheel",this.onWheel,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(t){t.scrollHeight<=t.clientHeight||("function"==typeof t.removeEventListener&&t.removeEventListener("wheel",this.onWheel,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return a.a.createElement(ot,{innerRef:this.getScrollTarget},this.props.children)}}]),e}(n.Component),yt=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.isEnabled,r=M(t,["isEnabled"]);return e?a.a.createElement(mt,r):this.props.children}}]),e}(n.Component);b(yt,"defaultProps",{isEnabled:!0});var xt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.isSearchable,n=e.isMulti,a=e.label,i=e.isDisabled;switch(t){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(a||"Select"," is focused ").concat(r?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},bt=function(t,e){var r=e.value,n=e.isDisabled;if(r)switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,n?" is disabled. Select another option.":", selected.")}},_t=function(t){return!!t.isDisabled},wt=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.children,r=t.className,n=t.cx,i=t.isMulti,o=t.getStyles,l=t.hasValue;return a.a.createElement("div",{className:n(Object(s.a)(o("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":l},r)},e)}}]),e}(n.Component),kt=function(t){var e=t.size,r=M(t,["size"]);return a.a.createElement("svg",_({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(s.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},r))},Tt=function(t){return a.a.createElement(kt,_({size:20},t),a.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},At=function(t){return a.a.createElement(kt,_({size:20},t),a.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Mt=function(t){var e=t.isFocused,r=t.theme,n=r.spacing.baseUnit,a=r.colors;return{label:"indicatorContainer",color:e?a.neutral60:a.neutral20,display:"flex",padding:2*n,transition:"color 150ms",":hover":{color:e?a.neutral80:a.neutral40}}},Et=Mt,St=Mt,Ct=!1,Lt=function(t){var e=t.color,r=t.delay,n=t.offset;return a.a.createElement("span",{className:Object(s.a)({animationDuration:"1s",animationDelay:"".concat(r,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:e,borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},Ot=function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerProps,o=t.isFocused,l=t.isRtl,c=t.theme.colors,u=o?c.neutral80:c.neutral20;return Ct||(Object(s.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),Ct=!0),a.a.createElement("div",_({},i,{className:r(Object(s.a)(n("loadingIndicator",t)),{indicator:!0,"loading-indicator":!0},e)}),a.a.createElement(Lt,{color:u,delay:0,offset:l}),a.a.createElement(Lt,{color:u,delay:160,offset:!0}),a.a.createElement(Lt,{color:u,delay:320,offset:!l}))};Ot.defaultProps={size:4};var Pt=function(t){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:t?0:1,outline:0,padding:0,color:"inherit"}},It=function(t){var e=t.children,r=t.innerProps;return a.a.createElement("div",r,e)},Dt=It,zt=It,Rt=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.children,r=t.innerProps;return a.a.createElement("div",r,e||a.a.createElement(Tt,{size:14}))}}]),e}(n.Component),Ft=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.children,r=t.className,n=t.components,i=t.cx,o=t.data,l=t.getStyles,c=t.innerProps,u=t.isDisabled,f=t.removeProps,p=t.selectProps,h=n.Container,d=n.Label,g=n.Remove,v=w({className:i(Object(s.a)(l("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":u},r)},c),m={className:i(Object(s.a)(l("multiValueLabel",this.props)),{"multi-value__label":!0},r)},y=w({className:i(Object(s.a)(l("multiValueRemove",this.props)),{"multi-value__remove":!0},r)},f);return a.a.createElement(h,{data:o,innerProps:v,selectProps:p},a.a.createElement(d,{data:o,innerProps:m,selectProps:p},e),a.a.createElement(g,{data:o,innerProps:y,selectProps:p}))}}]),e}(n.Component);b(Ft,"defaultProps",{cropWithEllipsis:!0});var Bt={ClearIndicator:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps;return a.a.createElement("div",_({},o,{className:n(Object(s.a)(i("clearIndicator",t)),{indicator:!0,"clear-indicator":!0},r)}),e||a.a.createElement(Tt,null))},Control:function(t){var e=t.children,r=t.cx,n=t.getStyles,i=t.className,o=t.isDisabled,l=t.isFocused,c=t.innerRef,u=t.innerProps,f=t.menuIsOpen;return a.a.createElement("div",_({ref:c,className:r(Object(s.a)(n("control",t)),{control:!0,"control--is-disabled":o,"control--is-focused":l,"control--menu-is-open":f},i)},u),e)},DropdownIndicator:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps;return a.a.createElement("div",_({},o,{className:n(Object(s.a)(i("dropdownIndicator",t)),{indicator:!0,"dropdown-indicator":!0},r)}),e||a.a.createElement(At,null))},DownChevron:At,CrossIcon:Tt,Group:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.Heading,l=t.headingProps,c=t.label,u=t.theme,f=t.selectProps;return a.a.createElement("div",{className:n(Object(s.a)(i("group",t)),{group:!0},r)},a.a.createElement(o,_({},l,{selectProps:f,theme:u,getStyles:i,cx:n}),c),a.a.createElement("div",null,e))},GroupHeading:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.theme,o=(t.selectProps,M(t,["className","cx","getStyles","theme","selectProps"]));return a.a.createElement("div",_({className:r(Object(s.a)(n("groupHeading",w({theme:i},o))),{"group-heading":!0},e)},o))},IndicatorsContainer:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles;return a.a.createElement("div",{className:n(Object(s.a)(i("indicatorsContainer",t)),{indicators:!0},r)},e)},IndicatorSeparator:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerProps;return a.a.createElement("span",_({},i,{className:r(Object(s.a)(n("indicatorSeparator",t)),{"indicator-separator":!0},e)}))},Input:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerRef,o=t.isHidden,l=t.isDisabled,c=t.theme,u=(t.selectProps,M(t,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return a.a.createElement("div",{className:Object(s.a)(n("input",w({theme:c},u)))},a.a.createElement(d.a,_({className:r(null,{input:!0},e),inputRef:i,inputStyle:Pt(o),disabled:l},u)))},LoadingIndicator:Ot,Menu:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerRef,l=t.innerProps,c=n(Object(s.a)(i("menu",t)),{menu:!0},r);return a.a.createElement("div",_({className:c},l,{ref:o}),e)},MenuList:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.isMulti,l=t.innerRef;return a.a.createElement("div",{className:n(Object(s.a)(i("menuList",t)),{"menu-list":!0,"menu-list--is-multi":o},r),ref:l},e)},MenuPortal:X,LoadingMessage:Y,NoOptionsMessage:W,MultiValue:Ft,MultiValueContainer:Dt,MultiValueLabel:zt,MultiValueRemove:Rt,Option:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.isDisabled,l=t.isFocused,c=t.isSelected,u=t.innerRef,f=t.innerProps;return a.a.createElement("div",_({ref:u,className:n(Object(s.a)(i("option",t)),{option:!0,"option--is-disabled":o,"option--is-focused":l,"option--is-selected":c},r)},f),e)},Placeholder:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps;return a.a.createElement("div",_({className:n(Object(s.a)(i("placeholder",t)),{placeholder:!0},r)},o),e)},SelectContainer:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps,l=t.isDisabled,c=t.isRtl;return a.a.createElement("div",_({className:n(Object(s.a)(i("container",t)),{"--is-disabled":l,"--is-rtl":c},r)},o),e)},SingleValue:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.isDisabled,l=t.innerProps;return a.a.createElement("div",_({className:n(Object(s.a)(i("singleValue",t)),{"single-value":!0,"single-value--is-disabled":o},r)},l),e)},ValueContainer:wt},Nt=function(t){return w({},Bt,t.components)},jt={clearIndicator:St,container:function(t){var e=t.isDisabled;return{label:"container",direction:t.isRtl?"rtl":null,pointerEvents:e?"none":null,position:"relative"}},control:function(t){var e=t.isDisabled,r=t.isFocused,n=t.theme,a=n.colors,i=n.borderRadius,o=n.spacing;return{label:"control",alignItems:"center",backgroundColor:e?a.neutral5:a.neutral0,borderColor:e?a.neutral10:r?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:r?a.primary:a.neutral30}}},dropdownIndicator:Et,group:function(t){var e=t.theme.spacing;return{paddingBottom:2*e.baseUnit,paddingTop:2*e.baseUnit}},groupHeading:function(t){var e=t.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*e.baseUnit,paddingRight:3*e.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing.baseUnit,a=r.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:e?a.neutral10:a.neutral20,marginBottom:2*n,marginTop:2*n,width:1}},input:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing,a=r.colors;return{margin:n.baseUnit/2,paddingBottom:n.baseUnit/2,paddingTop:n.baseUnit/2,visibility:e?"hidden":"visible",color:a.neutral80}},loadingIndicator:function(t){var e=t.isFocused,r=t.size,n=t.theme,a=n.colors,i=n.spacing.baseUnit;return{label:"loadingIndicator",color:e?a.neutral60:a.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"}},loadingMessage:G,menu:function(t){var e,r=t.placement,n=t.theme,a=n.borderRadius,i=n.spacing,o=n.colors;return b(e={label:"menu"},function(t){return t?{bottom:"top",top:"bottom"}[t]:"bottom"}(r),"100%"),b(e,"backgroundColor",o.neutral0),b(e,"borderRadius",a),b(e,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),b(e,"marginBottom",i.menuGutter),b(e,"marginTop",i.menuGutter),b(e,"position","absolute"),b(e,"width","100%"),b(e,"zIndex",1),e},menuList:function(t){var e=t.maxHeight,r=t.theme.spacing.baseUnit;return{maxHeight:e,overflowY:"auto",paddingBottom:r,paddingTop:r,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(t){var e=t.rect,r=t.offset,n=t.position;return{left:e.left,position:n,top:r,width:e.width,zIndex:1}},multiValue:function(t){var e=t.theme,r=e.spacing,n=e.borderRadius;return{label:"multiValue",backgroundColor:e.colors.neutral10,borderRadius:n/2,display:"flex",margin:r.baseUnit/2,minWidth:0}},multiValueLabel:function(t){var e=t.theme,r=e.borderRadius,n=e.colors,a=t.cropWithEllipsis;return{borderRadius:r/2,color:n.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:a?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(t){var e=t.theme,r=e.spacing,n=e.borderRadius,a=e.colors;return{alignItems:"center",borderRadius:n/2,backgroundColor:t.isFocused&&a.dangerLight,display:"flex",paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}}},noOptionsMessage:H,option:function(t){var e=t.isDisabled,r=t.isFocused,n=t.isSelected,a=t.theme,i=a.spacing,o=a.colors;return{label:"option",backgroundColor:n?o.primary:r?o.primary25:"transparent",color:e?o.neutral20:n?o.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:n?o.primary:o.primary50}}},placeholder:function(t){var e=t.theme,r=e.spacing;return{label:"placeholder",color:e.colors.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing,a=r.colors;return{label:"singleValue",color:e?a.neutral40:a.neutral80,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,maxWidth:"calc(100% - ".concat(2*n.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(t){var e=t.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(e.baseUnit/2,"px ").concat(2*e.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};function Vt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=w({},t);return Object.keys(e).forEach((function(n){t[n]?r[n]=function(r,a){return e[n](t[n](r,a),a)}:r[n]=e[n]})),r}var Ut={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},qt={backspaceRemovesValue:!0,blurInputOnSelect:N(),captureMenuScroll:!N(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:nt(),formatGroupLabel:function(t){return t.label},getOptionLabel:function(t){return t.label},getOptionValue:function(t){return t.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:_t,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(1!==e?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Ht=1,Gt=function(t){function e(t){var r;m(this,e),b(E(E(r=S(this,T(e).call(this,t)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),b(E(E(r)),"blockOptionHover",!1),b(E(E(r)),"clearFocusValueOnUpdate",!1),b(E(E(r)),"commonProps",void 0),b(E(E(r)),"components",void 0),b(E(E(r)),"hasGroups",!1),b(E(E(r)),"initialTouchX",0),b(E(E(r)),"initialTouchY",0),b(E(E(r)),"inputIsHiddenAfterUpdate",void 0),b(E(E(r)),"instancePrefix",""),b(E(E(r)),"openAfterFocus",!1),b(E(E(r)),"scrollToFocusedOptionOnUpdate",!1),b(E(E(r)),"userIsDragging",void 0),b(E(E(r)),"controlRef",null),b(E(E(r)),"getControlRef",(function(t){r.controlRef=t})),b(E(E(r)),"focusedOptionRef",null),b(E(E(r)),"getFocusedOptionRef",(function(t){r.focusedOptionRef=t})),b(E(E(r)),"menuListRef",null),b(E(E(r)),"getMenuListRef",(function(t){r.menuListRef=t})),b(E(E(r)),"inputRef",null),b(E(E(r)),"getInputRef",(function(t){r.inputRef=t})),b(E(E(r)),"cacheComponents",(function(t){r.components=Nt({components:t})})),b(E(E(r)),"focus",r.focusInput),b(E(E(r)),"blur",r.blurInput),b(E(E(r)),"onChange",(function(t,e){var n=r.props;(0,n.onChange)(t,w({},e,{name:n.name}))})),b(E(E(r)),"setValue",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,a=r.props,i=a.closeMenuOnSelect,o=a.isMulti;r.onInputChange("",{action:"set-value"}),i&&(r.inputIsHiddenAfterUpdate=!o,r.onMenuClose()),r.clearFocusValueOnUpdate=!0,r.onChange(t,{action:e,option:n})})),b(E(E(r)),"selectOption",(function(t){var e=r.props,n=e.blurInputOnSelect,a=e.isMulti,i=r.state.selectValue;if(a)if(r.isOptionSelected(t,i)){var o=r.getOptionValue(t);r.setValue(i.filter((function(t){return r.getOptionValue(t)!==o})),"deselect-option",t),r.announceAriaLiveSelection({event:"deselect-option",context:{value:r.getOptionLabel(t)}})}else r.isOptionDisabled(t,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t),isDisabled:!0}}):(r.setValue([].concat(C(i),[t]),"select-option",t),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t)}}));else r.isOptionDisabled(t,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t),isDisabled:!0}}):(r.setValue(t,"select-option"),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t)}}));n&&r.blurInput()})),b(E(E(r)),"removeValue",(function(t){var e=r.state.selectValue,n=r.getOptionValue(t);r.onChange(e.filter((function(t){return r.getOptionValue(t)!==n})),{action:"remove-value",removedValue:t}),r.announceAriaLiveSelection({event:"remove-value",context:{value:t?r.getOptionLabel(t):""}}),r.focusInput()})),b(E(E(r)),"clearValue",(function(){var t=r.props.isMulti;r.onChange(t?[]:null,{action:"clear"})})),b(E(E(r)),"popValue",(function(){var t=r.state.selectValue,e=t[t.length-1];r.announceAriaLiveSelection({event:"pop-value",context:{value:e?r.getOptionLabel(e):""}}),r.onChange(t.slice(0,t.length-1),{action:"pop-value",removedValue:e})})),b(E(E(r)),"getOptionLabel",(function(t){return r.props.getOptionLabel(t)})),b(E(E(r)),"getOptionValue",(function(t){return r.props.getOptionValue(t)})),b(E(E(r)),"getStyles",(function(t,e){var n=jt[t](e);n.boxSizing="border-box";var a=r.props.styles[t];return a?a(n,e):n})),b(E(E(r)),"getElementId",(function(t){return"".concat(r.instancePrefix,"-").concat(t)})),b(E(E(r)),"getActiveDescendentId",(function(){var t=r.props.menuIsOpen,e=r.state,n=e.menuOptions,a=e.focusedOption;if(a&&t){var i=n.focusable.indexOf(a),o=n.render[i];return o&&o.key}})),b(E(E(r)),"announceAriaLiveSelection",(function(t){var e=t.event,n=t.context;r.setState({ariaLiveSelection:bt(e,n)})})),b(E(E(r)),"announceAriaLiveContext",(function(t){var e=t.event,n=t.context;r.setState({ariaLiveContext:xt(e,w({},n,{label:r.props["aria-label"]}))})})),b(E(E(r)),"onMenuMouseDown",(function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),r.focusInput())})),b(E(E(r)),"onMenuMouseMove",(function(t){r.blockOptionHover=!1})),b(E(E(r)),"onControlMouseDown",(function(t){var e=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==t.target.tagName&&r.onMenuClose():e&&r.openMenu("first"):(e&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()})),b(E(E(r)),"onDropdownIndicatorMouseDown",(function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||r.props.isDisabled)){var e=r.props,n=e.isMulti,a=e.menuIsOpen;r.focusInput(),a?(r.inputIsHiddenAfterUpdate=!n,r.onMenuClose()):r.openMenu("first"),t.preventDefault(),t.stopPropagation()}})),b(E(E(r)),"onClearIndicatorMouseDown",(function(t){t&&"mousedown"===t.type&&0!==t.button||(r.clearValue(),t.stopPropagation(),r.openAfterFocus=!1,setTimeout((function(){return r.focusInput()})))})),b(E(E(r)),"onScroll",(function(t){"boolean"==typeof r.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(t)&&r.props.onMenuClose()})),b(E(E(r)),"onCompositionStart",(function(){r.setState({isComposing:!0})})),b(E(E(r)),"onCompositionEnd",(function(){r.setState({isComposing:!1})})),b(E(E(r)),"onTouchStart",(function(t){var e=t.touches.item(0);e&&(r.initialTouchX=e.clientX,r.initialTouchY=e.clientY,r.userIsDragging=!1)})),b(E(E(r)),"onTouchMove",(function(t){var e=t.touches.item(0);if(e){var n=Math.abs(e.clientX-r.initialTouchX),a=Math.abs(e.clientY-r.initialTouchY);r.userIsDragging=n>5||a>5}})),b(E(E(r)),"onTouchEnd",(function(t){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(t.target)&&r.menuListRef&&!r.menuListRef.contains(t.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)})),b(E(E(r)),"onControlTouchEnd",(function(t){r.userIsDragging||r.onControlMouseDown(t)})),b(E(E(r)),"onClearIndicatorTouchEnd",(function(t){r.userIsDragging||r.onClearIndicatorMouseDown(t)})),b(E(E(r)),"onDropdownIndicatorTouchEnd",(function(t){r.userIsDragging||r.onDropdownIndicatorMouseDown(t)})),b(E(E(r)),"handleInputChange",(function(t){var e=t.currentTarget.value;r.inputIsHiddenAfterUpdate=!1,r.onInputChange(e,{action:"input-change"}),r.onMenuOpen()})),b(E(E(r)),"onInputFocus",(function(t){var e=r.props,n=e.isSearchable,a=e.isMulti;r.props.onFocus&&r.props.onFocus(t),r.inputIsHiddenAfterUpdate=!1,r.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:a}}),r.setState({isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1})),b(E(E(r)),"onInputBlur",(function(t){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(t),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))})),b(E(E(r)),"onOptionHover",(function(t){r.blockOptionHover||r.state.focusedOption===t||r.setState({focusedOption:t})})),b(E(E(r)),"shouldHideSelectedOptions",(function(){var t=r.props,e=t.hideSelectedOptions,n=t.isMulti;return void 0===e?n:e})),b(E(E(r)),"onKeyDown",(function(t){var e=r.props,n=e.isMulti,a=e.backspaceRemovesValue,i=e.escapeClearsValue,o=e.inputValue,s=e.isClearable,l=e.isDisabled,c=e.menuIsOpen,u=e.onKeyDown,f=e.tabSelectsValue,p=e.openMenuOnFocus,h=r.state,d=h.isComposing,g=h.focusedOption,v=h.focusedValue,m=h.selectValue;if(!(l||"function"==typeof u&&(u(t),t.defaultPrevented))){switch(r.blockOptionHover=!0,t.key){case"ArrowLeft":if(!n||o)return;r.focusValue("previous");break;case"ArrowRight":if(!n||o)return;r.focusValue("next");break;case"Delete":case"Backspace":if(o)return;if(v)r.removeValue(v);else{if(!a)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(d)return;if(t.shiftKey||!c||!f||!g||p&&r.isOptionSelected(g,m))return;r.selectOption(g);break;case"Enter":if(229===t.keyCode)break;if(c){if(!g)return;if(d)return;r.selectOption(g);break}return;case"Escape":c?(r.inputIsHiddenAfterUpdate=!1,r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(o)return;if(!c){r.openMenu("first");break}if(!g)return;r.selectOption(g);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}t.preventDefault()}}));var n=t.value;r.cacheComponents=o(r.cacheComponents,$).bind(E(E(r))),r.cacheComponents(t.components),r.instancePrefix="react-select-"+(r.props.instanceId||++Ht);var a=I(n),i=r.buildMenuOptions(t,a);return r.state.menuOptions=i,r.state.selectValue=a,r}return k(e,t),x(e,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(t){var e=this.props,r=e.options,n=e.value,a=e.inputValue;if(this.cacheComponents(t.components),t.value!==n||t.options!==r||t.inputValue!==a){var i=I(t.value),o=this.buildMenuOptions(t,i),s=this.getNextFocusedValue(i),l=this.getNextFocusedOption(o.focusable);this.setState({menuOptions:o,selectValue:i,focusedOption:l,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(t){var e,r,n,a,i,o=this.props,s=o.isDisabled,l=o.menuIsOpen,c=this.state.isFocused;(c&&!s&&t.isDisabled||c&&l&&!t.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(e=this.menuListRef,r=this.focusedOptionRef,n=e.getBoundingClientRect(),a=r.getBoundingClientRect(),i=r.offsetHeight/3,a.bottom+i>n.bottom?R(e,Math.min(r.offsetTop+r.clientHeight-e.offsetHeight+i,e.scrollHeight)):a.top-i-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:r.focusable[o]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(t){var e=this.props,r=e.isMulti,n=e.isSearchable,a=this.state,i=a.selectValue,o=a.focusedValue;if(r){this.setState({focusedOption:null});var s=i.indexOf(o);o||(s=-1,this.announceAriaLiveContext({event:"value"}));var l=i.length-1,c=-1;if(i.length){switch(t){case"previous":c=0===s?0:-1===s?l:s-1;break;case"next":s>-1&&s0&&void 0!==arguments[0]?arguments[0]:"first",e=this.props.pageSize,r=this.state,n=r.focusedOption,a=r.menuOptions,i=a.focusable;if(i.length){var o=0,s=i.indexOf(n);n||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===t?o=s>0?s-1:i.length-1:"down"===t?o=(s+1)%i.length:"pageup"===t?(o=s-e)<0&&(o=0):"pagedown"===t?(o=s+e)>i.length-1&&(o=i.length-1):"last"===t&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:_t(i[o])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ut):w({},Ut,this.props.theme):Ut}},{key:"getCommonProps",value:function(){var t=this.clearValue,e=this.getStyles,r=this.setValue,n=this.selectOption,a=this.props,i=a.classNamePrefix,o=a.isMulti,s=a.isRtl,l=a.options,c=this.state.selectValue,u=this.hasValue();return{cx:P.bind(null,i),clearValue:t,getStyles:e,getValue:function(){return c},hasValue:u,isMulti:o,isRtl:s,options:l,selectOption:n,setValue:r,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(t){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var e=this.state,r=e.focusedValue,n=e.selectValue.indexOf(r);if(n>-1){if(t.indexOf(r)>-1)return r;if(n-1?e:t[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var t=this.props,e=t.isClearable,r=t.isMulti;return void 0===e?r:e}},{key:"isOptionDisabled",value:function(t,e){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(t,e)}},{key:"isOptionSelected",value:function(t,e){var r=this;if(e.indexOf(t)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(t,e);var n=this.getOptionValue(t);return e.some((function(t){return r.getOptionValue(t)===n}))}},{key:"filterOption",value:function(t,e){return!this.props.filterOption||this.props.filterOption(t,e)}},{key:"formatOptionLabel",value:function(t,e){if("function"==typeof this.props.formatOptionLabel){var r=this.props.inputValue,n=this.state.selectValue;return this.props.formatOptionLabel(t,{context:e,inputValue:r,selectValue:n})}return this.getOptionLabel(t)}},{key:"formatGroupLabel",value:function(t){return this.props.formatGroupLabel(t)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(t,e){var r=this,n=t.inputValue,a=void 0===n?"":n,i=t.options,o=function(t,n){var i=r.isOptionDisabled(t,e),o=r.isOptionSelected(t,e),s=r.getOptionLabel(t),l=r.getOptionValue(t);if(!(r.shouldHideSelectedOptions()&&o||!r.filterOption({label:s,value:l,data:t},a))){var c=i?void 0:function(){return r.onOptionHover(t)},u=i?void 0:function(){return r.selectOption(t)},f="".concat(r.getElementId("option"),"-").concat(n);return{innerProps:{id:f,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:t,isDisabled:i,isSelected:o,key:f,label:s,type:"option",value:l}}};return i.reduce((function(t,e,n){if(e.options){r.hasGroups||(r.hasGroups=!0);var a=e.options.map((function(e,r){var a=o(e,"".concat(n,"-").concat(r));return a&&t.focusable.push(e),a})).filter(Boolean);if(a.length){var i="".concat(r.getElementId("group"),"-").concat(n);t.render.push({type:"group",key:i,data:e,options:a})}}else{var s=o(e,"".concat(n));s&&(t.render.push(s),t.focusable.push(e))}return t}),{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var t=this.state,e=t.ariaLiveContext,r=t.selectValue,n=t.focusedValue,a=t.focusedOption,i=this.props,o=i.options,s=i.menuIsOpen,l=i.inputValue,c=i.screenReaderStatus,u=n?function(t){var e=t.focusedValue,r=t.getOptionLabel,n=t.selectValue;return"value ".concat(r(e)," focused, ").concat(n.indexOf(e)+1," of ").concat(n.length,".")}({focusedValue:n,getOptionLabel:this.getOptionLabel,selectValue:r}):"",f=a&&s?function(t){var e=t.focusedOption,r=t.getOptionLabel,n=t.options;return"option ".concat(r(e)," focused").concat(e.isDisabled?" disabled":"",", ").concat(n.indexOf(e)+1," of ").concat(n.length,".")}({focusedOption:a,getOptionLabel:this.getOptionLabel,options:o}):"",p=function(t){var e=t.inputValue,r=t.screenReaderMessage;return"".concat(r).concat(e?" for search term "+e:"",".")}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(f," ").concat(p," ").concat(e)}},{key:"renderInput",value:function(){var t=this.props,e=t.isDisabled,r=t.isSearchable,n=t.inputId,i=t.inputValue,o=t.tabIndex,s=this.components.Input,l=this.state.inputIsHidden,c=n||this.getElementId("input");if(!r)return a.a.createElement(it,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:L,onFocus:this.onInputFocus,readOnly:!0,disabled:e,tabIndex:o,value:""});var u={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,h=f.theme,d=f.selectProps;return a.a.createElement(s,_({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:e,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:d,spellCheck:"false",tabIndex:o,theme:h,type:"text",value:i},u))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,e=this.components,r=e.MultiValue,n=e.MultiValueContainer,i=e.MultiValueLabel,o=e.MultiValueRemove,s=e.SingleValue,l=e.Placeholder,c=this.commonProps,u=this.props,f=u.controlShouldRenderValue,p=u.isDisabled,h=u.isMulti,d=u.inputValue,g=u.placeholder,v=this.state,m=v.selectValue,y=v.focusedValue,x=v.isFocused;if(!this.hasValue()||!f)return d?null:a.a.createElement(l,_({},c,{key:"placeholder",isDisabled:p,isFocused:x}),g);if(h)return m.map((function(e){var s=e===y;return a.a.createElement(r,_({},c,{components:{Container:n,Label:i,Remove:o},isFocused:s,isDisabled:p,key:t.getOptionValue(e),removeProps:{onClick:function(){return t.removeValue(e)},onTouchEnd:function(){return t.removeValue(e)},onMouseDown:function(t){t.preventDefault(),t.stopPropagation()}},data:e}),t.formatOptionLabel(e,"value"))}));if(d)return null;var b=m[0];return a.a.createElement(s,_({},c,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.components.ClearIndicator,e=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,o=this.state.isFocused;if(!this.isClearable()||!t||n||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return a.a.createElement(t,_({},e,{innerProps:s,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var t=this.components.LoadingIndicator,e=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,o=this.state.isFocused;if(!t||!i)return null;return a.a.createElement(t,_({},e,{innerProps:{"aria-hidden":"true"},isDisabled:n,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.components,e=t.DropdownIndicator,r=t.IndicatorSeparator;if(!e||!r)return null;var n=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return a.a.createElement(r,_({},n,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var t=this.components.DropdownIndicator;if(!t)return null;var e=this.commonProps,r=this.props.isDisabled,n=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return a.a.createElement(t,_({},e,{innerProps:i,isDisabled:r,isFocused:n}))}},{key:"renderMenu",value:function(){var t=this,e=this.components,r=e.Group,n=e.GroupHeading,i=e.Menu,o=e.MenuList,s=e.MenuPortal,l=e.LoadingMessage,c=e.NoOptionsMessage,u=e.Option,f=this.commonProps,p=this.state,h=p.focusedOption,d=p.menuOptions,g=this.props,v=g.captureMenuScroll,m=g.inputValue,y=g.isLoading,x=g.loadingMessage,b=g.minMenuHeight,w=g.maxMenuHeight,k=g.menuIsOpen,T=g.menuPlacement,A=g.menuPosition,E=g.menuPortalTarget,S=g.menuShouldBlockScroll,C=g.menuShouldScrollIntoView,L=g.noOptionsMessage,O=g.onMenuScrollToTop,P=g.onMenuScrollToBottom;if(!k)return null;var I,D=function(e){var r=h===e.data;return e.innerRef=r?t.getFocusedOptionRef:void 0,a.a.createElement(u,_({},f,e,{isFocused:r}),t.formatOptionLabel(e.data,"menu"))};if(this.hasOptions())I=d.render.map((function(e){if("group"===e.type){e.type;var i=M(e,["type"]),o="".concat(e.key,"-heading");return a.a.createElement(r,_({},f,i,{Heading:n,headingProps:{id:o},label:t.formatGroupLabel(e.data)}),e.options.map((function(t){return D(t)})))}if("option"===e.type)return D(e)}));else if(y){var z=x({inputValue:m});if(null===z)return null;I=a.a.createElement(l,f,z)}else{var R=L({inputValue:m});if(null===R)return null;I=a.a.createElement(c,f,R)}var F={minMenuHeight:b,maxMenuHeight:w,menuPlacement:T,menuPosition:A,menuShouldScrollIntoView:C},B=a.a.createElement(U,_({},f,F),(function(e){var r=e.ref,n=e.placerProps,s=n.placement,l=n.maxHeight;return a.a.createElement(i,_({},f,F,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:y,placement:s}),a.a.createElement(yt,{isEnabled:v,onTopArrive:O,onBottomArrive:P},a.a.createElement(vt,{isEnabled:S},a.a.createElement(o,_({},f,{innerRef:t.getMenuListRef,isLoading:y,maxHeight:l}),I))))}));return E||"fixed"===A?a.a.createElement(s,_({},f,{appendTo:E,controlElement:this.controlRef,menuPlacement:T,menuPosition:A}),B):B}},{key:"renderFormField",value:function(){var t=this,e=this.props,r=e.delimiter,n=e.isDisabled,i=e.isMulti,o=e.name,s=this.state.selectValue;if(o&&!n){if(i){if(r){var l=s.map((function(e){return t.getOptionValue(e)})).join(r);return a.a.createElement("input",{name:o,type:"hidden",value:l})}var c=s.length>0?s.map((function(e,r){return a.a.createElement("input",{key:"i-".concat(r),name:o,type:"hidden",value:t.getOptionValue(e)})})):a.a.createElement("input",{name:o,type:"hidden"});return a.a.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return a.a.createElement("input",{name:o,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?a.a.createElement(at,{"aria-live":"assertive"},a.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),a.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var t=this.components,e=t.Control,r=t.IndicatorsContainer,n=t.SelectContainer,i=t.ValueContainer,o=this.props,s=o.className,l=o.id,c=o.isDisabled,u=o.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return a.a.createElement(n,_({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:f}),this.renderLiveRegion(),a.a.createElement(e,_({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:f,menuIsOpen:u}),a.a.createElement(i,_({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),a.a.createElement(r,_({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),e}(n.Component);b(Gt,"defaultProps",qt);var Wt={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Yt=function(t){var e,r;return r=e=function(e){function r(){var t,e;m(this,r);for(var n=arguments.length,a=new Array(n),i=0;i1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,r=String(t).toLowerCase(),n=String(e.value).toLowerCase(),a=String(e.label).toLowerCase();return n===r||a===r},Qt=w({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,e,r){return!(!t||e.some((function(e){return $t(t,e)}))||r.some((function(e){return $t(t,e)})))},getNewOptionData:function(t,e){return{label:e,value:t,__isNew__:!0}}}),te=function(t){var e,r;return r=e=function(e){function r(t){var e;m(this,r),b(E(E(e=S(this,T(r).call(this,t)))),"select",void 0),b(E(E(e)),"onChange",(function(t,r){var n=e.props,a=n.getNewOptionData,i=n.inputValue,o=n.isMulti,s=n.onChange,l=n.onCreateOption,c=n.value;if("select-option"!==r.action)return s(t,r);var u=e.state.newOption,f=Array.isArray(t)?t:[t];if(f[f.length-1]!==u)s(t,r);else if(l)l(i);else{var p=a(i,i),h={action:"create-option"};s(o?[].concat(C(I(c)),[p]):p,h)}}));var n=t.options||[];return e.state={newOption:void 0,options:n},e}return k(r,e),x(r,[{key:"componentWillReceiveProps",value:function(t){var e=t.allowCreateWhileLoading,r=t.createOptionPosition,n=t.formatCreateLabel,a=t.getNewOptionData,i=t.inputValue,o=t.isLoading,s=t.isValidNewOption,l=t.value,c=t.options||[],u=this.state.newOption;u=s(i,I(l),c)?a(i,n(i)):void 0,this.setState({newOption:u,options:!e&&o||!u?c:"first"===r?[u].concat(C(c)):[].concat(C(c),[u])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var e=this,r=_({},this.props),n=this.state.options;return a.a.createElement(t,_({},r,{ref:function(t){e.select=t},options:n,onChange:this.onChange}))}}]),r}(n.Component),b(e,"defaultProps",Qt),r},ee=Yt(te(Gt)),re=Yt(te(Gt)),ne=Zt(re),ae=function(t){return function(e){e.in,e.onExited,e.appear,e.enter,e.exit;var r=M(e,["in","onExited","appear","enter","exit"]);return a.a.createElement(t,r)}},ie=function(t){var e=t.component,r=t.duration,n=void 0===r?1:r,i=t.in,o=(t.onExited,M(t,["component","duration","in","onExited"])),s={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(n,"ms")},exiting:{opacity:0},exited:{opacity:0}};return a.a.createElement(g.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:n},(function(t){var r={style:w({},s[t])};return a.a.createElement(e,_({innerProps:r},o))}))},oe=function(t){function e(){var t,r;m(this,e);for(var n=arguments.length,a=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=Nt({components:t}),r=e.Input,n=e.MultiValue,a=e.Placeholder,i=e.SingleValue,o=e.ValueContainer,s=M(e,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return w({Input:ae(r),MultiValue:se(n),Placeholder:le(a),SingleValue:ce(i),ValueContainer:ue(o)},s)},pe=fe(),he=(pe.Input,pe.MultiValue,pe.Placeholder,pe.SingleValue,pe.ValueContainer,o(fe,$)),de=Yt(Gt);e.default=de},function(t,e,r){"use strict";var n=r(9),a=Object(n.a)((function(t,e){for(var r={},n={},a=0,i=t.length;a=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a=(a+=t).substr(0,r)}},{}],503:[function(t,r,n){(function(t){r.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],504:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,a=e-2;a>=0;--a){var i=r,o=t[a];(l=o-((r=i+o)-i))&&(t[--n]=r,r=l)}var s=0;for(a=n;a>1;return["sum(",t(e.slice(0,r)),",",t(e.slice(r)),")"].join("")}(e);var n}function u(t){return new Function("sum","scale","prod","compress",["function robustDeterminant",t,"(m){return compress(",c(l(t)),")};return robustDeterminant",t].join(""))(a,i,n,o)}var f=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;f.length<6;)f.push(u(f.length));for(var t=[],r=["function robustDeterminant(m){switch(m.length){"],n=0;n<6;++n)t.push("det"+n),r.push("case ",n,":return det",n,"(m);");r.push("}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant"),t.push("CACHE","gen",r.join(""));var a=Function.apply(void 0,t);for(e.exports=a.apply(void 0,f.concat([f,u])),n=0;n>1;return["sum(",l(t.slice(0,e)),",",l(t.slice(e)),")"].join("")}function c(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return c(e,t)}function u(t){if(2===t.length)return[["diff(",c(t[0][0],t[1][1]),",",c(t[1][0],t[0][1]),")"].join("")];for(var e=[],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 ",e);var s=new Function("det",r.join(""));return s(t<6?n[t]:n)}var i=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;i.length<6;)i.push(a(i.length));for(var t=[],r=["function dispatchLinearSolve(A,b){switch(A.length){"],n=0;n<6;++n)t.push("s"+n),r.push("case ",n,":return s",n,"(A,b);");r.push("}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve"),t.push("CACHE","g",r.join(""));var o=Function.apply(void 0,t);for(e.exports=o.apply(void 0,i.concat([i,a])),n=0;n<6;++n)e.exports[n]=i[n]}()},{"robust-determinant":505}],509:[function(t,e,r){"use strict";var n=t("two-product"),a=t("robust-sum"),i=t("robust-scale"),o=t("robust-subtract");function s(t,e){for(var r=new Array(t.length-1),n=1;n>1;return["sum(",l(t.slice(0,e)),",",l(t.slice(e)),")"].join("")}function c(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],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:f(t,e,r)},function(t,e,r,n){var a=t[0]-n[0],i=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=i*c,g=o*l,v=o*s,m=a*c,y=a*l,x=i*s,b=u*(d-g)+f*(v-m)+h*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>_||-b>_?b:p(t,e,r,n)}];function d(t){var e=h[t.length];return e||(e=h[t.length]=u(t.length)),e.apply(void 0,t)}!function(){for(;h.length<=5;)h.push(u(h.length));for(var t=[],r=["slow"],n=0;n<=5;++n)t.push("a"+n),r.push("o"+n);var a=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=5;++n)a.push("case ",n,":return o",n,"(",t.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,t,e),l=n(a,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==i||0!==o||0!==s||0!==l||function(t,e,r,n){for(var a=0;a<2;++a){var i=t[a],o=e[a],s=Math.min(i,o),l=Math.max(i,o),c=r[a],u=n[a],f=Math.min(c,u);if(Math.max(c,u)=n?(a=f,(l+=1)=n?(a=f,(l+=1)0?1:0}},{}],516:[function(t,e,r){"use strict";e.exports=function(t){return a(n(t))};var n=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":97,"reduce-simplicial-complex":491}],517:[function(t,e,r){"use strict";e.exports=function(t,e,r,s){if(r=r||0,void 0===s&&(s=function(t){for(var e=t.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=t+1;i>1;--i){i>1,s=i(t[o],e);s<=0?(0===s&&(a=o),r=o+1):s>0&&(n=o-1)}return a}function u(t,e){for(var r=new Array(t.length),a=0,o=r.length;a=t.length||0!==i(t[v],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],a=(1<>>u&1&&c.push(a[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,a=2*(t+1),i=t;if(n0;){var r=y(t);if(!(r>=0&&e0){var t=T[0];return v(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=T[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}var T=[],A=new Array(i);for(f=0;f>1;f>=0;--f)x(f);for(;;){var E=_();if(E<0||c[E]>r)break;k(E)}var S=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],a=A[r];n!==a&&L.push([n,a])}})),a.unique(a.normalize(L)),{positions:S,edges:L}};var n=t("robust-orientation"),a=t("simplicial-complex")},{"robust-orientation":509,"simplicial-complex":521}],524:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,o,s;if(e[0][0]e[1][0]))return a(e,t);r=e[1],i=e[0]}if(t[0][0]t[1][0]))return-a(t,e);o=t[1],s=t[0]}var l=n(r,i,s),c=n(r,i,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,i),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return i[0]-s[0]};var n=t("robust-orientation");function a(t,e){var r,a,i,o;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return lu?s-u:l-u}r=e[1],a=e[0]}t[0][1]0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),a=-1;if(r&&(a=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?o(u.key,s)>0&&(s=u.key,a=u.value):(a=u.value,s=u.key))}var f=this.horizontal[e];if(f.length>0){var p=n.ge(f,t[1],l);if(p=f.length)return a;h=f[p]}}if(h.start)if(s){var d=i(s[0],s[1],[t[0],h.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(a=h.index)}else a=h.index;else h.y!==t[1]&&(a=h.index)}}}return a}},{"./lib/order-segments":524,"binary-search-bounds":93,"functional-red-black-tree":233,"robust-orientation":509}],526:[function(t,e,r){"use strict";var n=t("robust-dot-product"),a=t("robust-sum");function i(t,e){var r=a(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var a=-e/(n-e);a<0?a=0:a>1&&(a=1);for(var i=1-a,o=t.length,s=new Array(o),l=0;l0||a>0&&u<0){var f=o(s,u,l,a);r.push(f),n.push(f.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),a=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{"robust-dot-product":506,"robust-sum":514}],527:[function(t,e,r){!function(){"use strict";var t={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 e(t){return a(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function a(r,n){var a,i,o,s,l,c,u,f,p,h=1,d=r.length,g="";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()}t.json.test(s.type)?g+=a:(!t.number.test(s.type)||f&&!s.sign?p="":(p=f?"+":"-",a=a.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(p+a).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?p+a+l:"0"===c?p+l+a:l+p+a)}return g}var i=Object.create(null);function o(e){if(i[e])return i[e];for(var r,n=e,a=[],o=0;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push("%");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.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 i[e]=a}void 0!==r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],528:[function(t,e,r){"use strict";var n=t("parenthesis");e.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)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(t){return 1===t.length&&(t+=t),t})));var a=n.parse(t,{flat:!0,brackets:r.ignore}),i=a[0].split(e);if(r.escape){for(var o=[],s=0;s0;){e=c[c.length-1];var h=t[e];if(i[e]=0&&s[e].push(o[g])}i[e]=d}else{if(n[e]===r[e]){var v=[],m=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(a[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(v);var b=new Array(y);for(d=0;d c)|0 },"),"generic"===e&&i.push("getters:[0],");for(var s=[],l=[],c=0;c>>7){"),c=0;c<1<<(1<128&&c%128==0){f.length>0&&p.push("}}");var h="vExtra"+f.length;i.push("case ",c>>>7,":",h,"(m&0x7f,",l.join(),");break;"),p=["function ",h,"(m,",l.join(),"){switch(m){"],f.push(p)}p.push("case ",127&c,":");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;xx)&&!(c&1<<_)!=!(c&1<0&&(A="+"+v[b]+"*c");var M=d[b].length/y*.5,E=.5+m[b]/y*.5;T.push("d"+b+"-"+E+"-"+M+"*("+d[b].join("+")+A+")/("+g[b].join("+")+")")}p.push("a.push([",T.join(),"]);","break;")}i.push("}},"),f.length>0&&p.push("}}");var S=[];for(c=0;c<1<1&&(i=1),i<-1&&(i=-1),a*Math.acos(i)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,p=t.xAxisRotation,h=void 0===p?0:p,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===f)return[];var x=Math.sin(h*a/360),b=Math.cos(h*a/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);k>1&&(u*=Math.sqrt(k),f*=Math.sqrt(k));var T=function(t,e,r,n,i,o,l,c,u,f,p,h){var d=Math.pow(i,2),g=Math.pow(o,2),v=Math.pow(p,2),m=Math.pow(h,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*i/o*h,b=y*-o/i*p,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,k=(p-x)/i,T=(h-b)/o,A=(-p-x)/i,M=(-h-b)/o,E=s(1,0,k,T),S=s(k,T,A,M);return 0===c&&S>0&&(S-=a),1===c&&S<0&&(S+=a),[_,w,E,S]}(e,r,l,c,u,f,g,m,x,b,_,w),A=n(T,4),M=A[0],E=A[1],S=A[2],C=A[3],L=Math.abs(C)/(a/4);Math.abs(1-L)<1e-7&&(L=1);var O=Math.max(Math.ceil(L),1);C/=O;for(var P=0;Pe[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":63,assert:70,"is-svg-path":426,"normalize-svg-path":533,"parse-svg-path":462}],533:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,p=0,h=0,d=0,g=t.length;d4?(o=v[v.length-4],s=v[v.length-3]):(o=p,s=h),r.push(v)}return r};var n=t("svg-arc-to-cubic-bezier");function a(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,a,i){return["C",t/3+2/3*r,e/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}},{"svg-arc-to-cubic-bezier":531}],534:[function(t,e,r){"use strict";var n,a=t("svg-path-bounds"),i=t("parse-svg-path"),o=t("draw-svg-path"),s=t("is-svg-path"),l=t("bitmap-sdf"),c=document.createElement("canvas"),u=c.getContext("2d");e.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,f;e||(e={}),e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var p=Math.min(r,f),h=e.stroke||0,d=e.viewbox||e.viewBox||a(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],v=Math.min(g[0]||0,g[1]||0)/2;if(u.fillStyle="black",u.fillRect(0,0,r,f),u.fillStyle="white",h&&("number"!=typeof h&&(h=1),u.strokeStyle=h>0?"white":"black",u.lineWidth=Math.abs(h)),u.translate(.5*r,.5*f),u.scale(v,v),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var m=new Path2D(t);u.fill(m),h&&u.stroke(m)}else{var y=i(t);o(u,y),u.fill(),h&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*p})}},{"bitmap-sdf":95,"draw-svg-path":170,"is-svg-path":426,"parse-svg-path":462,"svg-path-bounds":532}],535:[function(t,e,r){(function(r){"use strict";e.exports=function t(e,r,a){a=a||{};var o=i[e];o||(o=i[e]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),a=0,i=0,o=0;o0&&(f+=.02);var h=new Float32Array(u),d=0,g=-.5*f;for(p=0;p1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=a=i=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),a=o(l,s,t),i=o(l,s,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,l,u),f=!0,p="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=C(i),{ok:f,format:e.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}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=l.format||u.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=u.ok,this._tc_id=a++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,a,i=s(t,e,r),l=o(t,e,r),c=(i+l)/2;if(i==l)n=a=0;else{var u=i-l;switch(a=c>.5?u/(2-i-l):u/(i+l),i){case t:n=(e-r)/u+(e>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(c(n));return i}function M(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:a,v:i})),i=(i+s)%1;return o}c.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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,a=this.toRgb();return e=a.r/255,r=a.g/255,n=a.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=i(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=i(360*t.h),r=i(100*t.s),n=i(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=i(360*t.h),r=i(100*t.s),n=i(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return p(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,a){var o=[I(i(t).toString(16)),I(i(e).toString(16)),I(i(r).toString(16)),I(z(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,t)},toHex8String:function(t){return"#"+this.toHex8(t)},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*L(this._r,255))+"%",g:i(100*L(this._g,255))+"%",b:i(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%)":"rgba("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var a=c(t);r="#"+h(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:D(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),a=c(e).toRgb(),i=r/100;return c({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})},c.readability=function(e,r){var n=c(e),a=c(r);return(t.max(n.getLuminance(),a.getLuminance())+.05)/(t.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,a,i,o,s,l=c.readability(t,e);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},c.mostReadable=function(t,e,r){var n,a,i,o,s=null,l=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],r))};var E=c.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"},S=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(E);function C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function O(t){return o(1,s(0,t))}function P(t){return parseInt(t,16)}function I(t){return 1==t.length?"0"+t:""+t}function D(t){return t<=1&&(t=100*t+"%"),t}function z(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return P(t)/255}var F,B,N,j=(B="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",N="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+N),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 V(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],537:[function(t,e,r){"use strict";e.exports=a,e.exports.float32=e.exports.float=a,e.exports.fract32=e.exports.fract=function(t){if(t.length){for(var e=a(t),r=0,n=e.length;rf&&(f=l[0]),l[1]p&&(p=l[1])}function a(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(a);break;case"Point":n(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(n)}}if(!e){var i,o,s=r(t),l=new Array(2),c=1/0,u=c,f=-c,p=-c;for(o in t.arcs.forEach((function(t){for(var e=-1,r=t.length;++ef&&(f=l[0]),l[1]p&&(p=l[1])})),t.objects)a(t.objects[o]);e=t.bbox=[c,u,f,p]}return e};function a(t,e){var r=e.id,n=e.bbox,a=null==e.properties?{}:e.properties,o=i(t,e);return null==r&&null==n?{type:"Feature",properties:a,geometry:o}:null==n?{type:"Feature",id:r,properties:a,geometry:o}:{type:"Feature",id:r,bbox:n,properties:a,geometry:o}}function i(t,e){var n=r(t),a=t.arcs;function i(t,e){e.length&&e.pop();for(var r=a[t<0?~t:t],i=0,o=r.length;i1)n=l(0,e,r);else for(a=0,n=new Array(i=t.arcs.length);a1)for(var i,s,c=1,u=l(a[0]);cu&&(s=a[0],a[0]=a[c],a[c]=s,u=i);return a}))}}var u=function(t,e){for(var r=0,n=t.length;r>>1;t[a]=2))throw new Error("n must be ≥2");if(t.transform)throw new Error("already quantized");var r,a=n(t),i=a[0],o=(a[2]-i)/(e-1)||1,s=a[1],l=(a[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-i)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"Point":c(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(c)}}for(r in t.arcs.forEach((function(t){for(var e,r,n,a=1,c=1,u=t.length,f=t[0],p=f[0]=Math.round((f[0]-i)/o),h=f[1]=Math.round((f[1]-s)/l);aMath.max(r,n)?a[2]=1:r>Math.max(e,n)?a[0]=1:a[1]=1;for(var i=0,o=0,l=0;l<3;++l)i+=t[l]*t[l],o+=a[l]*t[l];for(l=0;l<3;++l)a[l]-=o/i*t[l];return s(a,a),a}function p(t,e,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(t,e),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 c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var h=p.prototype;h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,a=0,i=0;i<3;++i)a+=e[i]*r[i],n+=e[i]*e[i];var l=Math.sqrt(n),u=0;for(i=0;i<3;++i)r[i]-=e[i]*a/n,u+=r[i]*r[i],e[i]/=l;var f=Math.sqrt(u);for(i=0;i<3;++i)r[i]/=f;var p=this.computedToward;o(p,e,r),s(p,p);var h=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,T=-v*x,A=-m*x,M=y,E=this.computedEye,S=this.computedMatrix;for(i=0;i<3;++i){var C=_*r[i]+w*p[i]+k*e[i];S[4*i+1]=T*r[i]+A*p[i]+M*e[i],S[4*i+2]=C,S[4*i+3]=0}var L=S[1],O=S[5],P=S[9],I=S[2],D=S[6],z=S[10],R=O*z-P*D,F=P*I-L*z,B=L*D-O*I,N=c(R,F,B);for(R/=N,F/=N,B/=N,S[0]=R,S[4]=F,S[8]=B,i=0;i<3;++i)E[i]=b[i]+S[2+4*i]*h;for(i=0;i<3;++i){u=0;for(var j=0;j<3;++j)u+=S[i+4*j]*E[j];S[12+i]=-u}S[15]=1},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];h.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var a=this.computedMatrix;d[0]=a[2],d[1]=a[6],d[2]=a[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)a[4*c]=o[c],a[4*c+1]=s[c],a[4*c+2]=l[c];for(i(a,a,n,d),c=0;c<3;++c)o[c]=a[4*c],s[c]=a[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var a=this.computedMatrix,i=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],s=a[9],l=c(i,o,s);i/=l,o/=l,s/=l;var u=a[0],f=a[4],p=a[8],h=u*i+f*o+p*s,d=c(u-=i*h,f-=o*h,p-=s*h),g=(u/=d)*e+i*r,v=(f/=d)*e+o*r,m=(p/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e,r,n){var i=1;"number"==typeof r&&(i=0|r),(i<0||i>3)&&(i=1);var o=(i+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[i],l=e[i+4],f=e[i+8];if(n){var p=Math.abs(s),h=Math.abs(l),d=Math.abs(f),g=Math.max(p,h,d);p===g?(s=s<0?-1:1,l=f=0):d===g?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var v=c(s,l,f);s/=v,l/=v,f/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,k=c(x-=s*w,b-=l*w,_-=f*w),T=l*(_/=k)-f*(b/=k),A=f*(x/=k)-s*_,M=s*b-l*x,E=c(T,A,M);if(T/=E,A/=E,M/=E,this.center.jump(t,H,G,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===i){var S=e[1],C=e[5],L=e[9],O=S*x+C*b+L*_,P=S*T+C*A+L*M;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,O)}else{var I=e[2],D=e[6],z=e[10],R=I*s+D*l+z*f,F=I*x+D*b+z*_,B=I*T+D*A+z*M;m=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;a(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,W=U[14]/q,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,G-j*Y,W-V*Y)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},h.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var a=(n=n||this.computedUp)[0],i=n[1],o=n[2],s=c(a,i,o);if(!(s<1e-6)){a/=s,i/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],p=e[2]-r[2],h=c(l,f,p);if(!(h<1e-6)){l/=h,f/=h,p/=h;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=a*g+i*v+o*m,x=c(g-=y*a,v-=y*i,m-=y*o);if(!(x<.01&&(x=c(g=i*p-o*f,v=o*l-a*p,m=a*f-i*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,a,i,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(h));var b=i*m-o*v,_=o*g-a*m,w=a*v-i*g,k=c(b,_,w),T=a*l+i*f+o*p,A=g*l+v*f+m*p,M=(b/=k)*l+(_/=k)*f+(w/=k)*p,E=Math.asin(u(T)),S=Math.atan2(M,A),C=this.angle._state,L=C[C.length-1],O=C[C.length-2];L%=2*Math.PI;var P=Math.abs(L+2*Math.PI-S),I=Math.abs(L-S),D=Math.abs(L-2*Math.PI-S);P0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function h(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function g(t){return new Int8Array(f(t),0,t)}function v(t){return new Int16Array(f(2*t),0,t)}function m(t){return new Int32Array(f(4*t),0,t)}function y(t){return new Float32Array(f(4*t),0,t)}function x(t){return new Float64Array(f(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(f(t),0,t):p(t)}function _(t){return new DataView(f(t),0,t)}function w(t){t=a.nextPow2(t);var e=a.log2(t),n=c[e];return n.length>0?n.pop():new r(t)}n.free=function(t){if(r.isBuffer(t))c[a.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,n=0|a.log2(e);l[n].push(t)}},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(t){u(t.buffer)},n.freeArrayBuffer=u,n.freeBuffer=function(t){c[a.log2(t.length)].push(t)},n.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return h(t);case"uint32":return d(t);case"int8":return g(t);case"int16":return v(t);case"int32":return m(t);case"float":case"float32":return y(t);case"double":case"float64":return x(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return _(t);default:return null}return null},n.mallocArrayBuffer=f,n.mallocUint8=p,n.mallocUint16=h,n.mallocUint32=d,n.mallocInt8=g,n.mallocInt16=v,n.mallocInt32=m,n.mallocFloat32=n.mallocFloat=y,n.mallocFloat64=n.mallocDouble=x,n.mallocUint8Clamped=b,n.mallocDataView=_,n.mallocBuffer=w,n.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":94,buffer:107,dup:172}],545:[function(t,e,r){"use strict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(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(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",p(function(t,e,r,n,i,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(h=0;h-1?parseInt(t[1+a]):0,l=i>-1?parseInt(r[1+i]):0;s!==l&&(n=n.replace(E(),"?px "),v*=Math.pow(.75,l-s),n=n.replace("?px ",E())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf("+"),u=r.indexOf("+"),f=c>-1?parseInt(t[1+c]):0,p=u>-1?parseInt(r[1+u]):0;f!==p&&(n=n.replace(E(),"?px "),v*=Math.pow(.75,p-f),n=n.replace("?px ",E())),g-=.25*x*(p-f)}if(!0===o.bolds){var h=t.indexOf("b|")>-1,d=r.indexOf("b|")>-1;!h&&d&&(n=m?n.replace("italic ","italic bold "):"bold "+n),h&&!d&&(n=n.replace("bold ",""))}if(!0===o.italics){var m=t.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!m&&y&&(n="italic "+n),m&&!y&&(n=n.replace("italic ",""))}e.font=n}for(p=0;p",i="",o=a.length,s=i.length,l="+"===e[0]||"-"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(a,c))&&-1!==(u=r.indexOf(i,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var p=n[f].indexOf(e[0]);-1===p?n[f]+=e:l&&(n[f]=n[f].substr(0,p+1)+(1+parseInt(n[f][p+1]))+n[f].substr(p+2))}var h=c+o,d=r.substr(h,u-h).indexOf(a);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?i(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var a=u(t,n),i=function(t,e,r){for(var n=e.textAlign||"start",a=e.textBaseline||"alphabetic",i=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l=0?e[i]:a}))},has___:{value:y((function(e){var n=m(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,a){var i,o=m(n);return o?o[r]=a:(i=t.indexOf(n))>=0?e[i]=a:(i=t.length,e[i]=a,t[i]=n),this}))},delete___:{value:y((function(n){var a,i,o=m(n);return o?r in o&&delete o[r]:!((a=t.indexOf(n))<0||(i=t.length-1,t[a]=void 0,e[a]=e[i],t[a]=t[i],t.length=i,e.length=i,0))}))}})};d.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof d||x();var e,n=new r,a=void 0,i=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(a||(a=new d),a.set(t,e)),this}:function(t,e){if(i)try{n.set(t,e)}catch(r){a||(a=new d),a.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return a?n.has(t)?n.get(t):a.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!a&&a.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return a&&a.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");i=!0}))}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function v(t){return!("weakmap:"==t.substr(0,"weakmap:".length)&&"___"===t.substr(t.length-3))}function m(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],552:[function(t,e,r){var n=t("./hidden-store.js");e.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},{"./hidden-store.js":553}],553:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],554:[function(t,e,r){var n=t("./create-store.js");e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},{"./create-store.js":552}],555:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":235}],556:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||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(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),a=t.month(),i=""+this.toChineseMonth(n,a);return e&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"闰"===e[0]&&(r=!0,e=e.substring(1)),"月"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(e);else{var a=e[e.length-1];r="i"===a||"I"===a}return this.toMonthIndex(t,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(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var a=this.intercalaryMonth(t);if(r&&e!==a||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&e<=a?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var a,o=this._validateYear(t,n.local.invalidyear),s=p[o-p[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(a=i.newDate(l,c,u)).add(4-(a.dayOfWeek()||7),"d");var f=this.toJD(t,e,r)-a.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(a.year()),e=a.month(),r=a.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,a){var i,o,s;if("object"==typeof t)o=t,i=e||{};else{var l;if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=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:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],h=u>>13;c=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return i.year=v.getFullYear(),i.month=1+v.getMonth(),i.day=v.getDate(),i}(t,s,r,o);return i.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=i.fromJD(t),r=function(t,e,r,n){var a,i;if("object"==typeof t)a=t,i=e||{};else{if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=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:t,month:e,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,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(a.year,a.month-1,a.day);l=Math.round((u-c)/864e5);var h,d=f[i.year-f[0]];for(h=0;h<13;h++){var g=d&1<<12-h?30:29;if(l>13;return!v||h=2&&n<=6},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year()+(a.year()<0?1:0),e=a.month(),(r=a.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},{"../main":570,"object-assign":456}],559:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return(t=a.year())<0&&t++,a.day()+30*(a.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,a=e-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":570,"object-assign":456}],560:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=i},{"../main":570,"object-assign":456}],561:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),t=t<=0?t+1:t,(r=a.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=i},{"../main":570,"object-assign":456}],562:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),r=a.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((e-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),s=e-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,s)}}),n.calendars.julian=i},{"../main":570,"object-assign":456}],563:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+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(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var a=this._validate(t,e,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(t){var e=o(8+(t-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s(20+(t-=this.jdEpoch),20),s(t+4,13)]},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=i},{"../main":570,"object-assign":456}],564:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidMonth);(t=a.year())<0&&t++;for(var i=a.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=i},{"../main":570,"object-assign":456}],565:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),a=e.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 c=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t-(t>=0?474:473),s=474+o(i,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,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 c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":570,"object-assign":456}],567:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(a.year()),i.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(a.year()),i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":570,"object-assign":456}],568:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(a.year()),i.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(a.year()),i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},{"../main":570,"object-assign":456}],569:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),s=i+1,l=a-12*i,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(t=null!=t.year?t.year:t)>=1276&&t<=1500),a},_validate:function(t,e,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":570,"object-assign":456}],570:[function(t,e,r){var n=t("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(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return"000000".substring(0,e-(t=""+t).length)+t}function s(){this.shortYearCutoff="+10"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}n(a.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,a){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":t[i]+e[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,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(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},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(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),a=t.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);a=t.day(),"y"===r?(t.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,t.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(t){for(;oe-1+t.minMonth;)i++,o-=e,e=t.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(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[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;e=this._add(t,r*a[0]+i*a[1],a[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),a="m"===r?e:t.month(),i="d"===r?e:t.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),t.date(n,a,i)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var a=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=a-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new a;c.cdate=i,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":456}],571:[function(t,e,r){var n=t("object-assign"),a=t("./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(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),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(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,i,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,f=r.monthNamesShort||this.local.monthNamesShort,p=r.monthNames||this.local.monthNames,h=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;w+n1}),d=function(t,e,r,n){var a=""+e;if(h(t,n))for(;a.length1},x=function(t,r){var n=y(t,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+i+"}"),s=e.substring(A).match(o);if(!s)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"==typeof l){y("m");var t=l.call(b,e.substring(A));return A+=t.length,t}return x("m")},w=function(t,r,n,i){for(var o=y(t,i)?n:r,s=0;s-1){h=1,d=g;for(var S=this.daysInMonth(p,h);d>S;S=this.daysInMonth(p,h))h++,d-=S}return f>-1?this.fromJD(f):this.newDate(p,h,d)},determineDate:function(t,e,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return i.parseDate(n,t,a)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:i.today().add(t,"d"):i.newDate(t)}})},{"./main":570,"object-assign":456}],572:[function(t,e,r){e.exports=t("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":148}],573:[function(t,e,r){"use strict";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t("./lib/zc-core")},{"./lib/zc-core":572}],574:[function(t,e,r){"use strict";e.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}]},{}],575:[function(t,e,r){"use strict";var n=t("./arrow_paths"),a=t("../../plots/font_attributes"),i=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;e.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":755,"../../plots/cartesian/constants":771,"../../plots/font_attributes":791,"./arrow_paths":574}],576:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)}))}function s(t,e){var r,n=e._id,i=n.charAt(0),o=t[i],s=t["a"+i],l=t[i+"ref"],c=t["a"+i+"ref"],u=t["_"+i+"padplus"],f=t["_"+i+"padminus"],p={x:1,y:-1}[i]*t[i+"shift"],h=3*t.arrowsize*t.arrowwidth||0,d=h+p,g=h-p,v=3*t.startarrowsize*t.arrowwidth||0,m=v+p,y=v-p;if(c===l){var x=a.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=a.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=a.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(f,g,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([i,o],t)}},{"../../lib":717,"../../plots/cartesian/axes":765,"./draw":581}],577:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("../../plot_api/plot_template").arrayEditor;function o(t,e){var r,n,a,i,o,l,c,u=t._fullLayout.annotations,f=[],p=[],h=[],d=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},p=t._fullLayout.annotations;if(c.length||u.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var H=!1,G=["x","y"],W=0;W1)&&(tt===Q?((ct=et.r2fraction(e["a"+$]))<0||ct>1)&&(H=!0):H=!0),Y=et._offset+et.r2p(e[$]),J=.5}else"x"===$?(Z=e[$],Y=b.l+b.w*Z):(Z=1-e[$],Y=b.t+b.h*Z),J=e.showarrow?.5:Z;if(e.showarrow){lt.head=Y;var ut=e["a"+$];K=nt*V(.5,e.xanchor)-at*V(.5,e.yanchor),tt===Q?(lt.tail=et._offset+et.r2p(ut),X=K):(lt.tail=Y+ut,X=K+ut),lt.text=lt.tail+K;var ft=x["x"===$?"width":"height"];if("paper"===Q&&(lt.head=o.constrain(lt.head,1,ft-1)),"pixel"===tt){var pt=-Math.max(lt.tail-3,lt.text),ht=Math.min(lt.tail+3,lt.text)-ft;pt>0?(lt.tail+=pt,lt.text+=pt):ht>0&&(lt.tail-=ht,lt.text-=ht)}lt.tail+=st,lt.head+=st}else X=K=it*V(J,ot),lt.text=Y+K;lt.text+=st,K+=st,X+=st,e["_"+$+"padplus"]=it/2+X,e["_"+$+"padminus"]=it/2-X,e["_"+$+"size"]=it,e["_"+$+"shift"]=K}if(H)I.remove();else{var dt=0,gt=0;if("left"!==e.align&&(dt=(w-m)*("center"===e.align?.5:1)),"top"!==e.valign&&(gt=(P-y)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:R+dt-1,y:R+gt}).call(c.setClipUrl,B?M:null,t);else{var vt=R+gt-d.top,mt=R+dt-d.left;U.call(f.positionText,mt,vt).call(c.setClipUrl,B?M:null,t)}N.select("rect").call(c.setRect,R,R,w,P),F.call(c.setRect,D/2,D/2,z-D,j-D),I.call(c.setTranslate,Math.round(E.x.text-z/2),Math.round(E.y.text-j/2)),L.attr({transform:"rotate("+S+","+E.x.text+","+E.y.text+")"});var yt,xt=function(r,n){C.selectAll(".annotation-arrow-g").remove();var u=E.x.head,f=E.y.head,p=E.x.tail+r,d=E.y.tail+n,m=E.x.text+r,y=E.y.text+n,x=o.rotationXYMatrix(S,m,y),w=o.apply2DTransform(x),M=o.apply2DTransform2(x),O=+F.attr("width"),P=+F.attr("height"),D=m-.5*O,z=D+O,R=y-.5*P,B=R+P,N=[[D,R,D,B],[D,B,z,B],[z,B,z,R],[z,R,D,R]].map(M);if(!N.reduce((function(t,e){return t^!!o.segmentsIntersect(u,f,u+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){N.forEach((function(t){var e=o.segmentsIntersect(p,d,u,f,t[0],t[1],t[2],t[3]);e&&(p=e.x,d=e.y)}));var j=e.arrowwidth,V=e.arrowcolor,U=e.arrowside,q=C.append("g").style({opacity:l.opacity(V)}).classed("annotation-arrow-g",!0),H=q.append("path").attr("d","M"+p+","+d+"L"+u+","+f).style("stroke-width",j+"px").call(l.stroke,l.rgb(V));if(g(H,U,e),_.annotationPosition&&H.node().parentNode&&!i){var G=u,W=f;if(e.standoff){var Y=Math.sqrt(Math.pow(u-p,2)+Math.pow(f-d,2));G+=e.standoff*(p-u)/Y,W+=e.standoff*(d-f)/Y}var X,Z,J=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(p-G)+","+(d-W),transform:"translate("+G+","+W+")"}).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:J.node(),gd:t,prepFn:function(){var t=c.getTranslate(I);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+".autorange",!0),v&&v.autorange&&k(v._name+".autorange",!0)},moveFn:function(t,r){var n=w(X,Z),a=n[0]+t,i=n[1]+r;I.call(c.setTranslate,a,i),T("x",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),T("y",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&T("ax",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&T("ay",v.p2r(v.r2p(e.ay)+r)),q.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+S+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&xt(0,0),O&&h.init({element:I.node(),gd:t,prepFn:function(){yt=L.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?T("ax",s.p2r(s.r2p(e.ax)+t)):T("ax",e.ax+t),e.ayref===e.yref?T("ay",v.p2r(v.r2p(e.ay)+r)):T("ay",e.ay+r),xt(t,r);else{if(i)return;var a,o;if(s)a=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;a=h.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,f=e.y-(e._yshift+e.yshift)/b.h-u/2;o=h.align(f-r/b.h,u,0,1,e.yanchor)}T("x",a),T("y",o),s&&v||(n=h.getCursor(s?.5:a,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+yt}),p(I,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){p(I),a.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,v=e.indexOf("end")>=0,m=f.backoff*h+r.standoff,y=p.backoff*d+r.startstandoff;if("line"===u.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},s={x:+t.attr("x2"),y:+t.attr("y2")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void O();if(m){if(m*m>x*x+b*b)return void O();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void O();var k=y*Math.cos(l),T=y*Math.sin(l);o.x-=k,o.y-=T,t.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var A=u.getTotalLength(),M="";if(A1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=a(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":814,"../annotations/draw":581}],588:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib");e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:t("./attributes")}}},layoutAttributes:t("./attributes"),handleDefaults:t("./defaults"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(t),s=0;s=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}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(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(n(t))},i.opacity=function(t){return t?n(t).getAlpha():0},i.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},i.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var a=n(e||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(t,e,r){var a=n(t);return 1!==a.getAlpha()&&(a=n(i.combine(t,l))),(a.isDark()?e?a.lighten(e):l:r?a.darken(r):s).toString()},i.stroke=function(t,e){var r=n(e);t.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(t,e){var r=n(e);t.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,r,n,a,o=Object.keys(t);for(e=0;e0?n>=l:n<=l));a++)n>u&&n0?n>=l:n<=l));a++)n>r[0]&&n1){var Z=Math.pow(10,Math.floor(Math.log(X)/Math.LN10));W*=Z*c.roundUp(X/Z,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(G.tick0=0)}G.dtick=W}G.domain=[U+N,U+R-N],G.setScale(),t.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var J,K=t.select("."+T.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),$=t.select("."+T.cbaxis),Q=0;function tt(n,a){var i={propContainer:G,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:o._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+s+",."+s+"-math-group").remove(),d.draw(r,n,u(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(A)){var t,r=l.l+(e.x+F)*l.w,n=G.title.font.size;t="top"===A?(1-(U+R-N))*l.h+l.t+3+.75*n:(1-(U+N))*l.h+l.t-3-.25*n,tt(G._id+"title",{attributes:{x:r,y:t,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(A)){var i=t.select("."+T.cbtitle),o=i.select("text"),u=[-e.outlinewidth/2,e.outlinewidth/2],f=i.select(".h"+G._id+"title-math-group").node(),h=15.6;if(o.node()&&(h=parseInt(o.node().style.fontSize,10)*_),f?(Q=p.bBox(f).height)>h&&(u[1]-=(Q-h)/2):o.node()&&!o.classed(T.jsPlaceholder)&&(Q=p.bBox(o.node()).height),Q){if(Q+=5,"top"===A)G.domain[1]-=Q/l.h,u[1]*=-1;else{G.domain[0]+=Q/l.h;var d=g.lineCount(o);u[1]+=(1-d)*h}i.attr("transform","translate("+u+")"),G.setScale()}}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-G.domain[1]))+")"),$.attr("transform","translate(0,"+Math.round(-l.t)+")");var m=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).data(O);m.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),m.exit().remove();var y=M.map(G.c2p).map(Math.round).sort((function(t,e){return t-e}));m.each((function(t,i){var o=[0===i?M[0]:(O[i]+O[i-1])/2,i===O.length-1?M[1]:(O[i]+O[i+1])/2].map(G.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,y[0],y[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(e._fillgradient)p.gradient(s,r,e._id,"vertical",e._fillgradient,"fill");else{var l=S(t).replace("e-","");s.attr("fill",a(l).toHexString())}}));var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(v.color&&v.width?P:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each((function(t){n.select(this).attr("d","M"+j+","+(Math.round(G.c2p(t))+v.width/2%1)+"h"+I).call(p.lineGroupStyle,v.width,E(t),v.dash)})),$.selectAll("g."+G._id+"tick,path").remove();var b=j+I+(e.outlinewidth||0)/2-("outside"===e.ticks?1:0),w=s.calcTicks(G),k=s.makeTransFn(G),C=s.getTickSigns(G)[2];return s.drawTicks(r,G,{vals:"inside"===G.ticks?s.clipEnds(G,w):w,layer:$,path:s.makeTickPath(G,b,C),transFn:k}),s.drawLabels(r,G,{vals:w,layer:$,transFn:k,labelFns:s.makeLabelFns(G,b)})},function(){if(-1===["top","bottom"].indexOf(A)){var t=G.title.font.size,e=G._offset+G._length/2,a=l.l+(G.position||0)*l.w+("right"===G.side?10+t*(G.showticklabels?1:.5):-10-t*(G.showticklabels?.5:0));tt("h"+G._id+"title",{avoid:{selection:n.select(r).selectAll("g."+G._id+"tick"),side:A,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:a,y:e,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},i.previousPromises,function(){var n=I+e.outlinewidth/2+p.bBox($.node()).width;if((J=K.select("text")).node()&&!J.classed(T.jsPlaceholder)){var a,o=K.select(".h"+G._id+"title-math-group").node();a=o&&-1!==["top","bottom"].indexOf(A)?p.bBox(o).width:p.bBox(K.node()).right-j-l.l,n=Math.max(n,a)}var s=2*e.xpad+n+e.borderwidth+e.outlinewidth/2,c=q-H;t.select("."+T.cbbg).attr({x:j-e.xpad-(e.borderwidth+e.outlinewidth)/2,y:H-B,width:Math.max(s,2),height:Math.max(c+2*B,2)}).call(h.fill,e.bgcolor).call(h.stroke,e.bordercolor).style("stroke-width",e.borderwidth),t.selectAll("."+T.cboutline).attr({x:j,y:H+e.ypad+("top"===A?Q:0),width:Math.max(I,2),height:Math.max(c-2*e.ypad-Q,2)}).call(h.stroke,e.outlinecolor).style({fill:"none","stroke-width":e.outlinewidth});var u=({center:.5,right:1}[e.xanchor]||0)*s;t.attr("transform","translate("+(l.l-u)+","+l.t+")");var f={},d=w[e.yanchor],g=k[e.yanchor];"pixels"===e.lenmode?(f.y=e.y,f.t=c*d,f.b=c*g):(f.t=f.b=0,f.yt=e.y+e.len*d,f.yb=e.y-e.len*g);var v=w[e.xanchor],m=k[e.xanchor];if("pixels"===e.thicknessmode)f.x=e.x,f.l=s*v,f.r=s*m;else{var y=s-I;f.l=y*v,f.r=y*m,f.xl=e.x-e.thickness*v,f.xr=e.x+e.thickness*m}i.autoMargin(r,e._id,f)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,a,i,s=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),f(t)},moveFn:function(r,o){t.attr("transform",n+" translate("+r+","+o+")"),a=l.align(e._xLeftFrac+r/s.w,e._thickFrac,0,1,e.xanchor),i=l.align(e._yBottomFrac-o/s.h,e._lenFrac,0,1,e.yanchor);var c=l.getCursor(a,i,e.xanchor,e.yanchor);f(t,c)},doneFn:function(){if(f(t),void 0!==a&&void 0!==i){var n={};n[e._propPrefix+"x"]=a,n[e._propPrefix+"y"]=i,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){i.autoMargin(t,e._id)})).remove(),e.order()}}},{"../../constants/alignment":686,"../../lib":717,"../../lib/extend":708,"../../lib/setcursor":737,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../plots/cartesian/axis_defaults":767,"../../plots/cartesian/layout_attributes":777,"../../plots/cartesian/position_defaults":780,"../../plots/plots":826,"../../registry":846,"../color":592,"../colorscale/helpers":603,"../dragelement":610,"../drawing":613,"../titles":679,"./constants":594,d3:165,tinycolor2:536}],597:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":717}],598:[function(t,e,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:t("./attributes"),supplyDefaults:t("./defaults"),draw:t("./draw").draw,hasColorbar:t("./has_colorbar")}},{"./attributes":593,"./defaults":595,"./draw":596,"./has_colorbar":597}],599:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),a=t("../../lib/regex").counter,i=t("./scales.js").scales;function o(t){return"`"+t+"`"}Object.keys(i),e.exports=function(t,e){t=t||"";var r,s=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),c="showScaleDflt"in e?e.showScaleDflt:"z"===s,u="string"==typeof e.colorscaleDflt?i[e.colorscaleDflt]:null,f=e.editTypeOverride||"",p=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):o(p+(r={z:"z",c:"color"}[s]));var h=s+"auto",d=s+"min",g=s+"max",v=s+"mid",m=(o(p+h),o(p+d),o(p+g),{});m[d]=m[g]=void 0;var y={};y[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},x[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":733,"../colorbar/attributes":593,"./scales.js":607}],600:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("./helpers").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?a.nestedProperty(e,c).get():e,f=i(u),p=!1!==f.auto,h=f.min,d=f.max,g=f.mid,v=function(){return a.aggNums(Math.min,null,l)},m=function(){return a.aggNums(Math.max,null,l)};void 0===h?h=v():p&&(h=u._colorAx&&n(h)?Math.min(h,v()):v()),void 0===d?d=m():p&&(d=u._colorAx&&n(d)?Math.max(d,m()):m()),p&&void 0!==g&&(d-g>g-h?h=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},{"../../lib":717,"./helpers":603,"fast-isnumeric":228}],601:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./helpers").hasColorscale,i=t("./helpers").extractOpts;e.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,a){var o=a.container?n.nestedProperty(t,a.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[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=t[n];r[a]=[1-i[0],i[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],609:[function(t,e,r){"use strict";var n=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,i){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":717}],610:[function(t,e,r){"use strict";var n=t("mouse-event-offset"),a=t("has-hover"),i=t("has-passive-events"),o=t("../../lib").removeElement,s=t("../../plots/cartesian/constants"),l=e.exports={};l.align=t("./align"),l.getCursor=t("./cursor");var c=t("./unhover");function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,p,h,d,g,v=t.gd,m=1,y=v._context.doubleClickDelay,x=t.element;v._mouseDownTime||(v._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(m=Math.max(m-1,1)),v._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,h),!g){var r;try{r=new MouseEvent("click",e)}catch(t){var n=f(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},l.coverSlip=u},{"../../lib":717,"../../plots/cartesian/constants":771,"./align":608,"./cursor":609,"./unhover":611,"has-hover":412,"has-passive-events":413,"mouse-event-offset":438}],611:[function(t,e,r){"use strict";var n=t("../../lib/events"),a=t("../../lib/throttle"),i=t("../../lib/dom").getGraphDiv,o=t("../fx/constants"),s=e.exports={};s.wrapped=function(t,e,r){(t=i(t))._fullLayout&&a.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/dom":706,"../../lib/events":707,"../../lib/throttle":742,"../fx/constants":625}],612:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],613:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("tinycolor2"),o=t("../../registry"),s=t("../color"),l=t("../colorscale"),c=t("../../lib"),u=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),p=t("../../constants/alignment").LINE_SPACING,h=t("../../constants/interactions").DESELECTDIM,d=t("../../traces/scatter/subtypes"),g=t("../../traces/scatter/make_bubble_size_func"),v=t("../../components/fx/helpers").appendArrayPointValue,m=e.exports={};m.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(s.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,a){t.call(m.setPosition,e,r).call(m.setSize,n,a)},m.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform","translate("+i+","+o+")"),!0)},m.translatePoints=function(t,e,r){t.each((function(t){var a=n.select(this);m.translatePoint(t,a,e,r)}))},m.hideOutsideRangePoint=function(t,e,r,n,a,i){e.attr("display",r.isPtWithinRange(t,a)&&n.isPtWithinRange(t,i)?null:"none")},m.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,a=e.yaxis;t.each((function(e){var i=e[0].trace,s=i.xcalendar,l=i.ycalendar,c=o.traceIs(i,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){m.hideOutsideRangePoint(t,n.select(this),r,a,s,l)}))}))}},m.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,a){e.style("fill","none");var i=(((t||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";s.stroke(e,n||i.color),m.dashLine(e,l,o)},m.lineGroupStyle=function(t,e,r,a){t.style("fill","none").each((function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,l=a||i.dash||"";n.select(this).call(s.stroke,r||i.color).call(m.dashLine,l,o)}))},m.dashLine=function(t,e,r){r=+r||0,e=m.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},m.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},m.fillGroupStyle=function(t){t.style("stroke-width",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(s.fill,t[0].trace.fillcolor)}))};var y=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolNoFill={},m.symbolList=[],Object.keys(y).forEach((function(t){var e=y[t],r=e.n;m.symbolList.push(r,t,r+100,t+"-open"),m.symbolNames[r]=t,m.symbolFuncs[r]=e.f,e.needLine&&(m.symbolNeedLines[r]=!0),e.noDot?m.symbolNoDot[r]=!0:m.symbolList.push(r+200,t+"-dot",r+300,t+"-open-dot"),e.noFill&&(m.symbolNoFill[r]=!0)}));var x=m.symbolNames.length;function b(t,e){var r=t%100;return m.symbolFuncs[r](e)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=m.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=x||t>=400?0:Math.floor(Math.max(t,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},k=n.format("~.1f"),T={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:_},horizontalreversed:{node:"linearGradient",attrs:_,reversed:!0},vertical:{node:"linearGradient",attrs:w},verticalreversed:{node:"linearGradient",attrs:w,reversed:!0}};m.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=T[a],p=new Array(u),h=0;h"+m(t);d._gradientUrlQueryParts[y]=1},m.initGradients=function(t){var e=t._fullLayout;c.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),e._gradientUrlQueryParts={}},m.pointStyle=function(t,e,r){if(t.size()){var a=m.makePointStyleFns(e);t.each((function(t){m.singlePointStyle(t,n.select(this),e,a,r)}))}},m.singlePointStyle=function(t,e,r,n,a){var i=r.marker,o=i.line;if(e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?i.opacity:t.mo),n.ms2mrc){var l;l="various"===t.ms||"various"===i.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&&(l=t.mrc=n.selectedSizeFn(t));var u=m.symbolNumber(t.mx||i.symbol)||0;t.om=u%200>=100,e.attr("d",b(u,l))}var f,p,h,d=!1;if(t.so)h=o.outlierwidth,p=o.outliercolor,f=i.outliercolor;else{var g=(o||{}).width;h=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(i.color)&&(f=s.defaultLine,d=!0),f="mc"in t?t.mcc=n.markerScale(t.mc):i.color||"rgba(0,0,0,0)",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,f).style({"stroke-width":(h||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:h)+"px");var v=i.gradient,y=t.mgt;if(y?d=!0:y=v&&v.type,Array.isArray(y)&&(y=y[0],T[y]||(y=0)),y&&"none"!==y){var x=t.mgc;x?d=!0:x=v.color;var _=r.uid;d&&(_+="-"+t.i),m.gradient(e,a,_,y,[[0,x],[1,f]],"fill")}else s.fill(e,f);h&&s.stroke(e,p)}},m.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=m.tryColorscale(r,""),e.lineScale=m.tryColorscale(r,"line"),o.traceIs(t,"symbols")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,m.makeSelectedPointStyleFns(t)),e},m.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},i=r.marker||{},s=n.marker||{},l=a.opacity,u=i.opacity,f=s.opacity,p=void 0!==u,d=void 0!==f;(c.isArrayOrTypedArray(l)||p||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?p?u:e:d?f:h*e});var g=a.color,v=i.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=a.size,x=i.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},m.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,c=i.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,h))},e},m.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=m.makeSelectedPointStyleFns(e),a=e.marker||{},i=[];r.selectedOpacityFn&&i.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&i.push((function(t,e){s.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&i.push((function(t,e){var n=e.mx||a.symbol||0,i=r.selectedSizeFn(e);t.attr("d",b(m.symbolNumber(n),i)),e.mrc2=i})),i.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function S(t,e,r,a){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(i*i+o*o,.25),u=Math.pow(s*s+l*l,.25),f=(u*u*i-c*c*s)*a,p=(u*u*o-c*c*l)*a,h=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(h&&f/h),2),n.round(e[1]+(h&&p/h),2)],[n.round(e[0]-(d&&f/d),2),n.round(e[1]-(d&&p/d),2)]]}m.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=m.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var o=e.texttemplate,s=r._fullLayout;t.each((function(t){var i=n.select(this),l=o?c.extractOption(t,e,"txt","texttemplate"):c.extractOption(t,e,"tx","text");if(l||0===l){if(o){var f=e._module.formatLabels?e._module.formatLabels(t,e,s):{},p={};v(p,e,t.i);var h=e._meta||{};l=c.texttemplateString(l,f,s._d3locale,p,t,h)}var d=t.tp||e.textposition,g=E(t,e),y=a?a(t):t.tc||e.textfont.color;i.call(m.font,t.tf||e.textfont.family,g,y).text(l).call(u.convertToTspans,r).call(M,d,g,t.mrc)}else i.remove()}))}},m.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=m.makeSelectedTextStyleFns(e);t.each((function(t){var a=n.select(this),i=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=E(t,e);s.fill(a,i),M(a,o,l,t.mrc2||t.mrc)}))}},m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(m.savedBBoxes={},O=0),r&&(m.savedBBoxes[r]=v),O++,c.extendFlat({},v)},m.setClipUrl=function(t,e,r){t.attr("clip-path",I(e,r))},m.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=" translate("+e+", "+r+")").trim(),t[a]("transform",i),i},m.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+=" scale("+e+", "+r+")").trim(),t[a]("transform",i),i};var D=/\s*sc.*/;m.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":" scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(D,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var z=/translate\([^)]*\)\s*$/;m.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,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);t=1===e&&1===r?[]:["translate("+o+","+s+")","scale("+e+","+r+")","translate("+-o+","+-s+")"],l&&t.push(l),a.attr("transform",t.join(" "))}}))}},{"../../components/fx/helpers":627,"../../constants/alignment":686,"../../constants/interactions":692,"../../constants/xmlns_namespaces":694,"../../lib":717,"../../lib/svg_text_utils":741,"../../registry":846,"../../traces/scatter/make_bubble_size_func":1137,"../../traces/scatter/subtypes":1144,"../color":592,"../colorscale":604,"./symbol_defs":614,d3:165,"fast-isnumeric":228,tinycolor2:536}],614:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,a="l"+e+",-"+e,i="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+a+i+a+i+o+i+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),a=n.round(-t,2),i=n.round(-.309*t,2);return"M"+e+","+i+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+e+"L-"+a+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+e+",0L"+r+",-"+a+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),a=n.round(.951*e,2),i=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return"M"+r+","+l+"H"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+n.round(.382*e,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),a=n.round(.76*t,2);return"M-"+a+",0l-"+r+",-"+e+"h"+a+"l"+r+",-"+e+"l"+r+","+e+"h"+a+"l-"+r+","+e+"l"+r+","+e+"h-"+a+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+a+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+a+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:165}],615:[function(t,e,r){"use strict";e.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"}}}},{}],616:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../registry"),i=t("../../plots/cartesian/axes"),o=t("../../lib"),s=t("./compute_error");function l(t,e,r,a){var l=e["error_"+a]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,p=e[0].trace,h=p.error_x||{},d=p.error_y||{};p.ids&&(f=function(t){return t.id});var g=o.hasMarkers(p)&&p.marker.maxdisplayed>0;d.visible||h.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,f);if(v.exit().remove(),e.length){h.visible||v.selectAll("path.xerror").remove(),d.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var m=v.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),a(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!g||t.vis){var i,o=e.select("path.yerror");if(d.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var f=d.width;i="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(i+="m-"+f+",0h"+2*f),o.size()?u&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var p=e.select("path.xerror");if(h.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var v=(h.copy_ystyle?d:h).width;i="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(i+="m0,-"+v+"v"+2*v),p.size()?u&&(p=p.transition().duration(s.duration).ease(s.easing)):p=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),p.attr("d",i)}else p.remove()}}))}}))}},{"../../traces/scatter/subtypes":1144,"../drawing":613,d3:165,"fast-isnumeric":228}],621:[function(t,e,r){"use strict";var n=t("d3"),a=t("../color");e.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},i=e.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":592,d3:165}],622:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("./layout_attributes").hoverlabel,i=t("../../lib/extend").extendFlat;e.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":708,"../../plots/font_attributes":791,"./layout_attributes":631}],623:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry");function i(t,e,r,a){a=a||n.identity,Array.isArray(t)&&(e[0][r]=a(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s=0&&r.index_[0]._length||Q<0||Q>w[0]._length)return p.unhoverRaw(t,e)}else $="xpx"in e?e.xpx:_[0]._length/2,Q="ypx"in e?e.ypx:w[0]._length/2;if(e.pointerX=$+_[0]._offset,e.pointerY=Q+w[0]._offset,I="xval"in e?g.flat(l,e.xval):g.p2c(_,$),D="yval"in e?g.flat(l,e.yval):g.p2c(w,Q),!a(I[0])||!a(D[0]))return o.warn("Fx.hover failed",e,t),p.unhoverRaw(t,e)}var et=1/0;for(R=0;RG&&(X.splice(0,G),et=X[0].distance),m&&0!==Y&&0===X.length){H.distance=Y,H.index=!1;var ot=B._module.hoverPoints(H,U,q,"closest",u._hoverlayer);if(ot&&(ot=ot.filter((function(t){return t.spikeDistance<=Y}))),ot&&ot.length){var st,lt=ot.filter((function(t){return t.xa.showspikes}));if(lt.length){var ct=lt[0];a(ct.x0)&&a(ct.y0)&&(st=ht(ct),(!J.vLinePoint||J.vLinePoint.spikeDistance>st.spikeDistance)&&(J.vLinePoint=st))}var ut=ot.filter((function(t){return t.ya.showspikes}));if(ut.length){var ft=ut[0];a(ft.x0)&&a(ft.y0)&&(st=ht(ft),(!J.hLinePoint||J.hLinePoint.spikeDistance>st.spikeDistance)&&(J.hLinePoint=st))}}}}function pt(t,e){for(var r,n=null,a=1/0,i=0;i1||X.length>1)||"closest"===P&&K&&X.length>1,Mt=f.combine(u.plot_bgcolor||f.background,u.paper_bgcolor),Et={hovermode:P,rotateLabels:At,bgColor:Mt,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},St=A(X,Et,t);if(function(t,e,r){var n,a,i,o,s,l,c,u=0,f=1,p=t.size(),h=new Array(p),d=0;function g(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,i=r.pos+r.dp+r.size-e.pmax,a>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=i;n=!1}if(n){var c=0;for(o=0;oe.pmax&&c++;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,c--);for(o=0;o=0;s--)t[s].dp-=i;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}for(t.each((function(t){var n=t[e],a="x"===n._id.charAt(0),i=n.range;0===d&&i&&i[0]>i[1]!==a&&(f=-1),h[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?x:1)/2,pmin:0,pmax:a?r.width:r.height}]})),h.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));!n&&u<=p;){for(u++,n=!0,o=0;o.01&&y.pmin===b.pmin&&y.pmax===b.pmax){for(s=m.length-1;s>=0;s--)m[s].dp+=a;for(v.push.apply(v,m),h.splice(o+1,1),c=0,s=v.length-1;s>=0;s--)c+=v[s].dp;for(i=c/v.length,s=v.length-1;s>=0;s--)v[s].dp-=i;n=!1}else o++}h.forEach(g)}for(o=h.length-1;o>=0;o--){var _=h[o];for(s=_.length-1;s>=0;s--){var w=_[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(St,At?"xa":"ya",u),M(St,At),e.target&&e.target.tagName){var Ct=d.getComponentMethod("annotations","hasClickToShow")(t,_t);c(n.select(e.target),Ct?"pointer":"")}e.target&&!i&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=t._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(t,0,bt)&&(bt&&t.emit("plotly_unhover",{event:e,points:bt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:I,yvals:D}))}(t,e,r,i)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var a=t.map((function(t){return{color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,eventData:t.eventData||!1,hovertemplateLabels:t.hovertemplateLabels||!1}})),i=n.select(e.container),o=e.outerContainer?n.select(e.outerContainer):i,s={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||f.background,container:i,outerContainer:o},l=A(a,s,e.gd),c=0,u=0;return l.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function A(t,e,r){var a=r._fullLayout,i=e.hovermode,s=e.rotateLabels,c=e.bgColor,p=e.container,h=e.outerContainer,d=e.commonLabelOpts||{},g=e.fontFamily||v.HOVERFONT,y=e.fontSize||v.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,A="y"===i?"yLabel":"xLabel",M=x[A],E=(String(M)||"").split(" ")[0],S=h.node().getBoundingClientRect(),C=S.top,O=S.width,P=S.height,I=void 0!==M&&x.distance<=e.hoverdistance&&("x"===i||"y"===i);if(I){var D,z,R=!0;for(D=0;Da.width-P?(T=a.width-P,s.attr("d","M"+(P-w)+",0L"+P+","+O+w+"v"+O+(2*k+L.height)+"H-"+P+"V"+O+w+"H"+(P-2*w)+"Z")):s.attr("d","M0,0L"+w+","+O+w+"H"+(k+L.width/2)+"v"+O+(2*k+L.height)+"H-"+(k+L.width/2)+"V"+O+w+"H-"+w+"Z")}else{var I,D,z;"right"===_.side?(I="start",D=1,z="",T=b._offset+b._length):(I="end",D=-1,z="-",T=b._offset),S=_._offset+(x.y0+x.y1)/2,c.attr("text-anchor",I),s.attr("d","M0,0L"+z+w+","+w+"V"+(k+L.height/2)+"h"+z+(2*k+L.width)+"V-"+(k+L.height/2)+"H"+z+w+"V-"+w+"Z");var R,F=L.height/2,B=C-L.top-F,N="clip"+a._uid+"commonlabel"+_._id;if(T"),void 0!==t.yLabel&&(h+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(h+=(h?"z: ":"")+t.zLabel)):I&&t[i+"Label"]===M?h=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(h=t.yLabel):h=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(h+=(h?"
":"")+t.text),void 0!==t.extraText&&(h+=(h?"
":"")+t.extraText),""!==h||t.hovertemplate||(""===p&&e.remove(),h=p);var _=a._d3locale,A=t.hovertemplate||!1,E=t.hovertemplateLabels||t,S=t.eventData[0]||{};A&&(h=(h=o.hovertemplateString(A,E,_,S,t.trace._meta)).replace(T,(function(e,r){return p=L(r,t.nameLength),""})));var D=e.select("text.nums").call(u.font,t.fontFamily||g,t.fontSize||y,t.fontColor||b).text(h).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),z=e.select("text.name"),R=0,F=0;if(p&&p!==h){z.call(u.font,t.fontFamily||g,t.fontSize||y,x).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var B=z.node().getBoundingClientRect();R=B.width+2*k,F=B.height+2*k}else z.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:b});var N,j,V=D.node().getBoundingClientRect(),U=t.xa._offset+(t.x0+t.x1)/2,q=t.ya._offset+(t.y0+t.y1)/2,H=Math.abs(t.x1-t.x0),G=Math.abs(t.y1-t.y0),W=V.width+w+k+R;if(t.ty0=C-V.top,t.bx=V.width+2*k,t.by=Math.max(V.height+2*k,F),t.anchor="start",t.txwidth=V.width,t.tx2width=R,t.offset=0,s)t.pos=U,N=q+G/2+W<=P,j=q-G/2-W>=0,"top"!==t.idealAlign&&N||!j?N?(q+=G/2,t.anchor="start"):t.anchor="middle":(q-=G/2,t.anchor="end");else if(t.pos=q,N=U+H/2+W<=O,j=U-H/2-W>=0,"left"!==t.idealAlign&&N||!j)if(N)U+=H/2,t.anchor="start";else{t.anchor="middle";var Y=W/2,X=U+Y-O,Z=U-Y;X>0&&(U-=X),Z<0&&(U+=-Z)}else U-=H/2,t.anchor="end";D.attr("text-anchor",t.anchor),R&&z.attr("text-anchor",t.anchor),e.attr("transform","translate("+U+","+q+")"+(s?"rotate("+m+")":""))})),N}function M(t,e){t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var a=r.select("text.nums"),i=t.anchor,o="end"===i?-1:1,s={start:1,end:-1,middle:0}[i],c=s*(w+k),f=c+s*(t.txwidth+k),p=0,h=t.offset;"middle"===i&&(c-=t.tx2width/2,f+=t.txwidth/2+k),e&&(h*=-_,p=t.offset*b),r.select("path").attr("d","middle"===i?"M-"+(t.bx/2+t.tx2width/2)+","+(h-t.by/2)+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(o*w+p)+","+(w+h)+"v"+(t.by/2-w)+"h"+o*t.bx+"v-"+t.by+"H"+(o*w+p)+"V"+(h-w)+"Z");var d=c+p,g=h+t.ty0-t.by/2+k,v=t.textAlign||"auto";"auto"!==v&&("left"===v&&"start"!==i?(a.attr("text-anchor","start"),d="middle"===i?-t.bx/2-t.tx2width/2+k:-t.bx-k):"right"===v&&"end"!==i&&(a.attr("text-anchor","end"),d="middle"===i?t.bx/2-t.tx2width/2-k:t.bx+k)),a.call(l.positionText,d,g),t.tx2width&&(r.select("text.name").call(l.positionText,f+s*k+p,h+t.ty0-t.by/2+k),r.select("rect").call(u.setRect,f+(s-1)*t.tx2width/2+p,h-t.by/2-1,t.tx2width,t.by+2))}))}function E(t,e){var r=t.index,n=t.trace||{},i=t.cd[0],s=t.cd[r]||{};function l(t){return t||a(t)&&0===t}var c=Array.isArray(r)?function(t,e){var a=o.castOption(i,r,t);return l(a)?a:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var a=c(r,n);l(a)&&(t[e]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:h.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:h.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=h.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+h.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var p=h.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+p+" / -"+h.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+p,"y"===e&&(t.distance+=1)}var d=t.hoverinfo||t.trace.hoverinfo;return d&&"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===d.indexOf("y")&&(t.yLabel=void 0),-1===d.indexOf("z")&&(t.zLabel=void 0),-1===d.indexOf("text")&&(t.text=void 0),-1===d.indexOf("name")&&(t.name=void 0)),t}function S(t,e,r){var n,a,o=r.container,s=r.fullLayout,l=s._size,c=r.event,p=!!e.hLinePoint,d=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),d||p){var g=f.combine(s.plot_bgcolor,s.paper_bgcolor);if(p){var v,m,y=e.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(v=c.pointerX,m=c.pointerY):(v=n._offset+y.x,m=a._offset+y.y);var x,b,_=i.readability(y.color,g)<1.5?f.contrast(g):y.color,w=a.spikemode,k=a.spikethickness,T=a.spikecolor||_,A=h.getPxPosition(t,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=v),-1!==w.indexOf("across")){var M=a._counterDomainMin,E=a._counterDomainMax;"free"===a.anchor&&(M=Math.min(M,a.position),E=Math.max(E,a.position)),x=l.l+M*l.w,b=l.l+E*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k,stroke:T,"stroke-dasharray":u.dashStyle(a.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k+2,stroke:g}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==a.side?k:-k),cy:m,r:k,fill:T}).classed("spikeline",!0)}if(d){var S,C,L=e.vLinePoint;n=L&&L.xa,a=L&&L.ya,"cursor"===n.spikesnap?(S=c.pointerX,C=c.pointerY):(S=n._offset+L.x,C=a._offset+L.y);var O,P,I=i.readability(L.color,g)<1.5?f.contrast(g):L.color,D=n.spikemode,z=n.spikethickness,R=n.spikecolor||I,F=h.getPxPosition(t,n);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(O=F,P=C),-1!==D.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),O=l.t+(1-N)*l.h,P=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z,stroke:R,"stroke-dasharray":u.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z+2,stroke:g}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==n.side?z:-z),r:z,fill:R}).classed("spikeline",!0)}}}function C(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function L(t,e){return l.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}},{"../../lib":717,"../../lib/events":707,"../../lib/override_cursor":728,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../registry":846,"../color":592,"../dragelement":610,"../drawing":613,"./constants":625,"./helpers":627,d3:165,"fast-isnumeric":228,tinycolor2:536}],629:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,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":717}],630:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../dragelement"),o=t("./helpers"),s=t("./layout_attributes"),l=t("./hover");e.exports={moduleType:"component",name:"fx",constants:t("./constants"),schema:{layout:s},attributes:t("./attributes"),layoutAttributes:s,supplyLayoutGlobalDefaults:t("./layout_global_defaults"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return a.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return a.castOption(t,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:i.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=a.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:t("./click")}},{"../../lib":717,"../dragelement":610,"./attributes":622,"./calc":623,"./click":624,"./constants":625,"./defaults":626,"./helpers":627,"./hover":628,"./layout_attributes":631,"./layout_defaults":632,"./layout_global_defaults":633,d3:165}],631:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../plots/font_attributes")({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,e.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":791,"./constants":625}],632:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}var o,s=i("clickmode");"select"===i("dragmode")&&i("selectdirection"),e._has("cartesian")?s.indexOf("select")>-1?o="closest":(e._isHoriz=function(t,e){for(var r=e._scatterStackOpts||{},n=0;n1){p||h||d||"independent"===T("pattern")&&(p=!0),v._hasSubplotGrid=p;var x,b,_="top to bottom"===T("roworder"),w=p?.2:.1,k=p?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u("x",T,w,x,y),y:u("y",T,k,b,m,_)}}else delete e.grid}function T(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,a,i,o,s,l,u,p=t.grid||{},h=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m="independent"===r.pattern,y=r._axisMap={};if(d){var x=p.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1!==g||c.uirevision){var v=i.newContainer(e,"legend");if(_("uirevision",e.uirevision),!1!==g){_("bgcolor",e.paper_bgcolor),_("bordercolor"),_("borderwidth"),a.coerceFont(_,"font",e.font);var m,y,x,b=_("orientation");"h"===b?(m=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(y=1.1,x="bottom"):(y=-.1,x="top")):(m=1.02,y=1,x="auto"),_("traceorder",p),l.isGrouped(e.legend)&&_("tracegroupgap"),_("itemsizing"),_("itemclick"),_("itemdoubleclick"),_("x",m),_("xanchor"),_("y",y),_("yanchor",x),_("valign"),a.noneOrAll(c,v,["x","y"]),_("title.text")&&(_("title.side","h"===b?"left":"top"),a.coerceFont(_,"title.font",e.font))}}function _(t,e){return a.coerce(c,v,o,t,e)}}},{"../../lib":717,"../../plot_api/plot_template":755,"../../plots/layout_attributes":817,"../../registry":846,"./attributes":640,"./helpers":646}],643:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),f=t("../../lib/svg_text_utils"),p=t("./handle_click"),h=t("./constants"),d=t("../../constants/alignment"),g=d.LINE_SPACING,v=d.FROM_TL,m=d.FROM_BR,y=t("./get_legend_data"),x=t("./style"),b=t("./helpers");function _(t,e,r,n,a){var i=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};i._group&&(l.group=i._group),o.traceIs(i,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l)&&(1===n?e._clickTimeout=setTimeout((function(){p(r,t,n)}),t._context.doubleClickDelay):2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&p(r,t,n)))}function w(t,e){var r=t.data()[0][0],n=e._fullLayout.legend,i=r.trace,s=o.traceIs(i,"pie-like"),l=i.index,u=e._context.edits.legendText&&!s,p=n._maxNameLength,d=s?r.label:i.name;i._meta&&(d=a.templateString(d,i._meta));var g=a.ensureSingle(t,"text","legendtext");g.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,n.font).text(u?k(d,p):d),f.positionText(g,h.textGap,0),u?g.call(f.makeEditable,{gd:e,text:d}).call(A,t,e).on("edit",(function(n){this.text(k(n,p)).call(A,t,e);var i=r.trace._fullInput||{},s={};if(o.hasTransform(i,"groupby")){var c=o.getTransformIndices(i,"groupby"),u=c[c.length-1],f=a.keyedContainer(i,"transforms["+u+"].styles","target","value.name");f.set(r.trace._group,n),s=f.constructUpdate()}else s.name=n;return o.call("_guiRestyle",e,s,l)})):A(g,t,e)}function k(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function T(t,e){var r,i=e._context.doubleClickDelay,o=1,s=a.ensureSingle(t,"rect","legendtoggle",(function(t){t.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")}));s.on("mousedown",(function(){(r=(new Date).getTime())-e._legendMouseDownTimei&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}}))}function A(t,e,r){f.convertToTspans(t,r,(function(){!function(t,e){var r=t.data()[0][0];if(!r||r.trace.showlegend){var n,a,i=t.select("g[class*=math-group]"),o=i.node(),s=e._fullLayout.legend.borderwidth,l=e._fullLayout.legend,u=(r?l:l.title).font.size*g;if(o){var p=c.bBox(o);n=p.height,a=p.width,r?c.setTranslate(i,0,.25*n):c.setTranslate(i,s,.75*n+s)}else{var d=t.select(r?".legendtext":".legendtitletext"),v=f.lineCount(d),m=d.node();n=u*v,a=m?c.bBox(m).width:0;var y=u*((v-1)/2-.3);r?f.positionText(d,h.textGap,-y):f.positionText(d,h.titlePad+s,u+s)}r?(r.lineHeight=u,r.height=Math.max(n,16)+3,r.width=a):(l._titleWidth=a,l._titleHeight=n)}else t.remove()}(e,r)}))}function M(t){return a.isRightAnchor(t)?"right":a.isCenterAnchor(t)?"center":"left"}function E(t){return a.isBottomAnchor(t)?"bottom":a.isMiddleAnchor(t)?"middle":"top"}e.exports=function(t){var e=t._fullLayout,r="legend"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,f=e.showlegend&&y(t.calcdata,s),p=e.hiddenlabels||[];if(!e.showlegend||!f.length)return e._infolayer.selectAll(".legend").remove(),e._topdefs.select("#"+r).remove(),i.autoMargin(t,"legend");var d=a.ensureSingle(e._infolayer,"g","legend",(function(t){t.attr("pointer-events","all")})),g=a.ensureSingleById(e._topdefs,"clipPath",r,(function(t){t.append("rect")})),k=a.ensureSingle(d,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));k.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style("stroke-width",s.borderwidth+"px");var S=a.ensureSingle(d,"g","scrollbox"),C=s.title;if(s._titleWidth=0,s._titleHeight=0,C.text){var L=a.ensureSingle(S,"text","legendtitletext");L.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,C.font).text(C.text),A(L,S,t)}var O=a.ensureSingle(d,"rect","scrollbar",(function(t){t.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),P=S.selectAll("g.groups").data(f);P.enter().append("g").attr("class","groups"),P.exit().remove();var I=P.selectAll("g.traces").data(a.identity);I.enter().append("g").attr("class","traces"),I.exit().remove(),I.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==p.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(w,t)})).call(x,t).each((function(){n.select(this).call(T,t)})),a.syncOrAsync([i.previousPromises,function(){return function(t,e,r){var a=t._fullLayout,i=a.legend,o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,p=h.textGap,d=h.itemGap,g=2*(u+d),v=E(i),m=i.y<0||0===i.y&&"top"===v,y=i.y>1||1===i.y&&"bottom"===v;i._maxHeight=Math.max(m||y?a.height/2:o.h,30);var x=0;i._width=0,i._height=0;var _=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+_[0],u+_[1]+i._height+e/2+d),i._height+=e,i._width=Math.max(i._width,t[0].width)})),x=p+i._width,i._width+=d+p+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var w=M(i),k=i.x<0||0===i.x&&"right"===w,T=i.x>1||1===i.x&&"left"===w,A=y||m,S=a.width/2;i._maxWidth=Math.max(k?A&&"left"===w?o.l+o.w:S:T?A&&"right"===w?o.r+o.w:S:o.w,2*p);var C=0,L=0;r.each((function(t){var e=t[0].width+p;C=Math.max(C,e),L+=e})),x=null;var O=0;if(l){var P=0,I=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=r[0].height;c.setTranslate(this,_[0],_[1]+u+d+n/2+e),e+=n,t=Math.max(t,p+r[0].width)})),P=Math.max(P,e);var r=t+d;r+u+I>i._maxWidth&&(O=Math.max(O,I),I=0,D+=P+i.tracegroupgap,P=e),c.setTranslate(this,I,D),I+=r})),i._width=Math.max(O,I)+u,i._height=D+P+g}else{var z=r.size(),R=L+f+(z-1)*di._maxWidth&&(O=Math.max(O,j),B=0,N+=F,i._height+=F,F=0),c.setTranslate(this,_[0]+u+B,_[1]+u+N+e/2+d),j=B+r+d,B+=n,F=Math.max(F,e)})),R?(i._width=B+f,i._height=F+g):(i._width=Math.max(O,j)+f,i._height+=F+g)}}i._width=Math.ceil(Math.max(i._width+_[0],i._titleWidth+2*(u+h.titlePad))),i._height=Math.ceil(Math.max(i._height+_[1],i._titleHeight+2*(u+h.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,U=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,a=U?p:x||p+t[0].width;s||(a+=d/2),c.setRect(e,0,-r/2,a,r)}))}(t,P,I)},function(){if(!function(t){var e=t._fullLayout.legend,r=M(e),n=E(e);return i.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*v[r],r:e._width*m[r],b:e._effHeight*m[n],t:e._effHeight*v[n]})}(t)){var u,f,p,y,x=e._size,b=s.borderwidth,w=x.l+x.w*s.x-v[M(s)]*s._width,T=x.t+x.h*(1-s.y)-v[E(s)]*s._effHeight;if(e.margin.autoexpand){var A=w,C=T;w=a.constrain(w,0,e.width-s._width),T=a.constrain(T,0,e.height-s._effHeight),w!==A&&a.log("Constrain legend.x to make legend fit inside graph"),T!==C&&a.log("Constrain legend.y to make legend fit inside graph")}if(c.setTranslate(d,w,T),O.on(".drag",null),d.on("wheel",null),s._height<=s._maxHeight||t._context.staticPlot)k.attr({width:s._width-b,height:s._effHeight-b,x:b/2,y:b/2}),c.setTranslate(S,0,0),g.select("rect").attr({width:s._width-2*b,height:s._effHeight-2*b,x:b,y:b}),c.setClipUrl(S,r,t),c.setRect(O,0,0,0,0),delete s._scrollY;else{var L,P,I,D=Math.max(h.scrollBarMinHeight,s._effHeight*s._effHeight/s._height),z=s._effHeight-D-2*h.scrollBarMargin,R=s._height-s._effHeight,F=z/R,B=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}),g.select("rect").attr({width:s._width-2*b+h.scrollBarWidth+h.scrollBarMargin,height:s._effHeight-2*b,x:b,y:b+B}),c.setClipUrl(S,r,t),V(B,D,F),d.on("wheel",(function(){V(B=a.constrain(s._scrollY+n.event.deltaY/z*R,0,R),D,F),0!==B&&B!==R&&n.event.preventDefault()}));var N=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;L="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,I=B})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(P="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,V(B=function(t,e,r){var n=(r-e)/F+t;return a.constrain(n,0,R)}(I,L,P),D,F))}));O.call(N);var j=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(L=t.changedTouches[0].clientY,I=B)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(P=t.changedTouches[0].clientY,V(B=function(t,e,r){var n=(e-r)/F+t;return a.constrain(n,0,R)}(I,L,P),D,F))}));S.call(j)}t._context.edits.legendPosition&&(d.classed("cursor-move",!0),l.init({element:d.node(),gd:t,prepFn:function(){var t=c.getTranslate(d);p=t.x,y=t.y},moveFn:function(t,e){var r=p+t,n=y+e;c.setTranslate(d,r,n),u=l.align(r,0,x.l,x.l+x.w,s.xanchor),f=l.align(n,0,x.t+x.h,x.t,s.yanchor)},doneFn:function(){void 0!==u&&void 0!==f&&o.call("_guiRelayout",t,{"legend.x":u,"legend.y":f})},clickFn:function(r,n){var a=e._infolayer.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom}));a.size()>0&&_(t,d,a,r,n)}}))}function V(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(S,0,-e),c.setRect(O,s._width,h.scrollBarMargin+e*n,h.scrollBarWidth,r),g.select("rect").attr("y",b+e)}}],t)}}},{"../../constants/alignment":686,"../../lib":717,"../../lib/events":707,"../../lib/svg_text_utils":741,"../../plots/plots":826,"../../registry":846,"../color":592,"../dragelement":610,"../drawing":613,"./constants":641,"./get_legend_data":644,"./handle_click":645,"./helpers":646,"./style":648,d3:165}],644:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("./helpers");e.exports=function(t,e){var r,i,o={},s=[],l=!1,c={},u=0,f=0;function p(t,r){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r0))return 0;a=e.width}return h?n:Math.min(a,r)};function g(t,e,r){var i=t[0].trace,o=i.marker||{},l=o.line||{},c=r?i.visible&&i.type===r:a.traceIs(i,"bar"),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(c?[t]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.each((function(t){var e=n.select(this),r=t[0],a=d(r.mlw,o.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.mc||o.color),a&&s.stroke(e,r.mlc||l.color)}))}function v(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:a.traceIs(s,r),c=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),c.exit().remove(),c.size()){var p=(s.marker||{}).line,h=d(f(p.width,o.pts),p,5,2),g=i.minExtend(s,{marker:{line:{width:h}}});g.marker.line.color=p.color;var v=i.minExtend(o,{trace:g});u(c,v,g)}}t.each((function(t){var e=n.select(this),a=i.ensureSingle(e,"g","layers");a.style("opacity",t[0].trace.opacity);var o=r.valign,s=t[0].lineHeight,l=t[0].height;if("middle"!==o&&s&&l){var c={top:1,bottom:-1}[o]*(.5*(s-l+3));a.attr("transform","translate(0,"+c+")")}else a.attr("transform",null);a.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var u=a.selectAll("g.legendsymbols").data([t]);u.enter().append("g").classed("legendsymbols",!0),u.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,a=t[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":c=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":c=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":c=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":c=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,c){var u,f=n.select(this),h=l(a),d=h.colorscale,g=h.reversescale;if(d){if(!r){var v=d.length;u=0===c?d[g?v-1:0][1]:1===c?d[g?0:v-1][1]:d[Math.floor((v-1)/2)][1]}}else{var m=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(m)?m[c]||m[0]:m}f.attr("d",t[0]),u?f.call(s.fill,u):f.call((function(t){if(t.size()){var n="legendfill-"+a.uid;o.gradient(t,e,n,p(g,"radial"===r),d,"fill")}}))}))})).each((function(t){var e=t[0].trace,r=[];e.visible&&"waterfall"===e.type&&(r=t[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(t){var r=n.select(this),a=e[t[0]].marker,i=d(void 0,a.line,5,2);r.attr("d",t[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(t){g(t,this,"funnel")})).each((function(t){g(t,this)})).each((function(t){var r=t[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[t]:[]);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 t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=d(void 0,r.line,5,2);t.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(t,r.line.color)}else{var c=i.minExtend(r,{marker:{size:h?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,e)}}))})).each((function(t){v(t,this,"funnelarea")})).each((function(t){v(t,this,"pie")})).each((function(t){var r,a,s=t[0],u=s.trace,f=u.visible&&u.fill&&"none"!==u.fill,h=c.hasLines(u),g=u.contours,v=!1,m=!1,y=l(u),x=y.colorscale,b=y.reversescale;if(g){var _=g.coloring;"lines"===_?v=!0:h="none"===_||"heatmap"===_||g.showlines,"constraint"===g.type?f="="!==g._operation:"fill"!==_&&"heatmap"!==_||(m=!0)}var w=c.hasMarkers(u)||c.hasText(u),k=f||m,T=h||v,A=w||!k?"M5,0":T?"M5,-2":"M5,-3",M=n.select(this),E=M.select(".legendfill").selectAll("path").data(f||m?[t]:[]);if(E.enter().append("path").classed("js-fill",!0),E.exit().remove(),E.attr("d",A+"h30v6h-30z").call(f?o.fillGroupStyle:function(t){if(t.size()){var r="legendfill-"+u.uid;o.gradient(t,e,r,p(b),x,"fill")}}),h||v){var S=d(void 0,u.line,10,5);a=i.minExtend(u,{line:{width:S}}),r=[i.minExtend(s,{trace:a})]}var C=M.select(".legendlines").selectAll("path").data(h||v?[r]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(v?"l30,0.0001":"h30")).call(h?o.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+u.uid;o.lineGroupStyle(t),o.gradient(t,e,r,p(b),x,"stroke")}})})).each((function(t){var r,a,s=t[0],l=s.trace,u=c.hasMarkers(l),f=c.hasText(l),p=c.hasLines(l);function d(t,e,r,n){var a=i.nestedProperty(l,t).get(),o=i.isArrayOrTypedArray(a)&&e?e(a):a;if(h&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function g(t){return t[0]}if(u||f||p){var v={},m={};if(u){v.mc=d("marker.color",g),v.mx=d("marker.symbol",g),v.mo=d("marker.opacity",i.mean,[.2,1]),v.mlc=d("marker.line.color",g),v.mlw=d("marker.line.width",i.mean,[0,5],2),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var y=d("marker.size",i.mean,[2,16],12);v.ms=y,m.marker.size=y}p&&(m.line={width:d("line.width",g,[0,10],5)}),f&&(v.tx="Aa",v.tp=d("textposition",g),v.ts=10,v.tc=d("textfont.color",g),v.tf=d("textfont.family",g)),r=[i.minExtend(s,v)],(a=i.minExtend(l,m)).selectedpoints=null,a.texttemplate=null}var x=n.select(this).select("g.legendpoints"),b=x.selectAll("path.scatterpts").data(u?r:[]);b.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),b.exit().remove(),b.call(o.pointStyle,a,e),u&&(r[0].mrc=3);var _=x.selectAll("g.pointtext").data(f?r:[]);_.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),_.exit().remove(),_.selectAll("text").call(o.textPointStyle,a,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"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(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],o=d(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],l=d(void 0,i.line,5,2);a.style("fill","none").call(o.dashLine,i.line.dash,l),l&&s.stroke(a,i.line.color)}))}))}},{"../../lib":717,"../../registry":846,"../../traces/pie/helpers":1099,"../../traces/pie/style_one":1105,"../../traces/scatter/subtypes":1144,"../color":592,"../colorscale/helpers":603,"../drawing":613,d3:165}],649:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/plots"),i=t("../../plots/cartesian/axis_ids"),o=t("../../lib"),s=t("../../fonts/ploticon"),l=o._,c=e.exports={};function u(t,e){var r,a,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},f=i.list(t,null,!0),p=c._cartesianSpikesEnabled;if("zoom"===s){var h,d="in"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(a=0;a1?(A=["toggleHover"],M=["resetViews"]):p?(T=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],M=["resetGeo"]):f?(A=["hoverClosest3d"],M=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(T=["zoomInMapbox","zoomOutMapbox"],A=["toggleHover"],M=["resetViewMapbox"]):g?A=["hoverClosestGl2d"]:h?A=["hoverClosestPie"]:x?(A=["hoverClosestCartesian","hoverCompareCartesian"],M=["resetViewSankey"]):A=["toggleHover"],u&&(A=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),function(t){for(var e=0;e0)){var g=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),a=0,i=0;i0?p+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,a){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,f,p=1/0,h=-1/0,d=n.match(i.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lh&&(h=f)));return h>=p?[p,h]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o10?t/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:I?V(r.xanchor)+r.x0:V(r.x0),cy:D?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:I?V(r.xanchor)+r.x1:V(r.x1),cy:D?U(r.yanchor)-r.y1:U(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():e,W={element:G.node(),gd:t,prepFn:function(n){I&&(_=V(r.xanchor)),D&&(w=U(r.yanchor)),"path"===r.type?O=r.path:(m=I?r.x0:V(r.x0),y=D?r.y0:U(r.y0),x=I?r.x1:V(r.x1),b=D?r.y1:U(r.y1)),mb?(k=y,E="y0",T=b,S="y1"):(k=b,E="y1",T=y,S="y0"),Y(n),J(h,r),function(t,e,r){var n=e.xref,a=e.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),c="";"paper"===n||o.autorange||(c+=n),"paper"===a||l.autorange||(c+=a),s.setClipUrl(t,c?"clip"+r._fullLayout._uid+c:null,r)}(e,r,t),W.moveFn="move"===P?X:Z},doneFn:function(){u(e),K(h),d(e,t,r),n.call("_guiRelayout",t,F.getUpdateObj())},clickFn:function(){K(h)}};function Y(t){if(z)P="path"===t.target.tagName?"move":"start-point"===t.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=W.element.getBoundingClientRect(),n=r.right-r.left,a=r.bottom-r.top,i=t.clientX-r.left,o=t.clientY-r.top,s=!R&&n>10&&a>10&&!t.shiftKey?c.getCursor(i/n,1-o/a):"move";u(e,s),P=s.split("-")[0]}}function X(n,a){if("path"===r.type){var i=function(t){return t},o=i,s=i;I?B("xanchor",r.xanchor=q(_+n)):(o=function(t){return q(V(t)+n)},N&&"date"===N.type&&(o=p.encodeDate(o))),D?B("yanchor",r.yanchor=H(w+a)):(s=function(t){return H(U(t)+a)},j&&"date"===j.type&&(s=p.encodeDate(s))),B("path",r.path=v(O,o,s))}else I?B("xanchor",r.xanchor=q(_+n)):(B("x0",r.x0=q(m+n)),B("x1",r.x1=q(x+n))),D?B("yanchor",r.yanchor=H(w+a)):(B("y0",r.y0=H(y+a)),B("y1",r.y1=H(b+a)));e.attr("d",g(t,r)),J(h,r)}function Z(n,a){if(R){var i=function(t){return t},o=i,s=i;I?B("xanchor",r.xanchor=q(_+n)):(o=function(t){return q(V(t)+n)},N&&"date"===N.type&&(o=p.encodeDate(o))),D?B("yanchor",r.yanchor=H(w+a)):(s=function(t){return H(U(t)+a)},j&&"date"===j.type&&(s=p.encodeDate(s))),B("path",r.path=v(O,o,s))}else if(z){if("resize-over-start-point"===P){var l=m+n,c=D?y-a:y+a;B("x0",r.x0=I?l:q(l)),B("y0",r.y0=D?c:H(c))}else if("resize-over-end-point"===P){var u=x+n,f=D?b-a:b+a;B("x1",r.x1=I?u:q(u)),B("y1",r.y1=D?f:H(f))}}else{var d=~P.indexOf("n")?k+a:k,F=~P.indexOf("s")?T+a:T,G=~P.indexOf("w")?A+n:A,W=~P.indexOf("e")?M+n:M;~P.indexOf("n")&&D&&(d=k-a),~P.indexOf("s")&&D&&(F=T-a),(!D&&F-d>10||D&&d-F>10)&&(B(E,r[E]=D?d:H(d)),B(S,r[S]=D?F:H(F))),W-G>10&&(B(C,r[C]=I?G:q(G)),B(L,r[L]=I?W:q(W)))}e.attr("d",g(t,r)),J(h,r)}function J(t,e){(I||D)&&function(){var r="path"!==e.type,n=t.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(I?e.xanchor:a.midRange(r?[e.x0,e.x1]:p.extractPathCoords(e.path,f.paramIsX))),o=U(D?e.yanchor:a.midRange(r?[e.y0,e.y1]:p.extractPathCoords(e.path,f.paramIsY)));if(i=p.roundPositionForSharpStrokeRendering(i,1),o=p.roundPositionForSharpStrokeRendering(o,1),I&&D){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(I){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function K(t){t.selectAll(".visual-cue").remove()}c.init(W),G.node().onmousemove=Y}(t,x,r,e,h)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function g(t,e){var r,n,o,s,l,c,u,h,d=e.type,g=i.getFromId(t,e.xref),v=i.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=p.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=p.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},"path"===d)return g&&"date"===g.type&&(n=p.decodeDate(n)),v&&"date"===v.type&&(s=p.decodeDate(s)),function(t,e,r){var n=t.path,i=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(f.segmentRE,(function(t){var n=0,c=t.charAt(0),u=f.paramIsX[c],p=f.paramIsY[c],h=f.numParams[c],d=t.substr(1).replace(f.paramRE,(function(t){return u[n]?t="pixel"===i?e(s)+Number(t):e(t):p[n]&&(t="pixel"===o?r(l)-Number(t):r(t)),++n>h&&(t="X"),t}));return n>h&&(d=d.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+t)),c+d}))}(e,n,s);if("pixel"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if("pixel"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,h=x-e.y1}else u=s(e.y0),h=s(e.y1);if("line"===d)return"M"+l+","+u+"L"+c+","+h;if("rect"===d)return"M"+l+","+u+"H"+c+"V"+h+"H"+l+"Z";var b=(l+c)/2,_=(u+h)/2,w=Math.abs(b-l),k=Math.abs(_-u),T="A"+w+","+k,A=b+w+","+_;return"M"+A+T+" 0 1,1 "+b+","+(_-k)+T+" 0 0,1 "+A+"Z"}function v(t,e,r){return t.replace(f.segmentRE,(function(t){var n=0,a=t.charAt(0),i=f.paramIsX[a],o=f.paramIsY[a],s=f.numParams[a];return a+t.substr(1).replace(f.paramRE,(function(t){return n>=s?t:(i[n]?t=e(t):o[n]&&(t=r(t)),n++,t)}))}))}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var a=0;a0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform","translate("+(o-.5*u.gripWidth)+","+e._dims.currentValueTotalHeight+")")}}function E(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function S(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,a=s.ensureSingle(t,"rect",u.railTouchRectClass,(function(n){n.call(T,e,t,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function L(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,a=s.ensureSingle(t,"rect",u.railRectClass);a.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,e.bordercolor).call(i.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(a,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[u.name],n=[],a=0;a0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),a.autoMargin(t,g(e))}if(i.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),i.exit().each((function(){n.select(this).selectAll("g."+u.groupClassName).each(s)})).remove(),0!==r.length){var l=i.selectAll("g."+u.groupClassName).data(r,v);l.enter().append("g").classed(u.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||f<0){var v={left:[-h,0],right:[h,0],top:[0,-h],bottom:[0,h]}[x.side];e.attr("transform","translate("+v+")")}}}return D.call(z),P&&(E?D.on(".opacity",null):(T=0,A=!0,D.text(m).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))),D.call(u.makeEditable,{gd:t}).on("edit",(function(e){void 0!==y?o.call("_guiRestyle",t,v,e,y):o.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(z)})).on("input",(function(t){this.text(t||" ").call(u.positionText,b.x,b.y)}))),D.classed("js-placeholder",A),w}}},{"../../constants/alignment":686,"../../constants/interactions":692,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/plots":826,"../../registry":846,"../color":592,"../drawing":613,d3:165,"fast-isnumeric":228}],680:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),i=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=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}});e.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:c,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":708,"../../plot_api/edit_types":748,"../../plot_api/plot_template":755,"../../plots/font_attributes":791,"../../plots/pad_attributes":825,"../color/attributes":591}],681:[function(t,e,r){"use strict";e.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:"▼"}}},{}],682:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/array_container_defaults"),i=t("./attributes"),o=t("./constants").name,s=i.buttons;function l(t,e,r){function o(r,a){return n.coerce(t,e,i,r,a)}o("visible",a(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["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 c(t,e){function r(r,a){return n.coerce(t,e,s,r,a)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(t,e){a(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":717,"../../plots/array_container_defaults":761,"./attributes":680,"./constants":681}],683:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/plots"),i=t("../color"),o=t("../drawing"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../plot_api/plot_template").arrayEditor,u=t("../../constants/alignment").LINE_SPACING,f=t("./constants"),p=t("./scrollbox");function h(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,a,i,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?m(t,n,null,null,e):"dropdown"===e.type&&(a.attr(f.menuIndexAttrName,"-1"),v(t,n,a,i,e),s||m(t,n,a,i,e))}function v(t,e,r,n,a){var i=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=a._dims,c=a.active,u=a.buttons[c]||f.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(y,a,u,t).call(M,a,p,h),s.ensureSingle(e,"text",f.headerArrowClassName,(function(t){t.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,a.font).text(f.arrowSymbol[a.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+a.pad.l,y:l.headerHeight/2+f.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(E,String(d(r,a)?-1:a._index)),m(t,e,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(k,a)})),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,i,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),p=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===o.type?(p.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var d=0,v=0,m=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?v=m.headerHeight+f.gapButtonHeader:d=m.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(v=-f.gapButtonHeader+f.gapButton-m.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+v+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,i,-1),a.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,i,l),a.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(k,o),u.call(_,o)}))})),u.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,i&&(u.size()?function(t,e,r,n,a,i){var o,s,l,c=a.direction,u="up"===c||"down"===c,p=a._dims,h=a.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(i)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,h);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,E=d,S=v+m;S+M>c&&(S=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),T?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:E,y:S,width:A,height:M}),this._hbarXMin=E+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=m>k,O=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,I=d+g,D=v;I+O>l&&(I=l-O);var z=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),L?(this.vbar=z.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:D,width:O,height:P}),this._vbarYMin=D+P/2,this._vbarTranslateMax=k-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?f+O+.5:f+.5,N=p-.5,j=T?h+M+.5:h+.5,V=o._topdefs.selectAll("#"+R).data(T||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",R).append("rect"),T||L?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(i.setClipUrl,R,this.gd),this.bg.attr({x:d,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||L){var U=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(U);var q=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,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 t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=e+this._vbarYMin,s=i+this._vbarTranslateMax;e=(o.constrain(n.event.y,i,s)-i)/(s-i)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(i.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var a=t/r;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(i.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":717,"../color":592,"../drawing":613,d3:165}],686:[function(t,e,r){"use strict";e.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"}}},{}],687:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},{}],688:[function(t,e,r){"use strict";e.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"}},{}],689:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],690:[function(t,e,r){"use strict";e.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]}},{}],691:[function(t,e,r){"use strict";e.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},{}],692:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],693:[function(t,e,r){"use strict";e.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:"−"}},{}],694:[function(t,e,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}},{}],695:[function(t,e,r){"use strict";r.version="1.52.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config")();for(var n=t("./registry"),a=r.register=n.register,i=t("./plot_api"),o=Object.keys(i),s=0;splotly-logomark"}}},{}],698:[function(t,e,r){"use strict";r.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},{}],699:[function(t,e,r){"use strict";var n=t("./mod"),a=n.mod,i=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return i(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=a(n,s))&&(n+=s);var i=a(t,s),o=i+s;return i>=r&&i<=n||o>=r&&o<=n}function f(t,e,r,n,a,i,c){a=a||0,i=i||0;var u,f,p,h,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+a,i-t*Math.sin(e)]}g?(u=0,f=o,p=s):r=a&&t<=i);var a,i},pathArc:function(t,e,r,n,a){return f(null,t,e,r,n,a,0)},pathSector:function(t,e,r,n,a){return f(null,t,e,r,n,a,1)},pathAnnulus:function(t,e,r,n,a,i){return f(t,e,r,n,a,i,1)}}},{"./mod":724}],700:[function(t,e,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(t){return a.isView(t)&&!(t instanceof i)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,a=0;aa.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,a){t%1||!n(t)||void 0!==a.min&&ta.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var a="number"==typeof t;!0!==n.strict&&a?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){a(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return a(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var a=n.regex||c(r);"string"==typeof t&&a.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if("string"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var a=t.split("+"),i=0;i=n&&t<=a?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(e),m=t.charAt(0);!c||"G"!==m&&"g"!==m||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),E=Number(k[7]||0),S=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===T.length)return u;var L;T=Number(T);try{var O=v.getComponentMethod("calendars","getCal")(e);if(w){var P="i"===A.charAt(A.length-1);A=parseInt(A,10),L=O.newDate(T,O.toMonthIndex(T,A,P),M)}else L=O.newDate(T,Number(A),M)}catch(t){return u}return L?(L.toJD()-g)*f+E*p+S*h+C*d:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var I=new Date(Date.UTC(2e3,A,M,E,S));return I.setUTCFullYear(T),I.getUTCMonth()!==A?u:I.getUTCDate()!==M?u:I.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*f,T=3*p,A=5*h;function M(t,e,r,n,a){if((e||r||n||a)&&(t+=" "+w(e,2)+":"+w(r,2),(n||a)&&(t+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;t+="."+w(a,i)}return t}r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=a))return u;e||(e=0);var i,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var E=Math.floor(w/f)+g,S=Math.floor(l(t,f));try{i=v.getComponentMethod("calendars","getCal")(r).fromJD(E).formatDate("yyyy-mm-dd")}catch(t){i=m("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=e=n+f&&t<=a-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(i.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var E=/%\d?f/g;function S(t,e,r,n){t=t.replace(E,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(a)}var C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,a,i){if(a=_(a)&&a,!e)if("y"===r)e=i.year;else if("m"===r)e=i.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/p),2)+":"+w(l(Math.floor(r/h),60),2);if("M"!==e){o(e)||(e=0);var a=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(t,r)+"\n"+S(i.dayMonthYear,t,n,a);e=i.dayMonth+"\n"+i.year}return S(e,t,n,a)};var L=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var a=Math.round(t/f)+g,i=v.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return e%12?i.add(o,e,"m"):i.add(o,e/12,"y"),(o.toJD()-g)*f+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,a=0,i=0,s=0,l=0,c=_(e)&&v.getComponentMethod("calendars","getCal")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),a=0;ae?r[n++]=[t[a][0]+360,t[a][1]]:a===e?(r[n++]=t[a],r[n++]=[t[a][0],-90]):r[n++]=t[a];var i=p.tester(r);i.pts.pop(),l.push(i)}:function(t){l.push(p.tester(t))},i.type){case"MultiPolygon":for(r=0;ra&&(a=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete a[r]}switch(r.type){case"FeatureCollection":var p=r.features;for(n=0;n100?(clearInterval(i),n("Unexpected error while fetching from "+t)):void a++}),50)}))}for(var o=0;o0&&(r.push(a),a=[])}return a.length>0&&r.push(a),r},r.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r1||g<0||g>1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,a){var i=n*t+a*e;if(i<0)return n*n+a*a;if(i>r){var o=n-t,s=a-e;return o*o+s*s}var l=n*e-a*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,a,i,o,c){if(s(t,e,r,n,a,i,o,c))return 0;var u=r-t,f=n-e,p=o-a,h=c-i,d=u*u+f*f,g=p*p+h*h,v=Math.min(l(u,f,d,a-t,i-e),l(u,f,d,o-t,c-e),l(p,h,g,t-a,e-i),l(p,h,g,r-a,n-i));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===a&&s===i||(n={},a=t,i=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),p={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=p,p},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(t,e,r){var n,a,i=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function p(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(a=r);var c=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var h=p(c);h;){if((c+=h+r)>f)return;h=p(c)}for(h=p(f);h;){if(c>(f-=h+r))return;h=p(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var a,i,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,p=0,h=s;f0?h=a:p=a,f++}return i}},{"./mod":724}],714:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),i=t("color-normalize"),o=t("../components/colorscale"),s=t("../components/color/attributes").defaultLine,l=t("./array").isArrayOrTypedArray,c=i(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=i(t);return e.length?e:c}function p(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,a,s,h,d,g=t.color,v=l(g),m=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,a=v?function(t,e){return void 0===t[e]?c:i(n(t[e]))}:f,s=m?function(t,e){return void 0===t[e]?1:p(t[e])}:p,v||m)for(var b=0;bo?s:a(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&a(t)&&t>=0&&t%1==0},l.noop=t("./noop"),l.identity=t("./identity"),l.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var a=t.length,i=new Array(a),o=0;o=Math.pow(2,r)?a>10?(l.warn("randstr failed uniqueness"),c):t(e,r,n,(a||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,a,i,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=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+=t[a]*c[n];u[r]=i}return u},l.syncOrAsync=function(t,e,r){var n;function a(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(a).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,a=!1,i=!0;for(n=0;n0?e:0}))},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(t))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 C=/^\w*$/;l.templateString=function(t,e){var r={};return t.replace(l.TEMPLATE_STRING_REGEX,(function(t,n){var a;return C.test(n)?a=e[n]:(r[n]=r[n]||l.nestedProperty(e,n).get,a=r[n]()),l.isValidTextValue(a)?a:""}))};var L={max:10,count:0,name:"hovertemplate"};l.hovertemplateString=function(){return I.apply(L,arguments)};var O={max:10,count:0,name:"texttemplate"};l.texttemplateString=function(){return I.apply(O,arguments)};var P=/^[:|\|]/;function I(t,e,r){var a=this,i=arguments;e||(e={});var o={};return t.replace(l.TEMPLATE_STRING_REGEX,(function(t,s,c){var u,f,p,h;for(p=3;p=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(a=10*a+s-48),!l||!c){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var D=2e9;l.seedPseudoRandom=function(){D=2e9},l.pseudoRandom=function(){var t=D;return D=(69069*D+1)%4294967296,Math.abs(D-t)<429496729?l.pseudoRandom():D/4294967296},l.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},a=l.extractOption(t,e,"htx","hovertext");if(l.isValidTextValue(a))return n(a);var i=l.extractOption(t,e,"tx","text");return l.isValidTextValue(i)?n(i):void 0},l.isValidTextValue=function(t){return t||0===t},l.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,"translate("+(a-c*(r+o))+","+(i-c*(n+s))+")"+(c<1?"scale("+c+")":"")+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},l.ensureUniformFontSize=function(t,e){var r=l.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r}},{"../constants/numerical":693,"./anchor_utils":698,"./angles":699,"./array":700,"./clean_number":701,"./clear_responsive":703,"./coerce":704,"./dates":705,"./dom":706,"./extend":708,"./filter_unique":709,"./filter_visible":710,"./geometry2d":713,"./identity":716,"./is_plain_object":718,"./keyed_container":719,"./localize":720,"./loggers":721,"./make_trace_groups":722,"./matrix":723,"./mod":724,"./nested_property":725,"./noop":726,"./notifier":727,"./push_unique":731,"./regex":733,"./relative_attr":734,"./relink_private":735,"./search":736,"./stats":739,"./throttle":742,"./to_log_range":743,d3:165,"fast-isnumeric":228}],718:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],719:[function(t,e,r){"use strict";var n=t("./nested_property"),a=/^\w*$/;e.exports=function(t,e,r,i){var o,s,l;r=r||"name",i=i||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(o=0;o2)return c[e]=2|c[e],p.set(t,null);if(f){for(o=e;o1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},i.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},i.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},{"../plot_api/plot_config":753,"./notifier":727}],722:[function(t,e,r){"use strict";var n=t("d3");e.exports=function(t,e,r){var a=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(t){t[0][i]=n.select(this)})),a}},{d3:165}],723:[function(t,e,r){"use strict";r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],725:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./array").isArrayOrTypedArray;function i(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;li||c===a||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===a||li||c===a||cs)return!1;var u,f,p,h,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;uMath.max(f,v)||c>Math.max(p,m)))if(cu||Math.abs(n(o,p))>a)return!0;return!1},i.filter=function(t,e){var r=[t[0]],n=0,a=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},{"../constants/numerical":693,"./matrix":723}],730:[function(t,r,n){(function(e){"use strict";var n=t("./show_no_webgl_msg"),a=t("regl");r.exports=function(t,r){var i=t._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:t._context.plotGlPixelRatio||e.devicePixelRatio,extensions:r||[]})}catch(t){o=!1}o&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),o||n({container:i._glcontainer.node()}),o}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":738,regl:501}],731:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;na.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var i,u,f=0,p=e.length,h=0,d=p>1?(e[p-1]-e[0])/(p-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&a.log("Long binary search..."),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,a=e[n]-e[0]||1,i=a/(n||1)/1e4,o=[e[0]],s=0;se[s]+i&&(a=Math.min(a,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:a}},r.roundUp=function(t,e,r){for(var n,a=0,i=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(e)||(e=!1),a(i[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"./array":700,"fast-isnumeric":228}],740:[function(t,e,r){"use strict";var n=t("color-normalize");e.exports=function(t){return t?n(t):[0,0,0,1]}},{"color-normalize":122}],741:[function(t,e,r){"use strict";var n=t("d3"),a=t("../lib"),i=t("../constants/xmlns_namespaces"),o=t("../constants/alignment").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,A){var M=t.text(),S=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&M.match(l),C=n.select(t.node().parentNode);if(!C.empty()){var L=t.attr("class")?t.attr("class").split(" ")[0]:"text";return L+="-math",C.selectAll("svg."+L).remove(),C.selectAll("g."+L+"-group").remove(),t.style("display",null).attr({"data-unformatted":M,"data-math":"N"}),S?(e&&e._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),i={fontSize:r};!function(t,e,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":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(l.node())}),(function(){var e=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.",t),r();else{var o=l.select("svg").node().getBoundingClientRect();r(l.select(".MathJax_SVG"),e,o)}if(l.remove(),"SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)}))}(S[2],i,(function(n,a,i){C.selectAll("svg."+L).remove(),C.selectAll("g."+L+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return O(),void e();var l=C.append("g").classed(L+"-group",!0).attr({"pointer-events":"none","data-unformatted":M,"data-math":"Y"});l.node().appendChild(o.node()),a&&a.node()&&o.node().insertBefore(a.node().cloneNode(!0),o.node().firstChild),o.attr({class:L,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=t.node().style.fill||"black",u=o.select("g");u.attr({fill:c,stroke:c});var f=s(u,"width"),p=s(u,"height"),h=+t.attr("x")-f*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],d=-(r||s(t,"height"))/4;"y"===L[0]?(l.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-f/2,d-p/2]+")"}),o.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===L[0]?o.attr({x:t.attr("x"),y:d-p/2}):"a"===L[0]&&0!==L.indexOf("atitle")?o.attr({x:0,y:d}):o.attr({x:h,y:+t.attr("y")+d-p/2}),A&&A.call(t,l),e(l)}))}))):O(),t}function O(){C.empty()||(L=t.attr("class")+"-math",C.select("svg."+L).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(g," ");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(i.svg,"tspan");n.select(e).attr({class:"line",dy:c*o+"em"}),t.appendChild(e),r=e;var a=l;if(l=[{node:e}],a.length>1)for(var s=1;s doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else a.log("Ignoring unexpected end tag .",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var C=e.split(v),L=0;L|>|>)/g,f={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"},d=["http:","https:","mailto:","",void 0,":"],g=r.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,m=/<(\/?)([^ >]*)(\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,w=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var T=/(^|;)\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],a="...".length,i=t.split(v),o=[],s="",l=0,c=0;ca?o.push(u.substr(0,d-a)+"..."):o.push(u.substr(0,d));break}s=""}}return o.join("")};var A={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},M=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(M,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):A[e])||t}))}function S(t,e,r){var n,a,i,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),c=e.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()-c.top+"px",left:i()-c.left+"px","z-index":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each((function(){var t=n.select(this);function a(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var i=a("x",e),o=a("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:i,y:o})}))},r.makeEditable=function(t,e){var r=e.gd,a=e.delegate,i=n.dispatch("edit","input","cancel"),o=a||t;if(t.style({"pointer-events":a?"none":"all"}),1!==t.size())throw new Error("boo");function s(){var a,s,c,u,f;a=n.select(r).select(".svg-container"),s=a.append("div"),c=t.node().style,u=parseFloat(c.fontSize||12),void 0===(f=e.text)&&(f=t.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":c.fontFamily||"Arial","font-size":u,color:e.fill||c.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-u/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(f).call(S(t,a,e)).on("blur",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,a=n.select(this).attr("class");(e=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(t,o)})).on("focus",(function(){var t=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),i.cancel.call(t,this.textContent)):(i.input.call(t,this.textContent),n.select(this).call(S(t,a,e)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var p,h=o.attr("class");(p=h?"."+h.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(p).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,i,"on")}},{"../constants/alignment":686,"../constants/xmlns_namespaces":694,"../lib":717,d3:165}],742:[function(t,e,r){"use strict";var n={};function a(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var i=n[t],o=Date.now();if(!i){for(var s in n)n[s].tsi.ts+e?l():i.timer=setTimeout((function(){l(),i.timer=null}),e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},r.clear=function(t){if(t)a(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],743:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":228}],744:[function(t,e,r){"use strict";var n=e.exports={},a=t("../plots/geo/constants").locationmodeToLayer,i=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=a[t.locationmode],n=e.objects[r];return i(e,n).features}},{"../plots/geo/constants":793,"topojson-client":539}],745:[function(t,e,r){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],746:[function(t,e,r){"use strict";e.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"}}},{}],747:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var i=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,p=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=["x","y","z"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&i.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",f,y),!0;e.set(y)}return!g&&(p(v,m),h(t),!0)}var x,b,_,w,k,T,A,M,E=Object.keys(r).map(Number).sort(o),S=e.get(),C=S||[],L=u(m,f).get(),O=[],P=-1,I=C.length;for(x=0;xC.length-(A?0:1))i.warn("index out of range",f,_);else if(void 0!==T)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(T)?O.push(_):A?("add"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,T),-1===P&&(P=_);else for(b=0;b=0;x--)C.splice(O[x],1),L&&L.splice(O[x],1);if(C.length?S||e.set(C):e.set(null),g)return!1;if(p(v,m),d!==a){var D;if(-1===P)D=E;else{for(I=Math.max(C.length,I),D=[],x=0;x=P);x++)D.push(_);for(x=P;x=t.data.length||a<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(a,n+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function D(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),I(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function z(t,e,r,n,i){!function(t,e,r,n){var a=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))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 I(t,r,"indices"),e){if(!Array.isArray(e[i])||e[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!==e[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")}}(t,e,r,n);for(var l=function(t,e,r,n){var i,l,c,u,f,p=o.isPlainObject(n),h=[];for(var d in Array.isArray(r)||(r=[r]),r=P(r,t.data.length-1),e)for(var g=0;g-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(e,r){t[r]=t[e],delete t[e]}}function q(t,e,r){if(t=o.getGraphDiv(t),k.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var a=Z(t,n),i=a.flags;i.calc&&(t.calcdata=void 0);var s=[p.previousPromises];i.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(H(t,i,a)||p.supplyDefaults(t),i.legend&&s.push(T.doLegend),i.layoutstyle&&s.push(T.layoutStyles),i.axrange&&G(s,a.rangesAltered),i.ticks&&s.push(T.doTicksRelayout),i.modebar&&s.push(T.doModeBar),i.camera&&s.push(T.doCamera),i.colorbars&&s.push(T.doColorBars),s.push(S)),s.push(p.rehover,p.redrag),c.add(t,q,[t,a.undoit],q,[t,a.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",a.eventData),t}))}function H(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var a in e)if("axrange"!==a&&e[a])return!1;for(var i in r.rangesAltered){var o=d.id2name(i),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==i){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[],n=!0;for(var a in e){var i=d.getFromId(t,a);if(r.push(a),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o);i.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,X=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(t,e){var r,n,a,i=t.layout,l=t._fullLayout,c=l._guiEditing,p=N(l._preGUI,c),h=Object.keys(e),g=d.list(t),v=o.extendDeepAll({},e),m={};for(U(e),h=Object.keys(e),n=0;n0&&"string"!=typeof I.parts[z];)z--;var R=I.parts[z],F=I.parts[z-1]+"."+R,j=I.parts.slice(0,z).join("."),V=s(t.layout,j).get(),q=s(l,j).get(),H=I.get();if(void 0!==D){T[P]=D,E[P]="reverse"===R?D:B(H);var G=f.getLayoutValObject(l,I.parts);if(G&&G.impliedEdits&&null!==D)for(var Z in G.impliedEdits)S(o.relativeAttr(P,Z),G.impliedEdits[Z]);if(-1!==["width","height"].indexOf(P))if(D){S("autosize",null);var K="height"===P?"width":"height";S(K,l[K])}else l[P]=t._initialAutoSize[P];else if("autosize"===P)S("width",D?null:l.width),S("height",D?null:l.height);else if(F.match(W))O(F),s(l,j+"._inputRange").set(null);else if(F.match(Y)){O(F),s(l,j+"._inputRange").set(null);var $=s(l,j).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(X)&&s(l,j+"._inputDomain").set(null);if("type"===R){var Q=V,tt="linear"===q.type&&"log"===D,et="log"===q.type&&"linear"===D;if(tt||et){if(Q&&Q.range)if(q.autorange)tt&&(Q.range=Q.range[1]>Q.range[0]?[1,2]:[2,1]);else{var rt=Q.range[0],nt=Q.range[1];tt?(rt<=0&&nt<=0&&S(j+".autorange",!0),rt<=0?rt=nt/1e6:nt<=0&&(nt=rt/1e6),S(j+".range[0]",Math.log(rt)/Math.LN10),S(j+".range[1]",Math.log(nt)/Math.LN10)):(S(j+".range[0]",Math.pow(10,rt)),S(j+".range[1]",Math.pow(10,nt)))}else S(j+".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"],u.getComponentMethod("annotations","convertCoords")(t,q,D,S),u.getComponentMethod("images","convertCoords")(t,q,D,S)}else S(j+".autorange",!0),S(j+".range",null);s(l,j+"._inputRange").set(null)}else if(R.match(M)){var at=s(l,P).get(),it=(D||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,at,it,S),u.getComponentMethod("images","convertCoords")(t,at,it,S)}var ot=w.containerArrayMatch(P);if(ot){r=ot.array,n=ot.index;var st=ot.property,lt=G||{editType:"calc"};""!==n&&""===st&&(w.isAddVal(D)?E[P]=null:w.isRemoveVal(D)?E[P]=(s(i,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,lt),m[r]||(m[r]={});var ct=m[r][n];ct||(ct=m[r][n]={}),ct[st]=D,delete e[P]}else"reverse"===R?(V.range?V.range.reverse():(S(j+".autorange",!0),V.range=[1,0]),q.autorange?_.calc=!0:_.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===D||"select"===D)&&"lasso"!==H&&"select"!==H?_.plot=!0:l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,I.set(D))}}for(r in m)w.applyContainerArrayChanges(t,p(i,r),m[r],_,p)||(_.plot=!0);var ut=l._axisConstraintGroups||[];for(C in L)for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=a.length?a[0]:a[t]:a}function l(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return(void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){function f(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,p.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function h(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&f()};e()}var d,g,v=0;function m(t){return Array.isArray(a)?v>=a.length?t.transitionOpts=a[v]:t.transitionOpts=a[0]:t.transitionOpts=a,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(x||b||!o.isPlainObject(e)){if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&TT)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var a=0;a=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&"number"==typeof m&&y&&E<5&&(E++,o.warn('addFrames: overwriting frame "'+(u[v]||d[v]).name+'" with a frame whose name of type "number" also equates to "'+v+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===E&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[g]={name:g},h.push({frame:p.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}h.sort((function(t,e){return t.index>e.index?-1:t.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(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(i=0;i=0;r--)n=e[r],i.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:a[n]});var l=p.modifyFrames,u=p.modifyFrames,f=[t,s],h=[t,i];return c&&c.add(t,l,f,u,h),p.modifyFrames(t,i)},r.addTraces=function t(e,n,a){e=o.getGraphDiv(e);var i,s,l=[],u=r.deleteTraces,f=t,p=[e,l],h=[e,n];for(function(t,e,r){var n,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=i[a][o]}else t=i[a]}else t=i}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in d(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var a=0;a=l.length)return!1;a=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if("area"===t.type)a=u[o];else{var f=t._module;if(f||(f=(n.modules[t.type||i.type.dflt]||{})._module),!f)return!1;if(!(a=(r=f.attributes)&&r[o])){var p=f.basePlotModule;p&&p.attributes&&(a=p.attributes[o])}a||(a=i[o])}return b(a,e,s)},r.getLayoutValObject=function(t,e){return b(function(t,e){var r,a,i,s,l=t._basePlotModules;if(l){var c;for(r=0;r=a&&(r._input||{})._templateitemname;o&&(i=a);var s,l=e+"["+i+"]";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+"."+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var a=f();for(var i in a)n.nestedProperty(t,i).set(a[i])}}}},{"../lib":717,"../plots/attributes":762}],756:[function(t,e,r){"use strict";var n=t("d3"),a=t("../registry"),i=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),f=t("../components/modebar"),p=t("../plots/cartesian/axes"),h=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),g=d.enforce,v=d.clean,m=t("../plots/cartesian/autorange").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||a[1]<=t[0])&&i[0]e[0])return!0}return!1}function x(t){var e,a,s,u,d,g,v=t._fullLayout,m=v._size,x=m.p,_=p.list(t,"",!0);if(v._paperdiv.style({width:t._context.responsive&&v.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":v.width+"px",height:t._context.responsive&&v.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":v.height+"px"}).selectAll(".main-svg").call(c.setSize,v.width,v.height),t._context.setBackground(t,v.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!v._has("cartesian"))return i.previousPromises(t);function k(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-x-n:e._offset+e._length+x+n:m.t+m.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+x+n:e._offset-x-n:m.l+m.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var T=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=k(u,T,u.side),u._mainMirrorPosition=u.mirror&&T?k(u,T,h.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],E=[],S=1===l.opacity(v.paper_bgcolor)&&1===l.opacity(v.plot_bgcolor)&&v.paper_bgcolor===v.plot_bgcolor;for(a in v._plots)if((s=v._plots[a]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var C=s.xaxis.domain,L=s.yaxis.domain,O=s.plotgroup;if(y(C,L,E)){var P=O.node(),I=s.bg=o.ensureSingle(O,"rect","bg");P.insertBefore(I.node(),P.childNodes[0]),M.push(a)}else O.select("rect.bg").remove(),E.push([C,L]),S||(A.push(a),M.push(a))}var D,z,R,F,B,N,j,V,U,q,H,G,W,Y=v._bgLayer.selectAll(".bg").data(A);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each((function(t){v._plots[t].bg=n.select(this)})),e=0;ek?u.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var i=e[n],o=g(e,n,r);a(i)?(Array.isArray(e)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),t(i,o)):Array.isArray(i)&&v(i)&&t(i,o)}}({data:h,layout:p},""),u.length)return u.map(m)}},{"../lib":717,"../plots/attributes":762,"../plots/plots":826,"./plot_config":753,"./plot_schema":754,"./plot_template":755}],758:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./plot_api"),i=t("../lib"),o=t("../snapshot/helpers"),s=t("../snapshot/tosvg"),l=t("../snapshot/svgtoimg"),c={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}};e.exports=function(t,e){var r,u,f,p;function h(t){return!(t in e)||i.validate(e[t],c[t])}if(e=e||{},i.isPlainObject(t)?(r=t.data||[],u=t.layout||{},f=t.config||{},p={}):(t=i.getGraphDiv(t),r=i.extendDeep([],t.data),u=i.extendDeep({},t.layout),f=t._context,p=t._fullLayout||{}),!h("width")&&null!==e.width||!h("height")&&null!==e.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 d={};function g(t,r){return i.coerce(e,d,c,t,r)}var v=g("format"),m=g("width"),y=g("height"),x=g("scale"),b=g("setBackground"),_=g("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=i.extendFlat({},u);m?k.width=m:null===e.width&&n(p.width)&&(k.width=p.width),y?k.height=y:null===e.height&&n(p.height)&&(k.height=p.height);var T=i.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),A=o.getRedrawFunc(w);function M(){return new Promise((function(t){setTimeout(t,o.getDelay(w._fullLayout))}))}function E(){return new Promise((function(t,e){var r=s(w,v,x),n=w._fullLayout.width,c=w._fullLayout.height;if(a.purge(w),document.body.removeChild(w),"svg"===v)return t(_?r:o.encodeSVG(r));var u=document.createElement("canvas");u.id=i.randstr(),l({format:v,width:n,height:c,scale:x,canvas:u,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){a.plot(w,r,k,T).then(A).then(M).then(E).then((function(e){t(function(t){return _?t.replace(o.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},{"../lib":717,"../snapshot/helpers":850,"../snapshot/svgtoimg":852,"../snapshot/tosvg":854,"./plot_api":752,"fast-isnumeric":228}],759:[function(t,e,r){"use strict";var n=t("../lib"),a=t("../plots/plots"),i=t("./plot_schema"),o=t("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,a,i,o){o=o||[];for(var f=Object.keys(t),p=0;px.length&&a.push(d("unused",i,m.concat(x.length)));var A,M,E,S,C,L=x.length,O=Array.isArray(T);if(O&&(L=Math.min(L,T.length)),2===b.dimensions)for(M=0;Mx[M].length&&a.push(d("unused",i,m.concat(M,x[M].length)));var P=x[M].length;for(A=0;A<(O?Math.min(P,T[M].length):P);A++)E=O?T[M][A]:T,S=y[M][A],C=x[M][A],n.validate(S,E)?C!==S&&C!==+S&&a.push(d("dynamic",i,m.concat(M,A),S,C)):a.push(d("value",i,m.concat(M,A),S))}else a.push(d("array",i,m.concat(M),y[M]));else for(M=0;M1&&h.push(d("object","layout"))),a.supplyDefaults(g);for(var v=g._fullData,m=r.length,y=0;y0&&((b=A-o(v)-o(m))>M?_/b>E&&(y=v,x=m,E=_/b):_/A>E&&(y={val:v.val,pad:0},x={val:m.val,pad:0},E=_/A));if(p===h){var S=p-1,C=p+1;if(k)if(0===p)i=[0,1];else{var L=(p>0?f:u).reduce((function(t,e){return Math.max(t,o(e))}),0),O=p/(1-Math.min(.5,L/A));i=p>0?[0,O]:[O,0]}else i=T?[Math.max(0,S),Math.max(1,C)]:[S,C]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):T&&(y.val-E*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),E=(x.val-y.val)/(A-o(y)-o(x)),i=[y.val-E*o(y),x.val+E*o(x)];return d&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function l(t){var e=t._length/20;return"domain"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function c(t,e){var r,n,a,i=e._id,o=t._fullData,s=t._fullLayout,l=[],c=[];function p(t,e){for(r=0;r=r&&(c.extrapad||!o)){s=!1;break}a(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=i&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function h(t){return n(t)&&Math.abs(t)=e}e.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(t,e){if(e.setScale(),e.autorange){e.range=s(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var r=e._input,n={};n[e._attr+".range"]=e.range,n[e._attr+".autorange"]=e.autorange,o.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,n),r.range=e.range.slice(),r.autorange=e.autorange}var i=e._anchorAxis;if(i&&i.rangeslider){var l=i.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=s(t,e)),i._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t._m||t.setScale();var a,o,s,l,c,p,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,k=!1,T=r.vpadLinearized||!1;function A(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var M=A((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),E=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=A(r.vpadplus||r.vpad),C=A(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(a=0;a0&&(g=o),o>v&&o-i&&(g=o),o>v&&o=P;a--)O(a);return{min:m,max:y,opts:r}},concatExtremes:c}},{"../../constants/numerical":693,"../../lib":717,"../../registry":846,"fast-isnumeric":228}],765:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../components/titles"),u=t("../../components/color"),f=t("../../components/drawing"),p=t("./layout_attributes"),h=t("./clean_ticks"),d=t("../../constants/numerical"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t("../../constants/alignment"),T=k.MID_SHIFT,A=k.CAP_SHIFT,M=k.LINE_SPACING,E=k.OPPOSITE_SIDE,S=e.exports={};S.setConvert=t("./set_convert");var C=t("./axis_autotype"),L=t("./axis_ids");S.id2name=L.id2name,S.name2id=L.name2id,S.cleanId=L.cleanId,S.list=L.list,S.listIds=L.listIds,S.getFromId=L.getFromId,S.getFromTrace=L.getFromTrace;var O=t("./autorange");S.getAutoRange=O.getAutoRange,S.findExtremes=O.findExtremes,S.coerceRef=function(t,e,r,n,a,i){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=l[0]||i),i||(i=a),u[c]={valType:"enumerated",values:l.concat(i?[i]:[]),dflt:a},s.coerce(t,e,u,c)},S.coercePosition=function(t,e,r,n,a,i){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(a,i);else{var c=S.getFromId(e,n);l=r(a,i=c.fraction2r(i)),o=c.cleanPos}t[a]=o(l)},S.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:S.getFromId(e,r).cleanPos)(t)},S.redrawComponents=function(t,e){e=e||S.listIds(t);var r=t._fullLayout;function n(n,a,i,s){for(var l=o.getComponentMethod(n,a),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},S.saveRangeInitial=function(t,e){for(var r=S.list(t,"",!0),n=!1,a=0;a.3*p||u(n)||u(i))){var h=r.dtick/2;t+=t+h.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?t=S.tickIncrement(t,"M6","reverse")+1.5*m:i.exactMonths>.8?t=S.tickIncrement(t,"M1","reverse")+15.5*m:t-=m/2;var l=S.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,i)),v=x;v<=u;)v=S.tickIncrement(v,y,!1,i);return{start:e.c2r(x,0,i),end:e.c2r(v,0,i),size:y,_dataSpan:u-c}},S.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type||"multicategory"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),"radialaxis"===t._name&&(n*=2)),"array"===t.tickmode&&(n*=100),S.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),q(t)},S.calcTicks=function(t){S.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if("array"===t.tickmode)return function(t){var e=t.tickvals,r=t.ticktext,n=new Array(e.length),a=s.simpleMap(t.range,t.r2l),i=1.0001*a[0]-1e-4*a[1],o=1.0001*a[1]-1e-4*a[0],l=Math.min(i,o),c=Math.max(i,o),u=0;Array.isArray(r)||(r=[]);var f="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var p=0;pl&&h=n:f<=n)&&!(o.length>u||f===c);f=S.tickIncrement(f,t.dtick,i,t.calendar)){c=f;var p=!1;l&&f!==(0|f)&&(p=!0),o.push({minor:p,value:f})}ot(t)&&360===Math.abs(e[1]-e[0])&&o.pop(),t._tmax=(o[o.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;for(var h=new Array(o.length),d=0;d10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=m&&i<=10||e>=15*m)t._tickround="d";else if(e>=x&&i<=16||e>=y)t._tickround="M";else if(e>=b&&i<=19||e>=x)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,o)-20,t._tickround<0&&(t._tickround=4)}}else if(a(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);a(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(W(t.exponentformat)&&!Y(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function H(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}S.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar);var i=2*e;i>g?(e/=g,r=n(10),t.dtick="M"+12*U(e,r,z)):i>v?(e/=v,t.dtick="M"+U(e,1,R)):i>m?(t.dtick=U(e,m,B),t.tick0=s.dateTick0(t.calendar,!0)):i>y?t.dtick=U(e,y,R):i>x?t.dtick=U(e,x,F):i>b?t.dtick=U(e,b,F):(r=n(10),t.dtick=U(e,r,z))}else if("log"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick="L"+U(e,r,z)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):ot(t)?(t.tick0=0,r=1,t.dtick=U(e,r,V)):(t.tick0=0,r=n(10),t.dtick=U(e,r,z));if(0===t.dtick&&(t.dtick=1),!a(t.dtick)&&"string"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}},S.tickIncrement=function(t,e,r,i){var o=r?-1:1;if(a(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,i);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?j:N,f=t+.01*o,p=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,p),1))/Math.LN10}throw"unrecognized dtick "+String(e)},S.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),i=r[1]"+l,t._prevDateHead=l)),e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,i){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)e.text=X(Math.pow(10,l),t,i,n);else if(a(o)||"D"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),p=Math.abs(f),h=t.exponentformat;"power"===h||W(h)&&Y(f)?(e.text=0===f?1:1===f?"10":"10"+(f>1?"":_)+p+"",e.fontSize*=1.25):("e"===h||"E"===h)&&p>2?e.text="1"+h+(f>0?"+":_)+p:(e.text=X(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,g):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),a=t._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?e.text=o+" - "+i:(e.text=i,e.text2=o)}(t,o,r):ot(t)?function(t,e,r,n,a){if("radians"!==t.thetaunit||r)e.text=X(e.x,t,a,n);else{var i=e.x/180;if(0===i)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,a=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)e.text=X(s.deg2rad(e.x),t,a,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["",o[0],"","⁄","",o[1],"","π"].join(""),l&&(e.text=_+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,a){"never"===a?a="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide"),e.text=X(e.x,t,a,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),"boundaries"===t.tickson||t.showdividers){var v=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[v(o.x-.5),v(o.x+t.dtick-.5)]}return o},S.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return S.hoverLabelText(t,e)+" - "+S.hoverLabelText(t,r);var n="log"===t.type&&e<=0,a=S.tickText(t,t.c2l(n?-e:e),"hover").text;return n?0===e?"0":_+a:a};var G=["f","p","n","μ","m","","k","M","G","T"];function W(t){return"SI"===t||"B"===t}function Y(t){return t>14||t<-15}function X(t,e,r,n){var i=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=S.getTickFormat(e),f=e.separatethousands;if(n){var p={exponentformat:l,dtick:"none"===e.showexponent?e.dtick:a(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};q(p),o=(Number(p._tickround)||0)+4,c=p._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var h,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+h+"":"B"===l&&9===c?t+="B":W(l)&&(t+=G[c/3+5])),i?_+t:t}function Z(t,e){for(var r=[],n={},a=0;a1&&r=0,i=u(t,e[1])<=0;return(r||a)&&(n||i)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(a)))){r=n;break}break;case"log":for(e=0;e0?r.bottom-u:0,f)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var h=[0,1];if("x"===d){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?u-r.top:0,f),h.reverse()),r.width>0){var v=r.right-(e._offset+e._length);v>0&&(n.xr=1,n.r=v);var m=e._offset-r.left;m>0&&(n.xl=0,n.l=m)}}else if("l"===l?n[l]=e._depth=Math.max(r.height>0?u-r.left:0,f):(n[l]=e._depth=Math.max(r.height>0?r.right-u:0,f),h.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]="free"===e.anchor?e.position:e._anchorAxis.domain[h[0]],e.title.text!==p._dfltTitle[d]&&(n[l]+=K(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(a[c]+=f),!0===e.mirror||"ticks"===e.mirror?a[g]=e._anchorAxis.domain[h[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(a[g]=[e._counterDomainMin,e._counterDomainMax][h[1]]))}X&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),i.autoMargin(t,tt(e),n),i.autoMargin(t,et(e),a),i.autoMargin(t,rt(e),s)})),r.skipTitle||X&&"bottom"===e.side||W.push((function(){return function(t,e){var r,n=t._fullLayout,a=e._id,i=a.charAt(0),o=e.title.font.size;e.title.hasOwnProperty("standoff")?r=e._depth+e.title.standoff+K(e):(r="multicategory"===e.type?e._depth:10+1.5*o+(e.linewidth?e.linewidth-1:0),r+="x"===i?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0));var s,l,u,p,h=S.getPxPosition(t,e);if("x"===i?(l=e._offset+e._length/2,u="top"===e.side?h-r:h+r):(u=e._offset+e._length/2,l="right"===e.side?h+r:h-r,s={rotate:"-90",offset:0}),"multicategory"!==e.type){var d=e._selections[e._id+"tick"];if(p={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var g=f.getTranslate(d.node().parentNode);p.offsetLeft=g.x,p.offsetTop=g.y}e.title.hasOwnProperty("standoff")&&(p.pad=0)}return c.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[i],avoid:p,transform:s,attributes:{x:l,y:u,"text-anchor":"middle"}})}(t,e)})),s.syncOrAsync(W)}}function $(t){var r=h+(t||"tick");return w[r]||(w[r]=function(t,e){var r,n,a,i;return t._selections[e].size()?(r=1/0,n=-1/0,a=1/0,i=-1/0,t._selections[e].each((function(){var t=Q(this),e=f.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),a=Math.min(a,e.left),i=Math.max(i,e.right)}))):(r=0,n=0,a=0,i=0),{top:r,bottom:n,left:a,right:i,height:n-r,width:i-a}}(e,r)),w[r]}},S.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],n=t.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==t.ticks==("x"===e)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},S.makeTransFn=function(t){var e=t._id.charAt(0),r=t._offset;return"x"===e?function(e){return"translate("+(r+t.l2p(e.x))+",0)"}:function(e){return"translate(0,"+(r+t.l2p(e.x))+")"}},S.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var a=t._id.charAt(0),i=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+i*r)+"v"+n*r:"M"+(e+i*r)+",0h"+n*r},S.makeLabelFns=function(t,e,r){var n=t._id.charAt(0),i="boundaries"!==t.tickson&&"outside"===t.ticks,o=0,l=0;if(i&&(o+=t.ticklen),r&&"outside"===t.ticks){var c=s.deg2rad(r);o=t.ticklen*Math.cos(c)+1,l=t.ticklen*Math.sin(c)}t.showticklabels&&(i||t.showline)&&(o+=.2*t.tickfont.size);var u,f,p,h,d={labelStandoff:o+=(t.linewidth||1)/2,labelShift:l};return"x"===n?(h="bottom"===t.side?1:-1,u=l*h,f=e+o*h,p="bottom"===t.side?1:-.2,d.xFn=function(t){return t.dx+u},d.yFn=function(t){return t.dy+f+t.fontSize*p},d.anchorFn=function(t,e){return a(e)&&0!==e&&180!==e?e*h<0?"end":"start":"middle"},d.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side?-n:0}):"y"===n&&(h="right"===t.side?1:-1,u=o,f=-l*h,p=90===Math.abs(t.tickangle)?.5:0,d.xFn=function(t){return t.dx+e+(u+t.fontSize*p)*h},d.yFn=function(t){return t.dy+f+t.fontSize*T},d.anchorFn=function(e,r){return a(r)&&90===Math.abs(r)?"middle":"right"===t.side?"start":"end"},d.heightFn=function(e,r,n){return(r*="left"===t.side?1:-1)<-30?-n:r<30?-.5*n:0}),d},S.drawTicks=function(t,e,r){r=r||{};var n=e._id+"tick",a=r.layer.selectAll("path."+n).data(e.ticks?r.vals:[],J);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(u.stroke,e.tickcolor).style("stroke-width",f.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path),a.attr("transform",r.transFn)},S.drawGrid=function(t,e,r){r=r||{};var n=e._id+"grid",a=r.vals,i=r.counterAxis;if(!1===e.showgrid)a=[];else if(i&&S.shouldShowZeroLine(t,e,i))for(var o="array"===e.tickmode,s=0;s1)for(n=1;n2*o}(t,e)?"date":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s2*r}(t)?"category":function(t){if(!t)return!1;for(var e=0;en?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n0;o&&(a="array");var s,l=r("categoryorder",a);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=e.categoryorder="trace"),"trace"===l?e._initialCategories=[]:"array"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,a,i=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nl*x)||k)for(r=0;rI&&RO&&(O=R);h/=(O-L)/(2*P),L=c.l2r(L),O=c.l2r(O),c.range=c._input.range=E=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function D(t,e,r,n,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function z(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function R(t,e,r,n,a,i){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),F(t,e,a,i)}function F(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function B(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function N(t){E&&t.data&&t._context.showTips&&(s.notifier(s._(t,"Double-click to zoom back out"),"long"),E=!1)}function j(t){return"lasso"===t||"select"===t}function V(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,M)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function U(t,e,r,n){for(var a,i,o,l,c=!1,u={},f={},p=0;p-1&&w(a,t,X,Z,e.id,Et),i.indexOf("event")>-1&&f.click(t,a,e.id);else if(1===r&&ht){var s=E?G:F,c="s"===E||"w"===S?0:1,u=s._name+".range["+c+"]",p=function(t,e){var r,a=t.range[e],i=Math.abs(a-t.range[1-e]);return"date"===t.type?a:"log"===t.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,c),h="left",d="middle";if(s.fixedrange)return;E?(d="n"===E?"top":"bottom","right"===s.side&&(h="right")):"e"===S&&(h="right"),t._context.showAxisRangeEntryBoxes&&n.select(vt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(p),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:h,verticalAlign:d}).on("edit",(function(e){var r=s.d2r(e);void 0!==r&&o.call("_guiRelayout",t,u,r)}))}}function Lt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,e+mt)),a=Math.max(0,Math.min(Q,r+yt)),i=Math.abs(n-mt),o=Math.abs(a-yt);function s(){kt="",xt.r=xt.l,xt.t=xt.b,At.attr("d","M0,0Z")}if(xt.l=Math.min(mt,n),xt.r=Math.max(mt,n),xt.t=Math.min(yt,a),xt.b=Math.max(yt,a),tt.isSubplotConstrained)i>M||o>M?(kt="xy",i/$>o/Q?(o=i*Q/$,yt>a?xt.t=yt-o:xt.b=yt+o):(i=o*$/Q,mt>n?xt.l=mt-i:xt.r=mt+i),At.attr("d",V(xt))):s();else if(et.isSubplotConstrained)if(i>M||o>M){kt="xy";var l=Math.min(xt.l/$,(Q-xt.b)/Q),c=Math.max(xt.r/$,(Q-xt.t)/Q);xt.l=l*$,xt.r=c*$,xt.b=(1-l)*Q,xt.t=(1-c)*Q,At.attr("d",V(xt))}else s();else!nt||og[1]-1/4096&&(e.domain=s),a.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":717,"fast-isnumeric":228}],781:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*r;t.range=t._input.range=[t.l2r(i+(a[0]-i)*e),t.l2r(i+(a[1]-i)*e)]}},{"../../constants/alignment":686}],782:[function(t,e,r){"use strict";var n=t("polybooljs"),a=t("../../registry"),i=t("../../components/color"),o=t("../../components/fx"),s=t("../../lib"),l=t("../../lib/polygon"),c=t("../../lib/throttle"),u=t("../../components/fx/helpers").makeEventData,f=t("./axis_ids").getFromId,p=t("../../lib/clear_gl_canvases"),h=t("../../plot_api/subroutines").redrawReglTraces,d=t("./constants"),g=d.MINSELECT,v=l.filter,m=l.tester;function y(t){return t._id}function x(t,e,r,n,a,i,o){var s,l,c,u,f,p,h,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf("event")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){k(t,e,i);var x=function(t,e){var r,n,a=t[0],i=-1,o=[];for(n=0;n0?function(t,e){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(a=0;a1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(s)&&(p=E(x))){for(o&&o.remove(),g=0;g0?"M"+a.join("M")+"Z":"M0,0Z",e.attr("d",n)}function E(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,a=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(a)>-1}function S(t,e,r){var n,i,o,s;for(n=0;n-1&&x(e,E,a.xaxes,a.yaxes,a.subplot,a,G),"event"===r&&E.emit("plotly_selected",void 0);o.click(E,e)})).catch(s.error)},a.doneFn=function(){Y.remove(),c.done(X).then((function(){c.clear(X),a.gd.emit("plotly_selected",_),h&&a.selectionDefs&&(h.subtract=H,a.selectionDefs.push(h),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,p)),a.doneFnCompleted&&a.doneFnCompleted(Z)})).catch(s.error)}},clearSelect:L,selectOnClick:x}},{"../../components/color":592,"../../components/fx":630,"../../components/fx/helpers":627,"../../lib":717,"../../lib/clear_gl_canvases":702,"../../lib/polygon":729,"../../lib/throttle":742,"../../plot_api/subroutines":756,"../../registry":846,"./axis_ids":768,"./constants":771,polybooljs:475}],783:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../lib"),o=i.cleanNumber,s=i.ms2DateTime,l=i.dateTime2ms,c=i.ensureNumber,u=i.isArrayOrTypedArray,f=t("../../constants/numerical"),p=f.FP_SAFE,h=f.BADNUM,d=f.LOG_CLIP,g=t("./constants"),v=t("./axis_ids");function m(t){return Math.pow(10,t)}function y(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",f=r.charAt(0);function x(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],a=t.range[1];return.5*(n+a-2*d*Math.abs(n-a))}return h}function b(e,r,n){var o=l(e,n||t.calendar);if(o===h){if(!a(e))return h;e=+e;var s=Math.floor(10*i.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function _(e,r,n){return s(e,r,n||t.calendar)}function w(e){return t._categories[Math.round(e)]}function k(e){if(y(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return h}function T(e){if(t._categoriesMap)return t._categoriesMap[e]}function A(t){var e=T(t);return void 0!==e?e:a(t)?+t:void 0}function M(e){return a(e)?n.round(t._b+t._m*e,2):h}function E(e){return(e-t._b)/t._m}t.c2l="log"===t.type?x:c,t.l2c="log"===t.type?m:c,t.l2p=M,t.p2l=E,t.c2p="log"===t.type?function(t,e){return M(x(t,e))}:M,t.p2c="log"===t.type?function(t){return m(E(t))}:E,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=E,t.cleanPos=c):"log"===t.type?(t.d2r=t.d2l=function(t,e){return x(o(t),e)},t.r2d=t.r2c=function(t){return m(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=x,t.l2d=m,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return m(E(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=E,t.cleanPos=c):"date"===t.type?(t.d2r=t.r2d=i.identity,t.d2c=t.r2c=t.d2l=t.r2l=b,t.c2d=t.c2r=t.l2d=t.l2r=_,t.d2p=t.r2p=function(e,r,n){return t.l2p(b(e,0,n))},t.p2d=t.p2r=function(t,e,r){return _(E(t),e,r)},t.cleanPos=function(e){return i.cleanDate(e,h,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=k,t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(E(t))},t.r2p=t.d2p,t.p2r=E,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:c(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=T,t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(E(t))},t.r2p=t.d2p,t.p2r=E,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:c(t)},t.setupMultiCategory=function(n){var a,o,s=t._traceIndices,l=e._axisMatchGroups;if(l&&l.length&&0===t._categories.length)for(a=0;ap&&(s[n]=p),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else i.nestedProperty(t,e).set(o)},t.setScale=function(r){var n=e._size;if(t.overlaying){var a=v.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var i=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(i);var s=t.r2l(t[i][0],o),l=t.r2l(t[i][1],o);if("y"===f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.makeCalcdata=function(e,r){var n,a,o,s,l=t.type,c="date"===l&&e[r+"calendar"];if(r in e){if(n=e[r],s=e._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(t,e){for(var r=new Array(e),n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function v(e,r){var n=e.plotinfo,a=n.xaxis,l=n.yaxis,c=a._length,u=l._length,f=!!e.xr1,p=!!e.yr1,h=[];if(f){var d=i.simpleMap(e.xr0,a.r2l),g=i.simpleMap(e.xr1,a.r2l),v=d[1]-d[0],m=g[1]-g[0];h[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,h[2]=c*(1-r+r*m/v),a.range[0]=a.l2r(d[0]*(1-r)+r*g[0]),a.range[1]=a.l2r(d[1]*(1-r)+r*g[1])}else h[0]=0,h[2]=c;if(p){var y=i.simpleMap(e.yr0,l.r2l),x=i.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];h[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*_/b),l.range[0]=a.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=u;s.drawOne(t,a,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[a._id,l._id]);var w=f?c/h[2]:1,k=p?u/h[3]:1,T=f?h[0]:0,A=p?h[1]:0,M=f?h[0]/h[2]*c:0,E=p?h[1]/h[3]*u:0,S=a._offset-M,C=l._offset-E;n.clipRect.call(o.setTranslate,T,A).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,S,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(t)}},{"../../components/drawing":613,"../../lib":717,"../../registry":846,"./axes":765,d3:165}],788:[function(t,e,r){"use strict";var n=t("../../registry").traceIs,a=t("./axis_autotype");function i(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=i(t),a=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return a&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}e.exports=function(t,e,r,s){"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[e])return a;if((a[r+"axis"]||r)===e){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var u=l+"calendar",f=c[u],p={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(p.noMultiCategory=!0),o(c,l)){var h=i(c),d=[];for(r=0;r0?".":"")+i;a.isPlainObject(o)?l(o,e,s,n+1):e(s,i,o)}}))}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){i(t,c,s.cache),s.check=function(){if(l){var e=i(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0&&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]]]}}e.exports=function(t){return new b(t)},_.plot=function(t,e,r){var n=this,a=e[this.id],i=[],o=!1;for(var s in v.layerNameToAdjective)if("frame"!==s&&a["show"+s]){o=!0;break}for(var l=0;l0&&i._module.calcGeoJSON(a,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),c.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=o.selectAll(".point"),this.dataPoints.text=o.selectAll("text"),this.dataPaths.line=o.selectAll(".js-line");var s=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=s.selectAll("path"),this.render()}},_.updateProjection=function(t,e){var r=this.graphDiv,o=e[this.id],s=e._size,l=o.domain,c=o.projection,u=o.lonaxis,p=o.lataxis,h=u._ax,d=p._ax,g=this.projection=function(t){for(var e=t.projection.type,r=n.geo[v.projNames[e]](),a=t._isClipped?v.lonaxisSpan[e]/2:null,i=["center","rotate","parallels","clipExtent"],o=function(t){return t?r:[]},s=0;sa*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],a=t[1][1]-t[0][1],i=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),i&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),a/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(a-s*(o[1][1]+o[0][1]))/2;return i&&r.clipExtent(i),r.scale(150*s).translate([l,c])},r.precision(v.precision),a&&r.clipAngle(a-v.clipPad),r}(o),m=[[s.l+s.w*l.x[0],s.t+s.h*(1-l.y[1])],[s.l+s.w*l.x[1],s.t+s.h*(1-l.y[0])]],y=o.center||{},x=c.rotation||{},b=u.range||[],_=p.range||[];if(o.fitbounds){h._length=m[1][0]-m[0][0],d._length=m[1][1]-m[0][1],h.range=f(r,h),d.range=f(r,d);var k=(h.range[0]+h.range[1])/2,T=(d.range[0]+d.range[1])/2;if(o._isScoped)y={lon:k,lat:T};else if(o._isClipped){y={lon:k,lat:T},x={lon:k,lat:T,roll:x.roll};var A=c.type,M=v.lonaxisSpan[A]/2||180,E=v.lataxisSpan[A]/2||180;b=[k-M,k+M],_=[T-E,T+E]}else y={lon:k,lat:T},x={lon:k,lat:x.lat,roll:x.roll}}g.center([y.lon-x.lon,y.lat-x.lat]).rotate([-x.lon,-x.lat,x.roll]).parallels(c.parallels);var S=w(b,_);g.fitExtent(m,S);var C=this.bounds=g.getBounds(S),L=this.fitScale=g.scale(),O=g.translate();if(!isFinite(C[0][0])||!isFinite(C[0][1])||!isFinite(C[1][0])||!isFinite(C[1][1])||isNaN(O[0])||isNaN(O[0])){for(var P=["fitbounds","projection.rotation","center","lonaxis.range","lataxis.range"],I="Invalid geo settings, relayout'ing to default view.",D={},z=0;z-1&&d(n.event,i,[r.xaxis],[r.yaxis],r.id,f),c.indexOf("event")>-1&&l.click(i,n.event))}))}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},_.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,a="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",a),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(s.setClipUrl,a,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(t.mockAxis,r)},_.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,a=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":a.lon,"projection.rotation.lat":a.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":a.lon},i.extendFlat(this.viewInitial,e)},_.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function a(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",a).attr("transform",n)}},{"../../components/color":592,"../../components/dragelement":610,"../../components/drawing":613,"../../components/fx":630,"../../lib":717,"../../lib/geo_location_utils":711,"../../lib/topojson_utils":744,"../../registry":846,"../cartesian/autorange":764,"../cartesian/axes":765,"../cartesian/select":782,"../plots":826,"./constants":793,"./projections":798,"./zoom":799,d3:165,"topojson-client":539}],795:[function(t,e,r){"use strict";var n=t("../../plots/get_data").getSubplotCalcData,a=t("../../lib").counterRegex,i=t("./geo"),o="geo",s=a(o),l={};l.geo={valType:"subplotid",dflt:o,editType:"calc"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t("./layout_attributes"),supplyLayoutDefaults:t("./layout_defaults"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,a=e._subplots.geo,s=0;s0&&L<0&&(L+=360);var O,P,I,D=(C+L)/2;if(!h){var z=d?f.projRotate:[D,0,0];O=r("projection.rotation.lon",z[0]),r("projection.rotation.lat",z[1]),r("projection.rotation.roll",z[2]),r("showcoastlines",!d&&y)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!y&&void 0)&&r("oceancolor")}h?(P=-96.6,I=38.7):(P=d?D:O,I=(S[0]+S[1])/2),r("center.lon",P),r("center.lat",I),g&&r("projection.parallels",f.projParallels||[0,60]),r("projection.scale"),r("showland",!!y&&void 0)&&r("landcolor"),r("showlakes",!!y&&void 0)&&r("lakecolor"),r("showrivers",!!y&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==u&&y)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",y),r("subunitcolor"),r("subunitwidth")),d||r("showframe",y)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){a(t,e,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},{"../../lib":717,"../get_data":800,"../subplot_defaults":840,"./constants":793,"./layout_attributes":796}],798:[function(t,e,r){"use strict";e.exports=function(t){function e(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if("GeometryCollection"===e.type)return{type:"GeometryCollection",geometries:object.geometries.map((function(t){return r(t,n)}))};if(!c.hasOwnProperty(e.type))return null;var a=c[e.type];return t.geo.stream(e,n(a)),a.result()}t.geo.project=function(t,e){var a=e.stream;if(!a)throw new Error("not yet supported");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,a)};var n={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map((function(t){return e(t,r)}))}}},a=[],i=[],o={point:function(t,e){a.push([t,e])},result:function(){var t=a.length?a.length<2?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a}:null;return a=[],t}},s={lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){a.length&&(i.push(a),a=[])},result:function(){var t=i.length?i.length<2?{type:"LineString",coordinates:i[0]}:{type:"MultiLineString",coordinates:i}:null;return i=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){var t=a.length;if(t){do{a.push(a[0].slice())}while(++t<4);i.push(a),a=[]}},polygonEnd:u,result:function(){if(!i.length)return null;var t=[],e=[];return i.forEach((function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++rn^h>n&&r<(p-c)*(n-u)/(h-u)+c&&(a=!a)}return a}(t[0],r))return t.push(e),!0}))||t.push([e])})),i=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var f=1e-6,p=Math.PI,h=p/2,d=(Math.sqrt(p),p/180),g=180/p;function v(t){return t>1?h:t<-1?-h:Math.asin(t)}function m(t){return t>1?0:t<-1?p:Math.acos(t)}var y=t.geo.projection,x=t.geo.projectionMutator;function b(t,e){var r=(2+h)*Math.sin(e);e/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>f;n++){var i=Math.cos(e);e-=a=(e+Math.sin(e)*(i+2)-r)/(2*i*(1+i))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,h],[p,0]]],[[[-p,0],[0,-h],[p,0]]]];function a(t,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=e(t-i[o][1][0],r);return l[0]+=e(i[o][1][0],a*r>a*i[o][0][1]?i[o][0][1]:r)[0],l}function i(){r=n.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],a=e(t[2][0],t[2][1])[0],i=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return i>o&&(r=i,i=o,o=r),[[n,i],[a,o]]}))}))}e.invert&&(a.invert=function(t,i){for(var o=r[+(i<0)],s=n[+(i<0)],l=0,u=o.length;l=0;--a){var h;o=180*(h=n[1][a])[0][0]/p,s=180*h[0][1]/p,c=180*h[1][1]/p,u=180*h[2][0]/p,f=180*h[2][1]/p,r.push(l([[u-e,f-e],[u-e,c+e],[o+e,c+e],[o+e,s-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}(),i)},a},o.lobes=function(t){return arguments.length?(n=t.map((function(t){return t.map((function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]}))})),i(),o):n.map((function(t){return t.map((function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]}))}))},o},b.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=v(r),a=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+a)),v((n+r*(a+2))/(2+h))]},(t.geo.eckert4=function(){return y(b)}).raw=b;var _=t.geo.azimuthalEqualArea.raw;function w(t,e){if(arguments.length<2&&(e=t),1===e)return _;if(e===1/0)return k;function r(r,n){var a=_(r/e,n);return a[0]*=t,a}return r.invert=function(r,n){var a=_.invert(r/t,n);return a[0]*=e,a},r}function k(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function T(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function A(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function M(t){return function(e){var r,n=t*Math.sin(e),a=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>f&&--a>0);return e/2}}k.invert=function(t,e){var r=2*v(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=x(w),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=w,T.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return y(T)}).raw=T,A.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return y(A)}).raw=A,M(p);var E=function(t,e,r){var n=M(r);function a(r,a){return[t*r*Math.cos(a=n(a)),e*Math.sin(a)]}return a.invert=function(n,a){var i=v(a/e);return[n/(t*Math.cos(i)),v((2*i+Math.sin(2*i))/r)]},a}(Math.SQRT2/h,Math.SQRT2,p);function S(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return y(E)}).raw=E,S.invert=function(t,e){var r,n=e,a=25;do{var i=n*n,o=i*i;n-=r=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-e)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(Math.abs(r)>f&&--a>0);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return y(S)}).raw=S;var C=[[.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 L(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),a=Math.floor(n),i=n-a,o=(r=C[a])[0],s=r[1],l=(r=C[++a])[0],c=r[1],u=(r=C[Math.min(19,++a)])[0],f=r[1];return[t*(l+i*(u-o)/2+i*i*(u-2*l+o)/2),(e>0?h:-h)*(c+i*(f-s)/2+i*i*(f-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function P(t,e){var r,n=Math.cos(e),a=(r=m(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*a,Math.sin(e)*a]}function I(t,e){var r=P(t,e);return[(r[0]+t/h)/2,(r[1]+e)/2]}C.forEach((function(t){t[1]*=1.0144})),L.invert=function(t,e){var r=e/h,n=90*r,a=Math.min(18,Math.abs(n/5)),i=Math.max(0,Math.floor(a));do{var o=C[i][1],s=C[i+1][1],l=C[Math.min(19,i+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,p=u/c,v=f*(1-p*f*(1-2*p*f));if(v>=0||1===i){n=(e>=0?5:-5)*(v+a);var m,y=50;do{v=(a=Math.min(18,Math.abs(n)/5))-(i=Math.floor(a)),o=C[i][1],s=C[i+1][1],l=C[Math.min(19,i+2)][1],n-=(m=(e>=0?h:-h)*(s+v*(l-o)/2+v*v*(l-2*s+o)/2)-e)*g}while(Math.abs(m)>1e-12&&--y>0);break}}while(--i>=0);var x=C[i][0],b=C[i+1][0],_=C[Math.min(19,i+2)][0];return[t/(b+v*(_-x)/2+v*v*(_-2*b+x)/2),n*d]},(t.geo.robinson=function(){return y(L)}).raw=L,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return y(O)}).raw=O,P.invert=function(t,e){if(!(t*t+4*e*e>p*p+f)){var r=t,n=e,a=25;do{var i,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),h=Math.sin(2*n),d=c*c,g=u*u,v=s*s,y=1-g*l*l,x=y?m(u*l)*Math.sqrt(i=1/y):i=0,b=2*x*u*s-t,_=x*c-e,w=i*(g*v+x*u*l*d),k=i*(.5*o*h-2*x*c*s),T=.25*i*(h*s-x*c*g*o),A=i*(d*l+x*v*u),M=k*T-A*w;if(!M)break;var E=(_*k-b*A)/M,S=(b*T-_*w)/M;r-=E,n-=S}while((Math.abs(E)>f||Math.abs(S)>f)&&--a>0);return[r,n]}},(t.geo.aitoff=function(){return y(P)}).raw=P,I.invert=function(t,e){var r=t,n=e,a=25;do{var i,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,p=Math.sin(r),d=Math.cos(r/2),g=Math.sin(r/2),v=g*g,y=1-u*d*d,x=y?m(o*d)*Math.sqrt(i=1/y):i=0,b=.5*(2*x*o*g+r/h)-t,_=.5*(x*s+n)-e,w=.5*i*(u*v+x*o*d*c)+.5/h,k=i*(p*l/4-x*s*g),T=.125*i*(l*g-x*s*u*p),A=.5*i*(c*d+x*v*o)+.5,M=k*T-A*w,E=(_*k-b*A)/M,S=(b*T-_*w)/M;r-=E,n-=S}while((Math.abs(E)>f||Math.abs(S)>f)&&--a>0);return[r,n]},(t.geo.winkel3=function(){return y(I)}).raw=I}},{}],799:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../registry"),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},p={};function h(t,e){f[n+"."+t]=a.nestedProperty(l,t).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,f);var r=a.nestedProperty(u,t);r.get()!==e&&(r.set(e),a.nestedProperty(l,t).set(e),p[n+"."+t]=e)}r(h),h("projection.scale",e.scale()/t.fitScale),h("fitbounds",!1),o.emit("plotly_relayout",p)}function p(t,e){var r=u(0,e);function a(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),f(t,e,a)})),r}function h(t,e){var r,a,i,o,s,p,h,d,g,v=u(0,e);function m(t){return e.invert(t)}function y(r){var n=e.rotate(),a=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",a[0]),r("center.lat",a[1])}return v.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),a=e.rotate(),i=e.translate(),o=a,s=m(r)})).on("zoom",(function(){if(p=n.mouse(this),function(t){var r=m(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([i[0],n.event.translate[1]]),s?m(p)&&(d=m(p),h=[o[0]+(d[0]-s[0]),a[1],a[2]],e.rotate(h),o=h):s=m(r=p),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),g&&f(t,e,y)})),v}function d(t,e){var r,a={r:e.rotate(),k:e.scale()},i=u(0,e),o=function(t){for(var e=0,r=arguments.length,a=[];++ed?(i=(f>0?90:-90)-h,a=0):(i=Math.asin(f/d)*s-h,a=Math.sqrt(d*d-f*f));var g=180-i-2*h,v=(Math.atan2(p,u)-Math.atan2(c,a))*s,m=(Math.atan2(p,u)-Math.atan2(c,-a))*s;return b(r[0],r[1],i,v)<=b(r[0],r[1],g,m)?[i,v,r[2]]:[g,m,r[2]]}function b(t,e,r,n){var a=_(r-t),i=_(n-e);return Math.sqrt(a*a+i*i)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,a=t.slice(),i=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return a[i]=t[i]*l-t[s]*c,a[s]=t[s]*l+t[i]*c,a}function k(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function T(t,e){for(var r=0,n=0,a=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(i)*_*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(i>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(i=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],i||s?(i&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=a),Math.abs(c.dragStart[0]-n).999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var a=e._basePlotModules.length>1;o(t,e,r,{type:"gl3d",attributes:l,handleDefaults:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!a)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":592,"../../../lib":717,"../../../registry":846,"../../get_data":800,"../../subplot_defaults":840,"./axis_defaults":808,"./layout_attributes":811}],811:[function(t,e,r){"use strict";var n=t("./axis_attributes"),a=t("../../domain").attributes,i=t("../../../lib/extend").extendFlat,o=t("../../../lib").counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.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":717,"../../../lib/extend":708,"../../domain":790,"./axis_attributes":807}],812:[function(t,e,r){"use strict";var n=t("../../../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(t){for(var e=0;e<3;++e){var r=t[a[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new i;return e.merge(t),e}},{"../../../lib/str2rgbarray":740}],813:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[i[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var p=u.nticks||a.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/p)}for(var h=n.calcTicks(u),d=0;d/g," "));l[c]=h,u.tickmode=f}}for(e.ticks=l,c=0;c<3;++c)for(o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],a=new Array(n.length),i=0;i1&&(e=!0),e}();function w(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.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=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(e,e[this.id]),this.spikeOptions=y(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var k=w.prototype;k.tryCreatePlot=function(){var t={canvas:this.canvas,gl:this.gl,glOptions:{preserveDrawingBuffer:_,premultipliedAlpha:!0,antialias:!0},container:this.container,axes:this.axesOptions,spikes:this.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:this.camera,pixelRatio:this.pixelRatio};if(this.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");t.gl=a,t.canvas=n}var e=0;try{this.glplot=s(t)}catch(r){e++;try{this.glplot=s(t)}catch(t){e++}}return e<2},k.initializeGLCamera=function(){var t=this.fullSceneLayout.camera,e="orthographic"===t.projection.type;this.camera=o(this.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:e,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio()),e},a=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas.addEventListener("mouseup",(function(){a(t)})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,i=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*i.x,y:n*i.y,z:n*i.z})}a(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},k.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,a=e.container.getBoundingClientRect(),i=a.width,o=a.height;n.setAttributeNS(null,"viewBox","0 0 "+i+" "+o),n.setAttributeNS(null,"width",i),n.setAttributeNS(null,"height",o),x(e),e.glplot.axes.update(e.axesOptions);for(var s,l=Object.keys(e.traces),c=null,u=e.glplot.selection,d=0;d")):"isosurface"===t.type||"volume"===t.type?(w.valueLabel=p.tickText(e._mockAxis,e._mockAxis.d2l(u.traceCoordinate[3]),"hover").text,M.push("value: "+w.valueLabel),u.textLabel&&M.push(u.textLabel),y=M.join("
")):y=u.textLabel;var E={x:u.traceCoordinate[0],y:u.traceCoordinate[1],z:u.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:_};h.appendArrayPointValue(E,b,_),t._module.eventData&&(E=b._module.eventData(E,u,b,{},_));var S={points:[E]};e.fullSceneLayout.hovermode&&h.loneHover({trace:b,x:(.5+.5*m[0]/m[3])*i,y:(.5-.5*m[1]/m[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:y,name:c.name,color:h.castHoverOption(b,_,"bgcolor")||c.color,borderColor:h.castHoverOption(b,_,"bordercolor"),fontFamily:h.castHoverOption(b,_,"font.family"),fontSize:h.castHoverOption(b,_,"font.size"),fontColor:h.castHoverOption(b,_,"font.color"),nameLength:h.castHoverOption(b,_,"namelength"),textAlign:h.castHoverOption(b,_,"align"),hovertemplate:f.castOption(b,_,"hovertemplate"),hovertemplateLabels:f.extendFlat({},E,w),eventData:[E]},{container:n,gd:r}),u.buttons&&u.distance<5?r.emit("plotly_click",S):r.emit("plotly_hover",S),s=S}else h.loneUnhover(n),r.emit("plotly_unhover",s);e.drawAnnotations(e)},k.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var T=["xaxis","yaxis","zaxis"];function A(t,e,r){for(var n=t.fullSceneLayout,a=0;a<3;a++){var i=T[a],o=i.charAt(0),s=n[i],l=e[o],c=e[o+"calendar"],u=e["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var p,h=0;h<(u||l.length);h++)if(f.isArrayOrTypedArray(l[h]))for(var d=0;dg[1][i])g[0][i]=-1,g[1][i]=1;else{var S=g[1][i]-g[0][i];g[0][i]-=S/32,g[1][i]+=S/32}if("reversed"===s.autorange){var C=g[0][i];g[0][i]=g[1][i],g[1][i]=C}}else{var L=s.range;g[0][i]=s.r2l(L[0]),g[1][i]=s.r2l(L[1])}g[0][i]===g[1][i]&&(g[0][i]-=1,g[1][i]+=1),v[i]=g[1][i]-g[0][i],this.glplot.setBounds(i,{min:g[0][i]*p[i],max:g[1][i]*p[i]})}var O,P=[1,1,1];for(i=0;i<3;++i){var I=m[l=(s=c[T[i]]).type];P[i]=Math.pow(I.acc,1/I.count)/p[i]}if("auto"===c.aspectmode)O=Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1];else if("cube"===c.aspectmode)O=[1,1,1];else if("data"===c.aspectmode)O=P;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var D=c.aspectratio;O=[D.x,D.y,D.z]}c.aspectratio.x=u.aspectratio.x=O[0],c.aspectratio.y=u.aspectratio.y=O[1],c.aspectratio.z=u.aspectratio.z=O[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z});var z=c.domain||null,R=e._size||null;if(z&&R){var F=this.container.style;F.position="absolute",F.left=R.l+z.x[0]*R.w+"px",F.top=R.t+(1-z.y[1])*R.h+"px",F.width=R.w*(z.x[1]-z.x[0])+"px",F.height=R.h*(z.y[1]-z.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=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},k.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},k.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),this.glplot.setAspectratio(t.aspectratio),"orthographic"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},k.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var a=["up","center","eye"],i=["x","y","z"];return e[a[r]]&&t[a[r]][i[n]]===e[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(e,r,i,o)){a=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(a=!0)}return a},k.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},k.saveLayout=function(t){var e,r,n,a,i,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),p=l||c;if(p){var h={};l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+".camera")).get(),h[this.id+".camera"]=n),c&&(a=this.glplot.getAspectratio(),o=(i=f.nestedProperty(t,this.id+".aspectratio")).get(),h[this.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",t,s._preGUI,h),l&&(r.set(e),f.nestedProperty(s,this.id+".camera").set(e)),c&&(i.set(a),f.nestedProperty(s,this.id+".aspectratio").set(a),this.glplot.redraw())}return p},k.updateFx=function(t,e){var r=this.camera;if(r)if("orbit"===t)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===t){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 c=this.id+".camera.up",p={x:0,y:0,z:1},h={};h[c]=p;var d=n.layout;u.call("_storeDirectGUIEdit",d,a._preGUI,h),i.up=p,f.nestedProperty(d,c).set(p)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},k.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,a=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*a*4);e.readPixels(0,0,r,a,e.RGBA,e.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);e.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\')'}}},{}],819:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r=t.split(" "),a=r[0],i=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(a){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(i){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},{"../../lib":717}],820:[function(t,e,r){"use strict";var n=t("mapbox-gl"),a=t("../../lib"),i=t("../../plots/get_data").getSubplotCalcData,o=t("../../constants/xmlns_namespaces"),s=t("d3"),l=t("../../components/drawing"),c=t("../../lib/svg_text_utils"),u=t("./mapbox"),f=r.constants=t("./constants");function p(t){return"string"==typeof t&&(-1!==f.styleValuesMapbox.indexOf(t)||0===t.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=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==f.requiredVersion)throw new Error(f.wrongVersionErrorMsg);var s=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],i=[],o=!1,s=!1,l=0;l1&&a.warn(f.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(" ")),"")}(t,o);n.accessToken=s;for(var l=0;lx/2){var b=g.split("|").join("
");m.text(b).attr("data-unformatted",b).call(c.convertToTspans,t),y=l.bBox(m.node())}m.attr("transform","translate(-3, "+(8-y.height)+")"),v.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var _=1;y.width+6>x&&(_=x/(y.width+6));var w=[n.l+n.w*u.x[1],n.t+n.h*(1-u.y[0])];v.attr("transform","translate("+w[0]+","+w[1]+") scale("+_+")")}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function c(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"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":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}s.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=l(t)},s.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates})},s.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,l(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=t.sourceattribution),a}(t);e.addSource(this.idSource,r)}},s.updateLayer=function(t){var e,r=this.subplot,n=c(t),a=this.subplot.belowLookup["layout-"+this.index];if("traces"===a)for(var o=r.getMapLayers(),s=0;s1)for(r=0;r-1&&f(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&a.click(n,e.originalEvent)}}},g.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a="select"===o?function(t,r){(t.range={})[e.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(l)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),"select"===o||"lasso"===o?(r.dragPan.disable(),r.on("zoomstart",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){u(t,r,n,e.dragOptions,o)},c.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearSelect),e.div.onmousedown=null,e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function l(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},g.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},g.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=e._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){m.sendDataToCloud(t)}));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})}}(t,o),s.text(o.text()&&u.text()?" - ":"")}},m.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=m.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],_=["year","month","dayMonth","dayMonthYear"];function w(t,e){var r=t._context.locale,n=!1,a={};function o(t){for(var r=!0,i=0;i1&&P.length>1){for(i.getComponentMethod("grid","sizeDefaults")(c,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"),m.linkSubplots(f,s,u,a),m.cleanPlot(f,s,u,a),a._zoomlayer&&!t._dragging&&a._zoomlayer.selectAll(".select-outline").remove(),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var a=0;a0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var p=m.layoutAttributes.width.min,h=m.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),m.sanitizeMargins(r)},m.supplyLayoutModuleDefaults=function(t,e,r,n){var a,o,s,c=i.componentsRegistry,u=e._basePlotModules,f=i.subplotsRegistry.cartesian;for(a in c)(s=c[a]).includeBasePlot&&s.includeBasePlot(t,e);for(var p in u.length||u.push(f),e._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[p].sort(l.subplotSort);for(o=0;o.5*n.width&&(l.log("Margin push",e,"is too big in x, dropping"),r.l=r.r=0),r.b+r.t>.5*n.height&&(l.log("Margin push",e,"is too big in y, dropping"),r.b=r.t=0);var c=void 0!==r.xl?r.xl:r.x,u=void 0!==r.xr?r.xr:r.x,f=void 0!==r.yt?r.yt:r.y,p=void 0!==r.yb?r.yb:r.y;a[e]={l:{val:c,size:r.l+o},r:{val:u,size:r.r+o},b:{val:p,size:r.b+o},t:{val:f,size:r.t+o}},i[e]=1}else delete a[e],delete i[e];if(!n._replotting)return m.doAutoMargin(t)}},m.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),M(e);var r=e._size,n=e.margin,o=l.extendFlat({},r),s=n.l,c=n.r,u=n.t,f=n.b,p=e.width,h=e.height,d=e._pushmargin,g=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in d)g[v]||delete d[v];for(var y in d.base={l:{val:0,size:s},r:{val:1,size:c},t:{val:1,size:u},b:{val:0,size:f}},d){var x=d[y].l||{},b=d[y].b||{},_=x.val,w=x.size,k=b.val,T=b.size;for(var A in d){if(a(w)&&d[A].r){var E=d[A].r.val,S=d[A].r.size;if(E>_){var C=(w*E+(S-p)*_)/(E-_),L=(S*(1-_)+(w-p)*(1-E))/(E-_);C>=0&&L>=0&&p-(C+L)>0&&C+L>s+c&&(s=C,c=L)}}if(a(T)&&d[A].t){var O=d[A].t.val,P=d[A].t.size;if(O>k){var I=(T*O+(P-h)*k)/(O-k),D=(P*(1-k)+(T-h)*(1-O))/(O-k);I>=0&&D>=0&&h-(D+I)>0&&I+D>f+u&&(f=I,u=D)}}}}}if(r.l=Math.round(s),r.r=Math.round(c),r.t=Math.round(u),r.b=Math.round(f),r.p=Math.round(n.pad),r.w=Math.round(p)-r.l-r.r,r.h=Math.round(h)-r.t-r.b,!e._replotting&&m.didMarginChange(o,r)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var z=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return i.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var o=0,s=0;function l(){return o++,function(){var e;s++,n||s!==o||(e=a,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return i.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(l),setTimeout(l())}))}],o=l.syncOrAsync(a,t);return o&&o.then||(o=Promise.resolve()),o.then((function(){return t}))}m.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},m.graphJson=function(t,e,r,n,a){(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&m.supplyDefaults(t);var i=a?t._fullData:t.data,o=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if("function"==typeof t)return null;if(l.isPlainObject(t)){var e,n,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;a[e]=c(t[e])}return a}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(i||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),"object"===n?u:JSON.stringify(u)},m.modifyFrames=function(t,e){var r,n,a,i=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(i=n.calc(t,r))}Array.isArray(i)&&i[0]||(i=[{x:u,y:u}]),i[0].t||(i[0].t={}),i[0].trace=r,d[e]=i}}for(L(c,p,h),a=0;a1e-10?t:0}function p(t,e,r){e=e||0,r=r||0;for(var n=t.length,a=new Array(n),i=0;i0?r:1/0})),a=n.mod(r+1,e.length);return[e[r],e[a]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var a=-e*r,i=e*e+1,o=2*(e*a-r),s=a*a+r*r-t*t,l=Math.sqrt(o*o-4*i*s),c=(-o+l)/(2*i),u=(-o-l)/(2*i);return[[c,e*c+a+n],[u,e*u+a+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,a,i){return"M"+p(u(t,e,r,n),a,i).join("L")},pathPolygonAnnulus:function(t,e,r,n,a,i,o){var s,l;t=0?p.angularAxis.domain:n.extent(k),S=Math.abs(k[1]-k[0]);A&&!T&&(S=0);var C=E.slice();M&&T&&(C[1]+=S);var L=p.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),p.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var O=p.angularAxis.ticksStep||(C[1]-C[0])/(L*(p.minorTicks+1));w&&(O=Math.max(Math.round(O),1)),C[2]||(C[2]=O);var P=n.range.apply(this,C);if(P=P.map((function(t,e){return parseFloat(t.toPrecision(12))})),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===p.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=M?S:0,void 0===(t=n.select(this).select("svg.chart-root"))||t.empty()){var I=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),D=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(D)}t.select(".guides-group").style({"pointer-events":"none"}),t.select(".angular.axis-group").style({"pointer-events":"none"}),t.select(".radial.axis-group").style({"pointer-events":"none"});var z,R=t.select(".chart-group"),F={fill:"none",stroke:p.tickColor},B={"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(t,e){return" "+t+" 0 "+p.font.outlineColor})).join(",")};if(p.showLegend){z=t.select(".legend-group").attr({transform:"translate("+[x,p.margin.top]+")"}).style({display:"block"});var N=h.map((function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r}));o.Legend().config({data:h.map((function(t,e){return t.name||"Element"+e})),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:z,elements:N,reverseOrder:p.legend.reverseOrder})})();var j=z.node().getBBox();x=Math.min(p.width-j.width-p.margin.left-p.margin.right,p.height-p.margin.top-p.margin.bottom)/2,x=Math.max(10,x),_=[p.margin.left+x,p.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),z.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else z=t.select(".legend-group").style({display:"none"});t.attr({width:p.width,height:p.height}).style({opacity:p.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(p.width-(p.margin.left+p.margin.right+2*x+(j?j.width:0)))/2,(p.height-(p.margin.top+p.margin.bottom+2*x))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),t.select(".outer-group").attr("transform","translate("+V+")"),p.title&&p.title.text){var U=t.select("g.title-group text").style(B).text(p.title.text),q=U.node().getBBox();U.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(".radial.axis-group");if(p.radialAxis.gridLinesVisible){var G=H.selectAll("circle.grid-circle").data(r.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",r),G.exit().remove()}H.select("circle.outside-circle").attr({r:x}).style(F);var W=t.select("circle.background-circle").attr({r:x}).style({fill:p.backgroundColor,stroke:p.stroke});function Y(t,e){return s(t)%360+p.orientation}if(p.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:"rotate("+p.radialAxis.orientation+")"}),H.selectAll(".domain").style(F),H.selectAll("g>text").text((function(t,e){return this.textContent+p.radialAxis.ticksSuffix})).style(B).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===p.radialAxis.tickOrientation?"rotate("+-p.radialAxis.orientation+") translate("+[0,B["font-size"]]+")":"translate("+[0,B["font-size"]]+")"}}),H.selectAll("g>line").style({stroke:"black"})}var Z=t.select(".angular.axis-group").selectAll("g.angular-tick").data(P),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+Y(t)+")"}}).style({display:p.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",(function(t,e){return e%(p.minorTicks+1)==0})).classed("minor",(function(t,e){return!(e%(p.minorTicks+1)==0)})).style(F),J.selectAll(".minor").style({stroke:p.minorTickColor}),Z.select("line.grid-line").attr({x1:p.tickLength?x-p.tickLength:0,x2:x}).style({display:p.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(B);var K=Z.select("text.axis-text").attr({x:x+p.labelOffset,dy:i+"em",transform:function(t,e){var r=Y(t),n=x+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(t,e){return e%(p.minorTicks+1)!=0?"":w?w[t]+p.angularAxis.ticksSuffix:t+p.angularAxis.ticksSuffix})).style(B);p.angularAxis.rewriteTicks&&K.text((function(t,e){return e%(p.minorTicks+1)!=0?"":p.angularAxis.rewriteTicks(this.textContent,e)}));var $=n.max(R.selectAll(".angular-tick text")[0].map((function(t,e){return t.getCTM().e+t.getBBox().width})));z.attr({transform:"translate("+[x+$,p.margin.top]+")"});var Q=t.select("g.geometry-group").selectAll("g").size()>0,tt=t.select("g.geometry-group").selectAll("g.geometry").data(h);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),h[0]||Q){var et=[];h.forEach((function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter((function(t,r){return r==e})),n.geometry=t.geometry,n.orientation=p.orientation,n.direction=p.direction,n.index=e,et.push({data:t,geometryConfig:n})}));var rt=n.nest().key((function(t,e){return void 0!==t.data.groupId||"unstacked"})).entries(et),nt=[];rt.forEach((function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map((function(t,e){return[t]}))):nt.push(t.values)})),nt.forEach((function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map((function(t,e){return a(o[r].defaultConfig(),t)}));o[r]().config(n)()}))}var at,it,ot=t.select(".guides-group"),st=t.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!T){var ft=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",(function(t,e){var r=o.util.getMousePos(W).angle;ft.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-p.orientation)%360;at=s.invert(n);var a=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(at)).move([a[0]+_[0],a[1]+_[1]])})).on("mouseout.angular-guide",(function(t,e){ot.select("line").style({opacity:0})}))}var pt=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",(function(t,e){var n=o.util.getMousePos(W).radius;pt.attr({r:n}).style({opacity:.5}),it=r.invert(o.util.getMousePos(W).radius);var a=o.util.convertToCartesian(n,p.radialAxis.orientation);ct.text(o.util.round(it)).move([a[0]+_[0],a[1]+_[1]])})).on("mouseout.radial-guide",(function(t,e){pt.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()})),t.selectAll(".geometry-group .mark").on("mouseover.tooltip",(function(e,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 c={t:o.util.round(e[0]),r:o.util.round(e[1])};T&&(c.t=w[e[0]]);var u="t: "+c.t+", r: "+c.r,f=this.getBoundingClientRect(),p=t.node().getBoundingClientRect(),h=[f.left+f.width/2-V[0]-p.left,f.top+f.height/2-V[1]-p.top];ut.config({color:s}).text(u),ut.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(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()})).on("mouseout.tooltip",(function(t,e){ut.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")})}))}))}(c),this},config:function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach((function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)})),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},getLiveConfig:function(){return u},getinputConfig:function(){return c},radialScale:function(t){return r},angularScale:function(t){return s},svg:function(){return t}};return n.rebind(p,f,"on"),p},o.Axis.defaultConfig=function(t,e){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(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map((function(e,r){var n=e*Math.PI/180;return[e,t(n)]}))},o.util.dataFromEquation=function(t,e,r){var a=e||6,i=[],o=[];n.range(0,360+a,a).forEach((function(e,r){var n=e*Math.PI/180,a=t(n);i.push(e),o.push(a)}));var s={t:i,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map((function(t,e){return r[e]||r[0]}))},o.util.fillArrays=function(t,e,r){return e.forEach((function(e,n){t[e]=o.util.ensureArray(t[e],r)})),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map((function(t,e){return n.sum(t)}))},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter((function(t,e,r){return r.indexOf(t)==e}))},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],a=e[1],i={};return i.x=r,i.y=a,i.pos=e,i.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,i.radius=Math.sqrt(r*r+a*a),i},o.util.duplicatesCount=function(t){for(var e,r={},n={},a=0,i=t.length;a0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(t,r){return"rotate("+(e.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return d.fill(r,a,i)},"fill-opacity":0,stroke:function(t,e){return d.stroke(r,a,i)},"stroke-width":function(t,e){return d["stroke-width"](r,a,i)},"stroke-dasharray":function(t,e){return d["stroke-dasharray"](r,a,i)},opacity:function(t,e){return d.opacity(r,a,i)},display:function(t,e){return d.display(r,a,i)}})}};var f=e.angularScale.range(),p=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,h=n.svg.arc().startAngle((function(t){return-p/2})).endAngle((function(t){return p/2})).innerRadius((function(t){return e.radialScale(l+(t[2]||0))})).outerRadius((function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])}));c.arc=function(t,r,a){n.select(this).attr({class:"mark arc",d:h,transform:function(t,r){return"rotate("+(e.orientation+s(t[0])+90)+")"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},"stroke-width":function(e,r,n){return t[n].data.strokeSize+"px"},"stroke-dasharray":function(e,n,a){return r[t[a].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return void 0===t[n].data.visible||t[n].data.visible?"block":"none"}},g=n.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var v=g.selectAll("path.mark").data((function(t,e){return t}));v.enter().append("path").attr({class:"mark"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()}))}return i.config=function(e){return arguments.length?(e.forEach((function(e,r){t[r]||(t[r]={}),a(t[r],o.PolyChart.defaultConfig()),a(t[r],e)})),this):t},i.getColorScale=function(){},n.rebind(i,e,"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 t=o.Legend.defaultConfig(),e=n.dispatch("hover");function r(){var e=t.legendConfig,i=t.data.map((function(t,r){return[].concat(t).map((function(t,n){var i=a({},e.elements[r]);return i.name=t,i.color=[].concat(e.elements[r].color)[n],i}))})),o=n.merge(i);o=o.filter((function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||void 0===e.elements[r].visibleInLegend)})),e.reverseOrder&&(o=o.reverse());var s=e.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map((function(t,e){return t.color})),c=e.fontSize,u=null==e.isContinuous?"number"==typeof o[0]:e.isContinuous,f=u?e.height:c*o.length,p=s.classed("legend-group",!0).selectAll("svg").data([0]),h=p.enter().append("svg").attr({width:300,height:f+c,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 d=n.range(o.length),g=n.scale[u?"linear":"ordinal"]().domain(d).range(l),v=n.scale[u?"linear":"ordinal"]().domain(d)[u?"range":"rangePoints"]([0,f]);if(u){var m=p.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);m.enter().append("stop"),m.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),p.append("rect").classed("legend-mark",!0).attr({height:e.height,width:e.colorBandWidth,fill:"url(#grad1)"})}else{var y=p.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r,a,i,o=t.symbol;return i=3*(a=c),"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(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient("right"),b=p.select("g.legend-axis").attr({transform:"translate("+[u?e.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?e.textColor:"none"}),b.selectAll("text").style({fill:e.textColor,"font-size":e.fontSize}).text((function(t,e){return o[e].name})),r}return r.config=function(e){return arguments.length?(a(t,e),this):t},n.rebind(r,e,"on"),r},o.Legend.defaultConfig=function(t,e){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 t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=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"}),e=n.append("text").attr({dx:i.padding+l,dy:.3*+i.fontSize}),c};return c.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",f=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(f);var p=i.padding,h=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},g=h.width+2*p+l,v=h.height+2*p;return r.attr({d:"M"+[[l,-v/2],[l,-v/4],[i.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[l,-v/2+2*p]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return a(i,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map((function(t,r){var n=a({},t);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(t,r){o.util.translator.apply(null,t.concat(e))})),e||delete n.marker,e&&delete n.groupId,e?("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})),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map((function(t,e){return t.geometry})));r.data.forEach((function(t,e){var n=i.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)}))}if(t.layout){var s=a({},t.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(t,r){o.util.translator.apply(null,t.concat(e))})),e?(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"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach((function(t,e){u[c[l.indexOf(t.key)]]=t.value})),s.margin=u}e&&(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 t}},{"../../../constants/alignment":686,"../../../lib":717,d3:165}],836:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../../lib"),i=t("../../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=a.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,a,i,u,f=new s;function p(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),e=e?l(e,r):r,a||(a=o.Axis()),i=o.adapter.plotly().convert(e),a.config(i).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return p.isPolar=!0,p.svg=function(){return a.svg()},p.getConfig=function(){return e},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 t,n,a=this,i=o.util.cloneJson(e);t=i,n=r,f.add({undo:function(){n&&a(n)},redo:function(){a(t)}}),r=o.util.cloneJson(i)},p.undo=function(){f.undo()},p.redo=function(){f.redo()},p},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:i.background,_container:e,_paperdiv:r,_paper:a};t._fullLayout=l(o,t.layout)}},{"../../../components/color":592,"../../../lib":717,"./micropolar":835,"./undo_manager":837,d3:165}],837:[function(t,e,r){"use strict";e.exports=function(){var t,e=[],r=-1,n=!1;function a(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(a(n,"undo"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(a(n,"redo"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&p<=0?0:Math.max(u,p),e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f),r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&p>=0?0:Math.min(u,p),n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f),[e,r,n,a]}(p),x=y[2]-y[0],b=y[3]-y[1],_=f/u,w=Math.abs(b/x);_>w?(h=u,m=(f-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=f,m=(u-(h=f/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=h,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],T=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=h/x,M=this.innerRadius=e.hole*A,E=this.cx=k-A*y[0],L=this.cy=T+A*y[3],O=this.cxx=E-k,P=this.cyy=L-T;this.radialAxis=this.mockAxis(t,e,a,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[a.side],domain:[M/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,i,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:"x",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var I=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",I).attr("transform",R(O,P)),r.frontplot.attr("transform",R(k,T)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",I).attr("transform",R(E,L)).call(s.fill,e.bgcolor)},P.mockAxis=function(t,e,r,n){var a=o.extendFlat({},r,n);return p(a,e,t),a},P.mockCartesianAxis=function(t,e,r){var n=this,a=r._id,i=o.extendFlat({type:"linear"},r);f(i,t);var s={x:[0,2],y:[1,3]};return i.setRange=function(){var t=n.sectorBBox,r=s[a],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);i.range=[t[r[0]]*l,t[r[1]]*l]},i.isPtWithinRange="x"===a?function(t){return n.isPtInside(t)}:function(){return!0},i.setRange(),i.setScale(),i},P.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,a=e.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(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,f=r.cy,p=e.radialaxis,h=S(e.sector[0],360),d=r.radialAxis,g=l90&&h<=270&&(d.tickangle=180);var v=function(t){return"translate("+(d.l2p(t.x)+l)+",0)"},m=I(p);if(r.radialTickLayout!==m&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),g){d.setScale();var y=u.calcTicks(d),x=u.clipEnds(d,y),b=u.getTickSigns(d)[2];u.drawTicks(n,d,{vals:y,layer:a["radial-axis"],path:u.makeTickPath(d,0,b),transFn:v,crisp:!1}),u.drawGrid(n,d,{vals:x,layer:a["radial-grid"],path:function(t){return r.pathArc(d.r2p(t.x)+l)},transFn:o.noop,crisp:!1}),u.drawLabels(n,d,{vals:y,layer:a["radial-axis"],transFn:v,labelFns:u.makeLabelFns(d,0)})}var _=r.radialAxisAngle=r.vangles?L(D(C(p.angle),r.vangles)):p.angle,w=R(c,f),k=w+F(-_);z(a["radial-axis"],g&&(p.showticklabels||p.ticks),{transform:k}),z(a["radial-grid"],g&&p.showgrid,{transform:w}),z(a["radial-line"].select("line"),g&&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(t,e,r){var n=this.gd,a=this.radius,i=this.cx,o=this.cy,s=e.radialaxis,c=this.id+"title",u=void 0!==r?r:this.radialAxisAngle,f=C(u),p=Math.cos(f),h=Math.sin(f),d=0;if(s.title){var g=l.bBox(this.layers["radial-axis"].node()).height,v=s.title.font.size;d="counterclockwise"===s.side?-g-.4*v:g+.8*v}this.layers["radial-axis-title"]=m.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:E(n,"Click to enter radial axis title"),attributes:{x:i+a/2*p+d*h,y:o-a/2*h+d*p,"text-anchor":"middle"},transform:{rotate:-u}})},P.updateAngularAxis=function(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,f=r.cy,p=e.angularaxis,h=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",p.rotation),h.setGeometry(),h.setScale();var d=function(t){return h.t2g(t.x)};"linear"===h.type&&"radians"===h.thetaunit&&(h.tick0=L(h.tick0),h.dtick=L(h.dtick));var g=function(t){return R(c+i*Math.cos(t),f-i*Math.sin(t))},v=u.makeLabelFns(h,0).labelStandoff,m={xFn:function(t){var e=d(t);return Math.cos(e)*v},yFn:function(t){var e=d(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(v+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*T)},anchorFn:function(t){var e=d(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=d(t);return-.5*(1+Math.sin(n))*r}},y=I(p);r.angularTickLayout!==y&&(a["angular-axis"].selectAll("."+h._id+"tick").remove(),r.angularTickLayout=y);var x,b=u.calcTicks(h);if("linear"===e.gridshape?(x=b.map(d),o.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,"category"===h.type&&(b=b.filter((function(t){return o.isAngleInsideSector(d(t),r.sectorInRad)}))),h.visible){var _="inside"===h.ticks?-1:1,w=(h.linewidth||1)/2;u.drawTicks(n,h,{vals:b,layer:a["angular-axis"],path:"M"+_*w+",0h"+_*h.ticklen,transFn:function(t){var e=d(t);return g(e)+F(-L(e))},crisp:!1}),u.drawGrid(n,h,{vals:b,layer:a["angular-grid"],path:function(t){var e=d(t),r=Math.cos(e),n=Math.sin(e);return"M"+[c+l*r,f-l*n]+"L"+[c+i*r,f-i*n]},transFn:o.noop,crisp:!1}),u.drawLabels(n,h,{vals:b,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:function(t){return g(d(t))},labelFns:m})}z(a["angular-line"].select("path"),p.showline,{d:r.pathSubplot(),transform:R(c,f)}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},P.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},P.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,f=e.innerRadius,p=e.cx,h=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,T=e.radialAxis,E=M.clampTiny,S=M.findXYatLength,C=M.findEnclosingVertexAngles,L=A.cornerHalfWidth,O=A.cornerLen/2,P=d.makeDragger(o,"path","maindrag","crosshair");n.select(P).attr("d",e.pathSubplot()).attr("transform",R(p,h));var I,D,z,F,B,N,j,V,U,q={element:P,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function W(t,e){return Math.atan2(_-e,t-m)}function Y(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=O/t,a=r-n,i=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return"M"+Y(s,a)+"A"+[s,s]+" 0,0,0 "+Y(s,i)+"L"+Y(l,i)+"A"+[l,l]+" 0,0,1 "+Y(l,a)+"Z"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var a,i,o=Y(t,r),s=Y(t,n),l=E((o[0]+s[0])/2),c=E((o[1]+s[1])/2);if(l&&c){var u=c/l,f=-1/u,p=S(L,u,l,c);a=S(O,f,p[0][0],p[0][1]),i=S(O,f,p[1][0],p[1][1])}else{var h,d;c?(h=O,d=L):(h=L,d=O),a=[[l-h,c-d],[l+h,c-d]],i=[[l-h,c+d],[l+h,c+d]]}return"M"+a.join("L")+"L"+i.reverse().join("L")+"Z"}function J(t,e){return e=Math.max(Math.min(e,u),f),tl?(t-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),a.indexOf("event")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,i){var o=r._fullLayout.dragmode,l=P.getBoundingClientRect();if(I=n-l.left,D=i-l.top,k){var c=M.findPolygonOffset(u,w[0],w[1],k);I+=m+c[0],D+=_+c[1]}switch(o){case"zoom":q.moveFn=k?tt:$,q.clickFn=nt,q.doneFn=et,function(){z=null,F=null,B=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=a(t.bgcolor).getLuminance(),(V=d.makeZoombox(s,j,p,h,B)).attr("fill-rule","evenodd"),U=d.makeCorners(s,p,h),b(r)}();break;case"select":case"lasso":y(t,n,i,q,o)}},P.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=P,r._fullLayout._hoversubplot=e.id},P.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},P.updateRadialDrag=function(t,e,r){var a=this,s=a.gd,l=a.layers,c=a.radius,u=a.innerRadius,f=a.cx,p=a.cy,h=a.radialAxis,v=A.radialDragBoxSize,m=v/2;if(h.visible){var y,x,_,T=C(a.radialAxisAngle),M=h._rl,E=M[0],S=M[1],O=M[r],P=.75*(M[1]-M[0])/(1-e.hole)/c;r?(y=f+(c+m)*Math.cos(T),x=p-(c+m)*Math.sin(T),_="radialdrag"):(y=f+(u-m)*Math.cos(T),x=p-(u-m)*Math.sin(T),_="radialdrag-inner");var I,B,N,j=d.makeRectDragger(l,_,"crosshair",-m,-m,v,v),V={element:j,gd:s};z(n.select(j),h.visible&&u0==(r?N>E:Nn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*i},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var a=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?i(t):t}(a(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,a){var i,o,s=e[a],l=e._length,c=function(r){return t.d2c(r,e.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=u&&(h.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,n){var a=f[e._name];function o(r,n){return i.coerce(t,e,a,r,n)}o("uirevision",n.uirevision),e.type="linear";var p=o("color"),h=p!==a.color.dflt?p:r.font.color,d=e._name.charAt(0).toUpperCase(),g="Component "+d,v=o("title.text",g);e._hovertitle=v===g?v:d,i.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:h}),o("min"),c(t,e,o,"linear"),s(t,e,o,"linear",{}),l(t,e,o,{outerTicks:!0}),o("showticklabels")&&(i.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:h}),o("tickangle"),o("tickformat")),u(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}e.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:f,handleDefaults:h,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":592,"../../lib":717,"../../plot_api/plot_template":755,"../cartesian/line_grid_defaults":779,"../cartesian/tick_label_defaults":784,"../cartesian/tick_mark_defaults":785,"../cartesian/tick_value_defaults":786,"../subplot_defaults":840,"./layout_attributes":843}],845:[function(t,e,r){"use strict";var n=t("d3"),a=t("tinycolor2"),i=t("../../registry"),o=t("../../lib"),s=o._,l=t("../../components/color"),c=t("../../components/drawing"),u=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,p=t("../plots"),h=t("../cartesian/axes"),d=t("../../components/dragelement"),g=t("../../components/fx"),v=t("../../components/titles"),m=t("../cartesian/select").prepSelect,y=t("../cartesian/select").selectOnClick,x=t("../cartesian/select").clearSelect,b=t("../cartesian/constants");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var a=0;ak*x?a=(i=x)*k:i=(a=y)/k,o=v*a/y,s=m*i/x,r=e.l+e.w*d-a/2,n=e.t+e.h*(1-g)-i/2,p.x0=r,p.y0=n,p.w=a,p.h=i,p.sum=b,p.xaxis={type:"linear",range:[_+2*T-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:"x"},u(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[_,b-w-T],domain:[g-s/2,g+s/2],_id:"y"},u(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=f({},t.aaxis,{range:[_,b-w-T],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(M,p.graphDiv._fullLayout),M.setScale();var E=p.baxis=f({},t.baxis,{range:[b-_-T,w],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});u(E,p.graphDiv._fullLayout),E.setScale();var S=p.caxis=f({},t.caxis,{range:[b-_-w,T],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(S,p.graphDiv._fullLayout),S.setScale();var C="M"+r+","+(n+i)+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDef.select("path").attr("d",C),p.layers.plotbg.select("path").attr("d",C);var L="M0,"+i+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDefRelative.select("path").attr("d",L);var O="translate("+r+","+n+")";p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",O),p.clipDefRelative.select("path").attr("transform",null);var P="translate("+(r-E._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,"+-M._offset+")";p.layers.aaxis.attr("transform",I),p.layers.agrid.attr("transform",I);var D="translate("+(r+a/2)+","+n+")rotate(-30)translate(0,"+-S._offset+")";p.layers.caxis.attr("transform",D),p.layers.cgrid.attr("transform",D),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+i)+"l"+a/2+",-"+i:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",E.showline?"M"+r+","+(n+i)+"h"+a:"M0,0").call(l.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",S.showline?"M"+(r+a/2)+","+n+"l"+a/2+","+i:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},w.drawAxes=function(t){var e=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),t){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)),c=(i.showticklabels?i.tickfont.size:0)+("outside"===i.ticks?i.ticklen:0)+3;n["a-title"]=v.draw(e,"a"+r,{propContainer:a,propName:this.id+".aaxis.title",placeholder:s(e,"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"]=v.draw(e,"b"+r,{propContainer:i,propName:this.id+".baxis.title",placeholder:s(e,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*i.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=v.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(e,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,"text-anchor":"middle"}})}},w.drawAx=function(t){var e,r=this.graphDiv,n=t._name,a=n.charAt(0),i=t._id,s=this.layers[n],l=a+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll("."+i+"tick").remove(),this[l]=c),t.setScale();var u=h.calcTicks(t),f=h.clipEnds(t,u),p=h.makeTransFn(t),d=h.getTickSigns(t)[2],g=o.deg2rad(30),v=d*(t.linewidth||1)/2,m=d*t.ticklen,y=this.w,x=this.h,b="b"===a?"M0,"+v+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+v+",0l"+Math.cos(g)*m+","+-Math.sin(g)*m,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[a];h.drawTicks(r,t,{vals:"inside"===t.ticks?f:u,layer:s,path:b,transFn:p,crisp:!1}),h.drawGrid(r,t,{vals:f,layer:this.layers[a+"grid"],path:_,transFn:p,crisp:!1}),h.drawLabels(r,t,{vals:u,layer:s,transFn:p,labelFns:h.makeLabelFns(t,0,30)})};var T=b.MINZOOM/2+.87,A="m-0.87,.5h"+T+"v3h-"+(T+5.2)+"l"+(T/2+2.6)+",-"+(.87*T+4.5)+"l2.6,1.5l-"+T/2+","+.87*T+"Z",M="m0.87,.5h-"+T+"v3h"+(T+5.2)+"l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-2.6,1.5l"+T/2+","+.87*T+"Z",E="m0,1l"+T/2+","+.87*T+"l2.6,-1.5l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-"+(T/2+2.6)+","+(.87*T+4.5)+"l2.6,1.5l"+T/2+",-"+.87*T+"Z",S=!0;function C(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var t,e,r,n,u,f,p,h,v,_,w=this,T=w.layers.plotbg.select("path").node(),L=w.graphDiv,O=L._fullLayout._zoomlayer,P={element:T,gd:L,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(i,o,s){P.xaxes=[w.xaxis],P.yaxes=[w.yaxis];var c=L._fullLayout.dragmode;P.minDrag="lasso"===c?1:void 0,"zoom"===c?(P.moveFn=B,P.clickFn=D,P.doneFn=N,function(i,o,s){var c=T.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,f=a(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),p="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",h=!1,v=O.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",p),_=O.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"),x(L)}(0,o,s)):"pan"===c?(P.moveFn=j,P.clickFn=D,P.doneFn=V,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(L)):"select"!==c&&"lasso"!==c||m(i,o,s,P,c)}};function I(t){var e={};return e[w.id+".aaxis.min"]=t.a,e[w.id+".baxis.min"]=t.b,e[w.id+".caxis.min"]=t.c,e}function D(t,e){var r=L._fullLayout.clickmode;C(L),2===t&&(L.emit("plotly_doubleclick",null),i.call("_guiRelayout",L,I({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&y(e,L,[w.xaxis],[w.yaxis],w.id,P),r.indexOf("event")>-1&&g.click(L,e,w.id)}function z(t,e){return 1-e/w.h}function R(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function F(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function B(a,i){var o=t+a,s=e+i,l=Math.max(0,Math.min(1,z(0,e),z(0,s))),c=Math.max(0,Math.min(1,R(t,e),R(o,s))),d=Math.max(0,Math.min(1,F(t,e),F(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,T=(1-l)*w.h,S=T-x/k;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),h=!0),L.emit("plotly_relayouting",I(u))}function N(){C(L),u!==r&&(i.call("_guiRelayout",L,I(u)),S&&L.data&&L._context.showTips&&(o.notifier(s(L,"Double-click to zoom back out"),"long"),S=!1))}function j(t,e){var n=t/w.xaxis._m,a=e/w.yaxis._m,i=[(u={a:r.a-a,b:r.b+(n+a)/2,c:r.c-(n-a)/2}).a,u.b,u.c].sort(),o=i.indexOf(u.a),s=i.indexOf(u.b),l=i.indexOf(u.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),u={a:i[o],b:i[s],c:i[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var f="translate("+(w.x0+t)+","+(w.y0+e)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",f);var p="translate("+-t+","+-e+")";w.clipDefRelative.select("path").attr("transform",p),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,w),L.emit("plotly_relayouting",I(u))}function V(){i.call("_guiRelayout",L,I(u))}T.onmousemove=function(t){g.hover(L,t,w.id),L._fullLayout._lasthover=T,L._fullLayout._hoversubplot=w.id},T.onmouseout=function(t){L._dragging||d.unhover(L,t)},d.init(P)}},{"../../components/color":592,"../../components/dragelement":610,"../../components/drawing":613,"../../components/fx":630,"../../components/titles":679,"../../lib":717,"../../lib/extend":708,"../../registry":846,"../cartesian/axes":765,"../cartesian/constants":771,"../cartesian/select":782,"../cartesian/set_convert":783,"../plots":826,d3:165,tinycolor2:536}],846:[function(t,e,r){"use strict";var n=t("./lib/loggers"),a=t("./lib/noop"),i=t("./lib/push_unique"),o=t("./lib/is_plain_object"),s=t("./lib/dom").addStyleRule,l=t("./lib/extend"),c=t("./plots/attributes"),u=t("./plots/layout_attributes"),f=l.extendFlat,p=l.extendDeepAll;function h(t){var e=t.name,a=t.categories,i=t.meta;if(r.modules[e])n.log("Type "+e+" already registered");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])n.log("Plot type "+e+" already registered.");else for(var a in m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(a,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[h[r]].title={text:""});for(r=0;r")?"":e.html(t).text()}));return e.remove(),r}(k)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(k=(k=(k=k.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),k}},{"../components/color":592,"../components/drawing":613,"../constants/xmlns_namespaces":694,"../lib":717,d3:165}],855:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r0&&f.s>0||(c=!1)}o._extremes[t._id]=s.findExtremes(t,l,{tozero:!c,padded:!0})}}function m(t){for(var e=t.traces,r=0;rf+c||!n(u))}for(var h=0;h0&&_.s>0||(m=!1)}}g._extremes[t._id]=s.findExtremes(t,v,{tozero:!m,padded:y})}}function x(t){return t._id.charAt(0)}e.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,a=t._fullLayout,i=t._fullData,s=t.calcdata,l=[],c=[],f=0;fi))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return a(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e0?a+=i:e<0&&(a-=i)}return n.inbox(r-e,a-e,x+(a-e)/(a-r)-1)}"h"===g.orientation?(i=r,s=e,c="y",u="x",f=E,p=M):(i=e,s=r,c="x",u="y",p=E,f=M);var S=t[c+"a"],C=t[u+"a"];h=Math.abs(S.r2c(S.range[1])-S.r2c(S.range[0]));var L=n.getDistanceFunction(a,f,p,(function(t){return(f(t)+p(t))/2}));if(n.getClosest(d,L,t),!1!==t.index){m||(k=function(t){return Math.min(_(t),t.p-v.bargroupwidth/2)},T=function(t){return Math.max(w(t),t.p+v.bargroupwidth/2)});var O=d[t.index],P=g.base?O.b+O.s:O.s;t[u+"0"]=t[u+"1"]=C.c2p(O[u],!0),t[u+"LabelVal"]=P;var I=v.extents[v.extents.round(O.p)];return t[c+"0"]=S.c2p(m?k(O):I[0],!0),t[c+"1"]=S.c2p(m?T(O):I[1],!0),t[c+"LabelVal"]=O.p,t.labelLabel=l(S,t[c+"LabelVal"]),t.valueLabel=l(C,t[u+"LabelVal"]),t.spikeDistance=(E(O)+function(t){return A(_(t),w(t))}(O))/2+b-x,t[c+"Spike"]=S.c2p(O.p,!0),o(O,g,t),t.hovertemplate=g.hovertemplate,t}}function u(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,a=s(t,e);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}e.exports={hoverPoints:function(t,e,r,n){var i=c(t,e,r,n);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=u(s,l),a.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}},hoverOnBars:c,getTraceColor:u}},{"../../components/color":592,"../../components/fx":630,"../../lib":717,"../../plots/cartesian/axes":765,"../../registry":846,"./helpers":862}],864:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc").crossTraceCalc,colorbar:t("../scatter/marker_colorbar"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"bar",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":776,"../scatter/marker_colorbar":1138,"./arrays_to_calcdata":855,"./attributes":856,"./calc":857,"./cross_trace_calc":859,"./defaults":860,"./event_data":861,"./hover":863,"./layout_attributes":865,"./layout_defaults":866,"./plot":867,"./select":868,"./style":870}],865:[function(t,e,r){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],866:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/cartesian/axes"),i=t("../../lib"),o=t("./layout_attributes");e.exports=function(t,e,r){function s(r,n){return i.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},p=s("barmode"),h=0;h0}function E(t){return"auto"===t?0:t}function S(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:t.width*a+t.height*n,y:t.width*n+t.height*a}}function C(t,e,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,c=i.anchor||"end",u="end"===c,f="start"===c,p=((i.leftToRight||0)+1)/2,h=1-p,d=a.width,g=a.height,v=Math.abs(e-t),m=Math.abs(n-r),y=v>2*_&&m>2*_?_:0;v-=2*y,m-=2*y;var x=E(l);"auto"!==l||d<=v&&g<=m||!(d>v||g>m)||(d>m||g>v)&&d.01?Y:function(t,e){return Math.abs(t-e)>=2?Y(t):t>e?Math.ceil(t):Math.floor(t)};q&&(R=X(R,F),F=X(F,R)),H&&(B=X(B,N),N=X(N,B))}var Z=A(i.ensureSingle(k,"path"),O,v,m);if(Z.style("vector-effect","non-scaling-stroke").attr("d","M"+R+","+B+"V"+N+"H"+F+"V"+B+"Z").call(l.setClipUrl,e.layerClipId,t),!O.uniformtext.mode&&M(v)){var J=l.makePointStyleFns(f);l.singlePointStyle(c,Z,f,J,t)}!function(t,e,r,n,a,s,c,f,h,v,m){var w,k=e.xaxis,M=e.yaxis,L=t._fullLayout;function O(e,r,n){return i.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t)}var P=n[0].trace,I="h"===P.orientation,D=function(t,e,r,n,a){var o,s=e[0].trace;return o=s.texttemplate?function(t,e,r,n,a){var o=e[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l,c,f,p,h="waterfall"===o.type,d="funnel"===o.type;function g(t){return u(p,+t,!0).text}"h"===o.orientation?(l="y",c=a,f="x",p=n):(l="x",c=n,f="y",p=a);var v,m=e[r],y={};y.label=m.p,y.labelLabel=y[l+"Label"]=(v=m.p,u(c,v,!0).text);var x=i.castOption(o,m.i,"text");(0===x||x)&&(y.text=x),y.value=m.s,y.valueLabel=y[f+"Label"]=g(m.s);var _={};b(_,o,m.i),h&&(y.delta=+m.rawS||m.s,y.deltaLabel=g(y.delta),y.final=m.v,y.finalLabel=g(y.final),y.initial=y.final-y.delta,y.initialLabel=g(y.initial)),d&&(y.value=m.s,y.valueLabel=g(y.value),y.percentInitial=m.begR,y.percentInitialLabel=i.formatPercent(m.begR),y.percentPrevious=m.difR,y.percentPreviousLabel=i.formatPercent(m.difR),y.percentTotal=m.sumR,y.percenTotalLabel=i.formatPercent(m.sumR));var w=i.castOption(o,m.i,"customdata");return w&&(y.customdata=w),i.texttemplateString(s,y,t._d3locale,_,y,o._meta||{})}(t,e,r,n,a):s.textinfo?function(t,e,r,n){var a=t[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function c(t){return u(o?r:n,+t,!0).text}var f,p,h=a.textinfo,d=t[e],g=h.split("+"),v=[],m=function(t){return-1!==g.indexOf(t)};if(m("label")&&v.push((p=t[e].p,u(o?n:r,p,!0).text)),m("text")&&(0===(f=i.castOption(a,d.i,"text"))||f)&&v.push(f),s){var y=+d.rawS||d.s,x=d.v,b=x-y;m("initial")&&v.push(c(b)),m("delta")&&v.push(c(y)),m("final")&&v.push(c(x))}if(l){m("value")&&v.push(c(d.s));var _=0;m("percent initial")&&_++,m("percent previous")&&_++,m("percent total")&&_++;var w=_>1;m("percent initial")&&(f=i.formatPercent(d.begR),w&&(f+=" of initial"),v.push(f)),m("percent previous")&&(f=i.formatPercent(d.difR),w&&(f+=" of previous"),v.push(f)),m("percent total")&&(f=i.formatPercent(d.sumR),w&&(f+=" of total"),v.push(f))}return v.join("
")}(e,r,n,a):g.getValue(s.text,r),g.coerceString(y,o)}(L,n,a,k,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(P,a);var z="stack"===v.mode||"relative"===v.mode,R=n[a],F=!z||R._outmost;if(D&&"none"!==w&&(!R.isBlank&&s!==c&&f!==h||"auto"!==w&&"inside"!==w)){var B=L.font,N=d.getBarColor(n[a],P),j=d.getInsideTextFont(P,a,B,N),V=d.getOutsideTextFont(P,a,B),U=r.datum();I?"log"===k.type&&U.s0<=0&&(s=k.range[0]=G*(Z/W):Z>=W*(X/G);G>0&&W>0&&(J||K||$)?w="inside":(w="outside",q.remove(),q=null)}else w="inside";if(!q){Y=i.ensureUniformFontSize(t,"outside"===w?V:j);var Q=(q=O(r,D,Y)).attr("transform");if(q.attr("transform",""),H=l.bBox(q.node()),G=H.width,W=H.height,q.attr("transform",Q),G<=0||W<=0)return void q.remove()}var tt,et,rt=P.textangle;"outside"===w?(et="both"===P.constraintext||"outside"===P.constraintext,tt=function(t,e,r,n,a,i){var o,s=!!i.isHorizontal,l=!!i.constrained,c=i.angle||0,u=a.width,f=a.height,p=Math.abs(e-t),h=Math.abs(n-r);o=s?h>2*_?_:0:p>2*_?_:0;var d=1;l&&(d=s?Math.min(1,h/f):Math.min(1,p/u));var g=E(c),v=S(a,g),m=(s?v.x:v.y)/2,y=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(t+e)/2,w=(r+n)/2,k=0,A=0,M=s?T(e,t):T(r,n);return s?(b=e-M*o,k=M*m):(w=n+M*o,A=-M*m),{textX:y,textY:x,targetX:b,targetY:w,anchorX:k,anchorY:A,scale:d,rotate:g}}(s,c,f,h,H,{isHorizontal:I,constrained:et,angle:rt})):(et="both"===P.constraintext||"inside"===P.constraintext,tt=C(s,c,f,h,H,{isHorizontal:I,constrained:et,angle:rt,anchor:P.insidetextanchor})),tt.fontSize=Y.size,p(P.type,tt,L),R.transform=tt,A(q,L,v,m).attr("transform",i.getTextTransform(tt))}else r.select("text").remove()}(t,e,k,r,h,R,F,B,N,v,m),e.layerClipId&&l.hideOutsideRangePoint(c,k.select("text"),w,L,f.xcalendar,f.ycalendar)}));var N=!1===f.cliponaxis;l.setClipUrl(c,N?null:e.layerClipId,t)}));c.getComponentMethod("errorbars","plot")(t,P,e,v)},toMoveInsideBar:C}},{"../../components/color":592,"../../components/drawing":613,"../../components/fx/helpers":627,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../registry":846,"./attributes":856,"./constants":858,"./helpers":862,"./style":870,"./uniform_text":872,d3:165,"fast-isnumeric":228}],868:[function(t,e,r){"use strict";function n(t,e,r,n,a){var i=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return a?[(i+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(i+o)/2,l]}e.exports=function(t,e){var r,a=t.cd,i=t.xaxis,o=t.yaxis,s=a[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===a.bargap&&0===a.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var a=e[0].trace;a.selectedpoints?function(t,e,r){i.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each((function(t){var a,s=n.select(this);if(t.selected){a=o.ensureUniformFontSize(r,v(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(a.color=l),i.font(s,a)}else i.selectedTextStyle(s,e)}))}(t.selectAll("text"),e,r)}(r,a,t):(d(r,a,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{"../../components/color":592,"../../components/drawing":613,"../../lib":717,"../../registry":846,"./attributes":856,"./helpers":862,"./uniform_text":872,d3:165}],871:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),a(t,"marker")&&i(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(t,"marker.line")&&i(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":592,"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603}],872:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib");function i(t){return"_"+t+"Text_minsize"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=i(t),a=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=op.range[1]&&(x+=Math.PI),n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=a.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.hovertemplate=u.hovertemplate,t.color=i(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":630,"../../lib":717,"../../plots/polar/helpers":828,"../bar/hover":863,"../scatterpolar/hover":1197}],877:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("../scatterpolar/format_labels"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":829,"../bar/select":868,"../bar/style":870,"../scatter/marker_colorbar":1138,"../scatterpolar/format_labels":1196,"./attributes":873,"./calc":874,"./defaults":875,"./hover":876,"./layout_attributes":878,"./layout_defaults":879,"./plot":880}],878:[function(t,e,r){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],879:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i,o={};function s(r,o){return n.coerce(t[i]||{},e[i],a,r,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,a,c,u,f,e,r)}:function(t,n,a,o){return i.pathAnnulus(t,n,a,o,e,r)}}(e),h=e.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(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),h=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(a(o)&&a(s)&&a(h)&&a(d)&&o!==s&&h!==d){var g=u.c2g(t.s1),v=(h+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=p(o,s,h,d)}else e="M0,0Z";i.ensureSingle(r,"path").attr("d",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},{"../../components/drawing":613,"../../lib":717,"../../plots/polar/helpers":828,d3:165,"fast-isnumeric":228}],881:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../bar/attributes"),i=t("../../components/color/attributes"),o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../lib/extend").extendFlat,l=n.marker,c=l.line;e.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"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},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({},c.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:s({},c.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,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":591,"../../lib/extend":708,"../../plots/template_attributes":841,"../bar/attributes":856,"../scatter/attributes":1120}],882:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../plots/cartesian/axes"),i=t("../../lib"),o=t("../../constants/numerical").BADNUM,s=i._;e.exports=function(t,e){var r,l,m,y,x,b,_=t._fullLayout,w=a.getFromId(t,e.xaxis||"x"),k=a.getFromId(t,e.yaxis||"y"),T=[],A="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(m=w,y="x",x=k,b="y"):(m=k,y="y",x=w,b="x");var M,E,S,C,L,O,P=function(t,e,r,a){var o,s=e+"0"in t,l="d"+e in t;if(e in t||s&&l)return r.makeCalcdata(t,e);o=s?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||i.isDateTime(t.name)&&"date"===r.type)?t.name:a;for(var c="multicategory"===r.type?r.r2c_just_indices(o):r.d2c(o,0,t[e+"calendar"]),u=t._length,f=new Array(u),p=0;pM.uf};if(e._hasPreCompStats){var F=e[y],B=function(t){return m.d2c((e[t]||[])[r])},N=1/0,j=-1/0;for(r=0;r=M.q1&&M.q3>=M.med){var U=B("lowerfence");M.lf=U!==o&&U<=M.q1?U:p(M,S,C);var q=B("upperfence");M.uf=q!==o&&q>=M.q3?q:h(M,S,C);var H=B("mean");M.mean=H!==o?H:C?i.mean(S,C):(M.q1+M.q3)/2;var G=B("sd");M.sd=H!==o&&G>=0?G:C?i.stdev(S,C,M.mean):M.q3-M.q1,M.lo=d(M),M.uo=g(M);var W=B("notchspan");W=W!==o&&W>0?W:v(M,C),M.ln=M.med-W,M.un=M.med+W;var Y=M.lf,X=M.uf;e.boxpoints&&S.length&&(Y=Math.min(Y,S[0]),X=Math.max(X,S[C-1])),e.notched&&(Y=Math.min(Y,M.ln),X=Math.max(X,M.un)),M.min=Y,M.max=X}else{var Z;i.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+M.q1,"median = "+M.med,"q3 = "+M.q3].join("\n")),Z=M.med!==o?M.med:M.q1!==o?M.q3!==o?(M.q1+M.q3)/2:M.q1:M.q3!==o?M.q3:0,M.med=Z,M.q1=M.q3=Z,M.lf=M.uf=Z,M.mean=M.sd=Z,M.ln=M.un=Z,M.min=M.max=Z}N=Math.min(N,M.min),j=Math.max(j,M.max),M.pts2=E.filter(R),T.push(M)}}e._extremes[m._id]=a.findExtremes(m,[N,j],{padded:!0})}else{var J=m.makeCalcdata(e,y),K=function(t,e){for(var r=t.length,n=new Array(r+1),a=0;a=0&&tt<$&&(c(L={v:O,i:r},e,r),Q[tt].push(L))}var et=1/0,rt=-1/0,nt=e.quartilemethod,at="exclusive"===nt,it="inclusive"===nt;for(r=0;r<$;r++)if(Q[r].length>0){var ot,st;(M={}).pos=M[b]=D[r],E=M.pts=Q[r].sort(u),C=(S=M[y]=E.map(f)).length,M.min=S[0],M.max=S[C-1],M.mean=i.mean(S,C),M.sd=i.stdev(S,C,M.mean),M.med=i.interp(S,.5),C%2&&(at||it)?(at?(ot=S.slice(0,C/2),st=S.slice(C/2+1)):it&&(ot=S.slice(0,C/2+1),st=S.slice(C/2)),M.q1=i.interp(ot,.5),M.q3=i.interp(st,.5)):(M.q1=i.interp(S,.25),M.q3=i.interp(S,.75)),M.lf=p(M,S,C),M.uf=h(M,S,C),M.lo=d(M),M.uo=g(M);var lt=v(M,C);M.ln=M.med-lt,M.un=M.med+lt,et=Math.min(et,M.ln),rt=Math.max(rt,M.un),M.pts2=E.filter(R),T.push(M)}e._extremes[m._id]=a.findExtremes(m,e.notched?J.concat([et,rt]):J,{padded:!0})}return function(t,e){if(i.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(T[0].t={num:_[A],dPos:z,posLetter:b,valLetter:y,labels:{med:s(t,"median:"),min:s(t,"min:"),q1:s(t,"q1:"),q3:s(t,"q3:"),max:s(t,"max:"),mean:"sd"===e.boxmean?s(t,"mean ± σ:"):s(t,"mean:"),lf:s(t,"lower fence:"),uf:s(t,"upper fence:")}},_[A]++,T):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(t,e,r){for(var n in l)i.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?i.isArrayOrTypedArray(e[n][r[0]])&&(t[l[n]]=e[n][r[0]][r[1]]):t[l[n]]=e[n][r])}function u(t,e){return t.v-e.v}function f(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(i.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function h(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(i.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function d(t){return 4*t.q1-3*t.q3}function g(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{"../../constants/numerical":693,"../../lib":717,"../../plots/cartesian/axes":765,"fast-isnumeric":228}],883:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib"),i=t("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,p=o._id,h=p.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+"gap"],_=1-f[t+"groupgap"];for(s=0;s0){var H=S.pointpos,G=S.jitter,W=S.marker.size/2,Y=0;H+G>=0&&((Y=U*(H+G))>M?(q=!0,j=W,B=Y):Y>R&&(j=W,B=M)),Y<=M&&(B=M);var X=0;H-G<=0&&((X=-U*(H-G))>E?(q=!0,V=W,N=X):X>F&&(V=W,N=E)),X<=E&&(N=E)}else B=M,N=E;var Z=new Array(c.length);for(l=0;l0?(v="v",m=x>0?Math.min(_,b):Math.min(b)):x>0?(v="h",m=Math.min(_)):m=0;if(m){e._length=m;var A=r("orientation",v);e._hasPreCompStats?"v"===A&&0===x?(r("x0",0),r("dx",1)):"h"===A&&0===y&&(r("y0",0),r("dy",1)):"v"===A&&0===x?r("x0"):"h"===A&&0===y&&r("y0"),a.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],i)}else e.visible=!1}function u(t,e,r,a){var i=a.prefix,o=n.coerce2(t,e,l,"marker.outliercolor"),s=r("marker.line.outliercolor"),c="outliers";e._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=r(i+"points",c);u?(r("jitter","all"===u?.3:0),r("pointpos","all"===u?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.color",e.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===u&&(r("marker.line.outliercolor",e.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete e.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,a){function o(r,a){return n.coerce(t,e,l,r,a)}if(c(t,e,o,a),!1!==e.visible){var s=e._hasPreCompStats;s&&(o("lowerfence"),o("upperfence")),o("line.color",(t.marker||{}).color||r),o("line.width"),o("fillcolor",i.addOpacity(e.line.color,.5));var f=!1;if(s){var p=o("mean"),h=o("sd");p&&p.length&&(f=!0,h&&h.length&&(f="sd"))}o("boxmean",f),o("whiskerwidth"),o("width"),o("quartilemethod");var d=!1;if(s){var g=o("notchspan");g&&g.length&&(d=!0)}else n.validate(t.notchwidth,l.notchwidth)&&(d=!0);o("notched",d)&&o("notchwidth"),u(t,e,o,{prefix:"box"})}},crossTraceDefaults:function(t,e){var r,a;function i(t){return n.coerce(a._input,a,l,t)}for(var s=0;st.lo&&(x.so=!0)}return i}));p.enter().append("path").classed("point",!0),p.exit().remove(),p.call(i.translatePoints,o,s)}function l(t,e,r,i){var o,s,l=e.pos,c=e.val,u=i.bPos,f=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=t.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(t){var e=l.c2l(t.pos+u,!0),a=l.l2p(e)+f,i=l.l2p(e-o)+f,h=l.l2p(e+s)+f,d=c.c2p(t.mean,!0),g=c.c2p(t.mean-t.sd,!0),v=c.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+d+","+i+"V"+h+("sd"===p?"m0,0L"+g+","+a+"L"+d+","+i+"L"+v+","+a+"Z":"")):n.select(this).attr("d","M"+i+","+d+"H"+h+("sd"===p?"m0,0L"+a+","+g+"L"+i+","+d+"L"+a+","+v+"Z":""))}))}e.exports={plot:function(t,e,r,i){var c=e.xaxis,u=e.yaxis;a.makeTraceGroups(i,r,"trace boxes").each((function(t){var e,r,a=n.select(this),i=t[0],f=i.t,p=i.trace;f.wdPos=f.bdPos*p.whiskerwidth,!0!==p.visible||f.empty?a.remove():("h"===p.orientation?(e=u,r=c):(e=c,r=u),o(a,{pos:e,val:r},p,f),s(a,{x:c,y:u},p,f),l(a,{pos:e,val:r},p,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{"../../components/drawing":613,"../../lib":717,d3:165}],891:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,a=t.cd,i=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;for(var a=1/0,i=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,I=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,z=O(E+L),R=P(S-L),F=[[f=M(E)]];for(i=z;i*C=0;a--)i[u-a]=t[f][a],o[u-a]=e[f][a];for(s.push({x:i,y:o,bicubic:l}),a=f,i=[],o=[];a>=0;a--)i[f-a]=t[a][0],o[f-a]=e[a][0];return s.push({x:i,y:o,bicubic:c}),s}},{}],905:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e,r){var i,o,s,l,c,u,f,p,h,d,g,v,m,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,E=t._yctrl,S=M[0].length,C=M.length,L=t._a.length,O=t._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,c,u,f,h,d,g,v,m=[],y=[],x={};if("b"===e)for(i=t.b2j(n),o=Math.floor(Math.max(0,Math.min(O-2,i))),s=i-o,x.length=O,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,i)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},a=0;a0&&(h=t.dxydi([],a-1,o,0,s),m.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),d=t.dxydi([],a-1,o,1,s),m.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),m.push(f[0]),y.push(f[1]),l=f;else for(a=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,a))),u=a-c,x.length=L,x.crossLength=O,x.xy=function(e){return t.evalxy([],a,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},i=0;i0&&(g=t.dxydj([],c,i-1,u,0),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,i-1,u,1),m.push(f[0]-v[0]/3),y.push(f[1]-v[1]/3)),m.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=p,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function D(n){var a,i,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=T.length,"b"===e)for(o=Math.max(0,Math.min(O-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},a=0;ax.length-1||_.push(a(D(o),{color:b.gridcolor,width:b.gridwidth}));for(p=u;px.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],i=0;ix[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(D(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=c[1],p=u;p<=f;p++)h=b.tick0+b.dtick*p,_.push(a(I(h),{color:b.gridcolor,width:b.gridwidth}));for(p=u-1;px[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":708,"../../plots/cartesian/axes":765}],906:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,i,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],a=0;a90&&(h-=180,l=-l),{angle:h,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],920:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=t("../../constants/alignment");function f(t,e,r,a,s,l){var c="const-"+s+"-lines",u=r.selectAll("."+c).data(l);u.enter().append("path").classed(c,!0).style("vector-effect","non-scaling-stroke"),u.each((function(r){var a=r,s=a.x,l=a.y,c=i([],s,t.c2p),u=i([],l,e.c2p),f="M"+o(c,u,a.smoothing);n.select(this).attr("d",f).style("stroke-width",a.width).style("stroke",a.color).style("fill","none")})),u.exit().remove()}function p(t,e,r,i,o,c,u,f){var p=c.selectAll("text."+f).data(u);p.enter().append("text").classed(f,!0);var h=0,d={};return p.each((function(o,c){var u;if("auto"===o.axis.tickangle)u=s(i,e,r,o.xy,o.dxy);else{var f=(o.axis.tickangle+180)*Math.PI/180;u=s(i,e,r,o.xy,[Math.cos(f),Math.sin(f)])}c||(d={angle:u.angle,flip:u.flip});var p=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(l.convertToTspans,t),v=a.bBox(this);g.attr("transform","translate("+u.p[0]+","+u.p[1]+") rotate("+u.angle+")translate("+o.axis.labelpadding*p+","+.3*v.height+")"),h=Math.max(h,v.width+o.axis.labelpadding)})),p.exit().remove(),d.maxExtent=h,d}e.exports=function(t,e,r,a){var l=e.xaxis,u=e.yaxis,h=t._fullLayout._clips;c.makeTraceGroups(a,r,"trace").each((function(e){var r=n.select(this),a=e[0],d=a.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",d.opacity),f(l,u,x,0,"a",v._gridlines),f(l,u,x,0,"b",m._gridlines),f(l,u,y,0,"a",v._minorgridlines),f(l,u,y,0,"b",m._minorgridlines),f(l,u,b,0,"a-boundary",v._boundarylines),f(l,u,b,0,"b-boundary",m._boundarylines);var w=p(t,l,u,d,0,_,v._labels,"a-label"),k=p(t,l,u,d,0,_,m._labels,"b-label");!function(t,e,r,n,a,i,o,l){var u,f,p,h,d=c.aggNums(Math.min,null,r.a),v=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+v),f=m,p=r.ab2xy(u,f,!0),h=r.dxyda_rough(u,f),void 0===o.angle&&c.extendFlat(o,s(r,a,i,p,r.dxydb_rough(u,f))),g(t,e,r,0,p,h,r.aaxis,a,i,o,"a-title"),u=d,f=.5*(m+y),p=r.ab2xy(u,f,!0),h=r.dxydb_rough(u,f),void 0===l.angle&&c.extendFlat(l,s(r,a,i,p,r.dxyda_rough(u,f))),g(t,e,r,0,p,h,r.baxis,a,i,l,"b-title")}(t,_,d,0,l,u,w,k),function(t,e,r,n,a){var s,l,u,f,p=r.select("#"+t._clipPathId);p.size()||(p=r.append("clipPath").classed("carpetclip",!0));var h=c.ensureSingle(p,"path","carpetboundary"),d=e.clipsegments,g=[];for(f=0;f90&&v<270,y=n.select(this);y.text(u.title.text).call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*h*i-x),y.attr("transform","translate("+e.p[0]+","+e.p[1]+") rotate("+e.angle+") translate(0,"+x+")").classed("user-select-none",!0).attr("text-anchor","middle").call(a.font,u.title.font)})),y.exit().remove()}},{"../../components/drawing":613,"../../constants/alignment":686,"../../lib":717,"../../lib/svg_text_utils":741,"./makepath":917,"./map_1d_array":918,"./orient_text":919,d3:165}],921:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/search").findBin,i=t("./compute_control_points"),o=t("./create_spline_evaluator"),s=t("./create_i_derivative_evaluator"),l=t("./create_j_derivative_evaluator");e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,p=t.baxis,h=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;h-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>h&&tg&&ed||ev},t.setScale=function(){var e=t._x,r=t._y,n=i(t._xctrl,t._yctrl,e,r,f.smoothing,p.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,p.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,p.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,p.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(a(t,e),c-2)),n=e[r],i=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(i-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(a(t,r),u-2)),n=r[e],i=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(i-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,a,i){if(!i&&(ne[c-1]|ar[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(a),l=t.evalxy([],o,s);if(i){var f,p,h,d,g=0,v=0,m=[];ne[c-1]?(f=c-2,p=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):p=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),ar[u-1]?(h=u-2,d=1,v=(a-r[u-1])/(r[u-1]-r[u-2])):d=s-(h=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,f,h,p,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,f,h,p,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,a){var i=t.dxydi(null,e,r,n,a),o=t.dadi(e,n);return[i[0]/o,i[1]/o]},t.dxydb=function(e,r,n,a){var i=t.dxydj(null,e,r,n,a),o=t.dbdj(r,a);return[i[0]/o,i[1]/o]},t.dxyda_rough=function(e,r,n){var a=m*(n||.1),i=t.ab2xy(e+a,r,!0),o=t.ab2xy(e-a,r,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dxydb_rough=function(e,r,n){var a=y*(n||.1),i=t.ab2xy(e,r+a,!0),o=t.ab2xy(e,r-a,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":736,"./compute_control_points":909,"./constants":910,"./create_i_derivative_evaluator":911,"./create_j_derivative_evaluator":912,"./create_spline_evaluator":913}],922:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var a,i,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,a=0,i=0;return e>0&&void 0!==(n=t[r][e-1])&&(i++,a+=n),e0&&void 0!==(n=t[r-1][e])&&(i++,a+=n),r0&&i0&&a1e-5);return n.log("Smoother converged to",T,"after",A,"iterations"),t}},{"../../lib":717}],923:[function(t,e,r){"use strict";var n=t("../../lib").isArray1D;e.exports=function(t,e,r){var a=r("x"),i=a&&a.length,o=r("y"),s=o&&o.length;if(!i&&!s)return!1;if(e._cheater=!a,i&&!n(a)||s&&!n(o))e._length=null;else{var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{"../../lib":717}],924:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../scattergeo/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../plots/attributes"),s=t("../../components/color/attributes").defaultLine,l=t("../../lib/extend").extendFlat,c=a.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},a.geojson,{}),featureidkey:a.featureidkey,text:l({},a.text,{}),hovertext:l({},a.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.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(),showlegend:l({},o.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":591,"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scattergeo/attributes":1161}],925:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../constants/numerical").BADNUM,i=t("../../components/colorscale/calc"),o=t("../scatter/arrays_to_calcdata"),s=t("../scatter/calc_selection");function l(t){return t&&"string"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f")}}(t,f,o,p.mockAxis),[t]}},{"../../lib":717,"../../plots/cartesian/axes":765,"./attributes":924}],929:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"choropleth",basePlotModule:t("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":795,"../heatmap/colorbar":1003,"./attributes":924,"./calc":925,"./defaults":926,"./event_data":927,"./hover":928,"./plot":930,"./select":931,"./style":932}],930:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../lib/geo_location_utils"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../plots/cartesian/autorange").findExtremes,l=t("./style").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],a=n._subplot,l=r.locationmode,c=r._length,u="geojson-id"===l?i.extractTraceFeature(t):o(r,a.topojson),f=[],p=[],h=0;h=0;n--){var a=r[n].id;if("string"==typeof a&&0===a.indexOf("water"))for(var i=n+1;i=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,a=new o(t,r.uid),i=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(i,{type:"geojson",data:s.geojson}),a._addLayers(s,l),e[0].trace._glTrace=a,a}},{"../../plots/mapbox/constants":818,"./convert":934}],938:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../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"]}),showlegend:s({},o.showlegend,{dflt:!1})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(t){l[t]=i[t]})),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,e.exports=l},{"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../mesh3d/attributes":1061}],939:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,a=e.v,i=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,a.length,i.length),s=-1/0,l=1/0,c=0;co.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,c=-1/0,u=1/0;for(r=0;r":h>c&&(n.prefixBoundary=!0);break;case"<":(hc||n.starts.length&&p===u)&&(n.prefixBoundary=!0);break;case"][":f=Math.min(h[0],h[1]),p=Math.max(h[0],h[1]),fc&&(n.prefixBoundary=!0)}}}},{}],946:[function(t,e,r){"use strict";var n=t("../../components/colorscale"),a=t("./make_color_map"),i=t("./end_plus");e.exports={min:"zmin",max:"zmax",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=a(e,{isColorbar:!0});if("heatmap"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:i(o),size:l}}}},{"../../components/colorscale":604,"./end_plus":954,"./make_color_map":959}],947:[function(t,e,r){"use strict";e.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}}},{}],948:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./label_defaults"),i=t("../../components/color"),o=i.addOpacity,s=i.opacity,l=t("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,i,l,f){var p,h,d,g=e.contours,v=r("contours.operation");g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),"="===v?p=g.showlines=!0:(p=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),p&&(h=r("line.color",d&&s(d)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash")),r("line.smoothing"),a(r,i,h,f)}},{"../../components/color":592,"../../constants/filter_ops":689,"./label_defaults":958,"fast-isnumeric":228}],949:[function(t,e,r){"use strict";var n=t("../../constants/filter_ops"),a=t("fast-isnumeric");function i(t,e){var r,i=Array.isArray(e);function o(t){return a(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(i?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=i?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=i?e.map(o):[o(e)]),r}function o(t){return function(e){e=i(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=i(t,e),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":689,"fast-isnumeric":228}],950:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=n("contours.start"),i=n("contours.end"),o=!1===a||!1===i,s=r("contours.size");!(o?e.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],951:[function(t,e,r){"use strict";var n=t("../../lib");function a(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}e.exports=function(t,e){var r,i,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),i=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":717,"./constraint_mapping":949,"./end_plus":954}],954:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],955:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./constants");function i(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(t)?i=1:-1!==a.LEFTSTART.indexOf(t)?n=1:-1!==a.TOPSTART.indexOf(t)?i=-1:n=-1,[n,i]}(f,r,e),h=[s(t,e,[-p[0],-p[1]])],d=t.z.length,g=t.z[0].length,v=e.slice(),m=p.slice();for(c=0;c<1e4;c++){if(f>20?(f=a.CHOOSESADDLE[f][(p[0]||p[1])<0?0:1],t.crossings[u]=a.SADDLEREMAINDER[f]):delete t.crossings[u],!(p=a.NEWDELTA[f])){n.log("Found bad marching index:",f,e,t.level);break}h.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],u=e.join(","),i(h[h.length-1],h[h.length-2],o,l)&&h.pop();var y=p[0]&&(e[0]<0||e[0]>g-2)||p[1]&&(e[1]<0||e[1]>d-2);if(e[0]===v[0]&&e[1]===v[1]&&p[0]===m[0]&&p[1]===m[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,k,T,A,M,E,S,C,L,O,P,I,D=i(h[0],h[h.length-1],o,l),z=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&E--,t.edgepaths[E]=C.concat(h,S));break}U||(t.edgepaths[M]=h.concat(S))}for(M=0;Mt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,i,o,s,l,c,u,f,p=t[0].z,h=p.length,d=p[0].length,g=2===h||2===d;for(r=0;r=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):a.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;f+="L"+n}if(s===t.edgepaths.length){a.log("unclosed perimeter path");break}p=s,(d=-1===h.indexOf(p))&&(p=h[0],f+="Z")}for(p=0;pn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),h=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(p<1||h<1)return 1/0;var d=m.EDGECOST*(1/(p-1)+1/(h-1));d+=m.ANGLECOST*c*c;for(var g=s-u,v=l-f,y=s+u,x=l+f,b=0;b2*m.MAXCOST)break;h&&(s/=2),l=(o=c-s/2)+1.5*s}if(p<=m.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var a=e.width/2,i=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),f=a*u,p=i*c,h=a*c,d=-i*u,g=[[o-f-p,s-h-d],[o+f-p,s+h-d],[o+f+p,s+h+d],[o-f+p,s-h+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,i,o){var l=t.selectAll("text").data(e,(function(t){return t.text+","+t.x+","+t.y+","+t.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(t){var e=t.x+Math.sin(t.theta)*t.dy,a=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:a,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+a+")"}).call(s.convertToTspans,r)})),o){for(var c="",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),a.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,f=r.end,p=t._input.contours;u>f&&(r.start=p.start=f,f=r.end=p.end=u,u=r.start),r.size>0||(c=u===f?1:i(u,f,t.ncontours).dtick,p.size=r.size=c)}}},{"../../lib":717,"../../plots/cartesian/axes":765}],963:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("../heatmap/style"),o=t("./make_color_map");e.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",(function(t){return t[0].trace.opacity})),e.each((function(t){var e=n.select(this),r=t[0].trace,i=r.contours,s=r.line,l=i.size||1,c=i.start,u="constraint"===i.type,f=!u&&"lines"===i.coloring,p=!u&&"fill"===i.coloring,h=f||p?o(r):null;e.selectAll("g.contourlevel").each((function(t){n.select(this).selectAll("path").call(a.lineGroupStyle,s.width,f?h(t.level):s.color,s.dash)}));var d=i.labelfont;if(e.selectAll("g.contourlabels text").each((function(t){a.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?h(t.level):s.color)})})),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(p){var g;e.selectAll("g.contourfill path").style("fill",(function(t){return void 0===g&&(g=t.level),h(t.level+.5*l)})),void 0===g&&(g=c),e.selectAll("g.contourbg path").style("fill",h(g-.5*l))}})),i(t)}},{"../../components/drawing":613,"../heatmap/style":1012,"./make_color_map":959,d3:165}],964:[function(t,e,r){"use strict";var n=t("../../components/colorscale/defaults"),a=t("./label_defaults");e.exports=function(t,e,r,i,o){var s,l=r("contours.coloring"),c="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,i,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),a(r,i,c,o)}},{"../../components/colorscale/defaults":602,"./label_defaults":958}],965:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),a=t("../contour/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../lib/extend").extendFlat,s=a.contours;e.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":599,"../../lib/extend":708,"../contour/attributes":943,"../heatmap/attributes":1e3}],966:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),a=t("../../lib"),i=t("../heatmap/convert_column_xyz"),o=t("../heatmap/clean_2d_array"),s=t("../heatmap/interp2d"),l=t("../heatmap/find_empties"),c=t("../heatmap/make_bound_array"),u=t("./defaults"),f=t("../carpet/lookup_carpetid"),p=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var h=t.data[r.index],d=t.data[e.index];d.a||(d.a=h.a),d.b||(d.b=h.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,p,h,d,g,v=e._carpetTrace,m=v.aaxis,y=v.baxis;m._minDtick=0,y._minDtick=0,a.isArray1D(e.z)&&i(e,m,y,"a","b",["z"]),r=e._a=e._a||e.a,p=e._b=e._b||e.b,r=r?m.makeCalcdata(e,"_a"):[],p=p?y.makeCalcdata(e,"_b"):[],u=e.a0||0,f=e.da||1,h=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=a.maxRowLength(g),b="scaled"===e.xtype?"":r,_=c(e,b,u,f,x,m),w="scaled"===e.ytype?"":p,k=c(e,w,h,d,g.length,y),T={a:_,b:k,z:g};return"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:"",cLetter:"z"}),[T]}(t,e);return p(e,e._z),g}}},{"../../components/colorscale/calc":600,"../../lib":717,"../carpet/lookup_carpetid":916,"../contour/set_contours":962,"../heatmap/clean_2d_array":1002,"../heatmap/convert_column_xyz":1004,"../heatmap/find_empties":1006,"../heatmap/interp2d":1009,"../heatmap/make_bound_array":1010,"./defaults":967}],967:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../heatmap/xyz_defaults"),i=t("./attributes"),o=t("../contour/constraint_defaults"),s=t("../contour/contours_defaults"),l=t("../contour/style_defaults");e.exports=function(t,e,r,c){function u(r,a){return n.coerce(t,e,i,r,a)}if(u("carpet"),t.a&&t.b){if(!a(t,e,u,c,"a","b"))return void(e.visible=!1);u("text"),"constraint"===u("contours.type")?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,(function(r){return n.coerce2(t,e,i,r)})),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{"../../lib":717,"../contour/constraint_defaults":948,"../contour/contours_defaults":950,"../contour/style_defaults":964,"../heatmap/xyz_defaults":1014,"./attributes":965}],968:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../contour/colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":776,"../contour/colorbar":946,"../contour/style":963,"./attributes":965,"./calc":966,"./defaults":967,"./plot":969}],969:[function(t,e,r){"use strict";var n=t("d3"),a=t("../carpet/map_1d_array"),i=t("../carpet/makepath"),o=t("../../components/drawing"),s=t("../../lib"),l=t("../contour/make_crossings"),c=t("../contour/find_all_paths"),u=t("../contour/plot"),f=t("../contour/constants"),p=t("../contour/convert_to_constraints"),h=t("../contour/empty_pathinfo"),d=t("../contour/close_boundaries"),g=t("../carpet/lookup_carpetid"),v=t("../carpet/axis_aligned_line");function m(t,e,r){var n=t.getPointAtLength(e),a=t.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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),k=r[0],T=k.trace,A=T._carpetTrace=g(t,T),M=t.calcdata[A.index][0];if(A.visible&&"legendonly"!==A.visible){var E=k.a,S=k.b,C=T.contours,L=h(C,e,k),O="constraint"===C.type,P=C._operation,I=O?"="===P?"lines":"fill":C.coloring,D=[[E[0],S[S.length-1]],[E[E.length-1],S[S.length-1]],[E[E.length-1],S[0]],[E[0],S[0]]];l(L);var z=1e-8*(E[E.length-1]-E[0]),R=1e-8*(S[S.length-1]-S[0]);c(L,z,R);var F,B,N,j,V=L;"constraint"===C.type&&(V=p(L,P)),function(t,e){var r,n,a,i,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=a([],F.x,_.c2p),N=a([],F.y,w.c2p),B.reverse(),N.reverse(),U.push(i(B,N,F.bicubic));var q="M"+U.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,f,p,h=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);h.enter().append("path"),h.exit().remove();var d=[];for(p=0;p=0&&(p=C,d=g):Math.abs(f[1]-p[1])=0&&(p=C,d=g):s.log("endpt to newendpt is not vert. or horz.",f,p,C)}if(d>=0)break;y+=E(f,p),f=p}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=E(f,p)+"Z",f=null)}for(u=0;ug&&(n.max=g),n.len=n.max-n.min}function v(t,e){var r,n=0;return(Math.abs(t[0]-l)<.1||Math.abs(t[0]-c)<.1)&&(r=y(a.dxydb_rough(t[0],t[1],.1)),n=Math.max(n,i*x(e,r)/2)),(Math.abs(t[1]-u)<.1||Math.abs(t[1]-f)<.1)&&(r=y(a.dxyda_rough(t[0],t[1],.1)),n=Math.max(n,i*x(e,r)/2)),n}}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var a=Math.min(Math.ceil(n.len/P),f.LABELMAX),i=0;i0?+h[u]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:m},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u<_.length;u++)k.push(_[u][0],_[u][1]);var T=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return a.extendFlat(c.heatmap.paint,{"heatmap-weight":d?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":g?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:f},c.heatmap.layout.visibility="visible",c}},{"../../components/color":592,"../../components/colorscale":604,"../../constants/numerical":693,"../../lib":717,"../../lib/geojson_utils":712,"fast-isnumeric":228}],973:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/colorscale/defaults"),i=t("./attributes");e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(e._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),a(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":602,"../../lib":717,"./attributes":970}],974:[function(t,e,r){"use strict";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],975:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("../scattermapbox/hover");e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=a.tickText(f,f.c2l(u.z),"hover").text}return s.extraText=function(t,e,r){if(!t.hovertemplate){var a=(e.hi||t.hoverinfo).split("+"),i=-1!==a.indexOf("all"),o=-1!==a.indexOf("lon"),s=-1!==a.indexOf("lat"),l=e.lonlat,c=[];return i||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(i||-1!==a.indexOf("text"))&&n.fillText(e,t,c),c.join("
")}function u(t){return t+"°"}}(c,u,l[0].t.labels),[s]}}},{"../../lib":717,"../../plots/cartesian/axes":765,"../scattermapbox/hover":1189}],976:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),formatLabels:t("../scattermapbox/format_labels"),calc:t("./calc"),plot:t("./plot"),hoverPoints:t("./hover"),eventData:t("./event_data"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,a=new i(t,r.uid),o=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}},{"../../plots/mapbox/constants":818,"./convert":972}],978:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),s.color=function(t,e){var r=t.marker,a=e.mc||r.color,i=e.mlc||r.line.color,o=e.mlw||r.line.width;return n(a)?a:n(i)&&o?i:void 0}(c,f),[s]}}},{"../../components/color":592,"../../lib":717,"../bar/hover":863}],986:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../bar/select":868,"./attributes":979,"./calc":980,"./cross_trace_calc":982,"./defaults":983,"./event_data":984,"./hover":985,"./layout_attributes":987,"./layout_defaults":988,"./plot":989,"./style":990}],987:[function(t,e,r){"use strict";e.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"}}},{}],988:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s path").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(i.fill,t.mc||e.color).call(i.stroke,t.mlc||e.line.color).call(a.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(i.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var t=s.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":592,"../../components/drawing":613,"../../constants/interactions":692,"../bar/style":870,"../bar/uniform_text":872,d3:165}],991:[function(t,e,r){"use strict";var n=t("../pie/attributes"),a=t("../../plots/attributes"),i=t("../../plots/domain").attributes,o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../plots/template_attributes").texttemplateAttrs,l=t("../../lib/extend").extendFlat;e.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":708,"../../plots/attributes":762,"../../plots/domain":790,"../../plots/template_attributes":841,"../pie/attributes":1094}],992:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="funnelarea",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":826}],993:[function(t,e,r){"use strict";var n=t("../pie/calc");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:"funnelarea"})}}},{"../pie/calc":1096}],994:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText,s=t("../pie/defaults").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,a,r,i)}var u=c("labels"),f=c("values"),p=s(u,f),h=p.len;if(e._hasLabels=p.hasLabels,e._hasValues=p.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),h){e._length=h,c("marker.line.width")&&c("marker.line.color",l.paper_bgcolor),c("marker.colors"),c("scalegroup");var d,g=c("text"),v=c("texttemplate");if(v||(d=c("textinfo",Array.isArray(g)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),v||d&&"none"!==d){var m=c("textposition");o(t,e,l,c,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}i(e,l,c),c("title.text")&&(c("title.position"),n.coerceFont(c,"title.font",l.font)),c("aspectratio"),c("baseratio")}else e.visible=!1}},{"../../lib":717,"../../plots/domain":790,"../bar/defaults":860,"../pie/defaults":1097,"./attributes":991}],995:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:t("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style"),styleOne:t("../pie/style_one"),meta:{}}},{"../pie/style_one":1105,"./attributes":991,"./base_plot":992,"./calc":993,"./defaults":994,"./layout_attributes":996,"./layout_defaults":997,"./plot":998,"./style":999}],996:[function(t,e,r){"use strict";var n=t("../pie/layout_attributes").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":1101}],997:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},{"../../lib":717,"./layout_attributes":996}],998:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("../../lib"),o=t("../../lib/svg_text_utils"),s=t("../bar/plot").toMoveInsideBar,l=t("../bar/uniform_text"),c=l.recordMinTextSize,u=l.clearMinTextSize,f=t("../pie/helpers"),p=t("../pie/plot"),h=p.attachFxHandlers,d=p.determineInsideTextFont,g=p.layoutAreas,v=p.prerenderTitles,m=p.positionTitleOutside,y=p.formatSliceLabel;function x(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;u("funnelarea",r),v(e,t),g(e,r._size),i.makeTraceGroups(r._funnelarealayer,e,"trace").each((function(e){var l=n.select(this),u=e[0],p=u.trace;!function(t){if(t.length){var e=t[0],r=e.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i,o,s,l=Math.pow(a,2),c=e.vTotal,u=c,f=c*l/(1-l)/c,p=[];for(p.push(S()),o=t.length-1;o>-1;o--)if(!(s=t[o]).hidden){var h=s.v/u;f+=h,p.push(S())}var d=1/0,g=-1/0;for(o=0;o-1;o--)if(!(s=t[o]).hidden){var M=p[A+=1][0],E=p[A][1];s.TL=[-M,E],s.TR=[M,E],s.BL=k,s.BR=T,s.pxmid=(_=s.TR,w=s.BR,[.5*(_[0]+w[0]),.5*(_[1]+w[1])]),k=s.TL,T=s.TR}}function S(){var t,e={x:t=Math.sqrt(f),y:-t};return[e.x,e.y]}}(e),l.each((function(){var l=n.select(this).selectAll("g.slice").data(e);l.enter().append("g").classed("slice",!0),l.exit().remove(),l.each((function(l,g){if(l.hidden)n.select(this).selectAll("path,g").remove();else{l.pointNumber=l.i,l.curveNumber=p.index;var v=u.cx,m=u.cy,b=n.select(this),_=b.selectAll("path.surface").data([l]);_.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),b.call(h,t,e);var w="M"+(v+l.TR[0])+","+(m+l.TR[1])+x(l.TR,l.BR)+x(l.BR,l.BL)+x(l.BL,l.TL)+"Z";_.attr("d",w),y(t,l,u);var k=f.castOption(p.textposition,l.pts),T=b.selectAll("g.slicetext").data(l.text&&"none"!==k?[0]:[]);T.enter().append("g").classed("slicetext",!0),T.exit().remove(),T.each((function(){var u=i.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),f=i.ensureUniformFontSize(t,d(p,l,r.font));u.text(l.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,f).call(o.convertToTspans,t);var h,y,x,b=a.bBox(u.node()),_=Math.min(l.BL[1],l.BR[1])+m,w=Math.max(l.TL[1],l.TR[1])+m;y=Math.max(l.TL[0],l.BL[0])+v,x=Math.min(l.TR[0],l.BR[0])+v,(h=s(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=f.size,c(p.type,h,r),e[g].transform=h,u.attr("transform",i.getTextTransform(h))}))}}));var g=n.select(this).selectAll("g.titletext").data(p.title.text?[0]:[]);g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each((function(){var e=i.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),s=p.title.text;p._meta&&(s=i.templateString(s,p._meta)),e.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,p.title.font).call(o.convertToTspans,t);var l=m(u,r._size);e.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")}))}))}))}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../bar/plot":867,"../bar/uniform_text":872,"../pie/helpers":1099,"../pie/plot":1103,d3:165}],999:[function(t,e,r){"use strict";var n=t("d3"),a=t("../pie/style_one"),i=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(".trace");i(t,e,"funnelarea"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(a,t,e)}))}))}},{"../bar/uniform_text":872,"../pie/style_one":1105,d3:165}],1e3:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../components/colorscale/attributes"),s=(t("../../constants/docs").FORMAT_LINK,t("../../lib/extend").extendFlat);e.exports=s({z:{valType:"data_array",editType:"calc"},x:s({},n.x,{impliedEdits:{xtype:"array"}}),x0:s({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:s({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:s({},n.y,{impliedEdits:{ytype:"array"}}),y0:s({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:s({},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:i(),showlegend:s({},a.showlegend,{dflt:!1})},{transforms:void 0},o("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":599,"../../constants/docs":688,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scatter/attributes":1120}],1001:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../histogram2d/calc"),s=t("../../components/colorscale/calc"),l=t("./convert_column_xyz"),c=t("./clean_2d_array"),u=t("./interp2d"),f=t("./find_empties"),p=t("./make_bound_array");e.exports=function(t,e){var r,h,d,g,v,m,y,x,b,_=i.getFromId(t,e.xaxis||"x"),w=i.getFromId(t,e.yaxis||"y"),k=n.traceIs(e,"contour"),T=n.traceIs(e,"histogram"),A=n.traceIs(e,"gl2d"),M=k?"best":e.zsmooth;if(_._minDtick=0,w._minDtick=0,T)r=(b=o(t,e)).x,h=b.x0,d=b.dx,g=b.y,v=b.y0,m=b.dy,y=b.z;else{var E=e.z;a.isArray1D(E)?(l(e,_,w,"x","y",["z"]),r=e._x,g=e._y,E=e._z):(r=e._x=e.x?_.makeCalcdata(e,"x"):[],g=e._y=e.y?w.makeCalcdata(e,"y"):[]),h=e.x0,d=e.dx,v=e.y0,m=e.dy,y=c(E,e,_,w),(k||e.connectgaps)&&(e._emptypoints=f(y),u(y,e._emptypoints))}function S(t){M=e._input.zsmooth=e.zsmooth=!1,a.warn('cannot use zsmooth: "fast": '+t)}if("fast"===M)if("log"===_.type||"log"===w.type)S("log axis found");else if(!T){if(r.length){var C=(r[r.length-1]-r[0])/(r.length-1),L=Math.abs(C/100);for(x=0;xL){S("x scale is not linear");break}}if(g.length&&"fast"===M){var O=(g[g.length-1]-g[0])/(g.length-1),P=Math.abs(O/100);for(x=0;xP){S("y scale is not linear");break}}}var I=a.maxRowLength(y),D="scaled"===e.xtype?"":r,z=p(e,D,h,d,I,_),R="scaled"===e.ytype?"":g,F=p(e,R,v,m,y.length,w);A||(e._extremes[_._id]=i.findExtremes(_,z),e._extremes[w._id]=i.findExtremes(w,F));var B={x:z,y:F,z:y,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(D&&D.length===z.length-1&&(B.xCenter=D),R&&R.length===F.length-1&&(B.yCenter=R),T&&(B.xRanges=b.xRanges,B.yRanges=b.yRanges,B.pts=b.pts),k||s(t,e,{vals:y,cLetter:"z"}),k&&e.contours&&"heatmap"===e.contours.coloring){var N={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};B.xfill=p(N,D,h,d,I,_),B.yfill=p(N,R,v,m,y.length,w)}return[B]}},{"../../components/colorscale/calc":600,"../../lib":717,"../../plots/cartesian/axes":765,"../../registry":846,"../histogram2d/calc":1032,"./clean_2d_array":1002,"./convert_column_xyz":1004,"./find_empties":1006,"./interp2d":1009,"./make_bound_array":1010}],1002:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,p;function h(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=0;o--)(s=((f[[(r=(i=p[o])[0])-1,a=i[1]]]||g)[2]+(f[[r+1,a]]||g)[2]+(f[[r,a-1]]||g)[2]+(f[[r,a+1]]||g)[2])/20)&&(l[i]=[r,a,s],p.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(i in l)f[i]=l[i],u.push(l[i])}return u.sort((function(t,e){return e[2]-t[2]}))}},{"../../lib":717}],1007:[function(t,e,r){"use strict";var n=t("../../components/fx"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../../components/colorscale").extractOpts;e.exports=function(t,e,r,s,l,c){var u,f,p,h,d=t.cd[0],g=d.trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,k=d.zmask,T=g.zhoverformat,A=y,M=x;if(!1!==t.index){try{p=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index)}if(p<0||p>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(c){var E;for(A=[2*y[0]-y[1]],E=1;Eg&&(m=Math.max(m,Math.abs(t[i][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,a=1;for(o(t,e),r=0;r.01;r++)a=o(t,e,i(a));return a>.01&&n.log("interp2d didn't converge quickly",a),t}},{"../../lib":717}],1010:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib").isArrayOrTypedArray;e.exports=function(t,e,r,i,o,s){var l,c,u,f=[],p=n.traceIs(t,"contour"),h=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(a(e)&&e.length>1&&!h&&"category"!==s.type){var g=e.length;if(!(g<=o))return p?e.slice(0,o):e.slice(0,o+1);if(p||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u0;)p=h.c2p(k[y]),y--;for(p0;)m=d.c2p(T[y]),y--;if(m0&&(i=!0);for(var l=0;li){var o=i-r[t];return r[t]=i,o}}return 0},max:function(t,e,r,a){var i=a[e];if(n(i)){if(i=Number(i),!n(r[t]))return r[t]=i,i;if(r[t]c?t>o?t>1.1*a?a:t>1.1*i?i:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function h(t,e,r,n,i,s){if(n&&t>o){var l=d(e,i,s),c=d(r,i,s),u=t===a?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(t,e,r,n,i){var s,l,c=-1.1*e,p=-.1*e,h=t-p,d=r[0],g=r[1],v=Math.min(f(d+p,d+h,n,i),f(g+p,g+h,n,i)),m=Math.min(f(d+c,d+p,n,i),f(g+c,g+p,n,i));if(v>m&&mo){var y=s===a?1:6,x=s===a?"M12":"M1";return function(e,r){var o=n.c2d(e,a,i),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,i);if(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,h)),D.start=r.l2r(j),F||a.nestedProperty(e,m+".start").set(D.start)}var V=b.end,U=r.r2l(I.end),q=void 0!==U;if((b.endFound||q)&&U!==r.r2l(V)){var H=q?U:a.aggNums(Math.max,null,d);D.end=r.l2r(H),q||a.nestedProperty(e,m+".start").set(D.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[m]=a.extendFlat({},e[m]||{}),delete e._input[G],delete e[G]),[D,d]}e.exports={calc:function(t,e){var r,i,h,d,g=[],v=[],m=o.getFromId(t,"h"===e.orientation?e.yaxis:e.xaxis),y="h"===e.orientation?"y":"x",x={x:"y",y:"x"}[y],b=e[y+"calendar"],_=e.cumulative,w=p(t,e,m,y),k=w[0],T=w[1],A="string"==typeof k.size,M=[],E=A?M:k,S=[],C=[],L=[],O=0,P=e.histnorm,I=e.histfunc,D=-1!==P.indexOf("density");_.enabled&&D&&(P=P.replace(/ ?density$/,""),D=!1);var z,R="max"===I||"min"===I?null:0,F=l.count,B=c[P],N=!1,j=function(t){return m.r2c(t,0,b)};for(a.isArrayOrTypedArray(e[x])&&"count"!==I&&(z=e[x],N="avg"===I,F=l[I]),r=j(k.start),h=j(k.end)+(r-o.tickIncrement(r,k.size,!1,b))/1e6;r=0&&d=0;n--)s(n);else if("increasing"===e){for(n=1;n=0;n--)t[n]+=t[n+1];"exclude"===r&&(t.push(0),t.shift())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],J=0,K=X-1;for(r=0;r=J;r--)if(v[r]){K=r;break}for(r=J;r<=K;r++)if(n(g[r])&&n(v[r])){var $={p:g[r],s:v[r],b:0};_.enabled||($.pts=L[r],q?$.ph0=$.ph1=L[r].length?T[L[r][0]]:g[r]:($.ph0=V(M[r]),$.ph1=V(M[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,e),a.isArrayOrTypedArray(e.selectedpoints)&&a.tagSelected(Z,e,W),Z},calcAllAutoBins:p}},{"../../lib":717,"../../plots/cartesian/axes":765,"../../registry":846,"../bar/arrays_to_calcdata":855,"./average":1019,"./bin_functions":1021,"./bin_label_vals":1022,"./norm_functions":1030,"fast-isnumeric":228}],1024:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],1025:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axis_ids"),i=t("../../registry").traceIs,o=t("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=a.getAxisGroup,c=[{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"}],u=["x","y"];e.exports=function(t,e){var r,f,p,h,d,g,v,m=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return"v"===t.orientation?"x":"y"}function k(t,r,i){var o=t.uid+"__"+i;r||(r=o);var s=function(t,r){return a.getFromTrace({_fullLayout:e},t,r).type}(t,i),l=t[i+"calendar"]||"",c=m[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(i)):(r=o,s!==c.axType&&n.warn(["Attempted to group the bins of trace",t.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&n.warn(["Attempted to group the bins of trace",t.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(m[r]={traces:[t],dirs:[i],axType:s,calendar:t[i+"calendar"]||""}),t["_"+i+"bingroup"]=r}for(d=0;dE&&k.splice(E,k.length-E),M.length>E&&M.splice(E,M.length-E);var S=[],C=[],L=[],O="string"==typeof w.size,P="string"==typeof A.size,I=[],D=[],z=O?I:w,R=P?D:A,F=0,B=[],N=[],j=e.histnorm,V=e.histfunc,U=-1!==j.indexOf("density"),q="max"===V||"min"===V?null:0,H=i.count,G=o[j],W=!1,Y=[],X=[],Z="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";Z&&"count"!==V&&(W="avg"===V,H=i[V]);var J=w.size,K=x(w.start),$=x(w.end)+(K-a.tickIncrement(K,J,!1,m))/1e6;for(r=K;r<$;r=a.tickIncrement(r,J,!1,m))C.push(q),I.push(r),W&&L.push(0);I.push(r);var Q,tt=C.length,et=(r-K)/tt,rt=(Q=K+et/2,g.c2r(Q,0,m)),nt=A.size,at=b(A.start),it=b(A.end)+(at-a.tickIncrement(at,nt,!1,y))/1e6;for(r=at;r=0&&h=0&&d0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u=Math.floor((e-o.x0)/s.dx),f=Math.floor(Math.abs(r-o.y0)/s.dy);if(o.z[f][u]){var p,h=o.hi||s.hoverinfo;if(h){var d=h.split("+");-1!==d.indexOf("all")&&(d=["color"]),-1!==d.indexOf("color")&&(p=!0)}var g,v=s.colormodel,m=v.length,y=s._scaler(o.z[f][u]),x=i.colormodel[v].suffix,b=[];(s.hovertemplate||p)&&(b.push("["+[y[0]+x[0],y[1]+x[1],y[2]+x[2]].join(", ")),4===m&&b.push(", "+y[3]+x[3]),b.push("]"),b=b.join(""),t.extraText=v.toUpperCase()+": "+b),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[f])?g=s.hovertext[f][u]:Array.isArray(s.text)&&Array.isArray(s.text[f])&&(g=s.text[f][u]);var _=c.c2p(o.y0+(f+.5)*s.dy),w=o.x0+(u+.5)*s.dx,k=o.y0+(f+.5)*s.dy,T="["+o.z[f][u].slice(0,s.colormodel.length).join(", ")+"]";return[a.extendFlat(t,{index:[f,u],x0:l.c2p(o.x0+u*s.dx),x1:l.c2p(o.x0+(u+1)*s.dx),y0:_,y1:_,color:y,xVal:w,xLabelVal:w,yVal:k,yLabelVal:k,zLabelVal:T,text:g,hovertemplateLabels:{zLabel:T,colorLabel:b,"color[0]Label":y[0]+x[0],"color[1]Label":y[1]+x[1],"color[2]Label":y[2]+x[2],"color[3]Label":y[3]+x[3]}})]}}}},{"../../components/fx":630,"../../lib":717,"./constants":1042}],1046:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover"),eventData:t("./event_data"),moduleType:"trace",name:"image",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":776,"./attributes":1040,"./calc":1041,"./defaults":1043,"./event_data":1044,"./hover":1045,"./plot":1047,"./style":1048}],1047:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../constants/xmlns_namespaces"),o=t("./constants");e.exports=function(t,e,r,s){var l=e.xaxis,c=e.yaxis;a.makeTraceGroups(s,r,"im").each((function(t){var e,r,s,u,f,p,h=n.select(this),d=t[0],g=d.trace,v=d.z,m=d.x0,y=d.y0,x=d.w,b=d.h,_=g.dx,w=g.dy;for(p=0;void 0===e&&p0;)r=l.c2p(m+p*_),p--;for(p=0;void 0===u&&p0;)f=c.c2p(y+p*w),p--;r0}function x(t){t.each((function(t){d.stroke(n.select(this),t.line.color)})).each((function(t){d.fill(n.select(this),t.color)})).style("stroke-width",(function(t){return t.line.width}))}function b(t,e,r){var n=t._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),o={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return a.coerce(i,o,h,t,e)}return f(i,o,l,s,n),p(i,o,l,s),o}function _(t,e){return"translate("+t+","+e+")"}function w(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function k(t,e,r,a){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(i);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(c.convertToTspans,a).call(s.font,e),s.bBox(o.node())}function T(t,e,r,n,i,o){var s="_cache"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=a.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,f){var p,h=t._fullLayout;y(r)&&f&&(p=f()),a.makeTraceGroups(h._indicatorlayer,e,"trace").each((function(e){var f,A,M,E,S,C=e[0].trace,L=n.select(this),O=C._hasGauge,P=C._isAngular,I=C._isBullet,D=C.domain,z={w:h._size.w*(D.x[1]-D.x[0]),h:h._size.h*(D.y[1]-D.y[0]),l:h._size.l+h._size.w*D.x[0],r:h._size.r+h._size.w*(1-D.x[1]),t:h._size.t+h._size.h*(1-D.y[1]),b:h._size.b+h._size.h*D.y[0]},R=z.l+z.w/2,F=z.t+z.h/2,B=Math.min(z.w/2,z.h),N=l.innerRadius*B,j=C.align||"center";if(A=F,O){if(P&&(f=R,A=F+B/2,M=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*N)}),I){var V=l.bulletPadding,U=1-l.bulletNumberDomainSize+V;f=z.l+(U+(1-U)*v[j])*z.w,M=function(t){return w(t,(l.bulletNumberDomainSize-V)*z.w,z.h)}}}else f=z.l+v[j]*z.w,M=function(t){return w(t,z.w,z.h)};!function(t,e,r,i){var o,l,f,p=r[0].trace,h=i.numbersX,x=i.numbersY,w=p.align||"center",A=g[w],M=i.transitionOpts,E=i.onComplete,S=a.ensureSingle(e,"g","numbers"),C=[];p._hasNumber&&C.push("number"),p._hasDelta&&(C.push("delta"),"left"===p.delta.position&&C.reverse());var L=S.selectAll("text").data(C);function O(e,r,n,a){if(!e.match("s")||n>=0==a>=0||r(n).slice(-1).match(m)||r(a).slice(-1).match(m))return r;var i=e.slice().replace("s","f").replace(/\d+/,(function(t){return parseInt(t)-1})),o=b(t,{tickformat:i});return function(t){return Math.abs(t)<1?u.tickText(o,t).text:r(t)}}L.enter().append("text"),L.attr("text-anchor",(function(){return A})).attr("class",(function(t){return t})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),L.exit().remove();var P,I=p.mode+p.align;if(p._hasDelta&&(P=function(){var e=b(t,{tickformat:p.delta.valueformat},p._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=function(t){return p.delta.relative?t.relativeDelta:t.delta},o=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?p.delta.increasing.symbol:p.delta.decreasing.symbol)+e(t)},f=function(t){return t.delta>=0?p.delta.increasing.color:p.delta.decreasing.color};void 0===p._deltaLastValue&&(p._deltaLastValue=i(r[0]));var h=S.select("text.delta");function g(){h.text(o(i(r[0]),a)).call(d.fill,f(r[0])).call(c.convertToTspans,t)}return h.call(s.font,p.delta.font).call(d.fill,f({delta:p._deltaLastValue})),y(M)?h.transition().duration(M.duration).ease(M.easing).tween("text",(function(){var t=n.select(this),e=i(r[0]),s=p._deltaLastValue,l=O(p.delta.valueformat,a,s,e),c=n.interpolateNumber(s,e);return p._deltaLastValue=e,function(e){t.text(o(c(e),l)),t.call(d.fill,f({delta:c(e)}))}})).each("end",(function(){g(),E&&E()})).each("interrupt",(function(){g(),E&&E()})):g(),l=k(o(i(r[0]),a),p.delta.font,A,t),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,f=l),p._hasNumber&&(function(){var e=b(t,{tickformat:p.number.valueformat},p._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=p.number.suffix,l=p.number.prefix,f=S.select("text.number");function h(){var e="number"==typeof r[0].y?l+a(r[0].y)+i:"-";f.text(e).call(s.font,p.number.font).call(c.convertToTspans,t)}y(M)?f.transition().duration(M.duration).ease(M.easing).each("end",(function(){h(),E&&E()})).each("interrupt",(function(){h(),E&&E()})).attrTween("text",(function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);p._lastValue=r[0].y;var o=O(p.number.valueformat,a,r[0].lastY,r[0].y);return function(r){t.text(l+o(e(r))+i)}})):h(),o=k(l+a(r[0].y)+i,p.number.font,A,t)}(),I+=p.number.font.size+p.number.font.family+p.number.valueformat+p.number.suffix+p.number.prefix,f=o),p._hasDelta&&p._hasNumber){var D,z,R=[(o.left+o.right)/2,(o.top+o.bottom)/2],F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=.75*p.delta.font.size;"left"===p.delta.position&&(D=T(p,"deltaPos",0,-1*(o.width*v[p.align]+l.width*(1-v[p.align])+B),I,Math.min),z=R[1]-F[1],f={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:l.left+D,right:o.right,top:Math.min(o.top,l.top+z),bottom:Math.max(o.bottom,l.bottom+z)}),"right"===p.delta.position&&(D=T(p,"deltaPos",0,o.width*(1-v[p.align])+l.width*v[p.align]+B,I,Math.max),z=R[1]-F[1],f={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:o.left,right:l.right+D,top:Math.min(o.top,l.top+z),bottom:Math.max(o.bottom,l.bottom+z)}),"bottom"===p.delta.position&&(D=null,z=l.height,f={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&&(D=null,z=o.top,f={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:D,dy:z})}(p._hasNumber||p._hasDelta)&&S.attr("transform",(function(){var t=i.numbersScaler(f);I+=t[2];var e,r=T(p,"numbersScale",1,t[0],I,Math.min);p._scaleNumbers||(r=1),e=p._isAngular?x-r*f.bottom:x-r*(f.top+f.bottom)/2,p._numbersTop=r*f.top+e;var n=f[w];"center"===w&&(n=(f.left+f.right)/2);var a=h-r*n;return _(a=T(p,"numbersTranslate",0,a,I,Math.max),e)+" scale("+r+")"}))}(t,L,e,{numbersX:f,numbersY:A,numbersScaler:M,transitionOpts:r,onComplete:p}),O&&(E={range:C.gauge.axis.range,color:C.gauge.bgcolor,line:{color:C.gauge.bordercolor,width:0},thickness:1},S={range:C.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:C.gauge.bordercolor,width:C.gauge.borderwidth},thickness:1});var q=L.selectAll("g.angular").data(P?e:[]);q.exit().remove();var H=L.selectAll("g.angularaxis").data(P?e:[]);H.exit().remove(),P&&function(t,e,r,a){var s,l,c,f,p=r[0].trace,h=a.size,d=a.radius,g=a.innerRadius,v=a.gaugeBg,m=a.gaugeOutline,w=[h.l+h.w/2,h.t+h.h/2+d/2],k=a.gauge,T=a.layer,A=a.transitionOpts,M=a.onComplete,E=Math.PI/2;function S(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((g+d)/2-t/2*(d-g)).outerRadius((g+d)/2+t/2*(d-g)).startAngle(-E)}function L(t){t.attr("d",(function(t){return C(t.thickness).startAngle(S(t.range[0])).endAngle(S(t.range[1]))()}))}k.enter().append("g").classed("angular",!0),k.attr("transform",_(w[0],w[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),(s=b(t,p.gauge.axis)).type="linear",s.range=p.gauge.axis.range,s._id="xangularaxis",s.setScale();var O=function(t){return(s.range[0]-t.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},P={},I=u.makeLabelFns(s,0).labelStandoff;P.xFn=function(t){var e=O(t);return Math.cos(e)*I},P.yFn=function(t){var e=O(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(I+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*o)},P.anchorFn=function(t){var e=O(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},P.heightFn=function(t,e,r){var n=O(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return _(w[0]+d*Math.cos(t),w[1]-d*Math.sin(t))};if(c=function(t){return D(O(t))},l=u.calcTicks(s),f=u.getTickSigns(s)[2],s.visible){f="inside"===s.ticks?-1:1;var z=(s.linewidth||1)/2;u.drawTicks(t,s,{vals:l,layer:T,path:"M"+f*z+",0h"+f*s.ticklen,transFn:function(t){var e=O(t);return D(e)+"rotate("+-i(e)+")"}}),u.drawLabels(t,s,{vals:l,layer:T,transFn:c,labelFns:P})}var R=[v].concat(p.gauge.steps),F=k.selectAll("g.bg-arc").data(R);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(x),F.exit().remove();var B=C(p.gauge.bar.thickness),N=k.selectAll("g.value-arc").data([p.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var j,V,U,q=N.select("path");y(A)?(q.transition().duration(A.duration).ease(A.easing).each("end",(function(){M&&M()})).each("interrupt",(function(){M&&M()})).attrTween("d",(j=B,V=S(r[0].lastY),U=S(r[0].y),function(){var t=n.interpolate(V,U);return function(e){return j.endAngle(t(e))()}})),p._lastValue=r[0].y):q.attr("d","number"==typeof r[0].y?B.endAngle(S(r[0].y)):"M0,0Z"),q.call(x),N.exit().remove(),R=[];var H=p.gauge.threshold.value;H&&R.push({range:[H,H],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var G=k.selectAll("g.threshold-arc").data(R);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(L).call(x),G.exit().remove();var W=k.selectAll("g.gauge-outline").data([m]);W.enter().append("g").classed("gauge-outline",!0).append("path"),W.select("path").call(L).call(x),W.exit().remove()}(t,0,e,{radius:B,innerRadius:N,gauge:q,layer:H,size:z,gaugeBg:E,gaugeOutline:S,transitionOpts:r,onComplete:p});var G=L.selectAll("g.bullet").data(I?e:[]);G.exit().remove();var W=L.selectAll("g.bulletaxis").data(I?e:[]);W.exit().remove(),I&&function(t,e,r,n){var a,i,o,s,c,f=r[0].trace,p=n.gauge,h=n.layer,g=n.gaugeBg,v=n.gaugeOutline,m=n.size,_=f.domain,w=n.transitionOpts,k=n.onComplete;p.enter().append("g").classed("bullet",!0),p.attr("transform","translate("+m.l+", "+m.t+")"),h.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),h.selectAll("g.xbulletaxistick,path,text").remove();var T=m.h,A=f.gauge.bar.thickness*T,M=_.x[0],E=_.x[0]+(_.x[1]-_.x[0])*(f._hasNumber||f._hasDelta?1-l.bulletNumberDomainSize:1);function S(t){t.attr("width",(function(t){return Math.max(0,a.c2p(t.range[1])-a.c2p(t.range[0]))})).attr("x",(function(t){return a.c2p(t.range[0])})).attr("y",(function(t){return.5*(1-t.thickness)*T})).attr("height",(function(t){return t.thickness*T}))}(a=b(t,f.gauge.axis))._id="xbulletaxis",a.domain=[M,E],a.setScale(),i=u.calcTicks(a),o=u.makeTransFn(a),s=u.getTickSigns(a)[2],c=m.t+m.h,a.visible&&(u.drawTicks(t,a,{vals:"inside"===a.ticks?u.clipEnds(a,i):i,layer:h,path:u.makeTickPath(a,c,s),transFn:o}),u.drawLabels(t,a,{vals:i,layer:h,transFn:o,labelFns:u.makeLabelFns(a,c)}));var C=[g].concat(f.gauge.steps),L=p.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(S).call(x),L.exit().remove();var O=p.selectAll("g.value-bullet").data([f.gauge.bar]);O.enter().append("g").classed("value-bullet",!0).append("rect"),O.select("rect").attr("height",A).attr("y",(T-A)/2).call(x),y(w)?O.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(f.gauge.axis.range[1],r[0].y)))):O.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,a.c2p(Math.min(f.gauge.axis.range[1],r[0].y))):0),O.exit().remove();var P=r.filter((function(){return f.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(f.gauge.threshold.value)).attr("x2",a.c2p(f.gauge.threshold.value)).attr("y1",(1-f.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-f.gauge.threshold.thickness)/2)*T).call(d.stroke,f.gauge.threshold.line.color).style("stroke-width",f.gauge.threshold.line.width),I.exit().remove();var D=p.selectAll("g.gauge-outline").data([v]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(S).call(x),D.exit().remove()}(t,0,e,{gauge:G,layer:W,size:z,gaugeBg:E,gaugeOutline:S,transitionOpts:r,onComplete:p});var Y=L.selectAll("text.title").data(e);Y.exit().remove(),Y.enter().append("text").classed("title",!0),Y.attr("text-anchor",(function(){return I?g.right:g[C.title.align]})).text(C.title.text).call(s.font,C.title.font).call(c.convertToTspans,t),Y.attr("transform",(function(){var t,e=z.l+z.w*v[C.title.align],r=l.titlePadding,n=s.bBox(Y.node());return O?(P&&(t=C.gauge.axis.visible?s.bBox(H.node()).top-r-n.bottom:z.t+z.h/2-B/2-n.bottom-r),I&&(t=A-(n.top+n.bottom)/2,e=z.l-l.bulletPadding*z.w)):t=C._numbersTop-r-n.bottom,_(e,t)}))}))}},{"../../components/color":592,"../../components/drawing":613,"../../constants/alignment":686,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"../../plots/cartesian/axis_defaults":767,"../../plots/cartesian/layout_attributes":777,"../../plots/cartesian/position_defaults":780,"./constants":1052,d3:165}],1056:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll,c=e.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(),showlegend:s({},o.showlegend,{dflt:!1})},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");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plot_api/edit_types":748,"../../plots/attributes":762,"../../plots/template_attributes":841,"../mesh3d/attributes":1061}],1057:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),a=t("../streamtube/calc").processGrid,i=t("../streamtube/calc").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=i(e.x,e._len),e._y=i(e.y,e._len),e._z=i(e.z,e._len),e._value=i(e.value,e._len);var r=a(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),a=Math.max(e[r],e[r-1]);if(a>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){L();var a,i,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],a=t[2],i=function(t,e,r){for(var n=[],a=0;a-1?n[h]:C(d,g,m);p[h]=x>-1?x:P(d,g,m,R(e,y))}a=p[0],i=p[1],o=p[2],t._meshI.push(a),t._meshJ.push(i),t._meshK.push(o),++v}}function B(t,e,r,n){var a=t[3];an&&(a=n);for(var i=(t[3]-a)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-i)*t[s]+i*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(S-E);return t>=E-e&&t<=S+e}function V(e){for(var r=[],n=0;n<4;n++){var a=e[n];r.push([t._x[a],t._y[a],t._z[a],t._value[a]])}return r}function U(t,e,r,n,a,i){i||(i=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,a),N(e[1][3],n,a),N(e[2][3],n,a)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):i<3&&U(t,e,r,E,S,++i)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(i){if(s[i[0]]&&s[i[1]]&&!s[i[2]]){var u=e[i[0]],f=e[i[1]],p=e[i[2]],h=B(p,u,n,a),d=B(p,f,n,a);o=l(t,[d,h,u],[-1,-1,r[i[0]]])||o,o=l(t,[u,f,d],[r[i[0]],r[i[1]],-1])||o,c=!0}})),c?o:([[0,1,2],[1,2,0],[2,0,1]].forEach((function(i){if(s[i[0]]&&!s[i[1]]&&!s[i[2]]){var u=e[i[0]],f=e[i[1]],p=e[i[2]],h=B(f,u,n,a),d=B(p,u,n,a);o=l(t,[d,h,u],[-1,-1,r[i[0]]])||o,c=!0}})),o)}function q(t,e,r,n){var a=!1,i=V(e),o=[N(i[0][3],r,n),N(i[1][3],r,n),N(i[2][3],r,n),N(i[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return a;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(a=function(t,e,r){var n=function(n,a,i){F(t,[e[n],e[a],e[i]],[r[n],r[a],r[i]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,i,e)||a),a;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=i[l[0]],u=i[l[1]],f=i[l[2]],p=i[l[3]];if(g)a=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||a;else{var h=B(p,c,r,n),d=B(p,u,r,n),v=B(p,f,r,n);a=F(null,[h,d,v],[-1,-1,-1])||a}s=!0}})),s?a:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=i[l[0]],u=i[l[1]],f=i[l[2]],p=i[l[3]],h=B(f,c,r,n),d=B(f,u,r,n),v=B(p,u,r,n),m=B(p,c,r,n);g?(a=F(t,[c,m,h],[e[l[0]],-1,-1])||a,a=F(t,[u,d,v],[e[l[1]],-1,-1])||a):a=function(t,e,r){var n=function(n,a,i){F(t,[e[n],e[a],e[i]],[r[n],r[a],r[i]])};n(0,1,2),n(2,3,0)}(null,[h,d,v,m],[-1,-1,-1,-1])||a,s=!0}})),s?a:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=i[l[0]],u=i[l[1]],f=i[l[2]],p=i[l[3]],h=B(u,c,r,n),d=B(f,c,r,n),v=B(p,c,r,n);g?(a=F(t,[c,h,d],[e[l[0]],-1,-1])||a,a=F(t,[c,d,v],[e[l[0]],-1,-1])||a,a=F(t,[c,v,h],[e[l[0]],-1,-1])||a):a=F(null,[h,d,v],[-1,-1,-1])||a,s=!0}})),a))}function H(t,e,r,n,a,i,o,s,l,c,u){var f=!1;return d&&(z(t,"A")&&(f=q(null,[e,r,n,i],c,u)||f),z(t,"B")&&(f=q(null,[r,n,a,l],c,u)||f),z(t,"C")&&(f=q(null,[r,i,o,l],c,u)||f),z(t,"D")&&(f=q(null,[n,i,s,l],c,u)||f),z(t,"E")&&(f=q(null,[r,n,i,l],c,u)||f)),g&&(f=q(t,[r,n,i,l],c,u)||f),f}function G(t,e,r,n,a,i,o,s){return[!0===s[0]||U(t,V([e,r,n]),[e,r,n],i,o),!0===s[1]||U(t,V([n,a,e]),[n,a,e],i,o)]}function W(t,e,r,n,a,i,o,s,l){return s?G(t,e,r,a,n,i,o,l):G(t,r,a,n,e,i,o,l)}function Y(t,e,r,n,a,i,o){var s,l,c,u,f=!1,p=function(){f=U(t,[s,l,c],[-1,-1,-1],a,i)||f,f=U(t,[c,u,s],[-1,-1,-1],a,i)||f},h=o[0],d=o[1],g=o[2];return h&&(s=I(V([T(e,r-0,n-0)])[0],V([T(e-1,r-0,n-0)])[0],h),l=I(V([T(e,r-0,n-1)])[0],V([T(e-1,r-0,n-1)])[0],h),c=I(V([T(e,r-1,n-1)])[0],V([T(e-1,r-1,n-1)])[0],h),u=I(V([T(e,r-1,n-0)])[0],V([T(e-1,r-1,n-0)])[0],h),p()),d&&(s=I(V([T(e-0,r,n-0)])[0],V([T(e-0,r-1,n-0)])[0],d),l=I(V([T(e-0,r,n-1)])[0],V([T(e-0,r-1,n-1)])[0],d),c=I(V([T(e-1,r,n-1)])[0],V([T(e-1,r-1,n-1)])[0],d),u=I(V([T(e-1,r,n-0)])[0],V([T(e-1,r-1,n-0)])[0],d),p()),g&&(s=I(V([T(e-0,r-0,n)])[0],V([T(e-0,r-0,n-1)])[0],g),l=I(V([T(e-0,r-1,n)])[0],V([T(e-0,r-1,n-1)])[0],g),c=I(V([T(e-1,r-1,n)])[0],V([T(e-1,r-1,n-1)])[0],g),u=I(V([T(e-1,r-0,n)])[0],V([T(e-1,r-0,n-1)])[0],g),p()),f}function X(t,e,r,n,a,i,o,s,l,c,u,f){var p=t;return f?(d&&"even"===t&&(p=null),H(p,e,r,n,a,i,o,s,l,c,u)):(d&&"odd"===t&&(p=null),H(p,l,s,o,i,a,n,r,e,c,u))}function Z(t,e,r,n,a){for(var i=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];Q(e,k[0],k[1])}}var C=[[Math.min(E,M),Math.max(E,M)],[Math.min(A,S),Math.max(A,S)]];["x","y","z"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(h.id),"x"===e?f.push([h.distRatio,0,0]):"y"===e?f.push([0,h.distRatio,0]):f.push([0,0,h.distRatio]))}else c=nt(1,"x"===e?b-1:"y"===e?_-1:w-1);u.length>0&&(r[a]="x"===e?tt(null,u,i,o,f,r[a]):"y"===e?et(null,u,i,o,f,r[a]):rt(null,u,i,o,f,r[a]),a++),c.length>0&&(r[a]="x"===e?Z(null,c,i,o,r[a]):"y"===e?J(null,c,i,o,r[a]):K(null,c,i,o,r[a]),a++)}var d=t.caps[e];d.show&&d.fill&&(D(d.fill),r[a]="x"===e?Z(null,[0,b-1],i,o,r[a]):"y"===e?J(null,[0,_-1],i,o,r[a]):K(null,[0,w-1],i,o,r[a]),a++)}})),0===v&&O(),t._meshX=n,t._meshY=a,t._meshZ=i,t._meshIntensity=o,t._Xs=m,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:p,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,a=n({gl:r}),i=new c(t,a,e.uid);return a._trace=i,i.update(e),t.glplot.add(a),i}}},{"../../components/colorscale":604,"../../lib/gl_format_color":714,"../../lib/str2rgbarray":740,"../../plots/gl3d/zip3":816,"gl-mesh3d":283}],1059:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("../../components/colorscale/defaults");function s(t,e,r,n,i){var s=i("isomin"),l=i("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=i("x"),u=i("y"),f=i("z"),p=i("value");c&&c.length&&u&&u.length&&f&&f.length&&p&&p.length?(a.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),["x","y","z"].forEach((function(t){var e="caps."+t;i(e+".show")&&i(e+".fill");var r="slices."+t;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(t){i(t)})),o(t,e,n,i,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,a){s(t,e,0,a,(function(r,a){return n.coerce(t,e,i,r,a)}))},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":602,"../../lib":717,"../../registry":846,"./attributes":1056}],1060:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,calc:t("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:t("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":805,"./attributes":1056,"./calc":1057,"./convert":1058,"./defaults":1059}],1061:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../surface/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat;e.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"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",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"}),showlegend:s({},o.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../surface/attributes":1243}],1062:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":600}],1063:[function(t,e,r){"use strict";var n=t("gl-mesh3d"),a=t("delaunay-triangulate"),i=t("alpha-shape"),o=t("convex-hull"),s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p=f.prototype;function h(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}p.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},p.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,p=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!v(t.i,f)||!v(t.j,f)||!v(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(p):t.alphahull>0?i(t.alphahull,p):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],i=e.length,o=0;ov):g=k>b,v=k;var T=l(b,_,w,k);T.pos=x,T.yc=(b+k)/2,T.i=y,T.dir=g?"increasing":"decreasing",T.x=T.pos,T.y=[w,_],h&&(T.tx=e.text[y]),d&&(T.htx=e.hovertext[y]),m.push(T)}else m.push({pos:x,empty:!0})}return e._extremes[s._id]=i.findExtremes(s,n.concat(f,u),{padded:!0}),m.length&&(m[0].t={labels:{open:a(t,"open:")+" ",high:a(t,"high:")+" ",low:a(t,"low:")+" ",close:a(t,"close:")+" "}}),m}e.exports={calc:function(t,e){var r=i.getFromId(t,e.xaxis),a=i.getFromId(t,e.yaxis),o=function(t,e,r){var a=r._minDiff;if(!a){var i,o=t._fullData,s=[];for(a=1/0,i=0;i"+c.labels[x]+n.hoverLabelText(s,b):((y=a.extendFlat({},p)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name="",f.push(y),v[b]=y)}return f}function p(t,e,r,a){var i=t.cd,o=t.ya,l=i[0].trace,f=i[0].t,p=u(t,e,r,a);if(!p)return[];var h=i[p.index],d=p.index=h.i,g=h.dir;function v(t){return f.labels[t]+n.hoverLabelText(o,l[t][d])}var m=h.hi||l.hoverinfo,y=m.split("+"),x="all"===m,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[v("open"),v("high"),v("low"),v("close")+" "+c[g]]:[];return _&&s(h,l,w),p.extraText=w.join("
"),p.y0=p.y1=o.c2p(h.yc,!0),[p]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):p(t,e,r,n)},hoverSplit:f,hoverOnPoints:p}},{"../../components/color":592,"../../components/fx":630,"../../constants/delta.js":687,"../../lib":717,"../../plots/cartesian/axes":765}],1070:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc").calc,plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover").hoverPoints,selectPoints:t("./select")}},{"../../plots/cartesian":776,"./attributes":1066,"./calc":1067,"./defaults":1068,"./hover":1069,"./plot":1072,"./select":1073,"./style":1074}],1071:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib");e.exports=function(t,e,r,i){var o=r("x"),s=r("open"),l=r("high"),c=r("low"),u=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x"],i),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,a.minRowLength(o))),e._length=f,f}}},{"../../lib":717,"../../registry":846}],1072:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib");e.exports=function(t,e,r,i){var o=e.xaxis,s=e.yaxis;a.makeTraceGroups(i,r,"trace ohlc").each((function(t){var e=n.select(this),r=t[0],i=r.t;if(!0!==r.trace.visible||i.empty)e.remove();else{var l=i.tickLen,c=e.selectAll("path").data(a.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",(function(t){if(t.empty)return"M0,0Z";var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-l,!0),n=o.c2p(t.pos+l,!0);return"M"+r+","+s.c2p(t.o,!0)+"H"+e+"M"+e+","+s.c2p(t.h,!0)+"V"+s.c2p(t.l,!0)+"M"+n+","+s.c2p(t.c,!0)+"H"+e}))}}))}},{"../../lib":717,d3:165}],1073:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map((function(t){return t.displayindex}))))for(e=0;e0;c&&(o="array");var u=r("categoryorder",o);"array"===u?(r("categoryarray"),r("ticktext")):(delete t.categoryarray,delete t.ticktext),c||"array"!==u||(e.categoryorder="trace")}}e.exports=function(t,e,r,f){function p(r,a){return n.coerce(t,e,l,r,a)}var h=s(t,e,{name:"dimensions",handleItemDefaults:u}),d=function(t,e,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,p);o(e,f,p),Array.isArray(h)&&h.length||(e.visible=!1),c(e,h,"values",d),p("hoveron"),p("hovertemplate"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var g={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(p,"labelfont",g);var v={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(p,"tickfont",v)}},{"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"../../lib":717,"../../plots/array_container_defaults":761,"../../plots/domain":790,"../parcoords/merge_length":1091,"./attributes":1075}],1079:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:t("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1075,"./base_plot":1076,"./calc":1077,"./defaults":1078,"./plot":1081}],1080:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plot_api/plot_api"),i=t("../../components/fx"),o=t("../../lib"),s=t("../../components/drawing"),l=t("tinycolor2"),c=t("../../lib/svg_text_utils");function u(t,e,r,a){var i=t.map(z.bind(0,e,r)),l=a.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=l.selectAll("g.trace.parcats").data(i,f),v=u.enter().append("g").attr("class","trace parcats");u.attr("transform",(function(t){return"translate("+t.x+", "+t.y+")"})),v.append("g").attr("class","paths");var m=u.select("g.paths").selectAll("path.path").data((function(t){return t.paths}),f);m.attr("fill",(function(t){return t.model.color}));var b=m.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(t){return t.model.color})).attr("fill-opacity",0);x(b),m.attr("d",(function(t){return t.svgD})),b.empty()||m.sort(h),m.exit().remove(),m.on("mouseover",d).on("mouseout",g).on("click",y),v.append("g").attr("class","dimensions");var k=u.select("g.dimensions").selectAll("g.dimension").data((function(t){return t.dimensions}),f);k.enter().append("g").attr("class","dimension"),k.attr("transform",(function(t){return"translate("+t.x+", 0)"})),k.exit().remove();var T=k.selectAll("g.category").data((function(t){return t.categories}),f),A=T.enter().append("g").attr("class","category");T.attr("transform",(function(t){return"translate(0, "+t.y+")"})),A.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})),_(A);var M=T.selectAll("rect.bandrect").data((function(t){return t.bands}),f);M.each((function(){o.raiseToTop(this)})),M.attr("fill",(function(t){return t.color}));var P=M.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(t){return t.color})).attr("fill-opacity",0);M.attr("fill",(function(t){return t.color})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return t.y})).attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"})),w(P),M.exit().remove(),A.append("text").attr("class","catlabel").attr("pointer-events","none");var I=e._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",(function(t){return p(t)?"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(t){return p(t)?t.width+5:-5})).attr("y",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)})),A.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(t){return t.width/2})).attr("y",-5).text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})).each((function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)})),T.selectAll("rect.bandrect").on("mouseover",E).on("mouseout",S),T.exit().remove(),k.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on("dragstart",C).on("drag",L).on("dragend",O)),u.each((function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),u.exit().remove()}function f(t){return t.key}function p(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function h(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),C=n.mouse(f)[0];i.loneHover({trace:p,x:_-d.left+g.left,y:w-d.top+g.top,text:S,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:C<_?"right":"left",hovertemplate:(p.line||{}).hovertemplate,hovertemplateLabels:M,eventData:[{data:p._input,fullData:p,count:T,probability:A}]},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:f})}}}function g(t){if(!t.parcatsViewModel.dragDimension&&(x(n.select(this)),i.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),t.parcatsViewModel.pathSelection.sort(h),-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var e=v(t),r=m(t);t.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:e,event:n.event,constraints:r})}}function v(t){for(var e=[],r=P(t.parcatsViewModel),n=0;n1&&c.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,d=p/s.parcatsViewModel.model.count,g={countLabel:p,categoryLabel:h,probabilityLabel:d.toFixed(3)},v=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&v.push(["Count:",g.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&v.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var m=v.join("
");return{trace:u,x:r-t.left,y:f-t.top,text:m,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:u.hovertemplate,hovertemplateLabels:g,eventData:[{data:u._input,fullData:u,count:p,category:h,probability:d}]}}function E(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,a=r._fullLayout,s=a._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;"color"===c?(function(t){var e=n.select(t).datum(),r=k(e);b(r),r.each((function(){o.raiseToTop(this)})),n.select(t.parentNode).selectAll("rect.bandrect").filter((function(t){return t.color===e.color})).each((function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(this),A(this,"plotly_hover",n.event)):(function(t){n.select(t.parentNode).selectAll("rect.bandrect").each((function(t){var e=k(t);b(e),e.each((function(){o.raiseToTop(this)}))})),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),T(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===c?e=M(s,this):"color"===c?e=function(t,e){var r,a,i=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],f=c.trace,p=i.y+i.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=i.left,a="left"):(r=i.left+i.width,a="right");var h=s.model.categoryLabel,d=o.parcatsViewModel.model.count,g=0;o.categoryViewModel.bands.forEach((function(t){t.color===o.color&&(g+=t.count)}));var v=s.model.count,m=0;c.pathSelection.each((function(t){t.model.color===o.color&&(m+=t.model.count)}));var y=g/d,x=g/m,b=g/v,_={countLabel:d,categoryLabel:h,probabilityLabel:y.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color ∩ "+h+"): "+_.probabilityLabel),w.push("P("+h+" | color): "+x.toFixed(3)),w.push("P(color | "+h+"): "+b.toFixed(3)));var k=w.join("
"),T=l.mostReadable(o.color,["black","white"]);return{trace:f,x:r-t.left,y:p-t.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:T,fontSize:10,idealAlign:a,hovertemplate:f.hovertemplate,hovertemplateLabels:_,eventData:[{data:f._input,fullData:f,category:h,count:d,probability:y,categorycount:v,colorcount:m,bandcolorcount:g}]}}(s,this):"dimension"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){r.push(M(t,this))})),r}(s,this)),e&&i.loneHover(e,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r}))}}function S(t){var e=t.parcatsViewModel;e.dragDimension||(x(e.pathSelection),_(e.dimensionSelection.selectAll("g.category")),w(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),i.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(h),-1!==e.hoverinfoItems.indexOf("skip"))||("color"===t.parcatsViewModel.hoveron?A(this,"plotly_unhover",n.event):T(this,"plotly_unhover",n.event))}function C(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(e){var r=n.mouse(this)[0],a=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=a&&a<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map((function(t){return t.displayInd})),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(e){e.yf.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){i.model.dragX=n.event.x;var p=t.parcatsViewModel.dimensions[r],h=t.parcatsViewModel.dimensions[a];void 0!==p&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=i.model.displayInd}B(t.parcatsViewModel),F(t.parcatsViewModel),D(t.parcatsViewModel),I(t.parcatsViewModel)}}function O(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=P(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.forEach((function(r,n){var a=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+a+"].displayindex"]=r}));var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map((function(t){return t.displayInd}));if(s=t.initialDragCategoryDisplayInds.some((function(t,e){return t!==l[e]}))){var c=t.model.categories.slice().sort((function(t,e){return t.displayInd-e.displayInd})),u=c.map((function(t){return t.categoryValue})),f=c.map((function(t){return t.categoryLabel}));e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[f],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?A(t.potentialClickBand,"plotly_click",n.event.sourceEvent):T(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd&&(t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null),t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,B(t.parcatsViewModel),F(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){D(t.parcatsViewModel,!0),I(t.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function P(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+a)+" "+l[s]+","+(e[s]+a)+" "+(t[s]+r[s])+","+(e[s]+a),u+="l-"+r[s]+",0 ";return u+="Z"}function F(t){var e=t.dimensions,r=t.model,n=e.map((function(t){return t.categories.map((function(t){return t.y}))})),a=t.model.dimensions.map((function(t){return t.categories.map((function(t){return t.displayInd}))})),i=t.model.dimensions.map((function(t){return t.displayInd})),o=t.dimensions.map((function(t){return t.model.dimensionInd})),s=e.map((function(t){return t.x})),l=e.map((function(t){return t.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function f(t){var e=t.categoryInds.map((function(t,e){return a[e][t]}));return o.map((function(t){return e[t]}))}c.sort((function(e,r){var n=f(e),a=f(r);return"backward"===t.sortpaths&&(n.reverse(),a.reverse()),n.push(e.valueInds[0]),a.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),a.unshift(r.rawColor)),na?1:0}));for(var p=new Array(c.length),h=e[0].model.count,d=e[0].categories.map((function(t){return t.height})).reduce((function(t,e){return t+e})),g=0;g0?d*(m.count/h):0;for(var y,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*a;var i,o,s,l,c,u=[],f=t.model.maxCats,p=e.categories.length,h=e.count,d=t.height-8*(f-1),g=8*(f-p)/2,v=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(v.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?o.count/h*d:0,s={key:o.valueInds[0],model:o,width:16,height:i,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+i+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){u(r,t,n,e)}},{"../../components/drawing":613,"../../components/fx":630,"../../lib":717,"../../lib/svg_text_utils":741,"../../plot_api/plot_api":752,d3:165,tinycolor2:536}],1081:[function(t,e,r){"use strict";var n=t("./parcats");e.exports=function(t,e,r,a){var i=t._fullLayout,o=i._paper,s=i._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,a)}},{"./parcats":1080}],1082:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/cartesian/layout_attributes"),i=t("../../plots/font_attributes"),o=t("../../plots/domain").attributes,s=t("../../lib/extend").extendFlat,l=t("../../plot_api/plot_template").templatedArray;e.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":599,"../../lib/extend":708,"../../plot_api/plot_template":755,"../../plots/cartesian/layout_attributes":777,"../../plots/domain":790,"../../plots/font_attributes":791}],1083:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function f(t,e){return t*(1-u)+e*u}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var a=t?-1:1,i=0,o=e.length-1;if(a<0){var s=i;i=o,o=s}for(var l=e[i],u=l,p=i;a*pe){p=r;break}}if(i=u,isNaN(i)&&(i=isNaN(f)||isNaN(p)?isNaN(f)?p:f:e-c[f][1]t[1]+r||e=.9*t[1]+.1*t[0]?"n":e<=.9*t[0]+.1*t[1]?"s":"ns"}(d,e);g&&(o.interval=l[i],o.intervalPix=d,o.region=g)}}if(t.ordinal&&!o.region){var m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function _(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(e.unitToPaddedPx.invert):i.newExtent=[i.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(e),x(t.parentNode)}function w(t,e){var r=b(e,e.height-a.mouse(t)[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(t){t.on("mousemove",(function(t){a.event.preventDefault(),t.parent.inBrushDrag||w(this,t)})).on("mouseleave",(function(t){t.parent.inBrushDrag||m()})).call(a.behavior.drag().on("dragstart",(function(t){!function(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.unitToPaddedPx.invert(r),o=e.brush,s=b(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:i,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on("drag",(function(t){_(this,t)})).on("dragend",(function(t){!function(t,e){var r=e.brush,n=r.filter,i=r.svgBrush;i._dragging||(w(t,e),_(t,e),e.brush.svgBrush.wasDragged=!1),i._dragging=!1,a.event.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,e.parent.inBrushDrag=!1,m(),!i.wasDragged)return i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&e.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,0===i.extent.length&&A(r)):A(r),i.brushCallback(e),x(t.parentNode),void i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(c?[i.newExtent]:[]),i.extent.length||A(r),i.brushCallback(e),c?x(t.parentNode,s):(s(),x(t.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function T(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function M(t){for(var e,r=t.slice(),n=[],a=r.shift();a;){for(e=a.slice();(a=r.shift())&&a[0]<=e[1];)e[1]=Math.max(e[1],a[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,a,i){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=M(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=a,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e).slice();e.filter.set(r),o()}),brushEndCallback:i}}},ensureAxisBrush:function(t){var e=t.selectAll("."+n.cn.axisBrush).data(o,i);e.enter().append("g").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(".background").data(o);e.enter().append("rect").classed("background",!0).call(h).call(d).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),e.call(k).attr("height",(function(t){return t.height-n.verticalPadding}));var r=t.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(t){return t.height})).call(y);var a=t.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(t){return t.height})).call(y)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?M(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},{"../../lib":717,"../../lib/gup":715,"./constants":1086,d3:165}],1084:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/get_data").getModuleCalcData,i=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=a(t.calcdata,"parcoords")[0];e.length&&i(t,e)},r.clean=function(t,e,r,n){var a=n._has&&n._has("parcoords"),i=e._has&&e._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,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":694,"../../plots/get_data":800,"./plot":1093,d3:165}],1085:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale"),i=t("../../lib/gup").wrap;e.exports=function(t,e){var r,o;return a.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=a.extractOpts(e.line).colorscale,a.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),d.splice(f));var g=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:h}),v=function(t,e,r,o,s){var l=s("line.color",r);if(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),p(e,g,"values",v);var m={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",m),n.coerceFont(u,"tickfont",m),n.coerceFont(u,"rangefont",m),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"../../lib":717,"../../plots/array_container_defaults":761,"../../plots/cartesian/axes":765,"../../plots/domain":790,"./attributes":1082,"./axisbrush":1083,"./constants":1086,"./merge_length":1091}],1088:[function(t,e,r){"use strict";var n=t("../../lib").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!("visible"in t)}},{"../../lib":717}],1089:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:t("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":1082,"./base_plot":1084,"./calc":1085,"./defaults":1087,"./plot":1093}],1090:[function(t,e,r){"use strict";var n=t("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=t("./constants").maxDimensionCount,s=t("../../lib"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(t,e,r,n,a){var i=t._gl;i.enable(i.SCISSOR_TEST),i.scissor(e,r,n,a),t.clear({color:[0,0,0,0],depth:1})}function p(t,e,r,n,a,i){var o=i.key;r.drawCompleted||(function(t){t.read({x:0,y:0,width:1,height:1,data:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,a-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),r.clearOnly||(i.count=2*c,i.offset=2*l*n,e(i),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),a=0,i=0;iu&&(u=t[a].dim1.canvasX,o=a);0===s&&f(k,0,0,r.canvasWidth,r.canvasHeight);var h=function(t){var e,r,n,a=[[],[]];for(n=0;n<64;n++){var i=!t&&na._length&&(E=E.slice(0,a._length));var S,C=a.tickvals;function L(t,e){return{val:t,text:S[e]}}function O(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){S=a.ticktext,Array.isArray(S)&&S.length?S.length>C.length?S=S.slice(0,C.length):C.length>S.length&&(C=C.slice(0,S.length)):S=C.map(n.format(a.tickformat));for(var P=1;P=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,p={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==D&&(u?a.hover(p):a.unhover&&a.unhover(p),D=f)}})),I.style("opacity",(function(t){return t.pick?0:1})),u.style("background","rgba(255, 255, 255, 0)");var z=u.selectAll("."+g.cn.parcoords).data(T,f);z.exit().remove(),z.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),z.attr("transform",(function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"}));var R=z.selectAll("."+g.cn.parcoordsControlView).data(p,f);R.enter().append("g").classed(g.cn.parcoordsControlView,!0),R.attr("transform",(function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"}));var F=R.selectAll("."+g.cn.yAxis).data((function(t){return t.dimensions}),f);F.enter().append("g").classed(g.cn.yAxis,!0),R.each((function(t){L(F,t)})),I.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=m(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),F.attr("transform",(function(t){return"translate("+t.xScale(t.xIndex)+", 0)"})),F.call(n.behavior.drag().origin((function(t){return t})).on("drag",(function(t){var e=t.parent;k.linePickActive(!1),t.x=Math.max(-g.overdrag,Math.min(t.model.width+g.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,F.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),L(F,e),F.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr("transform",(function(t){return"translate("+t.xScale(t.xIndex)+", 0)"})),n.select(this).attr("transform","translate("+t.x+", 0)"),F.each((function(r,n,a){a===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!A(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,L(F,e),n.select(this).attr("transform",(function(t){return"translate("+t.x+", 0)"})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!A(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),k.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),F.exit().remove();var B=F.selectAll("."+g.cn.axisOverlays).data(p,f);B.enter().append("g").classed(g.cn.axisOverlays,!0),B.selectAll("."+g.cn.axis).remove();var N=B.selectAll("."+g.cn.axis).data(p,f);N.enter().append("g").classed(g.cn.axis,!0),N.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,a=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?a:null).tickFormat((function(e){return d.isOrdinal(t)?e:O(t.model.dimensions[t.visibleIndex],e)})).scale(r)),l.font(N.selectAll("text"),t.model.tickFont)})),N.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),N.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=B.selectAll("."+g.cn.axisHeading).data(p,f);j.enter().append("g").classed(g.cn.axisHeading,!0);var V=j.selectAll("."+g.cn.axisTitle).data(p,f);V.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),V.text((function(t){return t.label})).each((function(e){var r=n.select(this);l.font(r,e.model.labelFont),s.convertToTspans(r,t)})).attr("transform",(function(t){var e=C(t.model.labelAngle,t.model.labelSide),r=g.axisTitleOffset;return(e.dir>0?"":"translate(0,"+(2*r+t.model.height)+")")+"rotate("+e.degrees+")translate("+-r*e.dx+","+-r*e.dy+")"})).attr("text-anchor",(function(t){var e=C(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var U=B.selectAll("."+g.cn.axisExtent).data(p,f);U.enter().append("g").classed(g.cn.axisExtent,!0);var q=U.selectAll("."+g.cn.axisExtentTop).data(p,f);q.enter().append("g").classed(g.cn.axisExtentTop,!0),q.attr("transform","translate(0,"+-g.axisExtentOffset+")");var H=q.selectAll("."+g.cn.axisExtentTopText).data(p,f);H.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(S),H.text((function(t){return P(t,!0)})).each((function(t){l.font(n.select(this),t.model.rangeFont)}));var G=U.selectAll("."+g.cn.axisExtentBottom).data(p,f);G.enter().append("g").classed(g.cn.axisExtentBottom,!0),G.attr("transform",(function(t){return"translate(0,"+(t.model.height+g.axisExtentOffset)+")"}));var W=G.selectAll("."+g.cn.axisExtentBottomText).data(p,f);W.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(S),W.text((function(t){return P(t,!1)})).each((function(t){l.font(n.select(this),t.model.rangeFont)})),v.ensureAxisBrush(B)}},{"../../components/colorscale":604,"../../components/drawing":613,"../../lib":717,"../../lib/gup":715,"../../lib/svg_text_utils":741,"../../plots/cartesian/axes":765,"./axisbrush":1083,"./constants":1086,"./helpers":1088,"./lines":1090,"color-rgba":124,d3:165}],1093:[function(t,e,r){"use strict";var n=t("./parcoords"),a=t("../../lib/prepare_regl"),i=t("./helpers").isVisible;function o(t,e,r){var n=e.indexOf(r),a=t.indexOf(n);return-1===a&&(a+=e.length),a}e.exports=function(t,e){var r=t._fullLayout;if(a(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var a=u[r]=n._fullInput.index;s[r]=t.data[a].dimensions,l[r]=t.data[a].dimensions.slice()})),n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,a){var i=l[e][n],o=a.map((function(t){return t.slice()})),s="dimensions["+n+"].constraintrange",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var p=i.constraintrange;f[s]=p||null}var h=t._fullData[c[e]].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 d={};d[s]=o,t.emit("plotly_restyle",[d,[u[e]]])},hover:function(e){t.emit("plotly_hover",e)},unhover:function(e){t.emit("plotly_unhover",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(i));s[e].sort(n),l[e].filter((function(t){return!i(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit("plotly_restyle",[{dimensions:[s[e]]},[u[e]]])}})}}},{"../../lib/prepare_regl":730,"./helpers":1088,"./parcoords":1092}],1094:[function(t,e,r){"use strict";var n=t("../../plots/attributes"),a=t("../../plots/domain").attributes,i=t("../../plots/font_attributes"),o=t("../../components/color/attributes"),s=t("../../plots/template_attributes").hovertemplateAttrs,l=t("../../plots/template_attributes").texttemplateAttrs,c=t("../../lib/extend").extendFlat,u=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});e.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:c({},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:c({},u,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),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:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":591,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/domain":790,"../../plots/font_attributes":791,"../../plots/template_attributes":841}],1095:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="pie",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":826}],1096:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),i=t("../../components/color"),o={};function s(t){return function(e,r){return!!e&&!!(e=a(e)).isValid()&&(e=i.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e)}}function l(t,e){var r,n=JSON.stringify(t),i=e[n];if(!i){for(i=t.slice(),r=0;r0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:i,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return a.coerce(t,e,i,r,n)}var u=l(c("labels"),c("values")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),f){e._length=f,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var p,h=c("text"),d=c("texttemplate");if(d||(p=c("textinfo",Array.isArray(h)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),d||p&&"none"!==p){var g=c("textposition");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&c("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&c("insidetextorientation")}o(e,n,c);var v=c("hole");if(c("title.text")){var m=c("title.position",v?"middle center":"top center");v||"middle center"!==m||(e.title.position="top center"),a.coerceFont(c,"title.font",n.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else e.visible=!1}}},{"../../lib":717,"../../plots/domain":790,"../bar/defaults":860,"./attributes":1094,"fast-isnumeric":228}],1098:[function(t,e,r){"use strict";var n=t("../../components/fx/helpers").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),"funnelarea"===e.type&&(delete r.v,delete r.i),r}},{"../../components/fx/helpers":627}],1099:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r"),name:u.hovertemplate||-1!==f.indexOf("name")?u.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:h.castOption(b.bgcolor,t.pts)||t.color,borderColor:h.castOption(b.bordercolor,t.pts),fontFamily:h.castOption(_.family,t.pts),fontSize:h.castOption(_.size,t.pts),fontColor:h.castOption(_.color,t.pts),nameLength:h.castOption(b.namelength,t.pts),textAlign:h.castOption(b.align,t.pts),hovertemplate:h.castOption(u.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[d(t,u)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[d(t,u)],event:n.event})}})),t.on("mouseout",(function(t){var r=e._fullLayout,a=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[d(s,a)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)})),t.on("click",(function(t){var r=e._fullLayout,a=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[d(t,a)],i.click(e,n.event))}))}function m(t,e,r){var n=h.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=h.castOption(t._input.textfont.color,e.pts));var a=h.castOption(t.insidetextfont.family,e.pts)||h.castOption(t.textfont.family,e.pts)||r.family,i=h.castOption(t.insidetextfont.size,e.pts)||h.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:a,size:i}}function y(t,e){for(var r,n,a=0;ae&&e>n||r=-4;m-=2)y(Math.PI*m,"tan");for(m=4;m>=-4;m-=2)y(Math.PI*(m+1),"tan")}if(f||h){for(m=4;m>=-4;m-=2)y(Math.PI*(m+1.5),"rad");for(m=4;m>=-4;m-=2)y(Math.PI*(m+.5),"rad")}}if(g||d||f){if((n={scale:l*c*2/a,rCenter:1-l,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,n.scale>=1)return n;v.push(n)}(d||h)&&((n=b(t,c,s,i,o)).textPosAngle=(e.startangle+e.stopangle)/2,v.push(n)),(d||p)&&((n=_(t,c,s,i,o)).textPosAngle=(e.startangle+e.stopangle)/2,v.push(n));for(var x=0,w=0,k=0;k=1)break}return v[x]}function b(t,e,r,n,a){var i=t.width/t.height,o=T(i,n,e,r);return{scale:2*o/t.height,rCenter:w(i,o/e),rotate:k(a)}}function _(t,e,r,n,a){var i=t.height/t.width,o=T(i,n,e,r);return{scale:2*o/t.width,rCenter:w(i,o/e),rotate:k(a+Math.PI/2)}}function w(t,e){return Math.cos(e)-t*e}function k(t){return(180/Math.PI*t+720)%180-90}function T(t,e,r,n){var a=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(a*a+.5)+a),n/(Math.sqrt(t*t+n/2)+t))}function A(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function M(t,e){var r=e.pxmid[0],n=e.pxmid[1],a=t.width/2,i=t.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,e){var r,n,a,i=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=C(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*t.r,s.ty-=t.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(f+=u,o.x-=(1+a)*u,s.tx+=t.titleBox.width/2):-1!==i.title.position.indexOf("center")?f*=2:-1!==i.title.position.indexOf("right")&&(f+=u,o.x+=(1+a)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=S(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function S(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function C(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function L(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/a.aspectratio):(u=r.r,c=u*a.aspectratio),c*=(1+a.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(i){var x=l.castOption(a,e.i,"texttemplate");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:h.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:h.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(a,t.i,"customdata")}}(e),_=h.getFirstFilled(a.text,e.pts);(g(_)||""===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,a._meta||{})}else e.text=""}}function I(t,e){var r=t.rotate,n=t.scale;n>1&&(n=1);var a=r*Math.PI/180,i=Math.cos(a),o=Math.sin(a),s=(e.left+e.right)/2,l=(e.top+e.bottom)/2;t.textX=s*i-l*o,t.textY=s*o+l*i,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,i=r._size;p("pie",r),y(e,t),L(e,i);var u=l.makeTraceGroups(r._pielayer,e,"trace").each((function(e){var u=n.select(this),p=e[0],d=p.trace;!function(t){var e,r,n,a=t[0],i=a.r,o=a.trace,s=o.rotation*Math.PI/180,l=2*Math.PI/a.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(e=0;ea.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-o.hole,r.rInscribed=A(r,a))}(e),u.attr("stroke-linejoin","round"),u.each((function(){var g=n.select(this).selectAll("g.slice").data(e);g.enter().append("g").classed("slice",!0),g.exit().remove();var y=[[[],[]],[[],[]]],b=!1;g.each((function(a,i){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=d.index,y[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var o=p.cx,u=p.cy,g=n.select(this),_=g.selectAll("path.surface").data([a]);if(_.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),g.call(v,t,e),d.pull){var w=+h.castOption(d.pull,a.pts)||0;w>0&&(o+=w*a.pxmid[0],u+=w*a.pxmid[1])}a.cxFinal=o,a.cyFinal=u;var k=d.hole;if(a.v===p.vTotal){var T="M"+(o+a.px0[0])+","+(u+a.px0[1])+L(a.px0,a.pxmid,!0,1)+L(a.pxmid,a.px0,!0,1)+"Z";k?_.attr("d","M"+(o+k*a.px0[0])+","+(u+k*a.px0[1])+L(a.px0,a.pxmid,!1,k)+L(a.pxmid,a.px0,!1,k)+"Z"+T):_.attr("d",T)}else{var A=L(a.px0,a.px1,!0,1);if(k){var E=1-k;_.attr("d","M"+(o+k*a.px1[0])+","+(u+k*a.px1[1])+L(a.px1,a.px0,!1,k)+"l"+E*a.px0[0]+","+E*a.px0[1]+A+"Z")}else _.attr("d","M"+o+","+u+"l"+a.px0[0]+","+a.px0[1]+A+"Z")}P(t,a,p);var S=h.castOption(d.textposition,a.pts),C=g.selectAll("g.slicetext").data(a.text&&"none"!==S?[0]:[]);C.enter().append("g").classed("slicetext",!0),C.exit().remove(),C.each((function(){var g=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),v=l.ensureUniformFontSize(t,"outside"===S?function(t,e,r){var n=h.castOption(t.outsidetextfont.color,e.pts)||h.castOption(t.textfont.color,e.pts)||r.color,a=h.castOption(t.outsidetextfont.family,e.pts)||h.castOption(t.textfont.family,e.pts)||r.family,i=h.castOption(t.outsidetextfont.size,e.pts)||h.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:a,size:i}}(d,a,r.font):m(d,a,r.font));g.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,v).call(c.convertToTspans,t);var y,_=s.bBox(g.node());if("outside"===S)y=M(_,a);else if(y=x(_,a,p),"auto"===S&&y.scale<1){var w=l.ensureUniformFontSize(t,d.outsidetextfont);g.call(s.font,w),y=M(_=s.bBox(g.node()),a)}var k=y.textPosAngle,T=void 0===k?a.pxmid:O(p.r,k);if(y.targetX=o+T[0]*y.rCenter+(y.x||0),y.targetY=u+T[1]*y.rCenter+(y.y||0),I(y,_),y.outside){var A=y.targetY;a.yLabelMin=A-_.height/2,a.yLabelMid=A,a.yLabelMax=A+_.height/2,a.labelExtraX=0,a.labelExtraY=0,b=!0}y.fontSize=v.size,f(d.type,y,r),e[i].transform=y,g.attr("transform",l.getTextTransform(y))}))}function L(t,e,r,n){var i=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return"a"+n*p.r+","+n*p.r+" 0 "+a.largeArc+(r?" 1 ":" 0 ")+i+","+o}}));var _=n.select(this).selectAll("g.titletext").data(d.title.text?[0]:[]);if(_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each((function(){var e,r=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),a=d.title.text;d._meta&&(a=l.templateString(a,d._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,d.title.font).call(c.convertToTspans,t),e="middle center"===d.title.position?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}(p):E(p,i),r.attr("transform","translate("+e.x+","+e.y+")"+(e.scale<1?"scale("+e.scale+")":"")+"translate("+e.tx+","+e.ty+")")})),b&&function(t,e){var r,n,a,i,o,s,l,c,u,f,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var a,c,u,p,d=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),g=n?t.yLabelMin:t.yLabelMax,v=n?t.yLabelMax:t.yLabelMin,m=t.cyFinal+o(t.px0[1],t.px1[1]),y=d-g;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(h.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-g-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(v+t.labelExtraY-m)*l>0&&(a=3*s*Math.abs(c-f.indexOf(t)),(p=u.cxFinal+i(u.px0[0],u.px1[0])+a-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=p)))}for(n=0;n<2;n++)for(a=n?v:m,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,(c=t[n][r]).sort(a),u=t[1-n][r],f=u.concat(c),d=[],p=0;pMath.abs(f)?s+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+c):s+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+c}else s+="V"+(t.yLabelMid+t.labelExtraY)+"h"+c;l.ensureSingle(r,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(g,d),b&&d.automargin){var w=s.bBox(u.node()),k=d.domain,T=i.w*(k.x[1]-k.x[0]),A=i.h*(k.y[1]-k.y[0]),S=(.5*T-p.r)/i.w,C=(.5*A-p.r)/i.h;a.autoMargin(t,"pie."+d.uid+".automargin",{xl:k.x[0]-S,xr:k.x[1]+S,yb:k.y[0]-C,yt:k.y[1]+C,l:Math.max(p.cx-p.r-w.left,0),r:Math.max(w.right-(p.cx+p.r),0),b:Math.max(w.bottom-(p.cy+p.r),0),t:Math.max(p.cy-p.r-w.top,0),pad:5})}}))}));setTimeout((function(){u.selectAll("tspan").each((function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))}))}),0)},formatSliceLabel:P,transformInsideText:x,determineInsideTextFont:m,positionTitleOutside:E,prerenderTitles:y,layoutAreas:L,attachFxHandlers:v,computeTransform:I}},{"../../components/color":592,"../../components/drawing":613,"../../components/fx":630,"../../lib":717,"../../lib/svg_text_utils":741,"../../plots/plots":826,"../bar/uniform_text":872,"./event_data":1098,"./helpers":1099,d3:165}],1104:[function(t,e,r){"use strict";var n=t("d3"),a=t("./style_one"),i=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(".trace");i(t,e,"pie"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(a,t,e)}))}))}},{"../bar/uniform_text":872,"./style_one":1105,d3:165}],1105:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("./helpers").castOption;e.exports=function(t,e,r){var i=r.marker.line,o=a(i.color,e.pts)||n.defaultLine,s=a(i.width,e.pts)||0;t.style("stroke-width",s).call(n.fill,e.color).call(n.stroke,o)}},{"../../components/color":592,"./helpers":1099}],1106:[function(t,e,r){"use strict";var n=t("../scatter/attributes");e.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":1120}],1107:[function(t,e,r){"use strict";var n=t("gl-pointcloud2d"),a=t("../../lib/str2rgbarray"),i=t("../../plots/cartesian/autorange").findExtremes,o=t("../scatter/get_trace_color");function s(t,e){this.scene=t,this.uid=e,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(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,p=t.xbounds&&t.ybounds,h=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,p)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(h)r=h;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=a(t.marker.color),v=a(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;null===y&&(y=c.length<100||u.length<100),this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=i(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=i(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../lib/str2rgbarray":740,"../../plots/cartesian/autorange":764,"../scatter/get_trace_color":1130,"gl-pointcloud2d":295}],1108:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}i("x"),i("y"),i("xbounds"),i("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.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"),e._length=null}},{"../../lib":717,"./attributes":1106}],1109:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("../scatter3d/calc"),plot:t("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:t("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":803,"../scatter3d/calc":1148,"./attributes":1106,"./convert":1107,"./defaults":1108}],1110:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../../plots/attributes"),i=t("../../components/color/attributes"),o=t("../../components/fx/attributes"),s=t("../../plots/domain").attributes,l=t("../../plots/template_attributes").hovertemplateAttrs,c=t("../../components/colorscale/attributes"),u=t("../../plot_api/plot_template").templatedArray,f=t("../../lib/extend").extendFlat,p=t("../../plot_api/edit_types").overrideAll;t("../../constants/docs").FORMAT_LINK,(e.exports=p({hoverinfo:f({},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:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:f(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":591,"../../components/colorscale/attributes":599,"../../components/fx/attributes":622,"../../constants/docs":688,"../../lib/extend":708,"../../plot_api/edit_types":748,"../../plot_api/plot_template":755,"../../plots/attributes":762,"../../plots/domain":790,"../../plots/font_attributes":791,"../../plots/template_attributes":841}],1111:[function(t,e,r){"use strict";var n=t("../../plot_api/edit_types").overrideAll,a=t("../../plots/get_data").getModuleCalcData,i=t("./plot"),o=t("../../components/fx/layout_attributes"),s=t("../../lib/setcursor"),l=t("../../components/dragelement"),c=t("../../plots/cartesian/select").prepSelect,u=t("../../lib"),f=t("../../registry");function p(t,e){var r=t._fullData[e],n=t._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:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},h={_id:"y",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:p,yaxis:h,fillRangeItems:u.noop},subplot:e,xaxes:[p],yaxes:[h],doneFnCompleted:function(r){var n,a=t._fullData[e],i=a.node.groups.slice(),o=[];function s(t){for(var e=a._sankey.graph.nodes,r=0;rm&&(m=i.source[e]),i.target[e]>m&&(m=i.target[e]);var y,x=m+1;t.node._count=x;var b=t.node.groups,_={};for(e=0;e0&&s(E,x)&&s(S,x)&&(!_.hasOwnProperty(E)||!_.hasOwnProperty(S)||_[E]!==_[S])){_.hasOwnProperty(S)&&(S=_[S]),_.hasOwnProperty(E)&&(E=_[E]),S=+S,f[E=+E]=f[S]=!0;var C="";i.label&&i.label[e]&&(C=i.label[e]);var L=null;C&&p.hasOwnProperty(C)&&(L=p[C]),c.push({pointNumber:e,label:C,color:u?i.color[e]:i.color,concentrationscale:L,source:E,target:S,value:+M}),A.source.push(E),A.target.push(S)}}var O=x+b.length,P=o(r.color),I=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:D,color:P?r.color[e]:r.color})}var z=!1;return function(t,e,r){for(var i=a.init2dArray(t,0),o=0;o1}))}(O,A.source,A.target)&&(z=!0),{circular:z,links:c,nodes:I,groups:b,groupLookup:_}}e.exports=function(t,e){var r=c(e);return i({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":604,"../../lib":717,"../../lib/gup":715,"strongly-connected-components":529}],1113:[function(t,e,r){"use strict";e.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"}}},{}],1114:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../components/color"),o=t("tinycolor2"),s=t("../../plots/domain").defaults,l=t("../../components/fx/hoverlabel_defaults"),c=t("../../plot_api/plot_template"),u=t("../../plots/array_container_defaults");function f(t,e){function r(r,i){return n.coerce(t,e,a.link.colorscales,r,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(t,e,r,p){function h(r,i){return n.coerce(t,e,a,r,i)}var d=n.extendDeep(p.hoverlabel,t.hoverlabel),g=t.node,v=c.newContainer(e,"node");function m(t,e){return n.coerce(g,v,a.node,t,e)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",t.hoverinfo),l(g,v,m,d),m("hovertemplate");var y=p.colorway;m("color",v.label.map((function(t,e){return i.addOpacity(function(t){return y[t%y.length]}(e),.8)})));var x=t.link||{},b=c.newContainer(e,"link");function _(t,e){return n.coerce(x,b,a.link,t,e)}_("label"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",t.hoverinfo),l(x,b,_,d),_("hovertemplate");var w,k=o(p.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(k,b.value.length)),u(x,b,{name:"colorscales",handleItemDefaults:f}),s(e,p,h),h("orientation"),h("valueformat"),h("valuesuffix"),v.x.length&&v.y.length&&(w="freeform"),h("arrangement",w),n.coerceFont(h,"textfont",n.extendFlat({},p.font)),e._length=null}},{"../../components/color":592,"../../components/fx/hoverlabel_defaults":629,"../../lib":717,"../../plot_api/plot_template":755,"../../plots/array_container_defaults":761,"../../plots/domain":790,"./attributes":1110,tinycolor2:536}],1115:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),moduleType:"trace",name:"sankey",basePlotModule:t("./base_plot"),selectPoints:t("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":1110,"./base_plot":1111,"./calc":1112,"./defaults":1114,"./plot":1116,"./select.js":1118}],1116:[function(t,e,r){"use strict";var n=t("d3"),a=t("./render"),i=t("../../components/fx"),o=t("../../components/color"),s=t("../../lib"),l=t("./constants").cn,c=s._;function u(t){return""!==t}function f(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function h(t){n.select(t).select("text.name").style("fill","black")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&f(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&f(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),a&&f(e,t).selectAll("."+l.sankeyLink).filter((function(t){return t.link.label===a})).style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),r&&f(e,t).selectAll("."+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(t){return t.tinyColorAlpha})),a&&f(e,t).selectAll("."+l.sankeyLink).filter((function(t){return t.link.label===a})).style("fill-opacity",(function(t){return t.tinyColorAlpha})),r&&f(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,f=r._size,d=0;d"),color:b(s,"bgcolor")||o.addOpacity(d.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:m,eventData:[a.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(y,.85),h(y)}}},unhover:function(e,a,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,a,o),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,t.emit("plotly_unhover",{event:n.event,points:[a.node]})),i.loneUnhover(r._hoverlayer.node()))},select:function(e,r,a){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,a),i.click(t,{target:!0})}}})}},{"../../components/color":592,"../../components/fx":630,"../../lib":717,"./constants":1113,"./render":1117,d3:165}],1117:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("tinycolor2"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("@plotly/d3-sankey"),c=t("@plotly/d3-sankey-circular"),u=t("d3-force"),f=t("../../lib"),p=t("../../lib/gup"),h=p.keyFun,d=p.repeat,g=p.unwrap,v=t("d3-interpolate").interpolateNumber,m=t("../../registry");function y(t,e,r){var a,o=g(e),s=o.trace,u=s.domain,p="h"===s.orientation,h=s.node.pad,d=s.node.thickness,v=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),y=o._nodes,x=o._links,b=o.circular;(a=b?c.sankeyCircular().circularLinkGap(0):l.sankey()).iterations(n.sankeyIterations).size(p?[v,m]:[m,v]).nodeWidth(d).nodePadding(h).nodeId((function(t){return t.pointNumber})).nodes(y).links(x);var _,w,k,T=a();for(var A in a.nodePadding()=a||(r=a-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),a=e.y1+h}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),a=[],i=-1,o=-1/0;for(_=0;_o+d&&(i+=1,e=s.x0),o=s.x0,a[i]||(a[i]=[]),a[i].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return a}(y=T.nodes)),a.update(T)}return{circular:b,key:r,trace:s,guid:f.randstr(),horizontal:p,width:v,height:m,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:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:p?m:v,dragPerpendicular:p?v:m,arrangement:s.arrangement,sankey:a,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function x(t,e,r){var n=i(e.color),a=e.source.label+"|"+e.target.label+"__"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:a,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:b,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function b(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,"top"===e.circularLinkType?"M "+n.targetX+" "+(n.targetY+r)+" L"+n.rightInnerExtent+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+n.rightInnerExtent+" "+(n.verticalFullExtent-r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 1 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY-n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.leftInnerExtent+" "+(n.sourceY-r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 0 "+(n.leftFullExtent-r)+" "+(n.sourceY-n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"L"+n.rightInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+n.rightInnerExtent+" "+(n.targetY-r)+"L"+n.targetX+" "+(n.targetY-r)+"Z":"M "+n.targetX+" "+(n.targetY-r)+" L"+n.rightInnerExtent+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+n.rightInnerExtent+" "+(n.verticalFullExtent+r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 0 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY+n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.leftInnerExtent+" "+(n.sourceY+r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 1 "+(n.leftFullExtent-r)+" "+(n.sourceY+n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"L"+n.rightInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+n.rightInnerExtent+" "+(n.targetY+r)+"L"+n.targetX+" "+(n.targetY+r)+"Z";var e,r,n,a=t.link.source.x1,i=t.link.target.x0,o=v(a,i),s=o(.5),l=o(.5),c=t.link.y0-t.link.width/2,u=t.link.y0+t.link.width/2,f=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return"M"+a+","+c+"C"+s+","+c+" "+l+","+f+" "+i+","+f+"L"+i+","+p+"C"+l+","+p+" "+s+","+u+" "+a+","+u+"Z"}}function _(t,e){var r=i(e.color),a=n.nodePadAcross,s=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var l=e.dx,c=Math.max(.5,e.dy),u="node_"+e.pointNumber;return e.group&&(u=f.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:u,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(l),visibleHeight:c,zoneX:-a,zoneY:-s,zoneWidth:l+2*a,zoneHeight:c+2*s,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:o.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,u].join("_"),interactionState:t.interactionState,figure:t}}function w(t){t.attr("transform",(function(t){return"translate("+t.node.x0.toFixed(3)+", "+t.node.y0.toFixed(3)+")"}))}function k(t){t.call(w)}function T(t,e){t.call(k),e.attr("d",b())}function A(t){t.attr("width",(function(t){return t.node.x1-t.node.x0})).attr("height",(function(t){return t.visibleHeight}))}function M(t){return t.link.width>1||t.linkLineWidth>0}function E(t){return"translate("+t.translateX+","+t.translateY+")"+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function S(t){return"translate("+(t.horizontal?0:t.labelY)+" "+(t.horizontal?t.labelY:0)+")"}function C(t){return a.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function L(t){return t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function O(t){return t.horizontal?"scale(1 1)":"scale(-1 1)"}function P(t){return t.darkBackground&&!t.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function I(t){return t.horizontal&&t.left?"100%":"0%"}function D(t,e,r){t.on(".basic",null).on("mouseover.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on("mousemove.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on("mouseout.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)})).on("click.basic",(function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)}))}function z(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(f.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(t){i._fullLayout._dragCover=t})),f.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(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(t,e,r,a){!function(t){for(var e=0;e0&&a.forceLayouts[e].alpha(0)}}(0,e,i,r)).stop()}(0,o,a),function(t,e,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)}}))}(t,e,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),F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),T(t.filter(B(r)),e))}})).on("dragend",(function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e5?t.node.label:""})).attr("text-anchor",(function(t){return t.horizontal&&t.left?"end":"start"})),q.transition().ease(n.ease).duration(n.duration).attr("startOffset",I).style("fill",P)}},{"../../components/color":592,"../../components/drawing":613,"../../lib":717,"../../lib/gup":715,"../../registry":846,"./constants":1113,"@plotly/d3-sankey":56,"@plotly/d3-sankey-circular":55,d3:165,"d3-force":158,"d3-interpolate":160,tinycolor2:536}],1118:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,a=n._sankey.graph.nodes,i=0;is&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;sM[u]&&u=0;a--){var i=t[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],1127:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./stack_defaults"),u=t("./marker_defaults"),f=t("./line_defaults"),p=t("./line_shape_defaults"),h=t("./text_defaults"),d=t("./fillcolor_defaults");e.exports=function(t,e,r,g){function v(r,a){return n.coerce(t,e,i,r,a)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&mG!=(F=P[L][1])>=G&&(D=P[L-1][0],z=P[L][0],F-R&&(I=D+(z-D)*(G-R)/(F-R),V=Math.min(V,I),U=Math.max(U,I)));V=Math.max(V,0),U=Math.min(U,p._length);var W=s.defaultLine;return s.opacity(f.fillcolor)?W=f.fillcolor:s.opacity((f.line||{}).color)&&(W=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:V,x1:U,y0:G,y1:G,color:W,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":592,"../../components/fx":630,"../../lib":717,"../../registry":846,"./get_trace_color":1130}],1132:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t("./attributes"),supplyDefaults:t("./defaults"),crossTraceDefaults:t("./cross_trace_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./cross_trace_calc"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot"),colorbar:t("./marker_colorbar"),formatLabels:t("./format_labels"),style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"./arrays_to_calcdata":1119,"./attributes":1120,"./calc":1121,"./cross_trace_calc":1125,"./cross_trace_defaults":1126,"./defaults":1127,"./format_labels":1129,"./hover":1131,"./marker_colorbar":1138,"./plot":1140,"./select":1141,"./style":1143,"./subtypes":1144}],1133:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;s("line.color",r),a(t,"line")?i(t,e,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r),s("line.width"),(l||{}).noDash||s("line.dash")}},{"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"../../lib":717}],1134:[function(t,e,r){"use strict";var n=t("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,s=i-.5,l=t("../../lib"),c=l.segmentsIntersect,u=l.constrain,f=t("./constants");e.exports=function(t,e){var r,n,i,p,h,d,g,v,m,y,x,b,_,w,k,T,A,M,E=e.xaxis,S=e.yaxis,C="log"===E.type,L="log"===S.type,O=E._length,P=S._length,I=e.connectGaps,D=e.baseTolerance,z=e.shape,R="linear"===z,F=e.fill&&"none"!==e.fill,B=[],N=f.minTolerance,j=t.length,V=new Array(j),U=0;function q(r){var n=t[r];if(!n)return!1;var i=e.linearized?E.l2p(n.x):E.c2p(n.x),l=e.linearized?S.l2p(n.y):S.c2p(n.y);if(i===a){if(C&&(i=E.c2p(n.x,!0)),i===a)return!1;L&&l===a&&(i*=Math.abs(E._m*P*(E._m>0?o:s)/(S._m*O*(S._m>0?o:s)))),i*=1e3}if(l===a){if(L&&(l=S.c2p(n.y,!0)),l===a)return!1;l*=1e3}return[i,l]}function H(t,e,r,n){var a=r-t,i=n-e,o=.5-t,s=.5-e,l=a*a+i*i,c=a*o+i*s;if(c>0&&crt||t[1]at)return[u(t[0],et,rt),u(t[1],nt,at)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||t[1]===e[1]&&(t[1]===nt||t[1]===at)||void 0}function lt(t,e,r){return function(n,a){var i=ot(n),o=ot(a),s=[];if(i&&o&&st(i,o))return s;i&&s.push(i),o&&s.push(o);var c=2*l.constrain((n[t]+a[t])/2,e,r)-((i||n)[t]+(o||a)[t]);return c&&((i&&o?c>0==i[t]>o[t]?i:o:i||o)[t]+=c),s}}function ct(t){var e=t[0],r=t[1],n=e===V[U-1][0],a=r===V[U-1][1];if(!n||!a)if(U>1){var i=e===V[U-2][0],o=r===V[U-2][1];n&&(e===et||e===rt)&&i?o?U--:V[U-1]=t:a&&(r===nt||r===at)&&o?i?U--:V[U-1]=t:V[U++]=t}else V[U++]=t}function ut(t){V[U-1][0]!==t[0]&&V[U-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/O,M=t[1]/P,Y=t[0]rt?rt:0,X=t[1]at?at:0,Y||X){if(U)if(K){var e=Q(K,t);e.length>1&&(ut(e[0]),V[U++]=e[1])}else $=Q(V[U-1],t)[0],V[U++]=$;else V[U++]=[Y||t[0],X||t[1]];var r=V[U-1];Y&&X&&(r[0]!==Y||r[1]!==X)?(K&&(Z!==Y&&J!==X?ct(Z&&J?(n=K,i=(a=t)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?et:rt,at]:[o>0?rt:et,nt]):[Z||Y,J||X]):Z&&J&&ct([Z,J])),ct([Y,X])):Z-Y&&J-X&&ct([Y||Z,X||J]),K=t,Z=Y,J=X}else K&&ut(Q(K,t)[0]),V[U++]=t;var n,a,i,o}for("linear"===z||"spline"===z?Q=function(t,e){for(var r=[],n=0,a=0;a<4;a++){var i=it[a],o=c(t[0],t[1],e[0],e[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&&W(o,t)G(d,pt))break;i=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,p=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(p)}K&&ct([Z||K[0],J||K[1]]),B.push(V.slice(0,U))}return B}},{"../../constants/numerical":693,"../../lib":717,"./constants":1124}],1135:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1136:[function(t,e,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var a,i,o,s,l,c={},u=!1,f=-1,p=0,h=-1;for(i=0;i=0?l=h:(l=h=p,p++),l0?Math.max(e,a):0}}},{"fast-isnumeric":228}],1138:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1139:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;c=c||{},f&&(r=f),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",r),a(t,"marker")&&i(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),a(t,"marker.line")&&i(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},{"../../components/color":592,"../../components/colorscale/defaults":602,"../../components/colorscale/helpers":603,"./subtypes":1144}],1140:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../registry"),i=t("../../lib"),o=i.ensureSingle,s=i.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),f=t("./link_traces"),p=t("../../lib/polygon").tester;function h(t,e,r,f,h,d,g){var v;!function(t,e,r,a,o){var s=r.xaxis,l=r.yaxis,u=n.extent(i.simpleMap(s.range,s.r2c)),f=n.extent(i.simpleMap(l.range,l.r2c)),p=a[0].trace;if(c.hasMarkers(p)){var h=p.marker.maxdisplayed;if(0!==h){var d=a.filter((function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]})),g=Math.ceil(d.length/h),v=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,k=n.select(d),T=o(k,"g","errorbars"),A=o(k,"g","lines"),M=o(k,"g","points"),E=o(k,"g","text");if(a.getComponentMethod("errorbars","plot")(t,T,r,g),!0===_.visible){var S,C;y(k).style("opacity",_.opacity);var L=_.fill.charAt(_.fill.length-1);"x"!==L&&"y"!==L&&(L=""),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var O,P,I="",D=[],z=_._prevtrace;z&&(I=z._prevRevpath||"",C=z._nextFill,D=z._polygons);var R,F,B,N,j,V,U,q="",H="",G=[],W=i.noop;if(S=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split("").reverse().join(""))):R=F="spline"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return"M"+t.join("L")},B=function(t){return F(t.reverse())},G=u(f,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),U=_._polygons=new Array(G.length),v=0;v1){var r=n.select(this);if(r.datum(f),t)y(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var a=y(r);a.attr("d",O),l.singleLineStyle(f,a)}}}}}var Y=A.selectAll(".js-line").data(G);y(Y.exit()).style("opacity",0).remove(),Y.each(W(!1)),Y.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(W(!0)),l.setClipUrl(Y,r.layerClipId,t),G.length?(S?(S.datum(f),N&&V&&(L?("y"===L?N[1]=V[1]=b.c2p(0,!0):"x"===L&&(N[0]=V[0]=x.c2p(0,!0)),y(S).attr("d","M"+V+"L"+N+"L"+q.substr(1)).call(l.singleFillStyle)):y(S).attr("d",q+"Z").call(l.singleFillStyle))):C&&("tonext"===_.fill.substr(0,6)&&q&&I?("tonext"===_.fill?y(C).attr("d",q+"Z"+I+"Z").call(l.singleFillStyle):y(C).attr("d",q+"L"+I.substr(1)+"Z").call(l.singleFillStyle),_._polygons=_._polygons.concat(D)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=U):(S?Z(S):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),M.datum(f),E.datum(f),function(e,a,i){var o,u=i[0].trace,f=c.hasMarkers(u),p=c.hasText(u),h=tt(u),d=et,g=et;if(f||p){var v=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?K:J:_&&!w&&(v=$),f&&(d=v),p&&(g=v)}var k,T=(o=e.selectAll("path.point").data(d,h)).enter().append("path").classed("point",!0);m&&T.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),f&&(k=l.makePointStyleFns(u)),o.each((function(e){var a=n.select(this),i=y(a);l.translatePoint(e,i,x,b)?(l.singlePointStyle(e,i,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,i,x,b,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):i.remove()})),m?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(g,h)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(t){var e=n.select(this),a=y(e.select("text"));l.translatePoint(t,a,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()})),o.selectAll("text").call(l.textPointStyle,u,t).each((function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll("tspan.line").each((function(){y(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(M,E,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(E,X,t)}function Z(t){y(t).attr("d","M0,0Z")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function $(t){return t.filter((function(t){return!t.gap}))}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,a,i,c){var u,p,d=!i,g=!!i&&i.duration>0,v=f(t,e,r);(u=a.selectAll("g.trace").data(v,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each((function(e){var a=o(n.select(this),"g","fills");l.setClipUrl(a,r.layerClipId,t);var i=e[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(t){i[t]=null})).remove(),u.order().each((function(t){i[t]=o(n.select(this),"path","js-fill")}))}))}(t,u,e),g?(c&&(p=c()),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(t,n,e,r,v,this,i)}))}))):u.each((function(r,n){h(t,n,e,r,v,this,i)})),d&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":613,"../../lib":717,"../../lib/polygon":729,"../../registry":846,"./line_points":1134,"./link_traces":1136,"./subtypes":1144,d3:165}],1141:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,a,i,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r0){var p=a.c2l(u);a._lowerLogErrorBound||(a._lowerLogErrorBound=p),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,p)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[a(t.x,t.error_x,e[0],r.xaxis),a(t.y,t.error_y,e[1],r.yaxis),a(t.z,t.error_z,e[2],r.zaxis)],i=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function b(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return h[t]}function k(t,e,r,n,a){var i=null;if(l.isArrayOrTypedArray(t)){i=[];for(var o=0;o=0){var g=function(t,e,r){var n,a=(r+1)%3,i=(r+2)%3,o=[],l=[];for(n=0;n=0&&f("surfacecolor",p||h);for(var d=["x","y","z"],g=0;g<3;++g){var v="projection."+d[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}var m=n.getComponentMethod("errorbars","supplyDefaults");m(t,e,p||h||r,{axis:"z"}),m(t,e,p||h||r,{axis:"y",inherit:"z"}),m(t,e,p||h||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":717,"../../registry":846,"../scatter/line_defaults":1133,"../scatter/marker_defaults":1139,"../scatter/subtypes":1144,"../scatter/text_defaults":1145,"./attributes":1147}],1152:[function(t,e,r){"use strict";e.exports={plot:t("./convert"),attributes:t("./attributes"),markerSymbols:t("../../constants/gl3d_markers"),supplyDefaults:t("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:t("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":691,"../../plots/gl3d":805,"./attributes":1147,"./calc":1148,"./convert":1150,"./defaults":1151}],1153:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/template_attributes").texttemplateAttrs,s=t("../../components/colorscale/attributes"),l=t("../../lib/extend").extendFlat,c=n.marker,u=n.line,f=c.line;e.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:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:"calc"},s("marker.line")),gradient:c.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":599,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scatter/attributes":1120}],1154:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&"legendonly"!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,p=e._length,h=new Array(p),d=!1;for(c=0;c")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,v.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":717,"../scatter/hover":1131}],1159:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:t("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../scatter/marker_colorbar":1138,"../scatter/select":1141,"../scatter/style":1143,"./attributes":1153,"./calc":1154,"./defaults":1155,"./event_data":1156,"./format_labels":1157,"./hover":1158,"./plot":1160}],1160:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../plots/cartesian/axes"),i=t("../../components/drawing");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f={xaxis:a.getFromId(t,u.xaxis||"x"),yaxis:a.getFromId(t,u.yaxis||"y"),plot:e.plot};for(n(t,f,r,o),s=0;s")}function h(t){return t+"°"}}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":630,"../../constants/numerical":693,"../../lib":717,"../scatter/get_trace_color":1130,"./attributes":1161}],1167:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style"),styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:t("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":795,"../scatter/marker_colorbar":1138,"../scatter/style":1143,"./attributes":1161,"./calc":1162,"./defaults":1163,"./event_data":1164,"./format_labels":1165,"./hover":1166,"./plot":1168,"./select":1169,"./style":1170}],1168:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../lib/topojson_utils").getTopojsonFeatures,o=t("../../lib/geojson_utils"),s=t("../../lib/geo_location_utils"),l=t("../../plots/cartesian/autorange").findExtremes,c=t("../../constants/numerical").BADNUM,u=t("../scatter/calc").calcMarkerSize,f=t("../scatter/subtypes"),p=t("./style");e.exports={calcGeoJSON:function(t,e){var r,n,a=t[0].trace,o=e[a.geo],f=o._subplot,p=a._length;if(Array.isArray(a.locations)){var h=a.locationmode,d="geojson-id"===h?s.extractTraceFeature(t):i(a,f.topojson);for(r=0;r=g,k=2*_,T={},A=e._x=y.makeCalcdata(e,"x"),M=e._y=x.makeCalcdata(e,"y"),E=new Array(k);for(r=0;r<_;r++)o=A[r],s=M[r],E[2*r]=o===d?NaN:o,E[2*r+1]=s===d?NaN:s;if("log"===y.type)for(r=0;r1&&a.extendFlat(s.line,p.linePositions(t,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(t,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(t,r,s.text,s.marker)),a.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),a.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,E,A,M),O=h(t,b);return u(m,e),w?L.marker&&(C=2*(L.marker.sizeAvg||Math.max(L.marker.size,3))):C=l(e,_),c(t,e,y,x,A,M,C),L.errorX&&v(e,y,L.errorX),L.errorY&&v(e,x,L.errorY),L.fill&&!O.fill2d&&(O.fill2d=!0),L.marker&&!O.scatter2d&&(O.scatter2d=!0),L.line&&!O.line2d&&(O.line2d=!0),!L.errorX&&!L.errorY||O.error2d||(O.error2d=!0),L.text&&!O.glText&&(O.glText=!0),L.marker&&(L.marker.snap=_),O.lineOptions.push(L.line),O.errorXOptions.push(L.errorX),O.errorYOptions.push(L.errorY),O.fillOptions.push(L.fill),O.markerOptions.push(L.marker),O.markerSelectedOptions.push(L.markerSel),O.markerUnselectedOptions.push(L.markerUnsel),O.textOptions.push(L.text),O.textSelectedOptions.push(L.textSel),O.textUnselectedOptions.push(L.textUnsel),O.selectBatch.push([]),O.unselectBatch.push([]),T._scene=O,T.index=O.count,T.x=A,T.y=M,T.positions=E,O.count++,[{x:!1,y:!1,t:T,trace:e}]}},{"../../constants/numerical":693,"../../lib":717,"../../plots/cartesian/autorange":764,"../../plots/cartesian/axis_ids":768,"../scatter/calc":1121,"../scatter/colorscale_calc":1123,"./constants":1173,"./convert":1174,"./scene_update":1182,"point-cluster":471}],1173:[function(t,e,r){"use strict";e.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]}}},{}],1174:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("svg-path-sdf"),i=t("color-normalize"),o=t("../../registry"),s=t("../../lib"),l=t("../../components/drawing"),c=t("../../plots/cartesian/axis_ids"),u=t("../../lib/gl_format_color").formatColor,f=t("../scatter/subtypes"),p=t("../scatter/make_bubble_size_func"),h=t("./helpers"),d=t("./constants"),g=t("../../constants/interactions").DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},m=t("../../components/fx/helpers").appendArrayPointValue;function y(t,e){var r,a=t._fullLayout,i=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,p=o.family,h={},d=e.texttemplate;if(d){h.text=[];var g=a._d3locale,v=Array.isArray(d),y=v?Math.min(d.length,i):i,x=v?function(t){return d[t]}:function(){return d};for(r=0;rd.TOO_MANY_POINTS?"rect":f.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var p=n[0],h=n[1];for(a=0;a1?l[a]:l[0]:l,d=Array.isArray(c)?c.length>1?c[a]:c[0]:c,g=v[h],m=v[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[a]=[g*y/p,x/p]}}return o}}},{"../../components/drawing":613,"../../components/fx/helpers":627,"../../constants/interactions":692,"../../lib":717,"../../lib/gl_format_color":714,"../../plots/cartesian/axis_ids":768,"../../registry":846,"../scatter/make_bubble_size_func":1137,"../scatter/subtypes":1144,"./constants":1173,"./helpers":1178,"color-normalize":122,"fast-isnumeric":228,"svg-path-sdf":534}],1175:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./helpers"),o=t("./attributes"),s=t("../scatter/constants"),l=t("../scatter/subtypes"),c=t("../scatter/xy_defaults"),u=t("../scatter/marker_defaults"),f=t("../scatter/line_defaults"),p=t("../scatter/fillcolor_defaults"),h=t("../scatter/text_defaults");e.exports=function(t,e,r,d){function g(r,a){return n.coerce(t,e,o,r,a)}var v=!!t.marker&&i.isOpenSymbol(t.marker.symbol),m=l.isBubble(t),y=c(t,e,d,g);if(y){var x=y100},r.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},{"./constants":1173}],1179:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),i=t("../scatter/get_trace_color");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,p={pointNumber:f,x:e[f],y:r[f]};p.tx=Array.isArray(o.text)?o.text[f]:o.text,p.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,p.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,p.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var h=o.textfont;h&&(p.ts=a.isArrayOrTypedArray(h.size)?h.size[f]:h.size,p.tc=Array.isArray(h.color)?h.color[f]:h.color,p.tf=Array.isArray(h.family)?h.family[f]:h.family);var d=o.marker;d&&(p.ms=a.isArrayOrTypedArray(d.size)?d.size[f]:d.size,p.mo=a.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,p.mx=a.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,p.mc=a.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(p.mlc=Array.isArray(g.color)?g.color[f]:g.color,p.mlw=a.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var v=d&&d.gradient;v&&"none"!==v.type&&(p.mgt=Array.isArray(v.type)?v.type[f]:v.type,p.mgc=Array.isArray(v.color)?v.color[f]:v.color);var m=s.c2p(p.x,!0),y=l.c2p(p.y,!0),x=p.mrc||1,b=o.hoverlabel;b&&(p.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,p.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,p.hts=a.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,p.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,p.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,p.hnl=a.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(p.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(p.ht=Array.isArray(w)?w[f]:w);var k={};k[t.index]=p;var T=a.extendFlat({},t,{color:i(o,p),x0:m-x,x1:m+x,xLabelVal:p.x,y0:y-x,y1:y+x,yLabelVal:p.y,cd:k,distance:c,spikeDistance:u,hovertemplate:p.ht});return p.htx?T.text=p.htx:p.tx?T.text=p.tx:o.text&&(T.text=o.text),a.fillText(p,o,T),n.getComponentMethod("errorbars","hoverInfo")(p,o,T),T}e.exports={hoverPoints:function(t,e,r,n){var a,i,s,l,c,u,f,p,h,d=t.cd,g=d[0].t,v=d[0].trace,m=t.xa,y=t.ya,x=g.x,b=g.y,_=m.c2p(e),w=y.c2p(r),k=t.distance;if(g.tree){var T=m.p2c(_-k),A=m.p2c(_+k),M=y.p2c(w-k),E=y.p2c(w+k);a="x"===n?g.tree.range(Math.min(T,A),Math.min(y._rl[0],y._rl[1]),Math.max(T,A),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(T,A),Math.min(M,E),Math.max(T,A),Math.max(M,E))}else a=g.ids;var S=k;if("x"===n)for(c=0;c-1;c--)s=x[a[c]],l=b[a[c]],u=m.c2p(s)-_,f=y.c2p(l)-w,(p=Math.sqrt(u*u+f*f))v.glText.length){var _=x-v.glText.length;for(h=0;h<_;h++)v.glText.push(new o(b))}else if(xr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,x),v.fill2d&&(v.fillOptions=v.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var a,i,o=n[0],s=o.trace,l=o.t,c=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,p,h=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(f=0;ff&&isNaN(d[p+1]);)p-=2;0!==d[f+1]&&(h=[d[f],0]),h=h.concat(d.slice(f,p+2)),0!==d[p+1]&&(h=h.concat([d[p],0]))}else if("tozerox"===s.fill){for(f=0;ff&&isNaN(d[p]);)p-=2;0!==d[f]&&(h=[0,d[f+1]]),h=h.concat(d.slice(f,p+2)),0!==d[p]&&(h=h.concat([0,d[p+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(h=[],a=0,i=0;i-1;for(h=0;h=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-h;if(n.getClosest(l,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=a.modHalf(e[0],360),i=e[1],o=p.project([n,i]),l=o.x-u.c2p([d,i]),c=o.y-f.c2p([n,r]),h=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-h,1-3/h)}),t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[a.modHalf(v[0],360)+h,v[1]],y=u.c2p(m),x=f.c2p(m),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:p};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=i(c,g),t.extraText=function(t,e,r){if(!t.hovertemplate){var n=(e.hi||t.hoverinfo).split("+"),a=-1!==n.indexOf("all"),i=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,c=[];return a||i&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):i?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(a||-1!==n.indexOf("text"))&&o(e,t,c),c.join("
")}function u(t){return t+"°"}}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":630,"../../constants/numerical":693,"../../lib":717,"../scatter/get_trace_color":1130}],1190:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:t("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":820,"../scatter/marker_colorbar":1138,"../scattergeo/calc":1162,"./attributes":1184,"./defaults":1186,"./event_data":1187,"./format_labels":1188,"./hover":1189,"./plot":1191,"./select":1192}],1191:[function(t,e,r){"use strict";var n=t("./convert"),a=t("../../plots/mapbox/constants").traceLayerPrefix,i=["fill","line","circle","symbol"];function o(t,e){this.type="scattermapbox",this.subplot=t,this.uid=e,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol"},this.layerIds={fill:a+e+"-fill",line:a+e+"-line",circle:a+e+"-circle",symbol:a+e+"-symbol"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:"geojson",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,a,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup["trace-"+this.uid];if(c!==this.below){for(e=i.length-1;e>=0;e--)r=i[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=i[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,a=new o(t,r.uid),s=n(t.gd,e),l=a.below=t.belowLookup["trace-"+r.uid],c=0;c")}}e.exports={hoverPoints:function(t,e,r,i){var o=n(t,e,r,i);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,a(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:a}},{"../scatter/hover":1131}],1198:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":829,"../scatter/marker_colorbar":1138,"../scatter/select":1141,"../scatter/style":1143,"./attributes":1193,"./calc":1194,"./defaults":1195,"./format_labels":1196,"./hover":1197,"./plot":1199}],1199:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){for(var i=e.layers.frontplot.select("g.scatterlayer"),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=e.radialAxis,l=e.angularAxis,c=0;c=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,h,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,h,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,h,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,h,y.text,y.markerUnsel))),y.fill&&!p.fill2d&&(p.fill2d=!0),y.marker&&!p.scatter2d&&(p.scatter2d=!0),y.line&&!p.line2d&&(p.line2d=!0),y.text&&!p.glText&&(p.glText=!0),p.lineOptions.push(y.line),p.fillOptions.push(y.fill),p.markerOptions.push(y.marker),p.markerSelectedOptions.push(y.markerSel),p.markerUnselectedOptions.push(y.markerUnsel),p.textOptions.push(y.text),p.textSelectedOptions.push(y.textSel),p.textUnselectedOptions.push(y.textUnsel),p.selectBatch.push([]),p.unselectBatch.push([]),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=p,d.index=p.count,p.count++}})),i(t,e,r)}}},{"../../lib":717,"../scattergl/constants":1173,"../scattergl/convert":1174,"../scattergl/plot":1181,"../scattergl/scene_update":1182,"fast-isnumeric":228,"point-cluster":471}],1207:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../../plots/template_attributes").texttemplateAttrs,i=t("../scatter/attributes"),o=t("../../plots/attributes"),s=t("../../components/colorscale/attributes"),l=t("../../components/drawing/attributes").dash,c=t("../../lib/extend").extendFlat,u=i.marker,f=i.line,p=u.line;e.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:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},i.hovertext,{}),line:{color:f.color,width:f.width,dash:l,shape:c({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:p.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":599,"../../components/drawing/attributes":612,"../../lib/extend":708,"../../plots/attributes":762,"../../plots/template_attributes":841,"../scatter/attributes":1120}],1208:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,u,f,p,h,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r"),o.hovertemplate=p.hovertemplate,i}function x(t,e){m.push(t._hovertitle+": "+e)}}},{"../scatter/hover":1131}],1213:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:t("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":842,"../scatter/marker_colorbar":1138,"../scatter/select":1141,"../scatter/style":1143,"./attributes":1207,"./calc":1208,"./defaults":1209,"./event_data":1210,"./format_labels":1211,"./hover":1212,"./plot":1214}],1214:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e,r){var a=e.plotContainer;a.select(".scatterlayer").selectAll("*").remove();var i={xaxis:e.xaxis,yaxis:e.yaxis,plot:a,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select("g.scatterlayer");n(t,i,r,o)}},{"../scatter/plot":1140}],1215:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../scattergl/attributes"),s=t("../../plots/cartesian/constants").idRegex,l=t("../../plot_api/plot_template").templatedArray,c=t("../../lib/extend").extendFlat,u=n.marker,f=u.line,p=c(a("marker.line",{editTypeOverride:"calc"}),{width:c({},f.width,{editType:"calc"}),editType:"calc"}),h=c(a("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:p,editType:"calc"});function d(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[t],editType:"plot"}}}h.color.editType=h.cmin.editType=h.cmax.editType="style",e.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:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:i(),marker:h,xaxes:d("x"),yaxes:d("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":599,"../../lib/extend":708,"../../plot_api/plot_template":755,"../../plots/cartesian/constants":771,"../../plots/template_attributes":841,"../scatter/attributes":1120,"../scattergl/attributes":1171}],1216:[function(t,e,r){"use strict";var n=t("regl-line2d"),a=t("../../registry"),i=t("../../lib/prepare_regl"),o=t("../../plots/get_data").getModuleCalcData,s=t("../../plots/cartesian"),l=t("../../plots/cartesian/axis_ids").getFromId,c=t("../../plots/cartesian/axes").shouldShowZeroLine;function u(t,e,r){for(var n=r.matrixOptions.data.length,a=e._visibleDims,i=r.viewOpts.ranges=new Array(n),o=0;op?2*(b.sizeAvg||Math.max(b.size,3)):i(e,x),h=0;hi&&l?r._splomSubplots[E]=1:a-1,A=!0;if("lasso"===y||"select"===y||p.selectedpoints||T){var M=p._length;if(p.selectedpoints){d.selectBatch=p.selectedpoints;var E=p.selectedpoints,S={};for(s=0;s1&&(u=g[y-1],p=v[y-1],d=m[y-1]),e=0;eu?"-":"+")+"x")).replace("y",(f>p?"-":"+")+"y")).replace("z",(h>d?"-":"+")+"z");var C=function(){y=0,M=[],E=[],S=[]};(!y||y2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function h(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,a=t.dataScale,u=e._len,f={};function d(t,e){var n=r[e],o=a[c[e]];return i.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,"xaxis"),d(e._v,"yaxis"),d(e._w,"zaxis"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,"xaxis"),v=d(e._Ys,"yaxis"),m=d(e._Zs,"zaxis");if(f.meshgrid=[g,v,m],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,"xaxis"),d(e._startsY,"yaxis"),d(e._startsZ,"zaxis"));else{for(var y=v[0],x=p(g),b=p(m),_=new Array(x.length*b.length),w=0,k=0;k=0};m?(r=Math.min(v.length,x.length),l=function(t){return A(v[t])&&M(t)},f=function(t){return String(v[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var E=0;E1){for(var O=i.randstr(),P=0;P"),name:T||I("name")?l.name:void 0,color:k("hoverlabel.bgcolor")||y.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:T,hovertemplateLabels:L,eventData:[f(a,l,p.eventDataKeys)]};v&&(R.x0=E-a.rInscribed*a.rpx1,R.x1=E+a.rInscribed*a.rpx1,R.idealAlign=a.pxmid[0]<0?"left":"right"),m&&(R.x=E,R.idealAlign=E<0?"left":"right"),o.loneHover(R,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}),d._hasHoverLabel=!0}if(m){var F=t.select("path.surface");p.styleOne(F,a,l,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:[f(a,l,p.eventDataKeys)],event:n.event})}})),t.on("mouseout",(function(e){var a=r._fullLayout,i=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[f(s,i,p.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),d._hasHoverLabel=!1),m){var l=t.select("path.surface");p.styleOne(l,s,i,{hovered:!1})}})),t.on("click",(function(t){var e=r._fullLayout,i=r._fullData[d.index],s=v&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),h=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),m=c.getPtId(h),y={points:[f(t,i,p.eventDataKeys)],event:n.event};s||(y.nextLevel=m);var x=l.triggerHandler(r,"plotly_"+d.type+"click",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,i,p.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){a.call("_storeDirectGUIEdit",i,e._tracePreGUI[i.uid],{level:i.level});var b={data:[{level:m}],traces:[d.index]},_={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),a.call("animate",r,b,_)}}))}},{"../../components/fx":630,"../../components/fx/helpers":627,"../../lib":717,"../../lib/events":707,"../../registry":846,"../pie/helpers":1099,"./helpers":1237,d3:165}],1237:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/color"),i=t("../../lib/setcursor"),o=t("../pie/helpers");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var a=t.children||[],i=0;i0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var a=e?[n.data[e]]:[n];return r.listPath(n,e).concat(a)},r.getPath=function(t){return r.listPath(t,"label").join("/")+"/"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return"0%"===r&&(r=o.formatPiePercent(t,e)),r}},{"../../components/color":592,"../../lib":717,"../../lib/setcursor":737,"../pie/helpers":1099}],1238:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot").plot,style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1138,"./attributes":1231,"./base_plot":1232,"./calc":1233,"./defaults":1235,"./layout_attributes":1239,"./layout_defaults":1240,"./plot":1241,"./style":1242}],1239:[function(t,e,r){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1240:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},{"../../lib":717,"./layout_attributes":1239}],1241:[function(t,e,r){"use strict";var n=t("d3"),a=t("d3-hierarchy"),i=t("../../components/drawing"),o=t("../../lib"),s=t("../../lib/svg_text_utils"),l=t("../bar/uniform_text"),c=l.recordMinTextSize,u=l.clearMinTextSize,f=t("../pie/plot"),p=f.computeTransform,h=f.transformInsideText,d=t("./style").styleOne,g=t("../bar/style").resizeText,v=t("./fx"),m=t("./constants"),y=t("./helpers");function x(t,e,l,u){var f=t._fullLayout,g=!f.uniformtext.mode&&y.hasTransition(u),x=n.select(l).selectAll("g.slice"),_=e[0],w=_.trace,k=_.hierarchy,T=y.findEntryWithLevel(k,w.level),A=y.getMaxDepth(w),M=f._size,E=w.domain,S=M.w*(E.x[1]-E.x[0]),C=M.h*(E.y[1]-E.y[0]),L=.5*Math.min(S,C),O=_.cx=M.l+M.w*(E.x[1]+E.x[0])/2,P=_.cy=M.t+M.h*(1-E.y[0])-C/2;if(!T)return x.remove();var I=null,D={};g&&x.each((function(t){D[y.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!I&&y.isEntry(t)&&(I=t)}));var z=function(t){return a.partition().size([2*Math.PI,t.height+1])(t)}(T).descendants(),R=T.height+1,F=0,B=A;_.hasMultipleRoots&&y.isHierarchyRoot(T)&&(z=z.slice(1),R-=1,F=1,B+=1),z=z.filter((function(t){return t.y1<=B}));var N=Math.min(R,A),j=function(t){return(t-F)/N*L},V=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},U=function(t){return o.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,P)},q=function(t){return O+b(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},H=function(t){return P+b(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(x=x.data(z,y.getPtId)).enter().append("g").classed("slice",!0),g?x.exit().transition().each((function(){var t=n.select(this);t.select("path.surface").transition().attrTween("d",(function(t){var e=function(t){var e,r=y.getPtId(t),a=D[r],i=D[y.getPtId(T)];if(i){var o=t.x1>i.x1?2*Math.PI:0;e=t.rpx1G?2*Math.PI:0;e={x0:i,x1:i}}else e={rpx0:L,rpx1:L},o.extendFlat(e,X(t));else e={rpx0:0,rpx1:0};else e={x0:0,x1:0};return n.interpolate(e,a)}(t);return function(t){return U(e(t))}})):u.attr("d",U),l.call(v,T,t,e,{eventDataKeys:m.eventDataKeys,transitionTime:m.CLICK_TRANSITION_TIME,transitionEasing:m.CLICK_TRANSITION_EASING}).call(y.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),u.call(d,a,w);var x=o.ensureSingle(l,"g","slicetext"),b=o.ensureSingle(x,"text","",(function(t){t.attr("data-notex",1)})),k=o.ensureUniformFontSize(t,y.determineTextFont(w,a,f.font));b.text(r.formatSliceLabel(a,T,w,e,f)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,k).call(s.convertToTspans,t);var A=i.bBox(b.node());a.transform=h(A,a,_),a.transform.targetX=q(a),a.transform.targetY=H(a);var M=function(t,e){var r=t.transform;return p(r,e),r.fontSize=k.size,c(w.type,r,f),o.getTextTransform(r)};g?b.transition().attrTween("transform",(function(t){var e=function(t){var e,r=D[y.getPtId(t)],a=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:a.textPosAngle,scale:0,rotate:a.rotate,rCenter:a.rCenter,x:a.x,y:a.y}},I)if(t.parent)if(G){var i=t.x1>G?2*Math.PI:0;e.x0=e.x1=i}else o.extendFlat(e,X(t));else e.x0=e.x1=0;else e.x0=e.x1=0;var s=n.interpolate(e.transform.textPosAngle,t.transform.textPosAngle),l=n.interpolate(e.rpx1,t.rpx1),u=n.interpolate(e.x0,t.x0),p=n.interpolate(e.x1,t.x1),h=n.interpolate(e.transform.scale,a.scale),d=n.interpolate(e.transform.rotate,a.rotate),g=0===a.rCenter?3:0===e.transform.rCenter?1/3:1,v=n.interpolate(e.transform.rCenter,a.rCenter);return function(t){var e=l(t),r=u(t),n=p(t),i=function(t){return v(Math.pow(t,g))}(t),o={pxmid:V(e,(r+n)/2),rpx1:e,transform:{textPosAngle:s(t),rCenter:i,x:a.x,y:a.y}};return c(w.type,a,f),{transform:{targetX:q(o),targetY:H(o),scale:h(t),rotate:d(t),rCenter:i}}}}(t);return function(t){return M(e(t),A)}})):b.attr("transform",M(a,A))}))}function b(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,a){var i,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,f=!s.uniformtext.mode&&y.hasTransition(r);u("sunburst",s),(i=l.selectAll("g.trace.sunburst").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),i.order(),f?(a&&(o=a()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(e){x(t,e,this,r)}))}))):(i.each((function(e){x(t,e,this,r)})),s.uniformtext.mode&&g(t,s._sunburstlayer.selectAll(".trace"),"sunburst")),c&&i.exit().remove()},r.formatSliceLabel=function(t,e,r,n,a){var i=r.texttemplate,s=r.textinfo;if(!(i||s&&"none"!==s))return"";var l=a.separators,c=n[0],u=t.data.data,f=c.hierarchy,p=y.isHierarchyRoot(t),h=y.getParent(f,t),d=y.getValue(t);if(!i){var g,v=s.split("+"),m=function(t){return-1!==v.indexOf(t)},x=[];if(m("label")&&u.label&&x.push(u.label),u.hasOwnProperty("v")&&m("value")&&x.push(y.formatValue(u.v,l)),!p){m("current path")&&x.push(y.getPath(t.data));var b=0;m("percent parent")&&b++,m("percent entry")&&b++,m("percent root")&&b++;var _=b>1;if(b){var w,k=function(t){g=y.formatPercent(w,l),_&&(g+=" of "+t),x.push(g)};m("percent parent")&&!p&&(w=d/y.getValue(h),k("parent")),m("percent entry")&&(w=d/y.getValue(e),k("entry")),m("percent root")&&(w=d/y.getValue(f),k("root"))}}return m("text")&&(g=o.castOption(r,u.i,"text"),o.isValidTextValue(g)&&x.push(g)),x.join("
")}var T=o.castOption(r,u.i,"texttemplate");if(!T)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=y.formatValue(u.v,l)),A.currentPath=y.getPath(t.data),p||(A.percentParent=d/y.getValue(h),A.percentParentLabel=y.formatPercent(A.percentParent,l),A.parent=y.getPtLabel(h)),A.percentEntry=d/y.getValue(e),A.percentEntryLabel=y.formatPercent(A.percentEntry,l),A.entry=y.getPtLabel(e),A.percentRoot=d/y.getValue(f),A.percentRootLabel=y.formatPercent(A.percentRoot,l),A.root=y.getPtLabel(f),u.hasOwnProperty("color")&&(A.color=u.color);var M=o.castOption(r,u.i,"text");return(o.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=o.castOption(r,u.i,"customdata"),o.texttemplateString(T,A,a._d3locale,A,r._meta||{})}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../bar/style":870,"../bar/uniform_text":872,"../pie/plot":1103,"./constants":1234,"./fx":1236,"./helpers":1237,"./style":1242,d3:165,"d3-hierarchy":159}],1242:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib"),o=t("../bar/uniform_text").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=i.castOption(r,s,"marker.line.color")||a.defaultLine,c=i.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",c).call(a.fill,n.color).call(a.stroke,l).style("opacity",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");o(t,e,"sunburst"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style("opacity",r.opacity),e.selectAll("path.surface").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{"../../components/color":592,"../../lib":717,"../bar/uniform_text":872,d3:165}],1243:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;function c(t){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 u=e.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:c(),y:c(),z:c()},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),showlegend:s({},o.showlegend,{dflt:!1})}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":592,"../../components/colorscale/attributes":599,"../../lib/extend":708,"../../plot_api/edit_types":748,"../../plots/attributes":762,"../../plots/template_attributes":841}],1244:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):n(t,e,{vals:e.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":600}],1245:[function(t,e,r){"use strict";var n=t("gl-surface3d"),a=t("ndarray"),i=t("ndarray-homography"),o=t("ndarray-fill"),s=t("../../lib").isArrayOrTypedArray,l=t("../../lib/gl_format_color").parseColorScale,c=t("../../lib/str2rgbarray"),u=t("../../components/colorscale").extractOpts,f=t("../heatmap/interp2d"),p=t("../heatmap/find_empties");function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,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 d=h.prototype;d.getXat=function(t,e,r,n){var a=s(this.data.x)?s(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?a:n.d2l(a,0,r)},d.getYat=function(t,e,r,n){var a=s(this.data.y)?s(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?a:n.d2l(a,0,r)},d.getZat=function(t,e,r,n){var a=this.data.z[e][t];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[e][t]),void 0===r?a:n.d2l(a,0,r)},d.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,a],t.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],t.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=t.dataCoordinate[i];null!=o&&(t.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]?t.textLabel=s[a][n]:t.textLabel=s||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var g=[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 v(t,e){if(t0){r=g[n];break}return r}function x(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),a=1,i=0;iw;)r--,r/=y(r),++r<_&&(r=w);var n=Math.round(r/t);return n>1?n:1},d.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],o=t[0].shape[1],s=0|Math.floor(t[0].shape[0]*e+1),l=0|Math.floor(t[0].shape[1]*r+1),c=1+n+1,u=1+o+1,f=a(new Float32Array(c*u),[c,u]),p=0;p0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(a[t]=!0,e=this.contourStart[t];ei&&(this.minValues[e]=i),this.maxValues[e]",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"}}},{}],1252:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/extend").extendFlat,i=t("fast-isnumeric");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||c===t.length-1)&&(n[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=i,s=c+1,i=0);return n}e.exports=function(t,e){var r=l(e.cells.values),h=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[""],d=l(d));var g=d.concat(h(r).map((function(){return c((d[0]||[""]).length)}))),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map((function(){return e.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return e.cells.height})):[],_=x.reduce(s,0),w=p(b,y-_+n.uplift),k=f(p(x,_),[]),T=f(w,k),A={},M=e._fullInput.columnorder.concat(h(r.map((function(t,e){return e})))),E=g.map((function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return i(n)?Number(n):1})),S=E.reduce(s,0);E=E.map((function(t){return t/S*m}));var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:y,columnOrder:M,groupHeight:y,rowBlocks:T,headerRowBlocks:k,scrollY:0,cells:a({},e.cells,{values:r}),headerCells:a({},e.header,{values:g}),gdColumns:g.map((function(t){return t[0]})),gdColumnsOriginalOrder:g.map((function(t){return t[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+"__"+A[t],label:t,specIndex:e,xIndex:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:E[e]}}))};return L.columns.forEach((function(t){t.calcdata=L,t.x=u(t)})),L}},{"../../lib/extend":708,"./constants":1251,"fast-isnumeric":228}],1253:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}}))}},{"../../lib/extend":708}],1254:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults;e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}i(e,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(t,e){for(var r=t.columnorder||[],n=t.header.values.length,a=r.slice(0,n),i=a.slice().sort((function(t,e){return t-e})),o=a.map((function(t){return i.indexOf(t)})),s=o.length;s/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u="string"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,p,h=u?"":_(t.calcdata.cells.prefix,e,r)||"",d=u?"":_(t.calcdata.cells.suffix,e,r)||"",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=h+(g?a.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?b(v):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(" "===n.wrapSplitCharacter?v.replace(/a&&n.push(i),a+=l}return n}(a,l,s);1===c.length&&(c[0]===a.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),e.each((function(t,e){t.page=c[e],t.scrollY=l})),e.attr("transform",(function(t){return"translate(0 "+(I(t.rowBlocks,t.page)-t.scrollY)+")"})),t&&(S(t,r,e,c,n.prevPages,n,0),S(t,r,e,c,n.prevPages,n,1),m(r,t))}}function E(t,e,r,i){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter((function(t){return s.key===t.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===i?s.scrollY+c*a.event.dy:i;var f=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return M(t,f,l),s.scrollY===u}}function S(t,e,r,n,a,i,o){n[o]!==a[o]&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout((function(){var i=r.filter((function(t,e){return e===o&&n[e]!==a[e]}));y(t,e,i,r),a[o]=n[o]})))}function C(t,e,r,i){return function(){var o=a.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll("tspan.line").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,a,i=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value="";s.length;)c+(a=(r=s.shift()).width+i)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=a;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0})),o.selectAll("tspan.line").remove(),x(o.select("."+n.cn.cellText),r,t,i),a.select(e.parentNode.parentNode).call(P)}}function L(t,e,r,i,o){return function(){if(!o.settledY){var s=a.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,f=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,p=Math.max(f,u);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll("."+n.cn.columnCell).call(P),M(null,t.filter(k),0),m(r,i,!0)),s.attr("transform",(function(){var t=this.parentNode.getBoundingClientRect(),e=a.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),i=e.top-t.top+(r?r.matrix.f:n.cellPad);return"translate("+O(o,a.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+i+")"})),o.settledY=!0}}}function O(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function P(t){t.attr("transform",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+D(e,1/0)}),0);return"translate(0 "+(D(R(t),t.key)+e)+")"})).selectAll("."+n.cn.cellRect).attr("height",(function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function I(t,e){for(var r=0,n=e-1;n>=0;n--)r+=z(t[n]);return r}function D(t,e){for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:a({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},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":599,"../../lib/extend":708,"../../plots/domain":790,"../../plots/template_attributes":841,"../pie/attributes":1094,"../sunburst/attributes":1231,"./constants":1260}],1258:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="treemap",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":826}],1259:[function(t,e,r){"use strict";var n=t("../sunburst/calc");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc("treemap",t)}},{"../sunburst/calc":1233}],1260:[function(t,e,r){"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1261:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../components/color"),o=t("../../plots/domain").defaults,s=t("../bar/defaults").handleText,l=t("../bar/constants").TEXTPAD,c=t("../../components/colorscale"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function p(r,i){return n.coerce(t,e,a,r,i)}var h=p("labels"),d=p("parents");if(h&&h.length&&d&&d.length){var g=p("values");g&&g.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),"squarify"===p("tiling.packing")&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var v=p("text");p("texttemplate"),e.texttemplate||p("textinfo",Array.isArray(v)?"text+label":"label"),p("hovertext"),p("hovertemplate");var m=p("pathbar.visible");s(t,e,c,p,"auto",{hasPathbar:m,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var y=-1!==e.textposition.indexOf("bottom");p("marker.line.width")&&p("marker.line.color",c.paper_bgcolor);var x=p("marker.colors"),b=e._hasColorscale=u(t,"marker","colors")||(t.marker||{}).coloraxis;b?f(t,e,c,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(x||[]).length);var _=2*e.textfont.size;p("marker.pad.t",y?_/4:_),p("marker.pad.l",_/4),p("marker.pad.r",_/4),p("marker.pad.b",y?_:_/4),b&&f(t,e,c,p,{prefix:"marker.",cLetter:"c"}),e._hovered={marker:{line:{width:2,color:i.contrast(c.paper_bgcolor)}}},m&&(p("pathbar.thickness",e.pathbar.textfont.size+2*l),p("pathbar.side"),p("pathbar.edgeshape")),o(e,c,p),e._length=null}else e.visible=!1}},{"../../components/color":592,"../../components/colorscale":604,"../../lib":717,"../../plots/domain":790,"../bar/constants":858,"../bar/defaults":860,"./attributes":1257}],1262:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx");e.exports=function(t,e,r,p,h){var d=h.barDifY,g=h.width,v=h.height,m=h.viewX,y=h.viewY,x=h.pathSlice,b=h.toMoveInsideSlice,_=h.strTransform,w=h.hasTransition,k=h.handleSlicesExit,T=h.makeUpdateSliceInterpolator,A=h.makeUpdateTextInterpolator,M={},E=t._fullLayout,S=e[0],C=S.trace,L=S.hierarchy,O=g/C._entryDepth,P=u.listPath(r.data,"id"),I=s(L.copy(),[g,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(I=I.filter((function(t){var e=P.indexOf(t.data.id);return-1!==e&&(t.x0=O*e,t.x1=O*(e+1),t.y0=d,t.y1=d+v,t.onPathbar=!0,!0)}))).reverse(),(p=p.data(I,u.getPtId)).enter().append("g").classed("pathbar",!0),k(p,!0,M,[g,v],x),p.order();var D=p;w&&(D=D.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),D.each((function(s){s._hoverX=m(s.x1-Math.min(g,v)/2),s._hoverY=y(s.y1-v/2);var p=n.select(this),h=a.ensureSingle(p,"path","surface",(function(t){t.style("pointer-events","all")}));w?h.transition().attrTween("d",(function(t){var e=T(t,!0,M,[g,v]);return function(t){return x(e(t))}})):h.attr("d",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),h.call(l,s,C,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var d=a.ensureSingle(p,"g","slicetext"),k=a.ensureSingle(d,"text","",(function(t){t.attr("data-notex",1)})),S=a.ensureUniformFontSize(t,u.determineTextFont(C,s,E.font,{onPathbar:!0}));k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,S).call(o.convertToTspans,t),s.textBB=i.bBox(k.node()),s.transform=b(s,{fontSize:S.size,onPathbar:!0}),s.transform.fontSize=S.size,w?k.transition().attrTween("transform",(function(t){var e=A(t,!0,M,[g,v]);return function(t){return _(e(t))}})):k.attr("transform",_(s))}))}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../sunburst/fx":1236,"../sunburst/helpers":1237,"./constants":1260,"./partition":1267,"./style":1269,d3:165}],1263:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx"),p=t("../sunburst/plot").formatSliceLabel;e.exports=function(t,e,r,h,d){var g=d.width,v=d.height,m=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,k=d.handleSlicesExit,T=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,E=t._fullLayout,S=e[0].trace,C=-1!==S.textposition.indexOf("left"),L=-1!==S.textposition.indexOf("right"),O=-1!==S.textposition.indexOf("bottom"),P=!O&&!S.marker.pad.t||O&&!S.marker.pad.b,I=s(r,[g,v],{packing:S.tiling.packing,squarifyratio:S.tiling.squarifyratio,flipX:S.tiling.flip.indexOf("x")>-1,flipY:S.tiling.flip.indexOf("y")>-1,pad:{inner:S.tiling.pad,top:S.marker.pad.t,left:S.marker.pad.l,right:S.marker.pad.r,bottom:S.marker.pad.b}}).descendants(),D=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=S._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(D=Math.min(D,e),z=Math.max(z,e))})),h=h.data(I,u.getPtId),S._maxVisibleLayers=isFinite(z)?z-D+1:0,h.enter().append("g").classed("slice",!0),k(h,!1,{},[g,v],x),h.order();var R=null;if(w&&M){var F=u.getPtId(M);h.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:v}},N=h;return w&&(N=N.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var h=u.isHeader(s,S);s._hoverX=m(s.x1-S.marker.pad.r),s._hoverY=y(O?s.y1-S.marker.pad.b/2:s.y0+S.marker.pad.t/2);var d=n.select(this),k=a.ensureSingle(d,"path","surface",(function(t){t.style("pointer-events","all")}));w?k.transition().attrTween("d",(function(t){var e=T(t,!1,B(),[g,v]);return function(t){return x(e(t))}})):k.attr("d",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),k.call(l,s,S,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h?P?"":u.getPtLabel(s)||"":p(s,r,S,e,E)||"";var M=a.ensureSingle(d,"g","slicetext"),I=a.ensureSingle(M,"text","",(function(t){t.attr("data-notex",1)})),D=a.ensureUniformFontSize(t,u.determineTextFont(S,s,E.font));I.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",L?"end":C||h?"start":"middle").call(i.font,D).call(o.convertToTspans,t),s.textBB=i.bBox(I.node()),s.transform=b(s,{fontSize:D.size,isHeader:h}),s.transform.fontSize=D.size,w?I.transition().attrTween("transform",(function(t){var e=A(t,!1,B(),[g,v]);return function(t){return _(e(t))}})):I.attr("transform",_(s))})),R}},{"../../components/drawing":613,"../../lib":717,"../../lib/svg_text_utils":741,"../sunburst/fx":1236,"../sunburst/helpers":1237,"../sunburst/plot":1241,"./constants":1260,"./partition":1267,"./style":1269,d3:165}],1264:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"treemap",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1138,"./attributes":1257,"./base_plot":1258,"./calc":1259,"./defaults":1261,"./layout_attributes":1265,"./layout_defaults":1266,"./plot":1268,"./style":1269}],1265:[function(t,e,r){"use strict";e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1266:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("treemapcolorway",e.colorway),r("extendtreemapcolors")}},{"../../lib":717,"./layout_attributes":1265}],1267:[function(t,e,r){"use strict";var n=t("d3-hierarchy");e.exports=function(t,e,r){var a,i=r.flipX,o=r.flipY,s="dice-slice"===r.packing,l=r.pad[o?"bottom":"top"],c=r.pad[i?"right":"left"],u=r.pad[i?"left":"right"],f=r.pad[o?"top":"bottom"];s&&(a=c,c=l,l=a,a=u,u=f,f=a);var p=n.treemap().tile(function(t,e){switch(t){case"squarify":return n.treemapSquarify.ratio(e);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(c).paddingRight(u).paddingTop(l).paddingBottom(f).size(s?[e[1],e[0]]:e)(t);return(s||i||o)&&function t(e,r,n){var a;n.swapXY&&(a=e.x0,e.x0=e.y0,e.y0=a,a=e.x1,e.x1=e.y1,e.y1=a),n.flipX&&(a=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-a),n.flipY&&(a=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-a);var i=e.children;if(i)for(var o=0;o-1?S+O:-(L+O):0,I={x0:C,x1:C,y0:P,y1:P+L},D=function(t,e,r){var n=v.tiling.pad,a=function(t){return t-n<=e.x0},i=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return{x0:a(t.x0-n)?0:i(t.x0-n)?r[0]:t.x0,x1:a(t.x1+n)?0:i(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},z=null,R={},F={},B=null,N=function(t,e){return e?R[g(t)]:F[g(t)]},j=function(t,e,r,n){if(e)return R[g(m)]||I;var a=F[v.level]||r;return function(t){return t.data.depth-y.data.depth=(n-=m.r-o)){var y=(r+n)/2;r=y,n=y}var x;p?a<(x=i-m.b)&&x"===$?(l.x-=i,c.x-=i,u.x-=i,f.x-=i):"/"===$?(u.x-=i,f.x-=i,o.x-=i/2,s.x-=i/2):"\\"===$?(l.x-=i,c.x-=i,o.x-=i/2,s.x-=i/2):"<"===$&&(o.x-=i,s.x-=i),K(l),K(f),K(o),K(c),K(u),K(s),"M"+Z(l.x,l.y)+"L"+Z(c.x,c.y)+"L"+Z(s.x,s.y)+"L"+Z(u.x,u.y)+"L"+Z(f.x,f.y)+"L"+Z(o.x,o.y)+"Z"},toMoveInsideSlice:Q,makeUpdateSliceInterpolator:et,makeUpdateTextInterpolator:rt,handleSlicesExit:nt,hasTransition:k,strTransform:at}):b.remove()}e.exports=function(t,e,r,i){var o,s,l=t._fullLayout,c=l._treemaplayer,p=!r;u("treemap",l),(o=c.selectAll("g.trace.treemap").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("treemap",!0),o.order(),!l.uniformtext.mode&&a.hasTransition(r)?(i&&(s=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){s&&s()})).each("interrupt",(function(){s&&s()})).each((function(){c.selectAll("g.trace").each((function(e){v(t,e,this,r)}))}))):(o.each((function(e){v(t,e,this,r)})),l.uniformtext.mode&&f(t,l._treemaplayer.selectAll(".trace"),"treemap")),p&&o.exit().remove()}},{"../../lib":717,"../bar/constants":858,"../bar/plot":867,"../bar/style":870,"../bar/uniform_text":872,"../sunburst/helpers":1237,"./constants":1260,"./draw_ancestors":1262,"./draw_descendants":1263,d3:165}],1269:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib"),o=t("../sunburst/helpers"),s=t("../bar/uniform_text").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,p=u.color,h=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(h&&"rgba(0,0,0,0)"===p)d=0,s="rgba(0,0,0,0)",l=0;else if(s=i.castOption(r,f,"marker.line.color")||a.defaultLine,l=i.castOption(r,f,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var v,m=a.combine(a.addOpacity(r._backgroundColor,.75),p);if(!0===g){var y=o.getMaxDepth(r);v=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else v=e.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var x=0;x0){var y,x,b,_,w,k=t.xa,T=t.ya;"h"===p.orientation?(w=e,y="y",b=T,x="x",_=k):(w=r,y="x",b=k,x="y",_=T);var A=f[t.index];if(w>=A.span[0]&&w<=A.span[1]){var M=n.extendFlat({},t),E=_.c2p(w,!0),S=o.getKdeValue(A,p,w),C=o.getPositionOnKdePath(A,p,E),L=b._offset,O=b._length;M[y+"0"]=C[0],M[y+"1"]=C[1],M[x+"0"]=M[x+"1"]=E,M[x+"Label"]=x+": "+a.hoverLabelText(_,w)+", "+f[0].t.labels.kde+" "+S.toFixed(3),M.spikeDistance=m[0].spikeDistance;var P=y+"Spike";M[P]=m[0][P],m[0].spikeDistance=void 0,m[0][P]=void 0,M.hovertemplate=!1,v.push(M),(u={stroke:t.color})[y+"1"]=n.constrain(L+C[0],L,L+O),u[y+"2"]=n.constrain(L+C[1],L,L+O),u[x+"1"]=u[x+"2"]=_._offset+E}}d&&(v=v.concat(m))}-1!==h.indexOf("points")&&(c=i.hoverOnPoints(t,e,r));var I=l.selectAll(".violinline-"+p.uid).data(u?[0]:[]);return I.enter().append("line").classed("violinline-"+p.uid,!0).attr("stroke-width",1.5),I.exit().remove(),I.attr(u),"closest"===s?c?[c]:v:c?(v.push(c),v):v}},{"../../lib":717,"../../plots/cartesian/axes":765,"../box/hover":886,"./helpers":1274}],1276:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),crossTraceDefaults:t("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style"),styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../box/select"),moduleType:"trace",name:"violin",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../box/defaults":884,"../box/select":891,"../scatter/style":1143,"./attributes":1270,"./calc":1271,"./cross_trace_calc":1272,"./defaults":1273,"./hover":1275,"./layout_attributes":1277,"./layout_defaults":1278,"./plot":1279,"./style":1280}],1277:[function(t,e,r){"use strict";var n=t("../box/layout_attributes"),a=t("../../lib").extendFlat;e.exports={violinmode:a({},n.boxmode,{}),violingap:a({},n.boxgap,{}),violingroupgap:a({},n.boxgroupgap,{})}},{"../../lib":717,"../box/layout_attributes":888}],1278:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes"),i=t("../box/layout_defaults");e.exports=function(t,e,r){i._supply(t,e,r,(function(r,i){return n.coerce(t,e,a,r,i)}),"violin")}},{"../../lib":717,"../box/layout_defaults":889,"./layout_attributes":1277}],1279:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../box/plot"),s=t("../scatter/line_points"),l=t("./helpers");e.exports=function(t,e,r,c){var u=t._fullLayout,f=e.xaxis,p=e.yaxis;function h(t){var e=s(t,{xaxis:f,yaxis:p,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return i.smoothopen(e[0],1)}a.makeTraceGroups(c,r,"trace violins").each((function(t){var r=n.select(this),i=t[0],s=i.t,c=i.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,v=e[s.valLetter+"axis"],m=e[s.posLetter+"axis"],y="both"===c.side,x=y||"positive"===c.side,b=y||"negative"===c.side,_=r.selectAll("path.violin").data(a.identity);_.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each((function(t){var e,r,a,i,o,l,f,p,_=n.select(this),w=t.density,k=w.length,T=m.c2l(t.pos+d,!0),A=m.l2p(T);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e="count"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(k),o=0;o")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,i=r.line.color,o=r.line.width;return a(n)?n:a(i)&&o?i:void 0}(f,d),[c]}function w(t){return n(h,t)}}},{"../../components/color":592,"../../constants/delta.js":687,"../../plots/cartesian/axes":765,"../bar/hover":863}],1292:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":776,"../bar/select":868,"./attributes":1285,"./calc":1286,"./cross_trace_calc":1288,"./defaults":1289,"./event_data":1290,"./hover":1291,"./layout_attributes":1293,"./layout_defaults":1294,"./plot":1295,"./style":1296}],1293:[function(t,e,r){"use strict";e.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"}}},{}],1294:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s0&&(g+=f?"M"+u[0]+","+h[1]+"V"+h[0]:"M"+u[1]+","+h[0]+"H"+u[0]),"between"!==p&&(r.isSum||o path").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(i.fill,e.color).call(i.stroke,e.line.color).call(a.dashLine,e.line.dash,e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".lines").each((function(){var t=s.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":592,"../../components/drawing":613,"../../constants/interactions":692,"../bar/style":870,"../bar/uniform_text":872,d3:165}],1297:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),a=t("../lib"),i=t("../plot_api/plot_schema"),o=t("./helpers").pointsAccessorFunction,s=t("../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"},c=l.aggregations;function u(t,e,r,i){if(i.enabled){for(var o=i.target,l=a.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case"count":return f;case"first":return p;case"last":return h;case"sum":return function(t,e){for(var r=0,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o":return function(t){return p(t)>s};case">=":return function(t){return p(t)>=s};case"[]":return function(t){var e=p(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=p(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=p(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=p(t);return es[1]};case"](":return function(t){var e=p(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=p(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(p(t))};case"}{":return function(t){return-1===s.indexOf(p(t))}}}(r,i.getDataToCoordFunc(t,e,s,a),p),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(v);for(var w=o(e.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(i=0;iConsensus",en:"Consensus",id:"".concat(i.default.maxBy(r,"id").id+1,"")},u=(0,o.getConsensus)(t);a=[].concat(s(e),[u]),l=[].concat(s(r),[c])}return{sequencesArray:a,sequencesInfo:l}}},187:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.xhr=e.seqs=e.parser=e.newick=e.matrix=e.gff=e.fasta=e.clustal=void 0;var n=u(r(188)),a=u(r(208)),i=u(r(210)),o=u(r(212)),s=u(r(213)),l=u(r(77)),c=u(r(102));function u(t){return t&&t.__esModule?t:{default:t}}e.clustal=n.default,e.fasta=a.default,e.gff=i.default,e.matrix=o.default,e.newick=s.default,e.parser=l.default,e.seqs=c.default;var f=r(128);e.xhr=f;var p="imported";"undefined"!=typeof IO_VERSION&&(p=IO_VERSION);e.version=p},188:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(r(77)),a=i(r(102));function i(t){return t&&t.__esModule?t:{default:t}}var o;e.default=o={parse:function(t){var e=[];if("[object Array]"===Object.prototype.toString.call(t))var r=t;else r=t.split("\n");if(!1===r[0].slice(0,6))throw new Error("Invalid CLUSTAL Header");for(var n=0,i=1,o=0;n=e.length){var f=a.default.getMeta(c.trim());c=f.name;var p=new a.default.model(u,c,o);p.ids=f.ids||{},p.details=f.details||{};var h=Object.keys(p.ids);h.length>0&&(p.id=p.ids[h[0]]),e.push(p)}else e[o].seq+=u;o++}else console.log("parse error",s)}}else i=1;else i=1}return e}},n.default.mixin(o)},189:function(t,e,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,r(56))},190:function(t,e){t.exports=function(t){var e=r.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var r=Object.prototype.toString},191:function(t,e,r){var n=r(192),a=r(206);t.exports=function(t){if(!t)return{};var e={};return a(n(t).split("\n"),(function(t){var r,a=t.indexOf(":"),i=n(t.slice(0,a)).toLowerCase(),o=n(t.slice(a+1));void 0===e[i]?e[i]=o:(r=e[i],"[object Array]"===Object.prototype.toString.call(r)?e[i].push(o):e[i]=[e[i],o])})),e}},192:function(t,e,r){"use strict";var n=r(100),a=r(129),i=r(130),o=r(131),s=r(205),l=n.call(Function.call,o());a(l,{getPolyfill:o,implementation:i,shim:s}),t.exports=l},193:function(t,e,r){"use strict";var n="Function.prototype.bind called on incompatible ",a=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError(n+e);for(var r,o=a.call(arguments,1),s=function(){if(this instanceof r){var n=e.apply(this,o.concat(a.call(arguments)));return Object(n)===n?n:this}return e.apply(t,o.concat(a.call(arguments)))},l=Math.max(0,e.length-o.length),c=[],u=0;u0&&!n.call(t,0))for(var g=0;g0)for(var v=0;v=0&&"[object Function]"===n.call(t.callee)),r}},196:function(t,e,r){"use strict";var n=r(197),a=n("%Object%"),i=n("%TypeError%"),o=n("%String%"),s=r(198),l=r(199),c=r(200),u=r(201),f=r(101),p=r(202),h=r(204),d={ToPrimitive:p,ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var e=this.ToNumber(t);return s(e)?0:0!==e&&l(e)?c(e)*Math.floor(Math.abs(e)):e},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var e=this.ToNumber(t);if(s(e)||0===e||!l(e))return 0;var r=c(e)*Math.floor(Math.abs(e));return u(r,65536)},ToString:function(t){return o(t)},ToObject:function(t){return this.CheckObjectCoercible(t),a(t)},CheckObjectCoercible:function(t,e){if(null==t)throw new i(e||"Cannot call method on "+t);return t},IsCallable:f,SameValue:function(t,e){return t===e?0!==t||1/t==1/e:s(t)&&s(e)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(h(t,r)&&!e[r])return!1;var n=h(t,"[[Value]]"),a=h(t,"[[Get]]")||h(t,"[[Set]]");if(n&&a)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");return!(!h(t,"[[Get]]")&&!h(t,"[[Set]]"))},IsDataDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");return!(!h(t,"[[Value]]")&&!h(t,"[[Writable]]"))},IsGenericDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");return!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t)},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(!this.IsPropertyDescriptor(t))throw new i("Desc must be a Property Descriptor");if(this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new i("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new i("ToPropertyDescriptor requires an object");var e={};if(h(t,"enumerable")&&(e["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),h(t,"configurable")&&(e["[[Configurable]]"]=this.ToBoolean(t.configurable)),h(t,"value")&&(e["[[Value]]"]=t.value),h(t,"writable")&&(e["[[Writable]]"]=this.ToBoolean(t.writable)),h(t,"get")){var r=t.get;if(void 0!==r&&!this.IsCallable(r))throw new TypeError("getter must be a function");e["[[Get]]"]=r}if(h(t,"set")){var n=t.set;if(void 0!==n&&!this.IsCallable(n))throw new i("setter must be a function");e["[[Set]]"]=n}if((h(e,"[[Get]]")||h(e,"[[Set]]"))&&(h(e,"[[Value]]")||h(e,"[[Writable]]")))throw new i("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}};t.exports=d},197:function(t,e,r){"use strict";var n=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=Object.getPrototypeOf||function(t){return t.__proto__},o=void 0,s="undefined"==typeof Uint8Array?void 0:i(Uint8Array),l={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":a?i([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":o&&a&&Symbol.asyncIterator?o[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":a?i(i([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&a?i((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&a?i((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":a?i(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":a?Symbol:void 0,"$ %SymbolPrototype%":a?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":n,"$ %TypedArray%":s,"$ %TypedArrayPrototype%":s?s.prototype:void 0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype};t.exports=function(t,e){if(arguments.length>1&&"boolean"!=typeof e)throw new TypeError('"allowMissing" argument must be a boolean');var r="$ "+t;if(!(r in l))throw new SyntaxError("intrinsic "+t+" does not exist!");if(void 0===l[r]&&!e)throw new TypeError("intrinsic "+t+" exists, but is not available. Please file an issue!");return l[r]}},198:function(t,e){t.exports=Number.isNaN||function(t){return t!=t}},199:function(t,e){var r=Number.isNaN||function(t){return t!=t};t.exports=Number.isFinite||function(t){return"number"==typeof t&&!r(t)&&t!==1/0&&t!==-1/0}},200:function(t,e){t.exports=function(t){return t>=0?1:-1}},201:function(t,e){t.exports=function(t,e){var r=t%e;return Math.floor(r>=0?r:r+e)}},202:function(t,e,r){"use strict";var n=Object.prototype.toString,a=r(203),i=r(101),o=function(t){var e;if((e=arguments.length>1?arguments[1]:"[object Date]"===n.call(t)?String:Number)===String||e===Number){var r,o,s=e===String?["toString","valueOf"]:["valueOf","toString"];for(o=0;o1?o(t,arguments[1]):o(t)}},203:function(t,e){t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},204:function(t,e,r){"use strict";var n=r(100);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},205:function(t,e,r){"use strict";var n=r(129),a=r(131);t.exports=function(){var t=a();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},206:function(t,e,r){"use strict";var n=r(101),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(t,e,r){for(var n=0,a=t.length;n=3&&(i=r),"[object Array]"===a.call(t)?o(t,e,i):"string"==typeof t?s(t,e,i):l(t,e,i)}},207:function(t,e){t.exports=function(){for(var t={},e=0;e"===i[0]||";"===i[0]){var o=i.slice(1).trim(),l=r(o.trim());o=l.name;var c=l.id||e.length,u=new n.default.model("",l.name,c);u.ids=l.ids||{},u.details=l.details||{},e.push(u)}else u.seq+=i}return e},write:function(t,e){for(var r="",a=0;a"+i.name+"\n",r+=n.default.splitNChars(i.seq,80).join("\n"),r+="\n"}return r}},i.default.mixin(s)},209:function(t,e,r){"use strict";function n(t,e,r){for(var n=[],a=ti;a?o++:o--)n.push(o);return n}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){t=t||{};for(var e=n(0,arguments.length,!1),r=0;r=0)break;var s=o.split(/\t/),l=s[0].trim();if("GFF"===l)break;if(2===s.length)if("startgroup"===l)e=s[1].trim();else{if("endgroup"===l){e="";continue}r[s[0]]=a.parseColor(s[1])}else if(s.length>=5){var c=a.parseLine(s);e&&(c.attributes.Parent=e),i.push(c)}}return{offset:n,colors:r,features:i}},a.parseColor=function(t){return t.indexOf(",")>=0?(0,n.rgbToHex)(t.split(",").map((function(t){return parseInt(t)}))):6===t.length&&parseInt(t.charAt(0),16)<=16&&"bisque"!==t?"#"+t:t},a.parseLine=function(t){var e={attributes:{}};return e.attributes.Name=t[0].trim(),e.seqname=t[1].trim(),e.start=parseInt(t[3]),e.end=parseInt(t[4]),e.feature=t[5].trim(),"ID_NOT_SPECIFIED"===e.seqname&&(e.seqname=t[2].trim()),e}},212:function(t,e,r){"use strict";var n,a=r(77),i=(n=a)&&n.__esModule?n:{default:n};var o=function t(e){return this.constructor!=t?new t(e):(this.matrix={},this.parsingOrder=[],null!=e&&this.parse(e),this)};i.default.mixin(o),t.exports=o,o.prototype.parse=function(t){return t.split("\n").forEach(function(t){this.parseLine(t)}.bind(this)),this.buildMatrix(),this.matrix},o.read=function(t,e){return(new o).read(t,e)},o.parse=function(t){return(new o).parse(t)},o.prototype.parseLine=function(t){var e=t.charAt(0);if("#"!==e){this.parsingOrder.push(e);for(var r=t.substring(1).split(/\s+/).filter((function(t){return t.length>0})).map((function(t){return parseInt(t)})),n={},a=0;a=0;t--){var e=this.parsingOrder[t],r=this.matrix[e];for(var n in r)this.matrix[n][e]=r[n]}}},213:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseNhx=e.parse=void 0;var n=i(r(214)),a=i(r(215));function i(t){return t&&t.__esModule?t:{default:t}}var o={};o.parse=n.default,o.parseNhx=a.default,e.default=o,e.parse=n.default,e.parseNhx=a.default},214:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=[],r={},n=t.split(/\s*(;|\(|\)|,|:)\s*/),a=0;a1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n.default.isString(t)?(e=x[t]||g.default,b.includes(t)?(r="#ffffff",a=1):(r="#444444",a=.75)):(e=t,r="#ffffff",a=1),i&&(r=i),o&&(a=o);var s=_(e),l=s.colormap,c=s.colorscale;return{colormap:l,colorscale:c,textcolor:r,opacity:a}}},217:function(t,e,r){"use strict";t.exports={A:"#00a35c",R:"#00fc03",N:"#00eb14",D:"#00eb14",C:"#0000ff",Q:"#00f10e",E:"#00f10e",G:"#009d62",H:"#00d52a",I:"#0054ab",L:"#007b84",K:"#00ff00",M:"#009768",F:"#008778",P:"#00e01f",S:"#00d52a",T:"#00db24",W:"#00a857",Y:"#00e619",V:"#005fa0",B:"#00eb14",X:"#00b649",Z:"#00f10e"}},218:function(t,e,r){"use strict";t.exports={A:"#BBBBBB",B:"grey",C:"yellow",D:"red",E:"red",F:"magenta",G:"brown",H:"#00FFFF",I:"#BBBBBB",J:"#fff",K:"#00FFFF",L:"#BBBBBB",M:"#BBBBBB",N:"green",O:"#fff",P:"brown",Q:"green",R:"#00FFFF",S:"green",T:"green",U:"#fff",V:"#BBBBBB",W:"magenta",X:"grey",Y:"magenta",Z:"grey","-":"grey"}},219:function(t,e,r){"use strict";t.exports={A:"orange",B:"#fff",C:"green",D:"red",E:"red",F:"blue",G:"orange",H:"red",I:"green",J:"#fff",K:"red",L:"green",M:"green",N:"#fff",O:"#fff",P:"orange",Q:"#fff",R:"red",S:"orange",T:"orange",U:"#fff",V:"green",W:"blue",X:"#fff",Y:"blue",Z:"#fff"}},220:function(t,e,r){"use strict";t.exports={A:"#80a0f0",R:"#f01505",N:"#00ff00",D:"#c048c0",C:"#f08080",Q:"#00ff00",E:"#c048c0",G:"#f09048",H:"#15a4a4",I:"#80a0f0",L:"#80a0f0",K:"#f01505",M:"#80a0f0",F:"#80a0f0",P:"#ffff00",S:"#00ff00",T:"#00ff00",W:"#80a0f0",Y:"#15a4a4",V:"#80a0f0",B:"#fff",X:"#fff",Z:"#fff"}},221:function(t,e,r){"use strict";t.exports={A:"#e718e7",R:"#6f906f",N:"#1be41b",D:"#778877",C:"#23dc23",Q:"#926d92",E:"#ff00ff",G:"#00ff00",H:"#758a75",I:"#8a758a",L:"#ae51ae",K:"#a05fa0",M:"#ef10ef",F:"#986798",P:"#00ff00",S:"#36c936",T:"#47b847",W:"#8a758a",Y:"#21de21",V:"#857a85",B:"#49b649",X:"#758a75",Z:"#c936c9"}},222:function(t,e,r){"use strict";t.exports={A:"#ad0052",B:"#0c00f3",C:"#c2003d",D:"#0c00f3",E:"#0c00f3",F:"#cb0034",G:"#6a0095",H:"#1500ea",I:"#ff0000",J:"#fff",K:"#0000ff",L:"#ea0015",M:"#b0004f",N:"#0c00f3",O:"#fff",P:"#4600b9",Q:"#0c00f3",R:"#0000ff",S:"#5e00a1",T:"#61009e",U:"#fff",V:"#f60009",W:"#5b00a4",X:"#680097",Y:"#4f00b0",Z:"#0c00f3"}},223:function(t,e,r){"use strict";t.exports={A:" orange",B:" #fff",C:" green",D:" red",E:" red",F:" green",G:" orange",H:" magenta",I:" green",J:" #fff",K:" red",L:" green",M:" green",N:" magenta",O:" #fff",P:" green",Q:" magenta",R:" red",S:" orange",T:" orange",U:" #fff",V:" green",W:" green",X:" #fff",Y:" green",Z:" #fff"}},224:function(t,e,r){"use strict";t.exports={A:" #77dd88",B:" #fff",C:" #99ee66",D:" #55bb33",E:" #55bb33",F:" #9999ff",G:" #77dd88",H:" #5555ff",I:" #66bbff",J:" #fff",K:" #ffcc77",L:" #66bbff",M:" #66bbff",N:" #55bb33",O:" #fff",P:" #eeaaaa",Q:" #55bb33",R:" #ffcc77",S:" #ff4455",T:" #ff4455",U:" #fff",V:" #66bbff",W:" #9999ff",X:" #fff",Y:" #9999ff",Z:" #fff"}},225:function(t,e,r){"use strict";t.exports={A:" #64F73F",C:" #FFB340",G:" #EB413C",T:" #3C88EE",U:" #3C88EE"}},226:function(t,e,r){"use strict";t.exports={A:" #FF83FA",C:" #40E0D0",G:" #FF83FA",R:" #FF83FA",T:" #40E0D0",U:" #40E0D0",Y:" #40E0D0"}},227:function(t,e,r){"use strict";t.exports={A:"#5858a7",R:"#6b6b94",N:"#64649b",D:"#2121de",C:"#9d9d62",Q:"#8c8c73",E:"#0000ff",G:"#4949b6",H:"#60609f",I:"#ecec13",L:"#b2b24d",K:"#4747b8",M:"#82827d",F:"#c2c23d",P:"#2323dc",S:"#4949b6",T:"#9d9d62",W:"#c0c03f",Y:"#d3d32c",V:"#ffff00",B:"#4343bc",X:"#797986",Z:"#4747b8"}},228:function(t,e,r){"use strict";t.exports={A:"#ccff00",R:"#0000ff",N:"#cc00ff",D:"#ff0000",C:"#ffff00",Q:"#ff00cc",E:"#ff0066",G:"#ff9900",H:"#0066ff",I:"#66ff00",L:"#33ff00",K:"#6600ff",M:"#00ff00",F:"#00ff66",P:"#ffcc00",S:"#ff3300",T:"#ff6600",W:"#00ccff",Y:"#00ffcc",V:"#99ff00",B:"#fff",X:"#fff",Z:"#fff"}},229:function(t,e,r){"use strict";t.exports={A:"#2cd3d3",R:"#708f8f",N:"#ff0000",D:"#e81717",C:"#a85757",Q:"#3fc0c0",E:"#778888",G:"#ff0000",H:"#708f8f",I:"#00ffff",L:"#1ce3e3",K:"#7e8181",M:"#1ee1e1",F:"#1ee1e1",P:"#f60909",S:"#e11e1e",T:"#738c8c",W:"#738c8c",Y:"#9d6262",V:"#07f8f8",B:"#f30c0c",X:"#7c8383",Z:"#5ba4a4"}},230:function(t,e,r){"use strict";t.exports={A:"#ffafaf",R:"#6464ff",N:"#00ff00",D:"#ff0000",C:"#ffff00",Q:"#00ff00",E:"#ff0000",G:"#ff00ff",H:"#6464ff",I:"#ffafaf",L:"#ffafaf",K:"#6464ff",M:"#ffafaf",F:"#ffc800",P:"#ff00ff",S:"#00ff00",T:"#00ff00",W:"#ffc800",Y:"#ffc800",V:"#ffafaf",B:"#fff",X:"#fff",Z:"#fff"}},231:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownSelect=e.Caption=void 0;var n,a=o(r(1)),i=((n=r(0))&&n.__esModule,o(r(463)));function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}function s(){return(s=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var c=function(t){return a.default.createElement("div",{style:{marginTop:-8,marginBottom:-8}},a.default.createElement("p",{style:{fontSize:12,fontColor:"#444444"}},t.children))};e.Caption=c;e.DropdownSelect=function(t){var e=t.caption,r=t.isCreatable,n=t.outerStyle,o=l(t,["caption","isCreatable","outerStyle"]);return a.default.createElement("div",{style:n},e&&a.default.createElement(c,null,e),!e&&a.default.createElement(c,null," "),r&&a.default.createElement(i.Creatable,s({allowCreate:!0},o)),!r&&a.default.createElement(i.default,o))}},232:function(t,e,r){"use strict";(function(t){r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(462),a=void 0!==t?t:{},i=Object(n.a)(a),o=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),s=(i.keyframes,i.css);i.sheet,i.caches}).call(this,r(56))},233:function(t,e,r){t.exports=function(){"use strict";return function(t){function e(e){if(e)try{t(e+"}")}catch(t){}}return function(r,n,a,i,o,s,l,c,u,f){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return t(n+";"),"";break;case 2:if(0===c)return n+"/*|*/";break;case 3:switch(c){case 102:case 112:return t(a[0]+n),"";default:return n+(0===f?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(e)}}}}()},234:function(t,e,r){(function(e){for(var n=r(235),a="undefined"==typeof window?e:window,i=["moz","webkit"],o="AnimationFrame",s=a["request"+o],l=a["cancel"+o]||a["cancelRequest"+o],c=0;!s&&c=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(this.props,[]);return function(t){u.forEach((function(e){return delete t[e]}))}(a),a.className=this.props.inputClassName,a.id=this.state.inputId,a.style=r,o.default.createElement("div",{className:this.props.className,style:e},this.renderStyles(),o.default.createElement("input",n({},a,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:c},t),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),e}(i.Component);d.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},d.defaultProps={minWidth:1,injectStyles:!0},e.default=d},237:function(t,e,r){"use strict";var n=s(r(238)),a=s(r(243)),i=s(r(138)),o=s(r(135));function s(t){return t&&t.__esModule?t:{default:t}}t.exports={Transition:o.default,TransitionGroup:i.default,ReplaceTransition:a.default,CSSTransition:n.default}},238:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;!function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}e.default=t}(r(0));var n=s(r(239)),a=s(r(242)),i=s(r(1)),o=s(r(135));r(137);function s(t){return t&&t.__esModule?t:{default:t}}function l(){return(l=Object.assign||function(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,["children","in"]),o=n.default.Children.toArray(e),s=o[0],l=o[1];return delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,n.default.createElement(i.default,a,r?n.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):n.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},o}(n.default.Component);s.propTypes={};var l=s;e.default=l,t.exports=e.default},244:function(t,e,r){"use strict";e.__esModule=!0,e.getChildMapping=a,e.mergeChildMappings=i,e.getInitialChildMapping=function(t,e){return a(t.children,(function(r){return(0,n.cloneElement)(r,{onExited:e.bind(null,r),in:!0,appear:o(r,"appear",t),enter:o(r,"enter",t),exit:o(r,"exit",t)})}))},e.getNextChildMapping=function(t,e,r){var s=a(t.children),l=i(e,s);return Object.keys(l).forEach((function(a){var i=l[a];if((0,n.isValidElement)(i)){var c=a in e,u=a in s,f=e[a],p=(0,n.isValidElement)(f)&&!f.props.in;!u||c&&!p?u||!c||p?u&&c&&(0,n.isValidElement)(f)&&(l[a]=(0,n.cloneElement)(i,{onExited:r.bind(null,i),in:f.props.in,exit:o(i,"exit",t),enter:o(i,"enter",t)})):l[a]=(0,n.cloneElement)(i,{in:!1}):l[a]=(0,n.cloneElement)(i,{onExited:r.bind(null,i),in:!0,exit:o(i,"exit",t),enter:o(i,"enter",t)})}})),l};var n=r(1);function a(t,e){var r=Object.create(null);return t&&n.Children.map(t,(function(t){return t})).forEach((function(t){r[t.key]=function(t){return e&&(0,n.isValidElement)(t)?e(t):t}(t)})),r}function i(t,e){function r(r){return r in e?e[r]:t[r]}t=t||{},e=e||{};var n,a=Object.create(null),i=[];for(var o in t)o in e?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var l in e){if(a[l])for(n=0;n=4;)e=1540483477*(65535&(e=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(e>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(e=1540483477*(65535&(e^=e>>>24))+((1540483477*(e>>>16)&65535)<<16)),r-=4,++a;switch(r){case 3:n^=(255&t.charCodeAt(a+2))<<16;case 2:n^=(255&t.charCodeAt(a+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(a)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),((n^=n>>>15)>>>0).toString(36)};var o=function(t){function e(t,e,n){var a=e.trim().split(d);e=a;var i=a.length,o=t.length;switch(o){case 0:case 1:var s=0;for(t=0===o?"":t[0]+" ";sn&&(n=(e=e.trim()).charCodeAt(0)),n){case 38:return e.replace(g,"$1"+t.trim());case 58:return t.trim()+e.replace(g,"$1"+t.trim());default:if(0<1*r&&0l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0h)&&(N=(U=U.replace(" ",":")).length),01?a-1:0),o=1;o=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function E(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function S(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?E(t):e}function C(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e-1}function z(t){return D(t)?window.pageYOffset:t.scrollTop}function R(t,e){D(t)?window.scrollTo(0,e):t.scrollTop=e}function F(t,e,r,n){return r*((t=t/n-1)*t*t+1)+e}function B(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:L,a=z(t),i=e-a,o=10,s=0;function l(){var e=F(s+=o,a,i,r);R(t,e),s=h)return{placement:"bottom",maxHeight:e};if(k>=h&&!o)return i&&B(l,T,160),{placement:"bottom",maxHeight:e};if(!o&&k>=n||o&&_>=n)return i&&B(l,T,160),{placement:"bottom",maxHeight:o?_-y:k-y};if("auto"===a||o){var M=e,E=o?b:w;return E>=n&&(M=Math.min(E-y-s.controlHeight,e)),{placement:"top",maxHeight:M}}if("bottom"===a)return R(l,T),{placement:"bottom",maxHeight:e};break;case"top":if(b>=h)return{placement:"top",maxHeight:e};if(w>=h&&!o)return i&&B(l,A,160),{placement:"top",maxHeight:e};if(!o&&w>=n||o&&b>=n){var S=e;return(!o&&w>=n||o&&b>=n)&&(S=o?b-x:w-x),i&&B(l,A,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return c}var V=function(t){return"auto"===t?"bottom":t},U=function(t){function e(){var t,r;m(this,e);for(var n=arguments.length,a=new Array(n),i=0;i-1}},at=function(t){return a.a.createElement("span",_({className:Object(s.a)({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},t))},it=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=(t.in,t.out,t.onExited,t.appear,t.enter,t.exit,t.innerRef),r=(t.emotion,M(t,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return a.a.createElement("input",_({ref:e},r,{className:Object(s.a)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),e}(n.Component),ot=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(l.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),e}(n.Component),st=["boxSizing","height","overflow","paddingRight","position"],lt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ct(t){t.preventDefault()}function ut(t){t.stopPropagation()}function ft(){var t=this.scrollTop,e=this.scrollHeight,r=t+this.offsetHeight;0===t?this.scrollTop=1:r===e&&(this.scrollTop=t-1)}function pt(){return"ontouchstart"in window||navigator.maxTouchPoints}var ht=!("undefined"==typeof window||!window.document||!window.document.createElement),dt=0,gt=function(t){function e(){var t,r;m(this,e);for(var n=arguments.length,a=new Array(n),i=0;i0,d=u-f-c,g=!1;d>e&&r.isBottom&&(i&&i(t),r.isBottom=!1),h&&r.isTop&&(s&&s(t),r.isTop=!1),h&&e>d?(a&&!r.isBottom&&a(t),p.scrollTop=u,g=!0,r.isBottom=!0):!h&&-e>c&&(o&&!r.isTop&&o(t),p.scrollTop=0,g=!0,r.isTop=!0),g&&r.cancelScroll(t)})),b(E(E(r)),"onWheel",(function(t){r.handleEventDelta(t,t.deltaY)})),b(E(E(r)),"onTouchStart",(function(t){r.touchStart=t.changedTouches[0].clientY})),b(E(E(r)),"onTouchMove",(function(t){var e=r.touchStart-t.changedTouches[0].clientY;r.handleEventDelta(t,e)})),b(E(E(r)),"getScrollTarget",(function(t){r.scrollTarget=t})),r}return k(e,t),x(e,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(t){t&&(t.scrollHeight<=t.clientHeight||("function"==typeof t.addEventListener&&t.addEventListener("wheel",this.onWheel,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(t){t.scrollHeight<=t.clientHeight||("function"==typeof t.removeEventListener&&t.removeEventListener("wheel",this.onWheel,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return a.a.createElement(ot,{innerRef:this.getScrollTarget},this.props.children)}}]),e}(n.Component),yt=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.isEnabled,r=M(t,["isEnabled"]);return e?a.a.createElement(mt,r):this.props.children}}]),e}(n.Component);b(yt,"defaultProps",{isEnabled:!0});var xt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.isSearchable,n=e.isMulti,a=e.label,i=e.isDisabled;switch(t){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(a||"Select"," is focused ").concat(r?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},bt=function(t,e){var r=e.value,n=e.isDisabled;if(r)switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,n?" is disabled. Select another option.":", selected.")}},_t=function(t){return!!t.isDisabled},wt=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.children,r=t.className,n=t.cx,i=t.isMulti,o=t.getStyles,l=t.hasValue;return a.a.createElement("div",{className:n(Object(s.a)(o("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":l},r)},e)}}]),e}(n.Component),kt=function(t){var e=t.size,r=M(t,["size"]);return a.a.createElement("svg",_({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(s.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},r))},Tt=function(t){return a.a.createElement(kt,_({size:20},t),a.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},At=function(t){return a.a.createElement(kt,_({size:20},t),a.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Mt=function(t){var e=t.isFocused,r=t.theme,n=r.spacing.baseUnit,a=r.colors;return{label:"indicatorContainer",color:e?a.neutral60:a.neutral20,display:"flex",padding:2*n,transition:"color 150ms",":hover":{color:e?a.neutral80:a.neutral40}}},Et=Mt,St=Mt,Ct=!1,Lt=function(t){var e=t.color,r=t.delay,n=t.offset;return a.a.createElement("span",{className:Object(s.a)({animationDuration:"1s",animationDelay:"".concat(r,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:e,borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},Ot=function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerProps,o=t.isFocused,l=t.isRtl,c=t.theme.colors,u=o?c.neutral80:c.neutral20;return Ct||(Object(s.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),Ct=!0),a.a.createElement("div",_({},i,{className:r(Object(s.a)(n("loadingIndicator",t)),{indicator:!0,"loading-indicator":!0},e)}),a.a.createElement(Lt,{color:u,delay:0,offset:l}),a.a.createElement(Lt,{color:u,delay:160,offset:!0}),a.a.createElement(Lt,{color:u,delay:320,offset:!l}))};Ot.defaultProps={size:4};var Pt=function(t){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:t?0:1,outline:0,padding:0,color:"inherit"}},It=function(t){var e=t.children,r=t.innerProps;return a.a.createElement("div",r,e)},Dt=It,zt=It,Rt=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.children,r=t.innerProps;return a.a.createElement("div",r,e||a.a.createElement(Tt,{size:14}))}}]),e}(n.Component),Ft=function(t){function e(){return m(this,e),S(this,T(e).apply(this,arguments))}return k(e,t),x(e,[{key:"render",value:function(){var t=this.props,e=t.children,r=t.className,n=t.components,i=t.cx,o=t.data,l=t.getStyles,c=t.innerProps,u=t.isDisabled,f=t.removeProps,p=t.selectProps,h=n.Container,d=n.Label,g=n.Remove,v=w({className:i(Object(s.a)(l("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":u},r)},c),m={className:i(Object(s.a)(l("multiValueLabel",this.props)),{"multi-value__label":!0},r)},y=w({className:i(Object(s.a)(l("multiValueRemove",this.props)),{"multi-value__remove":!0},r)},f);return a.a.createElement(h,{data:o,innerProps:v,selectProps:p},a.a.createElement(d,{data:o,innerProps:m,selectProps:p},e),a.a.createElement(g,{data:o,innerProps:y,selectProps:p}))}}]),e}(n.Component);b(Ft,"defaultProps",{cropWithEllipsis:!0});var Bt={ClearIndicator:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps;return a.a.createElement("div",_({},o,{className:n(Object(s.a)(i("clearIndicator",t)),{indicator:!0,"clear-indicator":!0},r)}),e||a.a.createElement(Tt,null))},Control:function(t){var e=t.children,r=t.cx,n=t.getStyles,i=t.className,o=t.isDisabled,l=t.isFocused,c=t.innerRef,u=t.innerProps,f=t.menuIsOpen;return a.a.createElement("div",_({ref:c,className:r(Object(s.a)(n("control",t)),{control:!0,"control--is-disabled":o,"control--is-focused":l,"control--menu-is-open":f},i)},u),e)},DropdownIndicator:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps;return a.a.createElement("div",_({},o,{className:n(Object(s.a)(i("dropdownIndicator",t)),{indicator:!0,"dropdown-indicator":!0},r)}),e||a.a.createElement(At,null))},DownChevron:At,CrossIcon:Tt,Group:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.Heading,l=t.headingProps,c=t.label,u=t.theme,f=t.selectProps;return a.a.createElement("div",{className:n(Object(s.a)(i("group",t)),{group:!0},r)},a.a.createElement(o,_({},l,{selectProps:f,theme:u,getStyles:i,cx:n}),c),a.a.createElement("div",null,e))},GroupHeading:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.theme,o=(t.selectProps,M(t,["className","cx","getStyles","theme","selectProps"]));return a.a.createElement("div",_({className:r(Object(s.a)(n("groupHeading",w({theme:i},o))),{"group-heading":!0},e)},o))},IndicatorsContainer:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles;return a.a.createElement("div",{className:n(Object(s.a)(i("indicatorsContainer",t)),{indicators:!0},r)},e)},IndicatorSeparator:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerProps;return a.a.createElement("span",_({},i,{className:r(Object(s.a)(n("indicatorSeparator",t)),{"indicator-separator":!0},e)}))},Input:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerRef,o=t.isHidden,l=t.isDisabled,c=t.theme,u=(t.selectProps,M(t,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return a.a.createElement("div",{className:Object(s.a)(n("input",w({theme:c},u)))},a.a.createElement(d.a,_({className:r(null,{input:!0},e),inputRef:i,inputStyle:Pt(o),disabled:l},u)))},LoadingIndicator:Ot,Menu:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerRef,l=t.innerProps,c=n(Object(s.a)(i("menu",t)),{menu:!0},r);return a.a.createElement("div",_({className:c},l,{ref:o}),e)},MenuList:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.isMulti,l=t.innerRef;return a.a.createElement("div",{className:n(Object(s.a)(i("menuList",t)),{"menu-list":!0,"menu-list--is-multi":o},r),ref:l},e)},MenuPortal:X,LoadingMessage:Y,NoOptionsMessage:W,MultiValue:Ft,MultiValueContainer:Dt,MultiValueLabel:zt,MultiValueRemove:Rt,Option:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.isDisabled,l=t.isFocused,c=t.isSelected,u=t.innerRef,f=t.innerProps;return a.a.createElement("div",_({ref:u,className:n(Object(s.a)(i("option",t)),{option:!0,"option--is-disabled":o,"option--is-focused":l,"option--is-selected":c},r)},f),e)},Placeholder:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps;return a.a.createElement("div",_({className:n(Object(s.a)(i("placeholder",t)),{placeholder:!0},r)},o),e)},SelectContainer:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.innerProps,l=t.isDisabled,c=t.isRtl;return a.a.createElement("div",_({className:n(Object(s.a)(i("container",t)),{"--is-disabled":l,"--is-rtl":c},r)},o),e)},SingleValue:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,o=t.isDisabled,l=t.innerProps;return a.a.createElement("div",_({className:n(Object(s.a)(i("singleValue",t)),{"single-value":!0,"single-value--is-disabled":o},r)},l),e)},ValueContainer:wt},Nt=function(t){return w({},Bt,t.components)},jt={clearIndicator:St,container:function(t){var e=t.isDisabled;return{label:"container",direction:t.isRtl?"rtl":null,pointerEvents:e?"none":null,position:"relative"}},control:function(t){var e=t.isDisabled,r=t.isFocused,n=t.theme,a=n.colors,i=n.borderRadius,o=n.spacing;return{label:"control",alignItems:"center",backgroundColor:e?a.neutral5:a.neutral0,borderColor:e?a.neutral10:r?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:r?a.primary:a.neutral30}}},dropdownIndicator:Et,group:function(t){var e=t.theme.spacing;return{paddingBottom:2*e.baseUnit,paddingTop:2*e.baseUnit}},groupHeading:function(t){var e=t.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*e.baseUnit,paddingRight:3*e.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing.baseUnit,a=r.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:e?a.neutral10:a.neutral20,marginBottom:2*n,marginTop:2*n,width:1}},input:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing,a=r.colors;return{margin:n.baseUnit/2,paddingBottom:n.baseUnit/2,paddingTop:n.baseUnit/2,visibility:e?"hidden":"visible",color:a.neutral80}},loadingIndicator:function(t){var e=t.isFocused,r=t.size,n=t.theme,a=n.colors,i=n.spacing.baseUnit;return{label:"loadingIndicator",color:e?a.neutral60:a.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"}},loadingMessage:G,menu:function(t){var e,r=t.placement,n=t.theme,a=n.borderRadius,i=n.spacing,o=n.colors;return b(e={label:"menu"},function(t){return t?{bottom:"top",top:"bottom"}[t]:"bottom"}(r),"100%"),b(e,"backgroundColor",o.neutral0),b(e,"borderRadius",a),b(e,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),b(e,"marginBottom",i.menuGutter),b(e,"marginTop",i.menuGutter),b(e,"position","absolute"),b(e,"width","100%"),b(e,"zIndex",1),e},menuList:function(t){var e=t.maxHeight,r=t.theme.spacing.baseUnit;return{maxHeight:e,overflowY:"auto",paddingBottom:r,paddingTop:r,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(t){var e=t.rect,r=t.offset,n=t.position;return{left:e.left,position:n,top:r,width:e.width,zIndex:1}},multiValue:function(t){var e=t.theme,r=e.spacing,n=e.borderRadius;return{label:"multiValue",backgroundColor:e.colors.neutral10,borderRadius:n/2,display:"flex",margin:r.baseUnit/2,minWidth:0}},multiValueLabel:function(t){var e=t.theme,r=e.borderRadius,n=e.colors,a=t.cropWithEllipsis;return{borderRadius:r/2,color:n.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:a?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(t){var e=t.theme,r=e.spacing,n=e.borderRadius,a=e.colors;return{alignItems:"center",borderRadius:n/2,backgroundColor:t.isFocused&&a.dangerLight,display:"flex",paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}}},noOptionsMessage:H,option:function(t){var e=t.isDisabled,r=t.isFocused,n=t.isSelected,a=t.theme,i=a.spacing,o=a.colors;return{label:"option",backgroundColor:n?o.primary:r?o.primary25:"transparent",color:e?o.neutral20:n?o.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:n?o.primary:o.primary50}}},placeholder:function(t){var e=t.theme,r=e.spacing;return{label:"placeholder",color:e.colors.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing,a=r.colors;return{label:"singleValue",color:e?a.neutral40:a.neutral80,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,maxWidth:"calc(100% - ".concat(2*n.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(t){var e=t.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(e.baseUnit/2,"px ").concat(2*e.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};function Vt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=w({},t);return Object.keys(e).forEach((function(n){t[n]?r[n]=function(r,a){return e[n](t[n](r,a),a)}:r[n]=e[n]})),r}var Ut={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},qt={backspaceRemovesValue:!0,blurInputOnSelect:N(),captureMenuScroll:!N(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:nt(),formatGroupLabel:function(t){return t.label},getOptionLabel:function(t){return t.label},getOptionValue:function(t){return t.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:_t,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(1!==e?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Ht=1,Gt=function(t){function e(t){var r;m(this,e),b(E(E(r=S(this,T(e).call(this,t)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),b(E(E(r)),"blockOptionHover",!1),b(E(E(r)),"clearFocusValueOnUpdate",!1),b(E(E(r)),"commonProps",void 0),b(E(E(r)),"components",void 0),b(E(E(r)),"hasGroups",!1),b(E(E(r)),"initialTouchX",0),b(E(E(r)),"initialTouchY",0),b(E(E(r)),"inputIsHiddenAfterUpdate",void 0),b(E(E(r)),"instancePrefix",""),b(E(E(r)),"openAfterFocus",!1),b(E(E(r)),"scrollToFocusedOptionOnUpdate",!1),b(E(E(r)),"userIsDragging",void 0),b(E(E(r)),"controlRef",null),b(E(E(r)),"getControlRef",(function(t){r.controlRef=t})),b(E(E(r)),"focusedOptionRef",null),b(E(E(r)),"getFocusedOptionRef",(function(t){r.focusedOptionRef=t})),b(E(E(r)),"menuListRef",null),b(E(E(r)),"getMenuListRef",(function(t){r.menuListRef=t})),b(E(E(r)),"inputRef",null),b(E(E(r)),"getInputRef",(function(t){r.inputRef=t})),b(E(E(r)),"cacheComponents",(function(t){r.components=Nt({components:t})})),b(E(E(r)),"focus",r.focusInput),b(E(E(r)),"blur",r.blurInput),b(E(E(r)),"onChange",(function(t,e){var n=r.props;(0,n.onChange)(t,w({},e,{name:n.name}))})),b(E(E(r)),"setValue",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,a=r.props,i=a.closeMenuOnSelect,o=a.isMulti;r.onInputChange("",{action:"set-value"}),i&&(r.inputIsHiddenAfterUpdate=!o,r.onMenuClose()),r.clearFocusValueOnUpdate=!0,r.onChange(t,{action:e,option:n})})),b(E(E(r)),"selectOption",(function(t){var e=r.props,n=e.blurInputOnSelect,a=e.isMulti,i=r.state.selectValue;if(a)if(r.isOptionSelected(t,i)){var o=r.getOptionValue(t);r.setValue(i.filter((function(t){return r.getOptionValue(t)!==o})),"deselect-option",t),r.announceAriaLiveSelection({event:"deselect-option",context:{value:r.getOptionLabel(t)}})}else r.isOptionDisabled(t,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t),isDisabled:!0}}):(r.setValue([].concat(C(i),[t]),"select-option",t),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t)}}));else r.isOptionDisabled(t,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t),isDisabled:!0}}):(r.setValue(t,"select-option"),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(t)}}));n&&r.blurInput()})),b(E(E(r)),"removeValue",(function(t){var e=r.state.selectValue,n=r.getOptionValue(t);r.onChange(e.filter((function(t){return r.getOptionValue(t)!==n})),{action:"remove-value",removedValue:t}),r.announceAriaLiveSelection({event:"remove-value",context:{value:t?r.getOptionLabel(t):""}}),r.focusInput()})),b(E(E(r)),"clearValue",(function(){var t=r.props.isMulti;r.onChange(t?[]:null,{action:"clear"})})),b(E(E(r)),"popValue",(function(){var t=r.state.selectValue,e=t[t.length-1];r.announceAriaLiveSelection({event:"pop-value",context:{value:e?r.getOptionLabel(e):""}}),r.onChange(t.slice(0,t.length-1),{action:"pop-value",removedValue:e})})),b(E(E(r)),"getOptionLabel",(function(t){return r.props.getOptionLabel(t)})),b(E(E(r)),"getOptionValue",(function(t){return r.props.getOptionValue(t)})),b(E(E(r)),"getStyles",(function(t,e){var n=jt[t](e);n.boxSizing="border-box";var a=r.props.styles[t];return a?a(n,e):n})),b(E(E(r)),"getElementId",(function(t){return"".concat(r.instancePrefix,"-").concat(t)})),b(E(E(r)),"getActiveDescendentId",(function(){var t=r.props.menuIsOpen,e=r.state,n=e.menuOptions,a=e.focusedOption;if(a&&t){var i=n.focusable.indexOf(a),o=n.render[i];return o&&o.key}})),b(E(E(r)),"announceAriaLiveSelection",(function(t){var e=t.event,n=t.context;r.setState({ariaLiveSelection:bt(e,n)})})),b(E(E(r)),"announceAriaLiveContext",(function(t){var e=t.event,n=t.context;r.setState({ariaLiveContext:xt(e,w({},n,{label:r.props["aria-label"]}))})})),b(E(E(r)),"onMenuMouseDown",(function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),r.focusInput())})),b(E(E(r)),"onMenuMouseMove",(function(t){r.blockOptionHover=!1})),b(E(E(r)),"onControlMouseDown",(function(t){var e=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==t.target.tagName&&r.onMenuClose():e&&r.openMenu("first"):(e&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()})),b(E(E(r)),"onDropdownIndicatorMouseDown",(function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||r.props.isDisabled)){var e=r.props,n=e.isMulti,a=e.menuIsOpen;r.focusInput(),a?(r.inputIsHiddenAfterUpdate=!n,r.onMenuClose()):r.openMenu("first"),t.preventDefault(),t.stopPropagation()}})),b(E(E(r)),"onClearIndicatorMouseDown",(function(t){t&&"mousedown"===t.type&&0!==t.button||(r.clearValue(),t.stopPropagation(),r.openAfterFocus=!1,setTimeout((function(){return r.focusInput()})))})),b(E(E(r)),"onScroll",(function(t){"boolean"==typeof r.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(t)&&r.props.onMenuClose()})),b(E(E(r)),"onCompositionStart",(function(){r.setState({isComposing:!0})})),b(E(E(r)),"onCompositionEnd",(function(){r.setState({isComposing:!1})})),b(E(E(r)),"onTouchStart",(function(t){var e=t.touches.item(0);e&&(r.initialTouchX=e.clientX,r.initialTouchY=e.clientY,r.userIsDragging=!1)})),b(E(E(r)),"onTouchMove",(function(t){var e=t.touches.item(0);if(e){var n=Math.abs(e.clientX-r.initialTouchX),a=Math.abs(e.clientY-r.initialTouchY);r.userIsDragging=n>5||a>5}})),b(E(E(r)),"onTouchEnd",(function(t){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(t.target)&&r.menuListRef&&!r.menuListRef.contains(t.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)})),b(E(E(r)),"onControlTouchEnd",(function(t){r.userIsDragging||r.onControlMouseDown(t)})),b(E(E(r)),"onClearIndicatorTouchEnd",(function(t){r.userIsDragging||r.onClearIndicatorMouseDown(t)})),b(E(E(r)),"onDropdownIndicatorTouchEnd",(function(t){r.userIsDragging||r.onDropdownIndicatorMouseDown(t)})),b(E(E(r)),"handleInputChange",(function(t){var e=t.currentTarget.value;r.inputIsHiddenAfterUpdate=!1,r.onInputChange(e,{action:"input-change"}),r.onMenuOpen()})),b(E(E(r)),"onInputFocus",(function(t){var e=r.props,n=e.isSearchable,a=e.isMulti;r.props.onFocus&&r.props.onFocus(t),r.inputIsHiddenAfterUpdate=!1,r.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:a}}),r.setState({isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1})),b(E(E(r)),"onInputBlur",(function(t){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(t),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))})),b(E(E(r)),"onOptionHover",(function(t){r.blockOptionHover||r.state.focusedOption===t||r.setState({focusedOption:t})})),b(E(E(r)),"shouldHideSelectedOptions",(function(){var t=r.props,e=t.hideSelectedOptions,n=t.isMulti;return void 0===e?n:e})),b(E(E(r)),"onKeyDown",(function(t){var e=r.props,n=e.isMulti,a=e.backspaceRemovesValue,i=e.escapeClearsValue,o=e.inputValue,s=e.isClearable,l=e.isDisabled,c=e.menuIsOpen,u=e.onKeyDown,f=e.tabSelectsValue,p=e.openMenuOnFocus,h=r.state,d=h.isComposing,g=h.focusedOption,v=h.focusedValue,m=h.selectValue;if(!(l||"function"==typeof u&&(u(t),t.defaultPrevented))){switch(r.blockOptionHover=!0,t.key){case"ArrowLeft":if(!n||o)return;r.focusValue("previous");break;case"ArrowRight":if(!n||o)return;r.focusValue("next");break;case"Delete":case"Backspace":if(o)return;if(v)r.removeValue(v);else{if(!a)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(d)return;if(t.shiftKey||!c||!f||!g||p&&r.isOptionSelected(g,m))return;r.selectOption(g);break;case"Enter":if(229===t.keyCode)break;if(c){if(!g)return;if(d)return;r.selectOption(g);break}return;case"Escape":c?(r.inputIsHiddenAfterUpdate=!1,r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(o)return;if(!c){r.openMenu("first");break}if(!g)return;r.selectOption(g);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}t.preventDefault()}}));var n=t.value;r.cacheComponents=o(r.cacheComponents,$).bind(E(E(r))),r.cacheComponents(t.components),r.instancePrefix="react-select-"+(r.props.instanceId||++Ht);var a=I(n),i=r.buildMenuOptions(t,a);return r.state.menuOptions=i,r.state.selectValue=a,r}return k(e,t),x(e,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(t){var e=this.props,r=e.options,n=e.value,a=e.inputValue;if(this.cacheComponents(t.components),t.value!==n||t.options!==r||t.inputValue!==a){var i=I(t.value),o=this.buildMenuOptions(t,i),s=this.getNextFocusedValue(i),l=this.getNextFocusedOption(o.focusable);this.setState({menuOptions:o,selectValue:i,focusedOption:l,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(t){var e,r,n,a,i,o=this.props,s=o.isDisabled,l=o.menuIsOpen,c=this.state.isFocused;(c&&!s&&t.isDisabled||c&&l&&!t.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(e=this.menuListRef,r=this.focusedOptionRef,n=e.getBoundingClientRect(),a=r.getBoundingClientRect(),i=r.offsetHeight/3,a.bottom+i>n.bottom?R(e,Math.min(r.offsetTop+r.clientHeight-e.offsetHeight+i,e.scrollHeight)):a.top-i-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:r.focusable[o]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(t){var e=this.props,r=e.isMulti,n=e.isSearchable,a=this.state,i=a.selectValue,o=a.focusedValue;if(r){this.setState({focusedOption:null});var s=i.indexOf(o);o||(s=-1,this.announceAriaLiveContext({event:"value"}));var l=i.length-1,c=-1;if(i.length){switch(t){case"previous":c=0===s?0:-1===s?l:s-1;break;case"next":s>-1&&s0&&void 0!==arguments[0]?arguments[0]:"first",e=this.props.pageSize,r=this.state,n=r.focusedOption,a=r.menuOptions,i=a.focusable;if(i.length){var o=0,s=i.indexOf(n);n||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===t?o=s>0?s-1:i.length-1:"down"===t?o=(s+1)%i.length:"pageup"===t?(o=s-e)<0&&(o=0):"pagedown"===t?(o=s+e)>i.length-1&&(o=i.length-1):"last"===t&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:_t(i[o])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ut):w({},Ut,this.props.theme):Ut}},{key:"getCommonProps",value:function(){var t=this.clearValue,e=this.getStyles,r=this.setValue,n=this.selectOption,a=this.props,i=a.classNamePrefix,o=a.isMulti,s=a.isRtl,l=a.options,c=this.state.selectValue,u=this.hasValue();return{cx:P.bind(null,i),clearValue:t,getStyles:e,getValue:function(){return c},hasValue:u,isMulti:o,isRtl:s,options:l,selectOption:n,setValue:r,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(t){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var e=this.state,r=e.focusedValue,n=e.selectValue.indexOf(r);if(n>-1){if(t.indexOf(r)>-1)return r;if(n-1?e:t[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var t=this.props,e=t.isClearable,r=t.isMulti;return void 0===e?r:e}},{key:"isOptionDisabled",value:function(t,e){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(t,e)}},{key:"isOptionSelected",value:function(t,e){var r=this;if(e.indexOf(t)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(t,e);var n=this.getOptionValue(t);return e.some((function(t){return r.getOptionValue(t)===n}))}},{key:"filterOption",value:function(t,e){return!this.props.filterOption||this.props.filterOption(t,e)}},{key:"formatOptionLabel",value:function(t,e){if("function"==typeof this.props.formatOptionLabel){var r=this.props.inputValue,n=this.state.selectValue;return this.props.formatOptionLabel(t,{context:e,inputValue:r,selectValue:n})}return this.getOptionLabel(t)}},{key:"formatGroupLabel",value:function(t){return this.props.formatGroupLabel(t)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(t,e){var r=this,n=t.inputValue,a=void 0===n?"":n,i=t.options,o=function(t,n){var i=r.isOptionDisabled(t,e),o=r.isOptionSelected(t,e),s=r.getOptionLabel(t),l=r.getOptionValue(t);if(!(r.shouldHideSelectedOptions()&&o||!r.filterOption({label:s,value:l,data:t},a))){var c=i?void 0:function(){return r.onOptionHover(t)},u=i?void 0:function(){return r.selectOption(t)},f="".concat(r.getElementId("option"),"-").concat(n);return{innerProps:{id:f,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:t,isDisabled:i,isSelected:o,key:f,label:s,type:"option",value:l}}};return i.reduce((function(t,e,n){if(e.options){r.hasGroups||(r.hasGroups=!0);var a=e.options.map((function(e,r){var a=o(e,"".concat(n,"-").concat(r));return a&&t.focusable.push(e),a})).filter(Boolean);if(a.length){var i="".concat(r.getElementId("group"),"-").concat(n);t.render.push({type:"group",key:i,data:e,options:a})}}else{var s=o(e,"".concat(n));s&&(t.render.push(s),t.focusable.push(e))}return t}),{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var t=this.state,e=t.ariaLiveContext,r=t.selectValue,n=t.focusedValue,a=t.focusedOption,i=this.props,o=i.options,s=i.menuIsOpen,l=i.inputValue,c=i.screenReaderStatus,u=n?function(t){var e=t.focusedValue,r=t.getOptionLabel,n=t.selectValue;return"value ".concat(r(e)," focused, ").concat(n.indexOf(e)+1," of ").concat(n.length,".")}({focusedValue:n,getOptionLabel:this.getOptionLabel,selectValue:r}):"",f=a&&s?function(t){var e=t.focusedOption,r=t.getOptionLabel,n=t.options;return"option ".concat(r(e)," focused").concat(e.isDisabled?" disabled":"",", ").concat(n.indexOf(e)+1," of ").concat(n.length,".")}({focusedOption:a,getOptionLabel:this.getOptionLabel,options:o}):"",p=function(t){var e=t.inputValue,r=t.screenReaderMessage;return"".concat(r).concat(e?" for search term "+e:"",".")}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(f," ").concat(p," ").concat(e)}},{key:"renderInput",value:function(){var t=this.props,e=t.isDisabled,r=t.isSearchable,n=t.inputId,i=t.inputValue,o=t.tabIndex,s=this.components.Input,l=this.state.inputIsHidden,c=n||this.getElementId("input");if(!r)return a.a.createElement(it,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:L,onFocus:this.onInputFocus,readOnly:!0,disabled:e,tabIndex:o,value:""});var u={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,h=f.theme,d=f.selectProps;return a.a.createElement(s,_({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:e,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:d,spellCheck:"false",tabIndex:o,theme:h,type:"text",value:i},u))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,e=this.components,r=e.MultiValue,n=e.MultiValueContainer,i=e.MultiValueLabel,o=e.MultiValueRemove,s=e.SingleValue,l=e.Placeholder,c=this.commonProps,u=this.props,f=u.controlShouldRenderValue,p=u.isDisabled,h=u.isMulti,d=u.inputValue,g=u.placeholder,v=this.state,m=v.selectValue,y=v.focusedValue,x=v.isFocused;if(!this.hasValue()||!f)return d?null:a.a.createElement(l,_({},c,{key:"placeholder",isDisabled:p,isFocused:x}),g);if(h)return m.map((function(e){var s=e===y;return a.a.createElement(r,_({},c,{components:{Container:n,Label:i,Remove:o},isFocused:s,isDisabled:p,key:t.getOptionValue(e),removeProps:{onClick:function(){return t.removeValue(e)},onTouchEnd:function(){return t.removeValue(e)},onMouseDown:function(t){t.preventDefault(),t.stopPropagation()}},data:e}),t.formatOptionLabel(e,"value"))}));if(d)return null;var b=m[0];return a.a.createElement(s,_({},c,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.components.ClearIndicator,e=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,o=this.state.isFocused;if(!this.isClearable()||!t||n||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return a.a.createElement(t,_({},e,{innerProps:s,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var t=this.components.LoadingIndicator,e=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,o=this.state.isFocused;if(!t||!i)return null;return a.a.createElement(t,_({},e,{innerProps:{"aria-hidden":"true"},isDisabled:n,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.components,e=t.DropdownIndicator,r=t.IndicatorSeparator;if(!e||!r)return null;var n=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return a.a.createElement(r,_({},n,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var t=this.components.DropdownIndicator;if(!t)return null;var e=this.commonProps,r=this.props.isDisabled,n=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return a.a.createElement(t,_({},e,{innerProps:i,isDisabled:r,isFocused:n}))}},{key:"renderMenu",value:function(){var t=this,e=this.components,r=e.Group,n=e.GroupHeading,i=e.Menu,o=e.MenuList,s=e.MenuPortal,l=e.LoadingMessage,c=e.NoOptionsMessage,u=e.Option,f=this.commonProps,p=this.state,h=p.focusedOption,d=p.menuOptions,g=this.props,v=g.captureMenuScroll,m=g.inputValue,y=g.isLoading,x=g.loadingMessage,b=g.minMenuHeight,w=g.maxMenuHeight,k=g.menuIsOpen,T=g.menuPlacement,A=g.menuPosition,E=g.menuPortalTarget,S=g.menuShouldBlockScroll,C=g.menuShouldScrollIntoView,L=g.noOptionsMessage,O=g.onMenuScrollToTop,P=g.onMenuScrollToBottom;if(!k)return null;var I,D=function(e){var r=h===e.data;return e.innerRef=r?t.getFocusedOptionRef:void 0,a.a.createElement(u,_({},f,e,{isFocused:r}),t.formatOptionLabel(e.data,"menu"))};if(this.hasOptions())I=d.render.map((function(e){if("group"===e.type){e.type;var i=M(e,["type"]),o="".concat(e.key,"-heading");return a.a.createElement(r,_({},f,i,{Heading:n,headingProps:{id:o},label:t.formatGroupLabel(e.data)}),e.options.map((function(t){return D(t)})))}if("option"===e.type)return D(e)}));else if(y){var z=x({inputValue:m});if(null===z)return null;I=a.a.createElement(l,f,z)}else{var R=L({inputValue:m});if(null===R)return null;I=a.a.createElement(c,f,R)}var F={minMenuHeight:b,maxMenuHeight:w,menuPlacement:T,menuPosition:A,menuShouldScrollIntoView:C},B=a.a.createElement(U,_({},f,F),(function(e){var r=e.ref,n=e.placerProps,s=n.placement,l=n.maxHeight;return a.a.createElement(i,_({},f,F,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:y,placement:s}),a.a.createElement(yt,{isEnabled:v,onTopArrive:O,onBottomArrive:P},a.a.createElement(vt,{isEnabled:S},a.a.createElement(o,_({},f,{innerRef:t.getMenuListRef,isLoading:y,maxHeight:l}),I))))}));return E||"fixed"===A?a.a.createElement(s,_({},f,{appendTo:E,controlElement:this.controlRef,menuPlacement:T,menuPosition:A}),B):B}},{key:"renderFormField",value:function(){var t=this,e=this.props,r=e.delimiter,n=e.isDisabled,i=e.isMulti,o=e.name,s=this.state.selectValue;if(o&&!n){if(i){if(r){var l=s.map((function(e){return t.getOptionValue(e)})).join(r);return a.a.createElement("input",{name:o,type:"hidden",value:l})}var c=s.length>0?s.map((function(e,r){return a.a.createElement("input",{key:"i-".concat(r),name:o,type:"hidden",value:t.getOptionValue(e)})})):a.a.createElement("input",{name:o,type:"hidden"});return a.a.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return a.a.createElement("input",{name:o,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?a.a.createElement(at,{"aria-live":"assertive"},a.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),a.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var t=this.components,e=t.Control,r=t.IndicatorsContainer,n=t.SelectContainer,i=t.ValueContainer,o=this.props,s=o.className,l=o.id,c=o.isDisabled,u=o.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return a.a.createElement(n,_({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:f}),this.renderLiveRegion(),a.a.createElement(e,_({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:f,menuIsOpen:u}),a.a.createElement(i,_({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),a.a.createElement(r,_({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),e}(n.Component);b(Gt,"defaultProps",qt);var Wt={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Yt=function(t){var e,r;return r=e=function(e){function r(){var t,e;m(this,r);for(var n=arguments.length,a=new Array(n),i=0;i1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,r=String(t).toLowerCase(),n=String(e.value).toLowerCase(),a=String(e.label).toLowerCase();return n===r||a===r},Qt=w({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,e,r){return!(!t||e.some((function(e){return $t(t,e)}))||r.some((function(e){return $t(t,e)})))},getNewOptionData:function(t,e){return{label:e,value:t,__isNew__:!0}}}),te=function(t){var e,r;return r=e=function(e){function r(t){var e;m(this,r),b(E(E(e=S(this,T(r).call(this,t)))),"select",void 0),b(E(E(e)),"onChange",(function(t,r){var n=e.props,a=n.getNewOptionData,i=n.inputValue,o=n.isMulti,s=n.onChange,l=n.onCreateOption,c=n.value;if("select-option"!==r.action)return s(t,r);var u=e.state.newOption,f=Array.isArray(t)?t:[t];if(f[f.length-1]!==u)s(t,r);else if(l)l(i);else{var p=a(i,i),h={action:"create-option"};s(o?[].concat(C(I(c)),[p]):p,h)}}));var n=t.options||[];return e.state={newOption:void 0,options:n},e}return k(r,e),x(r,[{key:"componentWillReceiveProps",value:function(t){var e=t.allowCreateWhileLoading,r=t.createOptionPosition,n=t.formatCreateLabel,a=t.getNewOptionData,i=t.inputValue,o=t.isLoading,s=t.isValidNewOption,l=t.value,c=t.options||[],u=this.state.newOption;u=s(i,I(l),c)?a(i,n(i)):void 0,this.setState({newOption:u,options:!e&&o||!u?c:"first"===r?[u].concat(C(c)):[].concat(C(c),[u])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var e=this,r=_({},this.props),n=this.state.options;return a.a.createElement(t,_({},r,{ref:function(t){e.select=t},options:n,onChange:this.onChange}))}}]),r}(n.Component),b(e,"defaultProps",Qt),r},ee=Yt(te(Gt)),re=Yt(te(Gt)),ne=Zt(re),ae=function(t){return function(e){e.in,e.onExited,e.appear,e.enter,e.exit;var r=M(e,["in","onExited","appear","enter","exit"]);return a.a.createElement(t,r)}},ie=function(t){var e=t.component,r=t.duration,n=void 0===r?1:r,i=t.in,o=(t.onExited,M(t,["component","duration","in","onExited"])),s={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(n,"ms")},exiting:{opacity:0},exited:{opacity:0}};return a.a.createElement(g.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:n},(function(t){var r={style:w({},s[t])};return a.a.createElement(e,_({innerProps:r},o))}))},oe=function(t){function e(){var t,r;m(this,e);for(var n=arguments.length,a=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=Nt({components:t}),r=e.Input,n=e.MultiValue,a=e.Placeholder,i=e.SingleValue,o=e.ValueContainer,s=M(e,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return w({Input:ae(r),MultiValue:se(n),Placeholder:le(a),SingleValue:ce(i),ValueContainer:ue(o)},s)},pe=fe(),he=(pe.Input,pe.MultiValue,pe.Placeholder,pe.SingleValue,pe.ValueContainer,o(fe,$)),de=Yt(Gt);e.default=de},465:function(t,e,r){"use strict";var n=r(10),a=Object(n.a)((function(t,e){for(var r={},n={},a=0,i=t.length;a + * 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="Expected a function",o="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",c="[object Array]",u="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Function]",d="[object GeneratorFunction]",g="[object Map]",v="[object Number]",m="[object Object]",y="[object RegExp]",x="[object Set]",b="[object String]",_="[object Symbol]",w="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",A="[object Float32Array]",M="[object Float64Array]",E="[object Int8Array]",S="[object Int16Array]",C="[object Int32Array]",L="[object Uint8Array]",O="[object Uint16Array]",P="[object Uint32Array]",I=/\b__p \+= '';/g,D=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,B=RegExp(R.source),N=RegExp(F.source),j=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,G=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(W.source),X=/^\s+|\s+$/g,Z=/^\s+/,J=/\s+$/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/\\(\\)?/g,rt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nt=/\w*$/,at=/^[-+]0x[0-9a-f]+$/i,it=/^0b[01]+$/i,ot=/^\[object .+?Constructor\]$/,st=/^0o[0-7]+$/i,lt=/^(?:0|[1-9]\d*)$/,ct=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,pt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ht="\\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",dt="[\\ud800-\\udfff]",gt="["+ht+"]",vt="["+pt+"]",mt="\\d+",yt="[\\u2700-\\u27bf]",xt="[a-z\\xdf-\\xf6\\xf8-\\xff]",bt="[^\\ud800-\\udfff"+ht+mt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_t="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",kt="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",At="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Mt="(?:"+xt+"|"+bt+")",Et="(?:"+At+"|"+bt+")",St="(?:"+vt+"|"+_t+")"+"?",Ct="[\\ufe0e\\ufe0f]?"+St+("(?:\\u200d(?:"+[wt,kt,Tt].join("|")+")[\\ufe0e\\ufe0f]?"+St+")*"),Lt="(?:"+[yt,kt,Tt].join("|")+")"+Ct,Ot="(?:"+[wt+vt+"?",vt,kt,Tt,dt].join("|")+")",Pt=RegExp("['’]","g"),It=RegExp(vt,"g"),Dt=RegExp(_t+"(?="+_t+")|"+Ot+Ct,"g"),zt=RegExp([At+"?"+xt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[gt,At,"$"].join("|")+")",Et+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[gt,At+Mt,"$"].join("|")+")",At+"?"+Mt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",At+"+(?:['’](?: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_])",mt,Lt].join("|"),"g"),Rt=RegExp("[\\u200d\\ud800-\\udfff"+pt+"\\ufe0e\\ufe0f]"),Ft=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bt=["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"],Nt=-1,jt={};jt[A]=jt[M]=jt[E]=jt[S]=jt[C]=jt[L]=jt["[object Uint8ClampedArray]"]=jt[O]=jt[P]=!0,jt[l]=jt[c]=jt[k]=jt[u]=jt[T]=jt[f]=jt[p]=jt[h]=jt[g]=jt[v]=jt[m]=jt[y]=jt[x]=jt[b]=jt[w]=!1;var Vt={};Vt[l]=Vt[c]=Vt[k]=Vt[T]=Vt[u]=Vt[f]=Vt[A]=Vt[M]=Vt[E]=Vt[S]=Vt[C]=Vt[g]=Vt[v]=Vt[m]=Vt[y]=Vt[x]=Vt[b]=Vt[_]=Vt[L]=Vt["[object Uint8ClampedArray]"]=Vt[O]=Vt[P]=!0,Vt[p]=Vt[h]=Vt[w]=!1;var Ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qt=parseFloat,Ht=parseInt,Gt="object"==typeof t&&t&&t.Object===Object&&t,Wt="object"==typeof self&&self&&self.Object===Object&&self,Yt=Gt||Wt||Function("return this")(),Xt=e&&!e.nodeType&&e,Zt=Xt&&"object"==typeof n&&n&&!n.nodeType&&n,Jt=Zt&&Zt.exports===Xt,Kt=Jt&&Gt.process,$t=function(){try{var t=Zt&&Zt.require&&Zt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),Qt=$t&&$t.isArrayBuffer,te=$t&&$t.isDate,ee=$t&&$t.isMap,re=$t&&$t.isRegExp,ne=$t&&$t.isSet,ae=$t&&$t.isTypedArray;function ie(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function oe(t,e,r,n){for(var a=-1,i=null==t?0:t.length;++a-1}function pe(t,e,r){for(var n=-1,a=null==t?0:t.length;++n-1;);return r}function De(t,e){for(var r=t.length;r--&&_e(e,t[r],0)>-1;);return r}function ze(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Re=Me({"À":"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"}),Fe=Me({"&":"&","<":"<",">":">",'"':""","'":"'"});function Be(t){return"\\"+Ut[t]}function Ne(t){return Rt.test(t)}function je(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Ve(t,e){return function(r){return t(e(r))}}function Ue(t,e){for(var r=-1,n=t.length,a=0,i=[];++r",""":'"',"'":"'"});var Xe=function t(e){var r,n=(e=null==e?Yt:Xe.defaults(Yt.Object(),e,Xe.pick(Yt,Bt))).Array,a=e.Date,pt=e.Error,ht=e.Function,dt=e.Math,gt=e.Object,vt=e.RegExp,mt=e.String,yt=e.TypeError,xt=n.prototype,bt=ht.prototype,_t=gt.prototype,wt=e["__core-js_shared__"],kt=bt.toString,Tt=_t.hasOwnProperty,At=0,Mt=(r=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Et=_t.toString,St=kt.call(gt),Ct=Yt._,Lt=vt("^"+kt.call(Tt).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Jt?e.Buffer:void 0,Dt=e.Symbol,Rt=e.Uint8Array,Ut=Ot?Ot.allocUnsafe:void 0,Gt=Ve(gt.getPrototypeOf,gt),Wt=gt.create,Xt=_t.propertyIsEnumerable,Zt=xt.splice,Kt=Dt?Dt.isConcatSpreadable:void 0,$t=Dt?Dt.iterator:void 0,ye=Dt?Dt.toStringTag:void 0,Me=function(){try{var t=Qa(gt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ze=e.clearTimeout!==Yt.clearTimeout&&e.clearTimeout,Je=a&&a.now!==Yt.Date.now&&a.now,Ke=e.setTimeout!==Yt.setTimeout&&e.setTimeout,$e=dt.ceil,Qe=dt.floor,tr=gt.getOwnPropertySymbols,er=Ot?Ot.isBuffer:void 0,rr=e.isFinite,nr=xt.join,ar=Ve(gt.keys,gt),ir=dt.max,or=dt.min,sr=a.now,lr=e.parseInt,cr=dt.random,ur=xt.reverse,fr=Qa(e,"DataView"),pr=Qa(e,"Map"),hr=Qa(e,"Promise"),dr=Qa(e,"Set"),gr=Qa(e,"WeakMap"),vr=Qa(gt,"create"),mr=gr&&new gr,yr={},xr=Mi(fr),br=Mi(pr),_r=Mi(hr),wr=Mi(dr),kr=Mi(gr),Tr=Dt?Dt.prototype:void 0,Ar=Tr?Tr.valueOf:void 0,Mr=Tr?Tr.toString:void 0;function Er(t){if(Ho(t)&&!Io(t)&&!(t instanceof Or)){if(t instanceof Lr)return t;if(Tt.call(t,"__wrapped__"))return Ei(t)}return new Lr(t)}var Sr=function(){function t(){}return function(e){if(!qo(e))return{};if(Wt)return Wt(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Cr(){}function Lr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Or(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Pr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function Zr(t,e,r,n,a,i){var o,s=1&e,c=2&e,p=4&e;if(r&&(o=a?r(t,n,a,i):r(t)),void 0!==o)return o;if(!qo(t))return t;var w=Io(t);if(w){if(o=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&Tt.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!s)return ma(t,o)}else{var I=ri(t),D=I==h||I==d;if(Fo(t))return fa(t,s);if(I==m||I==l||D&&!a){if(o=c||D?{}:ai(t),!s)return c?function(t,e){return ya(t,ei(t),e)}(t,function(t,e){return t&&ya(e,_s(e),t)}(o,t)):function(t,e){return ya(t,ti(t),e)}(t,Gr(o,t))}else{if(!Vt[I])return a?t:{};o=function(t,e,r){var n=t.constructor;switch(e){case k:return pa(t);case u:case f:return new n(+t);case T:return function(t,e){var r=e?pa(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case A:case M:case E:case S:case C:case L:case"[object Uint8ClampedArray]":case O:case P:return ha(t,r);case g:return new n;case v:case b:return new n(t);case y:return function(t){var e=new t.constructor(t.source,nt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new n;case _:return a=t,Ar?gt(Ar.call(a)):{}}var a}(t,I,s)}}i||(i=new Rr);var z=i.get(t);if(z)return z;i.set(t,o),Zo(t)?t.forEach((function(n){o.add(Zr(n,e,r,n,t,i))})):Go(t)&&t.forEach((function(n,a){o.set(a,Zr(n,e,r,a,t,i))}));var R=w?void 0:(p?c?Wa:Ga:c?_s:bs)(t);return se(R||t,(function(n,a){R&&(n=t[a=n]),Ur(o,a,Zr(n,e,r,a,t,i))})),o}function Jr(t,e,r){var n=r.length;if(null==t)return!n;for(t=gt(t);n--;){var a=r[n],i=e[a],o=t[a];if(void 0===o&&!(a in t)||!i(o))return!1}return!0}function Kr(t,e,r){if("function"!=typeof t)throw new yt(i);return xi((function(){t.apply(void 0,r)}),e)}function $r(t,e,r,n){var a=-1,i=fe,o=!0,s=t.length,l=[],c=e.length;if(!s)return l;r&&(e=he(e,Le(r))),n?(i=pe,o=!1):e.length>=200&&(i=Pe,o=!1,e=new zr(e));t:for(;++a-1},Ir.prototype.set=function(t,e){var r=this.__data__,n=qr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:new Pr,map:new(pr||Ir),string:new Pr}},Dr.prototype.delete=function(t){var e=Ka(this,t).delete(t);return this.size-=e?1:0,e},Dr.prototype.get=function(t){return Ka(this,t).get(t)},Dr.prototype.has=function(t){return Ka(this,t).has(t)},Dr.prototype.set=function(t,e){var r=Ka(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},zr.prototype.add=zr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},zr.prototype.has=function(t){return this.__data__.has(t)},Rr.prototype.clear=function(){this.__data__=new Ir,this.size=0},Rr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Rr.prototype.get=function(t){return this.__data__.get(t)},Rr.prototype.has=function(t){return this.__data__.has(t)},Rr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Ir){var n=r.__data__;if(!pr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Dr(n)}return r.set(t,e),this.size=r.size,this};var Qr=_a(ln),tn=_a(cn,!0);function en(t,e){var r=!0;return Qr(t,(function(t,n,a){return r=!!e(t,n,a)})),r}function rn(t,e,r){for(var n=-1,a=t.length;++n0&&r(s)?e>1?an(s,e-1,r,n,a):de(a,s):n||(a[a.length]=s)}return a}var on=wa(),sn=wa(!0);function ln(t,e){return t&&on(t,e,bs)}function cn(t,e){return t&&sn(t,e,bs)}function un(t,e){return ue(e,(function(e){return jo(t[e])}))}function fn(t,e){for(var r=0,n=(e=sa(e,t)).length;null!=t&&re}function gn(t,e){return null!=t&&Tt.call(t,e)}function vn(t,e){return null!=t&&e in gt(t)}function mn(t,e,r){for(var a=r?pe:fe,i=t[0].length,o=t.length,s=o,l=n(o),c=1/0,u=[];s--;){var f=t[s];s&&e&&(f=he(f,Le(e))),c=or(f.length,c),l[s]=!r&&(e||i>=120&&f.length>=120)?new zr(s&&f):void 0}f=t[0];var p=-1,h=l[0];t:for(;++p=s)return l;var c=r[n];return l*("desc"==c?-1:1)}}return t.index-e.index}(t,e,r)}))}function In(t,e,r){for(var n=-1,a=e.length,i={};++n-1;)s!==t&&Zt.call(s,l,1),Zt.call(t,l,1);return t}function zn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var a=e[r];if(r==n||a!==i){var i=a;oi(a)?Zt.call(t,a,1):Qn(t,a)}}return t}function Rn(t,e){return t+Qe(cr()*(e-t+1))}function Fn(t,e){var r="";if(!t||e<1||e>9007199254740991)return r;do{e%2&&(r+=t),(e=Qe(e/2))&&(t+=t)}while(e);return r}function Bn(t,e){return bi(di(t,e,Ws),t+"")}function Nn(t){return Br(Cs(t))}function jn(t,e){var r=Cs(t);return ki(r,Xr(e,0,r.length))}function Vn(t,e,r,n){if(!qo(t))return t;for(var a=-1,i=(e=sa(e,t)).length,o=i-1,s=t;null!=s&&++ai?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=n(i);++a>>1,o=t[i];null!==o&&!Ko(o)&&(r?o<=e:o=200){var c=e?null:Fa(t);if(c)return qe(c);o=!1,a=Pe,l=new zr}else l=e?[]:s;t:for(;++n=n?t:Gn(t,e,r)}var ua=Ze||function(t){return Yt.clearTimeout(t)};function fa(t,e){if(e)return t.slice();var r=t.length,n=Ut?Ut(r):new t.constructor(r);return t.copy(n),n}function pa(t){var e=new t.constructor(t.byteLength);return new Rt(e).set(new Rt(t)),e}function ha(t,e){var r=e?pa(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function da(t,e){if(t!==e){var r=void 0!==t,n=null===t,a=t==t,i=Ko(t),o=void 0!==e,s=null===e,l=e==e,c=Ko(e);if(!s&&!c&&!i&&t>e||i&&o&&l&&!s&&!c||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!c&&t1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(a--,i):void 0,o&&si(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),e=gt(e);++n-1?a[i?e[o]:o]:void 0}}function Ea(t){return Ha((function(e){var r=e.length,n=r,a=Lr.prototype.thru;for(t&&e.reverse();n--;){var o=e[n];if("function"!=typeof o)throw new yt(i);if(a&&!s&&"wrapper"==Xa(o))var s=new Lr([],!0)}for(n=s?n:r;++n1&&x.reverse(),f&&cs))return!1;var c=i.get(t);if(c&&i.get(e))return c==e;var u=-1,f=!0,p=2&r?new zr:void 0;for(i.set(t,e),i.set(e,t);++u-1&&t%1==0&&t1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(K,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return se(s,(function(r){var n="_."+r[0];e&r[1]&&!fe(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match($);return e?e[1].split(Q):[]}(n),r)))}function wi(t){var e=0,r=0;return function(){var n=sr(),a=16-(n-r);if(r=n,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ki(t,e){var r=-1,n=t.length,a=n-1;for(e=void 0===e?n:e;++r1?t[e-1]:void 0;return r="function"==typeof r?(t.pop(),r):void 0,Yi(t,r)}));function to(t){var e=Er(t);return e.__chain__=!0,e}function eo(t,e){return e(t)}var ro=Ha((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,a=function(e){return Yr(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Or&&oi(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:eo,args:[a],thisArg:void 0}),new Lr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(a)}));var no=xa((function(t,e,r){Tt.call(t,r)?++t[r]:Wr(t,r,1)}));var ao=Ma(Oi),io=Ma(Pi);function oo(t,e){return(Io(t)?se:Qr)(t,Ja(e,3))}function so(t,e){return(Io(t)?le:tn)(t,Ja(e,3))}var lo=xa((function(t,e,r){Tt.call(t,r)?t[r].push(e):Wr(t,r,[e])}));var co=Bn((function(t,e,r){var a=-1,i="function"==typeof e,o=zo(t)?n(t.length):[];return Qr(t,(function(t){o[++a]=i?ie(e,t,r):yn(t,e,r)})),o})),uo=xa((function(t,e,r){Wr(t,r,e)}));function fo(t,e){return(Io(t)?he:En)(t,Ja(e,3))}var po=xa((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var ho=Bn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&si(t,e[0],e[1])?e=[]:r>2&&si(e[0],e[1],e[2])&&(e=[e[0]]),Pn(t,an(e,1),[])})),go=Je||function(){return Yt.Date.now()};function vo(t,e,r){return e=r?void 0:e,Na(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function mo(t,e){var r;if("function"!=typeof e)throw new yt(i);return t=ns(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}var yo=Bn((function(t,e,r){var n=1;if(r.length){var a=Ue(r,Za(yo));n|=32}return Na(t,n,e,r,a)})),xo=Bn((function(t,e,r){var n=3;if(r.length){var a=Ue(r,Za(xo));n|=32}return Na(e,n,t,r,a)}));function bo(t,e,r){var n,a,o,s,l,c,u=0,f=!1,p=!1,h=!0;if("function"!=typeof t)throw new yt(i);function d(e){var r=n,i=a;return n=a=void 0,u=e,s=t.apply(i,r)}function g(t){return u=t,l=xi(m,e),f?d(t):s}function v(t){var r=t-c;return void 0===c||r>=e||r<0||p&&t-u>=o}function m(){var t=go();if(v(t))return y(t);l=xi(m,function(t){var r=e-(t-c);return p?or(r,o-(t-u)):r}(t))}function y(t){return l=void 0,h&&n?d(t):(n=a=void 0,s)}function x(){var t=go(),r=v(t);if(n=arguments,a=this,c=t,r){if(void 0===l)return g(c);if(p)return ua(l),l=xi(m,e),d(c)}return void 0===l&&(l=xi(m,e)),s}return e=is(e)||0,qo(r)&&(f=!!r.leading,o=(p="maxWait"in r)?ir(is(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),x.cancel=function(){void 0!==l&&ua(l),u=0,n=c=a=l=void 0},x.flush=function(){return void 0===l?s:y(go())},x}var _o=Bn((function(t,e){return Kr(t,1,e)})),wo=Bn((function(t,e,r){return Kr(t,is(e)||0,r)}));function ko(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new yt(i);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(ko.Cache||Dr),r}function To(t){if("function"!=typeof t)throw new yt(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ko.Cache=Dr;var Ao=la((function(t,e){var r=(e=1==e.length&&Io(e[0])?he(e[0],Le(Ja())):he(an(e,1),Le(Ja()))).length;return Bn((function(n){for(var a=-1,i=or(n.length,r);++a=e})),Po=xn(function(){return arguments}())?xn:function(t){return Ho(t)&&Tt.call(t,"callee")&&!Xt.call(t,"callee")},Io=n.isArray,Do=Qt?Le(Qt):function(t){return Ho(t)&&hn(t)==k};function zo(t){return null!=t&&Uo(t.length)&&!jo(t)}function Ro(t){return Ho(t)&&zo(t)}var Fo=er||il,Bo=te?Le(te):function(t){return Ho(t)&&hn(t)==f};function No(t){if(!Ho(t))return!1;var e=hn(t);return e==p||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Yo(t)}function jo(t){if(!qo(t))return!1;var e=hn(t);return e==h||e==d||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Vo(t){return"number"==typeof t&&t==ns(t)}function Uo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function qo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ho(t){return null!=t&&"object"==typeof t}var Go=ee?Le(ee):function(t){return Ho(t)&&ri(t)==g};function Wo(t){return"number"==typeof t||Ho(t)&&hn(t)==v}function Yo(t){if(!Ho(t)||hn(t)!=m)return!1;var e=Gt(t);if(null===e)return!0;var r=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&kt.call(r)==St}var Xo=re?Le(re):function(t){return Ho(t)&&hn(t)==y};var Zo=ne?Le(ne):function(t){return Ho(t)&&ri(t)==x};function Jo(t){return"string"==typeof t||!Io(t)&&Ho(t)&&hn(t)==b}function Ko(t){return"symbol"==typeof t||Ho(t)&&hn(t)==_}var $o=ae?Le(ae):function(t){return Ho(t)&&Uo(t.length)&&!!jt[hn(t)]};var Qo=Da(Mn),ts=Da((function(t,e){return t<=e}));function es(t){if(!t)return[];if(zo(t))return Jo(t)?We(t):ma(t);if($t&&t[$t])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[$t]());var e=ri(t);return(e==g?je:e==x?qe:Cs)(t)}function rs(t){return t?(t=is(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ns(t){var e=rs(t),r=e%1;return e==e?r?e-r:e:0}function as(t){return t?Xr(ns(t),0,4294967295):0}function is(t){if("number"==typeof t)return t;if(Ko(t))return NaN;if(qo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=qo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(X,"");var r=it.test(t);return r||st.test(t)?Ht(t.slice(2),r?2:8):at.test(t)?NaN:+t}function os(t){return ya(t,_s(t))}function ss(t){return null==t?"":Kn(t)}var ls=ba((function(t,e){if(fi(e)||zo(e))ya(e,bs(e),t);else for(var r in e)Tt.call(e,r)&&Ur(t,r,e[r])})),cs=ba((function(t,e){ya(e,_s(e),t)})),us=ba((function(t,e,r,n){ya(e,_s(e),t,n)})),fs=ba((function(t,e,r,n){ya(e,bs(e),t,n)})),ps=Ha(Yr);var hs=Bn((function(t,e){t=gt(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&si(e[0],e[1],a)&&(n=1);++r1),e})),ya(t,Wa(t),r),n&&(r=Zr(r,7,Ua));for(var a=e.length;a--;)Qn(r,e[a]);return r}));var As=Ha((function(t,e){return null==t?{}:function(t,e){return In(t,e,(function(e,r){return vs(t,r)}))}(t,e)}));function Ms(t,e){if(null==t)return{};var r=he(Wa(t),(function(t){return[t]}));return e=Ja(e),In(t,r,(function(t,r){return e(t,r[0])}))}var Es=Ba(bs),Ss=Ba(_s);function Cs(t){return null==t?[]:Oe(t,bs(t))}var Ls=Ta((function(t,e,r){return e=e.toLowerCase(),t+(r?Os(e):e)}));function Os(t){return Ns(ss(t).toLowerCase())}function Ps(t){return(t=ss(t))&&t.replace(ct,Re).replace(It,"")}var Is=Ta((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Ds=Ta((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),zs=ka("toLowerCase");var Rs=Ta((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var Fs=Ta((function(t,e,r){return t+(r?" ":"")+Ns(e)}));var Bs=Ta((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Ns=ka("toUpperCase");function js(t,e,r){return t=ss(t),void 0===(e=r?void 0:e)?function(t){return Ft.test(t)}(t)?function(t){return t.match(zt)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Vs=Bn((function(t,e){try{return ie(t,void 0,e)}catch(t){return No(t)?t:new pt(t)}})),Us=Ha((function(t,e){return se(e,(function(e){e=Ai(e),Wr(t,e,yo(t[e],t))})),t}));function qs(t){return function(){return t}}var Hs=Ea(),Gs=Ea(!0);function Ws(t){return t}function Ys(t){return kn("function"==typeof t?t:Zr(t,1))}var Xs=Bn((function(t,e){return function(r){return yn(r,t,e)}})),Zs=Bn((function(t,e){return function(r){return yn(t,r,e)}}));function Js(t,e,r){var n=bs(e),a=un(e,n);null!=r||qo(e)&&(a.length||!n.length)||(r=e,e=t,t=this,a=un(e,bs(e)));var i=!(qo(r)&&"chain"in r&&!r.chain),o=jo(t);return se(a,(function(r){var n=e[r];t[r]=n,o&&(t.prototype[r]=function(){var e=this.__chain__;if(i||e){var r=t(this.__wrapped__),a=r.__actions__=ma(this.__actions__);return a.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,de([this.value()],arguments))})})),t}function Ks(){}var $s=Oa(he),Qs=Oa(ce),tl=Oa(me);function el(t){return li(t)?Ae(Ai(t)):function(t){return function(e){return fn(e,t)}}(t)}var rl=Ia(),nl=Ia(!0);function al(){return[]}function il(){return!1}var ol=La((function(t,e){return t+e}),0),sl=Ra("ceil"),ll=La((function(t,e){return t/e}),1),cl=Ra("floor");var ul,fl=La((function(t,e){return t*e}),1),pl=Ra("round"),hl=La((function(t,e){return t-e}),0);return Er.after=function(t,e){if("function"!=typeof e)throw new yt(i);return t=ns(t),function(){if(--t<1)return e.apply(this,arguments)}},Er.ary=vo,Er.assign=ls,Er.assignIn=cs,Er.assignInWith=us,Er.assignWith=fs,Er.at=ps,Er.before=mo,Er.bind=yo,Er.bindAll=Us,Er.bindKey=xo,Er.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Io(t)?t:[t]},Er.chain=to,Er.chunk=function(t,e,r){e=(r?si(t,e,r):void 0===e)?1:ir(ns(e),0);var a=null==t?0:t.length;if(!a||e<1)return[];for(var i=0,o=0,s=n($e(a/e));ia?0:a+r),(n=void 0===n||n>a?a:ns(n))<0&&(n+=a),n=r>n?0:as(n);r>>0)?(t=ss(t))&&("string"==typeof e||null!=e&&!Xo(e))&&!(e=Kn(e))&&Ne(t)?ca(We(t),0,r):t.split(e,r):[]},Er.spread=function(t,e){if("function"!=typeof t)throw new yt(i);return e=null==e?0:ir(ns(e),0),Bn((function(r){var n=r[e],a=ca(r,0,e);return n&&de(a,n),ie(t,this,a)}))},Er.tail=function(t){var e=null==t?0:t.length;return e?Gn(t,1,e):[]},Er.take=function(t,e,r){return t&&t.length?Gn(t,0,(e=r||void 0===e?1:ns(e))<0?0:e):[]},Er.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?Gn(t,(e=n-(e=r||void 0===e?1:ns(e)))<0?0:e,n):[]},Er.takeRightWhile=function(t,e){return t&&t.length?ea(t,Ja(e,3),!1,!0):[]},Er.takeWhile=function(t,e){return t&&t.length?ea(t,Ja(e,3)):[]},Er.tap=function(t,e){return e(t),t},Er.throttle=function(t,e,r){var n=!0,a=!0;if("function"!=typeof t)throw new yt(i);return qo(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),bo(t,e,{leading:n,maxWait:e,trailing:a})},Er.thru=eo,Er.toArray=es,Er.toPairs=Es,Er.toPairsIn=Ss,Er.toPath=function(t){return Io(t)?he(t,Ai):Ko(t)?[t]:ma(Ti(ss(t)))},Er.toPlainObject=os,Er.transform=function(t,e,r){var n=Io(t),a=n||Fo(t)||$o(t);if(e=Ja(e,4),null==r){var i=t&&t.constructor;r=a?n?new i:[]:qo(t)&&jo(i)?Sr(Gt(t)):{}}return(a?se:ln)(t,(function(t,n,a){return e(r,t,n,a)})),r},Er.unary=function(t){return vo(t,1)},Er.union=qi,Er.unionBy=Hi,Er.unionWith=Gi,Er.uniq=function(t){return t&&t.length?$n(t):[]},Er.uniqBy=function(t,e){return t&&t.length?$n(t,Ja(e,2)):[]},Er.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?$n(t,void 0,e):[]},Er.unset=function(t,e){return null==t||Qn(t,e)},Er.unzip=Wi,Er.unzipWith=Yi,Er.update=function(t,e,r){return null==t?t:ta(t,e,oa(r))},Er.updateWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:ta(t,e,oa(r),n)},Er.values=Cs,Er.valuesIn=function(t){return null==t?[]:Oe(t,_s(t))},Er.without=Xi,Er.words=js,Er.wrap=function(t,e){return Mo(oa(e),t)},Er.xor=Zi,Er.xorBy=Ji,Er.xorWith=Ki,Er.zip=$i,Er.zipObject=function(t,e){return aa(t||[],e||[],Ur)},Er.zipObjectDeep=function(t,e){return aa(t||[],e||[],Vn)},Er.zipWith=Qi,Er.entries=Es,Er.entriesIn=Ss,Er.extend=cs,Er.extendWith=us,Js(Er,Er),Er.add=ol,Er.attempt=Vs,Er.camelCase=Ls,Er.capitalize=Os,Er.ceil=sl,Er.clamp=function(t,e,r){return void 0===r&&(r=e,e=void 0),void 0!==r&&(r=(r=is(r))==r?r:0),void 0!==e&&(e=(e=is(e))==e?e:0),Xr(is(t),e,r)},Er.clone=function(t){return Zr(t,4)},Er.cloneDeep=function(t){return Zr(t,5)},Er.cloneDeepWith=function(t,e){return Zr(t,5,e="function"==typeof e?e:void 0)},Er.cloneWith=function(t,e){return Zr(t,4,e="function"==typeof e?e:void 0)},Er.conformsTo=function(t,e){return null==e||Jr(t,e,bs(e))},Er.deburr=Ps,Er.defaultTo=function(t,e){return null==t||t!=t?e:t},Er.divide=ll,Er.endsWith=function(t,e,r){t=ss(t),e=Kn(e);var n=t.length,a=r=void 0===r?n:Xr(ns(r),0,n);return(r-=e.length)>=0&&t.slice(r,a)==e},Er.eq=Co,Er.escape=function(t){return(t=ss(t))&&N.test(t)?t.replace(F,Fe):t},Er.escapeRegExp=function(t){return(t=ss(t))&&Y.test(t)?t.replace(W,"\\$&"):t},Er.every=function(t,e,r){var n=Io(t)?ce:en;return r&&si(t,e,r)&&(e=void 0),n(t,Ja(e,3))},Er.find=ao,Er.findIndex=Oi,Er.findKey=function(t,e){return xe(t,Ja(e,3),ln)},Er.findLast=io,Er.findLastIndex=Pi,Er.findLastKey=function(t,e){return xe(t,Ja(e,3),cn)},Er.floor=cl,Er.forEach=oo,Er.forEachRight=so,Er.forIn=function(t,e){return null==t?t:on(t,Ja(e,3),_s)},Er.forInRight=function(t,e){return null==t?t:sn(t,Ja(e,3),_s)},Er.forOwn=function(t,e){return t&&ln(t,Ja(e,3))},Er.forOwnRight=function(t,e){return t&&cn(t,Ja(e,3))},Er.get=gs,Er.gt=Lo,Er.gte=Oo,Er.has=function(t,e){return null!=t&&ni(t,e,gn)},Er.hasIn=vs,Er.head=Di,Er.identity=Ws,Er.includes=function(t,e,r,n){t=zo(t)?t:Cs(t),r=r&&!n?ns(r):0;var a=t.length;return r<0&&(r=ir(a+r,0)),Jo(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&_e(t,e,r)>-1},Er.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var a=null==r?0:ns(r);return a<0&&(a=ir(n+a,0)),_e(t,e,a)},Er.inRange=function(t,e,r){return e=rs(e),void 0===r?(r=e,e=0):r=rs(r),function(t,e,r){return t>=or(e,r)&&t=-9007199254740991&&t<=9007199254740991},Er.isSet=Zo,Er.isString=Jo,Er.isSymbol=Ko,Er.isTypedArray=$o,Er.isUndefined=function(t){return void 0===t},Er.isWeakMap=function(t){return Ho(t)&&ri(t)==w},Er.isWeakSet=function(t){return Ho(t)&&"[object WeakSet]"==hn(t)},Er.join=function(t,e){return null==t?"":nr.call(t,e)},Er.kebabCase=Is,Er.last=Bi,Er.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var a=n;return void 0!==r&&(a=(a=ns(r))<0?ir(n+a,0):or(a,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,a):be(t,ke,a,!0)},Er.lowerCase=Ds,Er.lowerFirst=zs,Er.lt=Qo,Er.lte=ts,Er.max=function(t){return t&&t.length?rn(t,Ws,dn):void 0},Er.maxBy=function(t,e){return t&&t.length?rn(t,Ja(e,2),dn):void 0},Er.mean=function(t){return Te(t,Ws)},Er.meanBy=function(t,e){return Te(t,Ja(e,2))},Er.min=function(t){return t&&t.length?rn(t,Ws,Mn):void 0},Er.minBy=function(t,e){return t&&t.length?rn(t,Ja(e,2),Mn):void 0},Er.stubArray=al,Er.stubFalse=il,Er.stubObject=function(){return{}},Er.stubString=function(){return""},Er.stubTrue=function(){return!0},Er.multiply=fl,Er.nth=function(t,e){return t&&t.length?On(t,ns(e)):void 0},Er.noConflict=function(){return Yt._===this&&(Yt._=Ct),this},Er.noop=Ks,Er.now=go,Er.pad=function(t,e,r){t=ss(t);var n=(e=ns(e))?Ge(t):0;if(!e||n>=e)return t;var a=(e-n)/2;return Pa(Qe(a),r)+t+Pa($e(a),r)},Er.padEnd=function(t,e,r){t=ss(t);var n=(e=ns(e))?Ge(t):0;return e&&ne){var n=t;t=e,e=n}if(r||t%1||e%1){var a=cr();return or(t+a*(e-t+qt("1e-"+((a+"").length-1))),e)}return Rn(t,e)},Er.reduce=function(t,e,r){var n=Io(t)?ge:Ee,a=arguments.length<3;return n(t,Ja(e,4),r,a,Qr)},Er.reduceRight=function(t,e,r){var n=Io(t)?ve:Ee,a=arguments.length<3;return n(t,Ja(e,4),r,a,tn)},Er.repeat=function(t,e,r){return e=(r?si(t,e,r):void 0===e)?1:ns(e),Fn(ss(t),e)},Er.replace=function(){var t=arguments,e=ss(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Er.result=function(t,e,r){var n=-1,a=(e=sa(e,t)).length;for(a||(a=1,t=void 0);++n9007199254740991)return[];var r=4294967295,n=or(t,4294967295);t-=4294967295;for(var a=Ce(n,e=Ja(e));++r=i)return t;var s=r-Ge(n);if(s<1)return n;var l=o?ca(o,0,s).join(""):t.slice(0,s);if(void 0===a)return l+n;if(o&&(s+=l.length-s),Xo(a)){if(t.slice(s).search(a)){var c,u=l;for(a.global||(a=vt(a.source,ss(nt.exec(a))+"g")),a.lastIndex=0;c=a.exec(u);)var f=c.index;l=l.slice(0,void 0===f?s:f)}}else if(t.indexOf(Kn(a),s)!=s){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+n},Er.unescape=function(t){return(t=ss(t))&&B.test(t)?t.replace(R,Ye):t},Er.uniqueId=function(t){var e=++At;return ss(t)+e},Er.upperCase=Bs,Er.upperFirst=Ns,Er.each=oo,Er.eachRight=so,Er.first=Di,Js(Er,(ul={},ln(Er,(function(t,e){Tt.call(Er.prototype,e)||(ul[e]=t)})),ul),{chain:!1}),Er.VERSION="4.17.15",se(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Er[t].placeholder=Er})),se(["drop","take"],(function(t,e){Or.prototype[t]=function(r){r=void 0===r?1:ir(ns(r),0);var n=this.__filtered__&&!e?new Or(this):this.clone();return n.__filtered__?n.__takeCount__=or(r,n.__takeCount__):n.__views__.push({size:or(r,4294967295),type:t+(n.__dir__<0?"Right":"")}),n},Or.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),se(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Or.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ja(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),se(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Or.prototype[t]=function(){return this[r](1).value()[0]}})),se(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Or.prototype[t]=function(){return this.__filtered__?new Or(this):this[r](1)}})),Or.prototype.compact=function(){return this.filter(Ws)},Or.prototype.find=function(t){return this.filter(t).head()},Or.prototype.findLast=function(t){return this.reverse().find(t)},Or.prototype.invokeMap=Bn((function(t,e){return"function"==typeof t?new Or(this):this.map((function(r){return yn(r,t,e)}))})),Or.prototype.reject=function(t){return this.filter(To(Ja(t)))},Or.prototype.slice=function(t,e){t=ns(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Or(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),void 0!==e&&(r=(e=ns(e))<0?r.dropRight(-e):r.take(e-t)),r)},Or.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Or.prototype.toArray=function(){return this.take(4294967295)},ln(Or.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),a=Er[n?"take"+("last"==e?"Right":""):e],i=n||/^find/.test(e);a&&(Er.prototype[e]=function(){var e=this.__wrapped__,o=n?[1]:arguments,s=e instanceof Or,l=o[0],c=s||Io(e),u=function(t){var e=a.apply(Er,de([t],o));return n&&f?e[0]:e};c&&r&&"function"==typeof l&&1!=l.length&&(s=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=i&&!f,d=s&&!p;if(!i&&c){e=d?e:new Or(this);var g=t.apply(e,o);return g.__actions__.push({func:eo,args:[u],thisArg:void 0}),new Lr(g,f)}return h&&d?t.apply(this,o):(g=this.thru(u),h?n?g.value()[0]:g.value():g)})})),se(["pop","push","shift","sort","splice","unshift"],(function(t){var e=xt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Er.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var a=this.value();return e.apply(Io(a)?a:[],t)}return this[r]((function(r){return e.apply(Io(r)?r:[],t)}))}})),ln(Or.prototype,(function(t,e){var r=Er[e];if(r){var n=r.name+"";Tt.call(yr,n)||(yr[n]=[]),yr[n].push({name:e,func:r})}})),yr[Sa(void 0,2).name]=[{name:"wrapper",func:void 0}],Or.prototype.clone=function(){var t=new Or(this.__wrapped__);return t.__actions__=ma(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ma(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ma(this.__views__),t},Or.prototype.reverse=function(){if(this.__filtered__){var t=new Or(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Or.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Io(t),n=e<0,a=r?t.length:0,i=function(t,e,r){var n=-1,a=r.length;for(;++n=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Er.prototype.plant=function(t){for(var e,r=this;r instanceof Cr;){var n=Ei(r);n.__index__=0,n.__values__=void 0,e?a.__wrapped__=n:e=n;var a=n;r=r.__wrapped__}return a.__wrapped__=t,e},Er.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Or){var e=t;return this.__actions__.length&&(e=new Or(this)),(e=e.reverse()).__actions__.push({func:eo,args:[Ui],thisArg:void 0}),new Lr(e,this.__chain__)}return this.thru(Ui)},Er.prototype.toJSON=Er.prototype.valueOf=Er.prototype.value=function(){return ra(this.__wrapped__,this.__actions__)},Er.prototype.first=Er.prototype.head,$t&&(Er.prototype[$t]=function(){return this}),Er}();Yt._=Xe,void 0===(a=function(){return Xe}.call(e,r,e,n))||(n.exports=a)}).call(this)}).call(this,r(56),r(74)(t))},74:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},77:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=r(128),i={};e.default=i,i.read=function(t,e){var r,n=(r=this,function(t,n,a){return i._onRetrieval(t,a,e,r)});return void 0===e?new Promise((function(r,i){e=function(t,e){t?i(t):r(e)},a(t,n)})):a(t,n)},i._onRetrieval=function(t,e,r,n){var a=void 0;return void 0!==t&&(a=n.parse(e)),r.call(n,t,a)},i.extend=function(t,e){return extend(i,t,e)},i.mixin=function(t){return"object"!==(void 0===t?"undefined":n(t))&&(t=t.prototype),["read"].forEach((function(e){t[e]=i[e]}),this),t}},85:function(t,e){var r,n,a=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var l,c=[],u=!1,f=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):f=-1,c.length&&h())}function h(){if(!u){var t=s(p);u=!0;for(var e=c.length;e;){for(l=c,c=[];++f1)for(var r=1;r0))return o;do{o.push(a=new Date(+t)),n(t,i),e(t)}while(a=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!r(t););else for(;--e>=0;)for(;n(t,1),!r(t););}))},a&&(c.count=function(t,n){return r.setTime(+t),i.setTime(+n),e(r),e(i),Math.floor(a(r,i))},c.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?c.filter(o?function(e){return o(e)%t==0}:function(e){return c.count(0,e)%t==0}):c:null}),c};var r=new Date,i=new Date},function(t,e,n){var r=n(128),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){"use strict";var r=n(99);n.d(e,"a",(function(){return r.a})),n(171),n(102),n(169),n(172);var i=n(69);n.d(e,"c",(function(){return i.a})),n(173);var a=n(357);n.d(e,"f",(function(){return a.a}));var o=n(174);n.d(e,"g",(function(){return o.a}));var c=n(358);n.d(e,"h",(function(){return c.a})),n.d(e,"i",(function(){return c.b}));var u=n(361);n.d(e,"j",(function(){return u.a}));var f=n(168);n.d(e,"d",(function(){return f.a})),n.d(e,"e",(function(){return f.b})),n(362),n(363),n(364);var s=n(365);n.d(e,"b",(function(){return s.a})),n(366)},function(t,e,n){"use strict";var r=n(100);n.d(e,"a",(function(){return r.e})),n.d(e,"f",(function(){return r.g})),n.d(e,"d",(function(){return r.f}));var i=n(355);n.d(e,"e",(function(){return i.a})),n.d(e,"c",(function(){return i.b}));var a=n(356);n.d(e,"b",(function(){return a.a}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(197);n.d(e,"bisect",(function(){return r.c})),n.d(e,"bisectRight",(function(){return r.b})),n.d(e,"bisectLeft",(function(){return r.a}));var i=n(36);n.d(e,"ascending",(function(){return i.a}));var a=n(198);n.d(e,"bisector",(function(){return a.a}));var o=n(452);n.d(e,"cross",(function(){return o.a}));var c=n(453);n.d(e,"descending",(function(){return c.a}));var u=n(200);n.d(e,"deviation",(function(){return u.a}));var f=n(202);n.d(e,"extent",(function(){return f.a}));var s=n(454);n.d(e,"histogram",(function(){return s.a}));var l=n(457);n.d(e,"thresholdFreedmanDiaconis",(function(){return l.a}));var d=n(458);n.d(e,"thresholdScott",(function(){return d.a}));var h=n(206);n.d(e,"thresholdSturges",(function(){return h.a}));var b=n(459);n.d(e,"max",(function(){return b.a}));var p=n(460);n.d(e,"mean",(function(){return p.a}));var v=n(461);n.d(e,"median",(function(){return v.a}));var y=n(462);n.d(e,"merge",(function(){return y.a}));var _=n(207);n.d(e,"min",(function(){return _.a}));var g=n(199);n.d(e,"pairs",(function(){return g.a}));var m=n(463);n.d(e,"permute",(function(){return m.a}));var x=n(112);n.d(e,"quantile",(function(){return x.a}));var w=n(204);n.d(e,"range",(function(){return w.a}));var j=n(464);n.d(e,"scan",(function(){return j.a}));var O=n(465);n.d(e,"shuffle",(function(){return O.a}));var M=n(466);n.d(e,"sum",(function(){return M.a}));var k=n(205);n.d(e,"ticks",(function(){return k.a})),n.d(e,"tickIncrement",(function(){return k.b})),n.d(e,"tickStep",(function(){return k.c}));var A=n(208);n.d(e,"transpose",(function(){return A.a}));var T=n(201);n.d(e,"variance",(function(){return T.a}));var S=n(467);n.d(e,"zip",(function(){return S.a}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return C})),e.a=I;var r=n(315),i=n(316),a=n(317),o=n(318),c=n(162),u=n(320),f=n(321),s=n(322),l=n(323),d=n(324),h=n(325),b=n(326),p=n(327),v=n(328),y=n(329),_=n(330),g=n(164),m=n(331),x=n(332),w=n(333),j=n(334),O=n(335),M=n(336),k=n(337),A=n(338),T=n(339),S=n(340),P=n(341),R=n(97),E=n(342),C=[null];function I(t,e){this._groups=t,this._parents=e}function N(){return new I([[document.documentElement]],C)}I.prototype=N.prototype={constructor:I,select:r.a,selectAll:i.a,filter:a.a,data:o.a,enter:c.b,exit:u.a,merge:f.a,order:s.a,sort:l.a,call:d.a,nodes:h.a,node:b.a,size:p.a,empty:v.a,each:y.a,attr:_.a,style:g.a,property:m.a,classed:x.a,text:w.a,html:j.a,raise:O.a,lower:M.a,append:k.a,insert:A.a,remove:T.a,clone:S.a,datum:P.a,on:R.b,dispatch:E.a},e.b=N},function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return s})),e.g=function(t,e){var n=l(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n},e.h=function(t,e){var n=l(t,e);if(n.state>u)throw new Error("too late; already started");return n},e.f=l;var r=n(68),i=n(177),a=Object(r.dispatch)("start","end","interrupt"),o=[],c=1,u=2,f=5,s=6;function l(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}e.e=function(t,e,n,r,l,d){var h=t.__transition;if(h){if(n in h)return}else t.__transition={};!function(t,e,n){var r,a=t.__transition;function o(f){var h,b,p,v;if(n.state!==c)return d();for(h in a)if((v=a[h]).name===n.name){if(3===v.state)return Object(i.b)(o);4===v.state?(v.state=s,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete a[h]):+h0&&(0,l.renderAxes)(o,this.conf,t,this.scale);var u=this.renderDatum(o,this.conf,t._layout);return this.conf.tooltipContent&&(0,i.registerTooltip)(this,t,u,this.conf),u.on("mouseover",(function(e,n){r.dispatch.call("mouseover",r,e),r.conf.tooltipContent&&t.clipboard.attr("value",r.conf.tooltipContent(e))})),u.on("mouseout",(function(t,e){r.dispatch.call("mouseout",r,t)})),Object.keys(this.conf.events).forEach((function(t){var e=r.conf;u.on(t,(function(n,r,i){e.events[t](n,r,i,c.event)}))})),this}},{key:"renderBlock",value:function(t,e,n,r){var i=this,a=t.selectAll(".block").data(e).enter().append("g").attr("class","block").attr("transform",(function(t){return"rotate("+360*n.blocks[t.key].start/(2*Math.PI)+")"}));return r.backgrounds&&a.selectAll(".background").data((function(t){return r.backgrounds.map((function(e){return{start:e.start||r.cmin,end:e.end||r.cmax,angle:n.blocks[t.key].end-n.blocks[t.key].start,color:e.color,opacity:e.opacity}}))})).enter().append("path").attr("class","background").attr("fill",(function(t){return t.color})).attr("opacity",(function(t){return t.opacity||1})).attr("d",(0,o.arc)().innerRadius((function(t){return"in"===r.direction?r.outerRadius-i.scale(t.start):r.innerRadius+i.scale(t.start)})).outerRadius((function(t){return"in"===r.direction?r.outerRadius-i.scale(t.end):r.innerRadius+i.scale(t.end)})).startAngle(0).endAngle((function(t){return t.angle}))),a}},{key:"theta",value:function(t,e){return t/e.len*(e.end-e.start)}},{key:"x",value:function(t,e,n){var r=this.scale(t.value),i="in"===n.direction?n.outerRadius-r:n.innerRadius+r,a=this.theta(t.position,e.blocks[t.block_id])-Math.PI/2;return i*Math.cos(a)}},{key:"y",value:function(t,e,n){var r=this.scale(t.value),i="in"===n.direction?n.outerRadius-r:n.innerRadius+r,a=this.theta(t.position,e.blocks[t.block_id])-Math.PI/2;return i*Math.sin(a)}}]),t}();e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSpanValueData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})))},e.parseSpanStringData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})).filter((function(t,e){return l({start:t.start,end:t.end},e)})).filter((function(t){return!(t.start<0||t.end>e[t.block_id])||(f.log(2,"position","position inconsistency",{datum:t,layoutSummary:e}),!1)})))},e.parsePositionValueData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})).filter((function(t,e){return l({position:t.position,value:t.value},e)})))},e.parsePositionTextData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})).filter((function(t,e){return l({position:t.position},e)})))},e.parseChordData=function(t,e){if(0===t.length)return{data:[],meta:{min:null,max:null}};var n=t.filter((function(t,n){return t.source?s(t.source.id,n,e,"sourceId"):(f.warn("No source for data at index "+n),!1)})).filter((function(t,n){return t.target?s(t.target.id,n,e,"targetId"):(f.warn("No target for data at index "+n),!1)})).filter((function(t,e){return l({sourceStart:t.source.start,sourceEnd:t.source.end,targetStart:t.target.start,targetEnd:t.target.end,value:t.value||1},e)}));return{data:n,meta:{min:(0,c.min)(n,(function(t){return t.value})),max:(0,c.max)(n,(function(t){return t.value}))}}};var r=u(n(18)),i=u(n(613)),a=u(n(617)),o=(u(n(144)),n(227)),c=n(10);function u(t){return t&&t.__esModule?t:{default:t}}var f=console;function s(t,e,n,a){return!!(0,i.default)((0,r.default)(n),t)||(f.log(1,"datum","unknown parent id",{line:e+1,value:t,header:a,layoutSummary:n}),!1)}function l(t,e){return(0,a.default)(t,(function(t,n){return!isNaN(t)||(f.log(1,"datum","not a number",{line:e+1,value:t,header:n}),!1)}))}function d(t){return{data:(0,o.nest)().key((function(t){return t.block_id})).entries(t),meta:{min:(0,c.min)(t,(function(t){return t.value})),max:(0,c.max)(t,(function(t){return t.value}))}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={min:{value:null,iteratee:!1},max:{value:null,iteratee:!1},logScale:{value:!1,iteratee:!1},logScaleBase:{value:Math.E,iteratee:!1}};e.axes={axes:{value:[],iteratee:!1},showAxesTooltip:{value:!0,iteratee:!1}},e.palette={colorPaletteSize:{value:9,iteratee:!1},colorPalette:{value:"YlGnBu",iteratee:!1},usePalette:{value:!0,iteratee:!1},colorPaletteReverse:{value:!0,iteratee:!1}},e.radial={innerRadius:{value:0,iteratee:!1},outerRadius:{value:0,iteratee:!1}},e.values=r,e.common={zIndex:{value:!1,iteratee:!1},opacity:{value:1,iteratee:!0},tooltipContent:{value:null,iteratee:!1},events:{value:{},iteratee:!1}}},function(t,e,n){var r=n(243),i=n(248);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(16),i=n(7);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e){t.exports={}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var r=Array.prototype,i=r.map,a=r.slice},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(5).Symbol;t.exports=r},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++ne?1:t>=e?0:NaN}},function(t,e,n){var r=n(476),i=n(478);t.exports=function(t,e,n){return r(i,t,e,n)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(283),i=n(285)(r);t.exports=i},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n180||n<-180?n-360*Math.round(n/360):n):Object(r.a)(isNaN(t)?e:t)},e.b=function(t){return 1==(t=+t)?a:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Object(r.a)(isNaN(e)?n:e)}},e.a=a;var r=n(170);function i(t,e){return function(n){return t+n*e}}function a(t,e){var n=e-t;return n?i(t,n):Object(r.a)(isNaN(t)?e:t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"h",(function(){return o})),n.d(e,"i",(function(){return c})),n.d(e,"k",(function(){return u})),n.d(e,"l",(function(){return f})),n.d(e,"f",(function(){return s})),n.d(e,"j",(function(){return l})),n.d(e,"g",(function(){return d})),n.d(e,"m",(function(){return h})),e.b=function(t){return t>1?0:t<-1?l:Math.acos(t)},e.c=function(t){return t>=1?d:t<=-1?-d:Math.asin(t)};var r=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,c=Math.min,u=Math.sin,f=Math.sqrt,s=1e-12,l=Math.PI,d=l/2,h=2*l},function(t,e,n){"use strict";e.a=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],c=o.length;a=0;)n[e]=e;return n}},function(t,e,n){"use strict";e.a=function(t){return null===t?NaN:+t}},function(t,e,n){"use strict";e.b=c,e.a=function t(){var e=Object(a.b)(a.c,i.c);return e.copy=function(){return Object(a.a)(e,t())},c(e)};var r=n(10),i=n(8),a=n(76),o=n(527);function c(t){var e=t.domain;return t.ticks=function(t){var n=e();return Object(r.ticks)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){return Object(o.a)(e(),t,n)},t.nice=function(n){null==n&&(n=10);var i,a=e(),o=0,c=a.length-1,u=a[o],f=a[c];return f0?(u=Math.floor(u/i)*i,f=Math.ceil(f/i)*i,i=Object(r.tickIncrement)(u,f,n)):i<0&&(u=Math.ceil(u*i)/i,f=Math.floor(f*i)/i,i=Object(r.tickIncrement)(u,f,n)),i>0?(a[o]=Math.floor(u/i)*i,a[c]=Math.ceil(f/i)*i,e(a)):i<0&&(a[o]=Math.ceil(u*i)/i,a[c]=Math.floor(f*i)/i,e(a)),t},t}},function(t,e,n){"use strict";e.a=function(t){return t.match(/.{6}/g).map((function(t){return"#"+t}))}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(52),i=n(255),a=n(256),o=n(257),c=n(258),u=n(259);function f(t){var e=this.__data__=new r(t);this.size=e.size}f.prototype.clear=i,f.prototype.delete=a,f.prototype.get=o,f.prototype.has=c,f.prototype.set=u,t.exports=f},function(t,e,n){var r=n(250),i=n(251),a=n(252),o=n(253),c=n(254);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t2?l:s,r=o=null,y}function y(e){return(r||(r=n(d,h,p?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}(t):t,b)))(+e)}return y.invert=function(t){return(o||(o=n(h,d,f,p?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}(e):e)))(+t)},y.domain=function(t){return arguments.length?(d=a.a.call(t,c.a),v()):d.slice()},y.range=function(t){return arguments.length?(h=a.b.call(t),v()):h.slice()},y.rangeRound=function(t){return h=a.b.call(t),b=i.f,v()},y.clamp=function(t){return arguments.length?(p=!!t,v()):p},y.interpolate=function(t){return arguments.length?(b=t,v()):b},v()};var r=n(10),i=n(8),a=n(27),o=n(121),c=n(228),u=[0,1];function f(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Object(o.a)(e)}function s(t,e,n,r){var i=t[0],a=t[1],o=e[0],c=e[1];return a-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(277),i=n(60),a=n(89),o=a&&a.isTypedArray,c=o?i(o):r;t.exports=c},function(t,e,n){(function(t){var r=n(128),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,c=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=c}).call(e,n(84)(t))},function(t,e,n){var r=n(83),i=n(38),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(149),i=n(150),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,c=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=c},function(t,e,n){var r=n(2),i=n(34),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},function(t,e,n){"use strict";var r=n(94);e.a=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.a.hasOwnProperty(e)?{space:r.a[e],local:t}:t}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r}));var r="http://www.w3.org/1999/xhtml";e.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,e,n){"use strict";function r(){}e.a=function(t){return null==t?r:function(){return this.querySelector(t)}}},function(t,e,n){"use strict";e.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),e.a=function(t,e,n,r){var a=i;t.sourceEvent=i,i=t;try{return e.apply(n,r)}finally{i=a}};var r={},i=null;function a(t,e,n){return t=o(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function o(t,e,n){return function(r){var a=i;i=r;try{t.call(this,this.__data__,e,n)}finally{i=a}}}function c(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function u(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=d.exec(t))?new O(e[1],e[2],e[3],1):(e=h.exec(t))?new O(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=b.exec(t))?x(e[1],e[2],e[3],e[4]):(e=p.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=v.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=y.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):_.hasOwnProperty(t)?m(_[t]):"transparent"===t?new O(NaN,NaN,NaN,0):null}function m(t){return new O(t>>16&255,t>>8&255,255&t,1)}function x(t,e,n,r){return r<=0&&(t=e=n=NaN),new O(t,e,n,r)}function w(t){return t instanceof i||(t=g(t)),t?new O((t=t.rgb()).r,t.g,t.b,t.opacity):new O}function j(t,e,n,r){return 1===arguments.length?w(t):new O(t,e,n,null==r?1:r)}function O(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function M(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new T(t,e,n,r)}function k(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=g(t)),!t)return new T;if(t instanceof T)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),o=Math.max(e,n,r),c=NaN,u=o-a,f=(o+a)/2;return u?(c=e===o?(n-r)/u+6*(n0&&f<1?0:c,new T(c,u,f,t.opacity)}function A(t,e,n,r){return 1===arguments.length?k(t):new T(t,e,n,null==r?1:r)}function T(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function S(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Object(r.a)(i,g,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Object(r.a)(O,j,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new O(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?a:Math.pow(a,t),new O(this.r*t,this.g*t,this.b*t,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},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}})),Object(r.a)(T,A,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?a:Math.pow(a,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new O(S(t>=240?t-240:t+120,i,r),S(t,i,r),S(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))},function(t,e,n){"use strict";e.b=function(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n},e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";function r(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}e.a=r,e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],c=i>0?t[i-1]:2*a-o,u=i=0&&e._call.call(null,t),e=e._next;--a}()}finally{a=0,function(){for(var t,e,n=r,a=1/0;n;)n._call?(a>n._time&&(a=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,g(a)}(),f=0}}function _(){var t=l.now(),e=t-u;e>1e3&&(s-=e,u=t)}function g(t){a||(o&&(o=clearTimeout(o)),t-f>24?(t<1/0&&(o=setTimeout(y,t-l.now()-s)),c&&(c=clearInterval(c))):(c||(u=l.now(),c=setInterval(_,1e3)),a=1,d(y)))}p.prototype=v.prototype={constructor:p,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?h():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,g()},stop:function(){this._call&&(this._call=null,this._time=1/0,g())}}},function(t,e,n){var r=n(51),i=n(64),a=n(90),o=n(181),c=n(404),u=n(134),f=n(30),s=n(405),l=n(406),d=n(147),h=n(407),b=n(41),p=n(408),v=n(409),y=n(137),_=n(2),g=n(59),m=n(413),x=n(7),w=n(415),j=n(18),O={};O["[object Arguments]"]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O["[object Object]"]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O["[object Function]"]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,M,k,A,T){var S,P=1&n,R=2&n,E=4&n;if(M&&(S=A?M(e,k,A,T):M(e)),void 0!==S)return S;if(!x(e))return e;var C=_(e);if(C){if(S=p(e),!P)return f(e,S)}else{var I=b(e),N="[object Function]"==I||"[object GeneratorFunction]"==I;if(g(e))return u(e,P);if("[object Object]"==I||"[object Arguments]"==I||N&&!A){if(S=R||N?{}:y(e),!P)return R?l(e,c(S,e)):s(e,o(S,e))}else{if(!O[I])return A?e:{};S=v(e,I,P)}}T||(T=new r);var D=T.get(e);if(D)return D;if(T.set(e,S),w(e))return e.forEach((function(r){S.add(t(r,n,M,r,e,T))})),S;if(m(e))return e.forEach((function(r,i){S.set(i,t(r,n,M,i,e,T))})),S;var z=E?R?h:d:R?keysIn:j,B=C?void 0:z(e);return i(B||e,(function(r,i){B&&(r=e[i=r]),a(S,i,t(r,n,M,i,e,T))})),S}},function(t,e,n){var r=n(417),i=n(39),a=n(33),o=n(418),c=n(2);t.exports=function(t,e,n){var u=c(t)?r:o,f=arguments.length<3;return u(t,a(e,4),n,f,i)}},function(t,e,n){var r=n(107),i=n(422),a=n(78),o=n(63),c=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=c},function(t,e,n){var r=n(65),i=n(421);t.exports=function t(e,n,a,o,c){var u=-1,f=e.length;for(a||(a=i),c||(c=[]);++u0&&a(s)?n>1?t(s,n-1,a,o,c):r(c,s):o||(c[c.length]=s)}return c}},function(t,e,n){"use strict";var r=n(35),i=n(25),a=n(71),o=n(109);e.a=function(){var t=o.a,e=o.b,n=Object(i.a)(!0),c=null,u=a.a,f=null;function s(i){var a,o,s,l=i.length,d=!1;for(null==c&&(f=u(s=Object(r.a)())),a=0;a<=l;++a)!(ar.f){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,f=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/f,a=(a*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/f}if(t._l23_a>r.f){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-e*t._l12_2a)/l,c=(c*s+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(i,a,o,c,t._x2,t._y2)}function o(t,e){this._context=t,this._alpha=e}o.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:a(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new o(t,e):new i.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";e.b=i;var r=n(46);function i(t){for(var e,n=0,r=-1,i=t.length;++r=1)return+n(t[i-1],i-1,t);var i,a=(i-1)*e,o=Math.floor(a),c=+n(t[o],o,t);return c+(+n(t[o+1],o+1,t)-c)*(a-o)}}},function(t,e,n){var r=n(211),i=n(480),a=n(481),o=n(213),c=n(495),u=n(116),f=n(496),s=n(219),l=n(220),d=n(119),h=Math.max;t.exports=function(t,e,n,b,p,v,y,_){var g=2&e;if(!g&&"function"!=typeof t)throw new TypeError("Expected a function");var m=b?b.length:0;if(m||(e&=-97,b=p=void 0),y=void 0===y?y:h(d(y),0),_=void 0===_?_:d(_),m-=p?p.length:0,64&e){var x=b,w=p;b=p=void 0}var j=g?void 0:u(t),O=[t,e,n,b,p,x,w,v,y,_];if(j&&f(O,j),t=O[0],e=O[1],n=O[2],b=O[3],p=O[4],!(_=O[9]=void 0===O[9]?g?0:t.length:h(O[9]-m,0))&&24&e&&(e&=-25),e&&1!=e)M=8==e||16==e?a(t,e,_):32!=e&&33!=e||p.length?o.apply(void 0,O):c(t,e,n,b);else var M=i(t,e,n);return l((j?r:s)(M,O),t,e)}},function(t,e,n){var r=n(56),i=n(115);function a(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}a.prototype=r(i.prototype),a.prototype.constructor=a,t.exports=a},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(212),i=n(483),a=r?function(t){return r.get(t)}:i;t.exports=a},function(t,e,n){var r=n(56),i=n(115);function a(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}a.prototype=r(i.prototype),a.prototype.constructor=a,t.exports=a},function(t,e){t.exports=function(t,e){for(var n=-1,r=t.length,i=0,a=[];++n1?r[0]+r.slice(2):r,+t.slice(n+1)]}},function(t,e,n){"use strict";n(4);var r=n(542);n.d(e,"c",(function(){return r.a})),n.d(e,"n",(function(){return r.a}));var i=n(543);n.d(e,"g",(function(){return i.a})),n.d(e,"r",(function(){return i.a}));var a=n(544);n.d(e,"d",(function(){return a.a}));var o=n(545);n.d(e,"b",(function(){return o.a}));var c=n(546);n.d(e,"a",(function(){return c.a}));var u=n(547);n.d(e,"j",(function(){return u.b})),n.d(e,"h",(function(){return u.b})),n.d(e,"e",(function(){return u.a})),n.d(e,"i",(function(){return u.c}));var f=n(548);n.d(e,"f",(function(){return f.a}));var s=n(549);n.d(e,"k",(function(){return s.a}));var l=n(550);n.d(e,"o",(function(){return l.a}));var d=n(551);n.d(e,"m",(function(){return d.a}));var h=n(552);n.d(e,"l",(function(){return h.a}));var b=n(553);n.d(e,"u",(function(){return b.b})),n.d(e,"s",(function(){return b.b})),n.d(e,"p",(function(){return b.a})),n.d(e,"t",(function(){return b.c}));var p=n(554);n.d(e,"q",(function(){return p.a}));var v=n(555);n.d(e,"v",(function(){return v.a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o}));var r,i,a,o,c,u=n(237);c={dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],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"]},r=Object(u.a)(c),i=r.format,r.parse,a=r.utcFormat,o=r.utcParse},function(t,e,n){var r=n(50),i=n(78),a=n(249),o=n(282),c=i((function(t){return t.push(void 0,a),r(o,void 0,t)}));t.exports=c},function(t,e,n){var r=n(50),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,c=i(a.length-e,0),u=Array(c);++o0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(51),i=n(132),a=n(133),o=n(273),c=n(7),u=n(61),f=n(140);t.exports=function t(e,n,s,l,d){e!==n&&a(n,(function(a,u){if(c(a))d||(d=new r),o(e,n,u,s,t,l,d);else{var h=l?l(f(e,u),a,u+"",e,n,d):void 0;void 0===h&&(h=a),i(e,u,h)}}),u)}},function(t,e,n){var r=n(83),i=n(38);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(272)();t.exports=r},function(t,e,n){(function(t){var r=n(5),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,c=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}}).call(e,n(84)(t))},function(t,e,n){var r=n(85);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(5).Uint8Array;t.exports=r},function(t,e,n){var r=n(56),i=n(86),a=n(57);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(16),i=n(86),a=n(6),o=Function.prototype,c=Object.prototype,u=o.toString,f=c.hasOwnProperty,s=u.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=f.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==s}},function(t,e){t.exports=function(t,e){if("__proto__"!=e)return t[e]}},function(t,e,n){var r=n(279),i=n(58),a=n(2),o=n(59),c=n(62),u=n(88),f=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),s=!n&&i(t),l=!n&&!s&&o(t),d=!n&&!s&&!l&&u(t),h=n||s||l||d,b=h?r(t.length,String):[],p=b.length;for(var v in t)!e&&!f.call(t,v)||h&&("length"==v||l&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||c(v,p))||b.push(v);return b}},function(t,e,n){var r=n(78),i=n(63);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,c=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,c&&i(n[0],n[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++rs))return!1;var d=u.get(t);if(d&&u.get(e))return d==e;var h=-1,b=!0,p=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h1?this.each((null==e?i:"function"==typeof e?o:a)(t,e,null==n?"":n)):c(this.node(),t)}},function(t,e,n){"use strict";e.b=function(t,e){var n=t.document.documentElement,a=Object(r.select)(t).on("dragstart.drag",null);e&&(a.on("click.drag",i.a,!0),setTimeout((function(){a.on("click.drag",null)}),0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)};var r=n(3),i=n(166);e.a=function(t){var e=t.document.documentElement,n=Object(r.select)(t).on("dragstart.drag",i.a,!0);"onselectstart"in e?n.on("selectstart.drag",i.a,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}},function(t,e,n){"use strict";e.b=function(){r.event.stopImmediatePropagation()};var r=n(3);e.a=function(){r.event.preventDefault(),r.event.stopImmediatePropagation()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r=Math.PI/180,i=180/Math.PI},function(t,e,n){"use strict";n.d(e,"b",(function(){return u}));var r=n(9),i=n(102),a=n(169),o=n(43);function c(t){return function(e){var n,i,a=e.length,o=new Array(a),c=new Array(a),u=new Array(a);for(n=0;nu&&(c=e.slice(u,c),s[f]?s[f]+=c:s[++f]=c),(n=n[0])===(o=o[0])?s[f]?s[f]+=o:s[++f]=o:(s[++f]=null,l.push({i:f,x:Object(r.a)(n,o)})),u=a.lastIndex;return ur.d&&n.state=o;--c)d.point(y[c],_[c]);d.lineEnd(),d.areaEnd()}v&&(y[a]=+t(h,a,i),_[a]=+n(h,a,i),d.point(e?+e(h,a,i):y[a],u?+u(h,a,i):_[a]))}if(b)return d=null,b+""||null}function b(){return Object(o.a)().defined(f).curve(l).context(s)}return h.x=function(n){return arguments.length?(t="function"==typeof n?n:Object(i.a)(+n),e=null,h):t},h.x0=function(e){return arguments.length?(t="function"==typeof e?e:Object(i.a)(+e),h):t},h.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Object(i.a)(+t),h):e},h.y=function(t){return arguments.length?(n="function"==typeof t?t:Object(i.a)(+t),u=null,h):n},h.y0=function(t){return arguments.length?(n="function"==typeof t?t:Object(i.a)(+t),h):n},h.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:Object(i.a)(+t),h):u},h.lineX0=h.lineY0=function(){return b().x(t).y(n)},h.lineY1=function(){return b().x(t).y(u)},h.lineX1=function(){return b().x(e).y(n)},h.defined=function(t){return arguments.length?(f="function"==typeof t?t:Object(i.a)(!!t),h):f},h.curve=function(t){return arguments.length?(l=t,null!=s&&(d=l(s)),h):l},h.context=function(t){return arguments.length?(null==t?s=d=null:d=l(s=t),h):s},h}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),e.b=a;var r=a(n(71).a);function i(t){this._curve=t}function a(t){function e(e){return new i(t(e))}return e._curve=t,e}i.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}}},function(t,e,n){"use strict";e.b=a;var r=n(184),i=n(108);function a(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Object(r.b)(t)):e()._curve},t}e.a=function(){return a(Object(i.a)().curve(r.a))}},function(t,e,n){"use strict";e.a=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=Array.prototype.slice},function(t,e,n){"use strict";var r=n(44);e.a={draw:function(t,e){var n=Math.sqrt(e/r.j);t.moveTo(n,0),t.arc(0,0,n,0,r.m)}}},function(t,e,n){"use strict";e.a={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}}},function(t,e,n){"use strict";var r=Math.sqrt(1/3),i=2*r;e.a={draw:function(t,e){var n=Math.sqrt(e/i),a=n*r;t.moveTo(0,-n),t.lineTo(a,0),t.lineTo(0,n),t.lineTo(-a,0),t.closePath()}}},function(t,e,n){"use strict";var r=n(44),i=Math.sin(r.j/10)/Math.sin(7*r.j/10),a=Math.sin(r.m/10)*i,o=-Math.cos(r.m/10)*i;e.a={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),i=a*n,c=o*n;t.moveTo(0,-n),t.lineTo(i,c);for(var u=1;u<5;++u){var f=r.m*u/5,s=Math.cos(f),l=Math.sin(f);t.lineTo(l*n,-s*n),t.lineTo(s*i-l*c,l*i+s*c)}t.closePath()}}},function(t,e,n){"use strict";e.a={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}}},function(t,e,n){"use strict";var r=Math.sqrt(3);e.a={draw:function(t,e){var n=-Math.sqrt(e/(3*r));t.moveTo(0,2*n),t.lineTo(-r*n,-n),t.lineTo(r*n,-n),t.closePath()}}},function(t,e,n){"use strict";var r=-.5,i=Math.sqrt(3)/2,a=1/Math.sqrt(12),o=3*(a/2+1);e.a={draw:function(t,e){var n=Math.sqrt(e/o),c=n/2,u=n*a,f=c,s=n*a+n,l=-f,d=s;t.moveTo(c,u),t.lineTo(f,s),t.lineTo(l,d),t.lineTo(r*c-i*u,i*c+r*u),t.lineTo(r*f-i*s,i*f+r*s),t.lineTo(r*l-i*d,i*l+r*d),t.lineTo(r*c+i*u,r*u-i*c),t.lineTo(r*f+i*s,r*s-i*f),t.lineTo(r*l+i*d,r*d-i*l),t.closePath()}}},function(t,e,n){"use strict";e.a=a;var r=n(72),i=n(74);function a(t,e){this._context=t,this._k=(1-e)/6}a.prototype={areaStart:r.a,areaEnd:r.a,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Object(i.c)(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.b=function t(e){function n(t){return new a(t,e)}return n.tension=function(e){return t(+e)},n}(0)},function(t,e,n){"use strict";e.a=i;var r=n(74);function i(t,e){this._context=t,this._k=(1-e)/6}i.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(t,e){switch(t=+t,e=+e,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:Object(r.c)(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.b=function t(e){function n(t){return new i(t,e)}return n.tension=function(e){return t(+e)},n}(0)},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c}));var r=n(36),i=n(198),a=Object(i.a)(r.a),o=a.right,c=a.left;e.c=o},function(t,e,n){"use strict";var r=n(36);e.a=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Object(r.a)(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}},function(t,e,n){"use strict";function r(t,e){return[t,e]}e.b=r,e.a=function(t,e){null==e&&(e=r);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);n1)return f/(o-1)}},function(t,e,n){"use strict";e.a=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o=n)for(r=i=n;++on&&(r=n),i=n)for(r=i=n;++on&&(r=n),i=r?c*=10:u>=i?c*=5:u>=a&&(c*=2),e=0?(u>=r?10:u>=i?5:u>=a?2:1)*Math.pow(10,c):-Math.pow(10,-c)/(u>=r?10:u>=i?5:u>=a?2:1)}e.a=function(t,e,n){var r,i,a,c,u=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0)for(t=Math.ceil(t/c),e=Math.floor(e/c),a=new Array(i=Math.ceil(e-t+1));++u=n)for(r=n;++an&&(r=n)}else for(;++a=n)for(r=n;++an&&(r=n);return r}},function(t,e,n){"use strict";var r=n(207);function i(t){return t.length}e.a=function(t){if(!(o=t.length))return[];for(var e=-1,n=Object(r.a)(t,i),a=new Array(n);++e3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Math.E;r&&t*e<=0&&console.warn("As log(0) = -∞, a log scale domain must be\n strictly-positive or strictly-negative. logscale ignored");var a=r&&t*e>0?(0,f.scaleLog)().base(i):(0,f.scaleLinear)();return a.domain([t,e]).range([0,n]).clamp(!0)};var r=s(n(475)),i=s(n(506)),a=s(n(509)),o=s(n(511)),c=s(n(514)),u=s(n(518)),f=n(225);function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){var r=n(28),i=n(212),a=i?function(t,e){return i.set(t,e),t}:r;t.exports=a},function(t,e,n){var r=n(151),i=r&&new r;t.exports=i},function(t,e,n){var r=n(214),i=n(215),a=n(482),o=n(75),c=n(216),u=n(222),f=n(494),s=n(118),l=n(5);t.exports=function t(e,n,d,h,b,p,v,y,_,g){var m=128&n,x=1&n,w=2&n,j=24&n,O=512&n,M=w?void 0:o(e);return function k(){for(var A=arguments.length,T=Array(A),S=A;S--;)T[S]=arguments[S];if(j)var P=u(k),R=a(T,P);if(h&&(T=r(T,h,b,j)),p&&(T=i(T,p,v,j)),A-=R,j&&A1&&T.reverse(),m&&_(c=t.charCodeAt(n))||c>57){h=(46===c?l+t.slice(n+1):t.slice(n))+h,t=t.slice(0,n);break}}v&&!b&&(t=e(t,1/0));var O=f.length+t.length+h.length,M=O>1)+f+t+h+M.slice(O);break;default:t=M+f+t+h}return d(t)}return y=null==y?_?6:12:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),j.toString=function(){return t+""},j}return{format:b,formatPrefix:function(t,e){var n=b(((t=Object(o.a)(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Object(r.a)(e)/3))),a=Math.pow(10,-i),c=s[8+i/3];return function(t){return n(a*t)+c}}}}},function(t,e,n){"use strict";e.a=a;var r=n(232),i=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function a(t){return new o(t)}function o(t){if(!(e=i.exec(t)))throw new Error("invalid format: "+t);var e,n=e[1]||" ",a=e[2]||">",o=e[3]||"-",c=e[4]||"",u=!!e[5],f=e[6]&&+e[6],s=!!e[7],l=e[8]&&+e[8].slice(1),d=e[9]||"";"n"===d?(s=!0,d="g"):r.a[d]||(d=""),(u||"0"===n&&"="===a)&&(u=!0,n="0",a="="),this.fill=n,this.align=a,this.sign=o,this.symbol=c,this.zero=u,this.width=f,this.comma=s,this.precision=l,this.type=d}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type}},function(t,e,n){"use strict";var r=n(531),i=n(233),a=n(532);e.a={"":r.a,"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Object(a.a)(100*t,e)},r:a.a,s:i.a,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r}));var r,i=n(122);e.a=function(t,e){var n=Object(i.a)(t,e);if(!n)return t+"";var a=n[0],o=n[1],c=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,u=a.length;return c===u?a:c>u?a+new Array(c-u+1).join("0"):c>0?a.slice(0,c)+"."+a.slice(c):"0."+new Array(1-c).join("0")+Object(i.a)(t,Math.max(0,e+c-1))[0]}},function(t,e,n){"use strict";e.a=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o=12)]},Q:pt,s:vt,S:F,u:Y,U:q,V:G,w:V,W:X,x:null,X:null,y:H,Y:$,Z:Z,"%":bt},St={a:function(t){return l[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return d[t.getUTCMonth()]},c:null,d:K,e:K,f:nt,H:J,I:Q,j:tt,L:et,m:rt,M:it,p:function(t){return f[+(t.getUTCHours()>=12)]},Q:pt,s:vt,S:at,u:ot,U:ct,V:ut,w:ft,W:st,x:null,X:null,y:lt,Y:dt,Z:ht,"%":bt},Pt={a:function(t,e,n){var r=wt.exec(e.slice(n));return r?(t.w=jt[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=mt.exec(e.slice(n));return r?(t.w=xt[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=kt.exec(e.slice(n));return r?(t.m=At[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=Ot.exec(e.slice(n));return r?(t.m=Mt[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return Ct(t,e,n,r)},d:O,e:O,f:P,H:k,I:k,j:M,L:S,m:j,M:A,p:function(t,e,n){var r=_t.exec(e.slice(n));return r?(t.p=gt[r[0].toLowerCase()],n+r[0].length):-1},Q:E,s:C,S:T,u:v,U:y,V:_,w:p,W:g,x:function(t,e,r){return Ct(t,n,e,r)},X:function(t,e,n){return Ct(t,u,e,n)},y:x,Y:m,Z:w,"%":R};function Rt(t,e){return function(n){var r,i,a,o=[],u=-1,f=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++u53)return null;"w"in u||(u.w=1),"Z"in u?(c=(i=a(o(u.y))).getUTCDay(),i=c>4||0===c?r.p.ceil(i):Object(r.p)(i),i=r.l.offset(i,7*(u.V-1)),u.y=i.getUTCFullYear(),u.m=i.getUTCMonth(),u.d=i.getUTCDate()+(u.w+6)%7):(c=(i=e(o(u.y))).getDay(),i=c>4||0===c?r.e.ceil(i):Object(r.e)(i),i=r.a.offset(i,7*(u.V-1)),u.y=i.getFullYear(),u.m=i.getMonth(),u.d=i.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),c="Z"in u?a(o(u.y)).getUTCDay():e(o(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(c+5)%7:u.w+7*u.U-(c+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,a(u)):e(u)}}function Ct(t,e,n,r){for(var i,a,o=0,u=e.length,f=n.length;o=f)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in c?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(Tt.x=Rt(n,Tt),Tt.X=Rt(u,Tt),Tt.c=Rt(e,Tt),St.x=Rt(n,St),St.X=Rt(u,St),St.c=Rt(e,St),{format:function(t){var e=Rt(t+="",Tt);return e.toString=function(){return t},e},parse:function(t){var e=Et(t+="",i);return e.toString=function(){return t},e},utcFormat:function(t){var e=Rt(t+="",St);return e.toString=function(){return t},e},utcParse:function(t){var e=Et(t,a);return e.toString=function(){return t},e}})};var r=n(123);function i(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function a(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function o(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var c={"-":"",_:" ",0:"0"},u=/^\s*\d+/,f=/^%/,s=/[\\^$*+?|[\]().{}]/g;function l(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function w(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function j(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function O(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function M(t,e,n){var r=u.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function k(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function A(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function T(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function S(t,e,n){var r=u.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function P(t,e,n){var r=u.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function R(t,e,n){var r=f.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function E(t,e,n){var r=u.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function C(t,e,n){var r=u.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function I(t,e){return l(t.getDate(),e,2)}function N(t,e){return l(t.getHours(),e,2)}function D(t,e){return l(t.getHours()%12||12,e,2)}function z(t,e){return l(1+r.a.count(Object(r.k)(t),t),e,3)}function B(t,e){return l(t.getMilliseconds(),e,3)}function U(t,e){return B(t,e)+"000"}function L(t,e){return l(t.getMonth()+1,e,2)}function W(t,e){return l(t.getMinutes(),e,2)}function F(t,e){return l(t.getSeconds(),e,2)}function Y(t){var e=t.getDay();return 0===e?7:e}function q(t,e){return l(r.h.count(Object(r.k)(t),t),e,2)}function G(t,e){var n=t.getDay();return t=n>=4||0===n?Object(r.i)(t):r.i.ceil(t),l(r.i.count(Object(r.k)(t),t)+(4===Object(r.k)(t).getDay()),e,2)}function V(t){return t.getDay()}function X(t,e){return l(r.e.count(Object(r.k)(t),t),e,2)}function H(t,e){return l(t.getFullYear()%100,e,2)}function $(t,e){return l(t.getFullYear()%1e4,e,4)}function Z(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+l(e/60|0,"0",2)+l(e%60,"0",2)}function K(t,e){return l(t.getUTCDate(),e,2)}function J(t,e){return l(t.getUTCHours(),e,2)}function Q(t,e){return l(t.getUTCHours()%12||12,e,2)}function tt(t,e){return l(1+r.l.count(Object(r.v)(t),t),e,3)}function et(t,e){return l(t.getUTCMilliseconds(),e,3)}function nt(t,e){return et(t,e)+"000"}function rt(t,e){return l(t.getUTCMonth()+1,e,2)}function it(t,e){return l(t.getUTCMinutes(),e,2)}function at(t,e){return l(t.getUTCSeconds(),e,2)}function ot(t){var e=t.getUTCDay();return 0===e?7:e}function ct(t,e){return l(r.s.count(Object(r.v)(t),t),e,2)}function ut(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Object(r.t)(t):r.t.ceil(t),l(r.t.count(Object(r.v)(t),t)+(4===Object(r.v)(t).getUTCDay()),e,2)}function ft(t){return t.getUTCDay()}function st(t,e){return l(r.p.count(Object(r.v)(t),t),e,2)}function lt(t,e){return l(t.getUTCFullYear()%100,e,2)}function dt(t,e){return l(t.getUTCFullYear()%1e4,e,4)}function ht(){return"+0000"}function bt(){return"%"}function pt(t){return+t}function vt(t){return Math.floor(+t/1e3)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(124),i="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||Object(r.b)(i)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return c})),n.d(e,"c",(function(){return u}));var r=Math.cos,i=Math.sin,a=Math.PI,o=a/2,c=2*a,u=Math.max},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n-1}},function(t,e,n){var r=n(53);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(52);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(52),i=n(81),a=n(82);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(261),i=n(52),a=n(81);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(262),i=n(263),a=n(264),o=n(265),c=n(266);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=O&&(O=j+1);!(w=m[O])&&++O<_;);x._next=w||null}}return(s=new r.a(s,i))._enter=l,s._exit=d,s}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";var r=n(163),i=n(11);e.a=function(){return new i.a(this._exit||this._groups.map(r.a),this._parents)}},function(t,e,n){"use strict";var r=n(11);e.a=function(t){for(var e=this._groups,n=t._groups,i=e.length,a=n.length,o=Math.min(i,a),c=new Array(i),u=0;u=0;)(r=i[a])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this}},function(t,e,n){"use strict";var r=n(11);function i(t,e){return te?1:t>=e?0:NaN}e.a=function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=i);for(var n=this._groups,a=n.length,o=new Array(a),c=0;c1?this.each((null==e?r:"function"==typeof e?a:i)(t,e)):this.node()[t]}},function(t,e,n){"use strict";function r(t){return t.trim().split(/^|\s+/)}function i(t){return t.classList||new a(t)}function a(t){this._node=t,this._names=r(t.getAttribute("class")||"")}function o(t,e){for(var n=i(t),r=-1,a=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},e.a=function(t,e){var n=r(t+"");if(arguments.length<2){for(var a=i(this.node()),o=-1,c=n.length;++or?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}e.a=function(){var t,e,n=d,_=h,g=y,m=p,x=v,w=[0,1/0],j=[[-1/0,-1/0],[1/0,1/0]],O=250,M=a.j,k=[],A=Object(r.dispatch)("start","zoom","end"),T=0;function S(t){t.property("__zoom",b).on("wheel.zoom",D).on("mousedown.zoom",z).on("dblclick.zoom",B).filter(x).on("touchstart.zoom",U).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",W).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function P(t,e){return(e=Math.max(w[0],Math.min(w[1],e)))===t.k?t:new s.a(e,t.x,t.y)}function R(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new s.a(t.k,r,i)}function E(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function C(t,e,n){t.on("start.zoom",(function(){I(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){I(this,arguments).end()})).tween("zoom",(function(){var t=this,r=arguments,i=I(t,r),a=_.apply(t,r),o=n||E(a),c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,r):e,l=M(u.invert(o).concat(c/u.k),f.invert(o).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=l(t),n=c/e[2];t=new s.a(n,o[0]-e[0]*n,o[1]-e[1]*n)}i.zoom(null,t)}}))}function I(t,e){for(var n,r=0,i=k.length;rT}t.zoom("mouse",g(R(t.that.__zoom,t.mouse[0]=Object(o.mouse)(t.that),t.mouse[1]),t.extent,j))}function d(){r.on("mousemove.zoom mouseup.zoom",null),Object(i.b)(o.event.view,t.moved),Object(l.a)(),t.end()}}function B(){if(n.apply(this,arguments)){var t=this.__zoom,e=Object(o.mouse)(this),r=t.invert(e),i=t.k*(o.event.shiftKey?.5:2),a=g(R(P(t,i),e,r),_.apply(this,arguments),j);Object(l.a)(),O>0?Object(o.select)(this).transition().duration(O).call(C,a,e):Object(o.select)(this).call(S.transform,a)}}function U(){if(n.apply(this,arguments)){var e,r,i,a,u=I(this,arguments),f=o.event.changedTouches,s=f.length;for(Object(l.b)(),r=0;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function c(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;a.008856451679035631?Math.pow(t,1/3):t/c+4/29}function d(t){return t>o?t*t*t:c*(t-4/29)}function h(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function b(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function p(t){if(t instanceof y)return new y(t.h,t.c,t.l,t.opacity);t instanceof s||(t=u(t));var e=Math.atan2(t.b,t.a)*a.b;return new y(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function v(t,e,n,r){return 1===arguments.length?p(t):new y(t,e,n,null==r?1:r)}function y(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}Object(r.a)(s,f,Object(r.b)(i.a,{brighter:function(t){return new s(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new s(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=1*d(t),e=.95047*d(e),n=1.08883*d(n),new i.b(h(3.2404542*e-1.5371385*t-.4985314*n),h(-.969266*e+1.8760108*t+.041556*n),h(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Object(r.a)(y,v,Object(r.b)(i.a,{brighter:function(t){return new y(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new y(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return u(this).rgb()}}))},function(t,e,n){"use strict";e.a=p;var r=n(101),i=n(100),a=n(167),o=-.14861,c=1.78277,u=-.29227,f=-.90649,s=1.97294,l=s*f,d=s*c,h=c*u-f*o;function b(t){if(t instanceof v)return new v(t.h,t.s,t.l,t.opacity);t instanceof i.b||(t=Object(i.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(h*r+l*e-d*n)/(h+l-d),c=r-o,b=(s*(n-o)-u*c)/f,p=Math.sqrt(b*b+c*c)/(s*o*(1-o)),y=p?Math.atan2(b,c)*a.b-120:NaN;return new v(y<0?y+360:y,p,o,t.opacity)}function p(t,e,n,r){return 1===arguments.length?b(t):new v(t,e,n,null==r?1:r)}function v(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Object(r.a)(v,p,Object(r.b)(i.a,{brighter:function(t){return t=null==t?i.c:Math.pow(i.c,t),new v(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?i.d:Math.pow(i.d,t),new v(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*a.a,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),l=Math.sin(t);return new i.b(255*(e+n*(o*r+c*l)),255*(e+n*(u*r+f*l)),255*(e+n*(s*r)),this.opacity)}}))},function(t,e,n){"use strict";e.a=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return c}));var r=n(69),i=n(359);function a(t,e,n,i){function a(t){return t.length?t.pop()+" ":""}return function(o,c){var u=[],f=[];return o=t(o),c=t(c),function(t,i,a,o,c,u){if(t!==a||i!==o){var f=c.push("translate(",null,e,null,n);u.push({i:f-4,x:Object(r.a)(t,a)},{i:f-2,x:Object(r.a)(i,o)})}else(a||o)&&c.push("translate("+a+e+o+n)}(o.translateX,o.translateY,c.translateX,c.translateY,u,f),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(a(n)+"rotate(",null,i)-2,x:Object(r.a)(t,e)})):e&&n.push(a(n)+"rotate("+e+i)}(o.rotate,c.rotate,u,f),function(t,e,n,o){t!==e?o.push({i:n.push(a(n)+"skewX(",null,i)-2,x:Object(r.a)(t,e)}):e&&n.push(a(n)+"skewX("+e+i)}(o.skewX,c.skewX,u,f),function(t,e,n,i,o,c){if(t!==n||e!==i){var u=o.push(a(o)+"scale(",null,",",null,")");c.push({i:u-4,x:Object(r.a)(t,n)},{i:u-2,x:Object(r.a)(e,i)})}else 1===n&&1===i||o.push(a(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,c.scaleX,c.scaleY,u,f),o=c=null,function(t){for(var e,n=-1,r=f.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?r.g:r.h;return function(){var r=o(this,t),c=r.on;c!==i&&(a=(i=c).copy()).on(e,n),r.on=a}}e.a=function(t,e){var n=this._id;return arguments.length<2?Object(r.f)(this.node(),n).on.on(t):this.each(i(n,t,e))}},function(t,e,n){"use strict";e.a=function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t}},function(t,e,n){"use strict";var r=n(3),i=n(19),a=n(12);e.a=function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(r.selector)(t));for(var o=this._groups,c=o.length,u=new Array(c),f=0;fi.c&&n.name===e)return new r.a([[t]],a,e,+o);return null}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t,e,n){this.target=t,this.type=e,this.transform=n}},function(t,e,n){"use strict";e.b=function(){r.event.stopImmediatePropagation()};var r=n(3);e.a=function(){r.event.preventDefault(),r.event.stopImmediatePropagation()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n=arguments[2],o=0===t.length,c=n.svg.attr("width",n.conf.width).attr("height",n.conf.height);e&&(0,r.default)(n.tracks,(function(t,e){c.select("."+e).remove()}));var u=c.select(".all");u.empty()&&(u=c.append("g").attr("class","all").attr("transform","translate(\n "+parseInt(n.conf.width/2)+",\n "+parseInt(n.conf.height/2)+"\n )")),(0,r.default)(n.tracks,(function(e,r){(o||r in t)&&e.render(n,u,r)})),(o||"layout"in t)&&(0,a.default)(u,n);var f=c.selectAll(".all > g").remove(),s=(0,i.default)(f._groups[0],(function(t){return t.getAttribute("z-index")}));return c.select(".all").selectAll("g").data(s).enter().append((function(t){return t})),n};var r=o(n(32)),i=o(n(106)),a=o(n(426));function o(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){var r=n(29),i=n(58),a=n(2),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e,n){var r=n(40),i=n(33),a=n(158),o=n(423),c=n(60),u=n(424),f=n(28);t.exports=function(t,e,n){var s=-1;e=r(e.length?e:[f],c(i));var l=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++s,value:t}}));return o(l,(function(t,e){return u(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(425);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,c=a.length,u=n.length;++i=u?f:f*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(34);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),c=void 0!==e,u=null===e,f=e==e,s=r(e);if(!u&&!s&&!o&&t>e||o&&c&&f&&!u&&!s||i&&c&&f||!n&&f||!a)return 1;if(!i&&!o&&!s&&tMath.PI?"rotate(180)translate(-16)":null})).style("text-anchor",(function(t){return t.angle>Math.PI?"end":null})).style("font-size",t.ticks.labelSize+"px").style("fill",t.ticks.labelColor).text((function(t){return t.label}))}(n,o,e)};var r=n(13),i=n(10),a=n(3)},function(t,e,n){"use strict";var r=n(35),i=n(25),a=n(44);function o(t){return t.innerRadius}function c(t){return t.outerRadius}function u(t){return t.startAngle}function f(t){return t.endAngle}function s(t){return t&&t.padAngle}function l(t,e,n,r,i,a,o,c){var u=n-t,f=r-e,s=o-i,l=c-a,d=(s*(e-a)-l*(t-i))/(l*u-s*f);return[t+d*u,e+d*f]}function d(t,e,n,r,i,o,c){var u=t-n,f=e-r,s=(c?o:-o)/Object(a.l)(u*u+f*f),l=s*f,d=-s*u,h=t+l,b=e+d,p=n+l,v=r+d,y=(h+p)/2,_=(b+v)/2,g=p-h,m=v-b,x=g*g+m*m,w=i-o,j=h*v-p*b,O=(m<0?-1:1)*Object(a.l)(Object(a.h)(0,w*w*x-j*j)),M=(j*m-g*O)/x,k=(-j*g-m*O)/x,A=(j*m+g*O)/x,T=(-j*g+m*O)/x,S=M-y,P=k-_,R=A-y,E=T-_;return S*S+P*P>R*R+E*E&&(M=A,k=T),{cx:M,cy:k,x01:-l,y01:-d,x11:M*(i/w-1),y11:k*(i/w-1)}}e.a=function(){var t=o,e=c,n=Object(i.a)(0),h=null,b=u,p=f,v=s,y=null;function _(){var i,o,c=+t.apply(this,arguments),u=+e.apply(this,arguments),f=b.apply(this,arguments)-a.g,s=p.apply(this,arguments)-a.g,_=Object(a.a)(s-f),g=s>f;if(y||(y=i=Object(r.a)()),ua.f)if(_>a.m-a.f)y.moveTo(u*Object(a.e)(f),u*Object(a.k)(f)),y.arc(0,0,u,f,s,!g),c>a.f&&(y.moveTo(c*Object(a.e)(s),c*Object(a.k)(s)),y.arc(0,0,c,s,f,g));else{var m,x,w=f,j=s,O=f,M=s,k=_,A=_,T=v.apply(this,arguments)/2,S=T>a.f&&(h?+h.apply(this,arguments):Object(a.l)(c*c+u*u)),P=Object(a.i)(Object(a.a)(u-c)/2,+n.apply(this,arguments)),R=P,E=P;if(S>a.f){var C=Object(a.c)(S/c*Object(a.k)(T)),I=Object(a.c)(S/u*Object(a.k)(T));(k-=2*C)>a.f?(O+=C*=g?1:-1,M-=C):(k=0,O=M=(f+s)/2),(A-=2*I)>a.f?(w+=I*=g?1:-1,j-=I):(A=0,w=j=(f+s)/2)}var N=u*Object(a.e)(w),D=u*Object(a.k)(w),z=c*Object(a.e)(M),B=c*Object(a.k)(M);if(P>a.f){var U=u*Object(a.e)(j),L=u*Object(a.k)(j),W=c*Object(a.e)(O),F=c*Object(a.k)(O);if(_a.f?l(N,D,W,F,U,L,z,B):[z,B],q=N-Y[0],G=D-Y[1],V=U-Y[0],X=L-Y[1],H=1/Object(a.k)(Object(a.b)((q*V+G*X)/(Object(a.l)(q*q+G*G)*Object(a.l)(V*V+X*X)))/2),$=Object(a.l)(Y[0]*Y[0]+Y[1]*Y[1]);R=Object(a.i)(P,(c-$)/(H-1)),E=Object(a.i)(P,(u-$)/(H+1))}}A>a.f?E>a.f?(m=d(W,F,N,D,u,E,g),x=d(U,L,z,B,u,E,g),y.moveTo(m.cx+m.x01,m.cy+m.y01),Ea.f&&k>a.f?R>a.f?(m=d(z,B,U,L,c,-R,g),x=d(N,D,W,F,c,-R,g),y.lineTo(m.cx+m.x01,m.cy+m.y01),R1e-6)if(Math.abs(l*u-f*s)>1e-6&&a){var h=n-o,b=i-c,p=u*u+f*f,v=h*h+b*b,y=Math.sqrt(p),_=Math.sqrt(d),g=a*Math.tan((r-Math.acos((p+d-v)/(2*y*_)))/2),m=g/_,x=g/y;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*s)+","+(e+m*l)),this._+="A"+a+","+a+",0,0,"+ +(l*h>s*b)+","+(this._x1=t+x*u)+","+(this._y1=e+x*f)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,o,c,u){t=+t,e=+e;var f=(n=+n)*Math.cos(o),s=n*Math.sin(o),l=t+f,d=e+s,h=1^u,b=u?o-c:c-o;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+d:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+l+","+d),n&&(b<0&&(b=b%i+i),b>a?this._+="A"+n+","+n+",0,1,"+h+","+(t-f)+","+(e-s)+"A"+n+","+n+",0,1,"+h+","+(this._x1=l)+","+(this._y1=d):b>1e-6&&(this._+="A"+n+","+n+",0,"+ +(b>=r)+","+h+","+(this._x1=t+n*Math.cos(c))+","+(this._y1=e+n*Math.sin(c))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},e.a=c},function(t,e,n){"use strict";var r=n(25),i=n(430),a=n(431),o=n(44);e.a=function(){var t=a.a,e=i.a,n=null,c=Object(r.a)(0),u=Object(r.a)(o.m),f=Object(r.a)(0);function s(r){var i,a,s,l,d,h=r.length,b=0,p=new Array(h),v=new Array(h),y=+c.apply(this,arguments),_=Math.min(o.m,Math.max(-o.m,u.apply(this,arguments)-y)),g=Math.min(Math.abs(_)/h,f.apply(this,arguments)),m=g*(_<0?-1:1);for(i=0;i0&&(b+=d);for(null!=e?p.sort((function(t,n){return e(v[t],v[n])})):null!=n&&p.sort((function(t,e){return n(r[t],r[e])})),i=0,s=b?(_-h*m)/b:0;i0?d*s:0)+m,v[a]={data:r[a],index:i,value:d,startAngle:y,endAngle:l,padAngle:g};return v}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Object(r.a)(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(c="function"==typeof t?t:Object(r.a)(+t),s):c},s.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:Object(r.a)(+t),s):u},s.padAngle=function(t){return arguments.length?(f="function"==typeof t?t:Object(r.a)(+t),s):f},s}},function(t,e,n){"use strict";e.a=function(t,e){return et?1:e>=t?0:NaN}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(184),i=n(183),a=n(185);e.a=function(){var t=Object(i.a)().curve(r.a),e=t.curve,n=t.lineX0,o=t.lineX1,c=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Object(a.b)(n())},delete t.lineX0,t.lineEndAngle=function(){return Object(a.b)(o())},delete t.lineX1,t.lineInnerRadius=function(){return Object(a.b)(c())},delete t.lineY0,t.lineOuterRadius=function(){return Object(a.b)(u())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Object(r.b)(t)):e()._curve},t}},function(t,e,n){"use strict";e.a=function(){return s(l)},e.c=function(){return s(d)},e.b=function(){var t=s(h);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t};var r=n(35),i=n(187),a=n(25),o=n(109),c=n(186);function u(t){return t.source}function f(t){return t.target}function s(t){var e=u,n=f,c=o.a,s=o.b,l=null;function d(){var a,o=i.a.call(arguments),u=e.apply(this,o),f=n.apply(this,o);if(l||(l=a=Object(r.a)()),t(l,+c.apply(this,(o[0]=u,o)),+s.apply(this,o),+c.apply(this,(o[0]=f,o)),+s.apply(this,o)),a)return l=null,a+""||null}return d.source=function(t){return arguments.length?(e=t,d):e},d.target=function(t){return arguments.length?(n=t,d):n},d.x=function(t){return arguments.length?(c="function"==typeof t?t:Object(a.a)(+t),d):c},d.y=function(t){return arguments.length?(s="function"==typeof t?t:Object(a.a)(+t),d):s},d.context=function(t){return arguments.length?(l=null==t?null:t,d):l},d}function l(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function d(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function h(t,e,n,r,i){var a=Object(c.a)(e,n),o=Object(c.a)(e,n=(n+i)/2),u=Object(c.a)(r,n),f=Object(c.a)(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],u[0],u[1],f[0],f[1])}},function(t,e,n){"use strict";n.d(e,"b",(function(){return d}));var r=n(35),i=n(188),a=n(189),o=n(190),c=n(191),u=n(192),f=n(193),s=n(194),l=n(25),d=[i.a,a.a,o.a,u.a,c.a,f.a,s.a];e.a=function(){var t=Object(l.a)(i.a),e=Object(l.a)(64),n=null;function a(){var i;if(n||(n=i=Object(r.a)()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(e){return arguments.length?(t="function"==typeof e?e:Object(l.a)(e),a):t},a.size=function(t){return arguments.length?(e="function"==typeof t?t:Object(l.a)(+t),a):e},a.context=function(t){return arguments.length?(n=null==t?null:t,a):n},a}},function(t,e,n){"use strict";var r=n(72),i=n(73);function a(t){this._context=t}a.prototype={areaStart:r.a,areaEnd:r.a,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Object(i.c)(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},e.a=function(t){return new a(t)}},function(t,e,n){"use strict";var r=n(73);function i(t){this._context=t}i.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Object(r.c)(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},e.a=function(t){return new i(t)}},function(t,e,n){"use strict";var r=n(73);function i(t,e){this._basis=new r.a(t),this._beta=e}i.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,c=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*c));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}},e.a=function t(e){function n(t){return 1===e?new r.a(t):new i(t,e)}return n.beta=function(e){return t(+e)},n}(.85)},function(t,e,n){"use strict";var r=n(195),i=n(72),a=n(110);function o(t,e){this._context=t,this._alpha=e}o.prototype={areaStart:i.a,areaEnd:i.a,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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Object(a.b)(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new o(t,e):new r.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";var r=n(196),i=n(110);function a(t,e){this._context=t,this._alpha=e}a.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Object(i.b)(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new a(t,e):new r.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";var r=n(72);function i(t){this._context=t}i.prototype={areaStart:r.a,areaEnd:r.a,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},e.a=function(t){return new i(t)}},function(t,e,n){"use strict";function r(t){return t<0?-1:1}function i(t,e,n){var i=t._x1-t._x0,a=e-t._x1,o=(t._y1-t._y0)/(i||a<0&&-0),c=(n-t._y1)/(a||i<0&&-0),u=(o*a+c*i)/(i+a);return(r(o)+r(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(u))||0}function a(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function o(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,c=(a-r)/3;t._context.bezierCurveTo(r+c,i+c*e,a-c,o-c*n,a,o)}function c(t){this._context=t}function u(t){this._context=new f(t)}function f(t){this._context=t}e.a=function(t){return new c(t)},e.b=function(t){return new u(t)},c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:o(this,this._t0,a(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,o(this,a(this,n=i(this,t,e)),n);break;default:o(this,this._t0,n=i(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(u.prototype=Object.create(c.prototype)).point=function(t,e){c.prototype.point.call(this,e,t)},f.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}}},function(t,e,n){"use strict";function r(t){this._context=t}function i(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},e.a=function(t){return new r(t,.5)}},function(t,e,n){"use strict";var r=n(187),i=n(25),a=n(45),o=n(46);function c(t,e){return t[e]}e.a=function(){var t=Object(i.a)([]),e=o.a,n=a.a,u=c;function f(r){var i,a,o=t.apply(this,arguments),c=r.length,f=o.length,s=new Array(f);for(i=0;i0){for(var n,i,a,o=0,c=t[0].length;o1)for(var n,r,i,a,o,c,u=0,f=t[e[0]].length;u=0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=a}},function(t,e,n){"use strict";var r=n(45);e.a=function(t,e){if((n=t.length)>0){for(var n,i=0,a=t[e[0]],o=a.length;i0&&(i=(n=t[e[0]]).length)>0){for(var n,i,a,o=0,c=1;ct?1:e>=t?0:NaN}},function(t,e,n){"use strict";var r=n(203),i=n(197),a=n(455),o=n(202),c=n(456),u=n(204),f=n(205),s=n(206);e.a=function(){var t=c.a,e=o.a,n=s.a;function l(r){var a,o,c=r.length,s=new Array(c);for(a=0;ah;)b.pop(),--p;var v,y=new Array(p+1);for(a=0;a<=p;++a)(v=y[a]=[]).x0=a>0?b[a-1]:d,v.x1=a=n)for(r=n;++ar&&(r=n)}else for(;++a=n)for(r=n;++ar&&(r=n);return r}},function(t,e,n){"use strict";var r=n(47);e.a=function(t,e){var n,i=t.length,a=i,o=-1,c=0;if(null==e)for(;++o=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}},function(t,e,n){"use strict";e.a=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}},function(t,e,n){"use strict";var r=n(36);e.a=function(t,e){if(n=t.length){var n,i,a=0,o=0,c=t[o];for(null==e&&(e=r.a);++a90?"end":"start",t._rotate=t._angle>90?180:0,t}))})).enter().append("g").append("text").text((function(t){return t.value})).attr("transform",(function(t){return"\n rotate("+t._angle+")\n translate("+e.innerRadius+", 0)\n rotate("+t._rotate+")\n "})).attr("text-anchor",(function(t){return t._anchor}));return(0,o.default)(e.style,(function(t,e){i.style(e,t)})),i}}]),e}(i.default);e.default=l},function(t,e,n){var r=n(470);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(472)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(471)(!1)).push([t.i,"div.circos-tooltip {\r\n position: absolute;\r\n text-align: center;\r\n padding: 5px 10px;\r\n background: #111111;\r\n color: white;\r\n border: 0px;\r\n pointer-events: none;\r\n z-index: 1000;\r\n}\r\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i=0&&l.splice(e,1)}function y(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),_(e,t.attrs),p(t,e),e}function _(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,r,i,a;if(e.transform&&t.css){if(!(a=e.transform(t.css)))return function(){};t.css=a}if(e.singleton){var o=s++;n=f||(f=y(e)),r=w.bind(null,n,o,!1),i=w.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",_(e,t.attrs),p(t,e),e}(e),r=O.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(e),r=j.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=b(t,e);return h(n,e),function(t){for(var r=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r={};return(0,i.default)(n,(function(n,i){void 0!==n.iteratee?n.iteratee?Object.keys(e).indexOf(i)>-1?((0,a.default)(e[i]),r[i]=e[i]):r[i]=function(){return n.value}:r[i]=Object.keys(e).indexOf(i)>-1?e[i]:n.value:r[i]=t(e[i],n)})),r}(t,(0,r.default)(e));return(0,o.default)(f,function(t,e){return{cmin:null===t.min?e.min:t.min,cmax:null===t.max?e.max:t.max}}(f,n),function(t,e){if(0===t.innerRadius&&0===t.outerRadius){var n=(0,c.smartBorders)(t,e._layout,e.tracks);return{innerRadius:n.in,outerRadius:n.out}}return t.innerRadius<=1&&t.outerRadius<=1?{innerRadius:t.innerRadius*e._layout.conf.innerRadius,outerRadius:t.outerRadius*e._layout.conf.innerRadius}:t.innerRadius<=10&&t.outerRadius<=10?{innerRadius:t.innerRadius*e._layout.conf.outerRadius,outerRadius:t.outerRadius*e._layout.conf.outerRadius}:void 0}(f,u)),f}},function(t,e,n){var r=n(37)("sortBy",n(106));r.placeholder=n(26),t.exports=r},function(t,e,n){var r=n(477),i=n(26),a=Array.prototype.push;function o(t,e){return 2==e?function(e,n){return t(e,n)}:function(e){return t(e)}}function c(t){for(var e=t?t.length:0,n=Array(e);e--;)n[e]=t[e];return n}function u(t,e){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=e.apply(void 0,r);return t.apply(void 0,r),i}}}t.exports=function t(e,n,f,s){var l="function"==typeof n,d=n===Object(n);if(d&&(s=f,f=n,n=void 0),null==f)throw new TypeError;s||(s={});var h=!("cap"in s)||s.cap,b=!("curry"in s)||s.curry,p=!("fixed"in s)||s.fixed,v=!("immutable"in s)||s.immutable,y=!("rearg"in s)||s.rearg,_=l?f:i,g="curry"in s&&s.curry,m="fixed"in s&&s.fixed,x="rearg"in s&&s.rearg,w=l?f.runInContext():void 0,j=l?f:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},O=j.ary,M=j.assign,k=j.clone,A=j.curry,T=j.forEach,S=j.isArray,P=j.isError,R=j.isFunction,E=j.isWeakMap,C=j.keys,I=j.rearg,N=j.toInteger,D=j.toPath,z=C(r.aryMethod),B={castArray:function(t){return function(){var e=arguments[0];return S(e)?t(c(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],n=arguments[1],r=t(e,n),i=r.length;return h&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:o(r,n)):r}},mixin:function(t){return function(e){var n=this;if(!R(n))return t(n,Object(e));var r=[];return T(C(e),(function(t){R(e[t])&&r.push([t,n.prototype[t]])})),t(n,Object(e)),T(r,(function(t){var e=t[1];R(e)?n.prototype[t[0]]=e:delete n.prototype[t[0]]})),n}},nthArg:function(t){return function(e){var n=e<0?1:N(e)+1;return A(t(e),n)}},rearg:function(t){return function(e,n){var r=n?n.length:0;return A(t(e,n),r)}},runInContext:function(n){return function(r){return t(e,n(r),s)}}};function U(t,e){if(h){var n=r.iterateeRearg[t];if(n)return function(t,e){return q(t,(function(t){var n=e.length;return function(t,e){return 2==e?function(e,n){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(I(o(t,n),e),n)}))}(e,n);var i=!l&&r.iterateeAry[t];if(i)return function(t,e){return q(t,(function(t){return"function"==typeof t?o(t,e):t}))}(e,i)}return e}function L(t,e,n){if(p&&(m||!r.skipFixed[t])){var i=r.methodSpread[t],o=i&&i.start;return void 0===o?O(e,n):function(t,e){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var o=i[e],c=i.slice(0,e);return o&&a.apply(c,o),e!=r&&a.apply(c,i.slice(e+1)),t.apply(this,c)}}(e,o)}return e}function W(t,e,n){return y&&n>1&&(x||!r.skipRearg[t])?I(e,r.methodRearg[t]||r.aryRearg[n]):e}function F(t,e){for(var n=-1,r=(e=D(e)).length,i=r-1,a=k(Object(t)),o=a;null!=o&&++n1?A(e,n):e}(0,i=U(a,i),t),!1}})),!i})),i||(i=o),i==e&&(i=g?A(i,1):function(){return e.apply(this,arguments)}),i.convert=Y(a,e),i.placeholder=e.placeholder=n,i}if(!d)return G(n,f,_);var V=f,X=[];return T(z,(function(t){T(r.aryMethod[t],(function(t){var e=V[r.remap[t]||t];e&&X.push([t,G(t,e,V)])}))})),T(C(V),(function(t){var e=V[t];if("function"==typeof e){for(var n=X.length;n--;)if(X[n][0]==t)return;e.convert=Y(t,e),X.push([t,e])}})),T(X,(function(t){V[t[0]]=t[1]})),V.convert=function(t){return V.runInContext.convert(t)(void 0)},V.placeholder=V,T(C(V),(function(t){T(r.realToAlias[t]||[],(function(e){V[e]=V[t]}))})),V}},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,r={};for(var i in n){var a=n[i];t.call(r,a)?r[a].push(i):r[a]=[i]}return r}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e,n){t.exports={ary:n(479),assign:n(181),clone:n(498),curry:n(499),forEach:n(64),isArray:n(2),isError:n(500),isFunction:n(24),isWeakMap:n(501),iteratee:n(502),keys:n(143),rearg:n(503),toInteger:n(119),toPath:n(505)}},function(t,e,n){var r=n(113);t.exports=function(t,e,n){return e=n?void 0:e,e=t&&null==e?t.length:e,r(t,128,void 0,void 0,void 0,void 0,e)}},function(t,e,n){var r=n(75),i=n(5);t.exports=function(t,e,n){var a=1&e,o=r(t);return function e(){var r=this&&this!==i&&this instanceof e?o:t;return r.apply(a?n:this,arguments)}}},function(t,e,n){var r=n(50),i=n(75),a=n(213),o=n(216),c=n(222),u=n(118),f=n(5);t.exports=function(t,e,n){var s=i(t);return function i(){for(var l=arguments.length,d=Array(l),h=l,b=c(i);h--;)d[h]=arguments[h];var p=l<3&&d[0]!==b&&d[l-1]!==b?[]:u(d,b);if((l-=p.length)1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(n,"{\n/* [wrapped with "+e+"] */\n")}},function(t,e,n){var r=n(64),i=n(490),a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return r(a,(function(n){var r="_."+n[0];e&n[1]&&!i(t,r)&&t.push(r)})),t.sort()}},function(t,e,n){var r=n(221);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a=u.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,f,l,d=-1,h=n.length,b=u[i++],p=Object(r.a)(),v=a();++du.length)return n;var i,a=f[r-1];return null!=e&&r>=u.length?i=n.entries():(i=[],n.each((function(e,n){i.push({key:n,values:t(e,r)})}))),null!=a?i.sort((function(t,e){return a(t.key,e.key)})):i}(s(t,0,o,c),0)},key:function(t){return u.push(t),n},sortKeys:function(t){return f[u.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}},function(t,e,n){"use strict";var r=n(120);function i(){}var a=r.a.prototype;function o(t,e){var n=new i;if(t instanceof i)t.each((function(t){n.add(t)}));else if(t){var r=-1,a=t.length;if(null==e)for(;++r0&&c>0&&(u+c+1>r&&(c=Math.max(1,r-u)),a.push(n.substring(i-=c,i+c)),!((u+=c+1)>r));)c=t[o=(o+1)%t.length];return a.reverse().join(e)}}},function(t,e,n){"use strict";e.a=function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}},function(t,e,n){"use strict";e.a=function(t,e){t:for(var n,r=(t=t.toPrecision(e)).length,i=1,a=-1;i0&&(a=0)}return a>0?t.slice(0,a)+t.slice(n+1):t}},function(t,e,n){"use strict";var r=n(122);e.a=function(t,e){var n=Object(r.a)(t,e);if(!n)return t+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(77);e.a=function(t){return Math.max(0,-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(77);e.a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Object(r.a)(e)/3)))-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(77);e.a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Object(r.a)(e)-Object(r.a)(t))+1}},function(t,e,n){"use strict";e.a=function t(){var e=Object(c.b)(u,f).domain([1,10]),n=e.domain,a=10,s=d(10),b=l(10);function p(){return s=d(a),b=l(a),n()[0]<0&&(s=h(s),b=h(b)),e}return e.base=function(t){return arguments.length?(a=+t,p()):a},e.domain=function(t){return arguments.length?(n(t),p()):n()},e.ticks=function(t){var e,i=n(),o=i[0],c=i[i.length-1];(e=c0){for(;dc)break;v.push(l)}}else for(;d=1;--f)if(!((l=u*f)c)break;v.push(l)}}else v=Object(r.ticks)(d,h,Math.min(h-d,p)).map(b);return e?v.reverse():v},e.tickFormat=function(t,n){if(null==n&&(n=10===a?".0e":","),"function"!=typeof n&&(n=Object(i.a)(n)),t===1/0)return n;null==t&&(t=10);var r=Math.max(1,a*t/e.ticks().length);return function(t){var e=t/b(Math.round(s(t)));return e*a0?a[r-1]:e[0],r=o?[c[o-1],n]:[c[r-1],c[r]]},f.copy=function(){return t().domain([e,n]).range(u)},Object(a.b)(f)};var r=n(10),i=n(27),a=n(48)},function(t,e,n){"use strict";e.a=function t(){var e=[.5],n=[0,1],a=1;function o(t){if(t<=t)return n[Object(r.bisect)(e,t,0,a)]}return o.domain=function(t){return arguments.length?(e=i.b.call(t),a=Math.min(e.length,n.length-1),o):e.slice()},o.range=function(t){return arguments.length?(n=i.b.call(t),a=Math.min(e.length,n.length-1),o):n.slice()},o.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},o.copy=function(){return t().domain(e).range(n)},o};var r=n(10),i=n(27)},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Object(r.a)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):i:null},e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setTime(Math.floor(t/i.d)*i.d)}),(function(t,e){t.setTime(+t+e*i.d)}),(function(t,e){return(e-t)/i.d}),(function(t){return t.getUTCSeconds()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setTime(Math.floor(t/i.c)*i.c)}),(function(t,e){t.setTime(+t+e*i.c)}),(function(t,e){return(e-t)/i.c}),(function(t){return t.getMinutes()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){var e=t.getTimezoneOffset()*i.c%i.b;e<0&&(e+=i.b),t.setTime(Math.floor((+t-e)/i.b)*i.b+e)}),(function(t,e){t.setTime(+t+e*i.b)}),(function(t,e){return(e-t)/i.b}),(function(t){return t.getHours()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.c)/i.a}),(function(t){return t.getDate()-1}));e.a=a,a.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return s}));var r=n(4),i=n(15);function a(t){return Object(r.a)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.c)/i.e}))}var o=a(0),c=a(1),u=a(2),f=a(3),s=a(4),l=a(5),d=a(6);o.range,c.range,u.range,f.range,s.range,l.range,d.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*i.c)}),(function(t,e){return(e-t)/i.c}),(function(t){return t.getUTCMinutes()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*i.b)}),(function(t,e){return(e-t)/i.b}),(function(t){return t.getUTCHours()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.a}),(function(t){return t.getUTCDate()-1}));e.a=a,a.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return s}));var r=n(4),i=n(15);function a(t){return Object(r.a)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.e}))}var o=a(0),c=a(1),u=a(2),f=a(3),s=a(4),l=a(5),d=a(6);o.range,c.range,u.range,f.range,s.range,l.range,d.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},e.a=i,i.range},function(t,e,n){"use strict";var r=n(238),i=n(124);+new Date("2000-01-01T00:00:00.000Z")||Object(i.c)(r.a)},function(t,e,n){"use strict";var r=n(235),i=n(236),a=n(123);e.a=function(){return Object(r.a)(a.v,a.q,a.u,a.l,a.m,a.o,a.r,a.n,i.b).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6")},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9")},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5")},function(t,e,n){"use strict";var r=n(9),i=n(8);e.a=Object(i.b)(Object(r.b)(300,.5,0),Object(r.b)(-240,.5,1))},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var r=n(9),i=n(8),a=Object(i.b)(Object(r.b)(-100,.75,.35),Object(r.b)(80,1.5,.8)),o=Object(i.b)(Object(r.b)(260,.75,.35),Object(r.b)(80,1.5,.8)),c=Object(r.b)();e.b=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return c.h=360*t-100,c.s=1.5-1.5*e,c.l=.8-.9*e,c+""}},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return c}));var r=n(49);function i(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}e.a=i(Object(r.a)("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var a=i(Object(r.a)("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),o=i(Object(r.a)("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),c=i(Object(r.a)("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},function(t,e,n){"use strict";e.a=function t(e){var n=0,i=1,a=!1;function o(t){var r=(t-n)/(i-n);return e(a?Math.max(0,Math.min(1,r)):r)}return o.domain=function(t){return arguments.length?(n=+t[0],i=+t[1],o):[n,i]},o.clamp=function(t){return arguments.length?(a=!!t,o):a},o.interpolator=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return t(e).domain([n,i]).clamp(a)},Object(r.b)(o)};var r=n(48)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildColorValue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Math.E;if((0,a.default)(t))return t;var o="-"===t[0],c="-"===t[0]?t.slice(1):t;if(u[c]){var s=f(u[c],e,n,o,r,i);return function(t){return s(t.value)}}return t};var r,i=n(24),a=(r=i)&&r.__esModule?r:{default:r},o=n(225),c=n(567),u={BrBG:c.interpolateBrBG,PRGn:c.interpolatePRGn,PiYG:c.interpolatePiYG,PuOr:c.interpolatePuOr,RdBu:c.interpolateRdBu,RdGy:c.interpolateRdGy,RdYlBu:c.interpolateRdYlBu,RdYlGn:c.interpolateRdYlGn,Spectral:c.interpolateSpectral,Blues:c.interpolateBlues,Greens:c.interpolateGreens,Greys:c.interpolateGreys,Oranges:c.interpolateOranges,Purples:c.interpolatePurples,Reds:c.interpolateReds,BuGn:c.interpolateBuGn,BuPu:c.interpolateBuPu,GnBu:c.interpolateGnBu,OrRd:c.interpolateOrRd,PuBuGn:c.interpolatePuBuGn,PuBu:c.interpolatePuBu,PuRd:c.interpolatePuRd,RdPu:c.interpolateRdPu,YlGnBu:c.interpolateYlGnBu,YlGn:c.interpolateYlGn,YlOrBr:c.interpolateYlOrBr,YlOrRd:c.interpolateYlOrRd},f=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Math.E;if(i&&e*n<=0&&console.warn("As log(0) = -∞, a log scale domain must be\n strictly-positive or strictly-negative. logscale ignored"),i&&e*n>0){var c=(0,o.scaleLog)().base(a).domain(r?[n,e]:[e,n]).range([0,1]);return(0,o.scaleSequential)((function(e){return t(c(e))})).domain([0,1])}return(0,o.scaleSequential)(t).domain(r?[n,e]:[e,n])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(568);n.d(e,"schemeCategory10",(function(){return r.a}));var i=n(569);n.d(e,"schemeAccent",(function(){return i.a}));var a=n(570);n.d(e,"schemeDark2",(function(){return a.a}));var o=n(571);n.d(e,"schemePaired",(function(){return o.a}));var c=n(572);n.d(e,"schemePastel1",(function(){return c.a}));var u=n(573);n.d(e,"schemePastel2",(function(){return u.a}));var f=n(574);n.d(e,"schemeSet1",(function(){return f.a}));var s=n(575);n.d(e,"schemeSet2",(function(){return s.a}));var l=n(576);n.d(e,"schemeSet3",(function(){return l.a}));var d=n(577);n.d(e,"interpolateBrBG",(function(){return d.a})),n.d(e,"schemeBrBG",(function(){return d.b}));var h=n(578);n.d(e,"interpolatePRGn",(function(){return h.a})),n.d(e,"schemePRGn",(function(){return h.b}));var b=n(579);n.d(e,"interpolatePiYG",(function(){return b.a})),n.d(e,"schemePiYG",(function(){return b.b}));var p=n(580);n.d(e,"interpolatePuOr",(function(){return p.a})),n.d(e,"schemePuOr",(function(){return p.b}));var v=n(581);n.d(e,"interpolateRdBu",(function(){return v.a})),n.d(e,"schemeRdBu",(function(){return v.b}));var y=n(582);n.d(e,"interpolateRdGy",(function(){return y.a})),n.d(e,"schemeRdGy",(function(){return y.b}));var _=n(583);n.d(e,"interpolateRdYlBu",(function(){return _.a})),n.d(e,"schemeRdYlBu",(function(){return _.b}));var g=n(584);n.d(e,"interpolateRdYlGn",(function(){return g.a})),n.d(e,"schemeRdYlGn",(function(){return g.b}));var m=n(585);n.d(e,"interpolateSpectral",(function(){return m.a})),n.d(e,"schemeSpectral",(function(){return m.b}));var x=n(586);n.d(e,"interpolateBuGn",(function(){return x.a})),n.d(e,"schemeBuGn",(function(){return x.b}));var w=n(587);n.d(e,"interpolateBuPu",(function(){return w.a})),n.d(e,"schemeBuPu",(function(){return w.b}));var j=n(588);n.d(e,"interpolateGnBu",(function(){return j.a})),n.d(e,"schemeGnBu",(function(){return j.b}));var O=n(589);n.d(e,"interpolateOrRd",(function(){return O.a})),n.d(e,"schemeOrRd",(function(){return O.b}));var M=n(590);n.d(e,"interpolatePuBuGn",(function(){return M.a})),n.d(e,"schemePuBuGn",(function(){return M.b}));var k=n(591);n.d(e,"interpolatePuBu",(function(){return k.a})),n.d(e,"schemePuBu",(function(){return k.b}));var A=n(592);n.d(e,"interpolatePuRd",(function(){return A.a})),n.d(e,"schemePuRd",(function(){return A.b}));var T=n(593);n.d(e,"interpolateRdPu",(function(){return T.a})),n.d(e,"schemeRdPu",(function(){return T.b}));var S=n(594);n.d(e,"interpolateYlGnBu",(function(){return S.a})),n.d(e,"schemeYlGnBu",(function(){return S.b}));var P=n(595);n.d(e,"interpolateYlGn",(function(){return P.a})),n.d(e,"schemeYlGn",(function(){return P.b}));var R=n(596);n.d(e,"interpolateYlOrBr",(function(){return R.a})),n.d(e,"schemeYlOrBr",(function(){return R.b}));var E=n(597);n.d(e,"interpolateYlOrRd",(function(){return E.a})),n.d(e,"schemeYlOrRd",(function(){return E.b}));var C=n(598);n.d(e,"interpolateBlues",(function(){return C.a})),n.d(e,"schemeBlues",(function(){return C.b}));var I=n(599);n.d(e,"interpolateGreens",(function(){return I.a})),n.d(e,"schemeGreens",(function(){return I.b}));var N=n(600);n.d(e,"interpolateGreys",(function(){return N.a})),n.d(e,"schemeGreys",(function(){return N.b}));var D=n(601);n.d(e,"interpolatePurples",(function(){return D.a})),n.d(e,"schemePurples",(function(){return D.b}));var z=n(602);n.d(e,"interpolateReds",(function(){return z.a})),n.d(e,"schemeReds",(function(){return z.b}));var B=n(603);n.d(e,"interpolateOranges",(function(){return B.a})),n.d(e,"schemeOranges",(function(){return B.b}));var U=n(604);n.d(e,"interpolateCubehelixDefault",(function(){return U.a}));var L=n(605);n.d(e,"interpolateRainbow",(function(){return L.b})),n.d(e,"interpolateWarm",(function(){return L.c})),n.d(e,"interpolateCool",(function(){return L.a}));var W=n(606);n.d(e,"interpolateSinebow",(function(){return W.a}));var F=n(607);n.d(e,"interpolateViridis",(function(){return F.a})),n.d(e,"interpolateMagma",(function(){return F.c})),n.d(e,"interpolateInferno",(function(){return F.b})),n.d(e,"interpolatePlasma",(function(){return F.d}))},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";var r=n(9),i=n(8);e.a=Object(i.b)(Object(r.b)(300,.5,0),Object(r.b)(-240,.5,1))},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var r=n(9),i=n(8),a=Object(i.b)(Object(r.b)(-100,.75,.35),Object(r.b)(80,1.5,.8)),o=Object(i.b)(Object(r.b)(260,.75,.35),Object(r.b)(80,1.5,.8)),c=Object(r.b)();e.b=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return c.h=360*t-100,c.s=1.5-1.5*e,c.l=.8-.9*e,c+""}},function(t,e,n){"use strict";var r=n(9),i=Object(r.f)(),a=Math.PI/3,o=2*Math.PI/3;e.a=function(t){var e;return t=(.5-t)*Math.PI,i.r=255*(e=Math.sin(t))*e,i.g=255*(e=Math.sin(t+a))*e,i.b=255*(e=Math.sin(t+o))*e,i+""}},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return c}));var r=n(0);function i(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}e.a=i(Object(r.a)("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var a=i(Object(r.a)("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),o=i(Object(r.a)("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),c=i(Object(r.a)("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderAxes=e._buildAxesData=void 0;var r=c(n(609)),i=c(n(105)),a=n(13),o=c(n(612));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(t,e,n){return{value:t,thickness:e.thickness||1,color:e.color||"#d3d3d3",opacity:e.opacity||n.opacity}},f=e._buildAxesData=function(t){return(0,i.default)(t.axes,(function(e,n){if(!n.position&&!n.spacing)return o.default.warn("Skipping axe group with no position and spacing defined"),e;if(n.position&&e.push(u(n.position,n,t)),n.spacing){var i=(0,r.default)(n.start||t.cmin,n.end||t.cmax,n.spacing).map((function(e){return u(e,n,t)}));return e.concat(i)}return e}),[])};e.renderAxes=function(t,e,n,r){var i=f(e),o=(0,a.arc)().innerRadius((function(t){return"in"===e.direction?e.outerRadius-r(t.value):e.innerRadius+r(t.value)})).outerRadius((function(t){return"in"===e.direction?e.outerRadius-r(t.value):e.innerRadius+r(t.value)})).startAngle(0).endAngle((function(t){return t.length})),c=t.selectAll(".axis").data((function(t){var e=n._layout.blocks[t.key];return i.map((function(n){return{value:n.value,thickness:n.thickness,color:n.color,opacity:n.opacity,block_id:t.key,length:e.end-e.start}}))})).enter().append("path").attr("opacity",(function(t){return t.opacity})).attr("class","axis").attr("d",o).attr("stroke-width",(function(t){return t.thickness})).attr("stroke",(function(t){return t.color}));return e.showAxesTooltip&&(c.on("mouseover",(function(t,e){n.tip.html(t.value).transition().style("opacity",.9).style("left",event.pageX+"px").style("top",event.pageY-28+"px")})),c.on("mouseout",(function(t,e){n.tip.transition().duration(500).style("opacity",0)}))),c}},function(t,e,n){var r=n(610)();t.exports=r},function(t,e,n){var r=n(611),i=n(63),a=n(223);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e-1:!!s&&r(t,e,n)>-1}},function(t,e,n){var r=n(16),i=n(2),a=n(6);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(616),i=n(18);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(40);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e,n){var r=n(618),i=n(619),a=n(33),o=n(2),c=n(63);t.exports=function(t,e,n){var u=o(t)?r:i;return n&&c(t,e,n)&&(e=void 0),u(t,a(e,3))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n=1?t:t*e},p=function(t){function e(t,n,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,h,r,a.parseChordData))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"getCoordinates",value:function(t,e,n,r){var i=e.blocks[t.id],a=i.start+t.start/i.len*(i.end-i.start),o=i.start+t.end/i.len*(i.end-i.start),c=void 0;return(0,f.default)(n.radius)?c=b(n.radius(r),e.conf.innerRadius):n.radius&&(c=b(n.radius,e.conf.innerRadius)),c||(c=e.conf.innerRadius),{radius:c,startAngle:a,endAngle:o}}},{key:"renderChords",value:function(t,e,n,r,i,a){var o=this,u=t.append("g").selectAll(".chord").data(r).enter().append("path").attr("class","chord").attr("d",(0,c.ribbon)().source((function(t){return a(t.source,i._layout,o.conf,t)})).target((function(t){return a(t.target,i._layout,o.conf,t)}))).attr("opacity",n.opacity).on("mouseover",(function(t){o.dispatch.call("mouseover",o,t),i.clipboard.attr("value",n.tooltipContent(t))})).on("mouseout",(function(t){return o.dispatch.call("mouseout",o,t)}));return Object.keys(n.events).forEach((function(t){u.on(t,(function(e,r,i){n.events[t](e,r,i,s.event)}))})),u.attr("fill",n.colorValue),u}},{key:"render",value:function(t,e,n){e.select("."+n).remove();var r=e.append("g").attr("class",n).attr("z-index",this.conf.zIndex),i=this.renderChords(r,n,this.conf,this.data,t,this.getCoordinates);return this.conf.tooltipContent&&(0,o.registerTooltip)(this,t,i,this.conf),this}}]),e}(i.default);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(624);n.d(e,"chord",(function(){return r.a}));var i=n(625);n.d(e,"ribbon",(function(){return i.a}))},function(t,e,n){"use strict";var r=n(10),i=n(239);function a(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}e.a=function(){var t=0,e=null,n=null,o=null;function c(a){var c,u,f,s,l,d,h=a.length,b=[],p=Object(r.range)(h),v=[],y=[],_=y.groups=new Array(h),g=new Array(h*h);for(c=0,l=-1;++lt.position+r?t.groups.push([e]):t.groups[t.groups.length-1].push(e),t.position=e.position,t)}),{position:null,groups:[]}).groups):[t.values];var n,r})).enter().append("g").attr("class","line").append("path").datum((function(t){return t.map((function(t){var i=r.scale(t.value);return(0,o.default)(t,{angle:r.theta(t.position,n.blocks[t.block_id])},function(t){return e.fill?{innerRadius:"out"===e.direction?e.innerRadius:e.outerRadius-t,outerRadius:"out"===e.direction?e.innerRadius+t:e.outerRadius}:{radius:"out"===e.direction?e.innerRadius+t:e.outerRadius-t}}(i))}))})).attr("d",f).attr("opacity",e.opacity).attr("stroke-width",e.thickness).attr("stroke",e.colorValue).attr("fill","none");return e.fill&&l.attr("fill",e.fillColor),l}}]),e}(i.default);e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;ne.end?-1:t.start==e.start&&t.end==e.end?0:1}));var r=[];(0,u.default)(t.values,(function(t){var n=!1;(0,u.default)(r,(function(r,i){if(r.slice(0).pop().end+e0))return o;do{o.push(a=new Date(+t)),n(t,i),e(t)}while(a=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!r(t););else for(;--e>=0;)for(;n(t,1),!r(t););}))},a&&(c.count=function(t,n){return r.setTime(+t),i.setTime(+n),e(r),e(i),Math.floor(a(r,i))},c.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?c.filter(o?function(e){return o(e)%t==0}:function(e){return c.count(0,e)%t==0}):c:null}),c};var r=new Date,i=new Date},function(t,e,n){var r=n(128),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){"use strict";var r=n(99);n.d(e,"a",(function(){return r.a})),n(171),n(102),n(169),n(172);var i=n(69);n.d(e,"c",(function(){return i.a})),n(173);var a=n(357);n.d(e,"f",(function(){return a.a}));var o=n(174);n.d(e,"g",(function(){return o.a}));var c=n(358);n.d(e,"h",(function(){return c.a})),n.d(e,"i",(function(){return c.b}));var u=n(361);n.d(e,"j",(function(){return u.a}));var f=n(168);n.d(e,"d",(function(){return f.a})),n.d(e,"e",(function(){return f.b})),n(362),n(363),n(364);var s=n(365);n.d(e,"b",(function(){return s.a})),n(366)},function(t,e,n){"use strict";var r=n(100);n.d(e,"a",(function(){return r.e})),n.d(e,"f",(function(){return r.g})),n.d(e,"d",(function(){return r.f}));var i=n(355);n.d(e,"e",(function(){return i.a})),n.d(e,"c",(function(){return i.b}));var a=n(356);n.d(e,"b",(function(){return a.a}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(197);n.d(e,"bisect",(function(){return r.c})),n.d(e,"bisectRight",(function(){return r.b})),n.d(e,"bisectLeft",(function(){return r.a}));var i=n(36);n.d(e,"ascending",(function(){return i.a}));var a=n(198);n.d(e,"bisector",(function(){return a.a}));var o=n(452);n.d(e,"cross",(function(){return o.a}));var c=n(453);n.d(e,"descending",(function(){return c.a}));var u=n(200);n.d(e,"deviation",(function(){return u.a}));var f=n(202);n.d(e,"extent",(function(){return f.a}));var s=n(454);n.d(e,"histogram",(function(){return s.a}));var l=n(457);n.d(e,"thresholdFreedmanDiaconis",(function(){return l.a}));var d=n(458);n.d(e,"thresholdScott",(function(){return d.a}));var h=n(206);n.d(e,"thresholdSturges",(function(){return h.a}));var b=n(459);n.d(e,"max",(function(){return b.a}));var p=n(460);n.d(e,"mean",(function(){return p.a}));var v=n(461);n.d(e,"median",(function(){return v.a}));var y=n(462);n.d(e,"merge",(function(){return y.a}));var _=n(207);n.d(e,"min",(function(){return _.a}));var g=n(199);n.d(e,"pairs",(function(){return g.a}));var m=n(463);n.d(e,"permute",(function(){return m.a}));var x=n(112);n.d(e,"quantile",(function(){return x.a}));var w=n(204);n.d(e,"range",(function(){return w.a}));var j=n(464);n.d(e,"scan",(function(){return j.a}));var O=n(465);n.d(e,"shuffle",(function(){return O.a}));var M=n(466);n.d(e,"sum",(function(){return M.a}));var k=n(205);n.d(e,"ticks",(function(){return k.a})),n.d(e,"tickIncrement",(function(){return k.b})),n.d(e,"tickStep",(function(){return k.c}));var A=n(208);n.d(e,"transpose",(function(){return A.a}));var T=n(201);n.d(e,"variance",(function(){return T.a}));var S=n(467);n.d(e,"zip",(function(){return S.a}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return C})),e.a=I;var r=n(315),i=n(316),a=n(317),o=n(318),c=n(162),u=n(320),f=n(321),s=n(322),l=n(323),d=n(324),h=n(325),b=n(326),p=n(327),v=n(328),y=n(329),_=n(330),g=n(164),m=n(331),x=n(332),w=n(333),j=n(334),O=n(335),M=n(336),k=n(337),A=n(338),T=n(339),S=n(340),P=n(341),R=n(97),E=n(342),C=[null];function I(t,e){this._groups=t,this._parents=e}function N(){return new I([[document.documentElement]],C)}I.prototype=N.prototype={constructor:I,select:r.a,selectAll:i.a,filter:a.a,data:o.a,enter:c.b,exit:u.a,merge:f.a,order:s.a,sort:l.a,call:d.a,nodes:h.a,node:b.a,size:p.a,empty:v.a,each:y.a,attr:_.a,style:g.a,property:m.a,classed:x.a,text:w.a,html:j.a,raise:O.a,lower:M.a,append:k.a,insert:A.a,remove:T.a,clone:S.a,datum:P.a,on:R.b,dispatch:E.a},e.b=N},function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return s})),e.g=function(t,e){var n=l(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n},e.h=function(t,e){var n=l(t,e);if(n.state>u)throw new Error("too late; already started");return n},e.f=l;var r=n(68),i=n(177),a=Object(r.dispatch)("start","end","interrupt"),o=[],c=1,u=2,f=5,s=6;function l(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}e.e=function(t,e,n,r,l,d){var h=t.__transition;if(h){if(n in h)return}else t.__transition={};!function(t,e,n){var r,a=t.__transition;function o(f){var h,b,p,v;if(n.state!==c)return d();for(h in a)if((v=a[h]).name===n.name){if(3===v.state)return Object(i.b)(o);4===v.state?(v.state=s,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete a[h]):+h0&&(0,l.renderAxes)(o,this.conf,t,this.scale);var u=this.renderDatum(o,this.conf,t._layout);return this.conf.tooltipContent&&(0,i.registerTooltip)(this,t,u,this.conf),u.on("mouseover",(function(e,n){r.dispatch.call("mouseover",r,e),r.conf.tooltipContent&&t.clipboard.attr("value",r.conf.tooltipContent(e))})),u.on("mouseout",(function(t,e){r.dispatch.call("mouseout",r,t)})),Object.keys(this.conf.events).forEach((function(t){var e=r.conf;u.on(t,(function(n,r,i){e.events[t](n,r,i,c.event)}))})),this}},{key:"renderBlock",value:function(t,e,n,r){var i=this,a=t.selectAll(".block").data(e).enter().append("g").attr("class","block").attr("transform",(function(t){return"rotate("+360*n.blocks[t.key].start/(2*Math.PI)+")"}));return r.backgrounds&&a.selectAll(".background").data((function(t){return r.backgrounds.map((function(e){return{start:e.start||r.cmin,end:e.end||r.cmax,angle:n.blocks[t.key].end-n.blocks[t.key].start,color:e.color,opacity:e.opacity}}))})).enter().append("path").attr("class","background").attr("fill",(function(t){return t.color})).attr("opacity",(function(t){return t.opacity||1})).attr("d",(0,o.arc)().innerRadius((function(t){return"in"===r.direction?r.outerRadius-i.scale(t.start):r.innerRadius+i.scale(t.start)})).outerRadius((function(t){return"in"===r.direction?r.outerRadius-i.scale(t.end):r.innerRadius+i.scale(t.end)})).startAngle(0).endAngle((function(t){return t.angle}))),a}},{key:"theta",value:function(t,e){return t/e.len*(e.end-e.start)}},{key:"x",value:function(t,e,n){var r=this.scale(t.value),i="in"===n.direction?n.outerRadius-r:n.innerRadius+r,a=this.theta(t.position,e.blocks[t.block_id])-Math.PI/2;return i*Math.cos(a)}},{key:"y",value:function(t,e,n){var r=this.scale(t.value),i="in"===n.direction?n.outerRadius-r:n.innerRadius+r,a=this.theta(t.position,e.blocks[t.block_id])-Math.PI/2;return i*Math.sin(a)}}]),t}();e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSpanValueData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})))},e.parseSpanStringData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})).filter((function(t,e){return l({start:t.start,end:t.end},e)})).filter((function(t){return!(t.start<0||t.end>e[t.block_id])||(f.log(2,"position","position inconsistency",{datum:t,layoutSummary:e}),!1)})))},e.parsePositionValueData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})).filter((function(t,e){return l({position:t.position,value:t.value},e)})))},e.parsePositionTextData=function(t,e){return 0===t.length?{data:[],meta:{min:null,max:null}}:d(t.filter((function(t,n){return s(t.block_id,n,e,"parent")})).filter((function(t,e){return l({position:t.position},e)})))},e.parseChordData=function(t,e){if(0===t.length)return{data:[],meta:{min:null,max:null}};var n=t.filter((function(t,n){return t.source?s(t.source.id,n,e,"sourceId"):(f.warn("No source for data at index "+n),!1)})).filter((function(t,n){return t.target?s(t.target.id,n,e,"targetId"):(f.warn("No target for data at index "+n),!1)})).filter((function(t,e){return l({sourceStart:t.source.start,sourceEnd:t.source.end,targetStart:t.target.start,targetEnd:t.target.end,value:t.value||1},e)}));return{data:n,meta:{min:(0,c.min)(n,(function(t){return t.value})),max:(0,c.max)(n,(function(t){return t.value}))}}};var r=u(n(18)),i=u(n(613)),a=u(n(617)),o=(u(n(144)),n(227)),c=n(10);function u(t){return t&&t.__esModule?t:{default:t}}var f=console;function s(t,e,n,a){return!!(0,i.default)((0,r.default)(n),t)||(f.log(1,"datum","unknown parent id",{line:e+1,value:t,header:a,layoutSummary:n}),!1)}function l(t,e){return(0,a.default)(t,(function(t,n){return!isNaN(t)||(f.log(1,"datum","not a number",{line:e+1,value:t,header:n}),!1)}))}function d(t){return{data:(0,o.nest)().key((function(t){return t.block_id})).entries(t),meta:{min:(0,c.min)(t,(function(t){return t.value})),max:(0,c.max)(t,(function(t){return t.value}))}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={min:{value:null,iteratee:!1},max:{value:null,iteratee:!1},logScale:{value:!1,iteratee:!1},logScaleBase:{value:Math.E,iteratee:!1}};e.axes={axes:{value:[],iteratee:!1},showAxesTooltip:{value:!0,iteratee:!1}},e.palette={colorPaletteSize:{value:9,iteratee:!1},colorPalette:{value:"YlGnBu",iteratee:!1},usePalette:{value:!0,iteratee:!1},colorPaletteReverse:{value:!0,iteratee:!1}},e.radial={innerRadius:{value:0,iteratee:!1},outerRadius:{value:0,iteratee:!1}},e.values=r,e.common={zIndex:{value:!1,iteratee:!1},opacity:{value:1,iteratee:!0},tooltipContent:{value:null,iteratee:!1},events:{value:{},iteratee:!1}}},function(t,e,n){var r=n(243),i=n(248);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(16),i=n(7);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e){t.exports={}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var r=Array.prototype,i=r.map,a=r.slice},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(5).Symbol;t.exports=r},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++ne?1:t>=e?0:NaN}},function(t,e,n){var r=n(476),i=n(478);t.exports=function(t,e,n){return r(i,t,e,n)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(283),i=n(285)(r);t.exports=i},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n180||n<-180?n-360*Math.round(n/360):n):Object(r.a)(isNaN(t)?e:t)},e.b=function(t){return 1==(t=+t)?a:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Object(r.a)(isNaN(e)?n:e)}},e.a=a;var r=n(170);function i(t,e){return function(n){return t+n*e}}function a(t,e){var n=e-t;return n?i(t,n):Object(r.a)(isNaN(t)?e:t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"h",(function(){return o})),n.d(e,"i",(function(){return c})),n.d(e,"k",(function(){return u})),n.d(e,"l",(function(){return f})),n.d(e,"f",(function(){return s})),n.d(e,"j",(function(){return l})),n.d(e,"g",(function(){return d})),n.d(e,"m",(function(){return h})),e.b=function(t){return t>1?0:t<-1?l:Math.acos(t)},e.c=function(t){return t>=1?d:t<=-1?-d:Math.asin(t)};var r=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,c=Math.min,u=Math.sin,f=Math.sqrt,s=1e-12,l=Math.PI,d=l/2,h=2*l},function(t,e,n){"use strict";e.a=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],c=o.length;a=0;)n[e]=e;return n}},function(t,e,n){"use strict";e.a=function(t){return null===t?NaN:+t}},function(t,e,n){"use strict";e.b=c,e.a=function t(){var e=Object(a.b)(a.c,i.c);return e.copy=function(){return Object(a.a)(e,t())},c(e)};var r=n(10),i=n(8),a=n(76),o=n(527);function c(t){var e=t.domain;return t.ticks=function(t){var n=e();return Object(r.ticks)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){return Object(o.a)(e(),t,n)},t.nice=function(n){null==n&&(n=10);var i,a=e(),o=0,c=a.length-1,u=a[o],f=a[c];return f0?(u=Math.floor(u/i)*i,f=Math.ceil(f/i)*i,i=Object(r.tickIncrement)(u,f,n)):i<0&&(u=Math.ceil(u*i)/i,f=Math.floor(f*i)/i,i=Object(r.tickIncrement)(u,f,n)),i>0?(a[o]=Math.floor(u/i)*i,a[c]=Math.ceil(f/i)*i,e(a)):i<0&&(a[o]=Math.ceil(u*i)/i,a[c]=Math.floor(f*i)/i,e(a)),t},t}},function(t,e,n){"use strict";e.a=function(t){return t.match(/.{6}/g).map((function(t){return"#"+t}))}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(52),i=n(255),a=n(256),o=n(257),c=n(258),u=n(259);function f(t){var e=this.__data__=new r(t);this.size=e.size}f.prototype.clear=i,f.prototype.delete=a,f.prototype.get=o,f.prototype.has=c,f.prototype.set=u,t.exports=f},function(t,e,n){var r=n(250),i=n(251),a=n(252),o=n(253),c=n(254);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t2?l:s,r=o=null,y}function y(e){return(r||(r=n(d,h,p?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}(t):t,b)))(+e)}return y.invert=function(t){return(o||(o=n(h,d,f,p?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}(e):e)))(+t)},y.domain=function(t){return arguments.length?(d=a.a.call(t,c.a),v()):d.slice()},y.range=function(t){return arguments.length?(h=a.b.call(t),v()):h.slice()},y.rangeRound=function(t){return h=a.b.call(t),b=i.f,v()},y.clamp=function(t){return arguments.length?(p=!!t,v()):p},y.interpolate=function(t){return arguments.length?(b=t,v()):b},v()};var r=n(10),i=n(8),a=n(27),o=n(121),c=n(228),u=[0,1];function f(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Object(o.a)(e)}function s(t,e,n,r){var i=t[0],a=t[1],o=e[0],c=e[1];return a-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(277),i=n(60),a=n(89),o=a&&a.isTypedArray,c=o?i(o):r;t.exports=c},function(t,e,n){(function(t){var r=n(128),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,c=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=c}).call(e,n(84)(t))},function(t,e,n){var r=n(83),i=n(38),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(149),i=n(150),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,c=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=c},function(t,e,n){var r=n(2),i=n(34),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},function(t,e,n){"use strict";var r=n(94);e.a=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.a.hasOwnProperty(e)?{space:r.a[e],local:t}:t}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r}));var r="http://www.w3.org/1999/xhtml";e.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,e,n){"use strict";function r(){}e.a=function(t){return null==t?r:function(){return this.querySelector(t)}}},function(t,e,n){"use strict";e.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),e.a=function(t,e,n,r){var a=i;t.sourceEvent=i,i=t;try{return e.apply(n,r)}finally{i=a}};var r={},i=null;function a(t,e,n){return t=o(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function o(t,e,n){return function(r){var a=i;i=r;try{t.call(this,this.__data__,e,n)}finally{i=a}}}function c(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function u(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=d.exec(t))?new O(e[1],e[2],e[3],1):(e=h.exec(t))?new O(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=b.exec(t))?x(e[1],e[2],e[3],e[4]):(e=p.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=v.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=y.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):_.hasOwnProperty(t)?m(_[t]):"transparent"===t?new O(NaN,NaN,NaN,0):null}function m(t){return new O(t>>16&255,t>>8&255,255&t,1)}function x(t,e,n,r){return r<=0&&(t=e=n=NaN),new O(t,e,n,r)}function w(t){return t instanceof i||(t=g(t)),t?new O((t=t.rgb()).r,t.g,t.b,t.opacity):new O}function j(t,e,n,r){return 1===arguments.length?w(t):new O(t,e,n,null==r?1:r)}function O(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function M(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new T(t,e,n,r)}function k(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=g(t)),!t)return new T;if(t instanceof T)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),o=Math.max(e,n,r),c=NaN,u=o-a,f=(o+a)/2;return u?(c=e===o?(n-r)/u+6*(n0&&f<1?0:c,new T(c,u,f,t.opacity)}function A(t,e,n,r){return 1===arguments.length?k(t):new T(t,e,n,null==r?1:r)}function T(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function S(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Object(r.a)(i,g,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Object(r.a)(O,j,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new O(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?a:Math.pow(a,t),new O(this.r*t,this.g*t,this.b*t,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},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}})),Object(r.a)(T,A,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?a:Math.pow(a,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new O(S(t>=240?t-240:t+120,i,r),S(t,i,r),S(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))},function(t,e,n){"use strict";e.b=function(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n},e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";function r(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}e.a=r,e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],c=i>0?t[i-1]:2*a-o,u=i=0&&e._call.call(null,t),e=e._next;--a}()}finally{a=0,function(){for(var t,e,n=r,a=1/0;n;)n._call?(a>n._time&&(a=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,g(a)}(),f=0}}function _(){var t=l.now(),e=t-u;e>1e3&&(s-=e,u=t)}function g(t){a||(o&&(o=clearTimeout(o)),t-f>24?(t<1/0&&(o=setTimeout(y,t-l.now()-s)),c&&(c=clearInterval(c))):(c||(u=l.now(),c=setInterval(_,1e3)),a=1,d(y)))}p.prototype=v.prototype={constructor:p,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?h():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,g()},stop:function(){this._call&&(this._call=null,this._time=1/0,g())}}},function(t,e,n){var r=n(51),i=n(64),a=n(90),o=n(181),c=n(404),u=n(134),f=n(30),s=n(405),l=n(406),d=n(147),h=n(407),b=n(41),p=n(408),v=n(409),y=n(137),_=n(2),g=n(59),m=n(413),x=n(7),w=n(415),j=n(18),O={};O["[object Arguments]"]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O["[object Object]"]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O["[object Function]"]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,M,k,A,T){var S,P=1&n,R=2&n,E=4&n;if(M&&(S=A?M(e,k,A,T):M(e)),void 0!==S)return S;if(!x(e))return e;var C=_(e);if(C){if(S=p(e),!P)return f(e,S)}else{var I=b(e),N="[object Function]"==I||"[object GeneratorFunction]"==I;if(g(e))return u(e,P);if("[object Object]"==I||"[object Arguments]"==I||N&&!A){if(S=R||N?{}:y(e),!P)return R?l(e,c(S,e)):s(e,o(S,e))}else{if(!O[I])return A?e:{};S=v(e,I,P)}}T||(T=new r);var D=T.get(e);if(D)return D;if(T.set(e,S),w(e))return e.forEach((function(r){S.add(t(r,n,M,r,e,T))})),S;if(m(e))return e.forEach((function(r,i){S.set(i,t(r,n,M,i,e,T))})),S;var z=E?R?h:d:R?keysIn:j,B=C?void 0:z(e);return i(B||e,(function(r,i){B&&(r=e[i=r]),a(S,i,t(r,n,M,i,e,T))})),S}},function(t,e,n){var r=n(417),i=n(39),a=n(33),o=n(418),c=n(2);t.exports=function(t,e,n){var u=c(t)?r:o,f=arguments.length<3;return u(t,a(e,4),n,f,i)}},function(t,e,n){var r=n(107),i=n(422),a=n(78),o=n(63),c=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=c},function(t,e,n){var r=n(65),i=n(421);t.exports=function t(e,n,a,o,c){var u=-1,f=e.length;for(a||(a=i),c||(c=[]);++u0&&a(s)?n>1?t(s,n-1,a,o,c):r(c,s):o||(c[c.length]=s)}return c}},function(t,e,n){"use strict";var r=n(35),i=n(25),a=n(71),o=n(109);e.a=function(){var t=o.a,e=o.b,n=Object(i.a)(!0),c=null,u=a.a,f=null;function s(i){var a,o,s,l=i.length,d=!1;for(null==c&&(f=u(s=Object(r.a)())),a=0;a<=l;++a)!(ar.f){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,f=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/f,a=(a*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/f}if(t._l23_a>r.f){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-e*t._l12_2a)/l,c=(c*s+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(i,a,o,c,t._x2,t._y2)}function o(t,e){this._context=t,this._alpha=e}o.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:a(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new o(t,e):new i.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";e.b=i;var r=n(46);function i(t){for(var e,n=0,r=-1,i=t.length;++r=1)return+n(t[i-1],i-1,t);var i,a=(i-1)*e,o=Math.floor(a),c=+n(t[o],o,t);return c+(+n(t[o+1],o+1,t)-c)*(a-o)}}},function(t,e,n){var r=n(211),i=n(480),a=n(481),o=n(213),c=n(495),u=n(116),f=n(496),s=n(219),l=n(220),d=n(119),h=Math.max;t.exports=function(t,e,n,b,p,v,y,_){var g=2&e;if(!g&&"function"!=typeof t)throw new TypeError("Expected a function");var m=b?b.length:0;if(m||(e&=-97,b=p=void 0),y=void 0===y?y:h(d(y),0),_=void 0===_?_:d(_),m-=p?p.length:0,64&e){var x=b,w=p;b=p=void 0}var j=g?void 0:u(t),O=[t,e,n,b,p,x,w,v,y,_];if(j&&f(O,j),t=O[0],e=O[1],n=O[2],b=O[3],p=O[4],!(_=O[9]=void 0===O[9]?g?0:t.length:h(O[9]-m,0))&&24&e&&(e&=-25),e&&1!=e)M=8==e||16==e?a(t,e,_):32!=e&&33!=e||p.length?o.apply(void 0,O):c(t,e,n,b);else var M=i(t,e,n);return l((j?r:s)(M,O),t,e)}},function(t,e,n){var r=n(56),i=n(115);function a(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}a.prototype=r(i.prototype),a.prototype.constructor=a,t.exports=a},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(212),i=n(483),a=r?function(t){return r.get(t)}:i;t.exports=a},function(t,e,n){var r=n(56),i=n(115);function a(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}a.prototype=r(i.prototype),a.prototype.constructor=a,t.exports=a},function(t,e){t.exports=function(t,e){for(var n=-1,r=t.length,i=0,a=[];++n1?r[0]+r.slice(2):r,+t.slice(n+1)]}},function(t,e,n){"use strict";n(4);var r=n(542);n.d(e,"c",(function(){return r.a})),n.d(e,"n",(function(){return r.a}));var i=n(543);n.d(e,"g",(function(){return i.a})),n.d(e,"r",(function(){return i.a}));var a=n(544);n.d(e,"d",(function(){return a.a}));var o=n(545);n.d(e,"b",(function(){return o.a}));var c=n(546);n.d(e,"a",(function(){return c.a}));var u=n(547);n.d(e,"j",(function(){return u.b})),n.d(e,"h",(function(){return u.b})),n.d(e,"e",(function(){return u.a})),n.d(e,"i",(function(){return u.c}));var f=n(548);n.d(e,"f",(function(){return f.a}));var s=n(549);n.d(e,"k",(function(){return s.a}));var l=n(550);n.d(e,"o",(function(){return l.a}));var d=n(551);n.d(e,"m",(function(){return d.a}));var h=n(552);n.d(e,"l",(function(){return h.a}));var b=n(553);n.d(e,"u",(function(){return b.b})),n.d(e,"s",(function(){return b.b})),n.d(e,"p",(function(){return b.a})),n.d(e,"t",(function(){return b.c}));var p=n(554);n.d(e,"q",(function(){return p.a}));var v=n(555);n.d(e,"v",(function(){return v.a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o}));var r,i,a,o,c,u=n(237);c={dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],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"]},r=Object(u.a)(c),i=r.format,r.parse,a=r.utcFormat,o=r.utcParse},function(t,e,n){var r=n(50),i=n(78),a=n(249),o=n(282),c=i((function(t){return t.push(void 0,a),r(o,void 0,t)}));t.exports=c},function(t,e,n){var r=n(50),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,c=i(a.length-e,0),u=Array(c);++o0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(51),i=n(132),a=n(133),o=n(273),c=n(7),u=n(61),f=n(140);t.exports=function t(e,n,s,l,d){e!==n&&a(n,(function(a,u){if(c(a))d||(d=new r),o(e,n,u,s,t,l,d);else{var h=l?l(f(e,u),a,u+"",e,n,d):void 0;void 0===h&&(h=a),i(e,u,h)}}),u)}},function(t,e,n){var r=n(83),i=n(38);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(272)();t.exports=r},function(t,e,n){(function(t){var r=n(5),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,c=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}}).call(e,n(84)(t))},function(t,e,n){var r=n(85);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(5).Uint8Array;t.exports=r},function(t,e,n){var r=n(56),i=n(86),a=n(57);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(16),i=n(86),a=n(6),o=Function.prototype,c=Object.prototype,u=o.toString,f=c.hasOwnProperty,s=u.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=f.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==s}},function(t,e){t.exports=function(t,e){if("__proto__"!=e)return t[e]}},function(t,e,n){var r=n(279),i=n(58),a=n(2),o=n(59),c=n(62),u=n(88),f=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),s=!n&&i(t),l=!n&&!s&&o(t),d=!n&&!s&&!l&&u(t),h=n||s||l||d,b=h?r(t.length,String):[],p=b.length;for(var v in t)!e&&!f.call(t,v)||h&&("length"==v||l&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||c(v,p))||b.push(v);return b}},function(t,e,n){var r=n(78),i=n(63);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,c=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,c&&i(n[0],n[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++rs))return!1;var d=u.get(t);if(d&&u.get(e))return d==e;var h=-1,b=!0,p=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h1?this.each((null==e?i:"function"==typeof e?o:a)(t,e,null==n?"":n)):c(this.node(),t)}},function(t,e,n){"use strict";e.b=function(t,e){var n=t.document.documentElement,a=Object(r.select)(t).on("dragstart.drag",null);e&&(a.on("click.drag",i.a,!0),setTimeout((function(){a.on("click.drag",null)}),0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)};var r=n(3),i=n(166);e.a=function(t){var e=t.document.documentElement,n=Object(r.select)(t).on("dragstart.drag",i.a,!0);"onselectstart"in e?n.on("selectstart.drag",i.a,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}},function(t,e,n){"use strict";e.b=function(){r.event.stopImmediatePropagation()};var r=n(3);e.a=function(){r.event.preventDefault(),r.event.stopImmediatePropagation()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r=Math.PI/180,i=180/Math.PI},function(t,e,n){"use strict";n.d(e,"b",(function(){return u}));var r=n(9),i=n(102),a=n(169),o=n(43);function c(t){return function(e){var n,i,a=e.length,o=new Array(a),c=new Array(a),u=new Array(a);for(n=0;nu&&(c=e.slice(u,c),s[f]?s[f]+=c:s[++f]=c),(n=n[0])===(o=o[0])?s[f]?s[f]+=o:s[++f]=o:(s[++f]=null,l.push({i:f,x:Object(r.a)(n,o)})),u=a.lastIndex;return ur.d&&n.state=o;--c)d.point(y[c],_[c]);d.lineEnd(),d.areaEnd()}v&&(y[a]=+t(h,a,i),_[a]=+n(h,a,i),d.point(e?+e(h,a,i):y[a],u?+u(h,a,i):_[a]))}if(b)return d=null,b+""||null}function b(){return Object(o.a)().defined(f).curve(l).context(s)}return h.x=function(n){return arguments.length?(t="function"==typeof n?n:Object(i.a)(+n),e=null,h):t},h.x0=function(e){return arguments.length?(t="function"==typeof e?e:Object(i.a)(+e),h):t},h.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Object(i.a)(+t),h):e},h.y=function(t){return arguments.length?(n="function"==typeof t?t:Object(i.a)(+t),u=null,h):n},h.y0=function(t){return arguments.length?(n="function"==typeof t?t:Object(i.a)(+t),h):n},h.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:Object(i.a)(+t),h):u},h.lineX0=h.lineY0=function(){return b().x(t).y(n)},h.lineY1=function(){return b().x(t).y(u)},h.lineX1=function(){return b().x(e).y(n)},h.defined=function(t){return arguments.length?(f="function"==typeof t?t:Object(i.a)(!!t),h):f},h.curve=function(t){return arguments.length?(l=t,null!=s&&(d=l(s)),h):l},h.context=function(t){return arguments.length?(null==t?s=d=null:d=l(s=t),h):s},h}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),e.b=a;var r=a(n(71).a);function i(t){this._curve=t}function a(t){function e(e){return new i(t(e))}return e._curve=t,e}i.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}}},function(t,e,n){"use strict";e.b=a;var r=n(184),i=n(108);function a(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Object(r.b)(t)):e()._curve},t}e.a=function(){return a(Object(i.a)().curve(r.a))}},function(t,e,n){"use strict";e.a=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=Array.prototype.slice},function(t,e,n){"use strict";var r=n(44);e.a={draw:function(t,e){var n=Math.sqrt(e/r.j);t.moveTo(n,0),t.arc(0,0,n,0,r.m)}}},function(t,e,n){"use strict";e.a={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}}},function(t,e,n){"use strict";var r=Math.sqrt(1/3),i=2*r;e.a={draw:function(t,e){var n=Math.sqrt(e/i),a=n*r;t.moveTo(0,-n),t.lineTo(a,0),t.lineTo(0,n),t.lineTo(-a,0),t.closePath()}}},function(t,e,n){"use strict";var r=n(44),i=Math.sin(r.j/10)/Math.sin(7*r.j/10),a=Math.sin(r.m/10)*i,o=-Math.cos(r.m/10)*i;e.a={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),i=a*n,c=o*n;t.moveTo(0,-n),t.lineTo(i,c);for(var u=1;u<5;++u){var f=r.m*u/5,s=Math.cos(f),l=Math.sin(f);t.lineTo(l*n,-s*n),t.lineTo(s*i-l*c,l*i+s*c)}t.closePath()}}},function(t,e,n){"use strict";e.a={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}}},function(t,e,n){"use strict";var r=Math.sqrt(3);e.a={draw:function(t,e){var n=-Math.sqrt(e/(3*r));t.moveTo(0,2*n),t.lineTo(-r*n,-n),t.lineTo(r*n,-n),t.closePath()}}},function(t,e,n){"use strict";var r=-.5,i=Math.sqrt(3)/2,a=1/Math.sqrt(12),o=3*(a/2+1);e.a={draw:function(t,e){var n=Math.sqrt(e/o),c=n/2,u=n*a,f=c,s=n*a+n,l=-f,d=s;t.moveTo(c,u),t.lineTo(f,s),t.lineTo(l,d),t.lineTo(r*c-i*u,i*c+r*u),t.lineTo(r*f-i*s,i*f+r*s),t.lineTo(r*l-i*d,i*l+r*d),t.lineTo(r*c+i*u,r*u-i*c),t.lineTo(r*f+i*s,r*s-i*f),t.lineTo(r*l+i*d,r*d-i*l),t.closePath()}}},function(t,e,n){"use strict";e.a=a;var r=n(72),i=n(74);function a(t,e){this._context=t,this._k=(1-e)/6}a.prototype={areaStart:r.a,areaEnd:r.a,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Object(i.c)(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.b=function t(e){function n(t){return new a(t,e)}return n.tension=function(e){return t(+e)},n}(0)},function(t,e,n){"use strict";e.a=i;var r=n(74);function i(t,e){this._context=t,this._k=(1-e)/6}i.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(t,e){switch(t=+t,e=+e,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:Object(r.c)(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.b=function t(e){function n(t){return new i(t,e)}return n.tension=function(e){return t(+e)},n}(0)},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c}));var r=n(36),i=n(198),a=Object(i.a)(r.a),o=a.right,c=a.left;e.c=o},function(t,e,n){"use strict";var r=n(36);e.a=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Object(r.a)(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}},function(t,e,n){"use strict";function r(t,e){return[t,e]}e.b=r,e.a=function(t,e){null==e&&(e=r);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);n1)return f/(o-1)}},function(t,e,n){"use strict";e.a=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o=n)for(r=i=n;++on&&(r=n),i=n)for(r=i=n;++on&&(r=n),i=r?c*=10:u>=i?c*=5:u>=a&&(c*=2),e=0?(u>=r?10:u>=i?5:u>=a?2:1)*Math.pow(10,c):-Math.pow(10,-c)/(u>=r?10:u>=i?5:u>=a?2:1)}e.a=function(t,e,n){var r,i,a,c,u=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0)for(t=Math.ceil(t/c),e=Math.floor(e/c),a=new Array(i=Math.ceil(e-t+1));++u=n)for(r=n;++an&&(r=n)}else for(;++a=n)for(r=n;++an&&(r=n);return r}},function(t,e,n){"use strict";var r=n(207);function i(t){return t.length}e.a=function(t){if(!(o=t.length))return[];for(var e=-1,n=Object(r.a)(t,i),a=new Array(n);++e3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Math.E;r&&t*e<=0&&console.warn("As log(0) = -∞, a log scale domain must be\n strictly-positive or strictly-negative. logscale ignored");var a=r&&t*e>0?(0,f.scaleLog)().base(i):(0,f.scaleLinear)();return a.domain([t,e]).range([0,n]).clamp(!0)};var r=s(n(475)),i=s(n(506)),a=s(n(509)),o=s(n(511)),c=s(n(514)),u=s(n(518)),f=n(225);function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){var r=n(28),i=n(212),a=i?function(t,e){return i.set(t,e),t}:r;t.exports=a},function(t,e,n){var r=n(151),i=r&&new r;t.exports=i},function(t,e,n){var r=n(214),i=n(215),a=n(482),o=n(75),c=n(216),u=n(222),f=n(494),s=n(118),l=n(5);t.exports=function t(e,n,d,h,b,p,v,y,_,g){var m=128&n,x=1&n,w=2&n,j=24&n,O=512&n,M=w?void 0:o(e);return function k(){for(var A=arguments.length,T=Array(A),S=A;S--;)T[S]=arguments[S];if(j)var P=u(k),R=a(T,P);if(h&&(T=r(T,h,b,j)),p&&(T=i(T,p,v,j)),A-=R,j&&A1&&T.reverse(),m&&_(c=t.charCodeAt(n))||c>57){h=(46===c?l+t.slice(n+1):t.slice(n))+h,t=t.slice(0,n);break}}v&&!b&&(t=e(t,1/0));var O=f.length+t.length+h.length,M=O>1)+f+t+h+M.slice(O);break;default:t=M+f+t+h}return d(t)}return y=null==y?_?6:12:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),j.toString=function(){return t+""},j}return{format:b,formatPrefix:function(t,e){var n=b(((t=Object(o.a)(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Object(r.a)(e)/3))),a=Math.pow(10,-i),c=s[8+i/3];return function(t){return n(a*t)+c}}}}},function(t,e,n){"use strict";e.a=a;var r=n(232),i=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function a(t){return new o(t)}function o(t){if(!(e=i.exec(t)))throw new Error("invalid format: "+t);var e,n=e[1]||" ",a=e[2]||">",o=e[3]||"-",c=e[4]||"",u=!!e[5],f=e[6]&&+e[6],s=!!e[7],l=e[8]&&+e[8].slice(1),d=e[9]||"";"n"===d?(s=!0,d="g"):r.a[d]||(d=""),(u||"0"===n&&"="===a)&&(u=!0,n="0",a="="),this.fill=n,this.align=a,this.sign=o,this.symbol=c,this.zero=u,this.width=f,this.comma=s,this.precision=l,this.type=d}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type}},function(t,e,n){"use strict";var r=n(531),i=n(233),a=n(532);e.a={"":r.a,"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Object(a.a)(100*t,e)},r:a.a,s:i.a,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r}));var r,i=n(122);e.a=function(t,e){var n=Object(i.a)(t,e);if(!n)return t+"";var a=n[0],o=n[1],c=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,u=a.length;return c===u?a:c>u?a+new Array(c-u+1).join("0"):c>0?a.slice(0,c)+"."+a.slice(c):"0."+new Array(1-c).join("0")+Object(i.a)(t,Math.max(0,e+c-1))[0]}},function(t,e,n){"use strict";e.a=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o=12)]},Q:pt,s:vt,S:F,u:Y,U:q,V:G,w:V,W:X,x:null,X:null,y:H,Y:$,Z:Z,"%":bt},St={a:function(t){return l[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return d[t.getUTCMonth()]},c:null,d:K,e:K,f:nt,H:J,I:Q,j:tt,L:et,m:rt,M:it,p:function(t){return f[+(t.getUTCHours()>=12)]},Q:pt,s:vt,S:at,u:ot,U:ct,V:ut,w:ft,W:st,x:null,X:null,y:lt,Y:dt,Z:ht,"%":bt},Pt={a:function(t,e,n){var r=wt.exec(e.slice(n));return r?(t.w=jt[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=mt.exec(e.slice(n));return r?(t.w=xt[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=kt.exec(e.slice(n));return r?(t.m=At[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=Ot.exec(e.slice(n));return r?(t.m=Mt[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return Ct(t,e,n,r)},d:O,e:O,f:P,H:k,I:k,j:M,L:S,m:j,M:A,p:function(t,e,n){var r=_t.exec(e.slice(n));return r?(t.p=gt[r[0].toLowerCase()],n+r[0].length):-1},Q:E,s:C,S:T,u:v,U:y,V:_,w:p,W:g,x:function(t,e,r){return Ct(t,n,e,r)},X:function(t,e,n){return Ct(t,u,e,n)},y:x,Y:m,Z:w,"%":R};function Rt(t,e){return function(n){var r,i,a,o=[],u=-1,f=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++u53)return null;"w"in u||(u.w=1),"Z"in u?(c=(i=a(o(u.y))).getUTCDay(),i=c>4||0===c?r.p.ceil(i):Object(r.p)(i),i=r.l.offset(i,7*(u.V-1)),u.y=i.getUTCFullYear(),u.m=i.getUTCMonth(),u.d=i.getUTCDate()+(u.w+6)%7):(c=(i=e(o(u.y))).getDay(),i=c>4||0===c?r.e.ceil(i):Object(r.e)(i),i=r.a.offset(i,7*(u.V-1)),u.y=i.getFullYear(),u.m=i.getMonth(),u.d=i.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),c="Z"in u?a(o(u.y)).getUTCDay():e(o(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(c+5)%7:u.w+7*u.U-(c+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,a(u)):e(u)}}function Ct(t,e,n,r){for(var i,a,o=0,u=e.length,f=n.length;o=f)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in c?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(Tt.x=Rt(n,Tt),Tt.X=Rt(u,Tt),Tt.c=Rt(e,Tt),St.x=Rt(n,St),St.X=Rt(u,St),St.c=Rt(e,St),{format:function(t){var e=Rt(t+="",Tt);return e.toString=function(){return t},e},parse:function(t){var e=Et(t+="",i);return e.toString=function(){return t},e},utcFormat:function(t){var e=Rt(t+="",St);return e.toString=function(){return t},e},utcParse:function(t){var e=Et(t,a);return e.toString=function(){return t},e}})};var r=n(123);function i(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function a(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function o(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var c={"-":"",_:" ",0:"0"},u=/^\s*\d+/,f=/^%/,s=/[\\^$*+?|[\]().{}]/g;function l(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function w(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function j(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function O(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function M(t,e,n){var r=u.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function k(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function A(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function T(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function S(t,e,n){var r=u.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function P(t,e,n){var r=u.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function R(t,e,n){var r=f.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function E(t,e,n){var r=u.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function C(t,e,n){var r=u.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function I(t,e){return l(t.getDate(),e,2)}function N(t,e){return l(t.getHours(),e,2)}function D(t,e){return l(t.getHours()%12||12,e,2)}function z(t,e){return l(1+r.a.count(Object(r.k)(t),t),e,3)}function B(t,e){return l(t.getMilliseconds(),e,3)}function U(t,e){return B(t,e)+"000"}function L(t,e){return l(t.getMonth()+1,e,2)}function W(t,e){return l(t.getMinutes(),e,2)}function F(t,e){return l(t.getSeconds(),e,2)}function Y(t){var e=t.getDay();return 0===e?7:e}function q(t,e){return l(r.h.count(Object(r.k)(t),t),e,2)}function G(t,e){var n=t.getDay();return t=n>=4||0===n?Object(r.i)(t):r.i.ceil(t),l(r.i.count(Object(r.k)(t),t)+(4===Object(r.k)(t).getDay()),e,2)}function V(t){return t.getDay()}function X(t,e){return l(r.e.count(Object(r.k)(t),t),e,2)}function H(t,e){return l(t.getFullYear()%100,e,2)}function $(t,e){return l(t.getFullYear()%1e4,e,4)}function Z(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+l(e/60|0,"0",2)+l(e%60,"0",2)}function K(t,e){return l(t.getUTCDate(),e,2)}function J(t,e){return l(t.getUTCHours(),e,2)}function Q(t,e){return l(t.getUTCHours()%12||12,e,2)}function tt(t,e){return l(1+r.l.count(Object(r.v)(t),t),e,3)}function et(t,e){return l(t.getUTCMilliseconds(),e,3)}function nt(t,e){return et(t,e)+"000"}function rt(t,e){return l(t.getUTCMonth()+1,e,2)}function it(t,e){return l(t.getUTCMinutes(),e,2)}function at(t,e){return l(t.getUTCSeconds(),e,2)}function ot(t){var e=t.getUTCDay();return 0===e?7:e}function ct(t,e){return l(r.s.count(Object(r.v)(t),t),e,2)}function ut(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Object(r.t)(t):r.t.ceil(t),l(r.t.count(Object(r.v)(t),t)+(4===Object(r.v)(t).getUTCDay()),e,2)}function ft(t){return t.getUTCDay()}function st(t,e){return l(r.p.count(Object(r.v)(t),t),e,2)}function lt(t,e){return l(t.getUTCFullYear()%100,e,2)}function dt(t,e){return l(t.getUTCFullYear()%1e4,e,4)}function ht(){return"+0000"}function bt(){return"%"}function pt(t){return+t}function vt(t){return Math.floor(+t/1e3)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(124),i="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||Object(r.b)(i)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return c})),n.d(e,"c",(function(){return u}));var r=Math.cos,i=Math.sin,a=Math.PI,o=a/2,c=2*a,u=Math.max},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n-1}},function(t,e,n){var r=n(53);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(52);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(52),i=n(81),a=n(82);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(261),i=n(52),a=n(81);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(262),i=n(263),a=n(264),o=n(265),c=n(266);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=O&&(O=j+1);!(w=m[O])&&++O<_;);x._next=w||null}}return(s=new r.a(s,i))._enter=l,s._exit=d,s}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";var r=n(163),i=n(11);e.a=function(){return new i.a(this._exit||this._groups.map(r.a),this._parents)}},function(t,e,n){"use strict";var r=n(11);e.a=function(t){for(var e=this._groups,n=t._groups,i=e.length,a=n.length,o=Math.min(i,a),c=new Array(i),u=0;u=0;)(r=i[a])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this}},function(t,e,n){"use strict";var r=n(11);function i(t,e){return te?1:t>=e?0:NaN}e.a=function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=i);for(var n=this._groups,a=n.length,o=new Array(a),c=0;c1?this.each((null==e?r:"function"==typeof e?a:i)(t,e)):this.node()[t]}},function(t,e,n){"use strict";function r(t){return t.trim().split(/^|\s+/)}function i(t){return t.classList||new a(t)}function a(t){this._node=t,this._names=r(t.getAttribute("class")||"")}function o(t,e){for(var n=i(t),r=-1,a=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},e.a=function(t,e){var n=r(t+"");if(arguments.length<2){for(var a=i(this.node()),o=-1,c=n.length;++or?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}e.a=function(){var t,e,n=d,_=h,g=y,m=p,x=v,w=[0,1/0],j=[[-1/0,-1/0],[1/0,1/0]],O=250,M=a.j,k=[],A=Object(r.dispatch)("start","zoom","end"),T=0;function S(t){t.property("__zoom",b).on("wheel.zoom",D).on("mousedown.zoom",z).on("dblclick.zoom",B).filter(x).on("touchstart.zoom",U).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",W).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function P(t,e){return(e=Math.max(w[0],Math.min(w[1],e)))===t.k?t:new s.a(e,t.x,t.y)}function R(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new s.a(t.k,r,i)}function E(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function C(t,e,n){t.on("start.zoom",(function(){I(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){I(this,arguments).end()})).tween("zoom",(function(){var t=this,r=arguments,i=I(t,r),a=_.apply(t,r),o=n||E(a),c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,r):e,l=M(u.invert(o).concat(c/u.k),f.invert(o).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=l(t),n=c/e[2];t=new s.a(n,o[0]-e[0]*n,o[1]-e[1]*n)}i.zoom(null,t)}}))}function I(t,e){for(var n,r=0,i=k.length;rT}t.zoom("mouse",g(R(t.that.__zoom,t.mouse[0]=Object(o.mouse)(t.that),t.mouse[1]),t.extent,j))}function d(){r.on("mousemove.zoom mouseup.zoom",null),Object(i.b)(o.event.view,t.moved),Object(l.a)(),t.end()}}function B(){if(n.apply(this,arguments)){var t=this.__zoom,e=Object(o.mouse)(this),r=t.invert(e),i=t.k*(o.event.shiftKey?.5:2),a=g(R(P(t,i),e,r),_.apply(this,arguments),j);Object(l.a)(),O>0?Object(o.select)(this).transition().duration(O).call(C,a,e):Object(o.select)(this).call(S.transform,a)}}function U(){if(n.apply(this,arguments)){var e,r,i,a,u=I(this,arguments),f=o.event.changedTouches,s=f.length;for(Object(l.b)(),r=0;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function c(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;a.008856451679035631?Math.pow(t,1/3):t/c+4/29}function d(t){return t>o?t*t*t:c*(t-4/29)}function h(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function b(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function p(t){if(t instanceof y)return new y(t.h,t.c,t.l,t.opacity);t instanceof s||(t=u(t));var e=Math.atan2(t.b,t.a)*a.b;return new y(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function v(t,e,n,r){return 1===arguments.length?p(t):new y(t,e,n,null==r?1:r)}function y(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}Object(r.a)(s,f,Object(r.b)(i.a,{brighter:function(t){return new s(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new s(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=1*d(t),e=.95047*d(e),n=1.08883*d(n),new i.b(h(3.2404542*e-1.5371385*t-.4985314*n),h(-.969266*e+1.8760108*t+.041556*n),h(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Object(r.a)(y,v,Object(r.b)(i.a,{brighter:function(t){return new y(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new y(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return u(this).rgb()}}))},function(t,e,n){"use strict";e.a=p;var r=n(101),i=n(100),a=n(167),o=-.14861,c=1.78277,u=-.29227,f=-.90649,s=1.97294,l=s*f,d=s*c,h=c*u-f*o;function b(t){if(t instanceof v)return new v(t.h,t.s,t.l,t.opacity);t instanceof i.b||(t=Object(i.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(h*r+l*e-d*n)/(h+l-d),c=r-o,b=(s*(n-o)-u*c)/f,p=Math.sqrt(b*b+c*c)/(s*o*(1-o)),y=p?Math.atan2(b,c)*a.b-120:NaN;return new v(y<0?y+360:y,p,o,t.opacity)}function p(t,e,n,r){return 1===arguments.length?b(t):new v(t,e,n,null==r?1:r)}function v(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Object(r.a)(v,p,Object(r.b)(i.a,{brighter:function(t){return t=null==t?i.c:Math.pow(i.c,t),new v(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?i.d:Math.pow(i.d,t),new v(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*a.a,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),l=Math.sin(t);return new i.b(255*(e+n*(o*r+c*l)),255*(e+n*(u*r+f*l)),255*(e+n*(s*r)),this.opacity)}}))},function(t,e,n){"use strict";e.a=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return c}));var r=n(69),i=n(359);function a(t,e,n,i){function a(t){return t.length?t.pop()+" ":""}return function(o,c){var u=[],f=[];return o=t(o),c=t(c),function(t,i,a,o,c,u){if(t!==a||i!==o){var f=c.push("translate(",null,e,null,n);u.push({i:f-4,x:Object(r.a)(t,a)},{i:f-2,x:Object(r.a)(i,o)})}else(a||o)&&c.push("translate("+a+e+o+n)}(o.translateX,o.translateY,c.translateX,c.translateY,u,f),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(a(n)+"rotate(",null,i)-2,x:Object(r.a)(t,e)})):e&&n.push(a(n)+"rotate("+e+i)}(o.rotate,c.rotate,u,f),function(t,e,n,o){t!==e?o.push({i:n.push(a(n)+"skewX(",null,i)-2,x:Object(r.a)(t,e)}):e&&n.push(a(n)+"skewX("+e+i)}(o.skewX,c.skewX,u,f),function(t,e,n,i,o,c){if(t!==n||e!==i){var u=o.push(a(o)+"scale(",null,",",null,")");c.push({i:u-4,x:Object(r.a)(t,n)},{i:u-2,x:Object(r.a)(e,i)})}else 1===n&&1===i||o.push(a(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,c.scaleX,c.scaleY,u,f),o=c=null,function(t){for(var e,n=-1,r=f.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?r.g:r.h;return function(){var r=o(this,t),c=r.on;c!==i&&(a=(i=c).copy()).on(e,n),r.on=a}}e.a=function(t,e){var n=this._id;return arguments.length<2?Object(r.f)(this.node(),n).on.on(t):this.each(i(n,t,e))}},function(t,e,n){"use strict";e.a=function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t}},function(t,e,n){"use strict";var r=n(3),i=n(19),a=n(12);e.a=function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(r.selector)(t));for(var o=this._groups,c=o.length,u=new Array(c),f=0;fi.c&&n.name===e)return new r.a([[t]],a,e,+o);return null}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t,e,n){this.target=t,this.type=e,this.transform=n}},function(t,e,n){"use strict";e.b=function(){r.event.stopImmediatePropagation()};var r=n(3);e.a=function(){r.event.preventDefault(),r.event.stopImmediatePropagation()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n=arguments[2],o=0===t.length,c=n.svg.attr("width",n.conf.width).attr("height",n.conf.height);e&&(0,r.default)(n.tracks,(function(t,e){c.select("."+e).remove()}));var u=c.select(".all");u.empty()&&(u=c.append("g").attr("class","all").attr("transform","translate(\n "+parseInt(n.conf.width/2)+",\n "+parseInt(n.conf.height/2)+"\n )")),(0,r.default)(n.tracks,(function(e,r){(o||r in t)&&e.render(n,u,r)})),(o||"layout"in t)&&(0,a.default)(u,n);var f=c.selectAll(".all > g").remove(),s=(0,i.default)(f._groups[0],(function(t){return t.getAttribute("z-index")}));return c.select(".all").selectAll("g").data(s).enter().append((function(t){return t})),n};var r=o(n(32)),i=o(n(106)),a=o(n(426));function o(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){var r=n(29),i=n(58),a=n(2),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e,n){var r=n(40),i=n(33),a=n(158),o=n(423),c=n(60),u=n(424),f=n(28);t.exports=function(t,e,n){var s=-1;e=r(e.length?e:[f],c(i));var l=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++s,value:t}}));return o(l,(function(t,e){return u(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(425);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,c=a.length,u=n.length;++i=u?f:f*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(34);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),c=void 0!==e,u=null===e,f=e==e,s=r(e);if(!u&&!s&&!o&&t>e||o&&c&&f&&!u&&!s||i&&c&&f||!n&&f||!a)return 1;if(!i&&!o&&!s&&tMath.PI?"rotate(180)translate(-16)":null})).style("text-anchor",(function(t){return t.angle>Math.PI?"end":null})).style("font-size",t.ticks.labelSize+"px").style("fill",t.ticks.labelColor).text((function(t){return t.label}))}(n,o,e)};var r=n(13),i=n(10),a=n(3)},function(t,e,n){"use strict";var r=n(35),i=n(25),a=n(44);function o(t){return t.innerRadius}function c(t){return t.outerRadius}function u(t){return t.startAngle}function f(t){return t.endAngle}function s(t){return t&&t.padAngle}function l(t,e,n,r,i,a,o,c){var u=n-t,f=r-e,s=o-i,l=c-a,d=(s*(e-a)-l*(t-i))/(l*u-s*f);return[t+d*u,e+d*f]}function d(t,e,n,r,i,o,c){var u=t-n,f=e-r,s=(c?o:-o)/Object(a.l)(u*u+f*f),l=s*f,d=-s*u,h=t+l,b=e+d,p=n+l,v=r+d,y=(h+p)/2,_=(b+v)/2,g=p-h,m=v-b,x=g*g+m*m,w=i-o,j=h*v-p*b,O=(m<0?-1:1)*Object(a.l)(Object(a.h)(0,w*w*x-j*j)),M=(j*m-g*O)/x,k=(-j*g-m*O)/x,A=(j*m+g*O)/x,T=(-j*g+m*O)/x,S=M-y,P=k-_,R=A-y,E=T-_;return S*S+P*P>R*R+E*E&&(M=A,k=T),{cx:M,cy:k,x01:-l,y01:-d,x11:M*(i/w-1),y11:k*(i/w-1)}}e.a=function(){var t=o,e=c,n=Object(i.a)(0),h=null,b=u,p=f,v=s,y=null;function _(){var i,o,c=+t.apply(this,arguments),u=+e.apply(this,arguments),f=b.apply(this,arguments)-a.g,s=p.apply(this,arguments)-a.g,_=Object(a.a)(s-f),g=s>f;if(y||(y=i=Object(r.a)()),ua.f)if(_>a.m-a.f)y.moveTo(u*Object(a.e)(f),u*Object(a.k)(f)),y.arc(0,0,u,f,s,!g),c>a.f&&(y.moveTo(c*Object(a.e)(s),c*Object(a.k)(s)),y.arc(0,0,c,s,f,g));else{var m,x,w=f,j=s,O=f,M=s,k=_,A=_,T=v.apply(this,arguments)/2,S=T>a.f&&(h?+h.apply(this,arguments):Object(a.l)(c*c+u*u)),P=Object(a.i)(Object(a.a)(u-c)/2,+n.apply(this,arguments)),R=P,E=P;if(S>a.f){var C=Object(a.c)(S/c*Object(a.k)(T)),I=Object(a.c)(S/u*Object(a.k)(T));(k-=2*C)>a.f?(O+=C*=g?1:-1,M-=C):(k=0,O=M=(f+s)/2),(A-=2*I)>a.f?(w+=I*=g?1:-1,j-=I):(A=0,w=j=(f+s)/2)}var N=u*Object(a.e)(w),D=u*Object(a.k)(w),z=c*Object(a.e)(M),B=c*Object(a.k)(M);if(P>a.f){var U=u*Object(a.e)(j),L=u*Object(a.k)(j),W=c*Object(a.e)(O),F=c*Object(a.k)(O);if(_a.f?l(N,D,W,F,U,L,z,B):[z,B],q=N-Y[0],G=D-Y[1],V=U-Y[0],X=L-Y[1],H=1/Object(a.k)(Object(a.b)((q*V+G*X)/(Object(a.l)(q*q+G*G)*Object(a.l)(V*V+X*X)))/2),$=Object(a.l)(Y[0]*Y[0]+Y[1]*Y[1]);R=Object(a.i)(P,(c-$)/(H-1)),E=Object(a.i)(P,(u-$)/(H+1))}}A>a.f?E>a.f?(m=d(W,F,N,D,u,E,g),x=d(U,L,z,B,u,E,g),y.moveTo(m.cx+m.x01,m.cy+m.y01),Ea.f&&k>a.f?R>a.f?(m=d(z,B,U,L,c,-R,g),x=d(N,D,W,F,c,-R,g),y.lineTo(m.cx+m.x01,m.cy+m.y01),R1e-6)if(Math.abs(l*u-f*s)>1e-6&&a){var h=n-o,b=i-c,p=u*u+f*f,v=h*h+b*b,y=Math.sqrt(p),_=Math.sqrt(d),g=a*Math.tan((r-Math.acos((p+d-v)/(2*y*_)))/2),m=g/_,x=g/y;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*s)+","+(e+m*l)),this._+="A"+a+","+a+",0,0,"+ +(l*h>s*b)+","+(this._x1=t+x*u)+","+(this._y1=e+x*f)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,o,c,u){t=+t,e=+e;var f=(n=+n)*Math.cos(o),s=n*Math.sin(o),l=t+f,d=e+s,h=1^u,b=u?o-c:c-o;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+d:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+l+","+d),n&&(b<0&&(b=b%i+i),b>a?this._+="A"+n+","+n+",0,1,"+h+","+(t-f)+","+(e-s)+"A"+n+","+n+",0,1,"+h+","+(this._x1=l)+","+(this._y1=d):b>1e-6&&(this._+="A"+n+","+n+",0,"+ +(b>=r)+","+h+","+(this._x1=t+n*Math.cos(c))+","+(this._y1=e+n*Math.sin(c))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},e.a=c},function(t,e,n){"use strict";var r=n(25),i=n(430),a=n(431),o=n(44);e.a=function(){var t=a.a,e=i.a,n=null,c=Object(r.a)(0),u=Object(r.a)(o.m),f=Object(r.a)(0);function s(r){var i,a,s,l,d,h=r.length,b=0,p=new Array(h),v=new Array(h),y=+c.apply(this,arguments),_=Math.min(o.m,Math.max(-o.m,u.apply(this,arguments)-y)),g=Math.min(Math.abs(_)/h,f.apply(this,arguments)),m=g*(_<0?-1:1);for(i=0;i0&&(b+=d);for(null!=e?p.sort((function(t,n){return e(v[t],v[n])})):null!=n&&p.sort((function(t,e){return n(r[t],r[e])})),i=0,s=b?(_-h*m)/b:0;i0?d*s:0)+m,v[a]={data:r[a],index:i,value:d,startAngle:y,endAngle:l,padAngle:g};return v}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Object(r.a)(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(c="function"==typeof t?t:Object(r.a)(+t),s):c},s.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:Object(r.a)(+t),s):u},s.padAngle=function(t){return arguments.length?(f="function"==typeof t?t:Object(r.a)(+t),s):f},s}},function(t,e,n){"use strict";e.a=function(t,e){return et?1:e>=t?0:NaN}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(184),i=n(183),a=n(185);e.a=function(){var t=Object(i.a)().curve(r.a),e=t.curve,n=t.lineX0,o=t.lineX1,c=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Object(a.b)(n())},delete t.lineX0,t.lineEndAngle=function(){return Object(a.b)(o())},delete t.lineX1,t.lineInnerRadius=function(){return Object(a.b)(c())},delete t.lineY0,t.lineOuterRadius=function(){return Object(a.b)(u())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Object(r.b)(t)):e()._curve},t}},function(t,e,n){"use strict";e.a=function(){return s(l)},e.c=function(){return s(d)},e.b=function(){var t=s(h);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t};var r=n(35),i=n(187),a=n(25),o=n(109),c=n(186);function u(t){return t.source}function f(t){return t.target}function s(t){var e=u,n=f,c=o.a,s=o.b,l=null;function d(){var a,o=i.a.call(arguments),u=e.apply(this,o),f=n.apply(this,o);if(l||(l=a=Object(r.a)()),t(l,+c.apply(this,(o[0]=u,o)),+s.apply(this,o),+c.apply(this,(o[0]=f,o)),+s.apply(this,o)),a)return l=null,a+""||null}return d.source=function(t){return arguments.length?(e=t,d):e},d.target=function(t){return arguments.length?(n=t,d):n},d.x=function(t){return arguments.length?(c="function"==typeof t?t:Object(a.a)(+t),d):c},d.y=function(t){return arguments.length?(s="function"==typeof t?t:Object(a.a)(+t),d):s},d.context=function(t){return arguments.length?(l=null==t?null:t,d):l},d}function l(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function d(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function h(t,e,n,r,i){var a=Object(c.a)(e,n),o=Object(c.a)(e,n=(n+i)/2),u=Object(c.a)(r,n),f=Object(c.a)(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],u[0],u[1],f[0],f[1])}},function(t,e,n){"use strict";n.d(e,"b",(function(){return d}));var r=n(35),i=n(188),a=n(189),o=n(190),c=n(191),u=n(192),f=n(193),s=n(194),l=n(25),d=[i.a,a.a,o.a,u.a,c.a,f.a,s.a];e.a=function(){var t=Object(l.a)(i.a),e=Object(l.a)(64),n=null;function a(){var i;if(n||(n=i=Object(r.a)()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(e){return arguments.length?(t="function"==typeof e?e:Object(l.a)(e),a):t},a.size=function(t){return arguments.length?(e="function"==typeof t?t:Object(l.a)(+t),a):e},a.context=function(t){return arguments.length?(n=null==t?null:t,a):n},a}},function(t,e,n){"use strict";var r=n(72),i=n(73);function a(t){this._context=t}a.prototype={areaStart:r.a,areaEnd:r.a,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Object(i.c)(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},e.a=function(t){return new a(t)}},function(t,e,n){"use strict";var r=n(73);function i(t){this._context=t}i.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Object(r.c)(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},e.a=function(t){return new i(t)}},function(t,e,n){"use strict";var r=n(73);function i(t,e){this._basis=new r.a(t),this._beta=e}i.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,c=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*c));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}},e.a=function t(e){function n(t){return 1===e?new r.a(t):new i(t,e)}return n.beta=function(e){return t(+e)},n}(.85)},function(t,e,n){"use strict";var r=n(195),i=n(72),a=n(110);function o(t,e){this._context=t,this._alpha=e}o.prototype={areaStart:i.a,areaEnd:i.a,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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Object(a.b)(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new o(t,e):new r.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";var r=n(196),i=n(110);function a(t,e){this._context=t,this._alpha=e}a.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Object(i.b)(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new a(t,e):new r.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";var r=n(72);function i(t){this._context=t}i.prototype={areaStart:r.a,areaEnd:r.a,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},e.a=function(t){return new i(t)}},function(t,e,n){"use strict";function r(t){return t<0?-1:1}function i(t,e,n){var i=t._x1-t._x0,a=e-t._x1,o=(t._y1-t._y0)/(i||a<0&&-0),c=(n-t._y1)/(a||i<0&&-0),u=(o*a+c*i)/(i+a);return(r(o)+r(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(u))||0}function a(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function o(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,c=(a-r)/3;t._context.bezierCurveTo(r+c,i+c*e,a-c,o-c*n,a,o)}function c(t){this._context=t}function u(t){this._context=new f(t)}function f(t){this._context=t}e.a=function(t){return new c(t)},e.b=function(t){return new u(t)},c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:o(this,this._t0,a(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,o(this,a(this,n=i(this,t,e)),n);break;default:o(this,this._t0,n=i(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(u.prototype=Object.create(c.prototype)).point=function(t,e){c.prototype.point.call(this,e,t)},f.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}}},function(t,e,n){"use strict";function r(t){this._context=t}function i(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},e.a=function(t){return new r(t,.5)}},function(t,e,n){"use strict";var r=n(187),i=n(25),a=n(45),o=n(46);function c(t,e){return t[e]}e.a=function(){var t=Object(i.a)([]),e=o.a,n=a.a,u=c;function f(r){var i,a,o=t.apply(this,arguments),c=r.length,f=o.length,s=new Array(f);for(i=0;i0){for(var n,i,a,o=0,c=t[0].length;o1)for(var n,r,i,a,o,c,u=0,f=t[e[0]].length;u=0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=a}},function(t,e,n){"use strict";var r=n(45);e.a=function(t,e){if((n=t.length)>0){for(var n,i=0,a=t[e[0]],o=a.length;i0&&(i=(n=t[e[0]]).length)>0){for(var n,i,a,o=0,c=1;ct?1:e>=t?0:NaN}},function(t,e,n){"use strict";var r=n(203),i=n(197),a=n(455),o=n(202),c=n(456),u=n(204),f=n(205),s=n(206);e.a=function(){var t=c.a,e=o.a,n=s.a;function l(r){var a,o,c=r.length,s=new Array(c);for(a=0;ah;)b.pop(),--p;var v,y=new Array(p+1);for(a=0;a<=p;++a)(v=y[a]=[]).x0=a>0?b[a-1]:d,v.x1=a=n)for(r=n;++ar&&(r=n)}else for(;++a=n)for(r=n;++ar&&(r=n);return r}},function(t,e,n){"use strict";var r=n(47);e.a=function(t,e){var n,i=t.length,a=i,o=-1,c=0;if(null==e)for(;++o=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}},function(t,e,n){"use strict";e.a=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}},function(t,e,n){"use strict";var r=n(36);e.a=function(t,e){if(n=t.length){var n,i,a=0,o=0,c=t[o];for(null==e&&(e=r.a);++a90?"end":"start",t._rotate=t._angle>90?180:0,t}))})).enter().append("g").append("text").text((function(t){return t.value})).attr("transform",(function(t){return"\n rotate("+t._angle+")\n translate("+e.innerRadius+", 0)\n rotate("+t._rotate+")\n "})).attr("text-anchor",(function(t){return t._anchor}));return(0,o.default)(e.style,(function(t,e){i.style(e,t)})),i}}]),e}(i.default);e.default=l},function(t,e,n){var r=n(470);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(472)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(471)(!1)).push([t.i,"div.circos-tooltip {\r\n position: absolute;\r\n text-align: center;\r\n padding: 5px 10px;\r\n background: #111111;\r\n color: white;\r\n border: 0px;\r\n pointer-events: none;\r\n z-index: 1000;\r\n}\r\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i=0&&l.splice(e,1)}function y(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),_(e,t.attrs),p(t,e),e}function _(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,r,i,a;if(e.transform&&t.css){if(!(a=e.transform(t.css)))return function(){};t.css=a}if(e.singleton){var o=s++;n=f||(f=y(e)),r=w.bind(null,n,o,!1),i=w.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",_(e,t.attrs),p(t,e),e}(e),r=O.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(e),r=j.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=b(t,e);return h(n,e),function(t){for(var r=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r={};return(0,i.default)(n,(function(n,i){void 0!==n.iteratee?n.iteratee?Object.keys(e).indexOf(i)>-1?((0,a.default)(e[i]),r[i]=e[i]):r[i]=function(){return n.value}:r[i]=Object.keys(e).indexOf(i)>-1?e[i]:n.value:r[i]=t(e[i],n)})),r}(t,(0,r.default)(e));return(0,o.default)(f,function(t,e){return{cmin:null===t.min?e.min:t.min,cmax:null===t.max?e.max:t.max}}(f,n),function(t,e){if(0===t.innerRadius&&0===t.outerRadius){var n=(0,c.smartBorders)(t,e._layout,e.tracks);return{innerRadius:n.in,outerRadius:n.out}}return t.innerRadius<=1&&t.outerRadius<=1?{innerRadius:t.innerRadius*e._layout.conf.innerRadius,outerRadius:t.outerRadius*e._layout.conf.innerRadius}:t.innerRadius<=10&&t.outerRadius<=10?{innerRadius:t.innerRadius*e._layout.conf.outerRadius,outerRadius:t.outerRadius*e._layout.conf.outerRadius}:void 0}(f,u)),f}},function(t,e,n){var r=n(37)("sortBy",n(106));r.placeholder=n(26),t.exports=r},function(t,e,n){var r=n(477),i=n(26),a=Array.prototype.push;function o(t,e){return 2==e?function(e,n){return t(e,n)}:function(e){return t(e)}}function c(t){for(var e=t?t.length:0,n=Array(e);e--;)n[e]=t[e];return n}function u(t,e){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=e.apply(void 0,r);return t.apply(void 0,r),i}}}t.exports=function t(e,n,f,s){var l="function"==typeof n,d=n===Object(n);if(d&&(s=f,f=n,n=void 0),null==f)throw new TypeError;s||(s={});var h=!("cap"in s)||s.cap,b=!("curry"in s)||s.curry,p=!("fixed"in s)||s.fixed,v=!("immutable"in s)||s.immutable,y=!("rearg"in s)||s.rearg,_=l?f:i,g="curry"in s&&s.curry,m="fixed"in s&&s.fixed,x="rearg"in s&&s.rearg,w=l?f.runInContext():void 0,j=l?f:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},O=j.ary,M=j.assign,k=j.clone,A=j.curry,T=j.forEach,S=j.isArray,P=j.isError,R=j.isFunction,E=j.isWeakMap,C=j.keys,I=j.rearg,N=j.toInteger,D=j.toPath,z=C(r.aryMethod),B={castArray:function(t){return function(){var e=arguments[0];return S(e)?t(c(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],n=arguments[1],r=t(e,n),i=r.length;return h&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:o(r,n)):r}},mixin:function(t){return function(e){var n=this;if(!R(n))return t(n,Object(e));var r=[];return T(C(e),(function(t){R(e[t])&&r.push([t,n.prototype[t]])})),t(n,Object(e)),T(r,(function(t){var e=t[1];R(e)?n.prototype[t[0]]=e:delete n.prototype[t[0]]})),n}},nthArg:function(t){return function(e){var n=e<0?1:N(e)+1;return A(t(e),n)}},rearg:function(t){return function(e,n){var r=n?n.length:0;return A(t(e,n),r)}},runInContext:function(n){return function(r){return t(e,n(r),s)}}};function U(t,e){if(h){var n=r.iterateeRearg[t];if(n)return function(t,e){return q(t,(function(t){var n=e.length;return function(t,e){return 2==e?function(e,n){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(I(o(t,n),e),n)}))}(e,n);var i=!l&&r.iterateeAry[t];if(i)return function(t,e){return q(t,(function(t){return"function"==typeof t?o(t,e):t}))}(e,i)}return e}function L(t,e,n){if(p&&(m||!r.skipFixed[t])){var i=r.methodSpread[t],o=i&&i.start;return void 0===o?O(e,n):function(t,e){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var o=i[e],c=i.slice(0,e);return o&&a.apply(c,o),e!=r&&a.apply(c,i.slice(e+1)),t.apply(this,c)}}(e,o)}return e}function W(t,e,n){return y&&n>1&&(x||!r.skipRearg[t])?I(e,r.methodRearg[t]||r.aryRearg[n]):e}function F(t,e){for(var n=-1,r=(e=D(e)).length,i=r-1,a=k(Object(t)),o=a;null!=o&&++n1?A(e,n):e}(0,i=U(a,i),t),!1}})),!i})),i||(i=o),i==e&&(i=g?A(i,1):function(){return e.apply(this,arguments)}),i.convert=Y(a,e),i.placeholder=e.placeholder=n,i}if(!d)return G(n,f,_);var V=f,X=[];return T(z,(function(t){T(r.aryMethod[t],(function(t){var e=V[r.remap[t]||t];e&&X.push([t,G(t,e,V)])}))})),T(C(V),(function(t){var e=V[t];if("function"==typeof e){for(var n=X.length;n--;)if(X[n][0]==t)return;e.convert=Y(t,e),X.push([t,e])}})),T(X,(function(t){V[t[0]]=t[1]})),V.convert=function(t){return V.runInContext.convert(t)(void 0)},V.placeholder=V,T(C(V),(function(t){T(r.realToAlias[t]||[],(function(e){V[e]=V[t]}))})),V}},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,r={};for(var i in n){var a=n[i];t.call(r,a)?r[a].push(i):r[a]=[i]}return r}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e,n){t.exports={ary:n(479),assign:n(181),clone:n(498),curry:n(499),forEach:n(64),isArray:n(2),isError:n(500),isFunction:n(24),isWeakMap:n(501),iteratee:n(502),keys:n(143),rearg:n(503),toInteger:n(119),toPath:n(505)}},function(t,e,n){var r=n(113);t.exports=function(t,e,n){return e=n?void 0:e,e=t&&null==e?t.length:e,r(t,128,void 0,void 0,void 0,void 0,e)}},function(t,e,n){var r=n(75),i=n(5);t.exports=function(t,e,n){var a=1&e,o=r(t);return function e(){var r=this&&this!==i&&this instanceof e?o:t;return r.apply(a?n:this,arguments)}}},function(t,e,n){var r=n(50),i=n(75),a=n(213),o=n(216),c=n(222),u=n(118),f=n(5);t.exports=function(t,e,n){var s=i(t);return function i(){for(var l=arguments.length,d=Array(l),h=l,b=c(i);h--;)d[h]=arguments[h];var p=l<3&&d[0]!==b&&d[l-1]!==b?[]:u(d,b);if((l-=p.length)1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(n,"{\n/* [wrapped with "+e+"] */\n")}},function(t,e,n){var r=n(64),i=n(490),a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return r(a,(function(n){var r="_."+n[0];e&n[1]&&!i(t,r)&&t.push(r)})),t.sort()}},function(t,e,n){var r=n(221);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a=u.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,f,l,d=-1,h=n.length,b=u[i++],p=Object(r.a)(),v=a();++du.length)return n;var i,a=f[r-1];return null!=e&&r>=u.length?i=n.entries():(i=[],n.each((function(e,n){i.push({key:n,values:t(e,r)})}))),null!=a?i.sort((function(t,e){return a(t.key,e.key)})):i}(s(t,0,o,c),0)},key:function(t){return u.push(t),n},sortKeys:function(t){return f[u.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}},function(t,e,n){"use strict";var r=n(120);function i(){}var a=r.a.prototype;function o(t,e){var n=new i;if(t instanceof i)t.each((function(t){n.add(t)}));else if(t){var r=-1,a=t.length;if(null==e)for(;++r0&&c>0&&(u+c+1>r&&(c=Math.max(1,r-u)),a.push(n.substring(i-=c,i+c)),!((u+=c+1)>r));)c=t[o=(o+1)%t.length];return a.reverse().join(e)}}},function(t,e,n){"use strict";e.a=function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}},function(t,e,n){"use strict";e.a=function(t,e){t:for(var n,r=(t=t.toPrecision(e)).length,i=1,a=-1;i0&&(a=0)}return a>0?t.slice(0,a)+t.slice(n+1):t}},function(t,e,n){"use strict";var r=n(122);e.a=function(t,e){var n=Object(r.a)(t,e);if(!n)return t+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(77);e.a=function(t){return Math.max(0,-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(77);e.a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Object(r.a)(e)/3)))-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(77);e.a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Object(r.a)(e)-Object(r.a)(t))+1}},function(t,e,n){"use strict";e.a=function t(){var e=Object(c.b)(u,f).domain([1,10]),n=e.domain,a=10,s=d(10),b=l(10);function p(){return s=d(a),b=l(a),n()[0]<0&&(s=h(s),b=h(b)),e}return e.base=function(t){return arguments.length?(a=+t,p()):a},e.domain=function(t){return arguments.length?(n(t),p()):n()},e.ticks=function(t){var e,i=n(),o=i[0],c=i[i.length-1];(e=c0){for(;dc)break;v.push(l)}}else for(;d=1;--f)if(!((l=u*f)c)break;v.push(l)}}else v=Object(r.ticks)(d,h,Math.min(h-d,p)).map(b);return e?v.reverse():v},e.tickFormat=function(t,n){if(null==n&&(n=10===a?".0e":","),"function"!=typeof n&&(n=Object(i.a)(n)),t===1/0)return n;null==t&&(t=10);var r=Math.max(1,a*t/e.ticks().length);return function(t){var e=t/b(Math.round(s(t)));return e*a0?a[r-1]:e[0],r=o?[c[o-1],n]:[c[r-1],c[r]]},f.copy=function(){return t().domain([e,n]).range(u)},Object(a.b)(f)};var r=n(10),i=n(27),a=n(48)},function(t,e,n){"use strict";e.a=function t(){var e=[.5],n=[0,1],a=1;function o(t){if(t<=t)return n[Object(r.bisect)(e,t,0,a)]}return o.domain=function(t){return arguments.length?(e=i.b.call(t),a=Math.min(e.length,n.length-1),o):e.slice()},o.range=function(t){return arguments.length?(n=i.b.call(t),a=Math.min(e.length,n.length-1),o):n.slice()},o.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},o.copy=function(){return t().domain(e).range(n)},o};var r=n(10),i=n(27)},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Object(r.a)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):i:null},e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setTime(Math.floor(t/i.d)*i.d)}),(function(t,e){t.setTime(+t+e*i.d)}),(function(t,e){return(e-t)/i.d}),(function(t){return t.getUTCSeconds()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setTime(Math.floor(t/i.c)*i.c)}),(function(t,e){t.setTime(+t+e*i.c)}),(function(t,e){return(e-t)/i.c}),(function(t){return t.getMinutes()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){var e=t.getTimezoneOffset()*i.c%i.b;e<0&&(e+=i.b),t.setTime(Math.floor((+t-e)/i.b)*i.b+e)}),(function(t,e){t.setTime(+t+e*i.b)}),(function(t,e){return(e-t)/i.b}),(function(t){return t.getHours()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.c)/i.a}),(function(t){return t.getDate()-1}));e.a=a,a.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return s}));var r=n(4),i=n(15);function a(t){return Object(r.a)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.c)/i.e}))}var o=a(0),c=a(1),u=a(2),f=a(3),s=a(4),l=a(5),d=a(6);o.range,c.range,u.range,f.range,s.range,l.range,d.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*i.c)}),(function(t,e){return(e-t)/i.c}),(function(t){return t.getUTCMinutes()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*i.b)}),(function(t,e){return(e-t)/i.b}),(function(t){return t.getUTCHours()}));e.a=a,a.range},function(t,e,n){"use strict";var r=n(4),i=n(15),a=Object(r.a)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.a}),(function(t){return t.getUTCDate()-1}));e.a=a,a.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return s}));var r=n(4),i=n(15);function a(t){return Object(r.a)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.e}))}var o=a(0),c=a(1),u=a(2),f=a(3),s=a(4),l=a(5),d=a(6);o.range,c.range,u.range,f.range,s.range,l.range,d.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));e.a=i,i.range},function(t,e,n){"use strict";var r=n(4),i=Object(r.a)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},e.a=i,i.range},function(t,e,n){"use strict";var r=n(238),i=n(124);+new Date("2000-01-01T00:00:00.000Z")||Object(i.c)(r.a)},function(t,e,n){"use strict";var r=n(235),i=n(236),a=n(123);e.a=function(){return Object(r.a)(a.v,a.q,a.u,a.l,a.m,a.o,a.r,a.n,i.b).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6")},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9")},function(t,e,n){"use strict";var r=n(49);e.a=Object(r.a)("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5")},function(t,e,n){"use strict";var r=n(9),i=n(8);e.a=Object(i.b)(Object(r.b)(300,.5,0),Object(r.b)(-240,.5,1))},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var r=n(9),i=n(8),a=Object(i.b)(Object(r.b)(-100,.75,.35),Object(r.b)(80,1.5,.8)),o=Object(i.b)(Object(r.b)(260,.75,.35),Object(r.b)(80,1.5,.8)),c=Object(r.b)();e.b=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return c.h=360*t-100,c.s=1.5-1.5*e,c.l=.8-.9*e,c+""}},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return c}));var r=n(49);function i(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}e.a=i(Object(r.a)("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var a=i(Object(r.a)("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),o=i(Object(r.a)("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),c=i(Object(r.a)("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},function(t,e,n){"use strict";e.a=function t(e){var n=0,i=1,a=!1;function o(t){var r=(t-n)/(i-n);return e(a?Math.max(0,Math.min(1,r)):r)}return o.domain=function(t){return arguments.length?(n=+t[0],i=+t[1],o):[n,i]},o.clamp=function(t){return arguments.length?(a=!!t,o):a},o.interpolator=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return t(e).domain([n,i]).clamp(a)},Object(r.b)(o)};var r=n(48)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildColorValue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Math.E;if((0,a.default)(t))return t;var o="-"===t[0],c="-"===t[0]?t.slice(1):t;if(u[c]){var s=f(u[c],e,n,o,r,i);return function(t){return s(t.value)}}return t};var r,i=n(24),a=(r=i)&&r.__esModule?r:{default:r},o=n(225),c=n(567),u={BrBG:c.interpolateBrBG,PRGn:c.interpolatePRGn,PiYG:c.interpolatePiYG,PuOr:c.interpolatePuOr,RdBu:c.interpolateRdBu,RdGy:c.interpolateRdGy,RdYlBu:c.interpolateRdYlBu,RdYlGn:c.interpolateRdYlGn,Spectral:c.interpolateSpectral,Blues:c.interpolateBlues,Greens:c.interpolateGreens,Greys:c.interpolateGreys,Oranges:c.interpolateOranges,Purples:c.interpolatePurples,Reds:c.interpolateReds,BuGn:c.interpolateBuGn,BuPu:c.interpolateBuPu,GnBu:c.interpolateGnBu,OrRd:c.interpolateOrRd,PuBuGn:c.interpolatePuBuGn,PuBu:c.interpolatePuBu,PuRd:c.interpolatePuRd,RdPu:c.interpolateRdPu,YlGnBu:c.interpolateYlGnBu,YlGn:c.interpolateYlGn,YlOrBr:c.interpolateYlOrBr,YlOrRd:c.interpolateYlOrRd},f=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Math.E;if(i&&e*n<=0&&console.warn("As log(0) = -∞, a log scale domain must be\n strictly-positive or strictly-negative. logscale ignored"),i&&e*n>0){var c=(0,o.scaleLog)().base(a).domain(r?[n,e]:[e,n]).range([0,1]);return(0,o.scaleSequential)((function(e){return t(c(e))})).domain([0,1])}return(0,o.scaleSequential)(t).domain(r?[n,e]:[e,n])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(568);n.d(e,"schemeCategory10",(function(){return r.a}));var i=n(569);n.d(e,"schemeAccent",(function(){return i.a}));var a=n(570);n.d(e,"schemeDark2",(function(){return a.a}));var o=n(571);n.d(e,"schemePaired",(function(){return o.a}));var c=n(572);n.d(e,"schemePastel1",(function(){return c.a}));var u=n(573);n.d(e,"schemePastel2",(function(){return u.a}));var f=n(574);n.d(e,"schemeSet1",(function(){return f.a}));var s=n(575);n.d(e,"schemeSet2",(function(){return s.a}));var l=n(576);n.d(e,"schemeSet3",(function(){return l.a}));var d=n(577);n.d(e,"interpolateBrBG",(function(){return d.a})),n.d(e,"schemeBrBG",(function(){return d.b}));var h=n(578);n.d(e,"interpolatePRGn",(function(){return h.a})),n.d(e,"schemePRGn",(function(){return h.b}));var b=n(579);n.d(e,"interpolatePiYG",(function(){return b.a})),n.d(e,"schemePiYG",(function(){return b.b}));var p=n(580);n.d(e,"interpolatePuOr",(function(){return p.a})),n.d(e,"schemePuOr",(function(){return p.b}));var v=n(581);n.d(e,"interpolateRdBu",(function(){return v.a})),n.d(e,"schemeRdBu",(function(){return v.b}));var y=n(582);n.d(e,"interpolateRdGy",(function(){return y.a})),n.d(e,"schemeRdGy",(function(){return y.b}));var _=n(583);n.d(e,"interpolateRdYlBu",(function(){return _.a})),n.d(e,"schemeRdYlBu",(function(){return _.b}));var g=n(584);n.d(e,"interpolateRdYlGn",(function(){return g.a})),n.d(e,"schemeRdYlGn",(function(){return g.b}));var m=n(585);n.d(e,"interpolateSpectral",(function(){return m.a})),n.d(e,"schemeSpectral",(function(){return m.b}));var x=n(586);n.d(e,"interpolateBuGn",(function(){return x.a})),n.d(e,"schemeBuGn",(function(){return x.b}));var w=n(587);n.d(e,"interpolateBuPu",(function(){return w.a})),n.d(e,"schemeBuPu",(function(){return w.b}));var j=n(588);n.d(e,"interpolateGnBu",(function(){return j.a})),n.d(e,"schemeGnBu",(function(){return j.b}));var O=n(589);n.d(e,"interpolateOrRd",(function(){return O.a})),n.d(e,"schemeOrRd",(function(){return O.b}));var M=n(590);n.d(e,"interpolatePuBuGn",(function(){return M.a})),n.d(e,"schemePuBuGn",(function(){return M.b}));var k=n(591);n.d(e,"interpolatePuBu",(function(){return k.a})),n.d(e,"schemePuBu",(function(){return k.b}));var A=n(592);n.d(e,"interpolatePuRd",(function(){return A.a})),n.d(e,"schemePuRd",(function(){return A.b}));var T=n(593);n.d(e,"interpolateRdPu",(function(){return T.a})),n.d(e,"schemeRdPu",(function(){return T.b}));var S=n(594);n.d(e,"interpolateYlGnBu",(function(){return S.a})),n.d(e,"schemeYlGnBu",(function(){return S.b}));var P=n(595);n.d(e,"interpolateYlGn",(function(){return P.a})),n.d(e,"schemeYlGn",(function(){return P.b}));var R=n(596);n.d(e,"interpolateYlOrBr",(function(){return R.a})),n.d(e,"schemeYlOrBr",(function(){return R.b}));var E=n(597);n.d(e,"interpolateYlOrRd",(function(){return E.a})),n.d(e,"schemeYlOrRd",(function(){return E.b}));var C=n(598);n.d(e,"interpolateBlues",(function(){return C.a})),n.d(e,"schemeBlues",(function(){return C.b}));var I=n(599);n.d(e,"interpolateGreens",(function(){return I.a})),n.d(e,"schemeGreens",(function(){return I.b}));var N=n(600);n.d(e,"interpolateGreys",(function(){return N.a})),n.d(e,"schemeGreys",(function(){return N.b}));var D=n(601);n.d(e,"interpolatePurples",(function(){return D.a})),n.d(e,"schemePurples",(function(){return D.b}));var z=n(602);n.d(e,"interpolateReds",(function(){return z.a})),n.d(e,"schemeReds",(function(){return z.b}));var B=n(603);n.d(e,"interpolateOranges",(function(){return B.a})),n.d(e,"schemeOranges",(function(){return B.b}));var U=n(604);n.d(e,"interpolateCubehelixDefault",(function(){return U.a}));var L=n(605);n.d(e,"interpolateRainbow",(function(){return L.b})),n.d(e,"interpolateWarm",(function(){return L.c})),n.d(e,"interpolateCool",(function(){return L.a}));var W=n(606);n.d(e,"interpolateSinebow",(function(){return W.a}));var F=n(607);n.d(e,"interpolateViridis",(function(){return F.a})),n.d(e,"interpolateMagma",(function(){return F.c})),n.d(e,"interpolateInferno",(function(){return F.b})),n.d(e,"interpolatePlasma",(function(){return F.d}))},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")},function(t,e,n){"use strict";var r=n(0);e.a=Object(r.a)("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(0),i=n(1),a=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r.a);e.a=Object(i.a)(a)},function(t,e,n){"use strict";var r=n(9),i=n(8);e.a=Object(i.b)(Object(r.b)(300,.5,0),Object(r.b)(-240,.5,1))},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var r=n(9),i=n(8),a=Object(i.b)(Object(r.b)(-100,.75,.35),Object(r.b)(80,1.5,.8)),o=Object(i.b)(Object(r.b)(260,.75,.35),Object(r.b)(80,1.5,.8)),c=Object(r.b)();e.b=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return c.h=360*t-100,c.s=1.5-1.5*e,c.l=.8-.9*e,c+""}},function(t,e,n){"use strict";var r=n(9),i=Object(r.f)(),a=Math.PI/3,o=2*Math.PI/3;e.a=function(t){var e;return t=(.5-t)*Math.PI,i.r=255*(e=Math.sin(t))*e,i.g=255*(e=Math.sin(t+a))*e,i.b=255*(e=Math.sin(t+o))*e,i+""}},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return c}));var r=n(0);function i(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}e.a=i(Object(r.a)("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var a=i(Object(r.a)("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),o=i(Object(r.a)("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),c=i(Object(r.a)("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderAxes=e._buildAxesData=void 0;var r=c(n(609)),i=c(n(105)),a=n(13),o=c(n(612));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(t,e,n){return{value:t,thickness:e.thickness||1,color:e.color||"#d3d3d3",opacity:e.opacity||n.opacity}},f=e._buildAxesData=function(t){return(0,i.default)(t.axes,(function(e,n){if(!n.position&&!n.spacing)return o.default.warn("Skipping axe group with no position and spacing defined"),e;if(n.position&&e.push(u(n.position,n,t)),n.spacing){var i=(0,r.default)(n.start||t.cmin,n.end||t.cmax,n.spacing).map((function(e){return u(e,n,t)}));return e.concat(i)}return e}),[])};e.renderAxes=function(t,e,n,r){var i=f(e),o=(0,a.arc)().innerRadius((function(t){return"in"===e.direction?e.outerRadius-r(t.value):e.innerRadius+r(t.value)})).outerRadius((function(t){return"in"===e.direction?e.outerRadius-r(t.value):e.innerRadius+r(t.value)})).startAngle(0).endAngle((function(t){return t.length})),c=t.selectAll(".axis").data((function(t){var e=n._layout.blocks[t.key];return i.map((function(n){return{value:n.value,thickness:n.thickness,color:n.color,opacity:n.opacity,block_id:t.key,length:e.end-e.start}}))})).enter().append("path").attr("opacity",(function(t){return t.opacity})).attr("class","axis").attr("d",o).attr("stroke-width",(function(t){return t.thickness})).attr("stroke",(function(t){return t.color}));return e.showAxesTooltip&&(c.on("mouseover",(function(t,e){n.tip.html(t.value).transition().style("opacity",.9).style("left",event.pageX+"px").style("top",event.pageY-28+"px")})),c.on("mouseout",(function(t,e){n.tip.transition().duration(500).style("opacity",0)}))),c}},function(t,e,n){var r=n(610)();t.exports=r},function(t,e,n){var r=n(611),i=n(63),a=n(223);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e-1:!!s&&r(t,e,n)>-1}},function(t,e,n){var r=n(16),i=n(2),a=n(6);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(616),i=n(18);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(40);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e,n){var r=n(618),i=n(619),a=n(33),o=n(2),c=n(63);t.exports=function(t,e,n){var u=o(t)?r:i;return n&&c(t,e,n)&&(e=void 0),u(t,a(e,3))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n=1?t:t*e},p=function(t){function e(t,n,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,h,r,a.parseChordData))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"getCoordinates",value:function(t,e,n,r){var i=e.blocks[t.id],a=i.start+t.start/i.len*(i.end-i.start),o=i.start+t.end/i.len*(i.end-i.start),c=void 0;return(0,f.default)(n.radius)?c=b(n.radius(r),e.conf.innerRadius):n.radius&&(c=b(n.radius,e.conf.innerRadius)),c||(c=e.conf.innerRadius),{radius:c,startAngle:a,endAngle:o}}},{key:"renderChords",value:function(t,e,n,r,i,a){var o=this,u=t.append("g").selectAll(".chord").data(r).enter().append("path").attr("class","chord").attr("d",(0,c.ribbon)().source((function(t){return a(t.source,i._layout,o.conf,t)})).target((function(t){return a(t.target,i._layout,o.conf,t)}))).attr("opacity",n.opacity).on("mouseover",(function(t){o.dispatch.call("mouseover",o,t),i.clipboard.attr("value",n.tooltipContent(t))})).on("mouseout",(function(t){return o.dispatch.call("mouseout",o,t)}));return Object.keys(n.events).forEach((function(t){u.on(t,(function(e,r,i){n.events[t](e,r,i,s.event)}))})),u.attr("fill",n.colorValue),u}},{key:"render",value:function(t,e,n){e.select("."+n).remove();var r=e.append("g").attr("class",n).attr("z-index",this.conf.zIndex),i=this.renderChords(r,n,this.conf,this.data,t,this.getCoordinates);return this.conf.tooltipContent&&(0,o.registerTooltip)(this,t,i,this.conf),this}}]),e}(i.default);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(624);n.d(e,"chord",(function(){return r.a}));var i=n(625);n.d(e,"ribbon",(function(){return i.a}))},function(t,e,n){"use strict";var r=n(10),i=n(239);function a(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}e.a=function(){var t=0,e=null,n=null,o=null;function c(a){var c,u,f,s,l,d,h=a.length,b=[],p=Object(r.range)(h),v=[],y=[],_=y.groups=new Array(h),g=new Array(h*h);for(c=0,l=-1;++lt.position+r?t.groups.push([e]):t.groups[t.groups.length-1].push(e),t.position=e.position,t)}),{position:null,groups:[]}).groups):[t.values];var n,r})).enter().append("g").attr("class","line").append("path").datum((function(t){return t.map((function(t){var i=r.scale(t.value);return(0,o.default)(t,{angle:r.theta(t.position,n.blocks[t.block_id])},function(t){return e.fill?{innerRadius:"out"===e.direction?e.innerRadius:e.outerRadius-t,outerRadius:"out"===e.direction?e.innerRadius+t:e.outerRadius}:{radius:"out"===e.direction?e.innerRadius+t:e.outerRadius-t}}(i))}))})).attr("d",f).attr("opacity",e.opacity).attr("stroke-width",e.thickness).attr("stroke",e.colorValue).attr("fill","none");return e.fill&&l.attr("fill",e.fillColor),l}}]),e}(i.default);e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;ne.end?-1:t.start==e.start&&t.end==e.end?0:1}));var r=[];(0,u.default)(t.values,(function(t){var n=!1;(0,u.default)(r,(function(r,i){if(r.slice(0).pop().end+et;t++)a.call(this,this._deferreds[t]);this._deferreds=null}function f(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function s(t,e,n){var r=!1;try{t((function(t){r||(r=!0,e(t))}),(function(t){r||(r=!0,n(t))}))}catch(t){if(r)return;r=!0,n(t)}}var l=i.immediateFn||"function"==typeof e&&e||function(t){setTimeout(t,1)},d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=this;return new i((function(r,i){a.call(n,new f(t,e,r,i))}))},i.all=function(){var t=Array.prototype.slice.call(1===arguments.length&&d(arguments[0])?arguments[0]:arguments);return new i((function(e,n){function r(a,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var c=o.then;if("function"==typeof c)return void c.call(o,(function(t){r(a,t)}),n)}t[a]=o,0==--i&&e(t)}catch(t){n(t)}}if(0===t.length)return e([]);for(var i=t.length,a=0;ar;r++)t[r].then(e,n)}))},void 0!==t&&t.exports?t.exports=i:n.Promise||(n.Promise=i)}(this),a.copy=function(t){return new Promise((function(e,n){if("string"!=typeof t&&!("text/plain"in t))throw new Error("You must provide a text/plain type.");var r="string"==typeof t?t:t["text/plain"];window.clipboardData.setData("Text",r)?e():n(new Error("Copying was rejected."))}))},a.paste=function(){return new Promise((function(t,e){var n=window.clipboardData.getData("Text");n?t(n):e(new Error("Pasting was rejected."))}))}),a}()}).call(e,n(634).setImmediate)},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(635),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(80))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,a,o,c,u=1,f={},s=!1,l=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){b(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(o="setImmediate$"+Math.random()+"$",c=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&b(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",c,!1):t.attachEvent("onmessage",c),r=function(e){t.postMessage(o+e,"*")}):t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){b(t.data)},r=function(t){a.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){b(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(b,0,t)},d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;nn.value[r]){e=n.color[r];break}return e}}}},{key:"setToolTip",value:function(t){if(void 0!==t.tooltipContent){if(void 0!==t.tooltipContent.name)if("all"===t.tooltipContent.name)t.tooltipContent=function(t){var e="";for(var n in t)e="

"+(n.charAt(0).toUpperCase()+n.slice(1))+" : "+t[n]+"

"+e;return"

"+e+"

"};else{var e=t.tooltipContent.name;t.tooltipContent=function(t){return t[e]}}else if(void 0!==t.tooltipContent.source){var n=t.tooltipContent;void 0!==n.sourceID&&void 0!==n.targetID?t.tooltipContent=function(t){return"

"+t[n.source][n.sourceID]+" ➤ "+t[n.target][n.targetID]+": "+t[n.target][n.targetEnd]+"

"}:t.tooltipContent=function(t){return"

"+t[n.source]+" ➤ "+t[n.target]+": "+t[n.targetEnd]+"

"}}}else t.tooltipContent=null}},{key:"configCircos",value:function(t,e,n,r){var i=this;this.circos.layout(t,e),n&&n.forEach((function(t,e){var n,a=t.id,o=t.data,c=t.config,u=t.type;void 0!==c&&((n=c).events=i.setEvent(r,e),i.setColor(n),i.setToolTip(n)),i.circos[u.toLowerCase()](a||"track-".concat(e),o,n)})),this.circos.render()}},{key:"componentDidMount",value:function(){var t=this.props,e=t.enableDownloadSVG,n=t.enableZoomPan,r=t.size,i=t.layout,a=t.config,c=t.tracks,u=t.setProps;this.circos=new o.a({container:this.ref,width:r,height:r,enableZoomPan:n,enableDownloadSVG:e}),this.configCircos(i,a,c,u),this.setStopScroll(n)}},{key:"shouldComponentUpdate",value:function(t){return this.props.config!==t.config||this.props.layout!==t.layout||this.props.tracks!==t.tracks||this.props.size!==t.size||this.props.selectEvent!==t.selectEvent}},{key:"componentDidUpdate",value:function(){var t=this.props,e=t.size,n=t.layout,r=t.config,i=t.tracks,a=t.setProps;this.circos.removeTracks(),this.container=this.ref,this.circos.width=e,this.circos.height=e,this.configCircos(n,r,i,a)}},{key:"componentWillUnmount",value:function(){this.setStopScroll(!1)}},{key:"render",value:function(){var t=this,e=this.props,n=e.id,r=e.style,a=e.config,o=e.layout,c=e.tracks,u=e.size,f=e.eventDatum;return i.a.createElement("div",{id:n,style:r,eventDatum:f},i.a.createElement("div",{id:"Circos-container",ref:function(e){t.ref=e},config:a,layout:o,tracks:c,size:u}))}}])&&f(n.prototype,r),a&&f(n,a),e}(r.Component);h.defaultProps=c.b,h.propTypes=c.c}}]); \ No newline at end of file +function(n){function r(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,r(o,this),r(c,this))}function a(t){var e=this;return null===this._state?void this._deferreds.push(t):void l((function(){var n=e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void t.reject(e)}t.resolve(r)}else(e._state?t.resolve:t.reject)(e._value)}))}function o(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void s(r(e,t),r(o,this),r(c,this))}this._state=!0,this._value=t,u.call(this)}catch(t){c.call(this,t)}}function c(t){this._state=!1,this._value=t,u.call(this)}function u(){for(var t=0,e=this._deferreds.length;e>t;t++)a.call(this,this._deferreds[t]);this._deferreds=null}function f(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function s(t,e,n){var r=!1;try{t((function(t){r||(r=!0,e(t))}),(function(t){r||(r=!0,n(t))}))}catch(t){if(r)return;r=!0,n(t)}}var l=i.immediateFn||"function"==typeof e&&e||function(t){setTimeout(t,1)},d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=this;return new i((function(r,i){a.call(n,new f(t,e,r,i))}))},i.all=function(){var t=Array.prototype.slice.call(1===arguments.length&&d(arguments[0])?arguments[0]:arguments);return new i((function(e,n){function r(a,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var c=o.then;if("function"==typeof c)return void c.call(o,(function(t){r(a,t)}),n)}t[a]=o,0==--i&&e(t)}catch(t){n(t)}}if(0===t.length)return e([]);for(var i=t.length,a=0;ar;r++)t[r].then(e,n)}))},void 0!==t&&t.exports?t.exports=i:n.Promise||(n.Promise=i)}(this),a.copy=function(t){return new Promise((function(e,n){if("string"!=typeof t&&!("text/plain"in t))throw new Error("You must provide a text/plain type.");var r="string"==typeof t?t:t["text/plain"];window.clipboardData.setData("Text",r)?e():n(new Error("Copying was rejected."))}))},a.paste=function(){return new Promise((function(t,e){var n=window.clipboardData.getData("Text");n?t(n):e(new Error("Pasting was rejected."))}))}),a}()}).call(e,n(634).setImmediate)},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(635),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(80))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,a,o,c,u=1,f={},s=!1,l=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){b(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(o="setImmediate$"+Math.random()+"$",c=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&b(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",c,!1):t.attachEvent("onmessage",c),r=function(e){t.postMessage(o+e,"*")}):t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){b(t.data)},r=function(t){a.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){b(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(b,0,t)},d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;nn.value[r]){e=n.color[r];break}return e}}}},{key:"setToolTip",value:function(t){if(void 0!==t.tooltipContent){if(void 0!==t.tooltipContent.name)if("all"===t.tooltipContent.name)t.tooltipContent=function(t){var e="";for(var n in t)e="

"+(n.charAt(0).toUpperCase()+n.slice(1))+" : "+t[n]+"

"+e;return"

"+e+"

"};else{var e=t.tooltipContent.name;t.tooltipContent=function(t){return t[e]}}else if(void 0!==t.tooltipContent.source){var n=t.tooltipContent;void 0!==n.sourceID&&void 0!==n.targetID?t.tooltipContent=function(t){return"

"+t[n.source][n.sourceID]+" ➤ "+t[n.target][n.targetID]+": "+t[n.target][n.targetEnd]+"

"}:t.tooltipContent=function(t){return"

"+t[n.source]+" ➤ "+t[n.target]+": "+t[n.targetEnd]+"

"}}}else t.tooltipContent=null}},{key:"configCircos",value:function(t,e,n,r){var i=this;this.circos.layout(t,e),n&&n.forEach((function(t,e){var n,a=t.id,o=t.data,c=t.config,u=t.type;void 0!==c&&((n=c).events=i.setEvent(r,e),i.setColor(n),i.setToolTip(n)),i.circos[u.toLowerCase()](a||"track-".concat(e),o,n)})),this.circos.render()}},{key:"componentDidMount",value:function(){var t=this.props,e=t.enableDownloadSVG,n=t.enableZoomPan,r=t.size,i=t.layout,a=t.config,c=t.tracks,u=t.setProps;this.circos=new o.a({container:this.ref,width:r,height:r,enableZoomPan:n,enableDownloadSVG:e}),this.configCircos(i,a,c,u),this.setStopScroll(n)}},{key:"shouldComponentUpdate",value:function(t){return this.props.config!==t.config||this.props.layout!==t.layout||this.props.tracks!==t.tracks||this.props.size!==t.size||this.props.selectEvent!==t.selectEvent}},{key:"componentDidUpdate",value:function(){var t=this.props,e=t.size,n=t.layout,r=t.config,i=t.tracks,a=t.setProps;this.circos.removeTracks(),this.container=this.ref,this.circos.width=e,this.circos.height=e,this.configCircos(n,r,i,a)}},{key:"componentWillUnmount",value:function(){this.setStopScroll(!1)}},{key:"render",value:function(){var t=this,e=this.props,n=e.id,r=e.style,a=e.config,o=e.layout,c=e.tracks,u=e.size,f=e.eventDatum;return i.a.createElement("div",{id:n,style:r,eventDatum:f},i.a.createElement("div",{id:"Circos-container",ref:function(e){t.ref=e},config:a,layout:o,tracks:c,size:u}))}}])&&f(n.prototype,r),a&&f(n,a),e}(r.Component);h.defaultProps=c.b,h.propTypes=c.c}}]); \ No newline at end of file diff --git a/dash_bio/async-ideogram.js b/dash_bio/async-ideogram.js index 9b8e34648..7179e2ccd 100644 --- a/dash_bio/async-ideogram.js +++ b/dash_bio/async-ideogram.js @@ -1,2 +1,2 @@ -(window.webpackJsonpdash_bio=window.webpackJsonpdash_bio||[]).push([[2],{140:function(module,exports,__webpack_require__){(function(module){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,n;function _possibleConstructorReturn(t,n){return!n||"object"!==_typeof(n)&&"function"!=typeof n?_assertThisInitialized(t):n}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _inherits(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&_setPrototypeOf(t,n)}function _setPrototypeOf(t,n){return(_setPrototypeOf=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var e=0;e=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),o.hasOwnProperty(n)?{space:o[n],local:t}:t},a=function(t){var n=i(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===r&&n.documentElement.namespaceURI===r?n.createElement(t):n.createElementNS(e,t)}})(n)};function s(){}var c=function(t){return null==t?s:function(){return this.querySelector(t)}};function u(){return[]}var l=function(t){return null==t?u:function(){return this.querySelectorAll(t)}},f=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var h=document.documentElement;if(!h.matches){var d=h.webkitMatchesSelector||h.msMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector;f=function(t){return function(){return d.call(this,t)}}}}var g=f,p=function(t){return new Array(t.length)};function m(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function v(t,n,e,r,o,i){for(var a,s=0,c=n.length,u=i.length;sn?1:t>=n?0:NaN}m.prototype={constructor:m,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var _=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function w(t,n){return t.style.getPropertyValue(n)||_(t).getComputedStyle(t,null).getPropertyValue(n)}function x(t){return t.trim().split(/^|\s+/)}function A(t){return t.classList||new k(t)}function k(t){this._node=t,this._names=x(t.getAttribute("class")||"")}function C(t,n){for(var e=A(t),r=-1,o=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var E={},N=null;function H(t,n,e){return t=I(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function I(t,n,e){return function(r){var o=N;N=r;try{t.call(this,this.__data__,n,e)}finally{N=o}}}function j(t){return function(){var n=this.__on;if(n){for(var e,r=0,o=-1,i=n.length;r=x&&(x=w+1);!(_=m[x])&&++x=0;)(r=o[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=b);for(var e=this._groups,r=e.length,o=new Array(r),i=0;i1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):w(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=x(t+"");if(arguments.length<2){for(var r=A(this.node()),o=-1,i=e.length;++o=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),a=i.length;if(!(arguments.length<2)){for(s=n?R:j,null==e&&(e=!1),r=0;r=i?l=!0:10===(r=t.charCodeAt(a++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(a)&&++a),t.slice(o+1,n-1).replace(/""/g,'"')}for(;a>>1;e>>1;t(n[i])>>1);--i>0;)e(t,i,o,n);return t}function e(n,e,r,o){for(var i,a=n[--o+e],s=t(a);(i=e<<1)<=r&&(it(n[o+i+1])&&i++,!(s<=t(n[o+i])));)n[o+e]=n[o+i],e=i;n[o+e]=a}return n.sort=function(t,n,r){for(var o,i=r-n;--i>0;)o=t[n],t[n]=t[n+i],t[n+i]=o,e(t,1,i,n);return t},n}function a(t){var n=i(t);return function(e,r,o,i){var a,s,c,u=new Array(i=Math.min(o-r,i));for(s=0;sa&&(u[0]=c,a=t(n(u,0,i)[0]))}while(++re&&t(n[i-1])>s;--i)n[i]=n[i-1];n[i]=a}return n}}function c(t){var n=s(t);return function e(r,o,i){return(i-o>1,l=u-a,f=u+a,h=n[s],d=t(h),g=n[l],p=t(g),m=n[u],v=t(m),y=n[f],b=t(y),_=n[c],w=t(_);d>p&&(i=h,h=g,g=i,i=d,d=p,p=i),b>w&&(i=y,y=_,_=i,i=b,b=w,w=i),d>v&&(i=h,h=m,m=i,i=d,d=v,v=i),p>v&&(i=g,g=m,m=i,i=p,p=v,v=i),d>b&&(i=h,h=y,y=i,i=d,d=b,b=i),v>b&&(i=m,m=y,y=i,i=v,v=b,b=i),p>w&&(i=g,g=_,_=i,i=p,p=w,w=i),p>v&&(i=g,g=m,m=i,i=p,p=v,v=i),b>w&&(i=y,y=_,_=i,i=b,b=w,w=i);var x=g,A=p,k=y,C=b;n[s]=h,n[l]=n[r],n[u]=m,n[f]=n[o-1],n[c]=_;var T=r+1,M=o-2,S=A<=C&&A>=C;if(S)for(var L=T;L<=M;++L){var D=n[L];if((O=t(D))A)for(;;){if(!((P=t(n[M]))>A)){if(PC)for(;;){if(!((P=t(n[M]))>C)){Pc){for(var B;(B=t(n[T]))<=A&&B>=A;)++T;for(;(P=t(n[M]))<=C&&P>=C;)--M;for(L=T;L<=M;L++){var O;if(D=n[L],(O=t(D))<=A&&O>=A)L!==T&&(n[L]=n[T],n[T]=D),T++;else if(O<=C&&O>=C)for(;;){var P;if(!((P=t(n[M]))<=C&&P>=C)){P32)throw new Error("invalid array width!");return t};function p(t){for(var n=new Array(t),e=-1;++er;)h[--s]=0},dimension:function(t){var l,M,S,L,D,B={filter:function(t){return null==t?X():Array.isArray(t)?q(t):"function"==typeof t?$(t):z(t)},filterExact:z,filterRange:q,filterFunction:$,filterAll:X,top:function(t){for(var n,e=[],r=j;--r>=I&&t>0;)h[n=M[r]]||(e.push(o[n]),--t);return e},bottom:function(t){for(var n,e=[],r=I;r0;)h[n=M[r]]||(e.push(o[n]),--t),r++;return e},group:G,groupAll:function(){var t=G(v),n=t.all;return delete t.all,delete t.top,delete t.order,delete t.orderNatural,delete t.size,t.value=function(){return n()[0].value},t},dispose:Q,remove:Q},O=~u&-~u,P=~O,F=c((function(t){return S[t]})),E=m,N=[],H=[],I=0,j=0;function R(n,r,o){S=n.map(t),L=F(function(t){for(var n=k(t,t),e=-1;++eI)for(r=I,o=Math.min(n,j);rj)for(r=Math.max(n,j),o=e;r1?d(c,s):k(s,D),M&&(f=(l=w[0]).key);N=y);)++N;for(;N_||(c[u=e[N]+i]=B,h[u]&P||(b.value=A(b.value,o[u])),++N>=a));)y=t(n[N]);H()}for(;OO)for(O=0;O1?(F=U,E=z):(!B&&j&&(B=1,r=[{key:null,value:T()}]),1===B?(F=Y,E=q):(F=v,E=v),c=null),p[u]=F}function W(){if(B>1){for(var t=B,n=r,e=k(t,t),o=0,i=0;o1)for(o=0;o1?(E=z,F=U):1===B?(E=q,F=Y):E=F=v}else if(1===B){if(j)return;for(o=0;o=0&&p.splice(t,1),(t=N.indexOf(R))>=0&&N.splice(t,1),(t=T.indexOf(W))>=0&&T.splice(t,1),e}return arguments.length<1&&(t=n),p.push(F),N.push(R),T.push(W),R(l,M,0,s),V().orderNatural()}function Q(){H.forEach((function(t){t.dispose()}));var t=A.indexOf(R);return t>=0&&A.splice(t,1),(t=A.indexOf(W))>=0&&A.splice(t,1),(t=T.indexOf(U))>=0&&T.splice(t,1),u&=P,X()}return A.unshift(R),A.push(W),T.push(U),u|=O,(f>=32?!O:u&-(1<=0&&p.splice(t),(t=A.indexOf(c))>=0&&A.splice(t),i}return p.push(u),A.push(c),c(0,0),f()},size:function(){return s}},o=[],s=0,u=0,f=8,h=l(0),p=[],A=[],T=[];function M(n){var e=s,r=n.length;return r&&(o=o.concat(n),h=d(h,s+=r),A.forEach((function(t){t(n,e,r)}))),t}return arguments.length?M(arguments[0]):t}function k(t,n){return(n<257?l:n<65537?f:h)(t)}function C(t){return 8===t?256:16===t?65536:4294967296}"undefined"!=typeof Uint8Array&&(l=function(t){return new Uint8Array(t)},f=function(t){return new Uint16Array(t)},h=function(t){return new Uint32Array(t)},d=function(t,n){if(t.length>=n)return t;var e=new t.constructor(n);return e.set(t),e},g=function(t,n){var e;switch(n){case 16:e=f(t.length);break;case 32:e=h(t.length);break;default:throw new Error("invalid array width!")}return e.set(t),e}),t.crossfilter=A}(void 0!==n&&n||this)},function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"dispatch",(function(){return h}));var o={};e.r(o),e.d(o,"brush",(function(){return qn})),e.d(o,"brushX",(function(){return Yn})),e.d(o,"brushY",(function(){return zn})),e.d(o,"brushSelection",(function(){return Un}));var i=e(0),a=e(2),s={value:function(){}};function c(){for(var t,n=0,e=arguments.length,r={};n=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++i0)for(var e,r,o=new Array(e),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=A.exec(t))?O(parseInt(n[1],16)):(n=k.exec(t))?new N(n[1],n[2],n[3],1):(n=C.exec(t))?new N(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=T.exec(t))?P(n[1],n[2],n[3],n[4]):(n=M.exec(t))?P(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=S.exec(t))?I(n[1],n[2]/100,n[3]/100,1):(n=L.exec(t))?I(n[1],n[2]/100,n[3]/100,n[4]):D.hasOwnProperty(t)?O(D[t]):"transparent"===t?new N(NaN,NaN,NaN,0):null}function O(t){return new N(t>>16&255,t>>8&255,255&t,1)}function P(t,n,e,r){return r<=0&&(t=n=e=NaN),new N(t,n,e,r)}function F(t){return t instanceof y||(t=B(t)),t?new N((t=t.rgb()).r,t.g,t.b,t.opacity):new N}function E(t,n,e,r){return 1===arguments.length?F(t):new N(t,n,e,null==r?1:r)}function N(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function H(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function I(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new R(t,n,e,r)}function j(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof R)return new R(t.h,t.s,t.l,t.opacity);if(t instanceof y||(t=B(t)),!t)return new R;if(t instanceof R)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,o=Math.min(n,e,r),i=Math.max(n,e,r),a=NaN,s=i-o,c=(i+o)/2;return s?(a=n===i?(e-r)/s+6*(e0&&c<1?0:a,new R(a,s,c,t.opacity)}(t):new R(t,n,e,null==r?1:r)}function R(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function W(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}m(y,B,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),m(N,E,v(y,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new N(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new N(this.r*t,this.g*t,this.b*t,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"#"+H(this.r)+H(this.g)+H(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}})),m(R,j,v(y,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new R(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new R(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,o=2*e-r;return new N(W(t>=240?t-240:t+120,o,r),W(t,o,r),W(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var U=Math.PI/180,Y=180/Math.PI,z=.96422,q=.82521,X=6/29,$=3*X*X;function V(t){if(t instanceof G)return new G(t.l,t.a,t.b,t.opacity);if(t instanceof et){if(isNaN(t.h))return new G(t.l,0,0,t.opacity);var n=t.h*U;return new G(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof N||(t=F(t));var e,r,o=J(t.r),i=J(t.g),a=J(t.b),s=Q((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?e=r=s:(e=Q((.4360747*o+.3850649*i+.1430804*a)/z),r=Q((.0139322*o+.0971045*i+.7141733*a)/q)),new G(116*s-16,500*(e-s),200*(s-r),t.opacity)}function G(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Q(t){return t>.008856451679035631?Math.pow(t,1/3):t/$+4/29}function K(t){return t>X?t*t*t:$*(t-4/29)}function Z(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function J(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tt(t){if(t instanceof et)return new et(t.h,t.c,t.l,t.opacity);if(t instanceof G||(t=V(t)),0===t.a&&0===t.b)return new et(NaN,0,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Y;return new et(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function nt(t,n,e,r){return 1===arguments.length?tt(t):new et(t,n,e,null==r?1:r)}function et(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}m(G,(function(t,n,e,r){return 1===arguments.length?V(t):new G(t,n,e,null==r?1:r)}),v(y,{brighter:function(t){return new G(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new G(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new N(Z(3.1338561*(n=z*K(n))-1.6168667*(t=1*K(t))-.4906146*(e=q*K(e))),Z(-.9787684*n+1.9161415*t+.033454*e),Z(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),m(et,nt,v(y,{brighter:function(t){return new et(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new et(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return V(this).rgb()}}));var rt=1.78277,ot=-.29227,it=-.90649,at=1.97294,st=at*it,ct=at*rt,ut=rt*ot- -.14861*it;function lt(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);t instanceof N||(t=F(t));var n=t.r/255,e=t.g/255,r=t.b/255,o=(ut*r+st*n-ct*e)/(ut+st-ct),i=r-o,a=(at*(e-o)-ot*i)/it,s=Math.sqrt(a*a+i*i)/(at*o*(1-o)),c=s?Math.atan2(a,i)*Y-120:NaN;return new ft(c<0?c+360:c,s,o,t.opacity)}(t):new ft(t,n,e,null==r?1:r)}function ft(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ht(t,n,e,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*n+(4-6*i+3*a)*e+(1+3*t+3*i-3*a)*r+a*o)/6}m(ft,lt,v(y,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ft(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ft(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*U,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),o=Math.sin(t);return new N(255*(n+e*(-.14861*r+rt*o)),255*(n+e*(ot*r+it*o)),255*(n+e*(at*r)),this.opacity)}}));var dt=function(t){return function(){return t}};function gt(t,n){return function(e){return t+e*n}}function pt(t,n){var e=n-t;return e?gt(t,e>180||e<-180?e-360*Math.round(e/360):e):dt(isNaN(t)?n:t)}function mt(t,n){var e=n-t;return e?gt(t,e):dt(isNaN(t)?n:t)}var vt=function t(n){var e=function(t){return 1==(t=+t)?mt:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):dt(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=E(t)).r,(n=E(n)).r),o=e(t.g,n.g),i=e(t.b,n.b),a=mt(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=o(n),t.b=i(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function yt(t){return function(n){var e,r,o=n.length,i=new Array(o),a=new Array(o),s=new Array(o);for(e=0;e=1?(e=1,n-1):Math.floor(e*n),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,s=ri&&(o=n.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(e=e[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,c.push({i:a,x:At(e,r)})),i=Ct.lastIndex;return i180?n+=360:n-t>180&&(t+=360),i.push({i:e.push(o(e)+"rotate(",null,r)-2,x:At(t,n)})):n&&e.push(o(e)+"rotate("+n+r)}(i.rotate,a.rotate,s,c),function(t,n,e,i){t!==n?i.push({i:e.push(o(e)+"skewX(",null,r)-2,x:At(t,n)}):n&&e.push(o(e)+"skewX("+n+r)}(i.skewX,a.skewX,s,c),function(t,n,e,r,i,a){if(t!==e||n!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:At(t,e)},{i:s-2,x:At(n,r)})}else 1===e&&1===r||i.push(o(i)+"scale("+e+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,c),i=a=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Wt}()}finally{Wt=0,function(){for(var t,n,e=It,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:It=n);jt=t,nn(r)}(),qt=0}}function tn(){var t=$t.now(),n=t-zt;n>1e3&&(Xt-=n,zt=t)}function nn(t){Wt||(Ut&&(Ut=clearTimeout(Ut)),t-qt>24?(t<1/0&&(Ut=setTimeout(Jt,t-$t.now()-Xt)),Yt&&(Yt=clearInterval(Yt))):(Yt||(zt=$t.now(),Yt=setInterval(tn,1e3)),Wt=1,Vt(Jt)))}Kt.prototype=Zt.prototype={constructor:Kt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Gt():+e)+(null==n?0:+n),this._next||jt===this||(jt?jt._next=this:It=this,jt=this),this._call=t,this._time=e,nn()},stop:function(){this._call&&(this._call=null,this._time=1/0,nn())}};var en=function(t,n,e){var r=new Kt;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},rn=h("start","end","interrupt"),on=[],an=function(t,n,e,r,o,i){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,o=t.__transition;function i(c){var u,l,f,h;if(1!==e.state)return s();for(u in o)if((h=o[u]).name===e.name){if(3===h.state)return en(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[u]):+u0)throw new Error("too late; already scheduled");return e}function cn(t,n){var e=un(t,n);if(e.state>2)throw new Error("too late; already started");return e}function un(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ln=function(t,n){var e,r,o,i=t.__transition,a=!0;if(i){for(o in n=null==n?null:n+"",i)(e=i[o]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete i[o]):a=!1;a&&delete t.__transition}};function fn(t,n,e){var r=t._id;return t.each((function(){var t=cn(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return un(t,r).value[n]}}var hn=function(t,n){var e;return("number"==typeof n?At:n instanceof B?vt:(e=B(n))?(n=e,vt):Tt)(t,n)},dn=i.selection.prototype.constructor,gn=0;function pn(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function mn(){return++gn}var vn=i.selection.prototype;pn.prototype=function(t){return Object(i.selection)().transition(t)}.prototype={constructor:pn,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(i.selector)(t));for(var r=this._groups,o=r.length,a=new Array(o),s=0;s=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?sn:cn;return function(){var a=i(this,t),s=a.on;s!==r&&(o=(r=s).copy()).on(n,e),a.on=o}}(e,t,n))},attr:function(t,n){var e=Object(i.namespace)(t),r="transform"===e?Ft:hn;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,o,i;return function(){var a,s=e(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===s?null:a===r&&s===o?i:i=n(r=a,o=s);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,o,i;return function(){var a,s=e(this);if(null!=s)return(a=this.getAttribute(t))===s?null:a===r&&s===o?i:i=n(r=a,o=s);this.removeAttribute(t)}})(e,r,fn(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,o;return function(){var i=this.getAttributeNS(t.space,t.local);return i===e?null:i===r?o:o=n(r=i,e)}}:function(t,n,e){var r,o;return function(){var i=this.getAttribute(t);return i===e?null:i===r?o:o=n(r=i,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Object(i.namespace)(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Pt:hn;return null==n?this.styleTween(t,function(t,n){var e,r,o;return function(){var a=Object(i.style)(this,t),s=(this.style.removeProperty(t),Object(i.style)(this,t));return a===s?null:a===e&&s===r?o:o=n(e=a,r=s)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,o,a;return function(){var s=Object(i.style)(this,t),c=e(this);return null==c&&(this.style.removeProperty(t),c=Object(i.style)(this,t)),s===c?null:s===r&&c===o?a:a=n(r=s,o=c)}}(t,r,fn(this,"style."+t,n)):function(t,n,e){var r,o;return function(){var a=Object(i.style)(this,t);return a===e?null:a===r?o:o=n(r=a,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,o=n.apply(r,arguments);return o&&function(n){r.style.setProperty(t,o(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(fn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,o=un(this.node(),e).tween,i=0,a=o.length;i0&&(e=o-m),C<0?h=d-v:C>0&&(a=s-v),A=Tn,I.attr("cursor",On.selection),W());break;default:return}kn()}),!0).on("keyup.brush",(function(){switch(i.event.keyCode){case 16:P&&(b=_=P=!1,W());break;case 18:A===Sn&&(k<0?l=f:k>0&&(e=o),C<0?h=d:C>0&&(a=s),A=Mn,W());break;case 32:A===Tn&&(i.event.altKey?(k&&(l=f-m*k,e=o+m*k),C&&(h=d-v*C,a=s+v*C),A=Sn):(k<0?l=f:k>0&&(e=o),C<0?h=d:C>0&&(a=s),A=Mn),I.attr("cursor",On[x]),W());break;default:return}kn()}),!0).on("mousemove.brush",R,!0).on("mouseup.brush",U,!0);g(i.event.view)}An(),ln(w),c.call(w),N.start()}function R(){var t=Object(i.mouse)(w);!P||b||_||(Math.abs(t[0]-E[0])>Math.abs(t[1]-E[1])?_=!0:b=!0),E=t,y=!0,kn(),W()}function W(){var t;switch(m=E[0]-F[0],v=E[1]-F[1],A){case Tn:case Cn:k&&(m=Math.max(L-e,Math.min(B-l,m)),o=e+m,f=l+m),C&&(v=Math.max(D-a,Math.min(O-h,v)),s=a+v,d=h+v);break;case Mn:k<0?(m=Math.max(L-e,Math.min(B-e,m)),o=e+m,f=l):k>0&&(m=Math.max(L-l,Math.min(B-l,m)),o=e,f=l+m),C<0?(v=Math.max(D-a,Math.min(O-a,v)),s=a+v,d=h):C>0&&(v=Math.max(D-h,Math.min(O-h,v)),s=a,d=h+v);break;case Sn:k&&(o=Math.max(L,Math.min(B,e-m*k)),f=Math.max(L,Math.min(B,l+m*k))),C&&(s=Math.max(D,Math.min(O,a-v*C)),d=Math.max(D,Math.min(O,h+v*C)))}fn?1:t>=n?0:NaN},Vn=function(t){return 1===t.length&&(t=function(t){return function(n,e){return $n(t(n),e)}}(t)),{left:function(n,e,r,o){for(null==r&&(r=0),null==o&&(o=n.length);r>>1;t(n[i],e)<0?r=i+1:o=i}return r},right:function(n,e,r,o){for(null==r&&(r=0),null==o&&(o=n.length);r>>1;t(n[i],e)>0?o=i:r=i+1}return r}}}($n),Gn=Vn.right,Qn=(Vn.left,Gn),Kn=Array.prototype,Zn=(Kn.slice,Kn.map,Math.sqrt(50)),Jn=Math.sqrt(10),te=Math.sqrt(2);function ne(t,n,e){var r=(n-t)/Math.max(0,e),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=Zn?10:i>=Jn?5:i>=te?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Zn?10:i>=Jn?5:i>=te?2:1)}var ee=function(t,n){var e,r,o=t.length,i=-1;if(null==n){for(;++i=e)for(r=e;++ir&&(r=e)}else for(;++i=e)for(r=e;++ir&&(r=e);return r};function re(){}function oe(t,n){var e=new re;if(t instanceof re)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==n)for(;++o1?r[0]+r.slice(2):r,+t.slice(e+1)]},me=function(t){return(t=pe(Math.abs(t)))?t[1]:NaN},ve=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ye(t){return new be(t)}function be(t){if(!(n=ve.exec(t)))throw new Error("invalid format: "+t);var n;this.fill=n[1]||" ",this.align=n[2]||">",this.sign=n[3]||"-",this.symbol=n[4]||"",this.zero=!!n[5],this.width=n[6]&&+n[6],this.comma=!!n[7],this.precision=n[8]&&+n[8].slice(1),this.trim=!!n[9],this.type=n[10]||""}ye.prototype=be.prototype,be.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var _e,we,xe,Ae,ke=function(t,n){var e=pe(t,n);if(!e)return t+"";var r=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")},Ce={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return ke(100*t,n)},r:ke,s:function(t,n){var e=pe(t,n);if(!e)return t+"";var r=e[0],o=e[1],i=o-(_e=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+pe(t,Math.max(0,n+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Te=function(t){return t},Me=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];we=function(t){var n=t.grouping&&t.thousands?function(t,n){return function(e,r){for(var o=e.length,i=[],a=0,s=t[0],c=0;o>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),i.push(e.substring(o-=s,o+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}}(t.grouping,t.thousands):Te,e=t.currency,r=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Te,i=t.percent||"%";function a(t){var a=(t=ye(t)).fill,s=t.align,c=t.sign,u=t.symbol,l=t.zero,f=t.width,h=t.comma,d=t.precision,g=t.trim,p=t.type;"n"===p?(h=!0,p="g"):Ce[p]||(null==d&&(d=12),g=!0,p="g"),(l||"0"===a&&"="===s)&&(l=!0,a="0",s="=");var m="$"===u?e[0]:"#"===u&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",v="$"===u?e[1]:/[%p]/.test(p)?i:"",y=Ce[p],b=/[defgprs%]/.test(p);function _(t){var e,i,u,_=m,w=v;if("c"===p)w=y(t)+w,t="";else{var x=(t=+t)<0;if(t=y(Math.abs(t),d),g&&(t=function(t){t:for(var n,e=t.length,r=1,o=-1;r0){if(!+t[r])break t;o=0}}return o>0?t.slice(0,o)+t.slice(n+1):t}(t)),x&&0==+t&&(x=!1),_=(x?"("===c?c:"-":"-"===c||"("===c?"":c)+_,w=("s"===p?Me[8+_e/3]:"")+w+(x&&"("===c?")":""),b)for(e=-1,i=t.length;++e(u=t.charCodeAt(e))||u>57){w=(46===u?r+t.slice(e+1):t.slice(e))+w,t=t.slice(0,e);break}}h&&!l&&(t=n(t,1/0));var A=_.length+t.length+w.length,k=A>1)+_+t+w+k.slice(A);break;default:t=k+_+t+w}return o(t)}return d=null==d?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),_.toString=function(){return t+""},_}return{format:a,formatPrefix:function(t,n){var e=a(((t=ye(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(me(n)/3))),o=Math.pow(10,-r),i=Me[8+r/3];return function(t){return e(o*t)+i}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),xe=we.format,Ae=we.formatPrefix;var Se=function(t,n,e){var r,o=t[0],i=t[t.length-1],a=function(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=Zn?o*=10:i>=Jn?o*=5:i>=te&&(o*=2),n0)return[t];if((r=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),i=new Array(o=Math.ceil(n-t+1));++s0?r=ne(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=ne(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,e)),r>0?(o[i]=Math.floor(s/r)*r,o[a]=Math.ceil(c/r)*r,n(o)):r<0&&(o[i]=Math.ceil(s*r)/r,o[a]=Math.floor(c*r)/r,n(o)),t},t}function De(){var t=function(t,n){var e,r,o,i=fe,a=fe,s=Mt,c=!1;function u(){return e=Math.min(i.length,a.length)>2?ge:de,r=o=null,l}function l(n){return(r||(r=e(i,a,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,s)))(+n)}return l.invert=function(t){return(o||(o=e(a,i,he,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},l.domain=function(t){return arguments.length?(i=ce.call(t,le),u()):i.slice()},l.range=function(t){return arguments.length?(a=ue.call(t),u()):a.slice()},l.rangeRound=function(t){return a=ue.call(t),s=St,u()},l.clamp=function(t){return arguments.length?(c=!!t,u()):c},l.interpolate=function(t){return arguments.length?(s=t,u()):s},u()}(he,At);return t.copy=function(){return function(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}(t,De())},Le(t)}var Be=new Date,Oe=new Date;function Pe(t,n,e,r){function o(n){return t(n=new Date(+n)),n}return o.floor=o,o.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},o.round=function(t){var n=o(t),e=o.ceil(t);return t-n0))return s;do{s.push(a=new Date(+e)),n(e,i),t(e)}while(a=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(o.count=function(n,r){return Be.setTime(+n),Oe.setTime(+r),t(Be),t(Oe),Math.floor(e(Be,Oe))},o.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(r?function(n){return r(n)%t==0}:function(n){return o.count(0,n)%t==0}):o:null}),o}var Fe=Pe((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));Fe.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Pe((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):Fe:null},Fe.range;var Ee=6e4,Ne=(((Pe((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})).range,Pe((function(t){t.setTime(Math.floor(t/Ee)*Ee)}),(function(t,n){t.setTime(+t+n*Ee)}),(function(t,n){return(n-t)/Ee}),(function(t){return t.getMinutes()}))).range,Pe((function(t){var n=t.getTimezoneOffset()*Ee%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()}))).range,Pe((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ee)/864e5}),(function(t){return t.getDate()-1}))),He=Ne;function Ie(t){return Pe((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ee)/6048e5}))}Ne.range;var je=Ie(0),Re=Ie(1),We=Ie(2),Ue=Ie(3),Ye=Ie(4),ze=Ie(5),qe=Ie(6),Xe=((je.range,Re.range,We.range,Ue.range,Ye.range,ze.range,qe.range,Pe((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))).range,Pe((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));Xe.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Pe((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var $e=Xe,Ve=(((Xe.range,Pe((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*Ee)}),(function(t,n){return(n-t)/Ee}),(function(t){return t.getUTCMinutes()}))).range,Pe((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()}))).range,Pe((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1}))),Ge=Ve;function Qe(t){return Pe((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}Ve.range;var Ke=Qe(0),Ze=Qe(1),Je=Qe(2),tr=Qe(3),nr=Qe(4),er=Qe(5),rr=Qe(6),or=((Ke.range,Ze.range,Je.range,tr.range,nr.range,er.range,rr.range,Pe((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}))).range,Pe((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));or.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Pe((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var ir=or;function ar(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function sr(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function cr(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}or.range;var ur,lr,fr,hr={"-":"",_:" ",0:"0"},dr=/^\s*\d+/,gr=/^%/,pr=/[\\^$*+?|[\]().{}]/g;function mr(t,n,e){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i68?1900:2e3),e+r[0].length):-1}function Mr(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Sr(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Lr(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Dr(t,n,e){var r=dr.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Br(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Or(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Pr(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Fr(t,n,e){var r=dr.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Er(t,n,e){var r=dr.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Nr(t,n,e){var r=gr.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Hr(t,n,e){var r=dr.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Ir(t,n,e){var r=dr.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function jr(t,n){return mr(t.getDate(),n,2)}function Rr(t,n){return mr(t.getHours(),n,2)}function Wr(t,n){return mr(t.getHours()%12||12,n,2)}function Ur(t,n){return mr(1+He.count($e(t),t),n,3)}function Yr(t,n){return mr(t.getMilliseconds(),n,3)}function zr(t,n){return Yr(t,n)+"000"}function qr(t,n){return mr(t.getMonth()+1,n,2)}function Xr(t,n){return mr(t.getMinutes(),n,2)}function $r(t,n){return mr(t.getSeconds(),n,2)}function Vr(t){var n=t.getDay();return 0===n?7:n}function Gr(t,n){return mr(je.count($e(t),t),n,2)}function Qr(t,n){var e=t.getDay();return t=e>=4||0===e?Ye(t):Ye.ceil(t),mr(Ye.count($e(t),t)+(4===$e(t).getDay()),n,2)}function Kr(t){return t.getDay()}function Zr(t,n){return mr(Re.count($e(t),t),n,2)}function Jr(t,n){return mr(t.getFullYear()%100,n,2)}function to(t,n){return mr(t.getFullYear()%1e4,n,4)}function no(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+mr(n/60|0,"0",2)+mr(n%60,"0",2)}function eo(t,n){return mr(t.getUTCDate(),n,2)}function ro(t,n){return mr(t.getUTCHours(),n,2)}function oo(t,n){return mr(t.getUTCHours()%12||12,n,2)}function io(t,n){return mr(1+Ge.count(ir(t),t),n,3)}function ao(t,n){return mr(t.getUTCMilliseconds(),n,3)}function so(t,n){return ao(t,n)+"000"}function co(t,n){return mr(t.getUTCMonth()+1,n,2)}function uo(t,n){return mr(t.getUTCMinutes(),n,2)}function lo(t,n){return mr(t.getUTCSeconds(),n,2)}function fo(t){var n=t.getUTCDay();return 0===n?7:n}function ho(t,n){return mr(Ke.count(ir(t),t),n,2)}function go(t,n){var e=t.getUTCDay();return t=e>=4||0===e?nr(t):nr.ceil(t),mr(nr.count(ir(t),t)+(4===ir(t).getUTCDay()),n,2)}function po(t){return t.getUTCDay()}function mo(t,n){return mr(Ze.count(ir(t),t),n,2)}function vo(t,n){return mr(t.getUTCFullYear()%100,n,2)}function yo(t,n){return mr(t.getUTCFullYear()%1e4,n,4)}function bo(){return"+0000"}function _o(){return"%"}function wo(t){return+t}function xo(t){return Math.floor(+t/1e3)}(ur=function(t){var n=t.dateTime,e=t.date,r=t.time,o=t.periods,i=t.days,a=t.shortDays,s=t.months,c=t.shortMonths,u=yr(o),l=br(o),f=yr(i),h=br(i),d=yr(a),g=br(a),p=yr(s),m=br(s),v=yr(c),y=br(c),b={a:function(t){return a[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:jr,e:jr,f:zr,H:Rr,I:Wr,j:Ur,L:Yr,m:qr,M:Xr,p:function(t){return o[+(t.getHours()>=12)]},Q:wo,s:xo,S:$r,u:Vr,U:Gr,V:Qr,w:Kr,W:Zr,x:null,X:null,y:Jr,Y:to,Z:no,"%":_o},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return i[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:eo,e:eo,f:so,H:ro,I:oo,j:io,L:ao,m:co,M:uo,p:function(t){return o[+(t.getUTCHours()>=12)]},Q:wo,s:xo,S:lo,u:fo,U:ho,V:go,w:po,W:mo,x:null,X:null,y:vo,Y:yo,Z:bo,"%":_o},w={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=g[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=p.exec(n.slice(e));return r?(t.m=m[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return k(t,n,e,r)},d:Lr,e:Lr,f:Er,H:Br,I:Br,j:Dr,L:Fr,m:Sr,M:Or,p:function(t,n,e){var r=u.exec(n.slice(e));return r?(t.p=l[r[0].toLowerCase()],e+r[0].length):-1},Q:Hr,s:Ir,S:Pr,u:wr,U:xr,V:Ar,w:_r,W:kr,x:function(t,n,r){return k(t,e,n,r)},X:function(t,n,e){return k(t,r,n,e)},y:Tr,Y:Cr,Z:Mr,"%":Nr};function x(t,n){return function(e){var r,o,i,a=[],s=-1,c=0,u=t.length;for(e instanceof Date||(e=new Date(+e));++s53)return null;"w"in i||(i.w=1),"Z"in i?(r=(o=(r=sr(cr(i.y))).getUTCDay())>4||0===o?Ze.ceil(r):Ze(r),r=Ge.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(r=(o=(r=n(cr(i.y))).getDay())>4||0===o?Re.ceil(r):Re(r),r=He.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?sr(cr(i.y)).getUTCDay():n(cr(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,sr(i)):n(i)}}function k(t,n,e,r){for(var o,i,a=0,s=n.length,c=e.length;a=c)return-1;if(37===(o=n.charCodeAt(a++))){if(o=n.charAt(a++),!(i=w[o in hr?n.charAt(a++):o])||(r=i(t,e,r))<0)return-1}else if(o!=e.charCodeAt(r++))return-1}return r}return b.x=x(e,b),b.X=x(r,b),b.c=x(n,b),_.x=x(e,_),_.X=x(r,_),_.c=x(n,_),{format:function(t){var n=x(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=A(t+="",ar);return n.toString=function(){return t},n},utcFormat:function(t){var n=x(t+="",_);return n.toString=function(){return t},n},utcParse:function(t){var n=A(t,sr);return n.toString=function(){return t},n}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],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"]})).format,ur.parse,lr=ur.utcFormat,fr=ur.utcParse,Date.prototype.toISOString||lr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||fr("%Y-%m-%dT%H:%M:%S.%LZ");var Ao=function(t){return t.match(/.{6}/g).map((function(t){return"#"+t}))};function ko(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function Co(t,n){var e,r,o=/(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g,i=/^\s+|\s+$/g,a=/\s+/g,s=/^0x[0-9a-f]+$/i,c=/^0/,u=function(t){return(Co.insensitive&&(""+t).toLowerCase()||""+t).replace(i,"")},l=u(t),f=u(n),h=l.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=f.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),g=parseInt(l.match(s),16)||1!==h.length&&Date.parse(l),p=parseInt(f.match(s),16)||g&&f.match(/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/)&&Date.parse(f)||null,m=function(t,n){return(!t.match(c)||1==n)&&parseFloat(t)||t.replace(a," ").replace(i,"")||0};if(p){if(gp)return 1}for(var v=0,y=h.length,b=d.length,_=Math.max(y,b);v<_;v++){if(e=m(h[v]||"",y),r=m(d[v]||"",b),isNaN(e)!==isNaN(r))return isNaN(e)?1:-1;if(/[^\x00-\x80]/.test(e+r)&&e.localeCompare){var w=e.localeCompare(r);return w/Math.abs(w)}if(er)return 1}}Ao("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Ao("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Ao("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),Ao("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Rt(lt(300,.5,0),lt(-240,.5,1)),Rt(lt(-100,.75,.35),lt(80,1.5,.8)),Rt(lt(260,.75,.35),lt(80,1.5,.8)),lt(),ko(Ao("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ko(Ao("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ko(Ao("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ko(Ao("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var To=e(1);function Mo(t){this.config=JSON.parse(JSON.stringify(t)),function(t){t.chromosomesArray=[],t.coordinateSystem="iscn",t.maxLength={bp:0,iscn:0},t.chromosomes={},t.numChromosomes=0,t.config.debug||(t.config.debug=!1),t.config.dataDir||(t.config.dataDir=t.getDataDir()),t.config.container||(t.config.container="body"),t.selector=t.config.container+" #_ideogram",t.config.resolution||(t.config.resolution=""),t.config.orientation||(t.config.orientation="vertical"),t.config.brush||(t.config.brush=null),t.config.rows||(t.config.rows=1),"showChromosomeLabels"in t.config==0&&(t.config.showChromosomeLabels=!0),t.config.showNonNuclearChromosomes||(t.config.showNonNuclearChromosomes=!1)}(this),function(t){t.config.ploidy||(t.config.ploidy=1),t.config.ploidy>1&&(t.sexChromosomes={},t.config.sex||(t.config.sex="male"),2!==t.config.ploidy||t.config.ancestors||(t.config.ancestors={M:"#ffb6c1",P:"#add8e6"},t.config.ploidyDesc="MP"))}(this),function(t){t.config.showBandLabels||(t.config.showBandLabels=!1),"showFullyBanded"in t.config?t.config.showFullyBanded=t.config.showFullyBanded:t.config.showFullyBanded=!0,t.bandsToShow=[],t.bandData={}}(this),function(t){var n,e,r;t.config.chrHeight||(n=t.config.container,e=document.querySelector(n).getBoundingClientRect(),r="vertical"===t.config.orientation?e.height:e.width,"body"!==n&&0!==r||(r=400),t.config.chrHeight=r)}(this),function(t){var n,e;t.config.chrWidth||(n=10,(e=t.config.chrHeight)<900&&e>500?n=Math.round(e/40):e>=900&&(n=Math.round(e/45)),t.config.chrWidth=n)}(this),function(t){t.config.chrMargin||(1===t.config.ploidy?t.config.chrMargin=10:t.config.chrMargin=Math.round(t.config.chrWidth/4)),t.config.showBandLabels&&(t.config.chrMargin+=20)}(this),function(t,n){t.onLoad&&(n.onLoadCallback=t.onLoad),t.onLoadAnnots&&(n.onLoadAnnotsCallback=t.onLoadAnnots),t.onDrawAnnots&&(n.onDrawAnnotsCallback=t.onDrawAnnots),t.onBrushMove&&(n.onBrushMoveCallback=t.onBrushMove),t.onDidRotate&&(n.onDidRotateCallback=t.onDidRotate),t.onWillShowAnnotTooltip&&(n.onWillShowAnnotTooltipCallback=t.onWillShowAnnotTooltip)}(t,this),function(t){t.organisms={9606:{commonName:"Human",scientificName:"Homo sapiens",scientificNameAbbr:"H. sapiens",assemblies:{default:"GCF_000001405.26",GRCh38:"GCF_000001405.26",GRCh37:"GCF_000001405.13"}},10090:{commonName:"Mouse",scientificName:"Mus musculus",scientificNameAbbr:"M. musculus",assemblies:{default:"GCF_000001635.20"}},4641:{commonName:"banana",scientificName:"Musa acuminata",scientificNameAbbr:"M. acuminata",assemblies:{default:"mock"}}}}(this),function(t){t.bump=Math.round(t.config.chrHeight/125),t.adjustedBump=!1,t.config.chrHeight<200&&(t.adjustedBump=!0,t.bump=4)}(this),function(t,n){t.chromosome&&(n.config.chromosomes=[t.chromosome],"showBandLabels"in t==0&&(n.config.showBandLabels=!0),"rotatable"in t==0&&(n.config.rotatable=!1))}(t,this),this.initAnnotSettings(),this.config.chrMargin+=this.config.chrWidth,"heatmap"===this.config.annotationsLayout?this.config.chrMargin+=this.config.annotTracksHeight:this.config.chrMargin+=2*this.config.annotTracksHeight,this.init()}var So=To.a.assign({},i);function Lo(t){void 0!==t.timeout&&window.clearTimeout(t.timeout),t.rawAnnots=t.setOriginalTrackIndexes(t.rawAnnots),t.config.annotationsDisplayedTracks?t.annots=t.updateDisplayedTracks(t.config.annotationsDisplayedTracks):(t.annots=t.processAnnotData(t.rawAnnots),t.config.filterable&&t.initCrossFilter(),t.drawProcessedAnnots(t.annots))}function Do(t,n){var e=(new Date).getTime(),r=this.config;this.initDrawChromosomes(t),r.annotationsPath&&function(t){t.rawAnnots?Lo(t):function n(){t.timeout=setTimeout((function(){t.rawAnnots?Lo(t):n()}),50)}()}(this),function(t,n){var e,r,o,i;if(!0===t.showBandLabels&&(o=(new Date).getTime(),n.hideUnshownBandLabels(),i=(new Date).getTime(),t.debug&&console.log("Time in showing bands: "+(i-o)+" ms"),"vertical"===t.orientation))for(e=0;e0}return!0}}]),t}(),Oo=To.a.assign({},i),Po=function(){function t(n){_classCallCheck(this,t),this._node=n}return _createClass(t,[{key:"getLabel",value:function(){return Oo.select(this._node.parentNode).select("text.chrLabel").text()}},{key:"getSetLabel",value:function(){return Oo.select(this._node.parentNode).select("text.chrSetLabel").text()}}]),t}(),Fo=To.a.assign({},i),Eo=function(){function t(n,e){if(_classCallCheck(this,t),this._config=n,this._ideo=e,this._ploidy=this._ideo._ploidy,this._translate=void 0,"chrSetMargin"in n)this.chrSetMargin=n.chrSetMargin;else{var r=this._config.chrMargin;this.chrSetMargin=this._config.ploidy>1?r:0}this._tickSize=8,this._isRotated=!1}return _createClass(t,[{key:"_getLeftMargin",value:function(){return this.margin.left}},{key:"_getYScale",value:function(){return 20/this._config.chrWidth}},{key:"getChromosomeLabels",value:function(t){var n=new Po(t),e=[];return this._ideo.config.ploidy>1&&e.push(n.getSetLabel()),e.push(n.getLabel()),e.filter((function(t){return t.length>0}))}},{key:"getChromosomeBandLabelTranslate",value:function(t){var n,e,r,o=this._ideo,i=this._tickSize,a=o.config.orientation;return"vertical"===a?r="rotate(-90)translate("+(n=i)+","+(e=o.round(2+t.px.start+t.px.width/2))+")":"horizontal"===a&&(r="translate("+(n=o.round(-i+t.px.start+t.px.width/2))+","+(e=-10)+")"),{x:n,y:e,translate:r}}},{key:"didRotate",value:function(t,n){var e,r,o,i,a,s,c,u,l;r=(e=this._ideo).config.taxid,o=n.id.split("-")[0].replace("chr",""),i=(a=e.chromosomes[r][o]).bands,u=(c=Fo.select(n.parentNode)).attr("transform"),l=/scale\(.*\)/.exec(u),u=u.replace(l,""),c.attr("transform",u),s=a.width,(a=e.getChromosomeModel(i,o,r,t)).oldWidth=s,e.chromosomes[r][o]=a,e.drawChromosome(a),e.handleRotateOnClick(),e.rawAnnots&&(e.displayedTrackIndexes?e.updateDisplayedTracks(e.displayedTrackIndexes):(e.annots=e.processAnnotData(e.rawAnnots),e.drawProcessedAnnots(e.annots),e.config.filterable&&e.initCrossFilter())),!0===e.config.showBandLabels&&(e.drawBandLabels(e.chromosomes),e.hideUnshownBandLabels()),e.onDidRotateCallback&&e.onDidRotateCallback(a)}},{key:"rotate",value:function(t,n,e){var r,o,i,a;r=this._ideo,a=r.selector+" .chrSetLabel, "+r.selector+" .chrLabel",i=document.querySelector(r.selector).getBoundingClientRect(),o=Fo.selectAll(r.selector+" g.chromosome").filter((function(){return this!==e})),this._isRotated?(this._isRotated=!1,r.config.chrHeight=r.config.chrHeightOriginal,r.config.chrWidth=r.config.chrWidthOriginal,r.config.annotationHeight=r.config.annotationHeightOriginal,this.rotateBack(t,n,e,(function(){o.style("display",null),Fo.selectAll(a).style("display",null),r._layout.didRotate(n,e)}))):(this._isRotated=!0,o.style("display","none"),Fo.selectAll(a).style("display","none"),this.rotateForward(t,n,e,(function(){var t,o,a;r.config.chrHeightOriginal=r.config.chrHeight,r.config.chrWidthOriginal=r.config.chrWidth,r.config.annotationHeightOriginal=r.config.annotationHeight,"VerticalLayout"===r._layout._class?(o=i.width,a=window.innerWidth):(o=i.height-10,a=window.innerHeight-10),t=a0?n:n+4+2*t);if(!this._translate){var i;this._translate=[this._ploidy.getSetSize(0)*o*2];for(var a=1;a1&&(t*=1.8),t}},{key:"rotateForward",value:function(t,n,e,r){var o;Io.select(e.parentNode).transition().attr("transform","rotate(90) translate(30, -37.5) ").on("end",r),o=this.getChromosomeLabels(e),Io.select(this._ideo.getSvg()).append("g").attr("class","tmp").selectAll("text").data(o).enter().append("text").attr("class",(function(t,n){return 0===n&&2===o.length?"chrSetLabel":null})).attr("x",26).attr("y",(function(t,n){return 12*(n+1+o.length%2)})).style("text-anchor","middle").style("opacity",0).text(String).transition().style("opacity",1),this._ideo.config.orientation="vertical"}},{key:"rotateBack",value:function(t,n,e,r){var o=this.getChromosomeSetTranslate(t);Io.select(e.parentNode).transition().attr("transform",o).on("end",r),Io.selectAll(this._ideo.selector+" g.tmp").style("opacity",0).remove(),this._ideo.config.orientation="horizontal"}},{key:"getHeight",value:function(t){var n=this._config.chromosomes[t].length,e=this.getChromosomeSetYTranslate(n-1);return(e+=this._getChromosomeSetSize(n-1))+2*this._getAdditionalOffset()}},{key:"getWidth",value:function(){return this._config.chrHeight+1.5*this.margin.top}},{key:"getChromosomeSetLabelAnchor",value:function(){return"end"}},{key:"getChromosomeBandLabelAnchor",value:function(){return null}},{key:"getChromosomeBandTickY1",value:function(){return 2}},{key:"getChromosomeBandTickY2",value:function(){return 10}},{key:"getChromosomeSetLabelTranslate",value:function(){return null}},{key:"getChromosomeSetTranslate",value:function(t){return"translate("+this._getLeftMargin()+", "+this.getChromosomeSetYTranslate(t)+")"}},{key:"getChromosomeSetYTranslate",value:function(t){if(!this._config.ploidyDesc)return this._config.chrMargin*(t+1);if(!this._translate){this._translate=[1];for(var n=1;no-1?(e=this.margin.left+1.4*this._config.chrHeight,r=this.getChromosomeSetYTranslate(t-o)):(e=this.margin.left,r=this.getChromosomeSetYTranslate(t)),"rotate(90) translate("+e+", -"+r+")"}},{key:"getChromosomeSetYTranslate",value:function(t){var n=this._getAdditionalOffset();return this.margin.left*t+this._config.chrWidth+2*n+n*t}},{key:"getChromosomeSetLabelXPosition",value:function(t){return(this._ploidy.getSetSize(t)*this._config.chrWidth+20)/-2+(this._config.ploidy>1?0:this._config.chrWidth)}},{key:"getChromosomeLabelXPosition",value:function(){return this._config.chrWidth/-2}}]),n}(Eo),Uo=To.a.assign({},i);function Yo(t,n,e){this.config.annotationsPath&&this.fetchAnnots(this.config.annotationsPath),function(t){if("ploidyDesc"in t.config&&"string"==typeof t.config.ploidyDesc){for(var n=[],e=0;e1?new Wo(n,t):"vertical"===n.orientation?new Ho(n,t):"horizontal"===n.orientation?new jo(n,t):new Ho(n,t)}(this),function(t,n){Uo.selectAll(n.config.container+" #_ideogramOuterWrap").remove(),Uo.select(n.config.container).append("div").attr("id","_ideogramOuterWrap").append("div").attr("id","_ideogramTrackLabelContainer").style("position","absolute"),Uo.select(n.config.container+" #_ideogramOuterWrap").append("div").attr("id","_ideogramMiddleWrap").style("position","relative").style("overflow-x","auto").append("div").attr("id","_ideogramInnerWrap").append("svg").attr("id","_ideogram").attr("class",function(t){var n="";return t.config.showChromosomeLabels&&("horizontal"===t.config.orientation?n+="labeledLeft ":n+="labeled "),t.config.annotationsLayout&&"overlay"===t.config.annotationsLayout&&(n+="faint"),n}(n)).attr("width",n._layout.getWidth(t)).attr("height",n._layout.getHeight(t)).html(n.getBandColorGradients())}(n,this),this.isOnlyIdeogram=1===document.querySelectorAll("#_ideogram").length,function(t){Uo.select(t.config.container+" #_ideogramOuterWrap").append("div").attr("class","_ideogramTooltip").attr("id","_ideogramTooltip").style("opacity",0).style("position","fixed").style("text-align","center").style("padding","4px").style("font","12px sans-serif").style("background","white").style("border","1px solid black").style("border-radius","5px").style("z-index","100")}(this),this.finishInit(t,e)}var zo=e(5),qo=To.a.assign({},a,i);function Xo(t,n,e){var r=e.config.ploidy;return"sex"in e.config&&(2===r&&e.sexChromosomes.index+2===n||"female"===e.config.sex&&"Y"===t.name)}function $o(t,n,e,r,o){var i,a,s,c;for(i=0;i=chrBands.length/2&&(n.coordinateSystem="bp")}function Go(t){var n,e,r,o=this.config.taxids,i=0;for(t.length>0&&(this.bandsArray={}),e=0;e=4&&(f=h[3],i[0]=f),h.length>=8&&(u=h[8].split(","),l=t.rgbToHex(u[0],u[1],u[2]),i.push(l)),[a,i])}},{key:"parseRawAnnots",value:function(t,n,e,r){var o,i,a,s,c,u;for(u=!0,!1===isNaN(parseInt(e[n],10))&&(u=!1),o=n;o=8&&c.push("color"),{keys:c,annots:t}}},{key:"parseBed",value:function(t,n){var e,r,o,i,a=[],s=t.split(/\r\n|\n/);for(r=Object.keys(n.chromosomes[n.config.taxid]),e=0;e")}(n),ei.select(n.config.container+" #_ideogramTrackLabel").interrupt().style("top","").style("left","").style("transform",null).style("transform","rotate(-90deg)").html(o),e=function(t,n,e){var r,o,i,a,s;return r=n.id.split("-").slice(0,-1).join("-")+"-0",o=ei.select(e.config.container+" #"+r).nodes()[0].getBoundingClientRect(),i=ei.select(e.config.container+" #_ideogramTrackLabel").nodes()[0].getBoundingClientRect(),a=ei.select(e.config.container).nodes()[0].getBoundingClientRect(),s=Math.round(o.left+i.width)-o.width-1,[s-=a.left-7,-(t.split("
").length-2)*o.width+2]}(o,t,n),i=(r=_slicedToArray(e,2))[0],function(t,n,e){ei.select(e.config.container+" #_ideogramTrackLabel").style("opacity",1).style("left",n+"px").style("top",t+"px").style("width","max-content").style("transform-origin","bottom left").style("text-align","left").on("mouseover",(function(){clearTimeout(e.hideTrackLabelTimeout)})).on("mouseout",(function(){oi(e)}))}(r[1],i,n)}(this,i)})).on("mouseout",(function(){oi(i)})),i.onDrawAnnotsCallback&&i.onDrawAnnotsCallback()}function ui(t,n,e,r,o){return t===n&&"+"===o&&e>r||e===o||0!==t&&t!==n&&e<=o&&e>r||0===t&&e<=o}function li(t,n){var e,r,o,i,a,s,c,u;for(e=0;e0&&(r+="-"+t.stop.toLocaleString()),n=r,e=24,t.name&&(n=(t.displayName?t.displayName:t.name)+"
"+n,e+=8),[n,e]}(t),function(t,n,e,r,o){t.html(n).style("opacity",1).style("left",e.e+"px").style("top",e.f-r+"px").style("pointer-events",null).on("mouseover",(function(){clearTimeout(o.hideAnnotTooltipTimeout)})).on("mouseout",(function(){o.startHideAnnotTooltipTimeout()}))}(i,(r=_slicedToArray(e,2))[0],o,r[1],this))}function bi(t){var n,e,r=!1,o=(new Date).getTime();return n=this.chromosomes[this.config.taxid],function(t){"histogramScaling"in t.config==0&&(t.config.histogramScaling="absolute")}(this),void 0===this.maxAnnotsPerBar&&(this.maxAnnotsPerBar={},r=!0),function(t,n,e){var r,o,i,a,s,c,u;if(n||"relative"===e.config.histogramScaling){for(r=0,o=0;oi&&(i=u),u>r&&(r=u);e.maxAnnotsPerBar[s]=i}e.maxAnnotsPerBarAllChrs=r}}(e=function(t,n,e,r){var o,i,a,s,c,u,l,f,h,d,g=r.config.barWidth;for(o in t)for(i=t[o].annots,s=n[(a=e[t[o].chr]).chrIndex].annots,c=0;c=h&&l":"triangle"===r&&(n='"):n='",n}function xi(t,n,e){var r,o,i;for(r=0;r"+(i=e.rows[r]).name+"",o=19*r,"name"in e&&(o+=19),n+=''+wi(i)+"";return[t,n]}var Ai=Object.assign({},i);function ki(t){var n,e,r=[],o=this.chromosomes[this.config.taxid];if("annots"in t[0])return this.drawProcessedAnnots(t);for(e in o)r.push({chr:e,annots:[]});r=function(t,n){var e,r,o,i;for(e=0;e"+i.name+""),o=(s=_slicedToArray(xi(o,r='',i),2))[0],r=s[1],a+=(r+="")+"
    "+o+"
"}var c=_i.select(t.config.container+" #_ideogramOuterWrap");c.append("style").html("#_ideogramLegend {font: 12px Arial; line-height: 19px;} #_ideogramLegend svg {float: left;} #_ideogramLegend ul {position: relative; left: -14px; list-style: none; float: left; padding-left: 10px; margin-top: 0px;} #_ideogramLegend ul span {position: relative; left: -15px;} "),c.append("div").attr("id","_ideogramLegend").html(a)}(this),"heatmap"!==n?(function(t,n,e){var r;!function(t,n){var e,r;if("heatmap"!==t&&"histogram"!==t){for(r=0,e=0;e2e3&&console.warn('Rendering more than 2000 annotations in Ideogram?\nTry setting "annotationsLayout" to "heatmap" or "histogram" in your Ideogram configuration object for better layout and performance.')}}(t,n),"histogram"===t&&(n=e.getHistogramBars(n)),r=function(t,n){return Ai.selectAll(n.selector+" .chromosome").data(t).selectAll("path.annot").data((function(t){return t.annots})).enter()}(e.fillAnnots(n),e),"tracks"===t?function(t,n){var e,r=n.config.annotationHeight;e=function(t){var n;return{triangle:"m0,0 l -"+t+" "+2*t+" l "+2*t+" 0 z",circle:"m -"+(n=t)+", "+n+"a "+n+","+n+" 0 1,0 "+2*n+",0a "+n+","+n+" 0 1,0 -"+2*n+",0",rectangle:"m0,0 l 0 "+2*t+"l "+t+" 0l 0 -"+2*t+"z"}}(r),t.append("g").attr("id",(function(t){return t.id})).attr("class","annot").attr("transform",(function(t){var e=n.config.chrWidth+t.trackIndex*r*2;return"translate("+t.px+","+e+")"})).append("path").attr("d",(function(t){return function(t,n){return t.shape&&"triangle"!==t.shape?"circle"===t.shape?n.circle:"rectangle"===t.shape?n.rectangle:t.shape:n.triangle}(t,e)})).attr("fill",(function(t){return t.color})).on("mouseover",(function(t){n.showAnnotTooltip(t,this)})).on("mouseout",(function(){n.startHideAnnotTooltipTimeout()}))}(r,e):"overlay"===t?function(t,n){t.append("polygon").attr("id",(function(t){return t.id})).attr("class","annot").attr("points",(function(t){var e,r,o=n.config.chrWidth;return t.stopPx-t.startPx>1?(e=t.startPx,r=t.stopPx):(e=t.px-.5,r=t.px+.5),e+","+o+" "+r+","+o+" "+r+",0 "+e+",0"})).attr("fill",(function(t){return t.color})).on("mouseover",(function(t){n.showAnnotTooltip(t,this)})).on("mouseout",(function(){n.startHideAnnotTooltipTimeout()}))}(r,e):"histogram"===t&&function(t,n){var e,r,o={},i=n.config.chrWidth;for(r in e=n.chromosomes[n.config.taxid])o[r]=e[r];t.append("polygon").attr("class","annot").attr("points",(function(t){return function(t,n,e,r){var o,i,a,s;o=t.px+r.bump,i=t.px+r.config.barWidth+r.bump,a=n,s=n+t.height;var c=e[t.chr];return i>c&&(i=c),o+","+a+" "+i+","+a+" "+i+","+s+" "+o+","+s}(t,i,o,n)})).attr("fill",(function(t){return t.color}))}(r,e)}(n,t,this),this.onDrawAnnotsCallback&&this.onDrawAnnotsCallback()):this.drawHeatmaps(t)}var Ti=Object.assign({},i);function Mi(t,n,e){return t.append("g").attr("class","syntenicRegion").attr("id",n).on("click",(function(){var t=this,n=Ti.selectAll(e.selector+" .syntenicRegion").filter((function(){return this!==t}));n.classed("hidden",!n.classed("hidden"))})).on("mouseover",(function(){var t=this;Ti.selectAll(e.selector+" .syntenicRegion").filter((function(){return this!==t})).classed("ghost",!0)})).on("mouseout",(function(){Ti.selectAll(e.selector+" .syntenicRegion").classed("ghost",!1)}))}function Si(t,n,e){var r,o;return r=t.r1,o=t.r2,r.startPx=e.convertBpToPx(r.chr,r.start)+n,r.stopPx=e.convertBpToPx(r.chr,r.stop)+n,o.startPx=e.convertBpToPx(o.chr,o.start)+n,o.stopPx=e.convertBpToPx(o.chr,o.stop)+n,[r,o]}function Li(t,n,e,r,o,i){var a,s;a="color"in i?i.color:"#CFC",s="opacity"in i?i.opacity:1,t.append("polygon").attr("points",n+", "+r.startPx+" "+n+", "+r.stopPx+" "+e+", "+o.stopPx+" "+e+", "+o.startPx).attr("style","fill: "+a+"; fill-opacity: "+s)}function Di(t,n,e,r,o){t.append("line").attr("class","syntenyBorder").attr("x1",n).attr("x2",e).attr("y1",r.startPx).attr("y2",o.startPx),t.append("line").attr("class","syntenyBorder").attr("x1",n).attr("x2",e).attr("y1",r.stopPx).attr("y2",o.stopPx)}function Bi(t){var n=(new Date).getTime();(function(t,n,e,r){var o,i,a,s,c,u,l,f;for(o=0;oc&&(c=s+1),i.splice(4,0,s),a.push(i);u.push({chr:o.chr,annots:a})}return n.numAvailTracks=c,u}(t.annots,this),n.splice(4,0,"trackIndexOriginal"),t={keys:n,annots:e},this.rawAnnots.metadata&&(t.metadata=this.rawAnnots.metadata),t)}var Ni=[["F00"],["F00","88F"],["F00","CCC","88F"],["F00","FA0","0AF","88F"],["F00","FA0","CCC","0AF","88F"],["F00","FA0","875","578","0AF","88F"],["F00","FA0","875","CCC","578","0AF","88F"],["F00","FA0","7A0","875","0A7","578","0AF","88F"],["F00","FA0","7A0","875","CCC","0A7","578","0AF","88F"],["F00","FA0","7A0","875","552","255","0A7","578","0AF","88F"]];function Hi(t,n,e,r,o,i,a){var s;return a.config.annotationTracks?o=function(t,n,e,r,o){var i;return n.trackIndex=e[3],(i=o.config.annotationTracks[n.trackIndex]).color&&(n.color=i.color),i.shape&&(n.shape=i.shape),t[r].annots.push(n),t}(o,t,e,i,a):"trackIndex"===n[3]&&1!==a.numAvailTracks?(o=(s=_slicedToArray(function(t,n,e,r,o,i){var a=Ni[i.numAvailTracks-1];return t.trackIndex=n[3],t.trackIndexOriginal=n[4],t.color="#"+a[t.trackIndexOriginal],t.trackIndex>i.config.numTracks-1?(t.trackIndex in e?e[t.trackIndex].push(t):e[t.trackIndex]=[t],[r,e]):(r[o].annots.push(t),[r,e])}(t,e,r,o,i,a),2))[0],r=s[1]):o=function(t,n,e,r){return n.trackIndex=0,n.color||(n.color=r.config.annotationsColor),n.shape||(n.shape="triangle"),t[e].annots.push(n),t}(o,t,i,a),[o,r]}function Ii(t,n,e,r,o,i,a){var s,c,u,l;for(s=0;s10&&console.error("Ideogram only displays up to 10 tracks at a time. You specified "+r+" tracks. Perhaps consider a different way to visualize your data."),(e=Object.keys(t).length)&&console.warn("Ideogram configuration specified "+r+" tracks, but loaded annotations contain "+e+" extra tracks.")}(i,this),o}var Wi=To.a.assign({},i,a);function Ui(){var t=this.config;t.annotationsPath||t.localAnnotationsPath||this.annots||t.annotations?function(t,n){var e;n.annotationHeight||(e="heatmap"===n.annotationsLayout?n.chrWidth-1:Math.round(n.chrHeight/100),t.config.annotationHeight=e),n.annotationTracks?t.config.numAnnotTracks=n.annotationTracks.length:n.annotationsNumTracks?t.config.numAnnotTracks=n.annotationsNumTracks:t.config.numAnnotTracks=1,t.config.annotTracksHeight=n.annotationHeight*n.numAnnotTracks,void 0===n.barWidth&&(t.config.barWidth=3)}(this,t):this.config.annotTracksHeight=0,void 0===t.annotationsColor&&(this.config.annotationsColor="#F00"),function(t,n){!1!==n.showAnnotTooltip&&(t.config.showAnnotTooltip=!0),n.onWillShowAnnotTooltip&&(t.onWillShowAnnotTooltipCallback=n.onWillShowAnnotTooltip)}(this,t)}function Yi(t){t.rawAnnots.annots=t.rawAnnots.annots.sort((function(t,n){return Co(t.chr,n.chr)})),t.onLoadAnnotsCallback&&t.onLoadAnnotsCallback(),t.config.heatmaps&&t.deserializeAnnotsForHeatmap(t.rawAnnots)}function zi(t){var n,e=this;"http"===t.slice(0,4)?(n=function(t){var n,e;return"bed"!==(e=(n=t.split("?")[0].split("."))[n.length-1])&&"json"!==e?(e=e.toUpperCase(),void alert("Ideogram.js only supports BED and Ideogram JSON at the moment. Sorry, check back soon for "+e+" support!")):e}(t),Wi.text(t).then((function(t){e.rawAnnots="bed"===n?new ni(t,e).rawAnnots:JSON.parse(t),Yi(e)}))):Wi.json(e.config.annotationsPath).then((function(t){e.rawAnnots=t,Yi(e)}))}function qi(t){var n,e,r,o,i,a,s;for(n=[],e=[],r=this.chromosomesArray,o=0;o100){if(void 0===e.recovering)return o.getAssemblyAndChromosomesFromEutils(e.callback,!0),Promise.reject("Unexpectedly found genomic scaffolds instead of chromosomes while querying RefSeq. Recovering.");throw Error("Failed to find chromosomes for genome "+r)}}(t,n,e),r=t.linksets[0].linksetdbs[0].links.join(","),o=e.ideo.esummary+"&db=nucleotide&id="+r,$i.json(o)}(t,o,a)})).then((function(n){return o=function(t,n,e){var r,o,i=[];for(r in t)"uids"!==r&&(o=Vi(t[r],e),i.push(o));return i=i.sort(Ideogram.sortChromosomes),e.coordinateSystem="bp",n.push(i),n}(n.result,o,i),t(o)}),(function(t){console.warn(t)}))}var Qi,Ki=To.a.assign({},i);function Zi(){var t=this.bandsToShow.join(",");Ki.selectAll(this.selector+" .bandLabel, .bandLabelStalk").style("display","none"),Ki.selectAll(t).style("display","")}function Ji(t,n,e,r,o){return n!==e&&(t=r[o.id][e]+36),t}function ta(t,n,e,r,o,i,a){var s,c;return e',a+="gneg"===e?'':'',a+=""}return a}(Qi),''+(t+=' ')+""}var ua=e(4);function la(t,n,e,r){var o,i;return o=n[t],e.push(o),(i={iscn:o[o.length-1].iscn.stop,bp:o[o.length-1].bp.stop}).iscn>r.maxLength.iscn&&(r.maxLength.iscn=i.iscn),i.bp>r.maxLength.bp&&(r.maxLength.bp=i.bp),e}function fa(t,n,e,r){var o,i;if("iscn"===r.coordinateSystem||r.config.multiorganism)e=function(t,n,e,r){var o,i,a;for(o=r.bandData[t],i=r.parseBands(o,t,n),n=Object.keys(i).sort((function(t,n){return Co(t,n)})),r.config.chromosomes[t]=n.slice(),r.numChromosomes+=r.config.chromosomes[t].length,a=0;ar.maxLength.bp&&(r.maxLength.bp=o.length);return e}function ha(){var t,n,e,r,o,i,a,s,c=(new Date).getTime();e=[],t=function(t){var n,e,r;if(!0===t.config.multiorganism)for(t.coordinateSystem="bp",r=t.config.taxids,n=0;n1&&o.length>1&&(t=r[0].replace("chr",""),o=r[1].split("-"),n=parseInt(o[0]),e=parseInt(o[1]-1)),[t,n,e]}(t,n,e),t=(o=_slicedToArray(r,3))[0],n=o[1],e=o[2],u=(a=_slicedToArray(function(t,n){var e,r,o=[1],i=[1],a=t.bands.slice(-1)[0];for(r=0;r1){if(o=function(t,n){var e,r,o,i,a,s,c,u,l;for(e=0;e=a&&n<=s)return[u+l*(o+i/c*(n-a)-o)/i,r];return[null,r]}(t,n),r=(i=_slicedToArray(o,2))[0],e=i[1],null!==r)return r}else if(n>=1&&n<=t.length)return t.scale.bp*n;!function(t,n,e){throw new Error("Base pair out of range. bp: "+t+"; length of chr"+n.name+": "+e.bp.stop)}(n,t,e)}function ba(t,n,e,r,o,i,a){var s,c,u,l;return a=t-n,s=r-o,c=i.bp.stop-i.bp.start,u=n+a/s*(e-o),l=i.bp.start+c*(u-n)/a,Math.round(l)}function _a(t,n){var e,r,o,i,a,s;for(0===n&&(n=t.bands[0].px.start),e=0;e=o&&n<=i)return ba(s,a,n,i,o,r,void 0);!function(t,n,e){throw new Error("Pixel out of range. px: "+t+"; length of chr"+n.name+": "+e)}(n,t,i)}da.scaleLinear=De,da.max=ee;var wa=e(6),xa=Object.assign({},i);function Aa(){var t,n,e=[],r=this.annots;for(n=0;n1&&this._model.bands.push({name:"q",px:{start:0,stop:this._model.width,width:this._model.width},bp:{start:1,stop:this._model.length}}),this._model}},{key:"getCssClass",value:function(){return"noBands"}}]),n}(La),Ba=function(){function t(n){_classCallCheck(this,t),this._config=n,this._ploidy=new Bo(this._config)}return _createClass(t,[{key:"getArmColor",value:function(t,n,e){return this._config.armColors?this._config.armColors[e]:this._config.ancestors?this._getPolyploidArmColor(t,n,e):null}},{key:"getBorderColor",value:function(t,n,e){return n1&&(r=this._ploidy.getChromosomesNumber(n)),i=0;i1||""===n.orientation)&&(t-=1),t}(n,s),o=-4,!0===s.showBandLabels&&(o=s.chrMargin+s.chrWidth+26),i=s.chrMargin*n,s.numAnnotTracks>1==0&&(i+=1),a=i+o,t.selectAll("text.chrLabel").attr("transform",e.scaleSvg).selectAll("tspan").attr("x",e.x).attr("y",a)}(t,n,o,this):function(t,n,e,r){var o,i,a,s=r.config;o=-s.chrWidth-2,!0===s.showBandLabels&&(o=s.chrMargin+8),i=s.annotTracksHeight,"overlay"!==s.annotationsLayout&&(i*=2),a=3-(s.chrMargin*n+o)+i,a/=e.scale.x,t.selectAll("text.chrLabel").attr("transform","rotate(-90)"+e.scaleSvg).selectAll("tspan").attr("x",a).attr("y",e.y)}(t,n,o,this)}var za=To.a.assign({},i,a,o,r);za.scaleLinear=De,za.max=ee;var qa=function(){function t(n){_classCallCheck(this,t),this.configure=Mo,this.initDrawChromosomes=Go,this.onLoad=Ko,this.handleRotateOnClick=Qo,this.init=ti,this.finishInit=Do,this.writeContainer=Yo,this.onLoadAnnots=gi,this.onDrawAnnots=pi,this.processAnnotData=Ri,this.restoreDefaultTracks=Pi,this.updateDisplayedTracks=Fi,this.initAnnotSettings=Ui,this.fetchAnnots=zi,this.drawAnnots=ki,this.getHistogramBars=bi,this.drawHeatmaps=ci,this.deserializeAnnotsForHeatmap=hi,this.fillAnnots=qi,this.drawProcessedAnnots=Ci,this.drawSynteny=Bi,this.startHideAnnotTooltipTimeout=mi,this.showAnnotTooltip=yi,this.onWillShowAnnotTooltip=vi,this.setOriginalTrackIndexes=Ei,this.esearch="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?retmode=json&api_key=7e33ac6a08a6955ec3b83d214d22b21a2808",this.esummary="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?retmode=json&api_key=7e33ac6a08a6955ec3b83d214d22b21a2808",this.elink="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?retmode=json&api_key=7e33ac6a08a6955ec3b83d214d22b21a2808",this.getTaxidFromEutils=Xi.b,this.setTaxidData=Xi.e,this.setTaxidAndAssemblyAndChromosomes=Xi.d,this.getOrganismFromEutils=Xi.a,this.getTaxids=Xi.c,this.getAssemblyAndChromosomesFromEutils=Gi,this.parseBands=ua.a,this.drawBandLabels=aa,this.getBandColorGradients=ca,this.processBandData=ha,this.setBandsToShow=ea,this.hideUnshownBandLabels=Zi,this.drawBandLabelText=oa,this.drawBandLabelStalk=ia,this.onBrushMove=ga,this.createBrush=pa,this.drawSexChromosomes=ma,this.setSexChromosomes=va,this.convertBpToPx=ya,this.convertPxToBp=_a,this.unpackAnnots=Aa,this.packAnnots=ka,this.initCrossFilter=Ca,this.filterAnnots=Ta,this.assemblyIsAccession=To.b,this.getDataDir=To.c,this.round=To.h,this.onDidRotate=To.g,this.getSvg=To.d,this.getChromosomeModel=Sa,this.getChromosomePixels=Ma,this.drawChromosomeLabels=Ua,this.rotateChromosomeLabels=Ya,this.appendHomolog=Ha,this.drawChromosome=Ia,this.rotateAndToggleDisplay=ja,this.setOverflowScroll=Ra,this.configure(n)}return _createClass(t,null,[{key:"slugify",value:function(t){return t.toLowerCase().replace(" ","-")}},{key:"sortChromosomes",value:function(t,n){var e="nuclear"===t.type,r="nuclear"===n.type,o="chloroplast"===t.type,i="chloroplast"===n.type,a="mitochondrion"===t.type,s="mitochondrion"===n.type,c="apicoplast"===t.type,u="apicoplast"===n.type;return e&&r?Co(t.name,n.name):!e&&r?1:a&&i?1:o&&s?-1:c||a||o||!(s||i||u)?void 0:-1}},{key:"version",get:function(){return"1.4.1"}},{key:"d3",get:function(){return za}}]),t}();window.Ideogram=qa,n.default=qa}])},"object"==_typeof(exports)&&"object"==_typeof(module)?module.exports=n():(__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=n)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}).call(this,__webpack_require__(51)(module))},38:function(t,n,e){"use strict";e.r(n),e.d(n,"default",(function(){return p}));var r=e(1),o=e.n(r),i=e(140),a=e.n(i),s=e(178),c=e(11);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){return(l=Object.assign||function(t){for(var n=1;n=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),o.hasOwnProperty(n)?{space:o[n],local:t}:t},a=function(t){var n=i(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===r&&n.documentElement.namespaceURI===r?n.createElement(t):n.createElementNS(e,t)}})(n)};function s(){}var c=function(t){return null==t?s:function(){return this.querySelector(t)}};function u(){return[]}var l=function(t){return null==t?u:function(){return this.querySelectorAll(t)}},f=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var h=document.documentElement;if(!h.matches){var d=h.webkitMatchesSelector||h.msMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector;f=function(t){return function(){return d.call(this,t)}}}}var g=f,p=function(t){return new Array(t.length)};function m(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function v(t,n,e,r,o,i){for(var a,s=0,c=n.length,u=i.length;sn?1:t>=n?0:NaN}m.prototype={constructor:m,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var _=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function w(t,n){return t.style.getPropertyValue(n)||_(t).getComputedStyle(t,null).getPropertyValue(n)}function x(t){return t.trim().split(/^|\s+/)}function A(t){return t.classList||new k(t)}function k(t){this._node=t,this._names=x(t.getAttribute("class")||"")}function C(t,n){for(var e=A(t),r=-1,o=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var E={},N=null;function H(t,n,e){return t=I(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function I(t,n,e){return function(r){var o=N;N=r;try{t.call(this,this.__data__,n,e)}finally{N=o}}}function j(t){return function(){var n=this.__on;if(n){for(var e,r=0,o=-1,i=n.length;r=x&&(x=w+1);!(_=m[x])&&++x=0;)(r=o[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=b);for(var e=this._groups,r=e.length,o=new Array(r),i=0;i1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):w(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=x(t+"");if(arguments.length<2){for(var r=A(this.node()),o=-1,i=e.length;++o=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),a=i.length;if(!(arguments.length<2)){for(s=n?R:j,null==e&&(e=!1),r=0;r=i?l=!0:10===(r=t.charCodeAt(a++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(a)&&++a),t.slice(o+1,n-1).replace(/""/g,'"')}for(;a>>1;e>>1;t(n[i])>>1);--i>0;)e(t,i,o,n);return t}function e(n,e,r,o){for(var i,a=n[--o+e],s=t(a);(i=e<<1)<=r&&(it(n[o+i+1])&&i++,!(s<=t(n[o+i])));)n[o+e]=n[o+i],e=i;n[o+e]=a}return n.sort=function(t,n,r){for(var o,i=r-n;--i>0;)o=t[n],t[n]=t[n+i],t[n+i]=o,e(t,1,i,n);return t},n}function a(t){var n=i(t);return function(e,r,o,i){var a,s,c,u=new Array(i=Math.min(o-r,i));for(s=0;sa&&(u[0]=c,a=t(n(u,0,i)[0]))}while(++re&&t(n[i-1])>s;--i)n[i]=n[i-1];n[i]=a}return n}}function c(t){var n=s(t);return function e(r,o,i){return(i-o>1,l=u-a,f=u+a,h=n[s],d=t(h),g=n[l],p=t(g),m=n[u],v=t(m),y=n[f],b=t(y),_=n[c],w=t(_);d>p&&(i=h,h=g,g=i,i=d,d=p,p=i),b>w&&(i=y,y=_,_=i,i=b,b=w,w=i),d>v&&(i=h,h=m,m=i,i=d,d=v,v=i),p>v&&(i=g,g=m,m=i,i=p,p=v,v=i),d>b&&(i=h,h=y,y=i,i=d,d=b,b=i),v>b&&(i=m,m=y,y=i,i=v,v=b,b=i),p>w&&(i=g,g=_,_=i,i=p,p=w,w=i),p>v&&(i=g,g=m,m=i,i=p,p=v,v=i),b>w&&(i=y,y=_,_=i,i=b,b=w,w=i);var x=g,A=p,k=y,C=b;n[s]=h,n[l]=n[r],n[u]=m,n[f]=n[o-1],n[c]=_;var T=r+1,M=o-2,S=A<=C&&A>=C;if(S)for(var L=T;L<=M;++L){var D=n[L];if((O=t(D))A)for(;;){if(!((P=t(n[M]))>A)){if(PC)for(;;){if(!((P=t(n[M]))>C)){Pc){for(var B;(B=t(n[T]))<=A&&B>=A;)++T;for(;(P=t(n[M]))<=C&&P>=C;)--M;for(L=T;L<=M;L++){var O;if(D=n[L],(O=t(D))<=A&&O>=A)L!==T&&(n[L]=n[T],n[T]=D),T++;else if(O<=C&&O>=C)for(;;){var P;if(!((P=t(n[M]))<=C&&P>=C)){P32)throw new Error("invalid array width!");return t};function p(t){for(var n=new Array(t),e=-1;++er;)h[--s]=0},dimension:function(t){var l,M,S,L,D,B={filter:function(t){return null==t?X():Array.isArray(t)?q(t):"function"==typeof t?$(t):z(t)},filterExact:z,filterRange:q,filterFunction:$,filterAll:X,top:function(t){for(var n,e=[],r=j;--r>=I&&t>0;)h[n=M[r]]||(e.push(o[n]),--t);return e},bottom:function(t){for(var n,e=[],r=I;r0;)h[n=M[r]]||(e.push(o[n]),--t),r++;return e},group:G,groupAll:function(){var t=G(v),n=t.all;return delete t.all,delete t.top,delete t.order,delete t.orderNatural,delete t.size,t.value=function(){return n()[0].value},t},dispose:Q,remove:Q},O=~u&-~u,P=~O,F=c((function(t){return S[t]})),E=m,N=[],H=[],I=0,j=0;function R(n,r,o){S=n.map(t),L=F(function(t){for(var n=k(t,t),e=-1;++eI)for(r=I,o=Math.min(n,j);rj)for(r=Math.max(n,j),o=e;r1?d(c,s):k(s,D),M&&(f=(l=w[0]).key);N=y);)++N;for(;N_||(c[u=e[N]+i]=B,h[u]&P||(b.value=A(b.value,o[u])),++N>=a));)y=t(n[N]);H()}for(;OO)for(O=0;O1?(F=U,E=z):(!B&&j&&(B=1,r=[{key:null,value:T()}]),1===B?(F=Y,E=q):(F=v,E=v),c=null),p[u]=F}function W(){if(B>1){for(var t=B,n=r,e=k(t,t),o=0,i=0;o1)for(o=0;o1?(E=z,F=U):1===B?(E=q,F=Y):E=F=v}else if(1===B){if(j)return;for(o=0;o=0&&p.splice(t,1),(t=N.indexOf(R))>=0&&N.splice(t,1),(t=T.indexOf(W))>=0&&T.splice(t,1),e}return arguments.length<1&&(t=n),p.push(F),N.push(R),T.push(W),R(l,M,0,s),V().orderNatural()}function Q(){H.forEach((function(t){t.dispose()}));var t=A.indexOf(R);return t>=0&&A.splice(t,1),(t=A.indexOf(W))>=0&&A.splice(t,1),(t=T.indexOf(U))>=0&&T.splice(t,1),u&=P,X()}return A.unshift(R),A.push(W),T.push(U),u|=O,(f>=32?!O:u&-(1<=0&&p.splice(t),(t=A.indexOf(c))>=0&&A.splice(t),i}return p.push(u),A.push(c),c(0,0),f()},size:function(){return s}},o=[],s=0,u=0,f=8,h=l(0),p=[],A=[],T=[];function M(n){var e=s,r=n.length;return r&&(o=o.concat(n),h=d(h,s+=r),A.forEach((function(t){t(n,e,r)}))),t}return arguments.length?M(arguments[0]):t}function k(t,n){return(n<257?l:n<65537?f:h)(t)}function C(t){return 8===t?256:16===t?65536:4294967296}"undefined"!=typeof Uint8Array&&(l=function(t){return new Uint8Array(t)},f=function(t){return new Uint16Array(t)},h=function(t){return new Uint32Array(t)},d=function(t,n){if(t.length>=n)return t;var e=new t.constructor(n);return e.set(t),e},g=function(t,n){var e;switch(n){case 16:e=f(t.length);break;case 32:e=h(t.length);break;default:throw new Error("invalid array width!")}return e.set(t),e}),t.crossfilter=A}(void 0!==n&&n||this)},function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"dispatch",(function(){return h}));var o={};e.r(o),e.d(o,"brush",(function(){return qn})),e.d(o,"brushX",(function(){return Yn})),e.d(o,"brushY",(function(){return zn})),e.d(o,"brushSelection",(function(){return Un}));var i=e(0),a=e(2),s={value:function(){}};function c(){for(var t,n=0,e=arguments.length,r={};n=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++i0)for(var e,r,o=new Array(e),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=A.exec(t))?O(parseInt(n[1],16)):(n=k.exec(t))?new N(n[1],n[2],n[3],1):(n=C.exec(t))?new N(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=T.exec(t))?P(n[1],n[2],n[3],n[4]):(n=M.exec(t))?P(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=S.exec(t))?I(n[1],n[2]/100,n[3]/100,1):(n=L.exec(t))?I(n[1],n[2]/100,n[3]/100,n[4]):D.hasOwnProperty(t)?O(D[t]):"transparent"===t?new N(NaN,NaN,NaN,0):null}function O(t){return new N(t>>16&255,t>>8&255,255&t,1)}function P(t,n,e,r){return r<=0&&(t=n=e=NaN),new N(t,n,e,r)}function F(t){return t instanceof y||(t=B(t)),t?new N((t=t.rgb()).r,t.g,t.b,t.opacity):new N}function E(t,n,e,r){return 1===arguments.length?F(t):new N(t,n,e,null==r?1:r)}function N(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function H(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function I(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new R(t,n,e,r)}function j(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof R)return new R(t.h,t.s,t.l,t.opacity);if(t instanceof y||(t=B(t)),!t)return new R;if(t instanceof R)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,o=Math.min(n,e,r),i=Math.max(n,e,r),a=NaN,s=i-o,c=(i+o)/2;return s?(a=n===i?(e-r)/s+6*(e0&&c<1?0:a,new R(a,s,c,t.opacity)}(t):new R(t,n,e,null==r?1:r)}function R(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function W(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}m(y,B,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),m(N,E,v(y,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new N(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new N(this.r*t,this.g*t,this.b*t,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"#"+H(this.r)+H(this.g)+H(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}})),m(R,j,v(y,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new R(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new R(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,o=2*e-r;return new N(W(t>=240?t-240:t+120,o,r),W(t,o,r),W(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var U=Math.PI/180,Y=180/Math.PI,z=.96422,q=.82521,X=6/29,$=3*X*X;function V(t){if(t instanceof G)return new G(t.l,t.a,t.b,t.opacity);if(t instanceof et){if(isNaN(t.h))return new G(t.l,0,0,t.opacity);var n=t.h*U;return new G(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof N||(t=F(t));var e,r,o=J(t.r),i=J(t.g),a=J(t.b),s=Q((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?e=r=s:(e=Q((.4360747*o+.3850649*i+.1430804*a)/z),r=Q((.0139322*o+.0971045*i+.7141733*a)/q)),new G(116*s-16,500*(e-s),200*(s-r),t.opacity)}function G(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Q(t){return t>.008856451679035631?Math.pow(t,1/3):t/$+4/29}function K(t){return t>X?t*t*t:$*(t-4/29)}function Z(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function J(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tt(t){if(t instanceof et)return new et(t.h,t.c,t.l,t.opacity);if(t instanceof G||(t=V(t)),0===t.a&&0===t.b)return new et(NaN,0,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Y;return new et(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function nt(t,n,e,r){return 1===arguments.length?tt(t):new et(t,n,e,null==r?1:r)}function et(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}m(G,(function(t,n,e,r){return 1===arguments.length?V(t):new G(t,n,e,null==r?1:r)}),v(y,{brighter:function(t){return new G(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new G(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new N(Z(3.1338561*(n=z*K(n))-1.6168667*(t=1*K(t))-.4906146*(e=q*K(e))),Z(-.9787684*n+1.9161415*t+.033454*e),Z(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),m(et,nt,v(y,{brighter:function(t){return new et(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new et(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return V(this).rgb()}}));var rt=1.78277,ot=-.29227,it=-.90649,at=1.97294,st=at*it,ct=at*rt,ut=rt*ot- -.14861*it;function lt(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);t instanceof N||(t=F(t));var n=t.r/255,e=t.g/255,r=t.b/255,o=(ut*r+st*n-ct*e)/(ut+st-ct),i=r-o,a=(at*(e-o)-ot*i)/it,s=Math.sqrt(a*a+i*i)/(at*o*(1-o)),c=s?Math.atan2(a,i)*Y-120:NaN;return new ft(c<0?c+360:c,s,o,t.opacity)}(t):new ft(t,n,e,null==r?1:r)}function ft(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ht(t,n,e,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*n+(4-6*i+3*a)*e+(1+3*t+3*i-3*a)*r+a*o)/6}m(ft,lt,v(y,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ft(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ft(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*U,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),o=Math.sin(t);return new N(255*(n+e*(-.14861*r+rt*o)),255*(n+e*(ot*r+it*o)),255*(n+e*(at*r)),this.opacity)}}));var dt=function(t){return function(){return t}};function gt(t,n){return function(e){return t+e*n}}function pt(t,n){var e=n-t;return e?gt(t,e>180||e<-180?e-360*Math.round(e/360):e):dt(isNaN(t)?n:t)}function mt(t,n){var e=n-t;return e?gt(t,e):dt(isNaN(t)?n:t)}var vt=function t(n){var e=function(t){return 1==(t=+t)?mt:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):dt(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=E(t)).r,(n=E(n)).r),o=e(t.g,n.g),i=e(t.b,n.b),a=mt(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=o(n),t.b=i(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function yt(t){return function(n){var e,r,o=n.length,i=new Array(o),a=new Array(o),s=new Array(o);for(e=0;e=1?(e=1,n-1):Math.floor(e*n),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,s=ri&&(o=n.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(e=e[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,c.push({i:a,x:At(e,r)})),i=Ct.lastIndex;return i180?n+=360:n-t>180&&(t+=360),i.push({i:e.push(o(e)+"rotate(",null,r)-2,x:At(t,n)})):n&&e.push(o(e)+"rotate("+n+r)}(i.rotate,a.rotate,s,c),function(t,n,e,i){t!==n?i.push({i:e.push(o(e)+"skewX(",null,r)-2,x:At(t,n)}):n&&e.push(o(e)+"skewX("+n+r)}(i.skewX,a.skewX,s,c),function(t,n,e,r,i,a){if(t!==e||n!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:At(t,e)},{i:s-2,x:At(n,r)})}else 1===e&&1===r||i.push(o(i)+"scale("+e+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,c),i=a=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Wt}()}finally{Wt=0,function(){for(var t,n,e=It,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:It=n);jt=t,nn(r)}(),qt=0}}function tn(){var t=$t.now(),n=t-zt;n>1e3&&(Xt-=n,zt=t)}function nn(t){Wt||(Ut&&(Ut=clearTimeout(Ut)),t-qt>24?(t<1/0&&(Ut=setTimeout(Jt,t-$t.now()-Xt)),Yt&&(Yt=clearInterval(Yt))):(Yt||(zt=$t.now(),Yt=setInterval(tn,1e3)),Wt=1,Vt(Jt)))}Kt.prototype=Zt.prototype={constructor:Kt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Gt():+e)+(null==n?0:+n),this._next||jt===this||(jt?jt._next=this:It=this,jt=this),this._call=t,this._time=e,nn()},stop:function(){this._call&&(this._call=null,this._time=1/0,nn())}};var en=function(t,n,e){var r=new Kt;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},rn=h("start","end","interrupt"),on=[],an=function(t,n,e,r,o,i){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,o=t.__transition;function i(c){var u,l,f,h;if(1!==e.state)return s();for(u in o)if((h=o[u]).name===e.name){if(3===h.state)return en(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[u]):+u0)throw new Error("too late; already scheduled");return e}function cn(t,n){var e=un(t,n);if(e.state>2)throw new Error("too late; already started");return e}function un(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ln=function(t,n){var e,r,o,i=t.__transition,a=!0;if(i){for(o in n=null==n?null:n+"",i)(e=i[o]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete i[o]):a=!1;a&&delete t.__transition}};function fn(t,n,e){var r=t._id;return t.each((function(){var t=cn(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return un(t,r).value[n]}}var hn=function(t,n){var e;return("number"==typeof n?At:n instanceof B?vt:(e=B(n))?(n=e,vt):Tt)(t,n)},dn=i.selection.prototype.constructor,gn=0;function pn(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function mn(){return++gn}var vn=i.selection.prototype;pn.prototype=function(t){return Object(i.selection)().transition(t)}.prototype={constructor:pn,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(i.selector)(t));for(var r=this._groups,o=r.length,a=new Array(o),s=0;s=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?sn:cn;return function(){var a=i(this,t),s=a.on;s!==r&&(o=(r=s).copy()).on(n,e),a.on=o}}(e,t,n))},attr:function(t,n){var e=Object(i.namespace)(t),r="transform"===e?Ft:hn;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,o,i;return function(){var a,s=e(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===s?null:a===r&&s===o?i:i=n(r=a,o=s);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,o,i;return function(){var a,s=e(this);if(null!=s)return(a=this.getAttribute(t))===s?null:a===r&&s===o?i:i=n(r=a,o=s);this.removeAttribute(t)}})(e,r,fn(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,o;return function(){var i=this.getAttributeNS(t.space,t.local);return i===e?null:i===r?o:o=n(r=i,e)}}:function(t,n,e){var r,o;return function(){var i=this.getAttribute(t);return i===e?null:i===r?o:o=n(r=i,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Object(i.namespace)(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Pt:hn;return null==n?this.styleTween(t,function(t,n){var e,r,o;return function(){var a=Object(i.style)(this,t),s=(this.style.removeProperty(t),Object(i.style)(this,t));return a===s?null:a===e&&s===r?o:o=n(e=a,r=s)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,o,a;return function(){var s=Object(i.style)(this,t),c=e(this);return null==c&&(this.style.removeProperty(t),c=Object(i.style)(this,t)),s===c?null:s===r&&c===o?a:a=n(r=s,o=c)}}(t,r,fn(this,"style."+t,n)):function(t,n,e){var r,o;return function(){var a=Object(i.style)(this,t);return a===e?null:a===r?o:o=n(r=a,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,o=n.apply(r,arguments);return o&&function(n){r.style.setProperty(t,o(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(fn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,o=un(this.node(),e).tween,i=0,a=o.length;i0&&(e=o-m),C<0?h=d-v:C>0&&(a=s-v),A=Tn,I.attr("cursor",On.selection),W());break;default:return}kn()}),!0).on("keyup.brush",(function(){switch(i.event.keyCode){case 16:P&&(b=_=P=!1,W());break;case 18:A===Sn&&(k<0?l=f:k>0&&(e=o),C<0?h=d:C>0&&(a=s),A=Mn,W());break;case 32:A===Tn&&(i.event.altKey?(k&&(l=f-m*k,e=o+m*k),C&&(h=d-v*C,a=s+v*C),A=Sn):(k<0?l=f:k>0&&(e=o),C<0?h=d:C>0&&(a=s),A=Mn),I.attr("cursor",On[x]),W());break;default:return}kn()}),!0).on("mousemove.brush",R,!0).on("mouseup.brush",U,!0);g(i.event.view)}An(),ln(w),c.call(w),N.start()}function R(){var t=Object(i.mouse)(w);!P||b||_||(Math.abs(t[0]-E[0])>Math.abs(t[1]-E[1])?_=!0:b=!0),E=t,y=!0,kn(),W()}function W(){var t;switch(m=E[0]-F[0],v=E[1]-F[1],A){case Tn:case Cn:k&&(m=Math.max(L-e,Math.min(B-l,m)),o=e+m,f=l+m),C&&(v=Math.max(D-a,Math.min(O-h,v)),s=a+v,d=h+v);break;case Mn:k<0?(m=Math.max(L-e,Math.min(B-e,m)),o=e+m,f=l):k>0&&(m=Math.max(L-l,Math.min(B-l,m)),o=e,f=l+m),C<0?(v=Math.max(D-a,Math.min(O-a,v)),s=a+v,d=h):C>0&&(v=Math.max(D-h,Math.min(O-h,v)),s=a,d=h+v);break;case Sn:k&&(o=Math.max(L,Math.min(B,e-m*k)),f=Math.max(L,Math.min(B,l+m*k))),C&&(s=Math.max(D,Math.min(O,a-v*C)),d=Math.max(D,Math.min(O,h+v*C)))}fn?1:t>=n?0:NaN},Vn=function(t){return 1===t.length&&(t=function(t){return function(n,e){return $n(t(n),e)}}(t)),{left:function(n,e,r,o){for(null==r&&(r=0),null==o&&(o=n.length);r>>1;t(n[i],e)<0?r=i+1:o=i}return r},right:function(n,e,r,o){for(null==r&&(r=0),null==o&&(o=n.length);r>>1;t(n[i],e)>0?o=i:r=i+1}return r}}}($n),Gn=Vn.right,Qn=(Vn.left,Gn),Kn=Array.prototype,Zn=(Kn.slice,Kn.map,Math.sqrt(50)),Jn=Math.sqrt(10),te=Math.sqrt(2);function ne(t,n,e){var r=(n-t)/Math.max(0,e),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=Zn?10:i>=Jn?5:i>=te?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Zn?10:i>=Jn?5:i>=te?2:1)}var ee=function(t,n){var e,r,o=t.length,i=-1;if(null==n){for(;++i=e)for(r=e;++ir&&(r=e)}else for(;++i=e)for(r=e;++ir&&(r=e);return r};function re(){}function oe(t,n){var e=new re;if(t instanceof re)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==n)for(;++o1?r[0]+r.slice(2):r,+t.slice(e+1)]},me=function(t){return(t=pe(Math.abs(t)))?t[1]:NaN},ve=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ye(t){return new be(t)}function be(t){if(!(n=ve.exec(t)))throw new Error("invalid format: "+t);var n;this.fill=n[1]||" ",this.align=n[2]||">",this.sign=n[3]||"-",this.symbol=n[4]||"",this.zero=!!n[5],this.width=n[6]&&+n[6],this.comma=!!n[7],this.precision=n[8]&&+n[8].slice(1),this.trim=!!n[9],this.type=n[10]||""}ye.prototype=be.prototype,be.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var _e,we,xe,Ae,ke=function(t,n){var e=pe(t,n);if(!e)return t+"";var r=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")},Ce={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return ke(100*t,n)},r:ke,s:function(t,n){var e=pe(t,n);if(!e)return t+"";var r=e[0],o=e[1],i=o-(_e=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+pe(t,Math.max(0,n+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Te=function(t){return t},Me=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];we=function(t){var n=t.grouping&&t.thousands?function(t,n){return function(e,r){for(var o=e.length,i=[],a=0,s=t[0],c=0;o>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),i.push(e.substring(o-=s,o+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}}(t.grouping,t.thousands):Te,e=t.currency,r=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Te,i=t.percent||"%";function a(t){var a=(t=ye(t)).fill,s=t.align,c=t.sign,u=t.symbol,l=t.zero,f=t.width,h=t.comma,d=t.precision,g=t.trim,p=t.type;"n"===p?(h=!0,p="g"):Ce[p]||(null==d&&(d=12),g=!0,p="g"),(l||"0"===a&&"="===s)&&(l=!0,a="0",s="=");var m="$"===u?e[0]:"#"===u&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",v="$"===u?e[1]:/[%p]/.test(p)?i:"",y=Ce[p],b=/[defgprs%]/.test(p);function _(t){var e,i,u,_=m,w=v;if("c"===p)w=y(t)+w,t="";else{var x=(t=+t)<0;if(t=y(Math.abs(t),d),g&&(t=function(t){t:for(var n,e=t.length,r=1,o=-1;r0){if(!+t[r])break t;o=0}}return o>0?t.slice(0,o)+t.slice(n+1):t}(t)),x&&0==+t&&(x=!1),_=(x?"("===c?c:"-":"-"===c||"("===c?"":c)+_,w=("s"===p?Me[8+_e/3]:"")+w+(x&&"("===c?")":""),b)for(e=-1,i=t.length;++e(u=t.charCodeAt(e))||u>57){w=(46===u?r+t.slice(e+1):t.slice(e))+w,t=t.slice(0,e);break}}h&&!l&&(t=n(t,1/0));var A=_.length+t.length+w.length,k=A>1)+_+t+w+k.slice(A);break;default:t=k+_+t+w}return o(t)}return d=null==d?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),_.toString=function(){return t+""},_}return{format:a,formatPrefix:function(t,n){var e=a(((t=ye(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(me(n)/3))),o=Math.pow(10,-r),i=Me[8+r/3];return function(t){return e(o*t)+i}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),xe=we.format,Ae=we.formatPrefix;var Se=function(t,n,e){var r,o=t[0],i=t[t.length-1],a=function(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=Zn?o*=10:i>=Jn?o*=5:i>=te&&(o*=2),n0)return[t];if((r=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),i=new Array(o=Math.ceil(n-t+1));++s0?r=ne(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=ne(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,e)),r>0?(o[i]=Math.floor(s/r)*r,o[a]=Math.ceil(c/r)*r,n(o)):r<0&&(o[i]=Math.ceil(s*r)/r,o[a]=Math.floor(c*r)/r,n(o)),t},t}function De(){var t=function(t,n){var e,r,o,i=fe,a=fe,s=Mt,c=!1;function u(){return e=Math.min(i.length,a.length)>2?ge:de,r=o=null,l}function l(n){return(r||(r=e(i,a,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,s)))(+n)}return l.invert=function(t){return(o||(o=e(a,i,he,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},l.domain=function(t){return arguments.length?(i=ce.call(t,le),u()):i.slice()},l.range=function(t){return arguments.length?(a=ue.call(t),u()):a.slice()},l.rangeRound=function(t){return a=ue.call(t),s=St,u()},l.clamp=function(t){return arguments.length?(c=!!t,u()):c},l.interpolate=function(t){return arguments.length?(s=t,u()):s},u()}(he,At);return t.copy=function(){return function(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}(t,De())},Le(t)}var Be=new Date,Oe=new Date;function Pe(t,n,e,r){function o(n){return t(n=new Date(+n)),n}return o.floor=o,o.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},o.round=function(t){var n=o(t),e=o.ceil(t);return t-n0))return s;do{s.push(a=new Date(+e)),n(e,i),t(e)}while(a=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(o.count=function(n,r){return Be.setTime(+n),Oe.setTime(+r),t(Be),t(Oe),Math.floor(e(Be,Oe))},o.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(r?function(n){return r(n)%t==0}:function(n){return o.count(0,n)%t==0}):o:null}),o}var Fe=Pe((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));Fe.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Pe((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):Fe:null},Fe.range;var Ee=6e4,Ne=(((Pe((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})).range,Pe((function(t){t.setTime(Math.floor(t/Ee)*Ee)}),(function(t,n){t.setTime(+t+n*Ee)}),(function(t,n){return(n-t)/Ee}),(function(t){return t.getMinutes()}))).range,Pe((function(t){var n=t.getTimezoneOffset()*Ee%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()}))).range,Pe((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ee)/864e5}),(function(t){return t.getDate()-1}))),He=Ne;function Ie(t){return Pe((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ee)/6048e5}))}Ne.range;var je=Ie(0),Re=Ie(1),We=Ie(2),Ue=Ie(3),Ye=Ie(4),ze=Ie(5),qe=Ie(6),Xe=((je.range,Re.range,We.range,Ue.range,Ye.range,ze.range,qe.range,Pe((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))).range,Pe((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));Xe.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Pe((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var $e=Xe,Ve=(((Xe.range,Pe((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*Ee)}),(function(t,n){return(n-t)/Ee}),(function(t){return t.getUTCMinutes()}))).range,Pe((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()}))).range,Pe((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1}))),Ge=Ve;function Qe(t){return Pe((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}Ve.range;var Ke=Qe(0),Ze=Qe(1),Je=Qe(2),tr=Qe(3),nr=Qe(4),er=Qe(5),rr=Qe(6),or=((Ke.range,Ze.range,Je.range,tr.range,nr.range,er.range,rr.range,Pe((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}))).range,Pe((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));or.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Pe((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var ir=or;function ar(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function sr(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function cr(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}or.range;var ur,lr,fr,hr={"-":"",_:" ",0:"0"},dr=/^\s*\d+/,gr=/^%/,pr=/[\\^$*+?|[\]().{}]/g;function mr(t,n,e){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i68?1900:2e3),e+r[0].length):-1}function Mr(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Sr(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Lr(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Dr(t,n,e){var r=dr.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Br(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Or(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Pr(t,n,e){var r=dr.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Fr(t,n,e){var r=dr.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Er(t,n,e){var r=dr.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Nr(t,n,e){var r=gr.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Hr(t,n,e){var r=dr.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Ir(t,n,e){var r=dr.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function jr(t,n){return mr(t.getDate(),n,2)}function Rr(t,n){return mr(t.getHours(),n,2)}function Wr(t,n){return mr(t.getHours()%12||12,n,2)}function Ur(t,n){return mr(1+He.count($e(t),t),n,3)}function Yr(t,n){return mr(t.getMilliseconds(),n,3)}function zr(t,n){return Yr(t,n)+"000"}function qr(t,n){return mr(t.getMonth()+1,n,2)}function Xr(t,n){return mr(t.getMinutes(),n,2)}function $r(t,n){return mr(t.getSeconds(),n,2)}function Vr(t){var n=t.getDay();return 0===n?7:n}function Gr(t,n){return mr(je.count($e(t),t),n,2)}function Qr(t,n){var e=t.getDay();return t=e>=4||0===e?Ye(t):Ye.ceil(t),mr(Ye.count($e(t),t)+(4===$e(t).getDay()),n,2)}function Kr(t){return t.getDay()}function Zr(t,n){return mr(Re.count($e(t),t),n,2)}function Jr(t,n){return mr(t.getFullYear()%100,n,2)}function to(t,n){return mr(t.getFullYear()%1e4,n,4)}function no(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+mr(n/60|0,"0",2)+mr(n%60,"0",2)}function eo(t,n){return mr(t.getUTCDate(),n,2)}function ro(t,n){return mr(t.getUTCHours(),n,2)}function oo(t,n){return mr(t.getUTCHours()%12||12,n,2)}function io(t,n){return mr(1+Ge.count(ir(t),t),n,3)}function ao(t,n){return mr(t.getUTCMilliseconds(),n,3)}function so(t,n){return ao(t,n)+"000"}function co(t,n){return mr(t.getUTCMonth()+1,n,2)}function uo(t,n){return mr(t.getUTCMinutes(),n,2)}function lo(t,n){return mr(t.getUTCSeconds(),n,2)}function fo(t){var n=t.getUTCDay();return 0===n?7:n}function ho(t,n){return mr(Ke.count(ir(t),t),n,2)}function go(t,n){var e=t.getUTCDay();return t=e>=4||0===e?nr(t):nr.ceil(t),mr(nr.count(ir(t),t)+(4===ir(t).getUTCDay()),n,2)}function po(t){return t.getUTCDay()}function mo(t,n){return mr(Ze.count(ir(t),t),n,2)}function vo(t,n){return mr(t.getUTCFullYear()%100,n,2)}function yo(t,n){return mr(t.getUTCFullYear()%1e4,n,4)}function bo(){return"+0000"}function _o(){return"%"}function wo(t){return+t}function xo(t){return Math.floor(+t/1e3)}(ur=function(t){var n=t.dateTime,e=t.date,r=t.time,o=t.periods,i=t.days,a=t.shortDays,s=t.months,c=t.shortMonths,u=yr(o),l=br(o),f=yr(i),h=br(i),d=yr(a),g=br(a),p=yr(s),m=br(s),v=yr(c),y=br(c),b={a:function(t){return a[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:jr,e:jr,f:zr,H:Rr,I:Wr,j:Ur,L:Yr,m:qr,M:Xr,p:function(t){return o[+(t.getHours()>=12)]},Q:wo,s:xo,S:$r,u:Vr,U:Gr,V:Qr,w:Kr,W:Zr,x:null,X:null,y:Jr,Y:to,Z:no,"%":_o},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return i[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:eo,e:eo,f:so,H:ro,I:oo,j:io,L:ao,m:co,M:uo,p:function(t){return o[+(t.getUTCHours()>=12)]},Q:wo,s:xo,S:lo,u:fo,U:ho,V:go,w:po,W:mo,x:null,X:null,y:vo,Y:yo,Z:bo,"%":_o},w={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=g[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=p.exec(n.slice(e));return r?(t.m=m[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return k(t,n,e,r)},d:Lr,e:Lr,f:Er,H:Br,I:Br,j:Dr,L:Fr,m:Sr,M:Or,p:function(t,n,e){var r=u.exec(n.slice(e));return r?(t.p=l[r[0].toLowerCase()],e+r[0].length):-1},Q:Hr,s:Ir,S:Pr,u:wr,U:xr,V:Ar,w:_r,W:kr,x:function(t,n,r){return k(t,e,n,r)},X:function(t,n,e){return k(t,r,n,e)},y:Tr,Y:Cr,Z:Mr,"%":Nr};function x(t,n){return function(e){var r,o,i,a=[],s=-1,c=0,u=t.length;for(e instanceof Date||(e=new Date(+e));++s53)return null;"w"in i||(i.w=1),"Z"in i?(r=(o=(r=sr(cr(i.y))).getUTCDay())>4||0===o?Ze.ceil(r):Ze(r),r=Ge.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(r=(o=(r=n(cr(i.y))).getDay())>4||0===o?Re.ceil(r):Re(r),r=He.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?sr(cr(i.y)).getUTCDay():n(cr(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,sr(i)):n(i)}}function k(t,n,e,r){for(var o,i,a=0,s=n.length,c=e.length;a=c)return-1;if(37===(o=n.charCodeAt(a++))){if(o=n.charAt(a++),!(i=w[o in hr?n.charAt(a++):o])||(r=i(t,e,r))<0)return-1}else if(o!=e.charCodeAt(r++))return-1}return r}return b.x=x(e,b),b.X=x(r,b),b.c=x(n,b),_.x=x(e,_),_.X=x(r,_),_.c=x(n,_),{format:function(t){var n=x(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=A(t+="",ar);return n.toString=function(){return t},n},utcFormat:function(t){var n=x(t+="",_);return n.toString=function(){return t},n},utcParse:function(t){var n=A(t,sr);return n.toString=function(){return t},n}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],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"]})).format,ur.parse,lr=ur.utcFormat,fr=ur.utcParse,Date.prototype.toISOString||lr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||fr("%Y-%m-%dT%H:%M:%S.%LZ");var Ao=function(t){return t.match(/.{6}/g).map((function(t){return"#"+t}))};function ko(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function Co(t,n){var e,r,o=/(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g,i=/^\s+|\s+$/g,a=/\s+/g,s=/^0x[0-9a-f]+$/i,c=/^0/,u=function(t){return(Co.insensitive&&(""+t).toLowerCase()||""+t).replace(i,"")},l=u(t),f=u(n),h=l.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=f.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),g=parseInt(l.match(s),16)||1!==h.length&&Date.parse(l),p=parseInt(f.match(s),16)||g&&f.match(/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/)&&Date.parse(f)||null,m=function(t,n){return(!t.match(c)||1==n)&&parseFloat(t)||t.replace(a," ").replace(i,"")||0};if(p){if(gp)return 1}for(var v=0,y=h.length,b=d.length,_=Math.max(y,b);v<_;v++){if(e=m(h[v]||"",y),r=m(d[v]||"",b),isNaN(e)!==isNaN(r))return isNaN(e)?1:-1;if(/[^\x00-\x80]/.test(e+r)&&e.localeCompare){var w=e.localeCompare(r);return w/Math.abs(w)}if(er)return 1}}Ao("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Ao("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Ao("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),Ao("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Rt(lt(300,.5,0),lt(-240,.5,1)),Rt(lt(-100,.75,.35),lt(80,1.5,.8)),Rt(lt(260,.75,.35),lt(80,1.5,.8)),lt(),ko(Ao("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ko(Ao("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ko(Ao("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ko(Ao("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var To=e(1);function Mo(t){this.config=JSON.parse(JSON.stringify(t)),function(t){t.chromosomesArray=[],t.coordinateSystem="iscn",t.maxLength={bp:0,iscn:0},t.chromosomes={},t.numChromosomes=0,t.config.debug||(t.config.debug=!1),t.config.dataDir||(t.config.dataDir=t.getDataDir()),t.config.container||(t.config.container="body"),t.selector=t.config.container+" #_ideogram",t.config.resolution||(t.config.resolution=""),t.config.orientation||(t.config.orientation="vertical"),t.config.brush||(t.config.brush=null),t.config.rows||(t.config.rows=1),"showChromosomeLabels"in t.config==0&&(t.config.showChromosomeLabels=!0),t.config.showNonNuclearChromosomes||(t.config.showNonNuclearChromosomes=!1)}(this),function(t){t.config.ploidy||(t.config.ploidy=1),t.config.ploidy>1&&(t.sexChromosomes={},t.config.sex||(t.config.sex="male"),2!==t.config.ploidy||t.config.ancestors||(t.config.ancestors={M:"#ffb6c1",P:"#add8e6"},t.config.ploidyDesc="MP"))}(this),function(t){t.config.showBandLabels||(t.config.showBandLabels=!1),"showFullyBanded"in t.config?t.config.showFullyBanded=t.config.showFullyBanded:t.config.showFullyBanded=!0,t.bandsToShow=[],t.bandData={}}(this),function(t){var n,e,r;t.config.chrHeight||(n=t.config.container,e=document.querySelector(n).getBoundingClientRect(),r="vertical"===t.config.orientation?e.height:e.width,"body"!==n&&0!==r||(r=400),t.config.chrHeight=r)}(this),function(t){var n,e;t.config.chrWidth||(n=10,(e=t.config.chrHeight)<900&&e>500?n=Math.round(e/40):e>=900&&(n=Math.round(e/45)),t.config.chrWidth=n)}(this),function(t){t.config.chrMargin||(1===t.config.ploidy?t.config.chrMargin=10:t.config.chrMargin=Math.round(t.config.chrWidth/4)),t.config.showBandLabels&&(t.config.chrMargin+=20)}(this),function(t,n){t.onLoad&&(n.onLoadCallback=t.onLoad),t.onLoadAnnots&&(n.onLoadAnnotsCallback=t.onLoadAnnots),t.onDrawAnnots&&(n.onDrawAnnotsCallback=t.onDrawAnnots),t.onBrushMove&&(n.onBrushMoveCallback=t.onBrushMove),t.onDidRotate&&(n.onDidRotateCallback=t.onDidRotate),t.onWillShowAnnotTooltip&&(n.onWillShowAnnotTooltipCallback=t.onWillShowAnnotTooltip)}(t,this),function(t){t.organisms={9606:{commonName:"Human",scientificName:"Homo sapiens",scientificNameAbbr:"H. sapiens",assemblies:{default:"GCF_000001405.26",GRCh38:"GCF_000001405.26",GRCh37:"GCF_000001405.13"}},10090:{commonName:"Mouse",scientificName:"Mus musculus",scientificNameAbbr:"M. musculus",assemblies:{default:"GCF_000001635.20"}},4641:{commonName:"banana",scientificName:"Musa acuminata",scientificNameAbbr:"M. acuminata",assemblies:{default:"mock"}}}}(this),function(t){t.bump=Math.round(t.config.chrHeight/125),t.adjustedBump=!1,t.config.chrHeight<200&&(t.adjustedBump=!0,t.bump=4)}(this),function(t,n){t.chromosome&&(n.config.chromosomes=[t.chromosome],"showBandLabels"in t==0&&(n.config.showBandLabels=!0),"rotatable"in t==0&&(n.config.rotatable=!1))}(t,this),this.initAnnotSettings(),this.config.chrMargin+=this.config.chrWidth,"heatmap"===this.config.annotationsLayout?this.config.chrMargin+=this.config.annotTracksHeight:this.config.chrMargin+=2*this.config.annotTracksHeight,this.init()}var So=To.a.assign({},i);function Lo(t){void 0!==t.timeout&&window.clearTimeout(t.timeout),t.rawAnnots=t.setOriginalTrackIndexes(t.rawAnnots),t.config.annotationsDisplayedTracks?t.annots=t.updateDisplayedTracks(t.config.annotationsDisplayedTracks):(t.annots=t.processAnnotData(t.rawAnnots),t.config.filterable&&t.initCrossFilter(),t.drawProcessedAnnots(t.annots))}function Do(t,n){var e=(new Date).getTime(),r=this.config;this.initDrawChromosomes(t),r.annotationsPath&&function(t){t.rawAnnots?Lo(t):function n(){t.timeout=setTimeout((function(){t.rawAnnots?Lo(t):n()}),50)}()}(this),function(t,n){var e,r,o,i;if(!0===t.showBandLabels&&(o=(new Date).getTime(),n.hideUnshownBandLabels(),i=(new Date).getTime(),t.debug&&console.log("Time in showing bands: "+(i-o)+" ms"),"vertical"===t.orientation))for(e=0;e0}return!0}}]),t}(),Oo=To.a.assign({},i),Po=function(){function t(n){_classCallCheck(this,t),this._node=n}return _createClass(t,[{key:"getLabel",value:function(){return Oo.select(this._node.parentNode).select("text.chrLabel").text()}},{key:"getSetLabel",value:function(){return Oo.select(this._node.parentNode).select("text.chrSetLabel").text()}}]),t}(),Fo=To.a.assign({},i),Eo=function(){function t(n,e){if(_classCallCheck(this,t),this._config=n,this._ideo=e,this._ploidy=this._ideo._ploidy,this._translate=void 0,"chrSetMargin"in n)this.chrSetMargin=n.chrSetMargin;else{var r=this._config.chrMargin;this.chrSetMargin=this._config.ploidy>1?r:0}this._tickSize=8,this._isRotated=!1}return _createClass(t,[{key:"_getLeftMargin",value:function(){return this.margin.left}},{key:"_getYScale",value:function(){return 20/this._config.chrWidth}},{key:"getChromosomeLabels",value:function(t){var n=new Po(t),e=[];return this._ideo.config.ploidy>1&&e.push(n.getSetLabel()),e.push(n.getLabel()),e.filter((function(t){return t.length>0}))}},{key:"getChromosomeBandLabelTranslate",value:function(t){var n,e,r,o=this._ideo,i=this._tickSize,a=o.config.orientation;return"vertical"===a?r="rotate(-90)translate("+(n=i)+","+(e=o.round(2+t.px.start+t.px.width/2))+")":"horizontal"===a&&(r="translate("+(n=o.round(-i+t.px.start+t.px.width/2))+","+(e=-10)+")"),{x:n,y:e,translate:r}}},{key:"didRotate",value:function(t,n){var e,r,o,i,a,s,c,u,l;r=(e=this._ideo).config.taxid,o=n.id.split("-")[0].replace("chr",""),i=(a=e.chromosomes[r][o]).bands,u=(c=Fo.select(n.parentNode)).attr("transform"),l=/scale\(.*\)/.exec(u),u=u.replace(l,""),c.attr("transform",u),s=a.width,(a=e.getChromosomeModel(i,o,r,t)).oldWidth=s,e.chromosomes[r][o]=a,e.drawChromosome(a),e.handleRotateOnClick(),e.rawAnnots&&(e.displayedTrackIndexes?e.updateDisplayedTracks(e.displayedTrackIndexes):(e.annots=e.processAnnotData(e.rawAnnots),e.drawProcessedAnnots(e.annots),e.config.filterable&&e.initCrossFilter())),!0===e.config.showBandLabels&&(e.drawBandLabels(e.chromosomes),e.hideUnshownBandLabels()),e.onDidRotateCallback&&e.onDidRotateCallback(a)}},{key:"rotate",value:function(t,n,e){var r,o,i,a;r=this._ideo,a=r.selector+" .chrSetLabel, "+r.selector+" .chrLabel",i=document.querySelector(r.selector).getBoundingClientRect(),o=Fo.selectAll(r.selector+" g.chromosome").filter((function(){return this!==e})),this._isRotated?(this._isRotated=!1,r.config.chrHeight=r.config.chrHeightOriginal,r.config.chrWidth=r.config.chrWidthOriginal,r.config.annotationHeight=r.config.annotationHeightOriginal,this.rotateBack(t,n,e,(function(){o.style("display",null),Fo.selectAll(a).style("display",null),r._layout.didRotate(n,e)}))):(this._isRotated=!0,o.style("display","none"),Fo.selectAll(a).style("display","none"),this.rotateForward(t,n,e,(function(){var t,o,a;r.config.chrHeightOriginal=r.config.chrHeight,r.config.chrWidthOriginal=r.config.chrWidth,r.config.annotationHeightOriginal=r.config.annotationHeight,"VerticalLayout"===r._layout._class?(o=i.width,a=window.innerWidth):(o=i.height-10,a=window.innerHeight-10),t=a0?n:n+4+2*t);if(!this._translate){var i;this._translate=[this._ploidy.getSetSize(0)*o*2];for(var a=1;a1&&(t*=1.8),t}},{key:"rotateForward",value:function(t,n,e,r){var o;Io.select(e.parentNode).transition().attr("transform","rotate(90) translate(30, -37.5) ").on("end",r),o=this.getChromosomeLabels(e),Io.select(this._ideo.getSvg()).append("g").attr("class","tmp").selectAll("text").data(o).enter().append("text").attr("class",(function(t,n){return 0===n&&2===o.length?"chrSetLabel":null})).attr("x",26).attr("y",(function(t,n){return 12*(n+1+o.length%2)})).style("text-anchor","middle").style("opacity",0).text(String).transition().style("opacity",1),this._ideo.config.orientation="vertical"}},{key:"rotateBack",value:function(t,n,e,r){var o=this.getChromosomeSetTranslate(t);Io.select(e.parentNode).transition().attr("transform",o).on("end",r),Io.selectAll(this._ideo.selector+" g.tmp").style("opacity",0).remove(),this._ideo.config.orientation="horizontal"}},{key:"getHeight",value:function(t){var n=this._config.chromosomes[t].length,e=this.getChromosomeSetYTranslate(n-1);return(e+=this._getChromosomeSetSize(n-1))+2*this._getAdditionalOffset()}},{key:"getWidth",value:function(){return this._config.chrHeight+1.5*this.margin.top}},{key:"getChromosomeSetLabelAnchor",value:function(){return"end"}},{key:"getChromosomeBandLabelAnchor",value:function(){return null}},{key:"getChromosomeBandTickY1",value:function(){return 2}},{key:"getChromosomeBandTickY2",value:function(){return 10}},{key:"getChromosomeSetLabelTranslate",value:function(){return null}},{key:"getChromosomeSetTranslate",value:function(t){return"translate("+this._getLeftMargin()+", "+this.getChromosomeSetYTranslate(t)+")"}},{key:"getChromosomeSetYTranslate",value:function(t){if(!this._config.ploidyDesc)return this._config.chrMargin*(t+1);if(!this._translate){this._translate=[1];for(var n=1;no-1?(e=this.margin.left+1.4*this._config.chrHeight,r=this.getChromosomeSetYTranslate(t-o)):(e=this.margin.left,r=this.getChromosomeSetYTranslate(t)),"rotate(90) translate("+e+", -"+r+")"}},{key:"getChromosomeSetYTranslate",value:function(t){var n=this._getAdditionalOffset();return this.margin.left*t+this._config.chrWidth+2*n+n*t}},{key:"getChromosomeSetLabelXPosition",value:function(t){return(this._ploidy.getSetSize(t)*this._config.chrWidth+20)/-2+(this._config.ploidy>1?0:this._config.chrWidth)}},{key:"getChromosomeLabelXPosition",value:function(){return this._config.chrWidth/-2}}]),n}(Eo),Uo=To.a.assign({},i);function Yo(t,n,e){this.config.annotationsPath&&this.fetchAnnots(this.config.annotationsPath),function(t){if("ploidyDesc"in t.config&&"string"==typeof t.config.ploidyDesc){for(var n=[],e=0;e1?new Wo(n,t):"vertical"===n.orientation?new Ho(n,t):"horizontal"===n.orientation?new jo(n,t):new Ho(n,t)}(this),function(t,n){Uo.selectAll(n.config.container+" #_ideogramOuterWrap").remove(),Uo.select(n.config.container).append("div").attr("id","_ideogramOuterWrap").append("div").attr("id","_ideogramTrackLabelContainer").style("position","absolute"),Uo.select(n.config.container+" #_ideogramOuterWrap").append("div").attr("id","_ideogramMiddleWrap").style("position","relative").style("overflow-x","auto").append("div").attr("id","_ideogramInnerWrap").append("svg").attr("id","_ideogram").attr("class",function(t){var n="";return t.config.showChromosomeLabels&&("horizontal"===t.config.orientation?n+="labeledLeft ":n+="labeled "),t.config.annotationsLayout&&"overlay"===t.config.annotationsLayout&&(n+="faint"),n}(n)).attr("width",n._layout.getWidth(t)).attr("height",n._layout.getHeight(t)).html(n.getBandColorGradients())}(n,this),this.isOnlyIdeogram=1===document.querySelectorAll("#_ideogram").length,function(t){Uo.select(t.config.container+" #_ideogramOuterWrap").append("div").attr("class","_ideogramTooltip").attr("id","_ideogramTooltip").style("opacity",0).style("position","fixed").style("text-align","center").style("padding","4px").style("font","12px sans-serif").style("background","white").style("border","1px solid black").style("border-radius","5px").style("z-index","100")}(this),this.finishInit(t,e)}var zo=e(5),qo=To.a.assign({},a,i);function Xo(t,n,e){var r=e.config.ploidy;return"sex"in e.config&&(2===r&&e.sexChromosomes.index+2===n||"female"===e.config.sex&&"Y"===t.name)}function $o(t,n,e,r,o){var i,a,s,c;for(i=0;i=chrBands.length/2&&(n.coordinateSystem="bp")}function Go(t){var n,e,r,o=this.config.taxids,i=0;for(t.length>0&&(this.bandsArray={}),e=0;e=4&&(f=h[3],i[0]=f),h.length>=8&&(u=h[8].split(","),l=t.rgbToHex(u[0],u[1],u[2]),i.push(l)),[a,i])}},{key:"parseRawAnnots",value:function(t,n,e,r){var o,i,a,s,c,u;for(u=!0,!1===isNaN(parseInt(e[n],10))&&(u=!1),o=n;o=8&&c.push("color"),{keys:c,annots:t}}},{key:"parseBed",value:function(t,n){var e,r,o,i,a=[],s=t.split(/\r\n|\n/);for(r=Object.keys(n.chromosomes[n.config.taxid]),e=0;e")}(n),ei.select(n.config.container+" #_ideogramTrackLabel").interrupt().style("top","").style("left","").style("transform",null).style("transform","rotate(-90deg)").html(o),e=function(t,n,e){var r,o,i,a,s;return r=n.id.split("-").slice(0,-1).join("-")+"-0",o=ei.select(e.config.container+" #"+r).nodes()[0].getBoundingClientRect(),i=ei.select(e.config.container+" #_ideogramTrackLabel").nodes()[0].getBoundingClientRect(),a=ei.select(e.config.container).nodes()[0].getBoundingClientRect(),s=Math.round(o.left+i.width)-o.width-1,[s-=a.left-7,-(t.split("
").length-2)*o.width+2]}(o,t,n),i=(r=_slicedToArray(e,2))[0],function(t,n,e){ei.select(e.config.container+" #_ideogramTrackLabel").style("opacity",1).style("left",n+"px").style("top",t+"px").style("width","max-content").style("transform-origin","bottom left").style("text-align","left").on("mouseover",(function(){clearTimeout(e.hideTrackLabelTimeout)})).on("mouseout",(function(){oi(e)}))}(r[1],i,n)}(this,i)})).on("mouseout",(function(){oi(i)})),i.onDrawAnnotsCallback&&i.onDrawAnnotsCallback()}function ui(t,n,e,r,o){return t===n&&"+"===o&&e>r||e===o||0!==t&&t!==n&&e<=o&&e>r||0===t&&e<=o}function li(t,n){var e,r,o,i,a,s,c,u;for(e=0;e0&&(r+="-"+t.stop.toLocaleString()),n=r,e=24,t.name&&(n=(t.displayName?t.displayName:t.name)+"
"+n,e+=8),[n,e]}(t),function(t,n,e,r,o){t.html(n).style("opacity",1).style("left",e.e+"px").style("top",e.f-r+"px").style("pointer-events",null).on("mouseover",(function(){clearTimeout(o.hideAnnotTooltipTimeout)})).on("mouseout",(function(){o.startHideAnnotTooltipTimeout()}))}(i,(r=_slicedToArray(e,2))[0],o,r[1],this))}function bi(t){var n,e,r=!1,o=(new Date).getTime();return n=this.chromosomes[this.config.taxid],function(t){"histogramScaling"in t.config==0&&(t.config.histogramScaling="absolute")}(this),void 0===this.maxAnnotsPerBar&&(this.maxAnnotsPerBar={},r=!0),function(t,n,e){var r,o,i,a,s,c,u;if(n||"relative"===e.config.histogramScaling){for(r=0,o=0;oi&&(i=u),u>r&&(r=u);e.maxAnnotsPerBar[s]=i}e.maxAnnotsPerBarAllChrs=r}}(e=function(t,n,e,r){var o,i,a,s,c,u,l,f,h,d,g=r.config.barWidth;for(o in t)for(i=t[o].annots,s=n[(a=e[t[o].chr]).chrIndex].annots,c=0;c=h&&l":"triangle"===r&&(n='"):n='",n}function xi(t,n,e){var r,o,i;for(r=0;r"+(i=e.rows[r]).name+"",o=19*r,"name"in e&&(o+=19),n+=''+wi(i)+"";return[t,n]}var Ai=Object.assign({},i);function ki(t){var n,e,r=[],o=this.chromosomes[this.config.taxid];if("annots"in t[0])return this.drawProcessedAnnots(t);for(e in o)r.push({chr:e,annots:[]});r=function(t,n){var e,r,o,i;for(e=0;e"+i.name+""),o=(s=_slicedToArray(xi(o,r='',i),2))[0],r=s[1],a+=(r+="")+"
    "+o+"
"}var c=_i.select(t.config.container+" #_ideogramOuterWrap");c.append("style").html("#_ideogramLegend {font: 12px Arial; line-height: 19px;} #_ideogramLegend svg {float: left;} #_ideogramLegend ul {position: relative; left: -14px; list-style: none; float: left; padding-left: 10px; margin-top: 0px;} #_ideogramLegend ul span {position: relative; left: -15px;} "),c.append("div").attr("id","_ideogramLegend").html(a)}(this),"heatmap"!==n?(function(t,n,e){var r;!function(t,n){var e,r;if("heatmap"!==t&&"histogram"!==t){for(r=0,e=0;e2e3&&console.warn('Rendering more than 2000 annotations in Ideogram?\nTry setting "annotationsLayout" to "heatmap" or "histogram" in your Ideogram configuration object for better layout and performance.')}}(t,n),"histogram"===t&&(n=e.getHistogramBars(n)),r=function(t,n){return Ai.selectAll(n.selector+" .chromosome").data(t).selectAll("path.annot").data((function(t){return t.annots})).enter()}(e.fillAnnots(n),e),"tracks"===t?function(t,n){var e,r=n.config.annotationHeight;e=function(t){var n;return{triangle:"m0,0 l -"+t+" "+2*t+" l "+2*t+" 0 z",circle:"m -"+(n=t)+", "+n+"a "+n+","+n+" 0 1,0 "+2*n+",0a "+n+","+n+" 0 1,0 -"+2*n+",0",rectangle:"m0,0 l 0 "+2*t+"l "+t+" 0l 0 -"+2*t+"z"}}(r),t.append("g").attr("id",(function(t){return t.id})).attr("class","annot").attr("transform",(function(t){var e=n.config.chrWidth+t.trackIndex*r*2;return"translate("+t.px+","+e+")"})).append("path").attr("d",(function(t){return function(t,n){return t.shape&&"triangle"!==t.shape?"circle"===t.shape?n.circle:"rectangle"===t.shape?n.rectangle:t.shape:n.triangle}(t,e)})).attr("fill",(function(t){return t.color})).on("mouseover",(function(t){n.showAnnotTooltip(t,this)})).on("mouseout",(function(){n.startHideAnnotTooltipTimeout()}))}(r,e):"overlay"===t?function(t,n){t.append("polygon").attr("id",(function(t){return t.id})).attr("class","annot").attr("points",(function(t){var e,r,o=n.config.chrWidth;return t.stopPx-t.startPx>1?(e=t.startPx,r=t.stopPx):(e=t.px-.5,r=t.px+.5),e+","+o+" "+r+","+o+" "+r+",0 "+e+",0"})).attr("fill",(function(t){return t.color})).on("mouseover",(function(t){n.showAnnotTooltip(t,this)})).on("mouseout",(function(){n.startHideAnnotTooltipTimeout()}))}(r,e):"histogram"===t&&function(t,n){var e,r,o={},i=n.config.chrWidth;for(r in e=n.chromosomes[n.config.taxid])o[r]=e[r];t.append("polygon").attr("class","annot").attr("points",(function(t){return function(t,n,e,r){var o,i,a,s;o=t.px+r.bump,i=t.px+r.config.barWidth+r.bump,a=n,s=n+t.height;var c=e[t.chr];return i>c&&(i=c),o+","+a+" "+i+","+a+" "+i+","+s+" "+o+","+s}(t,i,o,n)})).attr("fill",(function(t){return t.color}))}(r,e)}(n,t,this),this.onDrawAnnotsCallback&&this.onDrawAnnotsCallback()):this.drawHeatmaps(t)}var Ti=Object.assign({},i);function Mi(t,n,e){return t.append("g").attr("class","syntenicRegion").attr("id",n).on("click",(function(){var t=this,n=Ti.selectAll(e.selector+" .syntenicRegion").filter((function(){return this!==t}));n.classed("hidden",!n.classed("hidden"))})).on("mouseover",(function(){var t=this;Ti.selectAll(e.selector+" .syntenicRegion").filter((function(){return this!==t})).classed("ghost",!0)})).on("mouseout",(function(){Ti.selectAll(e.selector+" .syntenicRegion").classed("ghost",!1)}))}function Si(t,n,e){var r,o;return r=t.r1,o=t.r2,r.startPx=e.convertBpToPx(r.chr,r.start)+n,r.stopPx=e.convertBpToPx(r.chr,r.stop)+n,o.startPx=e.convertBpToPx(o.chr,o.start)+n,o.stopPx=e.convertBpToPx(o.chr,o.stop)+n,[r,o]}function Li(t,n,e,r,o,i){var a,s;a="color"in i?i.color:"#CFC",s="opacity"in i?i.opacity:1,t.append("polygon").attr("points",n+", "+r.startPx+" "+n+", "+r.stopPx+" "+e+", "+o.stopPx+" "+e+", "+o.startPx).attr("style","fill: "+a+"; fill-opacity: "+s)}function Di(t,n,e,r,o){t.append("line").attr("class","syntenyBorder").attr("x1",n).attr("x2",e).attr("y1",r.startPx).attr("y2",o.startPx),t.append("line").attr("class","syntenyBorder").attr("x1",n).attr("x2",e).attr("y1",r.stopPx).attr("y2",o.stopPx)}function Bi(t){var n=(new Date).getTime();(function(t,n,e,r){var o,i,a,s,c,u,l,f;for(o=0;oc&&(c=s+1),i.splice(4,0,s),a.push(i);u.push({chr:o.chr,annots:a})}return n.numAvailTracks=c,u}(t.annots,this),n.splice(4,0,"trackIndexOriginal"),t={keys:n,annots:e},this.rawAnnots.metadata&&(t.metadata=this.rawAnnots.metadata),t)}var Ni=[["F00"],["F00","88F"],["F00","CCC","88F"],["F00","FA0","0AF","88F"],["F00","FA0","CCC","0AF","88F"],["F00","FA0","875","578","0AF","88F"],["F00","FA0","875","CCC","578","0AF","88F"],["F00","FA0","7A0","875","0A7","578","0AF","88F"],["F00","FA0","7A0","875","CCC","0A7","578","0AF","88F"],["F00","FA0","7A0","875","552","255","0A7","578","0AF","88F"]];function Hi(t,n,e,r,o,i,a){var s;return a.config.annotationTracks?o=function(t,n,e,r,o){var i;return n.trackIndex=e[3],(i=o.config.annotationTracks[n.trackIndex]).color&&(n.color=i.color),i.shape&&(n.shape=i.shape),t[r].annots.push(n),t}(o,t,e,i,a):"trackIndex"===n[3]&&1!==a.numAvailTracks?(o=(s=_slicedToArray(function(t,n,e,r,o,i){var a=Ni[i.numAvailTracks-1];return t.trackIndex=n[3],t.trackIndexOriginal=n[4],t.color="#"+a[t.trackIndexOriginal],t.trackIndex>i.config.numTracks-1?(t.trackIndex in e?e[t.trackIndex].push(t):e[t.trackIndex]=[t],[r,e]):(r[o].annots.push(t),[r,e])}(t,e,r,o,i,a),2))[0],r=s[1]):o=function(t,n,e,r){return n.trackIndex=0,n.color||(n.color=r.config.annotationsColor),n.shape||(n.shape="triangle"),t[e].annots.push(n),t}(o,t,i,a),[o,r]}function Ii(t,n,e,r,o,i,a){var s,c,u,l;for(s=0;s10&&console.error("Ideogram only displays up to 10 tracks at a time. You specified "+r+" tracks. Perhaps consider a different way to visualize your data."),(e=Object.keys(t).length)&&console.warn("Ideogram configuration specified "+r+" tracks, but loaded annotations contain "+e+" extra tracks.")}(i,this),o}var Wi=To.a.assign({},i,a);function Ui(){var t=this.config;t.annotationsPath||t.localAnnotationsPath||this.annots||t.annotations?function(t,n){var e;n.annotationHeight||(e="heatmap"===n.annotationsLayout?n.chrWidth-1:Math.round(n.chrHeight/100),t.config.annotationHeight=e),n.annotationTracks?t.config.numAnnotTracks=n.annotationTracks.length:n.annotationsNumTracks?t.config.numAnnotTracks=n.annotationsNumTracks:t.config.numAnnotTracks=1,t.config.annotTracksHeight=n.annotationHeight*n.numAnnotTracks,void 0===n.barWidth&&(t.config.barWidth=3)}(this,t):this.config.annotTracksHeight=0,void 0===t.annotationsColor&&(this.config.annotationsColor="#F00"),function(t,n){!1!==n.showAnnotTooltip&&(t.config.showAnnotTooltip=!0),n.onWillShowAnnotTooltip&&(t.onWillShowAnnotTooltipCallback=n.onWillShowAnnotTooltip)}(this,t)}function Yi(t){t.rawAnnots.annots=t.rawAnnots.annots.sort((function(t,n){return Co(t.chr,n.chr)})),t.onLoadAnnotsCallback&&t.onLoadAnnotsCallback(),t.config.heatmaps&&t.deserializeAnnotsForHeatmap(t.rawAnnots)}function zi(t){var n,e=this;"http"===t.slice(0,4)?(n=function(t){var n,e;return"bed"!==(e=(n=t.split("?")[0].split("."))[n.length-1])&&"json"!==e?(e=e.toUpperCase(),void alert("Ideogram.js only supports BED and Ideogram JSON at the moment. Sorry, check back soon for "+e+" support!")):e}(t),Wi.text(t).then((function(t){e.rawAnnots="bed"===n?new ni(t,e).rawAnnots:JSON.parse(t),Yi(e)}))):Wi.json(e.config.annotationsPath).then((function(t){e.rawAnnots=t,Yi(e)}))}function qi(t){var n,e,r,o,i,a,s;for(n=[],e=[],r=this.chromosomesArray,o=0;o100){if(void 0===e.recovering)return o.getAssemblyAndChromosomesFromEutils(e.callback,!0),Promise.reject("Unexpectedly found genomic scaffolds instead of chromosomes while querying RefSeq. Recovering.");throw Error("Failed to find chromosomes for genome "+r)}}(t,n,e),r=t.linksets[0].linksetdbs[0].links.join(","),o=e.ideo.esummary+"&db=nucleotide&id="+r,$i.json(o)}(t,o,a)})).then((function(n){return o=function(t,n,e){var r,o,i=[];for(r in t)"uids"!==r&&(o=Vi(t[r],e),i.push(o));return i=i.sort(Ideogram.sortChromosomes),e.coordinateSystem="bp",n.push(i),n}(n.result,o,i),t(o)}),(function(t){console.warn(t)}))}var Qi,Ki=To.a.assign({},i);function Zi(){var t=this.bandsToShow.join(",");Ki.selectAll(this.selector+" .bandLabel, .bandLabelStalk").style("display","none"),Ki.selectAll(t).style("display","")}function Ji(t,n,e,r,o){return n!==e&&(t=r[o.id][e]+36),t}function ta(t,n,e,r,o,i,a){var s,c;return e',a+="gneg"===e?'':'',a+=""}return a}(Qi),''+(t+=' ')+""}var ua=e(4);function la(t,n,e,r){var o,i;return o=n[t],e.push(o),(i={iscn:o[o.length-1].iscn.stop,bp:o[o.length-1].bp.stop}).iscn>r.maxLength.iscn&&(r.maxLength.iscn=i.iscn),i.bp>r.maxLength.bp&&(r.maxLength.bp=i.bp),e}function fa(t,n,e,r){var o,i;if("iscn"===r.coordinateSystem||r.config.multiorganism)e=function(t,n,e,r){var o,i,a;for(o=r.bandData[t],i=r.parseBands(o,t,n),n=Object.keys(i).sort((function(t,n){return Co(t,n)})),r.config.chromosomes[t]=n.slice(),r.numChromosomes+=r.config.chromosomes[t].length,a=0;ar.maxLength.bp&&(r.maxLength.bp=o.length);return e}function ha(){var t,n,e,r,o,i,a,s,c=(new Date).getTime();e=[],t=function(t){var n,e,r;if(!0===t.config.multiorganism)for(t.coordinateSystem="bp",r=t.config.taxids,n=0;n1&&o.length>1&&(t=r[0].replace("chr",""),o=r[1].split("-"),n=parseInt(o[0]),e=parseInt(o[1]-1)),[t,n,e]}(t,n,e),t=(o=_slicedToArray(r,3))[0],n=o[1],e=o[2],u=(a=_slicedToArray(function(t,n){var e,r,o=[1],i=[1],a=t.bands.slice(-1)[0];for(r=0;r1){if(o=function(t,n){var e,r,o,i,a,s,c,u,l;for(e=0;e=a&&n<=s)return[u+l*(o+i/c*(n-a)-o)/i,r];return[null,r]}(t,n),r=(i=_slicedToArray(o,2))[0],e=i[1],null!==r)return r}else if(n>=1&&n<=t.length)return t.scale.bp*n;!function(t,n,e){throw new Error("Base pair out of range. bp: "+t+"; length of chr"+n.name+": "+e.bp.stop)}(n,t,e)}function ba(t,n,e,r,o,i,a){var s,c,u,l;return a=t-n,s=r-o,c=i.bp.stop-i.bp.start,u=n+a/s*(e-o),l=i.bp.start+c*(u-n)/a,Math.round(l)}function _a(t,n){var e,r,o,i,a,s;for(0===n&&(n=t.bands[0].px.start),e=0;e=o&&n<=i)return ba(s,a,n,i,o,r,void 0);!function(t,n,e){throw new Error("Pixel out of range. px: "+t+"; length of chr"+n.name+": "+e)}(n,t,i)}da.scaleLinear=De,da.max=ee;var wa=e(6),xa=Object.assign({},i);function Aa(){var t,n,e=[],r=this.annots;for(n=0;n1&&this._model.bands.push({name:"q",px:{start:0,stop:this._model.width,width:this._model.width},bp:{start:1,stop:this._model.length}}),this._model}},{key:"getCssClass",value:function(){return"noBands"}}]),n}(La),Ba=function(){function t(n){_classCallCheck(this,t),this._config=n,this._ploidy=new Bo(this._config)}return _createClass(t,[{key:"getArmColor",value:function(t,n,e){return this._config.armColors?this._config.armColors[e]:this._config.ancestors?this._getPolyploidArmColor(t,n,e):null}},{key:"getBorderColor",value:function(t,n,e){return n1&&(r=this._ploidy.getChromosomesNumber(n)),i=0;i1||""===n.orientation)&&(t-=1),t}(n,s),o=-4,!0===s.showBandLabels&&(o=s.chrMargin+s.chrWidth+26),i=s.chrMargin*n,s.numAnnotTracks>1==0&&(i+=1),a=i+o,t.selectAll("text.chrLabel").attr("transform",e.scaleSvg).selectAll("tspan").attr("x",e.x).attr("y",a)}(t,n,o,this):function(t,n,e,r){var o,i,a,s=r.config;o=-s.chrWidth-2,!0===s.showBandLabels&&(o=s.chrMargin+8),i=s.annotTracksHeight,"overlay"!==s.annotationsLayout&&(i*=2),a=3-(s.chrMargin*n+o)+i,a/=e.scale.x,t.selectAll("text.chrLabel").attr("transform","rotate(-90)"+e.scaleSvg).selectAll("tspan").attr("x",a).attr("y",e.y)}(t,n,o,this)}var za=To.a.assign({},i,a,o,r);za.scaleLinear=De,za.max=ee;var qa=function(){function t(n){_classCallCheck(this,t),this.configure=Mo,this.initDrawChromosomes=Go,this.onLoad=Ko,this.handleRotateOnClick=Qo,this.init=ti,this.finishInit=Do,this.writeContainer=Yo,this.onLoadAnnots=gi,this.onDrawAnnots=pi,this.processAnnotData=Ri,this.restoreDefaultTracks=Pi,this.updateDisplayedTracks=Fi,this.initAnnotSettings=Ui,this.fetchAnnots=zi,this.drawAnnots=ki,this.getHistogramBars=bi,this.drawHeatmaps=ci,this.deserializeAnnotsForHeatmap=hi,this.fillAnnots=qi,this.drawProcessedAnnots=Ci,this.drawSynteny=Bi,this.startHideAnnotTooltipTimeout=mi,this.showAnnotTooltip=yi,this.onWillShowAnnotTooltip=vi,this.setOriginalTrackIndexes=Ei,this.esearch="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?retmode=json&api_key=7e33ac6a08a6955ec3b83d214d22b21a2808",this.esummary="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?retmode=json&api_key=7e33ac6a08a6955ec3b83d214d22b21a2808",this.elink="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?retmode=json&api_key=7e33ac6a08a6955ec3b83d214d22b21a2808",this.getTaxidFromEutils=Xi.b,this.setTaxidData=Xi.e,this.setTaxidAndAssemblyAndChromosomes=Xi.d,this.getOrganismFromEutils=Xi.a,this.getTaxids=Xi.c,this.getAssemblyAndChromosomesFromEutils=Gi,this.parseBands=ua.a,this.drawBandLabels=aa,this.getBandColorGradients=ca,this.processBandData=ha,this.setBandsToShow=ea,this.hideUnshownBandLabels=Zi,this.drawBandLabelText=oa,this.drawBandLabelStalk=ia,this.onBrushMove=ga,this.createBrush=pa,this.drawSexChromosomes=ma,this.setSexChromosomes=va,this.convertBpToPx=ya,this.convertPxToBp=_a,this.unpackAnnots=Aa,this.packAnnots=ka,this.initCrossFilter=Ca,this.filterAnnots=Ta,this.assemblyIsAccession=To.b,this.getDataDir=To.c,this.round=To.h,this.onDidRotate=To.g,this.getSvg=To.d,this.getChromosomeModel=Sa,this.getChromosomePixels=Ma,this.drawChromosomeLabels=Ua,this.rotateChromosomeLabels=Ya,this.appendHomolog=Ha,this.drawChromosome=Ia,this.rotateAndToggleDisplay=ja,this.setOverflowScroll=Ra,this.configure(n)}return _createClass(t,null,[{key:"slugify",value:function(t){return t.toLowerCase().replace(" ","-")}},{key:"sortChromosomes",value:function(t,n){var e="nuclear"===t.type,r="nuclear"===n.type,o="chloroplast"===t.type,i="chloroplast"===n.type,a="mitochondrion"===t.type,s="mitochondrion"===n.type,c="apicoplast"===t.type,u="apicoplast"===n.type;return e&&r?Co(t.name,n.name):!e&&r?1:a&&i?1:o&&s?-1:c||a||o||!(s||i||u)?void 0:-1}},{key:"version",get:function(){return"1.4.1"}},{key:"d3",get:function(){return za}}]),t}();window.Ideogram=qa,n.default=qa}])},"object"==_typeof(exports)&&"object"==_typeof(module)?module.exports=n():(__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=n)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}).call(this,__webpack_require__(74)(module))},40:function(t,n,e){"use strict";e.r(n),e.d(n,"default",(function(){return p}));var r=e(1),o=e.n(r),i=e(248),a=e.n(i),s=e(465),c=e(13);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){return(l=Object.assign||function(t){for(var n=1;n0?he:ce)(e)},le=Math.min,fe=function(e){return e>0?le(ue(e),9007199254740991):0},pe=Math.max,de=Math.min,ge=function(e,t){var r=ue(e);return r<0?pe(r+t,0):de(r,t)},ve=function(e){return function(t,r,n){var i,a=y(t),o=fe(a.length),s=ge(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},me={includes:ve(!0),indexOf:ve(!1)},ye=me.indexOf,be=function(e,t){var r,n=y(e),i=0,a=[];for(r in n)!k(Z,r)&&k(n,r)&&a.push(r);for(;t.length>i;)k(n,r=t[i++])&&(~ye(a,r)||a.push(r));return a},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xe=we.concat("length","prototype"),ke={f:Object.getOwnPropertyNames||function(e){return be(e,xe)}},Se={f:Object.getOwnPropertySymbols},_e=se("Reflect","ownKeys")||function(e){var t=ke.f(T(e)),r=Se.f;return r?t.concat(r(e)):t},Ce=function(e,t){for(var r=_e(t),n=L.f,i=R.f,a=0;ay;y++)if((o||y in d)&&(f=g(l=d[y],y,p),e))if(t)w[y]=f;else if(f)switch(e){case 3:return!0;case 5:return l;case 6:return y;case 2:We.call(w,l)}else if(i)return!1;return a?-1:n||i?i:w}},Ye={forEach:Ze(0),map:Ze(1),filter:Ze(2),some:Ze(3),every:Ze(4),find:Ze(5),findIndex:Ze(6)},Xe=se("navigator","userAgent")||"",Ke=o.process,Qe=Ke&&Ke.versions,Je=Qe&&Qe.v8;Je?re=(te=Je.split("."))[0]+te[1]:Xe&&(!(te=Xe.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=Xe.match(/Chrome\/(\d+)/))&&(re=te[1]);var et=re&&+re,tt=qe("species"),rt=function(e){return et>=51||!s((function(){var t=[];return(t.constructor={})[tt]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},nt=Object.defineProperty,it={},at=function(e){throw e},ot=function(e,t){if(k(it,e))return it[e];t||(t={});var r=[][e],n=!!k(t,"ACCESSORS")&&t.ACCESSORS,i=k(t,0)?t[0]:at,a=k(t,1)?t[1]:void 0;return it[e]=!!r&&!s((function(){if(n&&!c)return!0;var e={length:-1};n?nt(e,1,{enumerable:!0,get:at}):e[1]=1,r.call(e,i,a)}))},st=Ye.filter,ct=rt("filter"),ht=ot("filter");Oe({target:"Array",proto:!0,forced:!ct||!ht},{filter:function(e){return st(this,e,arguments.length>1?arguments[1]:void 0)}});var ut=function(e,t){var r=[][e];return!!r&&s((function(){r.call(null,t||function(){throw 1},1)}))},lt=Ye.forEach,ft=ut("forEach"),pt=ot("forEach"),dt=ft&&pt?[].forEach:function(e){return lt(this,e,arguments.length>1?arguments[1]:void 0)};Oe({target:"Array",proto:!0,forced:[].forEach!=dt},{forEach:dt});var gt=me.indexOf,vt=[].indexOf,mt=!!vt&&1/[1].indexOf(1,-0)<0,yt=ut("indexOf"),bt=ot("indexOf",{ACCESSORS:!0,1:0});Oe({target:"Array",proto:!0,forced:mt||!yt||!bt},{indexOf:function(e){return mt?vt.apply(this,arguments)||0:gt(this,e,arguments.length>1?arguments[1]:void 0)}});var wt=Math.min,xt=[].lastIndexOf,kt=!!xt&&1/[1].lastIndexOf(1,-0)<0,St=ut("lastIndexOf"),_t=ot("indexOf",{ACCESSORS:!0,1:0}),Ct=!kt&&St&&_t?xt:function(e){if(kt)return xt.apply(this,arguments)||0;var t=y(this),r=fe(t.length),n=r-1;for(arguments.length>1&&(n=wt(n,ue(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1};Oe({target:"Array",proto:!0,forced:Ct!==[].lastIndexOf},{lastIndexOf:Ct});var At,Et=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return T(r),function(e){if(!b(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(n),t?e.call(r,n):r.__proto__=n,r}}():void 0),Rt=function(e,t,r){var n,i;return Et&&"function"==typeof(n=t.constructor)&&n!==r&&b(i=n.prototype)&&i!==r.prototype&&Et(e,i),e},Tt=Object.keys||function(e){return be(e,we)},It=c?Object.defineProperties:function(e,t){T(e);for(var r,n=Tt(t),i=n.length,a=0;i>a;)L.f(e,r=n[a++],t[r]);return e},Lt=se("document","documentElement"),Mt=W("IE_PROTO"),Pt=function(){},Ot=function(e){return"