plotly.js 2.8.3 → 2.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +39 -1
- package/.circleci/env_image.sh +1 -1
- package/.circleci/test.sh +14 -1
- package/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +12 -4
- package/dist/README.md +26 -26
- package/dist/plot-schema.json +413 -0
- package/dist/plotly-basic.js +248 -92
- package/dist/plotly-basic.min.js +5 -5
- package/dist/plotly-cartesian.js +258 -93
- package/dist/plotly-cartesian.min.js +5 -5
- package/dist/plotly-finance.js +249 -92
- package/dist/plotly-finance.min.js +4 -4
- package/dist/plotly-geo-assets.js +3 -3
- package/dist/plotly-geo.js +248 -92
- package/dist/plotly-geo.min.js +4 -4
- package/dist/plotly-gl2d.js +297 -100
- package/dist/plotly-gl2d.min.js +8 -8
- package/dist/plotly-gl3d.js +298 -100
- package/dist/plotly-gl3d.min.js +4 -4
- package/dist/plotly-locale-cs.js +1 -1
- package/dist/plotly-locale-cy.js +1 -1
- package/dist/plotly-locale-de.js +1 -1
- package/dist/plotly-locale-es.js +1 -1
- package/dist/plotly-locale-fi.js +1 -1
- package/dist/plotly-locale-fr.js +1 -1
- package/dist/plotly-locale-it.js +1 -1
- package/dist/plotly-locale-ja.js +1 -1
- package/dist/plotly-locale-ko.js +1 -1
- package/dist/plotly-locale-pt-br.js +1 -1
- package/dist/plotly-locale-pt-pt.js +1 -1
- package/dist/plotly-locale-ru.js +1 -1
- package/dist/plotly-locale-sv.js +1 -1
- package/dist/plotly-locale-sw.js +1 -1
- package/dist/plotly-locale-uk.js +1 -1
- package/dist/plotly-locale-zh-cn.js +1 -1
- package/dist/plotly-mapbox.js +248 -92
- package/dist/plotly-mapbox.min.js +3 -3
- package/dist/plotly-strict.js +311 -101
- package/dist/plotly-strict.min.js +8 -8
- package/dist/plotly-with-meta.js +324 -101
- package/dist/plotly.js +312 -101
- package/dist/plotly.min.js +11 -11
- package/dist/translation-keys.txt +1 -1
- package/lib/locales/cs.js +1 -1
- package/lib/locales/cy.js +1 -1
- package/lib/locales/de.js +1 -1
- package/lib/locales/es.js +1 -1
- package/lib/locales/fi.js +1 -1
- package/lib/locales/fr.js +1 -1
- package/lib/locales/it.js +1 -1
- package/lib/locales/ja.js +1 -1
- package/lib/locales/ko.js +1 -1
- package/lib/locales/pt-br.js +1 -1
- package/lib/locales/pt-pt.js +1 -1
- package/lib/locales/ru.js +1 -1
- package/lib/locales/sv.js +1 -1
- package/lib/locales/sw.js +1 -1
- package/lib/locales/uk.js +1 -1
- package/lib/locales/zh-cn.js +1 -1
- package/package.json +16 -13
- package/src/components/colorbar/attributes.js +1 -0
- package/src/components/colorbar/draw.js +1 -0
- package/src/components/drawing/index.js +28 -24
- package/src/components/legend/draw.js +2 -1
- package/src/components/legend/style.js +10 -6
- package/src/components/modebar/modebar.js +7 -1
- package/src/lib/svg_text_utils.js +106 -21
- package/src/plot_api/plot_config.js +9 -0
- package/src/plots/cartesian/axes.js +47 -5
- package/src/plots/cartesian/layout_attributes.js +14 -0
- package/src/plots/cartesian/tick_label_defaults.js +8 -0
- package/src/plots/gl3d/layout/axis_defaults.js +1 -0
- package/src/plots/polar/layout_attributes.js +1 -0
- package/src/plots/smith/layout_defaults.js +1 -0
- package/src/plots/ternary/layout_attributes.js +1 -0
- package/src/snapshot/tosvg.js +14 -25
- package/src/traces/carpet/ab_defaults.js +1 -0
- package/src/traces/indicator/attributes.js +1 -0
- package/src/traces/scatter/attributes.js +2 -0
- package/src/traces/scatter/defaults.js +2 -0
- package/src/traces/scatter/plot.js +4 -4
- package/src/traces/scatter/style.js +1 -1
- package/src/version.js +1 -1
- package/stackgl_modules/index.js +49 -8
- package/stackgl_modules/package-lock.json +10 -10
- package/stackgl_modules/package.json +2 -2
- package/tasks/noci_test.sh +1 -1
- package/.vscode/launch.json +0 -0
package/dist/plotly-strict.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (strict) v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js (strict) v2.10.1
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -81040,7 +81040,15 @@ exports.readUInt32BE = function (data, offset) {
|
|
|
81040
81040
|
|
|
81041
81041
|
function ProbeError(message, code, statusCode) {
|
|
81042
81042
|
Error.call(this);
|
|
81043
|
-
|
|
81043
|
+
|
|
81044
|
+
// Include stack trace in error object
|
|
81045
|
+
if (Error.captureStackTrace) {
|
|
81046
|
+
// Chrome and NodeJS
|
|
81047
|
+
Error.captureStackTrace(this, this.constructor);
|
|
81048
|
+
} else {
|
|
81049
|
+
// FF, IE 10+ and Safari 6+. Fallback for others
|
|
81050
|
+
this.stack = (new Error()).stack || '';
|
|
81051
|
+
}
|
|
81044
81052
|
|
|
81045
81053
|
this.name = this.constructor.name;
|
|
81046
81054
|
|
|
@@ -96832,6 +96840,7 @@ module.exports = overrideAll({
|
|
|
96832
96840
|
ticklen: axesAttrs.ticklen,
|
|
96833
96841
|
tickwidth: axesAttrs.tickwidth,
|
|
96834
96842
|
tickcolor: axesAttrs.tickcolor,
|
|
96843
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
96835
96844
|
showticklabels: axesAttrs.showticklabels,
|
|
96836
96845
|
tickfont: fontAttrs({
|
|
96837
96846
|
}),
|
|
@@ -97922,6 +97931,7 @@ function mockColorBarAxis(gd, opts, zrange) {
|
|
|
97922
97931
|
showticklabels: opts.showticklabels,
|
|
97923
97932
|
ticklabelposition: opts.ticklabelposition,
|
|
97924
97933
|
ticklabeloverflow: opts.ticklabeloverflow,
|
|
97934
|
+
ticklabelstep: opts.ticklabelstep,
|
|
97925
97935
|
tickfont: opts.tickfont,
|
|
97926
97936
|
tickangle: opts.tickangle,
|
|
97927
97937
|
tickformat: opts.tickformat,
|
|
@@ -99660,24 +99670,42 @@ drawing.dashStyle = function(dash, lineWidth) {
|
|
|
99660
99670
|
return dash;
|
|
99661
99671
|
};
|
|
99662
99672
|
|
|
99673
|
+
function setFillStyle(sel, trace, gd) {
|
|
99674
|
+
var markerPattern = trace.fillpattern;
|
|
99675
|
+
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, 0, '');
|
|
99676
|
+
if(patternShape) {
|
|
99677
|
+
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, 0, null);
|
|
99678
|
+
var patternFGColor = drawing.getPatternAttr(markerPattern.fgcolor, 0, null);
|
|
99679
|
+
var patternFGOpacity = markerPattern.fgopacity;
|
|
99680
|
+
var patternSize = drawing.getPatternAttr(markerPattern.size, 0, 8);
|
|
99681
|
+
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, 0, 0.3);
|
|
99682
|
+
var patternID = trace.uid;
|
|
99683
|
+
drawing.pattern(sel, 'point', gd, patternID,
|
|
99684
|
+
patternShape, patternSize, patternSolidity,
|
|
99685
|
+
undefined, markerPattern.fillmode,
|
|
99686
|
+
patternBGColor, patternFGColor, patternFGOpacity
|
|
99687
|
+
);
|
|
99688
|
+
} else if(trace.fillcolor) {
|
|
99689
|
+
sel.call(Color.fill, trace.fillcolor);
|
|
99690
|
+
}
|
|
99691
|
+
}
|
|
99692
|
+
|
|
99663
99693
|
// Same as fillGroupStyle, except in this case the selection may be a transition
|
|
99664
|
-
drawing.singleFillStyle = function(sel) {
|
|
99694
|
+
drawing.singleFillStyle = function(sel, gd) {
|
|
99665
99695
|
var node = d3.select(sel.node());
|
|
99666
99696
|
var data = node.data();
|
|
99667
|
-
var
|
|
99668
|
-
|
|
99669
|
-
sel.call(Color.fill, fillcolor);
|
|
99670
|
-
}
|
|
99697
|
+
var trace = ((data[0] || [])[0] || {}).trace || {};
|
|
99698
|
+
setFillStyle(sel, trace, gd);
|
|
99671
99699
|
};
|
|
99672
99700
|
|
|
99673
|
-
drawing.fillGroupStyle = function(s) {
|
|
99701
|
+
drawing.fillGroupStyle = function(s, gd) {
|
|
99674
99702
|
s.style('stroke-width', 0)
|
|
99675
99703
|
.each(function(d) {
|
|
99676
99704
|
var shape = d3.select(this);
|
|
99677
99705
|
// N.B. 'd' won't be a calcdata item when
|
|
99678
99706
|
// fill !== 'none' on a segment-less and marker-less trace
|
|
99679
99707
|
if(d[0].trace) {
|
|
99680
|
-
shape
|
|
99708
|
+
setFillStyle(shape, d[0].trace, gd);
|
|
99681
99709
|
}
|
|
99682
99710
|
});
|
|
99683
99711
|
};
|
|
@@ -99830,12 +99858,7 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
|
|
|
99830
99858
|
sel.style(prop, getFullUrl(fullID, gd))
|
|
99831
99859
|
.style(prop + '-opacity', null);
|
|
99832
99860
|
|
|
99833
|
-
|
|
99834
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
99835
|
-
};
|
|
99836
|
-
var k = className2query(d3.select(sel.node().parentNode)) +
|
|
99837
|
-
'>' + className2query(sel);
|
|
99838
|
-
fullLayout._gradientUrlQueryParts[k] = 1;
|
|
99861
|
+
sel.classed('gradient_filled', true);
|
|
99839
99862
|
};
|
|
99840
99863
|
|
|
99841
99864
|
/**
|
|
@@ -100042,11 +100065,6 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
|
|
|
100042
100065
|
.style('fill-opacity', null);
|
|
100043
100066
|
|
|
100044
100067
|
sel.classed('pattern_filled', true);
|
|
100045
|
-
var className2query = function(s) {
|
|
100046
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
100047
|
-
};
|
|
100048
|
-
var k = className2query(d3.select(sel.node().parentNode)) + '>.pattern_filled';
|
|
100049
|
-
fullLayout._patternUrlQueryParts[k] = 1;
|
|
100050
100068
|
};
|
|
100051
100069
|
|
|
100052
100070
|
/*
|
|
@@ -100062,9 +100080,7 @@ drawing.initGradients = function(gd) {
|
|
|
100062
100080
|
var gradientsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'gradients');
|
|
100063
100081
|
gradientsGroup.selectAll('linearGradient,radialGradient').remove();
|
|
100064
100082
|
|
|
100065
|
-
|
|
100066
|
-
// used to fix URL strings during image exports
|
|
100067
|
-
fullLayout._gradientUrlQueryParts = {};
|
|
100083
|
+
d3.select(gd).selectAll('.gradient_filled').classed('gradient_filled', false);
|
|
100068
100084
|
};
|
|
100069
100085
|
|
|
100070
100086
|
drawing.initPatterns = function(gd) {
|
|
@@ -100073,9 +100089,7 @@ drawing.initPatterns = function(gd) {
|
|
|
100073
100089
|
var patternsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'patterns');
|
|
100074
100090
|
patternsGroup.selectAll('pattern').remove();
|
|
100075
100091
|
|
|
100076
|
-
|
|
100077
|
-
// used to fix URL strings during image exports
|
|
100078
|
-
fullLayout._patternUrlQueryParts = {};
|
|
100092
|
+
d3.select(gd).selectAll('.pattern_filled').classed('pattern_filled', false);
|
|
100079
100093
|
};
|
|
100080
100094
|
|
|
100081
100095
|
drawing.getPatternAttr = function(mp, i, dflt) {
|
|
@@ -106728,7 +106742,6 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
106728
106742
|
offsetY += h;
|
|
106729
106743
|
maxWidthInGroup = Math.max(maxWidthInGroup, textGap + w);
|
|
106730
106744
|
});
|
|
106731
|
-
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
106732
106745
|
|
|
106733
106746
|
var next = maxWidthInGroup + itemGap;
|
|
106734
106747
|
|
|
@@ -106744,6 +106757,8 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
106744
106757
|
groupOffsetX = 0;
|
|
106745
106758
|
groupOffsetY += maxGroupHeightInRow + traceGroupGap;
|
|
106746
106759
|
maxGroupHeightInRow = offsetY;
|
|
106760
|
+
} else {
|
|
106761
|
+
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
106747
106762
|
}
|
|
106748
106763
|
|
|
106749
106764
|
Drawing.setTranslate(this, groupOffsetX, groupOffsetY);
|
|
@@ -107411,12 +107426,16 @@ module.exports = function style(s, gd, legend) {
|
|
|
107411
107426
|
var colorscale = cOpts.colorscale;
|
|
107412
107427
|
var reversescale = cOpts.reversescale;
|
|
107413
107428
|
|
|
107414
|
-
var
|
|
107429
|
+
var fillStyle = function(s) {
|
|
107415
107430
|
if(s.size()) {
|
|
107416
|
-
|
|
107417
|
-
|
|
107418
|
-
|
|
107419
|
-
|
|
107431
|
+
if(showFill) {
|
|
107432
|
+
Drawing.fillGroupStyle(s, gd);
|
|
107433
|
+
} else {
|
|
107434
|
+
var gradientID = 'legendfill-' + trace.uid;
|
|
107435
|
+
Drawing.gradient(s, gd, gradientID,
|
|
107436
|
+
getGradientDirection(reversescale),
|
|
107437
|
+
colorscale, 'fill');
|
|
107438
|
+
}
|
|
107420
107439
|
}
|
|
107421
107440
|
};
|
|
107422
107441
|
|
|
@@ -107445,7 +107464,7 @@ module.exports = function style(s, gd, legend) {
|
|
|
107445
107464
|
fill.enter().append('path').classed('js-fill', true);
|
|
107446
107465
|
fill.exit().remove();
|
|
107447
107466
|
fill.attr('d', pathStart + 'h' + itemWidth + 'v6h-' + itemWidth + 'z')
|
|
107448
|
-
.call(
|
|
107467
|
+
.call(fillStyle);
|
|
107449
107468
|
|
|
107450
107469
|
if(showLine || showGradientLine) {
|
|
107451
107470
|
var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);
|
|
@@ -109226,6 +109245,8 @@ var isNumeric = _dereq_('fast-isnumeric');
|
|
|
109226
109245
|
|
|
109227
109246
|
var Lib = _dereq_('../../lib');
|
|
109228
109247
|
var Icons = _dereq_('../../fonts/ploticon');
|
|
109248
|
+
var version = _dereq_('../../version').version;
|
|
109249
|
+
|
|
109229
109250
|
var Parser = new DOMParser();
|
|
109230
109251
|
|
|
109231
109252
|
/**
|
|
@@ -109504,6 +109525,10 @@ proto.hasButtons = function(buttons) {
|
|
|
109504
109525
|
return true;
|
|
109505
109526
|
};
|
|
109506
109527
|
|
|
109528
|
+
function jsVersion(str) {
|
|
109529
|
+
return str + ' (v' + version + ')';
|
|
109530
|
+
}
|
|
109531
|
+
|
|
109507
109532
|
/**
|
|
109508
109533
|
* @return {HTMLDivElement} The logo image wrapped in a group
|
|
109509
109534
|
*/
|
|
@@ -109513,7 +109538,7 @@ proto.getLogo = function() {
|
|
|
109513
109538
|
|
|
109514
109539
|
a.href = 'https://plotly.com/';
|
|
109515
109540
|
a.target = '_blank';
|
|
109516
|
-
a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));
|
|
109541
|
+
a.setAttribute('data-title', jsVersion(Lib._(this.graphInfo, 'Produced with Plotly.js')));
|
|
109517
109542
|
a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';
|
|
109518
109543
|
|
|
109519
109544
|
a.appendChild(this.createIcon(Icons.newplotlylogo));
|
|
@@ -109555,7 +109580,7 @@ function createModeBar(gd, buttons) {
|
|
|
109555
109580
|
|
|
109556
109581
|
module.exports = createModeBar;
|
|
109557
109582
|
|
|
109558
|
-
},{"../../fonts/ploticon":350,"../../lib":371,"@plotly/d3":53,"fast-isnumeric":99}],300:[function(_dereq_,module,exports){
|
|
109583
|
+
},{"../../fonts/ploticon":350,"../../lib":371,"../../version":933,"@plotly/d3":53,"fast-isnumeric":99}],300:[function(_dereq_,module,exports){
|
|
109559
109584
|
'use strict';
|
|
109560
109585
|
|
|
109561
109586
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
@@ -122779,6 +122804,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
|
|
|
122779
122804
|
// Until we get tex integrated more fully (so it can be used along with non-tex)
|
|
122780
122805
|
// allow some elements to prohibit it by attaching 'data-notex' to the original
|
|
122781
122806
|
var tex = (!_context.attr('data-notex')) &&
|
|
122807
|
+
gd && gd._context.typesetMath &&
|
|
122782
122808
|
(typeof MathJax !== 'undefined') &&
|
|
122783
122809
|
str.match(FIND_TEX);
|
|
122784
122810
|
|
|
@@ -122933,70 +122959,154 @@ function cleanEscapesForTex(s) {
|
|
|
122933
122959
|
.replace(GT_MATCH, '\\gt ');
|
|
122934
122960
|
}
|
|
122935
122961
|
|
|
122962
|
+
var inlineMath = [['$', '$'], ['\\(', '\\)']];
|
|
122963
|
+
|
|
122936
122964
|
function texToSVG(_texString, _config, _callback) {
|
|
122965
|
+
var MathJaxVersion = parseInt(
|
|
122966
|
+
(MathJax.version || '').split('.')[0]
|
|
122967
|
+
);
|
|
122968
|
+
|
|
122969
|
+
if(
|
|
122970
|
+
MathJaxVersion !== 2 &&
|
|
122971
|
+
MathJaxVersion !== 3
|
|
122972
|
+
) {
|
|
122973
|
+
Lib.warn('No MathJax version:', MathJax.version);
|
|
122974
|
+
return;
|
|
122975
|
+
}
|
|
122976
|
+
|
|
122937
122977
|
var originalRenderer,
|
|
122938
122978
|
originalConfig,
|
|
122939
122979
|
originalProcessSectionDelay,
|
|
122940
122980
|
tmpDiv;
|
|
122941
122981
|
|
|
122942
|
-
|
|
122943
|
-
function() {
|
|
122982
|
+
var setConfig2 = function() {
|
|
122944
122983
|
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
|
|
122945
122984
|
|
|
122946
122985
|
originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
|
|
122947
122986
|
if(MathJax.Hub.processSectionDelay !== undefined) {
|
|
122948
|
-
// MathJax 2.5+
|
|
122987
|
+
// MathJax 2.5+ but not 3+
|
|
122949
122988
|
MathJax.Hub.processSectionDelay = 0;
|
|
122950
122989
|
}
|
|
122951
122990
|
|
|
122952
122991
|
return MathJax.Hub.Config({
|
|
122953
122992
|
messageStyle: 'none',
|
|
122954
122993
|
tex2jax: {
|
|
122955
|
-
inlineMath:
|
|
122994
|
+
inlineMath: inlineMath
|
|
122956
122995
|
},
|
|
122957
122996
|
displayAlign: 'left',
|
|
122958
122997
|
});
|
|
122959
|
-
}
|
|
122960
|
-
|
|
122961
|
-
|
|
122998
|
+
};
|
|
122999
|
+
|
|
123000
|
+
var setConfig3 = function() {
|
|
123001
|
+
originalConfig = Lib.extendDeepAll({}, MathJax.config);
|
|
123002
|
+
|
|
123003
|
+
if(!MathJax.config.tex) {
|
|
123004
|
+
MathJax.config.tex = {};
|
|
123005
|
+
}
|
|
123006
|
+
|
|
123007
|
+
MathJax.config.tex.inlineMath = inlineMath;
|
|
123008
|
+
};
|
|
123009
|
+
|
|
123010
|
+
var setRenderer2 = function() {
|
|
122962
123011
|
originalRenderer = MathJax.Hub.config.menuSettings.renderer;
|
|
122963
123012
|
if(originalRenderer !== 'SVG') {
|
|
122964
123013
|
return MathJax.Hub.setRenderer('SVG');
|
|
122965
123014
|
}
|
|
122966
|
-
}
|
|
122967
|
-
|
|
123015
|
+
};
|
|
123016
|
+
|
|
123017
|
+
var setRenderer3 = function() {
|
|
123018
|
+
originalRenderer = MathJax.config.startup.output;
|
|
123019
|
+
if(originalRenderer !== 'svg') {
|
|
123020
|
+
MathJax.config.startup.output = 'svg';
|
|
123021
|
+
}
|
|
123022
|
+
};
|
|
123023
|
+
|
|
123024
|
+
var initiateMathJax = function() {
|
|
122968
123025
|
var randomID = 'math-output-' + Lib.randstr({}, 64);
|
|
122969
123026
|
tmpDiv = d3.select('body').append('div')
|
|
122970
123027
|
.attr({id: randomID})
|
|
122971
|
-
.style({
|
|
122972
|
-
|
|
123028
|
+
.style({
|
|
123029
|
+
visibility: 'hidden',
|
|
123030
|
+
position: 'absolute',
|
|
123031
|
+
'font-size': _config.fontSize + 'px'
|
|
123032
|
+
})
|
|
122973
123033
|
.text(cleanEscapesForTex(_texString));
|
|
122974
123034
|
|
|
122975
|
-
|
|
122976
|
-
},
|
|
122977
|
-
function() {
|
|
122978
|
-
var glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
123035
|
+
var tmpNode = tmpDiv.node();
|
|
122979
123036
|
|
|
122980
|
-
|
|
123037
|
+
return MathJaxVersion === 2 ?
|
|
123038
|
+
MathJax.Hub.Typeset(tmpNode) :
|
|
123039
|
+
MathJax.typeset([tmpNode]);
|
|
123040
|
+
};
|
|
123041
|
+
|
|
123042
|
+
var finalizeMathJax = function() {
|
|
123043
|
+
var sel = tmpDiv.select(
|
|
123044
|
+
MathJaxVersion === 2 ? '.MathJax_SVG' : '.MathJax'
|
|
123045
|
+
);
|
|
123046
|
+
|
|
123047
|
+
var node = !sel.empty() && tmpDiv.select('svg').node();
|
|
123048
|
+
if(!node) {
|
|
122981
123049
|
Lib.log('There was an error in the tex syntax.', _texString);
|
|
122982
123050
|
_callback();
|
|
122983
123051
|
} else {
|
|
122984
|
-
var
|
|
122985
|
-
|
|
123052
|
+
var nodeBBox = node.getBoundingClientRect();
|
|
123053
|
+
var glyphDefs;
|
|
123054
|
+
if(MathJaxVersion === 2) {
|
|
123055
|
+
glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
123056
|
+
} else {
|
|
123057
|
+
glyphDefs = sel.select('defs');
|
|
123058
|
+
}
|
|
123059
|
+
_callback(sel, glyphDefs, nodeBBox);
|
|
122986
123060
|
}
|
|
122987
123061
|
|
|
122988
123062
|
tmpDiv.remove();
|
|
123063
|
+
};
|
|
122989
123064
|
|
|
123065
|
+
var resetRenderer2 = function() {
|
|
122990
123066
|
if(originalRenderer !== 'SVG') {
|
|
122991
123067
|
return MathJax.Hub.setRenderer(originalRenderer);
|
|
122992
123068
|
}
|
|
122993
|
-
}
|
|
122994
|
-
|
|
123069
|
+
};
|
|
123070
|
+
|
|
123071
|
+
var resetRenderer3 = function() {
|
|
123072
|
+
if(originalRenderer !== 'svg') {
|
|
123073
|
+
MathJax.config.startup.output = originalRenderer;
|
|
123074
|
+
}
|
|
123075
|
+
};
|
|
123076
|
+
|
|
123077
|
+
var resetConfig2 = function() {
|
|
122995
123078
|
if(originalProcessSectionDelay !== undefined) {
|
|
122996
123079
|
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
|
|
122997
123080
|
}
|
|
122998
123081
|
return MathJax.Hub.Config(originalConfig);
|
|
122999
|
-
}
|
|
123082
|
+
};
|
|
123083
|
+
|
|
123084
|
+
var resetConfig3 = function() {
|
|
123085
|
+
MathJax.config = originalConfig;
|
|
123086
|
+
};
|
|
123087
|
+
|
|
123088
|
+
if(MathJaxVersion === 2) {
|
|
123089
|
+
MathJax.Hub.Queue(
|
|
123090
|
+
setConfig2,
|
|
123091
|
+
setRenderer2,
|
|
123092
|
+
initiateMathJax,
|
|
123093
|
+
finalizeMathJax,
|
|
123094
|
+
resetRenderer2,
|
|
123095
|
+
resetConfig2
|
|
123096
|
+
);
|
|
123097
|
+
} else if(MathJaxVersion === 3) {
|
|
123098
|
+
setConfig3();
|
|
123099
|
+
setRenderer3();
|
|
123100
|
+
MathJax.startup.defaultReady();
|
|
123101
|
+
|
|
123102
|
+
MathJax.startup.promise.then(function() {
|
|
123103
|
+
initiateMathJax();
|
|
123104
|
+
finalizeMathJax();
|
|
123105
|
+
|
|
123106
|
+
resetRenderer3();
|
|
123107
|
+
resetConfig3();
|
|
123108
|
+
});
|
|
123109
|
+
}
|
|
123000
123110
|
}
|
|
123001
123111
|
|
|
123002
123112
|
var TAG_STYLES = {
|
|
@@ -128842,6 +128952,11 @@ var configAttributes = {
|
|
|
128842
128952
|
dflt: false,
|
|
128843
128953
|
},
|
|
128844
128954
|
|
|
128955
|
+
typesetMath: {
|
|
128956
|
+
valType: 'boolean',
|
|
128957
|
+
dflt: true,
|
|
128958
|
+
},
|
|
128959
|
+
|
|
128845
128960
|
plotlyServerURL: {
|
|
128846
128961
|
valType: 'string',
|
|
128847
128962
|
dflt: '',
|
|
@@ -133687,7 +133802,8 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
133687
133802
|
var minRange = Math.min(rng[0], rng[1]);
|
|
133688
133803
|
var maxRange = Math.max(rng[0], rng[1]);
|
|
133689
133804
|
|
|
133690
|
-
var
|
|
133805
|
+
var numDtick = isNumeric(ax.dtick);
|
|
133806
|
+
var isDLog = (ax.type === 'log') && !(numDtick || ax.dtick.charAt(0) === 'L');
|
|
133691
133807
|
var isPeriod = ax.ticklabelmode === 'period';
|
|
133692
133808
|
|
|
133693
133809
|
// find the first tick
|
|
@@ -133718,13 +133834,36 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
133718
133834
|
x = axes.tickIncrement(x, ax.dtick, !axrev, ax.calendar);
|
|
133719
133835
|
}
|
|
133720
133836
|
|
|
133837
|
+
var ticklabelstep = ax.ticklabelstep;
|
|
133838
|
+
|
|
133721
133839
|
var maxTicks = Math.max(1000, ax._length || 0);
|
|
133722
133840
|
var tickVals = [];
|
|
133723
133841
|
var xPrevious = null;
|
|
133842
|
+
|
|
133843
|
+
var dTick;
|
|
133844
|
+
if(numDtick) {
|
|
133845
|
+
dTick = ax.dtick;
|
|
133846
|
+
} else {
|
|
133847
|
+
if(ax.type === 'date') {
|
|
133848
|
+
if(typeof ax.dtick === 'string' && ax.dtick.charAt(0) === 'M') {
|
|
133849
|
+
dTick = ONEAVGMONTH * ax.dtick.substring(1);
|
|
133850
|
+
}
|
|
133851
|
+
} else {
|
|
133852
|
+
dTick = ax._roughDTick;
|
|
133853
|
+
}
|
|
133854
|
+
}
|
|
133855
|
+
|
|
133856
|
+
var id = Math.round((
|
|
133857
|
+
ax.r2l(x) -
|
|
133858
|
+
ax.r2l(ax.tick0)
|
|
133859
|
+
) / dTick) - 1;
|
|
133860
|
+
|
|
133724
133861
|
for(;
|
|
133725
133862
|
(axrev) ? (x >= endTick) : (x <= endTick);
|
|
133726
133863
|
x = axes.tickIncrement(x, ax.dtick, axrev, ax.calendar)
|
|
133727
133864
|
) {
|
|
133865
|
+
id++;
|
|
133866
|
+
|
|
133728
133867
|
if(ax.rangebreaks) {
|
|
133729
133868
|
if(!axrev) {
|
|
133730
133869
|
if(x < startTick) continue;
|
|
@@ -133742,10 +133881,16 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
133742
133881
|
minor = true;
|
|
133743
133882
|
}
|
|
133744
133883
|
|
|
133745
|
-
|
|
133884
|
+
var obj = {
|
|
133746
133885
|
minor: minor,
|
|
133747
133886
|
value: x
|
|
133748
|
-
}
|
|
133887
|
+
};
|
|
133888
|
+
|
|
133889
|
+
if(ticklabelstep > 1 && id % ticklabelstep) {
|
|
133890
|
+
obj.skipLabel = true;
|
|
133891
|
+
}
|
|
133892
|
+
|
|
133893
|
+
tickVals.push(obj);
|
|
133749
133894
|
}
|
|
133750
133895
|
|
|
133751
133896
|
if(isPeriod) positionPeriodTicks(tickVals, ax, ax._definedDelta);
|
|
@@ -133798,12 +133943,20 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
133798
133943
|
ax._prevDateHead = '';
|
|
133799
133944
|
ax._inCalcTicks = true;
|
|
133800
133945
|
|
|
133946
|
+
var lastVisibleHead;
|
|
133947
|
+
var hideLabel = function(tick) {
|
|
133948
|
+
tick.text = ' '; // don't use an empty string here which can confuse automargin (issue 5132)
|
|
133949
|
+
ax._prevDateHead = lastVisibleHead;
|
|
133950
|
+
};
|
|
133951
|
+
|
|
133801
133952
|
var ticksOut = [];
|
|
133802
133953
|
var t, p;
|
|
133803
133954
|
for(i = 0; i < tickVals.length; i++) {
|
|
133804
133955
|
var _minor = tickVals[i].minor;
|
|
133805
133956
|
var _value = tickVals[i].value;
|
|
133806
133957
|
|
|
133958
|
+
lastVisibleHead = ax._prevDateHead;
|
|
133959
|
+
|
|
133807
133960
|
t = axes.tickText(
|
|
133808
133961
|
ax,
|
|
133809
133962
|
_value,
|
|
@@ -133818,11 +133971,14 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
133818
133971
|
if(p > maxRange) t.periodX = maxRange;
|
|
133819
133972
|
if(p < minRange) t.periodX = minRange;
|
|
133820
133973
|
|
|
133821
|
-
t
|
|
133822
|
-
ax._prevDateHead = '';
|
|
133974
|
+
hideLabel(t);
|
|
133823
133975
|
}
|
|
133824
133976
|
}
|
|
133825
133977
|
|
|
133978
|
+
if(tickVals[i].skipLabel) {
|
|
133979
|
+
hideLabel(t);
|
|
133980
|
+
}
|
|
133981
|
+
|
|
133826
133982
|
ticksOut.push(t);
|
|
133827
133983
|
}
|
|
133828
133984
|
|
|
@@ -135850,6 +136006,7 @@ axes.drawLabels = function(gd, ax, opts) {
|
|
|
135850
136006
|
var axId = ax._id;
|
|
135851
136007
|
var axLetter = axId.charAt(0);
|
|
135852
136008
|
var cls = opts.cls || axId + 'tick';
|
|
136009
|
+
|
|
135853
136010
|
var vals = opts.vals;
|
|
135854
136011
|
|
|
135855
136012
|
var labelFns = opts.labelFns;
|
|
@@ -140706,6 +140863,12 @@ module.exports = {
|
|
|
140706
140863
|
editType: 'ticks',
|
|
140707
140864
|
impliedEdits: {tickmode: 'linear'},
|
|
140708
140865
|
},
|
|
140866
|
+
ticklabelstep: {
|
|
140867
|
+
valType: 'integer',
|
|
140868
|
+
min: 1,
|
|
140869
|
+
dflt: 1,
|
|
140870
|
+
editType: 'ticks',
|
|
140871
|
+
},
|
|
140709
140872
|
tickvals: {
|
|
140710
140873
|
valType: 'data_array',
|
|
140711
140874
|
editType: 'ticks',
|
|
@@ -143570,6 +143733,14 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
|
|
|
143570
143733
|
color: dfltFontColor
|
|
143571
143734
|
});
|
|
143572
143735
|
|
|
143736
|
+
if(
|
|
143737
|
+
!options.noTicklabelstep &&
|
|
143738
|
+
axType !== 'multicategory' &&
|
|
143739
|
+
axType !== 'log'
|
|
143740
|
+
) {
|
|
143741
|
+
coerce('ticklabelstep');
|
|
143742
|
+
}
|
|
143743
|
+
|
|
143573
143744
|
if(!options.noAng) coerce('tickangle');
|
|
143574
143745
|
|
|
143575
143746
|
if(axType !== 'category') {
|
|
@@ -148478,6 +148649,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) {
|
|
|
148478
148649
|
showGrid: true,
|
|
148479
148650
|
noTickson: true,
|
|
148480
148651
|
noTicklabelmode: true,
|
|
148652
|
+
noTicklabelstep: true,
|
|
148481
148653
|
noTicklabelposition: true,
|
|
148482
148654
|
noTicklabeloverflow: true,
|
|
148483
148655
|
bgColor: options.bgColor,
|
|
@@ -156320,6 +156492,7 @@ var axisTickAttrs = overrideAll({
|
|
|
156320
156492
|
ticklen: axesAttrs.ticklen,
|
|
156321
156493
|
tickwidth: axesAttrs.tickwidth,
|
|
156322
156494
|
tickcolor: axesAttrs.tickcolor,
|
|
156495
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
156323
156496
|
showticklabels: axesAttrs.showticklabels,
|
|
156324
156497
|
showtickprefix: axesAttrs.showtickprefix,
|
|
156325
156498
|
tickprefix: axesAttrs.tickprefix,
|
|
@@ -158874,6 +159047,7 @@ var ternaryAxesAttrs = {
|
|
|
158874
159047
|
ticklen: axesAttrs.ticklen,
|
|
158875
159048
|
tickwidth: axesAttrs.tickwidth,
|
|
158876
159049
|
tickcolor: axesAttrs.tickcolor,
|
|
159050
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
158877
159051
|
showticklabels: axesAttrs.showticklabels,
|
|
158878
159052
|
showtickprefix: axesAttrs.showtickprefix,
|
|
158879
159053
|
tickprefix: axesAttrs.tickprefix,
|
|
@@ -160894,7 +161068,7 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
160894
161068
|
var toppaper = fullLayout._toppaper;
|
|
160895
161069
|
var width = fullLayout.width;
|
|
160896
161070
|
var height = fullLayout.height;
|
|
160897
|
-
var i
|
|
161071
|
+
var i;
|
|
160898
161072
|
|
|
160899
161073
|
// make background color a rect in the svg, then revert after scraping
|
|
160900
161074
|
// all other alterations have been dealt with by properly preparing the svg
|
|
@@ -160967,32 +161141,21 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
160967
161141
|
}
|
|
160968
161142
|
});
|
|
160969
161143
|
|
|
160970
|
-
|
|
160971
|
-
|
|
160972
|
-
for(k in fullLayout._gradientUrlQueryParts) queryParts.push(k);
|
|
160973
|
-
}
|
|
160974
|
-
|
|
160975
|
-
if(fullLayout._patternUrlQueryParts) {
|
|
160976
|
-
for(k in fullLayout._patternUrlQueryParts) queryParts.push(k);
|
|
160977
|
-
}
|
|
161144
|
+
svg.selectAll('.gradient_filled,.pattern_filled').each(function() {
|
|
161145
|
+
var pt = d3.select(this);
|
|
160978
161146
|
|
|
160979
|
-
|
|
160980
|
-
|
|
160981
|
-
|
|
160982
|
-
|
|
160983
|
-
|
|
160984
|
-
|
|
160985
|
-
var fill = this.style.fill;
|
|
160986
|
-
if(fill && fill.indexOf('url(') !== -1) {
|
|
160987
|
-
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
160988
|
-
}
|
|
161147
|
+
// similar to font family styles above,
|
|
161148
|
+
// we must remove " after the SVG DOM has been serialized
|
|
161149
|
+
var fill = this.style.fill;
|
|
161150
|
+
if(fill && fill.indexOf('url(') !== -1) {
|
|
161151
|
+
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
161152
|
+
}
|
|
160989
161153
|
|
|
160990
|
-
|
|
160991
|
-
|
|
160992
|
-
|
|
160993
|
-
|
|
160994
|
-
|
|
160995
|
-
}
|
|
161154
|
+
var stroke = this.style.stroke;
|
|
161155
|
+
if(stroke && stroke.indexOf('url(') !== -1) {
|
|
161156
|
+
pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
161157
|
+
}
|
|
161158
|
+
});
|
|
160996
161159
|
|
|
160997
161160
|
if(format === 'pdf' || format === 'eps') {
|
|
160998
161161
|
// these formats make the extra line MathJax adds around symbols look super thick in some cases
|
|
@@ -166655,6 +166818,7 @@ function mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) {
|
|
|
166655
166818
|
var axOut = Template.newContainer(traceOut, axName);
|
|
166656
166819
|
|
|
166657
166820
|
var defaultOptions = {
|
|
166821
|
+
noTicklabelstep: true,
|
|
166658
166822
|
tickfont: 'x',
|
|
166659
166823
|
id: axLetter + 'axis',
|
|
166660
166824
|
letter: axLetter,
|
|
@@ -181175,6 +181339,7 @@ module.exports = {
|
|
|
181175
181339
|
ticklen: axesAttrs.ticklen,
|
|
181176
181340
|
tickwidth: axesAttrs.tickwidth,
|
|
181177
181341
|
tickcolor: axesAttrs.tickcolor,
|
|
181342
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
181178
181343
|
showticklabels: axesAttrs.showticklabels,
|
|
181179
181344
|
tickfont: fontAttrs({
|
|
181180
181345
|
}),
|
|
@@ -192244,6 +192409,7 @@ var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplat
|
|
|
192244
192409
|
var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
|
|
192245
192410
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
192246
192411
|
var dash = _dereq_('../../components/drawing/attributes').dash;
|
|
192412
|
+
var pattern = _dereq_('../../components/drawing/attributes').pattern;
|
|
192247
192413
|
|
|
192248
192414
|
var Drawing = _dereq_('../../components/drawing');
|
|
192249
192415
|
var constants = _dereq_('./constants');
|
|
@@ -192431,6 +192597,7 @@ module.exports = {
|
|
|
192431
192597
|
editType: 'style',
|
|
192432
192598
|
anim: true,
|
|
192433
192599
|
},
|
|
192600
|
+
fillpattern: pattern,
|
|
192434
192601
|
marker: extendFlat({
|
|
192435
192602
|
symbol: {
|
|
192436
192603
|
valType: 'enumerated',
|
|
@@ -193167,6 +193334,7 @@ var handleLineDefaults = _dereq_('./line_defaults');
|
|
|
193167
193334
|
var handleLineShapeDefaults = _dereq_('./line_shape_defaults');
|
|
193168
193335
|
var handleTextDefaults = _dereq_('./text_defaults');
|
|
193169
193336
|
var handleFillColorDefaults = _dereq_('./fillcolor_defaults');
|
|
193337
|
+
var coercePattern = _dereq_('../../lib').coercePattern;
|
|
193170
193338
|
|
|
193171
193339
|
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
193172
193340
|
function coerce(attr, dflt) {
|
|
@@ -193220,6 +193388,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
|
|
|
193220
193388
|
if(traceOut.fill !== 'none') {
|
|
193221
193389
|
handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);
|
|
193222
193390
|
if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);
|
|
193391
|
+
coercePattern(coerce, 'fillpattern', traceOut.fillcolor, false);
|
|
193223
193392
|
}
|
|
193224
193393
|
|
|
193225
193394
|
var lineColor = (traceOut.line || {}).color;
|
|
@@ -194602,11 +194771,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
194602
194771
|
// the points on the axes are the first two points. Otherwise
|
|
194603
194772
|
// animations get a little crazy if the number of points changes.
|
|
194604
194773
|
transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))
|
|
194605
|
-
.call(Drawing.singleFillStyle);
|
|
194774
|
+
.call(Drawing.singleFillStyle, gd);
|
|
194606
194775
|
} else {
|
|
194607
194776
|
// fill to self: just join the path to itself
|
|
194608
194777
|
transition(ownFillEl3).attr('d', fullpath + 'Z')
|
|
194609
|
-
.call(Drawing.singleFillStyle);
|
|
194778
|
+
.call(Drawing.singleFillStyle, gd);
|
|
194610
194779
|
}
|
|
194611
194780
|
}
|
|
194612
194781
|
} else if(tonext) {
|
|
@@ -194618,7 +194787,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
194618
194787
|
// This makes strange results if one path is *not* entirely
|
|
194619
194788
|
// inside the other, but then that is a strange usage.
|
|
194620
194789
|
transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')
|
|
194621
|
-
.call(Drawing.singleFillStyle);
|
|
194790
|
+
.call(Drawing.singleFillStyle, gd);
|
|
194622
194791
|
} else {
|
|
194623
194792
|
// tonextx/y: for now just connect endpoints with lines. This is
|
|
194624
194793
|
// the correct behavior if the endpoints are at the same value of
|
|
@@ -194626,7 +194795,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
194626
194795
|
// things depending on whether the new endpoint projects onto the
|
|
194627
194796
|
// existing curve or off the end of it
|
|
194628
194797
|
transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')
|
|
194629
|
-
.call(Drawing.singleFillStyle);
|
|
194798
|
+
.call(Drawing.singleFillStyle, gd);
|
|
194630
194799
|
}
|
|
194631
194800
|
trace._polygons = trace._polygons.concat(prevPolygons);
|
|
194632
194801
|
} else {
|
|
@@ -195019,7 +195188,7 @@ function style(gd) {
|
|
|
195019
195188
|
.call(Drawing.lineGroupStyle);
|
|
195020
195189
|
|
|
195021
195190
|
s.selectAll('g.trace path.js-fill')
|
|
195022
|
-
.call(Drawing.fillGroupStyle);
|
|
195191
|
+
.call(Drawing.fillGroupStyle, gd);
|
|
195023
195192
|
|
|
195024
195193
|
Registry.getComponentMethod('errorbars', 'style')(s);
|
|
195025
195194
|
}
|
|
@@ -208367,7 +208536,7 @@ function getSortFunc(opts, d2c) {
|
|
|
208367
208536
|
'use strict';
|
|
208368
208537
|
|
|
208369
208538
|
// package version injected by `npm run preprocess`
|
|
208370
|
-
exports.version = '2.
|
|
208539
|
+
exports.version = '2.10.1';
|
|
208371
208540
|
|
|
208372
208541
|
},{}],934:[function(_dereq_,module,exports){
|
|
208373
208542
|
(function (global){(function (){
|
|
@@ -243547,7 +243716,7 @@ var robustSum = _glvis_("robust-sum")
|
|
|
243547
243716
|
var robustScale = _glvis_("robust-scale")
|
|
243548
243717
|
var compress = _glvis_("robust-compress")
|
|
243549
243718
|
|
|
243550
|
-
var NUM_EXPANDED =
|
|
243719
|
+
var NUM_EXPANDED = 6
|
|
243551
243720
|
|
|
243552
243721
|
function determinant_2(sum, scale, prod, compress) {
|
|
243553
243722
|
return function robustDeterminant2(m) {
|
|
@@ -243561,10 +243730,24 @@ function determinant_3(sum, scale, prod, compress) {
|
|
|
243561
243730
|
}
|
|
243562
243731
|
}
|
|
243563
243732
|
|
|
243733
|
+
function determinant_4(sum, scale, prod, compress) {
|
|
243734
|
+
return function robustDeterminant4(m) {
|
|
243735
|
+
return compress(sum(sum(scale(sum(scale(sum(prod(m[2][2], m[3][3]), prod(-m[2][3], m[3][2])), m[1][1]), sum(scale(sum(prod(m[2][1], m[3][3]), prod(-m[2][3], m[3][1])), -m[1][2]), scale(sum(prod(m[2][1], m[3][2]), prod(-m[2][2], m[3][1])), m[1][3]))), m[0][0]), scale(sum(scale(sum(prod(m[2][2], m[3][3]), prod(-m[2][3], m[3][2])), m[1][0]), sum(scale(sum(prod(m[2][0], m[3][3]), prod(-m[2][3], m[3][0])), -m[1][2]), scale(sum(prod(m[2][0], m[3][2]), prod(-m[2][2], m[3][0])), m[1][3]))), -m[0][1])), sum(scale(sum(scale(sum(prod(m[2][1], m[3][3]), prod(-m[2][3], m[3][1])), m[1][0]), sum(scale(sum(prod(m[2][0], m[3][3]), prod(-m[2][3], m[3][0])), -m[1][1]), scale(sum(prod(m[2][0], m[3][1]), prod(-m[2][1], m[3][0])), m[1][3]))), m[0][2]), scale(sum(scale(sum(prod(m[2][1], m[3][2]), prod(-m[2][2], m[3][1])), m[1][0]), sum(scale(sum(prod(m[2][0], m[3][2]), prod(-m[2][2], m[3][0])), -m[1][1]), scale(sum(prod(m[2][0], m[3][1]), prod(-m[2][1], m[3][0])), m[1][2]))), -m[0][3]))))
|
|
243736
|
+
}
|
|
243737
|
+
}
|
|
243738
|
+
|
|
243739
|
+
function determinant_5(sum, scale, prod, compress) {
|
|
243740
|
+
return function robustDeterminant5(m) {
|
|
243741
|
+
return compress(sum(sum(scale(sum(sum(scale(sum(scale(sum(prod(m[3][3], m[4][4]), prod(-m[3][4], m[4][3])), m[2][2]), sum(scale(sum(prod(m[3][2], m[4][4]), prod(-m[3][4], m[4][2])), -m[2][3]), scale(sum(prod(m[3][2], m[4][3]), prod(-m[3][3], m[4][2])), m[2][4]))), m[1][1]), scale(sum(scale(sum(prod(m[3][3], m[4][4]), prod(-m[3][4], m[4][3])), m[2][1]), sum(scale(sum(prod(m[3][1], m[4][4]), prod(-m[3][4], m[4][1])), -m[2][3]), scale(sum(prod(m[3][1], m[4][3]), prod(-m[3][3], m[4][1])), m[2][4]))), -m[1][2])), sum(scale(sum(scale(sum(prod(m[3][2], m[4][4]), prod(-m[3][4], m[4][2])), m[2][1]), sum(scale(sum(prod(m[3][1], m[4][4]), prod(-m[3][4], m[4][1])), -m[2][2]), scale(sum(prod(m[3][1], m[4][2]), prod(-m[3][2], m[4][1])), m[2][4]))), m[1][3]), scale(sum(scale(sum(prod(m[3][2], m[4][3]), prod(-m[3][3], m[4][2])), m[2][1]), sum(scale(sum(prod(m[3][1], m[4][3]), prod(-m[3][3], m[4][1])), -m[2][2]), scale(sum(prod(m[3][1], m[4][2]), prod(-m[3][2], m[4][1])), m[2][3]))), -m[1][4]))), m[0][0]), scale(sum(sum(scale(sum(scale(sum(prod(m[3][3], m[4][4]), prod(-m[3][4], m[4][3])), m[2][2]), sum(scale(sum(prod(m[3][2], m[4][4]), prod(-m[3][4], m[4][2])), -m[2][3]), scale(sum(prod(m[3][2], m[4][3]), prod(-m[3][3], m[4][2])), m[2][4]))), m[1][0]), scale(sum(scale(sum(prod(m[3][3], m[4][4]), prod(-m[3][4], m[4][3])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][4]), prod(-m[3][4], m[4][0])), -m[2][3]), scale(sum(prod(m[3][0], m[4][3]), prod(-m[3][3], m[4][0])), m[2][4]))), -m[1][2])), sum(scale(sum(scale(sum(prod(m[3][2], m[4][4]), prod(-m[3][4], m[4][2])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][4]), prod(-m[3][4], m[4][0])), -m[2][2]), scale(sum(prod(m[3][0], m[4][2]), prod(-m[3][2], m[4][0])), m[2][4]))), m[1][3]), scale(sum(scale(sum(prod(m[3][2], m[4][3]), prod(-m[3][3], m[4][2])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][3]), prod(-m[3][3], m[4][0])), -m[2][2]), scale(sum(prod(m[3][0], m[4][2]), prod(-m[3][2], m[4][0])), m[2][3]))), -m[1][4]))), -m[0][1])), sum(scale(sum(sum(scale(sum(scale(sum(prod(m[3][3], m[4][4]), prod(-m[3][4], m[4][3])), m[2][1]), sum(scale(sum(prod(m[3][1], m[4][4]), prod(-m[3][4], m[4][1])), -m[2][3]), scale(sum(prod(m[3][1], m[4][3]), prod(-m[3][3], m[4][1])), m[2][4]))), m[1][0]), scale(sum(scale(sum(prod(m[3][3], m[4][4]), prod(-m[3][4], m[4][3])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][4]), prod(-m[3][4], m[4][0])), -m[2][3]), scale(sum(prod(m[3][0], m[4][3]), prod(-m[3][3], m[4][0])), m[2][4]))), -m[1][1])), sum(scale(sum(scale(sum(prod(m[3][1], m[4][4]), prod(-m[3][4], m[4][1])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][4]), prod(-m[3][4], m[4][0])), -m[2][1]), scale(sum(prod(m[3][0], m[4][1]), prod(-m[3][1], m[4][0])), m[2][4]))), m[1][3]), scale(sum(scale(sum(prod(m[3][1], m[4][3]), prod(-m[3][3], m[4][1])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][3]), prod(-m[3][3], m[4][0])), -m[2][1]), scale(sum(prod(m[3][0], m[4][1]), prod(-m[3][1], m[4][0])), m[2][3]))), -m[1][4]))), m[0][2]), sum(scale(sum(sum(scale(sum(scale(sum(prod(m[3][2], m[4][4]), prod(-m[3][4], m[4][2])), m[2][1]), sum(scale(sum(prod(m[3][1], m[4][4]), prod(-m[3][4], m[4][1])), -m[2][2]), scale(sum(prod(m[3][1], m[4][2]), prod(-m[3][2], m[4][1])), m[2][4]))), m[1][0]), scale(sum(scale(sum(prod(m[3][2], m[4][4]), prod(-m[3][4], m[4][2])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][4]), prod(-m[3][4], m[4][0])), -m[2][2]), scale(sum(prod(m[3][0], m[4][2]), prod(-m[3][2], m[4][0])), m[2][4]))), -m[1][1])), sum(scale(sum(scale(sum(prod(m[3][1], m[4][4]), prod(-m[3][4], m[4][1])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][4]), prod(-m[3][4], m[4][0])), -m[2][1]), scale(sum(prod(m[3][0], m[4][1]), prod(-m[3][1], m[4][0])), m[2][4]))), m[1][2]), scale(sum(scale(sum(prod(m[3][1], m[4][2]), prod(-m[3][2], m[4][1])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][2]), prod(-m[3][2], m[4][0])), -m[2][1]), scale(sum(prod(m[3][0], m[4][1]), prod(-m[3][1], m[4][0])), m[2][2]))), -m[1][4]))), -m[0][3]), scale(sum(sum(scale(sum(scale(sum(prod(m[3][2], m[4][3]), prod(-m[3][3], m[4][2])), m[2][1]), sum(scale(sum(prod(m[3][1], m[4][3]), prod(-m[3][3], m[4][1])), -m[2][2]), scale(sum(prod(m[3][1], m[4][2]), prod(-m[3][2], m[4][1])), m[2][3]))), m[1][0]), scale(sum(scale(sum(prod(m[3][2], m[4][3]), prod(-m[3][3], m[4][2])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][3]), prod(-m[3][3], m[4][0])), -m[2][2]), scale(sum(prod(m[3][0], m[4][2]), prod(-m[3][2], m[4][0])), m[2][3]))), -m[1][1])), sum(scale(sum(scale(sum(prod(m[3][1], m[4][3]), prod(-m[3][3], m[4][1])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][3]), prod(-m[3][3], m[4][0])), -m[2][1]), scale(sum(prod(m[3][0], m[4][1]), prod(-m[3][1], m[4][0])), m[2][3]))), m[1][2]), scale(sum(scale(sum(prod(m[3][1], m[4][2]), prod(-m[3][2], m[4][1])), m[2][0]), sum(scale(sum(prod(m[3][0], m[4][2]), prod(-m[3][2], m[4][0])), -m[2][1]), scale(sum(prod(m[3][0], m[4][1]), prod(-m[3][1], m[4][0])), m[2][2]))), -m[1][3]))), m[0][4])))))
|
|
243742
|
+
}
|
|
243743
|
+
}
|
|
243744
|
+
|
|
243564
243745
|
function compileDeterminant(n) {
|
|
243565
243746
|
var fn =
|
|
243566
243747
|
n === 2 ? determinant_2 :
|
|
243567
|
-
n === 3 ? determinant_3 :
|
|
243748
|
+
n === 3 ? determinant_3 :
|
|
243749
|
+
n === 4 ? determinant_4 :
|
|
243750
|
+
n === 5 ? determinant_5 : undefined
|
|
243568
243751
|
return fn(robustSum, robustScale, twoProduct, compress)
|
|
243569
243752
|
}
|
|
243570
243753
|
|
|
@@ -243573,7 +243756,7 @@ var CACHE = [
|
|
|
243573
243756
|
function robustDeterminant1(m) { return [m[0][0]] }
|
|
243574
243757
|
]
|
|
243575
243758
|
|
|
243576
|
-
function proc(det0, det1, det2, det3, CACHE, gen) {
|
|
243759
|
+
function proc(det0, det1, det2, det3, det4, det5, CACHE, gen) {
|
|
243577
243760
|
return function robustDeterminant(m) {
|
|
243578
243761
|
switch (m.length) {
|
|
243579
243762
|
case 0:
|
|
@@ -243584,6 +243767,10 @@ function proc(det0, det1, det2, det3, CACHE, gen) {
|
|
|
243584
243767
|
return det2(m)
|
|
243585
243768
|
case 3:
|
|
243586
243769
|
return det3(m)
|
|
243770
|
+
case 4:
|
|
243771
|
+
return det4(m)
|
|
243772
|
+
case 5:
|
|
243773
|
+
return det5(m)
|
|
243587
243774
|
}
|
|
243588
243775
|
var det = CACHE[m.length]
|
|
243589
243776
|
if (!det) det = CACHE[m.length] = gen(m.length)
|
|
@@ -243827,13 +244014,16 @@ generateInSphereTest()
|
|
|
243827
244014
|
|
|
243828
244015
|
var determinant = _glvis_("robust-determinant")
|
|
243829
244016
|
|
|
243830
|
-
var NUM_EXPAND =
|
|
244017
|
+
var NUM_EXPAND = 6
|
|
243831
244018
|
|
|
243832
244019
|
function generateSolver(n) {
|
|
243833
244020
|
var fn =
|
|
243834
|
-
n === 2 ? solve2d :
|
|
244021
|
+
n === 2 ? solve2d :
|
|
244022
|
+
n === 3 ? solve3d :
|
|
244023
|
+
n === 4 ? solve4d :
|
|
244024
|
+
n === 5 ? solve5d : solve6d
|
|
243835
244025
|
|
|
243836
|
-
if(n <
|
|
244026
|
+
if(n < 6) {
|
|
243837
244027
|
return fn(determinant[n])
|
|
243838
244028
|
}
|
|
243839
244029
|
return fn(determinant)
|
|
@@ -243859,18 +244049,38 @@ function solve3d(det) {
|
|
|
243859
244049
|
}
|
|
243860
244050
|
}
|
|
243861
244051
|
|
|
244052
|
+
function solve4d(det) {
|
|
244053
|
+
return function robustLinearSolve4d(A, b) {
|
|
244054
|
+
return [det([[+b[0], +A[0][1], +A[0][2], +A[0][3]], [+b[1], +A[1][1], +A[1][2], +A[1][3]], [+b[2], +A[2][1], +A[2][2], +A[2][3]], [+b[3], +A[3][1], +A[3][2], +A[3][3]]]), det([[+A[0][0], +b[0], +A[0][2], +A[0][3]], [+A[1][0], +b[1], +A[1][2], +A[1][3]], [+A[2][0], +b[2], +A[2][2], +A[2][3]], [+A[3][0], +b[3], +A[3][2], +A[3][3]]]), det([[+A[0][0], +A[0][1], +b[0], +A[0][3]], [+A[1][0], +A[1][1], +b[1], +A[1][3]], [+A[2][0], +A[2][1], +b[2], +A[2][3]], [+A[3][0], +A[3][1], +b[3], +A[3][3]]]), det([[+A[0][0], +A[0][1], +A[0][2], +b[0]], [+A[1][0], +A[1][1], +A[1][2], +b[1]], [+A[2][0], +A[2][1], +A[2][2], +b[2]], [+A[3][0], +A[3][1], +A[3][2], +b[3]]]), det(A)]
|
|
244055
|
+
}
|
|
244056
|
+
}
|
|
244057
|
+
|
|
244058
|
+
function solve5d(det) {
|
|
244059
|
+
return function robustLinearSolve5d(A, b) {
|
|
244060
|
+
return [det([[+b[0], +A[0][1], +A[0][2], +A[0][3], +A[0][4]], [+b[1], +A[1][1], +A[1][2], +A[1][3], +A[1][4]], [+b[2], +A[2][1], +A[2][2], +A[2][3], +A[2][4]], [+b[3], +A[3][1], +A[3][2], +A[3][3], +A[3][4]], [+b[4], +A[4][1], +A[4][2], +A[4][3], +A[4][4]]]), det([[+A[0][0], +b[0], +A[0][2], +A[0][3], +A[0][4]], [+A[1][0], +b[1], +A[1][2], +A[1][3], +A[1][4]], [+A[2][0], +b[2], +A[2][2], +A[2][3], +A[2][4]], [+A[3][0], +b[3], +A[3][2], +A[3][3], +A[3][4]], [+A[4][0], +b[4], +A[4][2], +A[4][3], +A[4][4]]]), det([[+A[0][0], +A[0][1], +b[0], +A[0][3], +A[0][4]], [+A[1][0], +A[1][1], +b[1], +A[1][3], +A[1][4]], [+A[2][0], +A[2][1], +b[2], +A[2][3], +A[2][4]], [+A[3][0], +A[3][1], +b[3], +A[3][3], +A[3][4]], [+A[4][0], +A[4][1], +b[4], +A[4][3], +A[4][4]]]), det([[+A[0][0], +A[0][1], +A[0][2], +b[0], +A[0][4]], [+A[1][0], +A[1][1], +A[1][2], +b[1], +A[1][4]], [+A[2][0], +A[2][1], +A[2][2], +b[2], +A[2][4]], [+A[3][0], +A[3][1], +A[3][2], +b[3], +A[3][4]], [+A[4][0], +A[4][1], +A[4][2], +b[4], +A[4][4]]]), det([[+A[0][0], +A[0][1], +A[0][2], +A[0][3], +b[0]], [+A[1][0], +A[1][1], +A[1][2], +A[1][3], +b[1]], [+A[2][0], +A[2][1], +A[2][2], +A[2][3], +b[2]], [+A[3][0], +A[3][1], +A[3][2], +A[3][3], +b[3]], [+A[4][0], +A[4][1], +A[4][2], +A[4][3], +b[4]]]), det(A)]
|
|
244061
|
+
}
|
|
244062
|
+
}
|
|
244063
|
+
|
|
244064
|
+
function solve6d(det) {
|
|
244065
|
+
return function robustLinearSolve6d(A, b) {
|
|
244066
|
+
return [det([[+b[0], +A[0][1], +A[0][2], +A[0][3], +A[0][4], +A[0][5]], [+b[1], +A[1][1], +A[1][2], +A[1][3], +A[1][4], +A[1][5]], [+b[2], +A[2][1], +A[2][2], +A[2][3], +A[2][4], +A[2][5]], [+b[3], +A[3][1], +A[3][2], +A[3][3], +A[3][4], +A[3][5]], [+b[4], +A[4][1], +A[4][2], +A[4][3], +A[4][4], +A[4][5]], [+b[5], +A[5][1], +A[5][2], +A[5][3], +A[5][4], +A[5][5]]]), det([[+A[0][0], +b[0], +A[0][2], +A[0][3], +A[0][4], +A[0][5]], [+A[1][0], +b[1], +A[1][2], +A[1][3], +A[1][4], +A[1][5]], [+A[2][0], +b[2], +A[2][2], +A[2][3], +A[2][4], +A[2][5]], [+A[3][0], +b[3], +A[3][2], +A[3][3], +A[3][4], +A[3][5]], [+A[4][0], +b[4], +A[4][2], +A[4][3], +A[4][4], +A[4][5]], [+A[5][0], +b[5], +A[5][2], +A[5][3], +A[5][4], +A[5][5]]]), det([[+A[0][0], +A[0][1], +b[0], +A[0][3], +A[0][4], +A[0][5]], [+A[1][0], +A[1][1], +b[1], +A[1][3], +A[1][4], +A[1][5]], [+A[2][0], +A[2][1], +b[2], +A[2][3], +A[2][4], +A[2][5]], [+A[3][0], +A[3][1], +b[3], +A[3][3], +A[3][4], +A[3][5]], [+A[4][0], +A[4][1], +b[4], +A[4][3], +A[4][4], +A[4][5]], [+A[5][0], +A[5][1], +b[5], +A[5][3], +A[5][4], +A[5][5]]]), det([[+A[0][0], +A[0][1], +A[0][2], +b[0], +A[0][4], +A[0][5]], [+A[1][0], +A[1][1], +A[1][2], +b[1], +A[1][4], +A[1][5]], [+A[2][0], +A[2][1], +A[2][2], +b[2], +A[2][4], +A[2][5]], [+A[3][0], +A[3][1], +A[3][2], +b[3], +A[3][4], +A[3][5]], [+A[4][0], +A[4][1], +A[4][2], +b[4], +A[4][4], +A[4][5]], [+A[5][0], +A[5][1], +A[5][2], +b[5], +A[5][4], +A[5][5]]]), det([[+A[0][0], +A[0][1], +A[0][2], +A[0][3], +b[0], +A[0][5]], [+A[1][0], +A[1][1], +A[1][2], +A[1][3], +b[1], +A[1][5]], [+A[2][0], +A[2][1], +A[2][2], +A[2][3], +b[2], +A[2][5]], [+A[3][0], +A[3][1], +A[3][2], +A[3][3], +b[3], +A[3][5]], [+A[4][0], +A[4][1], +A[4][2], +A[4][3], +b[4], +A[4][5]], [+A[5][0], +A[5][1], +A[5][2], +A[5][3], +b[5], +A[5][5]]]), det([[+A[0][0], +A[0][1], +A[0][2], +A[0][3], +A[0][4], +b[0]], [+A[1][0], +A[1][1], +A[1][2], +A[1][3], +A[1][4], +b[1]], [+A[2][0], +A[2][1], +A[2][2], +A[2][3], +A[2][4], +b[2]], [+A[3][0], +A[3][1], +A[3][2], +A[3][3], +A[3][4], +b[3]], [+A[4][0], +A[4][1], +A[4][2], +A[4][3], +A[4][4], +b[4]], [+A[5][0], +A[5][1], +A[5][2], +A[5][3], +A[5][4], +b[5]]]), det(A)]
|
|
244067
|
+
}
|
|
244068
|
+
}
|
|
244069
|
+
|
|
243862
244070
|
var CACHE = [
|
|
243863
244071
|
robustLinearSolve0d,
|
|
243864
244072
|
robustLinearSolve1d
|
|
243865
244073
|
]
|
|
243866
244074
|
|
|
243867
|
-
function proc(s0, s1, s2, s3, CACHE, g) {
|
|
244075
|
+
function proc(s0, s1, s2, s3, s4, s5, CACHE, g) {
|
|
243868
244076
|
return function dispatchLinearSolve(A, b) {
|
|
243869
244077
|
switch (A.length) {
|
|
243870
244078
|
case 0: return s0(A, b);
|
|
243871
244079
|
case 1: return s1(A, b);
|
|
243872
244080
|
case 2: return s2(A, b);
|
|
243873
244081
|
case 3: return s3(A, b);
|
|
244082
|
+
case 4: return s4(A, b);
|
|
244083
|
+
case 5: return s5(A, b);
|
|
243874
244084
|
}
|
|
243875
244085
|
var s = CACHE[A.length];
|
|
243876
244086
|
if (!s) s = CACHE[A.length] = g(A.length);
|
|
@@ -243879,7 +244089,7 @@ function proc(s0, s1, s2, s3, CACHE, g) {
|
|
|
243879
244089
|
}
|
|
243880
244090
|
|
|
243881
244091
|
function generateDispatch() {
|
|
243882
|
-
while(CACHE.length
|
|
244092
|
+
while(CACHE.length < NUM_EXPAND) {
|
|
243883
244093
|
CACHE.push(generateSolver(CACHE.length))
|
|
243884
244094
|
}
|
|
243885
244095
|
module.exports = proc.apply(undefined, CACHE.concat([CACHE, generateSolver]))
|