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],e[n]=a):t.indexOf(" ")>0&&(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],e[n]=a):t.indexOf(" ")>0&&(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=""+t+">",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